@teambit/preview 1.0.952 → 1.0.954
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.
- package/artifacts/ui-bundle/asset-manifest.json +2 -2
- package/artifacts/ui-bundle/static/js/{main.1d35083e.cjs → main.1c36dd84.cjs} +1 -1
- package/dist/generate-link.d.ts +1 -1
- package/dist/generate-link.js +90 -9
- package/dist/generate-link.js.map +1 -1
- package/dist/{preview-1776437927641.js → preview-1776614137590.js} +2 -2
- package/dist/preview.main.runtime.d.ts +2 -0
- package/dist/preview.main.runtime.js +18 -15
- package/dist/preview.main.runtime.js.map +1 -1
- package/dist/preview.preview.runtime.d.ts +1 -0
- package/dist/preview.preview.runtime.js +10 -0
- package/dist/preview.preview.runtime.js.map +1 -1
- package/dist/preview.start-plugin.d.ts +4 -0
- package/dist/preview.start-plugin.js +41 -5
- package/dist/preview.start-plugin.js.map +1 -1
- package/package.json +19 -19
- package/preview.preview.runtime.tsx +12 -0
- package/preview.start-plugin.tsx +45 -5
|
@@ -30,4 +30,4 @@ Run "bit envs" to see other components that uses the same env`)}}exports1.Previe
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
`;async function fetchComponentAspects(componentId){try{return(await (0,_graphqlRequest().request)("/graphql",GET_COMPONENT_ASPECTS,{id:componentId.toString()})).getHost.get.aspects.map(x=>x.id)}catch(err){console.error(`[gql] error on "getComponentAspects" - "${err.toString()}"`);return}}},7154(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.loadLink=function({href}){return new Promise((resolve,reject)=>{let link=document.createElement("link");href.endsWith(".css")&&link.setAttribute("rel","stylesheet"),link.setAttribute("href",href),link.onload=()=>resolve(),link.onerror=(message,_,_1,_2,error)=>reject(error||Error(`[preview.preview] failed to load link: ${message}`)),document.head.appendChild(link)})},exports1.loadScript=function({src}){return new Promise((resolve,reject)=>{let script=document.createElement("script");script.setAttribute("defer","defer"),script.src=src,script.onload=()=>resolve(),script.onerror=(message,_,_1,_2,error)=>reject(error||Error(`[preview.preview] failed to load script: ${message}`)),document.head.appendChild(script)})}},2268(__unused_rspack_module,exports1,__webpack_require__){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0});var _exportNames={PreviewAspect:!0,PreviewRuntime:!0,ENV_PREVIEW_STRATEGY_NAME:!0,COMPONENT_PREVIEW_STRATEGY_NAME:!0};function _preview(){let data=__webpack_require__(3389);return _preview=function(){return data},data}Object.defineProperty(exports1,"COMPONENT_PREVIEW_STRATEGY_NAME",{enumerable:!0,get:function(){return _strategiesNames().COMPONENT_PREVIEW_STRATEGY_NAME}}),Object.defineProperty(exports1,"ENV_PREVIEW_STRATEGY_NAME",{enumerable:!0,get:function(){return _strategiesNames().ENV_PREVIEW_STRATEGY_NAME}}),Object.defineProperty(exports1,"PreviewAspect",{enumerable:!0,get:function(){return _preview().PreviewAspect}}),Object.defineProperty(exports1,"PreviewRuntime",{enumerable:!0,get:function(){return _preview().PreviewRuntime}}),Object.defineProperty(exports1,"default",{enumerable:!0,get:function(){return _preview().PreviewAspect}});var _events=__webpack_require__(2709);function _strategiesNames(){let data=__webpack_require__(9285);return _strategiesNames=function(){return data},data}Object.keys(_events).forEach(function(key){"default"===key||"__esModule"===key||Object.prototype.hasOwnProperty.call(_exportNames,key)||key in exports1&&exports1[key]===_events[key]||Object.defineProperty(exports1,key,{enumerable:!0,get:function(){return _events[key]}})})},9663(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _previewModules(){let data=__webpack_require__(6300);return _previewModules=function(){return data},data}Object.defineProperty(exports1,"__esModule",{value:!0}),Object.defineProperty(exports1,"PREVIEW_MODULES",{enumerable:!0,get:function(){return _previewModules().PREVIEW_MODULES}}),Object.defineProperty(exports1,"PreviewModules",{enumerable:!0,get:function(){return _previewModules().PreviewModules}}),Object.defineProperty(exports1,"linkModules",{enumerable:!0,get:function(){return _previewModules().linkModules}})},3389(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _harmony(){let data=__webpack_require__(2337);return _harmony=function(){return data},data}Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.default=exports1.PreviewRuntime=exports1.PreviewAspect=void 0;let PreviewRuntime=exports1.PreviewRuntime=new(_harmony()).RuntimeDefinition("preview"),PreviewAspect=exports1.PreviewAspect=_harmony().Aspect.create({id:"teambit.preview/preview",dependencies:[],defaultConfig:{},declareRuntime:PreviewRuntime});exports1.default=PreviewAspect},755(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _pubsub(){let data=__webpack_require__(8410);return _pubsub=function(){return data},data}function _harmony(){let data=__webpack_require__(2337);return _harmony=function(){return data},data}function _componentId(){let data=__webpack_require__(2435);return _componentId=function(){return data},data}function _crossFetch(){var e;let data=(e=__webpack_require__(2607))&&e.__esModule?e:{default:e};return _crossFetch=function(){return data},data}function _lodash(){let data=__webpack_require__(2935);return _lodash=function(){return data},data}function _exceptions(){let data=__webpack_require__(7414);return _exceptions=function(){return data},data}function _preview(){let data=__webpack_require__(3389);return _preview=function(){return data},data}function _events(){let data=__webpack_require__(2709);return _events=function(){return data},data}function _renderingContext(){let data=__webpack_require__(2269);return _renderingContext=function(){return data},data}function _fetchComponentAspects(){let data=__webpack_require__(9442);return _fetchComponentAspects=function(){return data},data}function _lruCache(){let data=__webpack_require__(4606);return _lruCache=function(){return data},data}function _previewModules(){let data=__webpack_require__(9663);return _previewModules=function(){return data},data}function _htmlUtils(){let data=__webpack_require__(7154);return _htmlUtils=function(){return data},data}function _sizeEvent(){let data=__webpack_require__(6575);return _sizeEvent=function(){return data},data}function _defineProperty(e,r,t){var i;return(r="symbol"==typeof(i=function(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(r,"string"))?i:i+"")in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class PreviewPreview{constructor(pubsub,previewSlot,renderingContextSlot){this.pubsub=pubsub,this.previewSlot=previewSlot,this.renderingContextSlot=renderingContextSlot,_defineProperty(this,"isDev",!1),_defineProperty(this,"_setupPromise",void 0),_defineProperty(this,"setup",()=>this.isReady()?Promise.resolve():(this._setupPromise??=new Promise(resolve=>{_previewModules().PREVIEW_MODULES.onSet.add(()=>{this.isReady()&&resolve()})}),this._setupPromise)),_defineProperty(this,"render",async rootExt=>{window.document.body.style.width="fit-content";let{previewName,componentId,envId}=this.getLocation(),name=previewName||this.getDefault();rootExt&&(this.isDev="teambit.workspace/workspace"===rootExt);let preview=this.getPreview(name);if(!preview||!componentId)throw new(_exceptions()).PreviewNotFound(previewName);let includesAll=await Promise.all((preview.include||[]).map(async inclPreviewName=>{let includedPreview=this.getPreview(inclPreviewName);if(!includedPreview)return;let inclPreviewModule=await this.getPreviewModule(inclPreviewName,componentId);return includedPreview.selectPreviewModel?.(componentId.fullName,inclPreviewModule)})),query=this.getQuery(),includes="true"===this.getParam(query,"onlyOverview")?[]:includesAll.filter(module=>!!module).map(module=>{if(!module.default||!(0,_lodash().isObject)(module.default))return module;let keysWithoutDefault=Object.keys(module).filter(key=>"default"!==key),defaultKeys=Object.keys(module.default);return(0,_lodash().intersection)(keysWithoutDefault,defaultKeys).length===defaultKeys.length?module.default:module}),componentAspects=this.isDev?await this.getComponentAspects(componentId.toString()):void 0,previewModule=await this.getPreviewModule(name,componentId),render=preview.render(componentId,envId||"",previewModule,includes,this.getRenderingContext(componentAspects));return this.reportSize(),this.setViewport(),this.setFullScreen(),render}),_defineProperty(this,"componentAspectsCache",new(_lruCache()).LRUCache({max:100,ttl:432e5})),_defineProperty(this,"getComponentAspects",async componentId=>{let cached=this.componentAspectsCache.get(componentId);if(cached)return cached;let result=await (0,_fetchComponentAspects().fetchComponentAspects)(componentId);return this.componentAspectsCache.set(componentId,result),result}),this.registerClickPubSub()}registerClickPubSub(){window.addEventListener("click",e=>{let timestamp=Date.now(),clickEvent=Object.assign({},e);this.pubsub.pub(_preview().PreviewAspect.id,new(_events()).ClickInsideAnIframeEvent(timestamp,clickEvent))})}isReady(){let{previewName}=this.getLocation(),name=previewName||this.getDefault();if(!_previewModules().PREVIEW_MODULES.has(name))return!1;let preview=this.getPreview(name);return!!preview&&!!(preview.include?.every(included=>_previewModules().PREVIEW_MODULES.has(included))??!0)}setFullScreen(){let query=this.getQuery();if(!this.getParam(query,"fullscreen"))return;let root=window.document.getElementById("root");root&&(root.style.height="100vh")}setViewport(){let query=this.getQuery(),viewPort=this.getParam(query,"viewport");if(!viewPort){window.document.body.style.width="100%";return}window.document.body.style.maxWidth=`${viewPort}px`}reportSize(){if(!window?.parent||!window?.document)return;let publish=()=>{let root,prevHeight,height,width,{width:width1,height:height1}=(prevHeight=(root=window.document.getElementById("root")??window.document.documentElement).style.height,root.style.height="auto",height=root.scrollHeight,width=root.scrollWidth,root.style.height=prevHeight,{width,height});this.pubsub.pub(_preview().PreviewAspect.id,new(_sizeEvent()).SizeEvent({width:width1,height:height1}))};publish();let resizedObserver=new ResizeObserver((0,_lodash().debounce)(publish,100));resizedObserver.observe(window.document.documentElement);let root=window.document.getElementById("root");root&&resizedObserver.observe(root)}async getPreviewModule(previewName,id){let compShortId=id.fullName,relevantModel=_previewModules().PREVIEW_MODULES.get(previewName);if(!relevantModel)throw Error(`[preview.preview] missing preview "${previewName}"`);if(relevantModel.componentMap[compShortId])return relevantModel;let componentPreviews=await this.fetchComponentPreview(id,previewName);_previewModules().PREVIEW_MODULES.loadComponentPreviews(compShortId,componentPreviews);let component=componentPreviews[previewName],metadata=componentPreviews[`${previewName}_metadata`];return{modulesMap:relevantModel.modulesMap,componentMap:{[id.fullName]:component},componentMapMetadata:{[id.fullName]:metadata}}}async fetchComponentPreview(id,name){let previewFile,allFiles=await this.fetchComponentPreviewFiles(id,name);return null===allFiles?{}:(await Promise.all(allFiles.map(file=>{if(file.endsWith("-preview.js")){previewFile=file;return}return this.addComponentFileElement(id,file)})),previewFile)?this.loadPreviewScript(id,name,previewFile):{}}addComponentFileElement(id,previewBundleFileName){if(previewBundleFileName.endsWith(".js"))return this.addComponentFileScriptElement(id,previewBundleFileName);this.addComponentFileLinkElement(id,previewBundleFileName).catch(err=>{throw Error(`[preview.preview] failed loading asset "${previewBundleFileName}". Error - "${err?.toString()}"`)})}async fetchComponentPreviewFiles(id,previewName){let stringId=id.toString(),url=`/api/${stringId}/~aspect/preview-assets`,res=await (0,_crossFetch().default)(url);if(res.status>=400)throw new(_exceptions()).PreviewNotFound(previewName);let parsed=await res.json();if(parsed.isBundledWithEnv)return null;if(!parsed.files||!parsed.files.length)throw new(_exceptions()).PreviewNotFound(previewName);return parsed.files}addComponentFileScriptElement(id,previewBundleFileName){let stringId=id.toString(),src=`/api/${stringId}/~aspect/component-preview/${previewBundleFileName}`;return(0,_htmlUtils().loadScript)({src})}addComponentFileLinkElement(id,previewBundleFileName){let stringId=id.toString(),href=`/api/${stringId}/~aspect/component-preview/${previewBundleFileName}`;return(0,_htmlUtils().loadLink)({href})}async loadPreviewScript(id,previewName,previewBundleFileName){let src=`/api/${id.toString()}/~aspect/component-preview/${previewBundleFileName}`;await (0,_htmlUtils().loadScript)({src});let globalId=`${id.toStringWithoutVersion()}-preview`,componentPreview=window[globalId];if(!componentPreview)throw new(_exceptions()).PreviewNotFound(previewName);return componentPreview}registerPreview(preview){return this.previewSlot.register(preview),this}getRenderingContext(aspectsFilter){return new(_renderingContext()).RenderingContext(this.renderingContextSlot,{aspectsFilter})}registerRenderContext(renderContext){return this.renderingContextSlot.register(renderContext),this}getDefault(){let previews=this.previewSlot.values(),defaultOne=previews.find(previewCandidate=>previewCandidate.default);return defaultOne?.name||previews[0].name}getPreview(previewName){return this.previewSlot.values().find(previewCandidate=>previewCandidate.name===previewName)}getParam(query,param){return new URLSearchParams(query).get(param)}getQuery(){let[,after]=window.location.hash.substring(1).split("?");return after}getLocation(){let[before,after]=window.location.hash.substring(1).split("?");return{previewName:this.getParam(after,"preview"),envId:this.getParam(after,"env"),componentId:_componentId().ComponentID.tryFromString(before)}}static async provider([pubsub],config,[previewSlot,renderingContextSlot]){let preview=new PreviewPreview(pubsub,previewSlot,renderingContextSlot);return window.addEventListener("hashchange",()=>{preview.render()}),preview}}_defineProperty(PreviewPreview,"runtime",_preview().PreviewRuntime),_defineProperty(PreviewPreview,"dependencies",[_pubsub().PubsubAspect]),_defineProperty(PreviewPreview,"slots",[_harmony().Slot.withType(),_harmony().Slot.withType()]),_preview().PreviewAspect.addRuntime(PreviewPreview)},2269(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.RenderingContext=void 0;class RenderingContext{constructor(contexts,options={}){this.contexts=contexts,this.options=options}get(aspectId){let contextFactory=this.contexts.get(aspectId);return contextFactory?.(this.options)}}exports1.RenderingContext=RenderingContext},6575(__unused_rspack_module,exports1,__webpack_require__){"use strict";var r,i;function _pubsub(){let data=__webpack_require__(8410);return _pubsub=function(){return data},data}Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.SizeEvent=void 0;class SizeEvent extends _pubsub().BitBaseEvent{constructor(sizeEvent){super(SizeEvent.TYPE,"0.0.1",new Date().getTime(),sizeEvent)}}exports1.SizeEvent=SizeEvent,(r="symbol"==typeof(i=function(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(r="TYPE","string"))?i:i+"")in SizeEvent?Object.defineProperty(SizeEvent,r,{value:"preview-size",enumerable:!0,configurable:!0,writable:!0}):SizeEvent[r]="preview-size"},9285(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.ENV_PREVIEW_STRATEGY_NAME=exports1.COMPONENT_PREVIEW_STRATEGY_NAME=void 0,exports1.ENV_PREVIEW_STRATEGY_NAME="env",exports1.COMPONENT_PREVIEW_STRATEGY_NAME="component"},8434(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.BitBaseEvent=void 0;class BitBaseEvent{constructor(type,version,timestamp,data){this.type=type,this.version=version,this.timestamp=timestamp,this.data=data}}exports1.BitBaseEvent=BitBaseEvent},8410(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _pubsub(){let data=__webpack_require__(6525);return _pubsub=function(){return data},data}function _bitBaseEvent(){let data=__webpack_require__(8434);return _bitBaseEvent=function(){return data},data}function _pubsubContext(){let data=__webpack_require__(9665);return _pubsubContext=function(){return data},data}Object.defineProperty(exports1,"__esModule",{value:!0}),Object.defineProperty(exports1,"BitBaseEvent",{enumerable:!0,get:function(){return _bitBaseEvent().BitBaseEvent}}),Object.defineProperty(exports1,"PubsubAspect",{enumerable:!0,get:function(){return _pubsub().PubsubAspect}}),Object.defineProperty(exports1,"default",{enumerable:!0,get:function(){return _pubsub().PubsubAspect}}),Object.defineProperty(exports1,"usePubSub",{enumerable:!0,get:function(){return _pubsubContext().usePubSub}}),Object.defineProperty(exports1,"usePubSubIframe",{enumerable:!0,get:function(){return _pubsubContext().usePubSubIframe}})},7559(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.PubSubNoParentError=void 0;class PubSubNoParentError extends Error{constructor(){super("could not connect to parent window"),this.name="PubSubNoParentError"}}exports1.PubSubNoParentError=PubSubNoParentError},9665(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _react(){let data=_interopRequireWildcard(__webpack_require__(2015));return _react=function(){return data},data}function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f)}for(let t in e)"default"!==t&&({}).hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(f,t,i):f[t]=e[t]);return f})(e,t)}Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.createProvider=function(pubSubContext){return({children})=>_react().default.createElement(pubsubRegistry.Provider,{value:pubSubContext},children)},exports1.pubsubRegistry=void 0,exports1.usePubSub=usePubSub,exports1.usePubSubIframe=function(ref){let pubSub=usePubSub();(0,_react().useEffect)(()=>{if(!ref?.current||!pubSub)return()=>{};let destroyConnection=pubSub.connect(ref.current);return()=>destroyConnection()},[ref?.current,pubSub])};let pubsubRegistry=exports1.pubsubRegistry=(0,_react().createContext)(void 0);function usePubSub(){return(0,_react().useContext)(pubsubRegistry)}},6525(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _harmony(){let data=__webpack_require__(2337);return _harmony=function(){return data},data}Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.default=exports1.PubsubAspect=void 0;let PubsubAspect=exports1.PubsubAspect=_harmony().Aspect.create({id:"teambit.harmony/pubsub",dependencies:[]});exports1.default=PubsubAspect},9283(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _preview(){let data=__webpack_require__(2268);return _preview=function(){return data},data}function _uiFoundationUi(){let data=__webpack_require__(2264);return _uiFoundationUi=function(){return data},data}function _eventemitter(){let data=__webpack_require__(7551);return _eventemitter=function(){return data},data}function _penpal(){let data=__webpack_require__(3652);return _penpal=function(){return data},data}function _noParentError(){let data=__webpack_require__(7559);return _noParentError=function(){return data},data}function _pubsub(){let data=__webpack_require__(6525);return _pubsub=function(){return data},data}function _defineProperty(e,r,t){var i;return(r="symbol"==typeof(i=function(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(r,"string"))?i:i+"")in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class PubsubPreview{constructor(){_defineProperty(this,"_parentPubsub",void 0),_defineProperty(this,"events",new(_eventemitter()).EventEmitter2),_defineProperty(this,"connectToParentPubSub",(retries=10)=>{if(retries<=0)throw new(_noParentError()).PubSubNoParentError;return(0,_penpal().connectToParent)({timeout:300,methods:{pub:this.handleMessageFromParent}}).promise.then(parentPubsub=>this._parentPubsub=parentPubsub).catch(e=>{if(e.code!==_penpal().ErrorCode.ConnectionTimeout)throw e;return this.connectToParentPubSub(retries-1)})}),_defineProperty(this,"handleMessageFromParent",(topic,message)=>{this.events.emit(topic,message)})}sub(topic,callback){let emitter=this.events;return emitter.on(topic,callback),()=>{emitter.off(topic,callback)}}pub(topic,event){this.events.emit(topic,event),this._parentPubsub?.pub(topic,event).catch(err=>{console.error("[Pubsub.preview]",err)})}inIframe(){try{return _uiFoundationUi().isBrowser&&window.self!==window.top}catch{return!1}}static async provider(){let pubsubPreview=new PubsubPreview;return pubsubPreview.inIframe()&&pubsubPreview.connectToParentPubSub().catch(err=>{err instanceof _noParentError().PubSubNoParentError||console.error("[Pubsub.preview]",err)}),pubsubPreview}}_defineProperty(PubsubPreview,"runtime",_preview().PreviewRuntime),_pubsub().PubsubAspect.addRuntime(PubsubPreview)},1110(__unused_rspack_module,exports1,__webpack_require__){"use strict";var ownKeys,__createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||(ownKeys=function(o){return(ownKeys=Object.getOwnPropertyNames||function(o){var ar=[];for(var k in o)Object.prototype.hasOwnProperty.call(o,k)&&(ar[ar.length]=k);return ar})(o)},function(mod){if(mod&&mod.__esModule)return mod;var result={};if(null!=mod)for(var k=ownKeys(mod),i=0;i<k.length;i++)"default"!==k[i]&&__createBinding(result,mod,k[i]);return __setModuleDefault(result,mod),result}),__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.HighlighterProvider=exports1.PARAM_NAME=void 0;let react_1=__importStar(__webpack_require__(2015)),classnames_1=__importDefault(__webpack_require__(7500)),react_ui_component_highlighter_1=__webpack_require__(5759),query_string_1=__importDefault(__webpack_require__(887)),highlighter_provider_module_scss_1=__importDefault(__webpack_require__(4440));exports1.PARAM_NAME="highlighter";let classes={container:highlighter_provider_module_scss_1.default.label};exports1.HighlighterProvider=({children})=>{let hash=function(){let[hash,setHash]=(0,react_1.useState)(window?window.location.hash:"");return(0,react_1.useEffect)(()=>{let updateHash=()=>{setHash(window.location.hash)};return updateHash(),window.addEventListener("hashchange",updateHash),()=>{window.removeEventListener("hashchange",updateHash)}},[]),hash}(),isActive=(0,react_1.useMemo)(()=>{let hashQuery=hash.split("?")[1];return"true"===query_string_1.default.parse(hashQuery)[exports1.PARAM_NAME]},[hash]);return react_1.default.createElement(react_ui_component_highlighter_1.ComponentHighlighter,{disabled:!isActive,className:(0,classnames_1.default)(highlighter_provider_module_scss_1.default.highlighter,isActive&&highlighter_provider_module_scss_1.default.active),classes:classes},children)}},9493(__unused_rspack_module,exports1,__webpack_require__){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.HighlighterProvider=void 0;var highlighter_provider_1=__webpack_require__(1110);Object.defineProperty(exports1,"HighlighterProvider",{enumerable:!0,get:function(){return highlighter_provider_1.HighlighterProvider}})},7075(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _harmony(){let data=__webpack_require__(2337);return _harmony=function(){return data},data}Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.default=exports1.ReactAspect=void 0;let ReactAspect=exports1.ReactAspect=_harmony().Aspect.create({id:"teambit.react/react"});exports1.default=ReactAspect},3893(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _lodash(){var e;let data=(e=__webpack_require__(7065))&&e.__esModule?e:{default:e};return _lodash=function(){return data},data}function _harmony(){let data=__webpack_require__(2337);return _harmony=function(){return data},data}function _preview(){let data=__webpack_require__(2268);return _preview=function(){return data},data}function _reactUi(){let data=__webpack_require__(9493);return _reactUi=function(){return data},data}function _react(){let data=__webpack_require__(7075);return _react=function(){return data},data}function _defineProperty(e,r,t){var i;return(r="symbol"==typeof(i=function(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(r,"string"))?i:i+"")in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class ReactPreview{constructor(preview,providerSlot){this.preview=preview,this.providerSlot=providerSlot,_defineProperty(this,"getRenderingContext",({aspectsFilter})=>{let entries=this.providerSlot.toArray();if(aspectsFilter){let allowedAspects=new Set(aspectsFilter);allowedAspects.add(_react().ReactAspect.id),entries=entries.filter(([aspectId])=>allowedAspects.has(aspectId))}return{providers:(0,_lodash().default)(entries.map(([,provider])=>provider))}})}registerProvider(provider){this.providerSlot.register(provider)}static async provider([preview],config,[providerSlot]){let reactPreview=new ReactPreview(preview,providerSlot);return reactPreview.registerProvider([_reactUi().HighlighterProvider]),preview.registerRenderContext(reactPreview.getRenderingContext),reactPreview}}_defineProperty(ReactPreview,"runtime",_preview().PreviewRuntime),_defineProperty(ReactPreview,"slots",[_harmony().Slot.withType()]),_defineProperty(ReactPreview,"dependencies",[_preview().PreviewAspect]),_react().ReactAspect.addRuntime(ReactPreview)},8706(module){"use strict";module.exports={label:"element-highlighter.module__label--YzI5O",frame:"element-highlighter.module__frame--YzI5O"}},2698(module){"use strict";module.exports={overlayBorder:"frame.module__overlayBorder--ZWM3Z",hidden:"frame.module__hidden--ZWM3Z",offset:"6"}},9096(module){"use strict";module.exports={componentStrip:"component-strip.module__componentStrip--ZTk5M",nameBlock:"component-strip.module__nameBlock--ZTk5M",version:"component-strip.module__version--ZTk5M"}},4278(module){"use strict";module.exports={othersContainer:"label.module__othersContainer--XzVhM",othersTooltip:"label.module__othersTooltip--XzVhM",active:"label.module__active--XzVhM",hidden:"label.module__hidden--XzVhM"}},4440(module){"use strict";module.exports={highlighter:"highlighter-provider.module__highlighter--XzBjO",active:"highlighter-provider.module__active--XzBjO",label:"highlighter-provider.module__label--XzBjO"}},2015(module){"use strict";module.exports=require("react")},2326(module){"use strict";module.exports=require("react-dom")},7500(module){!function(){"use strict";var hasOwn={}.hasOwnProperty;function classNames(){for(var classes="",i=0;i<arguments.length;i++){var arg=arguments[i];arg&&(classes=appendClass(classes,function(arg){if("string"==typeof arg||"number"==typeof arg)return arg;if("object"!=typeof arg)return"";if(Array.isArray(arg))return classNames.apply(null,arg);if(arg.toString!==Object.prototype.toString&&!arg.toString.toString().includes("[native code]"))return arg.toString();var classes="";for(var key in arg)hasOwn.call(arg,key)&&arg[key]&&(classes=appendClass(classes,key));return classes}(arg)))}return classes}function appendClass(value1,newClass){return newClass?value1?value1+" "+newClass:value1+newClass:value1}module.exports?(classNames.default=classNames,module.exports=classNames):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return classNames}):window.classNames=classNames}()},3922(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.defaultJsonSerializer=void 0,exports1.defaultJsonSerializer=JSON},4927(__unused_rspack_module,exports1,__webpack_require__){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.GraphQLWebSocketClient=void 0;let resolveRequestDocument_js_1=__webpack_require__(6917),types_js_1=__webpack_require__(5928),PING="ping",PONG="pong",COMPLETE="complete";class GraphQLWebSocketMessage{get type(){return this._type}get id(){return this._id}get payload(){return this._payload}constructor(type,payload,id){this._type=type,this._payload=payload,this._id=id}get text(){let result={type:this.type};return null!=this.id&&void 0!=this.id&&(result.id=this.id),null!=this.payload&&void 0!=this.payload&&(result.payload=this.payload),JSON.stringify(result)}static parse(data,f){let{type,payload,id}=JSON.parse(data);return new GraphQLWebSocketMessage(type,f(payload),id)}}class GraphQLWebSocketClient{constructor(socket,{onInit,onAcknowledged,onPing,onPong}){this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=socket,socket.addEventListener("open",async e=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={},socket.send(new GraphQLWebSocketMessage("connection_init",onInit?await onInit():null).text)}),socket.addEventListener("close",e=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={}}),socket.addEventListener("error",e=>{console.error(e)}),socket.addEventListener("message",e=>{try{let message=function(data,f=a=>a){return GraphQLWebSocketMessage.parse(data,f)}(e.data);switch(message.type){case"connection_ack":this.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(this.socketState.acknowledged=!0,onAcknowledged&&onAcknowledged(message.payload));return;case PING:onPing?onPing(message.payload).then(r=>socket.send(Pong(r).text)):socket.send(Pong(null).text);return;case PONG:onPong&&onPong(message.payload);return}if(!this.socketState.acknowledged||void 0===message.id||null===message.id||!this.socketState.subscriptions[message.id])return;let{query,variables,subscriber}=this.socketState.subscriptions[message.id];switch(message.type){case"next":!message.payload.errors&&message.payload.data&&subscriber.next&&subscriber.next(message.payload.data),message.payload.errors&&subscriber.error&&subscriber.error(new types_js_1.ClientError({...message.payload,status:200},{query,variables}));return;case"error":subscriber.error&&subscriber.error(new types_js_1.ClientError({errors:message.payload,status:200},{query,variables}));return;case COMPLETE:subscriber.complete&&subscriber.complete(),delete this.socketState.subscriptions[message.id];return}}catch(e){console.error(e),socket.close(1006)}socket.close(4400,"Unknown graphql-ws message.")})}makeSubscribe(query,operationName,subscriber,variables){let subscriptionId=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[subscriptionId]={query,variables,subscriber},this.socket.send(new GraphQLWebSocketMessage("subscribe",{query,operationName,variables},subscriptionId).text),()=>{this.socket.send(new GraphQLWebSocketMessage(COMPLETE,void 0,subscriptionId).text),delete this.socketState.subscriptions[subscriptionId]}}rawRequest(query,variables){return new Promise((resolve,reject)=>{let result;this.rawSubscribe(query,{next:(data,extensions)=>result={data,extensions},error:reject,complete:()=>resolve(result)},variables)})}request(document1,variables){return new Promise((resolve,reject)=>{let result;this.subscribe(document1,{next:data=>result=data,error:reject,complete:()=>resolve(result)},variables)})}subscribe(document1,subscriber,variables){let{query,operationName}=(0,resolveRequestDocument_js_1.resolveRequestDocument)(document1);return this.makeSubscribe(query,operationName,subscriber,variables)}rawSubscribe(query,subscriber,variables){return this.makeSubscribe(query,void 0,subscriber,variables)}ping(payload){this.socket.send(new GraphQLWebSocketMessage(PING,payload,void 0).text)}close(){this.socket.close(1e3)}}function Pong(payload){return new GraphQLWebSocketMessage(PONG,payload,void 0)}GraphQLWebSocketClient.PROTOCOL="graphql-transport-ws",exports1.GraphQLWebSocketClient=GraphQLWebSocketClient},3028(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.HeadersInstanceToPlainObject=exports1.uppercase=void 0,exports1.uppercase=str=>str.toUpperCase(),exports1.HeadersInstanceToPlainObject=headers=>{let o={};return headers.forEach((v,k)=>{o[k]=v}),o}},6313(__unused_rspack_module,exports1,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(null!=mod)for(var k in mod)"default"!==k&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result};Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.request=exports1.rawRequest=exports1.GraphQLClient=exports1.ClientError=exports1.batchRequests=exports1.resolveRequestDocument=exports1.GraphQLWebSocketClient=exports1.gql=void 0;let defaultJsonSerializer_js_1=__webpack_require__(3922),helpers_js_1=__webpack_require__(3028),parseArgs_js_1=__webpack_require__(7491),resolveRequestDocument_js_1=__webpack_require__(6917),types_js_1=__webpack_require__(5928);Object.defineProperty(exports1,"ClientError",{enumerable:!0,get:function(){return types_js_1.ClientError}});let cross_fetch_1=__importStar(__webpack_require__(2607)),resolveHeaders=headers=>{let oHeaders={};return headers&&("u">typeof Headers&&headers instanceof Headers||cross_fetch_1&&cross_fetch_1.Headers&&headers instanceof cross_fetch_1.Headers?oHeaders=(0,helpers_js_1.HeadersInstanceToPlainObject)(headers):Array.isArray(headers)?headers.forEach(([name,value1])=>{name&&void 0!==value1&&(oHeaders[name]=value1)}):oHeaders=headers),oHeaders},cleanQuery=str=>str.replace(/([\s,]|#[^\n\r]+)+/g," ").trim();class GraphQLClient{constructor(url,requestConfig={}){this.url=url,this.requestConfig=requestConfig,this.rawRequest=async(...args)=>{let[queryOrOptions,variables,requestHeaders]=args,rawRequestOptions=(0,parseArgs_js_1.parseRawRequestArgs)(queryOrOptions,variables,requestHeaders),{headers,fetch=cross_fetch_1.default,method="POST",requestMiddleware,responseMiddleware,...fetchOptions}=this.requestConfig,{url}=this;void 0!==rawRequestOptions.signal&&(fetchOptions.signal=rawRequestOptions.signal);let{operationName}=(0,resolveRequestDocument_js_1.resolveRequestDocument)(rawRequestOptions.query);return makeRequest({url,query:rawRequestOptions.query,variables:rawRequestOptions.variables,headers:{...resolveHeaders(callOrIdentity(headers)),...resolveHeaders(rawRequestOptions.requestHeaders)},operationName,fetch,method,fetchOptions,middleware:requestMiddleware}).then(response=>(responseMiddleware&&responseMiddleware(response),response)).catch(error=>{throw responseMiddleware&&responseMiddleware(error),error})}}async request(documentOrOptions,...variablesAndRequestHeaders){let[variables,requestHeaders]=variablesAndRequestHeaders,requestOptions=(0,parseArgs_js_1.parseRequestArgs)(documentOrOptions,variables,requestHeaders),{headers,fetch=cross_fetch_1.default,method="POST",requestMiddleware,responseMiddleware,...fetchOptions}=this.requestConfig,{url}=this;void 0!==requestOptions.signal&&(fetchOptions.signal=requestOptions.signal);let{query,operationName}=(0,resolveRequestDocument_js_1.resolveRequestDocument)(requestOptions.document);return makeRequest({url,query,variables:requestOptions.variables,headers:{...resolveHeaders(callOrIdentity(headers)),...resolveHeaders(requestOptions.requestHeaders)},operationName,fetch,method,fetchOptions,middleware:requestMiddleware}).then(response=>(responseMiddleware&&responseMiddleware(response),response.data)).catch(error=>{throw responseMiddleware&&responseMiddleware(error),error})}batchRequests(documentsOrOptions,requestHeaders){let batchRequestOptions=(0,parseArgs_js_1.parseBatchRequestArgs)(documentsOrOptions,requestHeaders),{headers,...fetchOptions}=this.requestConfig;void 0!==batchRequestOptions.signal&&(fetchOptions.signal=batchRequestOptions.signal);let queries=batchRequestOptions.documents.map(({document:document1})=>(0,resolveRequestDocument_js_1.resolveRequestDocument)(document1).query),variables=batchRequestOptions.documents.map(({variables})=>variables);return makeRequest({url:this.url,query:queries,variables,headers:{...resolveHeaders(callOrIdentity(headers)),...resolveHeaders(batchRequestOptions.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??cross_fetch_1.default,method:this.requestConfig.method||"POST",fetchOptions,middleware:this.requestConfig.requestMiddleware}).then(response=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(response),response.data)).catch(error=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(error),error})}setHeaders(headers){return this.requestConfig.headers=headers,this}setHeader(key,value1){let{headers}=this.requestConfig;return headers?headers[key]=value1:this.requestConfig.headers={[key]:value1},this}setEndpoint(value1){return this.url=value1,this}}exports1.GraphQLClient=GraphQLClient;let makeRequest=async params=>{let method,{query,variables,fetchOptions}=params,fetcher=(method=(0,helpers_js_1.uppercase)(params.method??"post"),async params=>{let body,{url,query,variables,operationName,fetch,fetchOptions,middleware}=params,headers={...params.headers},queryParams="";"POST"===method?"string"==typeof(body=createRequestBody(query,variables,operationName,fetchOptions.jsonSerializer))&&(headers["Content-Type"]="application/json"):queryParams=(params=>{if(!Array.isArray(params.query)){let search=[`query=${encodeURIComponent(cleanQuery(params.query))}`];return params.variables&&search.push(`variables=${encodeURIComponent(params.jsonSerializer.stringify(params.variables))}`),params.operationName&&search.push(`operationName=${encodeURIComponent(params.operationName)}`),search.join("&")}if(void 0!==params.variables&&!Array.isArray(params.variables))throw Error("Cannot create query with given variable type, array expected");let payload=params.query.reduce((acc,currentQuery,index)=>(acc.push({query:cleanQuery(currentQuery),variables:params.variables?params.jsonSerializer.stringify(params.variables[index]):void 0}),acc),[]);return`query=${encodeURIComponent(params.jsonSerializer.stringify(payload))}`})({query,variables,operationName,jsonSerializer:fetchOptions.jsonSerializer??defaultJsonSerializer_js_1.defaultJsonSerializer});let init={method,headers,body,...fetchOptions},urlResolved=url,initResolved=init;if(middleware){let{url:urlNew,...initNew}=await Promise.resolve(middleware({...init,url,operationName,variables}));urlResolved=urlNew,initResolved=initNew}return queryParams&&(urlResolved=`${urlResolved}?${queryParams}`),await fetch(urlResolved,initResolved)}),isBatchingQuery=Array.isArray(params.query),response=await fetcher(params),result=await getResult(response,fetchOptions.jsonSerializer??defaultJsonSerializer_js_1.defaultJsonSerializer),successfullyReceivedData=Array.isArray(result)?!result.some(({data})=>!data):!!result.data,successfullyPassedErrorPolicy=Array.isArray(result)||!result.errors||Array.isArray(result.errors)&&!result.errors.length||"all"===fetchOptions.errorPolicy||"ignore"===fetchOptions.errorPolicy;if(response.ok&&successfullyPassedErrorPolicy&&successfullyReceivedData){let{errors:_,...rest}=(Array.isArray(result),result),data="ignore"===fetchOptions.errorPolicy?rest:result;return{...isBatchingQuery?{data}:data,headers:response.headers,status:response.status}}{let errorResult="string"==typeof result?{error:result}:result;throw new types_js_1.ClientError({...errorResult,status:response.status,headers:response.headers},{query,variables})}};async function request(urlOrOptions,document1,...variablesAndRequestHeaders){let requestOptions=(0,parseArgs_js_1.parseRequestExtendedArgs)(urlOrOptions,document1,...variablesAndRequestHeaders);return new GraphQLClient(requestOptions.url).request({...requestOptions})}exports1.rawRequest=async(...args)=>{let[urlOrOptions,query,...variablesAndRequestHeaders]=args,requestOptions=(0,parseArgs_js_1.parseRawRequestExtendedArgs)(urlOrOptions,query,...variablesAndRequestHeaders);return new GraphQLClient(requestOptions.url).rawRequest({...requestOptions})},exports1.request=request,exports1.batchRequests=async(...args)=>{let params=parseBatchRequestsArgsExtended(args);return new GraphQLClient(params.url).batchRequests(params)};let parseBatchRequestsArgsExtended=args=>1===args.length?args[0]:{url:args[0],documents:args[1],requestHeaders:args[2],signal:void 0},createRequestBody=(query,variables,operationName,jsonSerializer)=>{let jsonSerializer_=jsonSerializer??defaultJsonSerializer_js_1.defaultJsonSerializer;if(!Array.isArray(query))return jsonSerializer_.stringify({query,variables,operationName});if(void 0!==variables&&!Array.isArray(variables))throw Error("Cannot create request body with given variable type, array expected");let payload=query.reduce((acc,currentQuery,index)=>(acc.push({query:currentQuery,variables:variables?variables[index]:void 0}),acc),[]);return jsonSerializer_.stringify(payload)},getResult=async(response,jsonSerializer)=>{let contentType;return(response.headers.forEach((value1,key)=>{"content-type"===key.toLowerCase()&&(contentType=value1)}),contentType&&(contentType.toLowerCase().startsWith("application/json")||contentType.toLowerCase().startsWith("application/graphql+json")||contentType.toLowerCase().startsWith("application/graphql-response+json")))?jsonSerializer.parse(await response.text()):response.text()},callOrIdentity=value1=>"function"==typeof value1?value1():value1;exports1.gql=(chunks,...variables)=>chunks.reduce((acc,chunk,index)=>`${acc}${chunk}${index in variables?String(variables[index]):""}`,"");var graphql_ws_js_1=__webpack_require__(4927);Object.defineProperty(exports1,"GraphQLWebSocketClient",{enumerable:!0,get:function(){return graphql_ws_js_1.GraphQLWebSocketClient}});var resolveRequestDocument_js_2=__webpack_require__(6917);Object.defineProperty(exports1,"resolveRequestDocument",{enumerable:!0,get:function(){return resolveRequestDocument_js_2.resolveRequestDocument}}),exports1.default=request},7491(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.parseRawRequestExtendedArgs=exports1.parseRequestExtendedArgs=exports1.parseBatchRequestArgs=exports1.parseRawRequestArgs=exports1.parseRequestArgs=void 0,exports1.parseRequestArgs=(documentOrOptions,variables,requestHeaders)=>documentOrOptions.document?documentOrOptions:{document:documentOrOptions,variables:variables,requestHeaders:requestHeaders,signal:void 0},exports1.parseRawRequestArgs=(queryOrOptions,variables,requestHeaders)=>queryOrOptions.query?queryOrOptions:{query:queryOrOptions,variables:variables,requestHeaders:requestHeaders,signal:void 0},exports1.parseBatchRequestArgs=(documentsOrOptions,requestHeaders)=>documentsOrOptions.documents?documentsOrOptions:{documents:documentsOrOptions,requestHeaders:requestHeaders,signal:void 0},exports1.parseRequestExtendedArgs=(urlOrOptions,document1,...variablesAndRequestHeaders)=>{let[variables,requestHeaders]=variablesAndRequestHeaders;return urlOrOptions.document?urlOrOptions:{url:urlOrOptions,document:document1,variables,requestHeaders,signal:void 0}},exports1.parseRawRequestExtendedArgs=(urlOrOptions,query,...variablesAndRequestHeaders)=>{let[variables,requestHeaders]=variablesAndRequestHeaders;return urlOrOptions.query?urlOrOptions:{url:urlOrOptions,query:query,variables,requestHeaders,signal:void 0}}},6917(__unused_rspack_module,exports1,__webpack_require__){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.resolveRequestDocument=void 0;let graphql_1=__webpack_require__(9032),extractOperationName=document1=>{let operationName,operationDefinitions=document1.definitions.filter(definition=>"OperationDefinition"===definition.kind);return 1===operationDefinitions.length&&(operationName=operationDefinitions[0]?.name?.value),operationName};exports1.resolveRequestDocument=document1=>{if("string"==typeof document1){let operationName;try{let parsedDocument=(0,graphql_1.parse)(document1);operationName=extractOperationName(parsedDocument)}catch(err){}return{query:document1,operationName}}let operationName=extractOperationName(document1);return{query:(0,graphql_1.print)(document1),operationName}}},5928(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.ClientError=void 0;class ClientError extends Error{constructor(response,request){super(`${ClientError.extractMessage(response)}: ${JSON.stringify({response,request})}`),Object.setPrototypeOf(this,ClientError.prototype),this.response=response,this.request=request,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,ClientError)}static extractMessage(response){return response.errors?.[0]?.message??`GraphQL Error (Code: ${response.status})`}}exports1.ClientError=ClientError},4606(__unused_rspack_module,exports1,__webpack_require__){"use strict";var process=__webpack_require__(8558);Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.LRUCache=void 0;let perf="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,warned=new Set,PROCESS="object"==typeof process&&process?process:{},emitWarning=(msg,type,code,fn)=>{"function"==typeof PROCESS.emitWarning?PROCESS.emitWarning(msg,type,code,fn):console.error(`[${code}] ${type}: ${msg}`)},AC=globalThis.AbortController,AS=globalThis.AbortSignal;if(void 0===AC){AS=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(_,fn){this._onabort.push(fn)}},AC=class{constructor(){warnACPolyfill()}signal=new AS;abort(reason){if(!this.signal.aborted){for(let fn of(this.signal.reason=reason,this.signal.aborted=!0,this.signal._onabort))fn(reason);this.signal.onabort?.(reason)}}};let printACPolyfillWarning=PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",warnACPolyfill=()=>{printACPolyfillWarning&&(printACPolyfillWarning=!1,emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",warnACPolyfill))}}Symbol("type");let isPosInt=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),getUintArray=max=>isPosInt(max)?max<=256?Uint8Array:max<=65536?Uint16Array:max<=0x100000000?Uint32Array:max<=Number.MAX_SAFE_INTEGER?ZeroArray:null:null;class ZeroArray extends Array{constructor(size){super(size),this.fill(0)}}class Stack{heap;length;static #constructing=!1;static create(max){let HeapCls=getUintArray(max);if(!HeapCls)return[];Stack.#constructing=!0;let s=new Stack(max,HeapCls);return Stack.#constructing=!1,s}constructor(max,HeapCls){if(!Stack.#constructing)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new HeapCls(max),this.length=0}push(n){this.heap[this.length++]=n}pop(){return this.heap[--this.length]}}class LRUCache{#max;#maxSize;#dispose;#disposeAfter;#fetchMethod;#memoMethod;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#size;#calculatedSize;#keyMap;#keyList;#valList;#next;#prev;#head;#tail;#free;#disposed;#sizes;#starts;#ttls;#hasDispose;#hasFetchMethod;#hasDisposeAfter;static unsafeExposeInternals(c){return{starts:c.#starts,ttls:c.#ttls,sizes:c.#sizes,keyMap:c.#keyMap,keyList:c.#keyList,valList:c.#valList,next:c.#next,prev:c.#prev,get head(){return c.#head},get tail(){return c.#tail},free:c.#free,isBackgroundFetch:p=>c.#isBackgroundFetch(p),backgroundFetch:(k,index,options,context)=>c.#backgroundFetch(k,index,options,context),moveToTail:index=>c.#moveToTail(index),indexes:options=>c.#indexes(options),rindexes:options=>c.#rindexes(options),isStale:index=>c.#isStale(index)}}get max(){return this.#max}get maxSize(){return this.#maxSize}get calculatedSize(){return this.#calculatedSize}get size(){return this.#size}get fetchMethod(){return this.#fetchMethod}get memoMethod(){return this.#memoMethod}get dispose(){return this.#dispose}get disposeAfter(){return this.#disposeAfter}constructor(options){const{max=0,ttl,ttlResolution=1,ttlAutopurge,updateAgeOnGet,updateAgeOnHas,allowStale,dispose,disposeAfter,noDisposeOnSet,noUpdateTTL,maxSize=0,maxEntrySize=0,sizeCalculation,fetchMethod,memoMethod,noDeleteOnFetchRejection,noDeleteOnStaleGet,allowStaleOnFetchRejection,allowStaleOnFetchAbort,ignoreFetchAbort}=options;if(0!==max&&!isPosInt(max))throw TypeError("max option must be a nonnegative integer");const UintArray=max?getUintArray(max):Array;if(!UintArray)throw Error("invalid max value: "+max);if(this.#max=max,this.#maxSize=maxSize,this.maxEntrySize=maxEntrySize||this.#maxSize,this.sizeCalculation=sizeCalculation,this.sizeCalculation){if(!this.#maxSize&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw TypeError("sizeCalculation set to non-function")}if(void 0!==memoMethod&&"function"!=typeof memoMethod)throw TypeError("memoMethod must be a function if defined");if(this.#memoMethod=memoMethod,void 0!==fetchMethod&&"function"!=typeof fetchMethod)throw TypeError("fetchMethod must be a function if specified");if(this.#fetchMethod=fetchMethod,this.#hasFetchMethod=!!fetchMethod,this.#keyMap=new Map,this.#keyList=Array(max).fill(void 0),this.#valList=Array(max).fill(void 0),this.#next=new UintArray(max),this.#prev=new UintArray(max),this.#head=0,this.#tail=0,this.#free=Stack.create(max),this.#size=0,this.#calculatedSize=0,"function"==typeof dispose&&(this.#dispose=dispose),"function"==typeof disposeAfter?(this.#disposeAfter=disposeAfter,this.#disposed=[]):(this.#disposeAfter=void 0,this.#disposed=void 0),this.#hasDispose=!!this.#dispose,this.#hasDisposeAfter=!!this.#disposeAfter,this.noDisposeOnSet=!!noDisposeOnSet,this.noUpdateTTL=!!noUpdateTTL,this.noDeleteOnFetchRejection=!!noDeleteOnFetchRejection,this.allowStaleOnFetchRejection=!!allowStaleOnFetchRejection,this.allowStaleOnFetchAbort=!!allowStaleOnFetchAbort,this.ignoreFetchAbort=!!ignoreFetchAbort,0!==this.maxEntrySize){if(0!==this.#maxSize&&!isPosInt(this.#maxSize))throw TypeError("maxSize must be a positive integer if specified");if(!isPosInt(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#initializeSizeTracking()}if(this.allowStale=!!allowStale,this.noDeleteOnStaleGet=!!noDeleteOnStaleGet,this.updateAgeOnGet=!!updateAgeOnGet,this.updateAgeOnHas=!!updateAgeOnHas,this.ttlResolution=isPosInt(ttlResolution)||0===ttlResolution?ttlResolution:1,this.ttlAutopurge=!!ttlAutopurge,this.ttl=ttl||0,this.ttl){if(!isPosInt(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#initializeTTLTracking()}if(0===this.#max&&0===this.ttl&&0===this.#maxSize)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#max&&!this.#maxSize){const code="LRU_CACHE_UNBOUNDED";(code=>!warned.has(code))(code)&&(warned.add(code),emitWarning("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",code,LRUCache))}}getRemainingTTL(key){return this.#keyMap.has(key)?1/0:0}#initializeTTLTracking(){let ttls=new ZeroArray(this.#max),starts=new ZeroArray(this.#max);this.#ttls=ttls,this.#starts=starts,this.#setItemTTL=(index,ttl,start=perf.now())=>{if(starts[index]=0!==ttl?start:0,ttls[index]=ttl,0!==ttl&&this.ttlAutopurge){let t=setTimeout(()=>{this.#isStale(index)&&this.#delete(this.#keyList[index],"expire")},ttl+1);t.unref&&t.unref()}},this.#updateItemAge=index=>{starts[index]=0!==ttls[index]?perf.now():0},this.#statusTTL=(status,index)=>{if(ttls[index]){let ttl=ttls[index],start=starts[index];if(!ttl||!start)return;status.ttl=ttl,status.start=start,status.now=cachedNow||getNow();let age=status.now-start;status.remainingTTL=ttl-age}};let cachedNow=0,getNow=()=>{let n=perf.now();if(this.ttlResolution>0){cachedNow=n;let t=setTimeout(()=>cachedNow=0,this.ttlResolution);t.unref&&t.unref()}return n};this.getRemainingTTL=key=>{let index=this.#keyMap.get(key);if(void 0===index)return 0;let ttl=ttls[index],start=starts[index];return ttl&&start?ttl-((cachedNow||getNow())-start):1/0},this.#isStale=index=>{let s=starts[index],t=ttls[index];return!!t&&!!s&&(cachedNow||getNow())-s>t}}#updateItemAge=()=>{};#statusTTL=()=>{};#setItemTTL=()=>{};#isStale=()=>!1;#initializeSizeTracking(){let sizes=new ZeroArray(this.#max);this.#calculatedSize=0,this.#sizes=sizes,this.#removeItemSize=index=>{this.#calculatedSize-=sizes[index],sizes[index]=0},this.#requireSize=(k,v,size,sizeCalculation)=>{if(this.#isBackgroundFetch(v))return 0;if(!isPosInt(size))if(sizeCalculation){if("function"!=typeof sizeCalculation)throw TypeError("sizeCalculation must be a function");if(!isPosInt(size=sizeCalculation(v,k)))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return size},this.#addItemSize=(index,size,status)=>{if(sizes[index]=size,this.#maxSize){let maxSize=this.#maxSize-sizes[index];for(;this.#calculatedSize>maxSize;)this.#evict(!0)}this.#calculatedSize+=sizes[index],status&&(status.entrySize=size,status.totalCalculatedSize=this.#calculatedSize)}}#removeItemSize=_i=>{};#addItemSize=(_i,_s,_st)=>{};#requireSize=(_k,_v,size,sizeCalculation)=>{if(size||sizeCalculation)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#indexes({allowStale=this.allowStale}={}){if(this.#size)for(let i=this.#tail;this.#isValidIndex(i)&&((allowStale||!this.#isStale(i))&&(yield i),i!==this.#head);)i=this.#prev[i]}*#rindexes({allowStale=this.allowStale}={}){if(this.#size)for(let i=this.#head;this.#isValidIndex(i)&&((allowStale||!this.#isStale(i))&&(yield i),i!==this.#tail);)i=this.#next[i]}#isValidIndex(index){return void 0!==index&&this.#keyMap.get(this.#keyList[index])===index}*entries(){for(let i of this.#indexes())void 0===this.#valList[i]||void 0===this.#keyList[i]||this.#isBackgroundFetch(this.#valList[i])||(yield[this.#keyList[i],this.#valList[i]])}*rentries(){for(let i of this.#rindexes())void 0===this.#valList[i]||void 0===this.#keyList[i]||this.#isBackgroundFetch(this.#valList[i])||(yield[this.#keyList[i],this.#valList[i]])}*keys(){for(let i of this.#indexes()){let k=this.#keyList[i];void 0===k||this.#isBackgroundFetch(this.#valList[i])||(yield k)}}*rkeys(){for(let i of this.#rindexes()){let k=this.#keyList[i];void 0===k||this.#isBackgroundFetch(this.#valList[i])||(yield k)}}*values(){for(let i of this.#indexes())void 0===this.#valList[i]||this.#isBackgroundFetch(this.#valList[i])||(yield this.#valList[i])}*rvalues(){for(let i of this.#rindexes())void 0===this.#valList[i]||this.#isBackgroundFetch(this.#valList[i])||(yield this.#valList[i])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(fn,getOptions={}){for(let i of this.#indexes()){let v=this.#valList[i],value1=this.#isBackgroundFetch(v)?v.__staleWhileFetching:v;if(void 0!==value1&&fn(value1,this.#keyList[i],this))return this.get(this.#keyList[i],getOptions)}}forEach(fn,thisp=this){for(let i of this.#indexes()){let v=this.#valList[i],value1=this.#isBackgroundFetch(v)?v.__staleWhileFetching:v;void 0!==value1&&fn.call(thisp,value1,this.#keyList[i],this)}}rforEach(fn,thisp=this){for(let i of this.#rindexes()){let v=this.#valList[i],value1=this.#isBackgroundFetch(v)?v.__staleWhileFetching:v;void 0!==value1&&fn.call(thisp,value1,this.#keyList[i],this)}}purgeStale(){let deleted=!1;for(let i of this.#rindexes({allowStale:!0}))this.#isStale(i)&&(this.#delete(this.#keyList[i],"expire"),deleted=!0);return deleted}info(key){let i=this.#keyMap.get(key);if(void 0===i)return;let v=this.#valList[i],value1=this.#isBackgroundFetch(v)?v.__staleWhileFetching:v;if(void 0===value1)return;let entry={value:value1};if(this.#ttls&&this.#starts){let ttl=this.#ttls[i],start=this.#starts[i];ttl&&start&&(entry.ttl=ttl-(perf.now()-start),entry.start=Date.now())}return this.#sizes&&(entry.size=this.#sizes[i]),entry}dump(){let arr=[];for(let i of this.#indexes({allowStale:!0})){let key=this.#keyList[i],v=this.#valList[i],value1=this.#isBackgroundFetch(v)?v.__staleWhileFetching:v;if(void 0===value1||void 0===key)continue;let entry={value:value1};if(this.#ttls&&this.#starts){entry.ttl=this.#ttls[i];let age=perf.now()-this.#starts[i];entry.start=Math.floor(Date.now()-age)}this.#sizes&&(entry.size=this.#sizes[i]),arr.unshift([key,entry])}return arr}load(arr){for(let[key,entry]of(this.clear(),arr)){if(entry.start){let age=Date.now()-entry.start;entry.start=perf.now()-age}this.set(key,entry.value,entry)}}set(k,v,setOptions={}){if(void 0===v)return this.delete(k),this;let{ttl=this.ttl,start,noDisposeOnSet=this.noDisposeOnSet,sizeCalculation=this.sizeCalculation,status}=setOptions,{noUpdateTTL=this.noUpdateTTL}=setOptions,size=this.#requireSize(k,v,setOptions.size||0,sizeCalculation);if(this.maxEntrySize&&size>this.maxEntrySize)return status&&(status.set="miss",status.maxEntrySizeExceeded=!0),this.#delete(k,"set"),this;let index=0===this.#size?void 0:this.#keyMap.get(k);if(void 0===index)index=0===this.#size?this.#tail:0!==this.#free.length?this.#free.pop():this.#size===this.#max?this.#evict(!1):this.#size,this.#keyList[index]=k,this.#valList[index]=v,this.#keyMap.set(k,index),this.#next[this.#tail]=index,this.#prev[index]=this.#tail,this.#tail=index,this.#size++,this.#addItemSize(index,size,status),status&&(status.set="add"),noUpdateTTL=!1;else{this.#moveToTail(index);let oldVal=this.#valList[index];if(v!==oldVal){if(this.#hasFetchMethod&&this.#isBackgroundFetch(oldVal)){oldVal.__abortController.abort(Error("replaced"));let{__staleWhileFetching:s}=oldVal;void 0!==s&&!noDisposeOnSet&&(this.#hasDispose&&this.#dispose?.(s,k,"set"),this.#hasDisposeAfter&&this.#disposed?.push([s,k,"set"]))}else!noDisposeOnSet&&(this.#hasDispose&&this.#dispose?.(oldVal,k,"set"),this.#hasDisposeAfter&&this.#disposed?.push([oldVal,k,"set"]));if(this.#removeItemSize(index),this.#addItemSize(index,size,status),this.#valList[index]=v,status){status.set="replace";let oldValue=oldVal&&this.#isBackgroundFetch(oldVal)?oldVal.__staleWhileFetching:oldVal;void 0!==oldValue&&(status.oldValue=oldValue)}}else status&&(status.set="update")}if(0===ttl||this.#ttls||this.#initializeTTLTracking(),this.#ttls&&(noUpdateTTL||this.#setItemTTL(index,ttl,start),status&&this.#statusTTL(status,index)),!noDisposeOnSet&&this.#hasDisposeAfter&&this.#disposed){let task,dt=this.#disposed;for(;task=dt?.shift();)this.#disposeAfter?.(...task)}return this}pop(){try{for(;this.#size;){let val=this.#valList[this.#head];if(this.#evict(!0),this.#isBackgroundFetch(val)){if(val.__staleWhileFetching)return val.__staleWhileFetching}else if(void 0!==val)return val}}finally{if(this.#hasDisposeAfter&&this.#disposed){let task,dt=this.#disposed;for(;task=dt?.shift();)this.#disposeAfter?.(...task)}}}#evict(free){let head=this.#head,k=this.#keyList[head],v=this.#valList[head];return this.#hasFetchMethod&&this.#isBackgroundFetch(v)?v.__abortController.abort(Error("evicted")):(this.#hasDispose||this.#hasDisposeAfter)&&(this.#hasDispose&&this.#dispose?.(v,k,"evict"),this.#hasDisposeAfter&&this.#disposed?.push([v,k,"evict"])),this.#removeItemSize(head),free&&(this.#keyList[head]=void 0,this.#valList[head]=void 0,this.#free.push(head)),1===this.#size?(this.#head=this.#tail=0,this.#free.length=0):this.#head=this.#next[head],this.#keyMap.delete(k),this.#size--,head}has(k,hasOptions={}){let{updateAgeOnHas=this.updateAgeOnHas,status}=hasOptions,index=this.#keyMap.get(k);if(void 0!==index){let v=this.#valList[index];if(this.#isBackgroundFetch(v)&&void 0===v.__staleWhileFetching)return!1;if(!this.#isStale(index))return updateAgeOnHas&&this.#updateItemAge(index),status&&(status.has="hit",this.#statusTTL(status,index)),!0;status&&(status.has="stale",this.#statusTTL(status,index))}else status&&(status.has="miss");return!1}peek(k,peekOptions={}){let{allowStale=this.allowStale}=peekOptions,index=this.#keyMap.get(k);if(void 0===index||!allowStale&&this.#isStale(index))return;let v=this.#valList[index];return this.#isBackgroundFetch(v)?v.__staleWhileFetching:v}#backgroundFetch(k,index,options,context){let v=void 0===index?void 0:this.#valList[index];if(this.#isBackgroundFetch(v))return v;let ac=new AC,{signal}=options;signal?.addEventListener("abort",()=>ac.abort(signal.reason),{signal:ac.signal});let fetchOpts={signal:ac.signal,options,context},cb=(v,updateCache=!1)=>{let{aborted}=ac.signal,ignoreAbort=options.ignoreFetchAbort&&void 0!==v;return(options.status&&(aborted&&!updateCache?(options.status.fetchAborted=!0,options.status.fetchError=ac.signal.reason,ignoreAbort&&(options.status.fetchAbortIgnored=!0)):options.status.fetchResolved=!0),!aborted||ignoreAbort||updateCache)?(this.#valList[index]===p&&(void 0===v?p.__staleWhileFetching?this.#valList[index]=p.__staleWhileFetching:this.#delete(k,"fetch"):(options.status&&(options.status.fetchUpdated=!0),this.set(k,v,fetchOpts.options))),v):fetchFail(ac.signal.reason)},fetchFail=er=>{let{aborted}=ac.signal,allowStaleAborted=aborted&&options.allowStaleOnFetchAbort,allowStale=allowStaleAborted||options.allowStaleOnFetchRejection,noDelete=allowStale||options.noDeleteOnFetchRejection;if(this.#valList[index]===p&&(noDelete&&void 0!==p.__staleWhileFetching?allowStaleAborted||(this.#valList[index]=p.__staleWhileFetching):this.#delete(k,"fetch")),allowStale)return options.status&&void 0!==p.__staleWhileFetching&&(options.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw er},pcall=(res,rej)=>{let fmp=this.#fetchMethod?.(k,v,fetchOpts);fmp&&fmp instanceof Promise&&fmp.then(v=>res(void 0===v?void 0:v),rej),ac.signal.addEventListener("abort",()=>{(!options.ignoreFetchAbort||options.allowStaleOnFetchAbort)&&(res(void 0),options.allowStaleOnFetchAbort&&(res=v=>cb(v,!0)))})};options.status&&(options.status.fetchDispatched=!0);let p=new Promise(pcall).then(cb,er=>(options.status&&(options.status.fetchRejected=!0,options.status.fetchError=er),fetchFail(er))),bf=Object.assign(p,{__abortController:ac,__staleWhileFetching:v,__returned:void 0});return void 0===index?(this.set(k,bf,{...fetchOpts.options,status:void 0}),index=this.#keyMap.get(k)):this.#valList[index]=bf,bf}#isBackgroundFetch(p){return!!this.#hasFetchMethod&&!!p&&p instanceof Promise&&p.hasOwnProperty("__staleWhileFetching")&&p.__abortController instanceof AC}async fetch(k,fetchOptions={}){let{allowStale=this.allowStale,updateAgeOnGet=this.updateAgeOnGet,noDeleteOnStaleGet=this.noDeleteOnStaleGet,ttl=this.ttl,noDisposeOnSet=this.noDisposeOnSet,size=0,sizeCalculation=this.sizeCalculation,noUpdateTTL=this.noUpdateTTL,noDeleteOnFetchRejection=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection=this.allowStaleOnFetchRejection,ignoreFetchAbort=this.ignoreFetchAbort,allowStaleOnFetchAbort=this.allowStaleOnFetchAbort,context,forceRefresh=!1,status,signal}=fetchOptions;if(!this.#hasFetchMethod)return status&&(status.fetch="get"),this.get(k,{allowStale,updateAgeOnGet,noDeleteOnStaleGet,status});let options={allowStale,updateAgeOnGet,noDeleteOnStaleGet,ttl,noDisposeOnSet,size,sizeCalculation,noUpdateTTL,noDeleteOnFetchRejection,allowStaleOnFetchRejection,allowStaleOnFetchAbort,ignoreFetchAbort,status,signal},index=this.#keyMap.get(k);if(void 0===index){status&&(status.fetch="miss");let p=this.#backgroundFetch(k,index,options,context);return p.__returned=p}{let v=this.#valList[index];if(this.#isBackgroundFetch(v)){let stale=allowStale&&void 0!==v.__staleWhileFetching;return status&&(status.fetch="inflight",stale&&(status.returnedStale=!0)),stale?v.__staleWhileFetching:v.__returned=v}let isStale=this.#isStale(index);if(!forceRefresh&&!isStale)return status&&(status.fetch="hit"),this.#moveToTail(index),updateAgeOnGet&&this.#updateItemAge(index),status&&this.#statusTTL(status,index),v;let p=this.#backgroundFetch(k,index,options,context),staleVal=void 0!==p.__staleWhileFetching&&allowStale;return status&&(status.fetch=isStale?"stale":"refresh",staleVal&&isStale&&(status.returnedStale=!0)),staleVal?p.__staleWhileFetching:p.__returned=p}}async forceFetch(k,fetchOptions={}){let v=await this.fetch(k,fetchOptions);if(void 0===v)throw Error("fetch() returned undefined");return v}memo(k,memoOptions={}){let memoMethod=this.#memoMethod;if(!memoMethod)throw Error("no memoMethod provided to constructor");let{context,forceRefresh,...options}=memoOptions,v=this.get(k,options);if(!forceRefresh&&void 0!==v)return v;let vv=memoMethod(k,v,{options,context});return this.set(k,vv,options),vv}get(k,getOptions={}){let{allowStale=this.allowStale,updateAgeOnGet=this.updateAgeOnGet,noDeleteOnStaleGet=this.noDeleteOnStaleGet,status}=getOptions,index=this.#keyMap.get(k);if(void 0!==index){let value1=this.#valList[index],fetching=this.#isBackgroundFetch(value1);return(status&&this.#statusTTL(status,index),this.#isStale(index))?(status&&(status.get="stale"),fetching)?(status&&allowStale&&void 0!==value1.__staleWhileFetching&&(status.returnedStale=!0),allowStale?value1.__staleWhileFetching:void 0):(noDeleteOnStaleGet||this.#delete(k,"expire"),status&&allowStale&&(status.returnedStale=!0),allowStale?value1:void 0):(status&&(status.get="hit"),fetching)?value1.__staleWhileFetching:(this.#moveToTail(index),updateAgeOnGet&&this.#updateItemAge(index),value1)}status&&(status.get="miss")}#connect(p,n){this.#prev[n]=p,this.#next[p]=n}#moveToTail(index){index!==this.#tail&&(index===this.#head?this.#head=this.#next[index]:this.#connect(this.#prev[index],this.#next[index]),this.#connect(this.#tail,index),this.#tail=index)}delete(k){return this.#delete(k,"delete")}#delete(k,reason){let deleted=!1;if(0!==this.#size){let index=this.#keyMap.get(k);if(void 0!==index)if(deleted=!0,1===this.#size)this.#clear(reason);else{this.#removeItemSize(index);let v=this.#valList[index];if(this.#isBackgroundFetch(v)?v.__abortController.abort(Error("deleted")):(this.#hasDispose||this.#hasDisposeAfter)&&(this.#hasDispose&&this.#dispose?.(v,k,reason),this.#hasDisposeAfter&&this.#disposed?.push([v,k,reason])),this.#keyMap.delete(k),this.#keyList[index]=void 0,this.#valList[index]=void 0,index===this.#tail)this.#tail=this.#prev[index];else if(index===this.#head)this.#head=this.#next[index];else{let pi=this.#prev[index];this.#next[pi]=this.#next[index];let ni=this.#next[index];this.#prev[ni]=this.#prev[index]}this.#size--,this.#free.push(index)}}if(this.#hasDisposeAfter&&this.#disposed?.length){let task,dt=this.#disposed;for(;task=dt?.shift();)this.#disposeAfter?.(...task)}return deleted}clear(){return this.#clear("delete")}#clear(reason){for(let index of this.#rindexes({allowStale:!0})){let v=this.#valList[index];if(this.#isBackgroundFetch(v))v.__abortController.abort(Error("deleted"));else{let k=this.#keyList[index];this.#hasDispose&&this.#dispose?.(v,k,reason),this.#hasDisposeAfter&&this.#disposed?.push([v,k,reason])}}if(this.#keyMap.clear(),this.#valList.fill(void 0),this.#keyList.fill(void 0),this.#ttls&&this.#starts&&(this.#ttls.fill(0),this.#starts.fill(0)),this.#sizes&&this.#sizes.fill(0),this.#head=0,this.#tail=0,this.#free.length=0,this.#calculatedSize=0,this.#size=0,this.#hasDisposeAfter&&this.#disposed){let task,dt=this.#disposed;for(;task=dt?.shift();)this.#disposeAfter?.(...task)}}}exports1.LRUCache=LRUCache},9032(__unused_rspack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{VariablesAreInputTypesRule:()=>VariablesAreInputTypesRule,SingleFieldSubscriptionsRule:()=>SingleFieldSubscriptionsRule,UniqueVariableNamesRule:()=>UniqueVariableNamesRule,GraphQLDeprecatedDirective:()=>GraphQLDeprecatedDirective,GraphQLNonNull:()=>GraphQLNonNull,__InputValue:()=>__InputValue,createSourceEventStream:()=>createSourceEventStream,execute:()=>execute,isDefinitionNode:()=>isDefinitionNode,isInterfaceType:()=>isInterfaceType,isRequiredArgument:()=>isRequiredArgument,isValidNameError:()=>isValidNameError,parseValue:()=>parser_parseValue,version:()=>version,NoUnusedVariablesRule:()=>NoUnusedVariablesRule,__DirectiveLocation:()=>__DirectiveLocation,findDangerousChanges:()=>findDangerousChanges,__TypeKind:()=>__TypeKind,isSchema:()=>isSchema,UniqueTypeNamesRule:()=>UniqueTypeNamesRule,NoSchemaIntrospectionCustomRule:()=>NoSchemaIntrospectionCustomRule,defaultTypeResolver:()=>execute_defaultTypeResolver,isType:()=>isType,UniqueFragmentNamesRule:()=>UniqueFragmentNamesRule,assertWrappingType:()=>assertWrappingType,getNullableType:()=>getNullableType,isObjectType:()=>isObjectType,printSchema:()=>printSchema,validate:()=>validate,BREAK:()=>BREAK,assertNonNullType:()=>assertNonNullType,assertNullableType:()=>assertNullableType,executeSync:()=>executeSync,isLeafType:()=>isLeafType,assertOutputType:()=>assertOutputType,buildASTSchema:()=>buildASTSchema,astFromValue:()=>astFromValue,Kind:()=>Kind,ProvidedRequiredArgumentsRule:()=>ProvidedRequiredArgumentsRule,UniqueDirectiveNamesRule:()=>UniqueDirectiveNamesRule,TypeKind:()=>TypeKind,KnownDirectivesRule:()=>KnownDirectivesRule,DEFAULT_DEPRECATION_REASON:()=>DEFAULT_DEPRECATION_REASON,assertInterfaceType:()=>assertInterfaceType,isValueNode:()=>isValueNode,GraphQLSpecifiedByDirective:()=>GraphQLSpecifiedByDirective,GraphQLFloat:()=>GraphQLFloat,UniqueFieldDefinitionNamesRule:()=>UniqueFieldDefinitionNamesRule,LoneAnonymousOperationRule:()=>LoneAnonymousOperationRule,VariablesInAllowedPositionRule:()=>VariablesInAllowedPositionRule,assertInputType:()=>assertInputType,formatError:()=>formatError,assertInputObjectType:()=>assertInputObjectType,isOutputType:()=>isOutputType,isWrappingType:()=>isWrappingType,assertLeafType:()=>assertLeafType,assertValidSchema:()=>assertValidSchema,FragmentsOnCompositeTypesRule:()=>FragmentsOnCompositeTypesRule,graphql:()=>graphql,UniqueOperationTypesRule:()=>UniqueOperationTypesRule,printError:()=>printError,UniqueEnumValueNamesRule:()=>UniqueEnumValueNamesRule,isNonNullType:()=>isNonNullType,isSelectionNode:()=>isSelectionNode,specifiedDirectives:()=>specifiedDirectives,validateSchema:()=>validateSchema,visit:()=>visit,GraphQLScalarType:()=>definition_GraphQLScalarType,assertEnumType:()=>assertEnumType,UniqueDirectivesPerLocationRule:()=>UniqueDirectivesPerLocationRule,getDirectiveValues:()=>getDirectiveValues,isEqualType:()=>isEqualType,isNamedType:()=>isNamedType,isTypeDefinitionNode:()=>isTypeDefinitionNode,parse:()=>parse,__Schema:()=>__Schema,isTypeSystemDefinitionNode:()=>isTypeSystemDefinitionNode,valueFromASTUntyped:()=>valueFromASTUntyped,LoneSchemaDefinitionRule:()=>LoneSchemaDefinitionRule,isTypeSubTypeOf:()=>isTypeSubTypeOf,UniqueArgumentNamesRule:()=>UniqueArgumentNamesRule,UniqueInputFieldNamesRule:()=>UniqueInputFieldNamesRule,locatedError:()=>locatedError,typeFromAST:()=>typeFromAST,printLocation:()=>printLocation,assertUnionType:()=>assertUnionType,separateOperations:()=>separateOperations,Location:()=>ast_Location,GraphQLObjectType:()=>definition_GraphQLObjectType,stripIgnoredCharacters:()=>stripIgnoredCharacters,visitInParallel:()=>visitInParallel,parseType:()=>parseType,isTypeNode:()=>isTypeNode,PossibleTypeExtensionsRule:()=>PossibleTypeExtensionsRule,getDescription:()=>getDescription,graphqlSync:()=>graphqlSync,DirectiveLocation:()=>DirectiveLocation,TypeNameMetaFieldDef:()=>TypeNameMetaFieldDef,coerceInputValue:()=>coerceInputValue,GraphQLInt:()=>GraphQLInt,GraphQLInterfaceType:()=>definition_GraphQLInterfaceType,UniqueOperationNamesRule:()=>UniqueOperationNamesRule,GraphQLSkipDirective:()=>GraphQLSkipDirective,isEnumType:()=>isEnumType,assertValidName:()=>assertValidName,buildClientSchema:()=>buildClientSchema,KnownArgumentNamesRule:()=>KnownArgumentNamesRule,ValuesOfCorrectTypeRule:()=>ValuesOfCorrectTypeRule,isInputObjectType:()=>isInputObjectType,GraphQLID:()=>GraphQLID,NoUnusedFragmentsRule:()=>NoUnusedFragmentsRule,isUnionType:()=>isUnionType,isSpecifiedScalarType:()=>isSpecifiedScalarType,printSourceLocation:()=>printSourceLocation,__EnumValue:()=>__EnumValue,getOperationAST:()=>getOperationAST,isExecutableDefinitionNode:()=>isExecutableDefinitionNode,isAbstractType:()=>isAbstractType,assertAbstractType:()=>assertAbstractType,isTypeExtensionNode:()=>isTypeExtensionNode,GraphQLInputObjectType:()=>definition_GraphQLInputObjectType,getNamedType:()=>definition_getNamedType,KnownFragmentNamesRule:()=>KnownFragmentNamesRule,isListType:()=>isListType,Lexer:()=>lexer_Lexer,isSpecifiedDirective:()=>isSpecifiedDirective,responsePathAsArray:()=>pathToArray,isDirective:()=>isDirective,TypeInfo:()=>TypeInfo_TypeInfo,assertScalarType:()=>assertScalarType,extendSchema:()=>extendSchema,isIntrospectionType:()=>isIntrospectionType,print:()=>print,getIntrospectionQuery:()=>getIntrospectionQuery,GraphQLBoolean:()=>GraphQLBoolean,KnownTypeNamesRule:()=>KnownTypeNamesRule,assertListType:()=>assertListType,concatAST:()=>concatAST,NoDeprecatedCustomRule:()=>NoDeprecatedCustomRule,defaultFieldResolver:()=>execute_defaultFieldResolver,GraphQLDirective:()=>directives_GraphQLDirective,getLocation:()=>getLocation,TypeMetaFieldDef:()=>TypeMetaFieldDef,ScalarLeafsRule:()=>ScalarLeafsRule,GraphQLIncludeDirective:()=>GraphQLIncludeDirective,assertSchema:()=>assertSchema,lexicographicSortSchema:()=>lexicographicSortSchema,specifiedRules:()=>specifiedRules,GraphQLList:()=>GraphQLList,isTypeSystemExtensionNode:()=>isTypeSystemExtensionNode,specifiedScalarTypes:()=>specifiedScalarTypes,BreakingChangeType:()=>BreakingChangeType,ExecutableDefinitionsRule:()=>ExecutableDefinitionsRule,assertDirective:()=>assertDirective,__Field:()=>__Field,getVisitFn:()=>getVisitFn,versionInfo:()=>versionInfo,SchemaMetaFieldDef:()=>SchemaMetaFieldDef,assertCompositeType:()=>assertCompositeType,findDeprecatedUsages:()=>findDeprecatedUsages,Token:()=>ast_Token,isRequiredInputField:()=>isRequiredInputField,DangerousChangeType:()=>DangerousChangeType,GraphQLUnionType:()=>definition_GraphQLUnionType,isCompositeType:()=>isCompositeType,GraphQLString:()=>GraphQLString,FieldsOnCorrectTypeRule:()=>FieldsOnCorrectTypeRule,assertType:()=>assertType,introspectionFromSchema:()=>introspectionFromSchema,doTypesOverlap:()=>doTypesOverlap,GraphQLEnumType:()=>definition_GraphQLEnumType,syntaxError:()=>syntaxError_syntaxError,NoFragmentCyclesRule:()=>NoFragmentCyclesRule,findBreakingChanges:()=>findBreakingChanges,ValidationContext:()=>ValidationContext_ValidationContext,OverlappingFieldsCanBeMergedRule:()=>OverlappingFieldsCanBeMergedRule,isScalarType:()=>isScalarType,assertObjectType:()=>assertObjectType,NoUndefinedVariablesRule:()=>NoUndefinedVariablesRule,getOperationRootType:()=>getOperationRootType,printType:()=>printType,visitWithTypeInfo:()=>visitWithTypeInfo,isInputType:()=>isInputType,__Directive:()=>__Directive,GraphQLSchema:()=>schema_GraphQLSchema,Source:()=>source_Source,GraphQLError:()=>GraphQLError_GraphQLError,assertNamedType:()=>assertNamedType,buildSchema:()=>buildSchema,introspectionTypes:()=>introspectionTypes,PossibleFragmentSpreadsRule:()=>PossibleFragmentSpreadsRule,__Type:()=>__Type,printIntrospectionSchema:()=>printIntrospectionSchema,TokenKind:()=>TokenKind,subscribe:()=>subscribe,isNullableType:()=>isNullableType,valueFromAST:()=>valueFromAST});var fn,cache0,_defKindToExtKind,version="15.8.0",versionInfo=Object.freeze({major:15,minor:8,patch:0,preReleaseTag:null});function isPromise(value1){return"function"==typeof(null==value1?void 0:value1.then)}function isObjectLike_typeof(obj){return(isObjectLike_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function isObjectLike(value1){return"object"==isObjectLike_typeof(value1)&&null!==value1}var SYMBOL_ITERATOR="function"==typeof Symbol&&null!=Symbol.iterator?Symbol.iterator:"@@iterator",SYMBOL_ASYNC_ITERATOR="function"==typeof Symbol&&null!=Symbol.asyncIterator?Symbol.asyncIterator:"@@asyncIterator",SYMBOL_TO_STRING_TAG="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function getLocation(source,position){for(var match,lineRegexp=/\r\n|[\n\r]/g,line=1,column=position+1;(match=lineRegexp.exec(source.body))&&match.index<position;)line+=1,column=position+1-(match.index+match[0].length);return{line:line,column:column}}function printLocation(location){return printSourceLocation(location.source,getLocation(location.source,location.start))}function printSourceLocation(source,sourceLocation){var firstLineColumnOffset=source.locationOffset.column-1,body=whitespace(firstLineColumnOffset)+source.body,lineIndex=sourceLocation.line-1,lineOffset=source.locationOffset.line-1,lineNum=sourceLocation.line+lineOffset,columnOffset=1===sourceLocation.line?firstLineColumnOffset:0,columnNum=sourceLocation.column+columnOffset,locationStr="".concat(source.name,":").concat(lineNum,":").concat(columnNum,"\n"),lines=body.split(/\r\n|[\n\r]/g),locationLine=lines[lineIndex];if(locationLine.length>120){for(var subLineIndex=Math.floor(columnNum/80),subLineColumnNum=columnNum%80,subLines=[],i=0;i<locationLine.length;i+=80)subLines.push(locationLine.slice(i,i+80));return locationStr+printPrefixedLines([["".concat(lineNum),subLines[0]]].concat(subLines.slice(1,subLineIndex+1).map(function(subLine){return["",subLine]}),[[" ",whitespace(subLineColumnNum-1)+"^"],["",subLines[subLineIndex+1]]]))}return locationStr+printPrefixedLines([["".concat(lineNum-1),lines[lineIndex-1]],["".concat(lineNum),locationLine],["",whitespace(columnNum-1)+"^"],["".concat(lineNum+1),lines[lineIndex+1]]])}function printPrefixedLines(lines){var existingLines=lines.filter(function(_ref){return _ref[0],void 0!==_ref[1]}),padLen=Math.max.apply(Math,existingLines.map(function(_ref2){return _ref2[0].length}));return existingLines.map(function(_ref3){var str,prefix=_ref3[0],line=_ref3[1];return whitespace(padLen-(str=prefix).length)+str+(line?" | "+line:" |")}).join("\n")}function whitespace(len){return Array(len+1).join(" ")}function GraphQLError_typeof(obj){return(GraphQLError_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _possibleConstructorReturn(self1,call){return call&&("object"===GraphQLError_typeof(call)||"function"==typeof call)?call:_assertThisInitialized(self1)}function _assertThisInitialized(self1){if(void 0===self1)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return self1}function GraphQLError_wrapNativeSuper(Class){var _cache="function"==typeof Map?new Map:void 0;return(GraphQLError_wrapNativeSuper=function(Class){var fn;if(null===Class||(fn=Class,-1===Function.toString.call(fn).indexOf("[native code]")))return Class;if("function"!=typeof Class)throw TypeError("Super expression must either be null or a function");if(void 0!==_cache){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper)}function Wrapper(){return GraphQLError_construct(Class,arguments,GraphQLError_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),GraphQLError_setPrototypeOf(Wrapper,Class)})(Class)}function GraphQLError_construct(Parent,args,Class){return(GraphQLError_construct=_isNativeReflectConstruct()?Reflect.construct:function(Parent,args,Class){var a=[null];a.push.apply(a,args);var instance=new(Function.bind.apply(Parent,a));return Class&&GraphQLError_setPrototypeOf(instance,Class.prototype),instance}).apply(null,arguments)}function _isNativeReflectConstruct(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function GraphQLError_setPrototypeOf(o,p){return(GraphQLError_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function GraphQLError_getPrototypeOf(o){return(GraphQLError_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var GraphQLError_GraphQLError=function(_Error){if("function"!=typeof _Error&&null!==_Error)throw TypeError("Super expression must either be null or a function");GraphQLError.prototype=Object.create(_Error&&_Error.prototype,{constructor:{value:GraphQLError,writable:!0,configurable:!0}}),_Error&&GraphQLError_setPrototypeOf(GraphQLError,_Error);var hasNativeReflectConstruct,protoProps,_super=(hasNativeReflectConstruct=_isNativeReflectConstruct(),function(){var result,Super=GraphQLError_getPrototypeOf(GraphQLError);return result=hasNativeReflectConstruct?Reflect.construct(Super,arguments,GraphQLError_getPrototypeOf(this).constructor):Super.apply(this,arguments),_possibleConstructorReturn(this,result)});function GraphQLError(message,nodes,source,positions,path,originalError,extensions){if(!(this instanceof GraphQLError))throw TypeError("Cannot call a class as a function");(_this=_super.call(this,message)).name="GraphQLError",_this.originalError=null!=originalError?originalError:void 0,_this.nodes=undefinedIfEmpty(Array.isArray(nodes)?nodes:nodes?[nodes]:void 0);for(var nodeLocations=[],_i2=0,_ref3=null!=(_this$nodes=_this.nodes)?_this$nodes:[];_i2<_ref3.length;_i2++){var _nodeLocations,_nodeLocations2,_nodeLocations3,_this,_this$nodes,loc=_ref3[_i2].loc;null!=loc&&nodeLocations.push(loc)}nodeLocations=undefinedIfEmpty(nodeLocations),_this.source=null!=source?source:null==(_nodeLocations=nodeLocations)?void 0:_nodeLocations[0].source,_this.positions=null!=positions?positions:null==(_nodeLocations2=nodeLocations)?void 0:_nodeLocations2.map(function(loc){return loc.start}),_this.locations=positions&&source?positions.map(function(pos){return getLocation(source,pos)}):null==(_nodeLocations3=nodeLocations)?void 0:_nodeLocations3.map(function(loc){return getLocation(loc.source,loc.start)}),_this.path=null!=path?path:void 0;var originalExtensions=null==originalError?void 0:originalError.extensions;return(null==extensions&&isObjectLike(originalExtensions)?_this.extensions=function(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({},originalExtensions):_this.extensions=null!=extensions?extensions:{},Object.defineProperties(_assertThisInitialized(_this),{message:{enumerable:!0},locations:{enumerable:null!=_this.locations},path:{enumerable:null!=_this.path},extensions:{enumerable:null!=_this.extensions&&Object.keys(_this.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=originalError&&originalError.stack)?(Object.defineProperty(_assertThisInitialized(_this),"stack",{value:originalError.stack,writable:!0,configurable:!0}),_possibleConstructorReturn(_this)):(Error.captureStackTrace?Error.captureStackTrace(_assertThisInitialized(_this),GraphQLError):Object.defineProperty(_assertThisInitialized(_this),"stack",{value:Error().stack,writable:!0,configurable:!0}),_this)}return protoProps=[{key:"toString",value:function(){return printError(this)}},{key:SYMBOL_TO_STRING_TAG,get:function(){return"Object"}}],function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}(GraphQLError.prototype,protoProps),GraphQLError}(GraphQLError_wrapNativeSuper(Error));function undefinedIfEmpty(array){return void 0===array||0===array.length?void 0:array}function printError(error){var output=error.message;if(error.nodes)for(var _i4=0,_error$nodes2=error.nodes;_i4<_error$nodes2.length;_i4++){var node=_error$nodes2[_i4];node.loc&&(output+="\n\n"+printLocation(node.loc))}else if(error.source&&error.locations)for(var _i6=0,_error$locations2=error.locations;_i6<_error$locations2.length;_i6++){var location=_error$locations2[_i6];output+="\n\n"+printSourceLocation(error.source,location)}return output}function syntaxError_syntaxError(source,position,description){return new GraphQLError_GraphQLError("Syntax Error: ".concat(description),void 0,source,[position])}var Kind=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});function invariant(condition,message){if(!condition)throw Error(null!=message?message:"Unexpected invariant triggered.")}var nodejsCustomInspectSymbol="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function defineInspect(classObject){var fn=classObject.prototype.toJSON;"function"==typeof fn||invariant(0),classObject.prototype.inspect=fn,nodejsCustomInspectSymbol&&(classObject.prototype[nodejsCustomInspectSymbol]=fn)}var ast_Location=function(){function Location(startToken,endToken,source){this.start=startToken.start,this.end=endToken.end,this.startToken=startToken,this.endToken=endToken,this.source=source}return Location.prototype.toJSON=function(){return{start:this.start,end:this.end}},Location}();defineInspect(ast_Location);var ast_Token=function(){function Token(kind,start,end,line,column,prev,value1){this.kind=kind,this.start=start,this.end=end,this.line=line,this.column=column,this.value=value1,this.prev=prev,this.next=null}return Token.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},Token}();function isNode(maybeNode){return null!=maybeNode&&"string"==typeof maybeNode.kind}defineInspect(ast_Token);var TokenKind=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function inspect_typeof(obj){return(inspect_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function inspect(value1){return function formatValue(value1,seenValues){switch(inspect_typeof(value1)){case"string":return JSON.stringify(value1);case"function":return value1.name?"[function ".concat(value1.name,"]"):"[function]";case"object":if(null===value1)return"null";return function(value1,previouslySeenValues){if(-1!==previouslySeenValues.indexOf(value1))return"[Circular]";var object,customInspectFn,object1,seenValues,keys,seenValues1=[].concat(previouslySeenValues,[value1]),customInspectFn1="function"==typeof(customInspectFn=(object=value1)[String(nodejsCustomInspectSymbol)])?customInspectFn:"function"==typeof object.inspect?object.inspect:void 0;if(void 0!==customInspectFn1){var customValue=customInspectFn1.call(value1);if(customValue!==value1)return"string"==typeof customValue?customValue:formatValue(customValue,seenValues1)}else if(Array.isArray(value1)){var array=value1,seenValues2=seenValues1;if(0===array.length)return"[]";if(seenValues2.length>2)return"[Array]";for(var len=Math.min(10,array.length),remaining=array.length-len,items=[],i=0;i<len;++i)items.push(formatValue(array[i],seenValues2));return 1===remaining?items.push("... 1 more item"):remaining>1&&items.push("... ".concat(remaining," more items")),"["+items.join(", ")+"]"}return object1=value1,seenValues=seenValues1,0===(keys=Object.keys(object1)).length?"{}":seenValues.length>2?"["+function(object){var tag=Object.prototype.toString.call(object).replace(/^\[object /,"").replace(/]$/,"");if("Object"===tag&&"function"==typeof object.constructor){var name=object.constructor.name;if("string"==typeof name&&""!==name)return name}return tag}(object1)+"]":"{ "+keys.map(function(key){var value1=formatValue(object1[key],seenValues);return key+": "+value1}).join(", ")+" }"}(value1,seenValues);default:return String(value1)}}(value1,[])}function devAssert(condition,message){if(!condition)throw Error(message)}let jsutils_instanceOf=function(value1,constructor){return value1 instanceof constructor};var source_Source=function(){var protoProps;function Source(body){var name=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",locationOffset=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof body||devAssert(0,"Body must be a string. Received: ".concat(inspect(body),".")),this.body=body,this.name=name,this.locationOffset=locationOffset,this.locationOffset.line>0||devAssert(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||devAssert(0,"column in locationOffset is 1-indexed and must be positive.")}return protoProps=[{key:SYMBOL_TO_STRING_TAG,get:function(){return"Source"}}],function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}(Source.prototype,protoProps),Source}(),DirectiveLocation=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function dedentBlockStringValue(rawString){var lines=rawString.split(/\r\n|[\n\r]/g),commonIndent=getBlockStringIndentation(rawString);if(0!==commonIndent)for(var i=1;i<lines.length;i++)lines[i]=lines[i].slice(commonIndent);for(var startLine=0;startLine<lines.length&&isBlank(lines[startLine]);)++startLine;for(var endLine=lines.length;endLine>startLine&&isBlank(lines[endLine-1]);)--endLine;return lines.slice(startLine,endLine).join("\n")}function isBlank(str){for(var i=0;i<str.length;++i)if(" "!==str[i]&&" "!==str[i])return!1;return!0}function getBlockStringIndentation(value1){for(var _commonIndent,isFirstLine=!0,isEmptyLine=!0,indent=0,commonIndent=null,i=0;i<value1.length;++i)switch(value1.charCodeAt(i)){case 13:10===value1.charCodeAt(i+1)&&++i;case 10:isFirstLine=!1,isEmptyLine=!0,indent=0;break;case 9:case 32:++indent;break;default:isEmptyLine&&!isFirstLine&&(null===commonIndent||indent<commonIndent)&&(commonIndent=indent),isEmptyLine=!1}return null!=(_commonIndent=commonIndent)?_commonIndent:0}function printBlockString(value1){var indentation=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",preferMultipleLines=arguments.length>2&&void 0!==arguments[2]&&arguments[2],isSingleLine=-1===value1.indexOf("\n"),hasLeadingSpace=" "===value1[0]||" "===value1[0],hasTrailingQuote='"'===value1[value1.length-1],hasTrailingSlash="\\"===value1[value1.length-1],printAsMultipleLines=!isSingleLine||hasTrailingQuote||hasTrailingSlash||preferMultipleLines,result="";return printAsMultipleLines&&!(isSingleLine&&hasLeadingSpace)&&(result+="\n"+indentation),result+=indentation?value1.replace(/\n/g,"\n"+indentation):value1,printAsMultipleLines&&(result+="\n"),'"""'+result.replace(/"""/g,'\\"""')+'"""'}var lexer_Lexer=function(){function Lexer(source){var startOfFileToken=new ast_Token(TokenKind.SOF,0,0,0,0,null);this.source=source,this.lastToken=startOfFileToken,this.token=startOfFileToken,this.line=1,this.lineStart=0}var _proto=Lexer.prototype;return _proto.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},_proto.lookahead=function(){var _token$next,token=this.token;if(token.kind!==TokenKind.EOF)do token=null!=(_token$next=token.next)?_token$next:token.next=function(lexer,prev){for(var source=lexer.source,body=source.body,bodyLength=body.length,pos=prev.end;pos<bodyLength;){var code,code1=body.charCodeAt(pos),_line=lexer.line,_col=1+pos-lexer.lineStart;switch(code1){case 65279:case 9:case 32:case 44:++pos;continue;case 10:++pos,++lexer.line,lexer.lineStart=pos;continue;case 13:10===body.charCodeAt(pos+1)?pos+=2:++pos,++lexer.line,lexer.lineStart=pos;continue;case 33:return new ast_Token(TokenKind.BANG,pos,pos+1,_line,_col,prev);case 35:return function(source,start,line,col,prev){var code,body=source.body,position=start;do code=body.charCodeAt(++position);while(!isNaN(code)&&(code>31||9===code));return new ast_Token(TokenKind.COMMENT,start,position,line,col,prev,body.slice(start+1,position))}(source,pos,_line,_col,prev);case 36:return new ast_Token(TokenKind.DOLLAR,pos,pos+1,_line,_col,prev);case 38:return new ast_Token(TokenKind.AMP,pos,pos+1,_line,_col,prev);case 40:return new ast_Token(TokenKind.PAREN_L,pos,pos+1,_line,_col,prev);case 41:return new ast_Token(TokenKind.PAREN_R,pos,pos+1,_line,_col,prev);case 46:if(46===body.charCodeAt(pos+1)&&46===body.charCodeAt(pos+2))return new ast_Token(TokenKind.SPREAD,pos,pos+3,_line,_col,prev);break;case 58:return new ast_Token(TokenKind.COLON,pos,pos+1,_line,_col,prev);case 61:return new ast_Token(TokenKind.EQUALS,pos,pos+1,_line,_col,prev);case 64:return new ast_Token(TokenKind.AT,pos,pos+1,_line,_col,prev);case 91:return new ast_Token(TokenKind.BRACKET_L,pos,pos+1,_line,_col,prev);case 93:return new ast_Token(TokenKind.BRACKET_R,pos,pos+1,_line,_col,prev);case 123:return new ast_Token(TokenKind.BRACE_L,pos,pos+1,_line,_col,prev);case 124:return new ast_Token(TokenKind.PIPE,pos,pos+1,_line,_col,prev);case 125:return new ast_Token(TokenKind.BRACE_R,pos,pos+1,_line,_col,prev);case 34:if(34===body.charCodeAt(pos+1)&&34===body.charCodeAt(pos+2))return function(source,start,line,col,prev,lexer){for(var body=source.body,position=start+3,chunkStart=position,code=0,rawValue="";position<body.length&&!isNaN(code=body.charCodeAt(position));){if(34===code&&34===body.charCodeAt(position+1)&&34===body.charCodeAt(position+2))return rawValue+=body.slice(chunkStart,position),new ast_Token(TokenKind.BLOCK_STRING,start,position+3,line,col,prev,dedentBlockStringValue(rawValue));if(code<32&&9!==code&&10!==code&&13!==code)throw syntaxError_syntaxError(source,position,"Invalid character within String: ".concat(printCharCode(code),"."));10===code?(++position,++lexer.line,lexer.lineStart=position):13===code?(10===body.charCodeAt(position+1)?position+=2:++position,++lexer.line,lexer.lineStart=position):92===code&&34===body.charCodeAt(position+1)&&34===body.charCodeAt(position+2)&&34===body.charCodeAt(position+3)?(rawValue+=body.slice(chunkStart,position)+'"""',position+=4,chunkStart=position):++position}throw syntaxError_syntaxError(source,position,"Unterminated string.")}(source,pos,_line,_col,prev,lexer);return function(source,start,line,col,prev){for(var body=source.body,position=start+1,chunkStart=position,code=0,value1="";position<body.length&&!isNaN(code=body.charCodeAt(position))&&10!==code&&13!==code;){if(34===code)return value1+=body.slice(chunkStart,position),new ast_Token(TokenKind.STRING,start,position+1,line,col,prev,value1);if(code<32&&9!==code)throw syntaxError_syntaxError(source,position,"Invalid character within String: ".concat(printCharCode(code),"."));if(++position,92===code){switch(value1+=body.slice(chunkStart,position-1),code=body.charCodeAt(position)){case 34:value1+='"';break;case 47:value1+="/";break;case 92:value1+="\\";break;case 98:value1+="\b";break;case 102:value1+="\f";break;case 110:value1+="\n";break;case 114:value1+="\r";break;case 116:value1+=" ";break;case 117:var a,b,c,d,charCode=(a=body.charCodeAt(position+1),b=body.charCodeAt(position+2),c=body.charCodeAt(position+3),d=body.charCodeAt(position+4),char2hex(a)<<12|char2hex(b)<<8|char2hex(c)<<4|char2hex(d));if(charCode<0){var invalidSequence=body.slice(position+1,position+5);throw syntaxError_syntaxError(source,position,"Invalid character escape sequence: \\u".concat(invalidSequence,"."))}value1+=String.fromCharCode(charCode),position+=4;break;default:throw syntaxError_syntaxError(source,position,"Invalid character escape sequence: \\".concat(String.fromCharCode(code),"."))}chunkStart=++position}}throw syntaxError_syntaxError(source,position,"Unterminated string.")}(source,pos,_line,_col,prev);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(source,start,firstCode,line,col,prev){var code,body=source.body,code1=firstCode,position=start,isFloat=!1;if(45===code1&&(code1=body.charCodeAt(++position)),48===code1){if((code1=body.charCodeAt(++position))>=48&&code1<=57)throw syntaxError_syntaxError(source,position,"Invalid number, unexpected digit after 0: ".concat(printCharCode(code1),"."))}else position=readDigits(source,position,code1),code1=body.charCodeAt(position);if(46===code1&&(isFloat=!0,code1=body.charCodeAt(++position),position=readDigits(source,position,code1),code1=body.charCodeAt(position)),(69===code1||101===code1)&&(isFloat=!0,(43===(code1=body.charCodeAt(++position))||45===code1)&&(code1=body.charCodeAt(++position)),position=readDigits(source,position,code1),code1=body.charCodeAt(position)),46===code1||95===(code=code1)||code>=65&&code<=90||code>=97&&code<=122)throw syntaxError_syntaxError(source,position,"Invalid number, expected digit but got: ".concat(printCharCode(code1),"."));return new ast_Token(isFloat?TokenKind.FLOAT:TokenKind.INT,start,position,line,col,prev,body.slice(start,position))}(source,pos,code1,_line,_col,prev);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:for(var source1=source,start=pos,line=_line,col=_col,prev1=prev,body1=source1.body,bodyLength1=body1.length,position=start+1,code2=0;position!==bodyLength1&&!isNaN(code2=body1.charCodeAt(position))&&(95===code2||code2>=48&&code2<=57||code2>=65&&code2<=90||code2>=97&&code2<=122);)++position;return new ast_Token(TokenKind.NAME,start,position,line,col,prev1,body1.slice(start,position))}throw syntaxError_syntaxError(source,pos,(code=code1)<32&&9!==code&&10!==code&&13!==code?"Cannot contain the invalid character ".concat(printCharCode(code),"."):39===code?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(printCharCode(code),"."))}var line1=lexer.line,col1=1+pos-lexer.lineStart;return new ast_Token(TokenKind.EOF,bodyLength,bodyLength,line1,col1,prev)}(this,token);while(token.kind===TokenKind.COMMENT);return token},Lexer}();function isPunctuatorTokenKind(kind){return kind===TokenKind.BANG||kind===TokenKind.DOLLAR||kind===TokenKind.AMP||kind===TokenKind.PAREN_L||kind===TokenKind.PAREN_R||kind===TokenKind.SPREAD||kind===TokenKind.COLON||kind===TokenKind.EQUALS||kind===TokenKind.AT||kind===TokenKind.BRACKET_L||kind===TokenKind.BRACKET_R||kind===TokenKind.BRACE_L||kind===TokenKind.PIPE||kind===TokenKind.BRACE_R}function printCharCode(code){return isNaN(code)?TokenKind.EOF:code<127?JSON.stringify(String.fromCharCode(code)):'"\\u'.concat(("00"+code.toString(16).toUpperCase()).slice(-4),'"')}function readDigits(source,start,firstCode){var body=source.body,position=start,code=firstCode;if(code>=48&&code<=57){do code=body.charCodeAt(++position);while(code>=48&&code<=57);return position}throw syntaxError_syntaxError(source,position,"Invalid number, expected digit but got: ".concat(printCharCode(code),"."))}function char2hex(a){return a>=48&&a<=57?a-48:a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:-1}function parse(source,options){return new parser_Parser(source,options).parseDocument()}function parser_parseValue(source,options){var parser=new parser_Parser(source,options);parser.expectToken(TokenKind.SOF);var value1=parser.parseValueLiteral(!1);return parser.expectToken(TokenKind.EOF),value1}function parseType(source,options){var parser=new parser_Parser(source,options);parser.expectToken(TokenKind.SOF);var type=parser.parseTypeReference();return parser.expectToken(TokenKind.EOF),type}var parser_Parser=function(){function Parser(source,options){var sourceObj=jsutils_instanceOf(source,source_Source)?source:new source_Source(source);this._lexer=new lexer_Lexer(sourceObj),this._options=options}var _proto=Parser.prototype;return _proto.parseName=function(){var token=this.expectToken(TokenKind.NAME);return{kind:Kind.NAME,value:token.value,loc:this.loc(token)}},_proto.parseDocument=function(){var start=this._lexer.token;return{kind:Kind.DOCUMENT,definitions:this.many(TokenKind.SOF,this.parseDefinition,TokenKind.EOF),loc:this.loc(start)}},_proto.parseDefinition=function(){if(this.peek(TokenKind.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else if(this.peek(TokenKind.BRACE_L))return this.parseOperationDefinition();else if(this.peekDescription())return this.parseTypeSystemDefinition();throw this.unexpected()},_proto.parseOperationDefinition=function(){var name,start=this._lexer.token;if(this.peek(TokenKind.BRACE_L))return{kind:Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(start)};var operation=this.parseOperationType();return this.peek(TokenKind.NAME)&&(name=this.parseName()),{kind:Kind.OPERATION_DEFINITION,operation:operation,name:name,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(start)}},_proto.parseOperationType=function(){var operationToken=this.expectToken(TokenKind.NAME);switch(operationToken.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(operationToken)},_proto.parseVariableDefinitions=function(){return this.optionalMany(TokenKind.PAREN_L,this.parseVariableDefinition,TokenKind.PAREN_R)},_proto.parseVariableDefinition=function(){var start=this._lexer.token;return{kind:Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(TokenKind.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(start)}},_proto.parseVariable=function(){var start=this._lexer.token;return this.expectToken(TokenKind.DOLLAR),{kind:Kind.VARIABLE,name:this.parseName(),loc:this.loc(start)}},_proto.parseSelectionSet=function(){var start=this._lexer.token;return{kind:Kind.SELECTION_SET,selections:this.many(TokenKind.BRACE_L,this.parseSelection,TokenKind.BRACE_R),loc:this.loc(start)}},_proto.parseSelection=function(){return this.peek(TokenKind.SPREAD)?this.parseFragment():this.parseField()},_proto.parseField=function(){var alias,name,start=this._lexer.token,nameOrAlias=this.parseName();return this.expectOptionalToken(TokenKind.COLON)?(alias=nameOrAlias,name=this.parseName()):name=nameOrAlias,{kind:Kind.FIELD,alias:alias,name:name,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(TokenKind.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(start)}},_proto.parseArguments=function(isConst){var item=isConst?this.parseConstArgument:this.parseArgument;return this.optionalMany(TokenKind.PAREN_L,item,TokenKind.PAREN_R)},_proto.parseArgument=function(){var start=this._lexer.token,name=this.parseName();return this.expectToken(TokenKind.COLON),{kind:Kind.ARGUMENT,name:name,value:this.parseValueLiteral(!1),loc:this.loc(start)}},_proto.parseConstArgument=function(){var start=this._lexer.token;return{kind:Kind.ARGUMENT,name:this.parseName(),value:(this.expectToken(TokenKind.COLON),this.parseValueLiteral(!0)),loc:this.loc(start)}},_proto.parseFragment=function(){var start=this._lexer.token;this.expectToken(TokenKind.SPREAD);var hasTypeCondition=this.expectOptionalKeyword("on");return!hasTypeCondition&&this.peek(TokenKind.NAME)?{kind:Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(start)}:{kind:Kind.INLINE_FRAGMENT,typeCondition:hasTypeCondition?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(start)}},_proto.parseFragmentDefinition=function(){var _this$_options,start=this._lexer.token;return(this.expectKeyword("fragment"),(null==(_this$_options=this._options)?void 0:_this$_options.experimentalFragmentVariables)===!0)?{kind:Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(start)}:{kind:Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(start)}},_proto.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},_proto.parseValueLiteral=function(isConst){var token=this._lexer.token;switch(token.kind){case TokenKind.BRACKET_L:return this.parseList(isConst);case TokenKind.BRACE_L:return this.parseObject(isConst);case TokenKind.INT:return this._lexer.advance(),{kind:Kind.INT,value:token.value,loc:this.loc(token)};case TokenKind.FLOAT:return this._lexer.advance(),{kind:Kind.FLOAT,value:token.value,loc:this.loc(token)};case TokenKind.STRING:case TokenKind.BLOCK_STRING:return this.parseStringLiteral();case TokenKind.NAME:switch(this._lexer.advance(),token.value){case"true":return{kind:Kind.BOOLEAN,value:!0,loc:this.loc(token)};case"false":return{kind:Kind.BOOLEAN,value:!1,loc:this.loc(token)};case"null":return{kind:Kind.NULL,loc:this.loc(token)};default:return{kind:Kind.ENUM,value:token.value,loc:this.loc(token)}}case TokenKind.DOLLAR:if(!isConst)return this.parseVariable()}throw this.unexpected()},_proto.parseStringLiteral=function(){var token=this._lexer.token;return this._lexer.advance(),{kind:Kind.STRING,value:token.value,block:token.kind===TokenKind.BLOCK_STRING,loc:this.loc(token)}},_proto.parseList=function(isConst){var _this=this,start=this._lexer.token;return{kind:Kind.LIST,values:this.any(TokenKind.BRACKET_L,function(){return _this.parseValueLiteral(isConst)},TokenKind.BRACKET_R),loc:this.loc(start)}},_proto.parseObject=function(isConst){var _this2=this,start=this._lexer.token;return{kind:Kind.OBJECT,fields:this.any(TokenKind.BRACE_L,function(){return _this2.parseObjectField(isConst)},TokenKind.BRACE_R),loc:this.loc(start)}},_proto.parseObjectField=function(isConst){var start=this._lexer.token,name=this.parseName();return this.expectToken(TokenKind.COLON),{kind:Kind.OBJECT_FIELD,name:name,value:this.parseValueLiteral(isConst),loc:this.loc(start)}},_proto.parseDirectives=function(isConst){for(var directives=[];this.peek(TokenKind.AT);)directives.push(this.parseDirective(isConst));return directives},_proto.parseDirective=function(isConst){var start=this._lexer.token;return this.expectToken(TokenKind.AT),{kind:Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(isConst),loc:this.loc(start)}},_proto.parseTypeReference=function(){var type,start=this._lexer.token;return(this.expectOptionalToken(TokenKind.BRACKET_L)?(type=this.parseTypeReference(),this.expectToken(TokenKind.BRACKET_R),type={kind:Kind.LIST_TYPE,type:type,loc:this.loc(start)}):type=this.parseNamedType(),this.expectOptionalToken(TokenKind.BANG))?{kind:Kind.NON_NULL_TYPE,type:type,loc:this.loc(start)}:type},_proto.parseNamedType=function(){var start=this._lexer.token;return{kind:Kind.NAMED_TYPE,name:this.parseName(),loc:this.loc(start)}},_proto.parseTypeSystemDefinition=function(){var keywordToken=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(keywordToken.kind===TokenKind.NAME)switch(keywordToken.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()}throw this.unexpected(keywordToken)},_proto.peekDescription=function(){return this.peek(TokenKind.STRING)||this.peek(TokenKind.BLOCK_STRING)},_proto.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},_proto.parseSchemaDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("schema");var directives=this.parseDirectives(!0),operationTypes=this.many(TokenKind.BRACE_L,this.parseOperationTypeDefinition,TokenKind.BRACE_R);return{kind:Kind.SCHEMA_DEFINITION,description:description,directives:directives,operationTypes:operationTypes,loc:this.loc(start)}},_proto.parseOperationTypeDefinition=function(){var start=this._lexer.token,operation=this.parseOperationType();this.expectToken(TokenKind.COLON);var type=this.parseNamedType();return{kind:Kind.OPERATION_TYPE_DEFINITION,operation:operation,type:type,loc:this.loc(start)}},_proto.parseScalarTypeDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("scalar");var name=this.parseName(),directives=this.parseDirectives(!0);return{kind:Kind.SCALAR_TYPE_DEFINITION,description:description,name:name,directives:directives,loc:this.loc(start)}},_proto.parseObjectTypeDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("type");var name=this.parseName(),interfaces=this.parseImplementsInterfaces(),directives=this.parseDirectives(!0),fields=this.parseFieldsDefinition();return{kind:Kind.OBJECT_TYPE_DEFINITION,description:description,name:name,interfaces:interfaces,directives:directives,fields:fields,loc:this.loc(start)}},_proto.parseImplementsInterfaces=function(){var _this$_options2;if(!this.expectOptionalKeyword("implements"))return[];if((null==(_this$_options2=this._options)?void 0:_this$_options2.allowLegacySDLImplementsInterfaces)===!0){var types=[];this.expectOptionalToken(TokenKind.AMP);do types.push(this.parseNamedType());while(this.expectOptionalToken(TokenKind.AMP)||this.peek(TokenKind.NAME));return types}return this.delimitedMany(TokenKind.AMP,this.parseNamedType)},_proto.parseFieldsDefinition=function(){var _this$_options3;return(null==(_this$_options3=this._options)?void 0:_this$_options3.allowLegacySDLEmptyFields)===!0&&this.peek(TokenKind.BRACE_L)&&this._lexer.lookahead().kind===TokenKind.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(TokenKind.BRACE_L,this.parseFieldDefinition,TokenKind.BRACE_R)},_proto.parseFieldDefinition=function(){var start=this._lexer.token,description=this.parseDescription(),name=this.parseName(),args=this.parseArgumentDefs();this.expectToken(TokenKind.COLON);var type=this.parseTypeReference(),directives=this.parseDirectives(!0);return{kind:Kind.FIELD_DEFINITION,description:description,name:name,arguments:args,type:type,directives:directives,loc:this.loc(start)}},_proto.parseArgumentDefs=function(){return this.optionalMany(TokenKind.PAREN_L,this.parseInputValueDef,TokenKind.PAREN_R)},_proto.parseInputValueDef=function(){var defaultValue,start=this._lexer.token,description=this.parseDescription(),name=this.parseName();this.expectToken(TokenKind.COLON);var type=this.parseTypeReference();this.expectOptionalToken(TokenKind.EQUALS)&&(defaultValue=this.parseValueLiteral(!0));var directives=this.parseDirectives(!0);return{kind:Kind.INPUT_VALUE_DEFINITION,description:description,name:name,type:type,defaultValue:defaultValue,directives:directives,loc:this.loc(start)}},_proto.parseInterfaceTypeDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("interface");var name=this.parseName(),interfaces=this.parseImplementsInterfaces(),directives=this.parseDirectives(!0),fields=this.parseFieldsDefinition();return{kind:Kind.INTERFACE_TYPE_DEFINITION,description:description,name:name,interfaces:interfaces,directives:directives,fields:fields,loc:this.loc(start)}},_proto.parseUnionTypeDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("union");var name=this.parseName(),directives=this.parseDirectives(!0),types=this.parseUnionMemberTypes();return{kind:Kind.UNION_TYPE_DEFINITION,description:description,name:name,directives:directives,types:types,loc:this.loc(start)}},_proto.parseUnionMemberTypes=function(){return this.expectOptionalToken(TokenKind.EQUALS)?this.delimitedMany(TokenKind.PIPE,this.parseNamedType):[]},_proto.parseEnumTypeDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("enum");var name=this.parseName(),directives=this.parseDirectives(!0),values=this.parseEnumValuesDefinition();return{kind:Kind.ENUM_TYPE_DEFINITION,description:description,name:name,directives:directives,values:values,loc:this.loc(start)}},_proto.parseEnumValuesDefinition=function(){return this.optionalMany(TokenKind.BRACE_L,this.parseEnumValueDefinition,TokenKind.BRACE_R)},_proto.parseEnumValueDefinition=function(){var start=this._lexer.token,description=this.parseDescription(),name=this.parseName(),directives=this.parseDirectives(!0);return{kind:Kind.ENUM_VALUE_DEFINITION,description:description,name:name,directives:directives,loc:this.loc(start)}},_proto.parseInputObjectTypeDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("input");var name=this.parseName(),directives=this.parseDirectives(!0),fields=this.parseInputFieldsDefinition();return{kind:Kind.INPUT_OBJECT_TYPE_DEFINITION,description:description,name:name,directives:directives,fields:fields,loc:this.loc(start)}},_proto.parseInputFieldsDefinition=function(){return this.optionalMany(TokenKind.BRACE_L,this.parseInputValueDef,TokenKind.BRACE_R)},_proto.parseTypeSystemExtension=function(){var keywordToken=this._lexer.lookahead();if(keywordToken.kind===TokenKind.NAME)switch(keywordToken.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(keywordToken)},_proto.parseSchemaExtension=function(){var start=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var directives=this.parseDirectives(!0),operationTypes=this.optionalMany(TokenKind.BRACE_L,this.parseOperationTypeDefinition,TokenKind.BRACE_R);if(0===directives.length&&0===operationTypes.length)throw this.unexpected();return{kind:Kind.SCHEMA_EXTENSION,directives:directives,operationTypes:operationTypes,loc:this.loc(start)}},_proto.parseScalarTypeExtension=function(){var start=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var name=this.parseName(),directives=this.parseDirectives(!0);if(0===directives.length)throw this.unexpected();return{kind:Kind.SCALAR_TYPE_EXTENSION,name:name,directives:directives,loc:this.loc(start)}},_proto.parseObjectTypeExtension=function(){var start=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var name=this.parseName(),interfaces=this.parseImplementsInterfaces(),directives=this.parseDirectives(!0),fields=this.parseFieldsDefinition();if(0===interfaces.length&&0===directives.length&&0===fields.length)throw this.unexpected();return{kind:Kind.OBJECT_TYPE_EXTENSION,name:name,interfaces:interfaces,directives:directives,fields:fields,loc:this.loc(start)}},_proto.parseInterfaceTypeExtension=function(){var start=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var name=this.parseName(),interfaces=this.parseImplementsInterfaces(),directives=this.parseDirectives(!0),fields=this.parseFieldsDefinition();if(0===interfaces.length&&0===directives.length&&0===fields.length)throw this.unexpected();return{kind:Kind.INTERFACE_TYPE_EXTENSION,name:name,interfaces:interfaces,directives:directives,fields:fields,loc:this.loc(start)}},_proto.parseUnionTypeExtension=function(){var start=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var name=this.parseName(),directives=this.parseDirectives(!0),types=this.parseUnionMemberTypes();if(0===directives.length&&0===types.length)throw this.unexpected();return{kind:Kind.UNION_TYPE_EXTENSION,name:name,directives:directives,types:types,loc:this.loc(start)}},_proto.parseEnumTypeExtension=function(){var start=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var name=this.parseName(),directives=this.parseDirectives(!0),values=this.parseEnumValuesDefinition();if(0===directives.length&&0===values.length)throw this.unexpected();return{kind:Kind.ENUM_TYPE_EXTENSION,name:name,directives:directives,values:values,loc:this.loc(start)}},_proto.parseInputObjectTypeExtension=function(){var start=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var name=this.parseName(),directives=this.parseDirectives(!0),fields=this.parseInputFieldsDefinition();if(0===directives.length&&0===fields.length)throw this.unexpected();return{kind:Kind.INPUT_OBJECT_TYPE_EXTENSION,name:name,directives:directives,fields:fields,loc:this.loc(start)}},_proto.parseDirectiveDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("directive"),this.expectToken(TokenKind.AT);var name=this.parseName(),args=this.parseArgumentDefs(),repeatable=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var locations=this.parseDirectiveLocations();return{kind:Kind.DIRECTIVE_DEFINITION,description:description,name:name,arguments:args,repeatable:repeatable,locations:locations,loc:this.loc(start)}},_proto.parseDirectiveLocations=function(){return this.delimitedMany(TokenKind.PIPE,this.parseDirectiveLocation)},_proto.parseDirectiveLocation=function(){var start=this._lexer.token,name=this.parseName();if(void 0!==DirectiveLocation[name.value])return name;throw this.unexpected(start)},_proto.loc=function(startToken){var _this$_options4;if((null==(_this$_options4=this._options)?void 0:_this$_options4.noLocation)!==!0)return new ast_Location(startToken,this._lexer.lastToken,this._lexer.source)},_proto.peek=function(kind){return this._lexer.token.kind===kind},_proto.expectToken=function(kind){var token=this._lexer.token;if(token.kind===kind)return this._lexer.advance(),token;throw syntaxError_syntaxError(this._lexer.source,token.start,"Expected ".concat(getTokenKindDesc(kind),", found ").concat(getTokenDesc(token),"."))},_proto.expectOptionalToken=function(kind){var token=this._lexer.token;if(token.kind===kind)return this._lexer.advance(),token},_proto.expectKeyword=function(value1){var token=this._lexer.token;if(token.kind===TokenKind.NAME&&token.value===value1)this._lexer.advance();else throw syntaxError_syntaxError(this._lexer.source,token.start,'Expected "'.concat(value1,'", found ').concat(getTokenDesc(token),"."))},_proto.expectOptionalKeyword=function(value1){var token=this._lexer.token;return token.kind===TokenKind.NAME&&token.value===value1&&(this._lexer.advance(),!0)},_proto.unexpected=function(atToken){var token=null!=atToken?atToken:this._lexer.token;return syntaxError_syntaxError(this._lexer.source,token.start,"Unexpected ".concat(getTokenDesc(token),"."))},_proto.any=function(openKind,parseFn,closeKind){this.expectToken(openKind);for(var nodes=[];!this.expectOptionalToken(closeKind);)nodes.push(parseFn.call(this));return nodes},_proto.optionalMany=function(openKind,parseFn,closeKind){if(this.expectOptionalToken(openKind)){var nodes=[];do nodes.push(parseFn.call(this));while(!this.expectOptionalToken(closeKind));return nodes}return[]},_proto.many=function(openKind,parseFn,closeKind){this.expectToken(openKind);var nodes=[];do nodes.push(parseFn.call(this));while(!this.expectOptionalToken(closeKind));return nodes},_proto.delimitedMany=function(delimiterKind,parseFn){this.expectOptionalToken(delimiterKind);var nodes=[];do nodes.push(parseFn.call(this));while(this.expectOptionalToken(delimiterKind));return nodes},Parser}();function getTokenDesc(token){var value1=token.value;return getTokenKindDesc(token.kind)+(null!=value1?' "'.concat(value1,'"'):"")}function getTokenKindDesc(kind){return isPunctuatorTokenKind(kind)?'"'.concat(kind,'"'):kind}var QueryDocumentKeys={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},BREAK=Object.freeze({});function visit(root,visitor){var visitorKeys=arguments.length>2&&void 0!==arguments[2]?arguments[2]:QueryDocumentKeys,stack=void 0,inArray=Array.isArray(root),keys=[root],index=-1,edits=[],node=void 0,key=void 0,parent1=void 0,path=[],ancestors=[],newRoot=root;do{var _visitorKeys$node$kin,isLeaving=++index===keys.length,isEdited=isLeaving&&0!==edits.length;if(isLeaving){if(key=0===ancestors.length?void 0:path[path.length-1],node=parent1,parent1=ancestors.pop(),isEdited){if(inArray)node=node.slice();else{for(var clone={},_i2=0,_Object$keys2=Object.keys(node);_i2<_Object$keys2.length;_i2++){var k=_Object$keys2[_i2];clone[k]=node[k]}node=clone}for(var editOffset=0,ii=0;ii<edits.length;ii++){var editKey=edits[ii][0],editValue=edits[ii][1];inArray&&(editKey-=editOffset),inArray&&null===editValue?(node.splice(editKey,1),editOffset++):node[editKey]=editValue}}index=stack.index,keys=stack.keys,edits=stack.edits,inArray=stack.inArray,stack=stack.prev}else{if(key=parent1?inArray?index:keys[index]:void 0,null==(node=parent1?parent1[key]:newRoot))continue;parent1&&path.push(key)}var result=void 0;if(!Array.isArray(node)){if(!isNode(node))throw Error("Invalid AST Node: ".concat(inspect(node),"."));var visitFn=getVisitFn(visitor,node.kind,isLeaving);if(visitFn){if((result=visitFn.call(visitor,node,key,parent1,path,ancestors))===BREAK)break;if(!1===result){if(!isLeaving){path.pop();continue}}else if(void 0!==result&&(edits.push([key,result]),!isLeaving))if(isNode(result))node=result;else{path.pop();continue}}}void 0===result&&isEdited&&edits.push([key,node]),isLeaving?path.pop():(stack={inArray:inArray,index:index,keys:keys,edits:edits,prev:stack},keys=(inArray=Array.isArray(node))?node:null!=(_visitorKeys$node$kin=visitorKeys[node.kind])?_visitorKeys$node$kin:[],index=-1,edits=[],parent1&&ancestors.push(parent1),parent1=node)}while(void 0!==stack);return 0!==edits.length&&(newRoot=edits[edits.length-1][1]),newRoot}function visitInParallel(visitors){var skipping=Array(visitors.length);return{enter:function(node){for(var i=0;i<visitors.length;i++)if(null==skipping[i]){var fn=getVisitFn(visitors[i],node.kind,!1);if(fn){var result=fn.apply(visitors[i],arguments);if(!1===result)skipping[i]=node;else if(result===BREAK)skipping[i]=BREAK;else if(void 0!==result)return result}}},leave:function(node){for(var i=0;i<visitors.length;i++)if(null==skipping[i]){var fn=getVisitFn(visitors[i],node.kind,!0);if(fn){var result=fn.apply(visitors[i],arguments);if(result===BREAK)skipping[i]=BREAK;else if(void 0!==result&&!1!==result)return result}}else skipping[i]===node&&(skipping[i]=null)}}}function getVisitFn(visitor,kind,isLeaving){var kindVisitor=visitor[kind];if(kindVisitor){if(!isLeaving&&"function"==typeof kindVisitor)return kindVisitor;var kindSpecificVisitor=isLeaving?kindVisitor.leave:kindVisitor.enter;if("function"==typeof kindSpecificVisitor)return kindSpecificVisitor}else{var specificVisitor=isLeaving?visitor.leave:visitor.enter;if(specificVisitor){if("function"==typeof specificVisitor)return specificVisitor;var specificKindVisitor=specificVisitor[kind];if("function"==typeof specificKindVisitor)return specificKindVisitor}}}var find=Array.prototype.find?function(list,predicate){return Array.prototype.find.call(list,predicate)}:function(list,predicate){for(var _i2=0;_i2<list.length;_i2++){var value1=list[_i2];if(predicate(value1))return value1}},objectValues=Object.values||function(obj){return Object.keys(obj).map(function(key){return obj[key]})};function locatedError(rawOriginalError,nodes,path){var _nodes,originalError=rawOriginalError instanceof Error?rawOriginalError:Error("Unexpected error value: "+inspect(rawOriginalError));return Array.isArray(originalError.path)?originalError:new GraphQLError_GraphQLError(originalError.message,null!=(_nodes=originalError.nodes)?_nodes:nodes,originalError.source,originalError.positions,path,originalError)}var NAME_RX=/^[_a-zA-Z][_a-zA-Z0-9]*$/;function assertValidName(name){var error=isValidNameError(name);if(error)throw error;return name}function isValidNameError(name){return("string"==typeof name||devAssert(0,"Expected name to be a string."),name.length>1&&"_"===name[0]&&"_"===name[1])?new GraphQLError_GraphQLError('Name "'.concat(name,'" must not begin with "__", which is reserved by GraphQL introspection.')):NAME_RX.test(name)?void 0:new GraphQLError_GraphQLError('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'.concat(name,'" does not.'))}var objectEntries=Object.entries||function(obj){return Object.keys(obj).map(function(key){return[key,obj[key]]})};function keyMap(list,keyFn){return list.reduce(function(map,item){return map[keyFn(item)]=item,map},Object.create(null))}function mapValue(map,fn){for(var result=Object.create(null),_i2=0,_objectEntries2=objectEntries(map);_i2<_objectEntries2.length;_i2++){var _ref2=_objectEntries2[_i2],_key=_ref2[0],_value=_ref2[1];result[_key]=fn(_value,_key)}return result}function toObjMap(obj){if(null===Object.getPrototypeOf(obj))return obj;for(var map=Object.create(null),_i2=0,_objectEntries2=objectEntries(obj);_i2<_objectEntries2.length;_i2++){var _ref2=_objectEntries2[_i2],key=_ref2[0],value1=_ref2[1];map[key]=value1}return map}function keyValMap(list,keyFn,valFn){return list.reduce(function(map,item){return map[keyFn(item)]=valFn(item),map},Object.create(null))}function didYouMean(firstArg,secondArg){var _ref="string"==typeof firstArg?[firstArg,secondArg]:[void 0,firstArg],subMessage=_ref[0],suggestionsArg=_ref[1],message=" Did you mean ";subMessage&&(message+=subMessage+" ");var suggestions=suggestionsArg.map(function(x){return'"'.concat(x,'"')});switch(suggestions.length){case 0:return"";case 1:return message+suggestions[0]+"?";case 2:return message+suggestions[0]+" or "+suggestions[1]+"?"}var selected=suggestions.slice(0,5),lastItem=selected.pop();return message+selected.join(", ")+", or "+lastItem+"?"}function identityFunc(x){return x}function naturalCompare(aStr,bStr){for(var aIdx=0,bIdx=0;aIdx<aStr.length&&bIdx<bStr.length;){var aChar=aStr.charCodeAt(aIdx),bChar=bStr.charCodeAt(bIdx);if(isDigit(aChar)&&isDigit(bChar)){var aNum=0;do++aIdx,aNum=10*aNum+aChar-DIGIT_0,aChar=aStr.charCodeAt(aIdx);while(isDigit(aChar)&&aNum>0);var bNum=0;do++bIdx,bNum=10*bNum+bChar-DIGIT_0,bChar=bStr.charCodeAt(bIdx);while(isDigit(bChar)&&bNum>0);if(aNum<bNum)return -1;if(aNum>bNum)return 1}else{if(aChar<bChar)return -1;if(aChar>bChar)return 1;++aIdx,++bIdx}}return aStr.length-bStr.length}var DIGIT_0=48;function isDigit(code){return!isNaN(code)&&DIGIT_0<=code&&code<=57}function suggestionList(input,options){for(var optionsByDistance=Object.create(null),lexicalDistance=new suggestionList_LexicalDistance(input),threshold=Math.floor(.4*input.length)+1,_i2=0;_i2<options.length;_i2++){var option=options[_i2],distance=lexicalDistance.measure(option,threshold);void 0!==distance&&(optionsByDistance[option]=distance)}return Object.keys(optionsByDistance).sort(function(a,b){var distanceDiff=optionsByDistance[a]-optionsByDistance[b];return 0!==distanceDiff?distanceDiff:naturalCompare(a,b)})}var suggestionList_LexicalDistance=function(){function LexicalDistance(input){this._input=input,this._inputLowerCase=input.toLowerCase(),this._inputArray=stringToArray(this._inputLowerCase),this._rows=[Array(input.length+1).fill(0),Array(input.length+1).fill(0),Array(input.length+1).fill(0)]}return LexicalDistance.prototype.measure=function(option,threshold){if(this._input===option)return 0;var optionLowerCase=option.toLowerCase();if(this._inputLowerCase===optionLowerCase)return 1;var a=stringToArray(optionLowerCase),b=this._inputArray;if(a.length<b.length){var tmp=a;a=b,b=tmp}var aLength=a.length,bLength=b.length;if(!(aLength-bLength>threshold)){for(var rows=this._rows,j=0;j<=bLength;j++)rows[0][j]=j;for(var i=1;i<=aLength;i++){for(var upRow=rows[(i-1)%3],currentRow=rows[i%3],smallestCell=currentRow[0]=i,_j=1;_j<=bLength;_j++){var cost=+(a[i-1]!==b[_j-1]),currentCell=Math.min(upRow[_j]+1,currentRow[_j-1]+1,upRow[_j-1]+cost);i>1&&_j>1&&a[i-1]===b[_j-2]&&a[i-2]===b[_j-1]&&(currentCell=Math.min(currentCell,rows[(i-2)%3][_j-2]+1)),currentCell<smallestCell&&(smallestCell=currentCell),currentRow[_j]=currentCell}if(smallestCell>threshold)return}var distance=rows[aLength%3][bLength];return distance<=threshold?distance:void 0}},LexicalDistance}();function stringToArray(str){for(var strLength=str.length,array=Array(strLength),i=0;i<strLength;++i)array[i]=str.charCodeAt(i);return array}function print(ast){return visit(ast,{leave:printDocASTReducer})}var printDocASTReducer={Name:function(node){return node.value},Variable:function(node){return"$"+node.name},Document:function(node){return join(node.definitions,"\n\n")+"\n"},OperationDefinition:function(node){var op=node.operation,name=node.name,varDefs=wrap("(",join(node.variableDefinitions,", "),")"),directives=join(node.directives," "),selectionSet=node.selectionSet;return name||directives||varDefs||"query"!==op?join([op,join([name,varDefs]),directives,selectionSet]," "):selectionSet},VariableDefinition:function(_ref){var variable=_ref.variable,type=_ref.type,defaultValue=_ref.defaultValue,directives=_ref.directives;return variable+": "+type+wrap(" = ",defaultValue)+wrap(" ",join(directives," "))},SelectionSet:function(_ref2){return block(_ref2.selections)},Field:function(_ref3){var alias=_ref3.alias,name=_ref3.name,args=_ref3.arguments,directives=_ref3.directives,selectionSet=_ref3.selectionSet,prefix=wrap("",alias,": ")+name,argsLine=prefix+wrap("(",join(args,", "),")");return argsLine.length>80&&(argsLine=prefix+wrap("(\n",printer_indent(join(args,"\n")),"\n)")),join([argsLine,join(directives," "),selectionSet]," ")},Argument:function(_ref4){return _ref4.name+": "+_ref4.value},FragmentSpread:function(_ref5){return"..."+_ref5.name+wrap(" ",join(_ref5.directives," "))},InlineFragment:function(_ref6){var typeCondition=_ref6.typeCondition,directives=_ref6.directives,selectionSet=_ref6.selectionSet;return join(["...",wrap("on ",typeCondition),join(directives," "),selectionSet]," ")},FragmentDefinition:function(_ref7){var name=_ref7.name,typeCondition=_ref7.typeCondition,variableDefinitions=_ref7.variableDefinitions,directives=_ref7.directives,selectionSet=_ref7.selectionSet;return"fragment ".concat(name).concat(wrap("(",join(variableDefinitions,", "),")")," ")+"on ".concat(typeCondition," ").concat(wrap("",join(directives," ")," "))+selectionSet},IntValue:function(_ref8){return _ref8.value},FloatValue:function(_ref9){return _ref9.value},StringValue:function(_ref10,key){var value1=_ref10.value;return _ref10.block?printBlockString(value1,"description"===key?"":" "):JSON.stringify(value1)},BooleanValue:function(_ref11){return _ref11.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(_ref12){return _ref12.value},ListValue:function(_ref13){return"["+join(_ref13.values,", ")+"]"},ObjectValue:function(_ref14){return"{"+join(_ref14.fields,", ")+"}"},ObjectField:function(_ref15){return _ref15.name+": "+_ref15.value},Directive:function(_ref16){return"@"+_ref16.name+wrap("(",join(_ref16.arguments,", "),")")},NamedType:function(_ref17){return _ref17.name},ListType:function(_ref18){return"["+_ref18.type+"]"},NonNullType:function(_ref19){return _ref19.type+"!"},SchemaDefinition:addDescription(function(_ref20){var directives=_ref20.directives,operationTypes=_ref20.operationTypes;return join(["schema",join(directives," "),block(operationTypes)]," ")}),OperationTypeDefinition:function(_ref21){return _ref21.operation+": "+_ref21.type},ScalarTypeDefinition:addDescription(function(_ref22){return join(["scalar",_ref22.name,join(_ref22.directives," ")]," ")}),ObjectTypeDefinition:addDescription(function(_ref23){var name=_ref23.name,interfaces=_ref23.interfaces,directives=_ref23.directives,fields=_ref23.fields;return join(["type",name,wrap("implements ",join(interfaces," & ")),join(directives," "),block(fields)]," ")}),FieldDefinition:addDescription(function(_ref24){var name=_ref24.name,args=_ref24.arguments,type=_ref24.type,directives=_ref24.directives;return name+(hasMultilineItems(args)?wrap("(\n",printer_indent(join(args,"\n")),"\n)"):wrap("(",join(args,", "),")"))+": "+type+wrap(" ",join(directives," "))}),InputValueDefinition:addDescription(function(_ref25){var name=_ref25.name,type=_ref25.type,defaultValue=_ref25.defaultValue,directives=_ref25.directives;return join([name+": "+type,wrap("= ",defaultValue),join(directives," ")]," ")}),InterfaceTypeDefinition:addDescription(function(_ref26){var name=_ref26.name,interfaces=_ref26.interfaces,directives=_ref26.directives,fields=_ref26.fields;return join(["interface",name,wrap("implements ",join(interfaces," & ")),join(directives," "),block(fields)]," ")}),UnionTypeDefinition:addDescription(function(_ref27){var name=_ref27.name,directives=_ref27.directives,types=_ref27.types;return join(["union",name,join(directives," "),types&&0!==types.length?"= "+join(types," | "):""]," ")}),EnumTypeDefinition:addDescription(function(_ref28){var name=_ref28.name,directives=_ref28.directives,values=_ref28.values;return join(["enum",name,join(directives," "),block(values)]," ")}),EnumValueDefinition:addDescription(function(_ref29){return join([_ref29.name,join(_ref29.directives," ")]," ")}),InputObjectTypeDefinition:addDescription(function(_ref30){var name=_ref30.name,directives=_ref30.directives,fields=_ref30.fields;return join(["input",name,join(directives," "),block(fields)]," ")}),DirectiveDefinition:addDescription(function(_ref31){var name=_ref31.name,args=_ref31.arguments,repeatable=_ref31.repeatable,locations=_ref31.locations;return"directive @"+name+(hasMultilineItems(args)?wrap("(\n",printer_indent(join(args,"\n")),"\n)"):wrap("(",join(args,", "),")"))+(repeatable?" repeatable":"")+" on "+join(locations," | ")}),SchemaExtension:function(_ref32){var directives=_ref32.directives,operationTypes=_ref32.operationTypes;return join(["extend schema",join(directives," "),block(operationTypes)]," ")},ScalarTypeExtension:function(_ref33){return join(["extend scalar",_ref33.name,join(_ref33.directives," ")]," ")},ObjectTypeExtension:function(_ref34){var name=_ref34.name,interfaces=_ref34.interfaces,directives=_ref34.directives,fields=_ref34.fields;return join(["extend type",name,wrap("implements ",join(interfaces," & ")),join(directives," "),block(fields)]," ")},InterfaceTypeExtension:function(_ref35){var name=_ref35.name,interfaces=_ref35.interfaces,directives=_ref35.directives,fields=_ref35.fields;return join(["extend interface",name,wrap("implements ",join(interfaces," & ")),join(directives," "),block(fields)]," ")},UnionTypeExtension:function(_ref36){var name=_ref36.name,directives=_ref36.directives,types=_ref36.types;return join(["extend union",name,join(directives," "),types&&0!==types.length?"= "+join(types," | "):""]," ")},EnumTypeExtension:function(_ref37){var name=_ref37.name,directives=_ref37.directives,values=_ref37.values;return join(["extend enum",name,join(directives," "),block(values)]," ")},InputObjectTypeExtension:function(_ref38){var name=_ref38.name,directives=_ref38.directives,fields=_ref38.fields;return join(["extend input",name,join(directives," "),block(fields)]," ")}};function addDescription(cb){return function(node){return join([node.description,cb(node)],"\n")}}function join(maybeArray){var _maybeArray$filter$jo,separator=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!=(_maybeArray$filter$jo=null==maybeArray?void 0:maybeArray.filter(function(x){return x}).join(separator))?_maybeArray$filter$jo:""}function block(array){return wrap("{\n",printer_indent(join(array,"\n")),"\n}")}function wrap(start,maybeString){var end=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=maybeString&&""!==maybeString?start+maybeString+end:""}function printer_indent(str){return wrap(" ",str.replace(/\n/g,"\n "))}function isMultiline(str){return -1!==str.indexOf("\n")}function hasMultilineItems(maybeArray){return null!=maybeArray&&maybeArray.some(isMultiline)}function valueFromASTUntyped(valueNode,variables){switch(valueNode.kind){case Kind.NULL:return null;case Kind.INT:return parseInt(valueNode.value,10);case Kind.FLOAT:return parseFloat(valueNode.value);case Kind.STRING:case Kind.ENUM:case Kind.BOOLEAN:return valueNode.value;case Kind.LIST:return valueNode.values.map(function(node){return valueFromASTUntyped(node,variables)});case Kind.OBJECT:return keyValMap(valueNode.fields,function(field){return field.name.value},function(field){return valueFromASTUntyped(field.value,variables)});case Kind.VARIABLE:return null==variables?void 0:variables[valueNode.name.value]}invariant(0,"Unexpected value node: "+inspect(valueNode))}function definition_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function definition_createClass(Constructor,protoProps,staticProps){return protoProps&&definition_defineProperties(Constructor.prototype,protoProps),staticProps&&definition_defineProperties(Constructor,staticProps),Constructor}function isType(type){return isScalarType(type)||isObjectType(type)||isInterfaceType(type)||isUnionType(type)||isEnumType(type)||isInputObjectType(type)||isListType(type)||isNonNullType(type)}function assertType(type){if(!isType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL type."));return type}function isScalarType(type){return jsutils_instanceOf(type,definition_GraphQLScalarType)}function assertScalarType(type){if(!isScalarType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL Scalar type."));return type}function isObjectType(type){return jsutils_instanceOf(type,definition_GraphQLObjectType)}function assertObjectType(type){if(!isObjectType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL Object type."));return type}function isInterfaceType(type){return jsutils_instanceOf(type,definition_GraphQLInterfaceType)}function assertInterfaceType(type){if(!isInterfaceType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL Interface type."));return type}function isUnionType(type){return jsutils_instanceOf(type,definition_GraphQLUnionType)}function assertUnionType(type){if(!isUnionType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL Union type."));return type}function isEnumType(type){return jsutils_instanceOf(type,definition_GraphQLEnumType)}function assertEnumType(type){if(!isEnumType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL Enum type."));return type}function isInputObjectType(type){return jsutils_instanceOf(type,definition_GraphQLInputObjectType)}function assertInputObjectType(type){if(!isInputObjectType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL Input Object type."));return type}function isListType(type){return jsutils_instanceOf(type,GraphQLList)}function assertListType(type){if(!isListType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL List type."));return type}function isNonNullType(type){return jsutils_instanceOf(type,GraphQLNonNull)}function assertNonNullType(type){if(!isNonNullType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL Non-Null type."));return type}function isInputType(type){return isScalarType(type)||isEnumType(type)||isInputObjectType(type)||isWrappingType(type)&&isInputType(type.ofType)}function assertInputType(type){if(!isInputType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL input type."));return type}function isOutputType(type){return isScalarType(type)||isObjectType(type)||isInterfaceType(type)||isUnionType(type)||isEnumType(type)||isWrappingType(type)&&isOutputType(type.ofType)}function assertOutputType(type){if(!isOutputType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL output type."));return type}function isLeafType(type){return isScalarType(type)||isEnumType(type)}function assertLeafType(type){if(!isLeafType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL leaf type."));return type}function isCompositeType(type){return isObjectType(type)||isInterfaceType(type)||isUnionType(type)}function assertCompositeType(type){if(!isCompositeType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL composite type."));return type}function isAbstractType(type){return isInterfaceType(type)||isUnionType(type)}function assertAbstractType(type){if(!isAbstractType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL abstract type."));return type}function GraphQLList(ofType){if(!(this instanceof GraphQLList))return new GraphQLList(ofType);this.ofType=assertType(ofType)}function GraphQLNonNull(ofType){if(!(this instanceof GraphQLNonNull))return new GraphQLNonNull(ofType);this.ofType=assertNullableType(ofType)}function isWrappingType(type){return isListType(type)||isNonNullType(type)}function assertWrappingType(type){if(!isWrappingType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL wrapping type."));return type}function isNullableType(type){return isType(type)&&!isNonNullType(type)}function assertNullableType(type){if(!isNullableType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL nullable type."));return type}function getNullableType(type){if(type)return isNonNullType(type)?type.ofType:type}function isNamedType(type){return isScalarType(type)||isObjectType(type)||isInterfaceType(type)||isUnionType(type)||isEnumType(type)||isInputObjectType(type)}function assertNamedType(type){if(!isNamedType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL named type."));return type}function definition_getNamedType(type){if(type){for(var unwrappedType=type;isWrappingType(unwrappedType);)unwrappedType=unwrappedType.ofType;return unwrappedType}}function resolveThunk(thunk){return"function"==typeof thunk?thunk():thunk}function undefineIfEmpty(arr){return arr&&arr.length>0?arr:void 0}GraphQLList.prototype.toString=function(){return"["+String(this.ofType)+"]"},GraphQLList.prototype.toJSON=function(){return this.toString()},Object.defineProperty(GraphQLList.prototype,SYMBOL_TO_STRING_TAG,{get:function(){return"GraphQLList"}}),defineInspect(GraphQLList),GraphQLNonNull.prototype.toString=function(){return String(this.ofType)+"!"},GraphQLNonNull.prototype.toJSON=function(){return this.toString()},Object.defineProperty(GraphQLNonNull.prototype,SYMBOL_TO_STRING_TAG,{get:function(){return"GraphQLNonNull"}}),defineInspect(GraphQLNonNull);var definition_GraphQLScalarType=function(){function GraphQLScalarType(config){var _config$parseValue,_config$serialize,_config$parseLiteral,parseValue=null!=(_config$parseValue=config.parseValue)?_config$parseValue:identityFunc;this.name=config.name,this.description=config.description,this.specifiedByUrl=config.specifiedByUrl,this.serialize=null!=(_config$serialize=config.serialize)?_config$serialize:identityFunc,this.parseValue=parseValue,this.parseLiteral=null!=(_config$parseLiteral=config.parseLiteral)?_config$parseLiteral:function(node,variables){return parseValue(valueFromASTUntyped(node,variables))},this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,this.extensionASTNodes=undefineIfEmpty(config.extensionASTNodes),"string"==typeof config.name||devAssert(0,"Must provide name."),null==config.specifiedByUrl||"string"==typeof config.specifiedByUrl||devAssert(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(inspect(config.specifiedByUrl),".")),null==config.serialize||"function"==typeof config.serialize||devAssert(0,"".concat(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.')),config.parseLiteral&&("function"==typeof config.parseValue&&"function"==typeof config.parseLiteral||devAssert(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var _proto=GraphQLScalarType.prototype;return _proto.toConfig=function(){var _this$extensionASTNod;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:null!=(_this$extensionASTNod=this.extensionASTNodes)?_this$extensionASTNod:[]}},_proto.toString=function(){return this.name},_proto.toJSON=function(){return this.toString()},definition_createClass(GraphQLScalarType,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLScalarType"}}]),GraphQLScalarType}();defineInspect(definition_GraphQLScalarType);var definition_GraphQLObjectType=function(){function GraphQLObjectType(config){this.name=config.name,this.description=config.description,this.isTypeOf=config.isTypeOf,this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,this.extensionASTNodes=undefineIfEmpty(config.extensionASTNodes),this._fields=defineFieldMap.bind(void 0,config),this._interfaces=defineInterfaces.bind(void 0,config),"string"==typeof config.name||devAssert(0,"Must provide name."),null==config.isTypeOf||"function"==typeof config.isTypeOf||devAssert(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(inspect(config.isTypeOf),"."))}var _proto2=GraphQLObjectType.prototype;return _proto2.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},_proto2.getInterfaces=function(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},_proto2.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:fieldsToFieldsConfig(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},_proto2.toString=function(){return this.name},_proto2.toJSON=function(){return this.toString()},definition_createClass(GraphQLObjectType,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLObjectType"}}]),GraphQLObjectType}();function defineInterfaces(config){var _resolveThunk,interfaces=null!=(_resolveThunk=resolveThunk(config.interfaces))?_resolveThunk:[];return Array.isArray(interfaces)||devAssert(0,"".concat(config.name," interfaces must be an Array or a function which returns an Array.")),interfaces}function defineFieldMap(config){var fieldMap=resolveThunk(config.fields);return isPlainObj(fieldMap)||devAssert(0,"".concat(config.name," fields must be an object with field names as keys or a function which returns such an object.")),mapValue(fieldMap,function(fieldConfig,fieldName){isPlainObj(fieldConfig)||devAssert(0,"".concat(config.name,".").concat(fieldName," field config must be an object.")),"isDeprecated"in fieldConfig&&devAssert(0,"".concat(config.name,".").concat(fieldName,' should provide "deprecationReason" instead of "isDeprecated".')),null==fieldConfig.resolve||"function"==typeof fieldConfig.resolve||devAssert(0,"".concat(config.name,".").concat(fieldName," field resolver must be a function if ")+"provided, but got: ".concat(inspect(fieldConfig.resolve),"."));var _fieldConfig$args,argsConfig=null!=(_fieldConfig$args=fieldConfig.args)?_fieldConfig$args:{};isPlainObj(argsConfig)||devAssert(0,"".concat(config.name,".").concat(fieldName," args must be an object with argument names as keys."));var args=objectEntries(argsConfig).map(function(_ref){var argName=_ref[0],argConfig=_ref[1];return{name:argName,description:argConfig.description,type:argConfig.type,defaultValue:argConfig.defaultValue,deprecationReason:argConfig.deprecationReason,extensions:argConfig.extensions&&toObjMap(argConfig.extensions),astNode:argConfig.astNode}});return{name:fieldName,description:fieldConfig.description,type:fieldConfig.type,args:args,resolve:fieldConfig.resolve,subscribe:fieldConfig.subscribe,isDeprecated:null!=fieldConfig.deprecationReason,deprecationReason:fieldConfig.deprecationReason,extensions:fieldConfig.extensions&&toObjMap(fieldConfig.extensions),astNode:fieldConfig.astNode}})}function isPlainObj(obj){return isObjectLike(obj)&&!Array.isArray(obj)}function fieldsToFieldsConfig(fields){return mapValue(fields,function(field){return{description:field.description,type:field.type,args:argsToArgsConfig(field.args),resolve:field.resolve,subscribe:field.subscribe,deprecationReason:field.deprecationReason,extensions:field.extensions,astNode:field.astNode}})}function argsToArgsConfig(args){return keyValMap(args,function(arg){return arg.name},function(arg){return{description:arg.description,type:arg.type,defaultValue:arg.defaultValue,deprecationReason:arg.deprecationReason,extensions:arg.extensions,astNode:arg.astNode}})}function isRequiredArgument(arg){return isNonNullType(arg.type)&&void 0===arg.defaultValue}defineInspect(definition_GraphQLObjectType);var definition_GraphQLInterfaceType=function(){function GraphQLInterfaceType(config){this.name=config.name,this.description=config.description,this.resolveType=config.resolveType,this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,this.extensionASTNodes=undefineIfEmpty(config.extensionASTNodes),this._fields=defineFieldMap.bind(void 0,config),this._interfaces=defineInterfaces.bind(void 0,config),"string"==typeof config.name||devAssert(0,"Must provide name."),null==config.resolveType||"function"==typeof config.resolveType||devAssert(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(inspect(config.resolveType),"."))}var _proto3=GraphQLInterfaceType.prototype;return _proto3.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},_proto3.getInterfaces=function(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},_proto3.toConfig=function(){var _this$extensionASTNod2;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:fieldsToFieldsConfig(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!=(_this$extensionASTNod2=this.extensionASTNodes)?_this$extensionASTNod2:[]}},_proto3.toString=function(){return this.name},_proto3.toJSON=function(){return this.toString()},definition_createClass(GraphQLInterfaceType,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLInterfaceType"}}]),GraphQLInterfaceType}();defineInspect(definition_GraphQLInterfaceType);var definition_GraphQLUnionType=function(){function GraphQLUnionType(config){this.name=config.name,this.description=config.description,this.resolveType=config.resolveType,this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,this.extensionASTNodes=undefineIfEmpty(config.extensionASTNodes),this._types=defineTypes.bind(void 0,config),"string"==typeof config.name||devAssert(0,"Must provide name."),null==config.resolveType||"function"==typeof config.resolveType||devAssert(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(inspect(config.resolveType),"."))}var _proto4=GraphQLUnionType.prototype;return _proto4.getTypes=function(){return"function"==typeof this._types&&(this._types=this._types()),this._types},_proto4.toConfig=function(){var _this$extensionASTNod3;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!=(_this$extensionASTNod3=this.extensionASTNodes)?_this$extensionASTNod3:[]}},_proto4.toString=function(){return this.name},_proto4.toJSON=function(){return this.toString()},definition_createClass(GraphQLUnionType,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLUnionType"}}]),GraphQLUnionType}();function defineTypes(config){var types=resolveThunk(config.types);return Array.isArray(types)||devAssert(0,"Must provide Array of types or a function which returns such an array for Union ".concat(config.name,".")),types}defineInspect(definition_GraphQLUnionType);var definition_GraphQLEnumType=function(){function GraphQLEnumType(config){var typeName,valueMap;this.name=config.name,this.description=config.description,this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,this.extensionASTNodes=undefineIfEmpty(config.extensionASTNodes),this._values=(typeName=this.name,isPlainObj(valueMap=config.values)||devAssert(0,"".concat(typeName," values must be an object with value names as keys.")),objectEntries(valueMap).map(function(_ref2){var valueName=_ref2[0],valueConfig=_ref2[1];return isPlainObj(valueConfig)||devAssert(0,"".concat(typeName,".").concat(valueName,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(inspect(valueConfig),".")),"isDeprecated"in valueConfig&&devAssert(0,"".concat(typeName,".").concat(valueName,' should provide "deprecationReason" instead of "isDeprecated".')),{name:valueName,description:valueConfig.description,value:void 0!==valueConfig.value?valueConfig.value:valueName,isDeprecated:null!=valueConfig.deprecationReason,deprecationReason:valueConfig.deprecationReason,extensions:valueConfig.extensions&&toObjMap(valueConfig.extensions),astNode:valueConfig.astNode}})),this._valueLookup=new Map(this._values.map(function(enumValue){return[enumValue.value,enumValue]})),this._nameLookup=keyMap(this._values,function(value1){return value1.name}),"string"==typeof config.name||devAssert(0,"Must provide name.")}var _proto5=GraphQLEnumType.prototype;return _proto5.getValues=function(){return this._values},_proto5.getValue=function(name){return this._nameLookup[name]},_proto5.serialize=function(outputValue){var enumValue=this._valueLookup.get(outputValue);if(void 0===enumValue)throw new GraphQLError_GraphQLError('Enum "'.concat(this.name,'" cannot represent value: ').concat(inspect(outputValue)));return enumValue.name},_proto5.parseValue=function(inputValue){if("string"!=typeof inputValue){var valueStr=inspect(inputValue);throw new GraphQLError_GraphQLError('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(valueStr,".")+didYouMeanEnumValue(this,valueStr))}var enumValue=this.getValue(inputValue);if(null==enumValue)throw new GraphQLError_GraphQLError('Value "'.concat(inputValue,'" does not exist in "').concat(this.name,'" enum.')+didYouMeanEnumValue(this,inputValue));return enumValue.value},_proto5.parseLiteral=function(valueNode,_variables){if(valueNode.kind!==Kind.ENUM){var valueStr=print(valueNode);throw new GraphQLError_GraphQLError('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(valueStr,".")+didYouMeanEnumValue(this,valueStr),valueNode)}var enumValue=this.getValue(valueNode.value);if(null==enumValue){var _valueStr=print(valueNode);throw new GraphQLError_GraphQLError('Value "'.concat(_valueStr,'" does not exist in "').concat(this.name,'" enum.')+didYouMeanEnumValue(this,_valueStr),valueNode)}return enumValue.value},_proto5.toConfig=function(){var _this$extensionASTNod4,values=keyValMap(this.getValues(),function(value1){return value1.name},function(value1){return{description:value1.description,value:value1.value,deprecationReason:value1.deprecationReason,extensions:value1.extensions,astNode:value1.astNode}});return{name:this.name,description:this.description,values:values,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!=(_this$extensionASTNod4=this.extensionASTNodes)?_this$extensionASTNod4:[]}},_proto5.toString=function(){return this.name},_proto5.toJSON=function(){return this.toString()},definition_createClass(GraphQLEnumType,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLEnumType"}}]),GraphQLEnumType}();function didYouMeanEnumValue(enumType,unknownValueStr){return didYouMean("the enum value",suggestionList(unknownValueStr,enumType.getValues().map(function(value1){return value1.name})))}defineInspect(definition_GraphQLEnumType);var definition_GraphQLInputObjectType=function(){function GraphQLInputObjectType(config){this.name=config.name,this.description=config.description,this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,this.extensionASTNodes=undefineIfEmpty(config.extensionASTNodes),this._fields=defineInputFieldMap.bind(void 0,config),"string"==typeof config.name||devAssert(0,"Must provide name.")}var _proto6=GraphQLInputObjectType.prototype;return _proto6.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},_proto6.toConfig=function(){var _this$extensionASTNod5,fields=mapValue(this.getFields(),function(field){return{description:field.description,type:field.type,defaultValue:field.defaultValue,deprecationReason:field.deprecationReason,extensions:field.extensions,astNode:field.astNode}});return{name:this.name,description:this.description,fields:fields,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!=(_this$extensionASTNod5=this.extensionASTNodes)?_this$extensionASTNod5:[]}},_proto6.toString=function(){return this.name},_proto6.toJSON=function(){return this.toString()},definition_createClass(GraphQLInputObjectType,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLInputObjectType"}}]),GraphQLInputObjectType}();function defineInputFieldMap(config){var fieldMap=resolveThunk(config.fields);return isPlainObj(fieldMap)||devAssert(0,"".concat(config.name," fields must be an object with field names as keys or a function which returns such an object.")),mapValue(fieldMap,function(fieldConfig,fieldName){return"resolve"in fieldConfig&&devAssert(0,"".concat(config.name,".").concat(fieldName," field has a resolve property, but Input Types cannot define resolvers.")),{name:fieldName,description:fieldConfig.description,type:fieldConfig.type,defaultValue:fieldConfig.defaultValue,deprecationReason:fieldConfig.deprecationReason,extensions:fieldConfig.extensions&&toObjMap(fieldConfig.extensions),astNode:fieldConfig.astNode}})}function isRequiredInputField(field){return isNonNullType(field.type)&&void 0===field.defaultValue}function isEqualType(typeA,typeB){return typeA===typeB||!!(isNonNullType(typeA)&&isNonNullType(typeB)||isListType(typeA)&&isListType(typeB))&&isEqualType(typeA.ofType,typeB.ofType)}function isTypeSubTypeOf(schema,maybeSubType,superType){return maybeSubType===superType||(isNonNullType(superType)?!!isNonNullType(maybeSubType)&&isTypeSubTypeOf(schema,maybeSubType.ofType,superType.ofType):isNonNullType(maybeSubType)?isTypeSubTypeOf(schema,maybeSubType.ofType,superType):isListType(superType)?!!isListType(maybeSubType)&&isTypeSubTypeOf(schema,maybeSubType.ofType,superType.ofType):!isListType(maybeSubType)&&isAbstractType(superType)&&(isInterfaceType(maybeSubType)||isObjectType(maybeSubType))&&schema.isSubType(superType,maybeSubType))}function doTypesOverlap(schema,typeA,typeB){return typeA===typeB||(isAbstractType(typeA)?isAbstractType(typeB)?schema.getPossibleTypes(typeA).some(function(type){return schema.isSubType(typeB,type)}):schema.isSubType(typeA,typeB):!!isAbstractType(typeB)&&schema.isSubType(typeB,typeA))}defineInspect(definition_GraphQLInputObjectType);var arrayFrom=Array.from||function(obj,mapFn,thisArg){if(null==obj)throw TypeError("Array.from requires an array-like object - not null or undefined");var iteratorMethod=obj[SYMBOL_ITERATOR];if("function"==typeof iteratorMethod){for(var step,iterator=iteratorMethod.call(obj),result=[],i=0;!(step=iterator.next()).done;++i)if(result.push(mapFn.call(thisArg,step.value,i)),i>9999999)throw TypeError("Near-infinite iteration.");return result}var length=obj.length;if("number"==typeof length&&length>=0&&length%1===0){for(var _result=[],_i=0;_i<length;++_i)Object.prototype.hasOwnProperty.call(obj,_i)&&_result.push(mapFn.call(thisArg,obj[_i],_i));return _result}return[]},isFinitePolyfill=Number.isFinite||function(value1){return"number"==typeof value1&&isFinite(value1)};function safeArrayFrom_typeof(obj){return(safeArrayFrom_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function safeArrayFrom(collection){var mapFn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(item){return item};if(null==collection||"object"!==safeArrayFrom_typeof(collection))return null;if(Array.isArray(collection))return collection.map(mapFn);var iteratorMethod=collection[SYMBOL_ITERATOR];if("function"==typeof iteratorMethod){for(var step,iterator=iteratorMethod.call(collection),result=[],i=0;!(step=iterator.next()).done;++i)result.push(mapFn(step.value,i));return result}var length=collection.length;if("number"==typeof length&&length>=0&&length%1===0){for(var _result=[],_i=0;_i<length;++_i){if(!Object.prototype.hasOwnProperty.call(collection,_i))return null;_result.push(mapFn(collection[String(_i)],_i))}return _result}return null}var isInteger=Number.isInteger||function(value1){return"number"==typeof value1&&isFinite(value1)&&Math.floor(value1)===value1},GraphQLInt=new definition_GraphQLScalarType({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize:function(outputValue){var coercedValue=serializeObject(outputValue);if("boolean"==typeof coercedValue)return+!!coercedValue;var num=coercedValue;if("string"==typeof coercedValue&&""!==coercedValue&&(num=Number(coercedValue)),!isInteger(num))throw new GraphQLError_GraphQLError("Int cannot represent non-integer value: ".concat(inspect(coercedValue)));if(num>0x7fffffff||num<-0x80000000)throw new GraphQLError_GraphQLError("Int cannot represent non 32-bit signed integer value: "+inspect(coercedValue));return num},parseValue:function(inputValue){if(!isInteger(inputValue))throw new GraphQLError_GraphQLError("Int cannot represent non-integer value: ".concat(inspect(inputValue)));if(inputValue>0x7fffffff||inputValue<-0x80000000)throw new GraphQLError_GraphQLError("Int cannot represent non 32-bit signed integer value: ".concat(inputValue));return inputValue},parseLiteral:function(valueNode){if(valueNode.kind!==Kind.INT)throw new GraphQLError_GraphQLError("Int cannot represent non-integer value: ".concat(print(valueNode)),valueNode);var num=parseInt(valueNode.value,10);if(num>0x7fffffff||num<-0x80000000)throw new GraphQLError_GraphQLError("Int cannot represent non 32-bit signed integer value: ".concat(valueNode.value),valueNode);return num}}),GraphQLFloat=new definition_GraphQLScalarType({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:function(outputValue){var coercedValue=serializeObject(outputValue);if("boolean"==typeof coercedValue)return+!!coercedValue;var num=coercedValue;if("string"==typeof coercedValue&&""!==coercedValue&&(num=Number(coercedValue)),!isFinitePolyfill(num))throw new GraphQLError_GraphQLError("Float cannot represent non numeric value: ".concat(inspect(coercedValue)));return num},parseValue:function(inputValue){if(!isFinitePolyfill(inputValue))throw new GraphQLError_GraphQLError("Float cannot represent non numeric value: ".concat(inspect(inputValue)));return inputValue},parseLiteral:function(valueNode){if(valueNode.kind!==Kind.FLOAT&&valueNode.kind!==Kind.INT)throw new GraphQLError_GraphQLError("Float cannot represent non numeric value: ".concat(print(valueNode)),valueNode);return parseFloat(valueNode.value)}});function serializeObject(outputValue){if(isObjectLike(outputValue)){if("function"==typeof outputValue.valueOf){var valueOfResult=outputValue.valueOf();if(!isObjectLike(valueOfResult))return valueOfResult}if("function"==typeof outputValue.toJSON)return outputValue.toJSON()}return outputValue}var GraphQLString=new definition_GraphQLScalarType({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:function(outputValue){var coercedValue=serializeObject(outputValue);if("string"==typeof coercedValue)return coercedValue;if("boolean"==typeof coercedValue)return coercedValue?"true":"false";if(isFinitePolyfill(coercedValue))return coercedValue.toString();throw new GraphQLError_GraphQLError("String cannot represent value: ".concat(inspect(outputValue)))},parseValue:function(inputValue){if("string"!=typeof inputValue)throw new GraphQLError_GraphQLError("String cannot represent a non string value: ".concat(inspect(inputValue)));return inputValue},parseLiteral:function(valueNode){if(valueNode.kind!==Kind.STRING)throw new GraphQLError_GraphQLError("String cannot represent a non string value: ".concat(print(valueNode)),valueNode);return valueNode.value}}),GraphQLBoolean=new definition_GraphQLScalarType({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:function(outputValue){var coercedValue=serializeObject(outputValue);if("boolean"==typeof coercedValue)return coercedValue;if(isFinitePolyfill(coercedValue))return 0!==coercedValue;throw new GraphQLError_GraphQLError("Boolean cannot represent a non boolean value: ".concat(inspect(coercedValue)))},parseValue:function(inputValue){if("boolean"!=typeof inputValue)throw new GraphQLError_GraphQLError("Boolean cannot represent a non boolean value: ".concat(inspect(inputValue)));return inputValue},parseLiteral:function(valueNode){if(valueNode.kind!==Kind.BOOLEAN)throw new GraphQLError_GraphQLError("Boolean cannot represent a non boolean value: ".concat(print(valueNode)),valueNode);return valueNode.value}}),GraphQLID=new definition_GraphQLScalarType({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:function(outputValue){var coercedValue=serializeObject(outputValue);if("string"==typeof coercedValue)return coercedValue;if(isInteger(coercedValue))return String(coercedValue);throw new GraphQLError_GraphQLError("ID cannot represent value: ".concat(inspect(outputValue)))},parseValue:function(inputValue){if("string"==typeof inputValue)return inputValue;if(isInteger(inputValue))return inputValue.toString();throw new GraphQLError_GraphQLError("ID cannot represent value: ".concat(inspect(inputValue)))},parseLiteral:function(valueNode){if(valueNode.kind!==Kind.STRING&&valueNode.kind!==Kind.INT)throw new GraphQLError_GraphQLError("ID cannot represent a non-string and non-integer value: "+print(valueNode),valueNode);return valueNode.value}}),specifiedScalarTypes=Object.freeze([GraphQLString,GraphQLInt,GraphQLFloat,GraphQLBoolean,GraphQLID]);function isSpecifiedScalarType(type){return specifiedScalarTypes.some(function(_ref){var name=_ref.name;return type.name===name})}function astFromValue(value1,type){if(isNonNullType(type)){var astValue=astFromValue(value1,type.ofType);return(null==astValue?void 0:astValue.kind)===Kind.NULL?null:astValue}if(null===value1)return{kind:Kind.NULL};if(void 0===value1)return null;if(isListType(type)){var itemType=type.ofType,items=safeArrayFrom(value1);if(null!=items){for(var valuesNodes=[],_i2=0;_i2<items.length;_i2++){var itemNode=astFromValue(items[_i2],itemType);null!=itemNode&&valuesNodes.push(itemNode)}return{kind:Kind.LIST,values:valuesNodes}}return astFromValue(value1,itemType)}if(isInputObjectType(type)){if(!isObjectLike(value1))return null;for(var fieldNodes=[],_i4=0,_objectValues2=objectValues(type.getFields());_i4<_objectValues2.length;_i4++){var field=_objectValues2[_i4],fieldValue=astFromValue(value1[field.name],field.type);fieldValue&&fieldNodes.push({kind:Kind.OBJECT_FIELD,name:{kind:Kind.NAME,value:field.name},value:fieldValue})}return{kind:Kind.OBJECT,fields:fieldNodes}}if(isLeafType(type)){var serialized=type.serialize(value1);if(null==serialized)return null;if("boolean"==typeof serialized)return{kind:Kind.BOOLEAN,value:serialized};if("number"==typeof serialized&&isFinitePolyfill(serialized)){var stringNum=String(serialized);return integerStringRegExp.test(stringNum)?{kind:Kind.INT,value:stringNum}:{kind:Kind.FLOAT,value:stringNum}}if("string"==typeof serialized)return isEnumType(type)?{kind:Kind.ENUM,value:serialized}:type===GraphQLID&&integerStringRegExp.test(serialized)?{kind:Kind.INT,value:serialized}:{kind:Kind.STRING,value:serialized};throw TypeError("Cannot convert value to AST: ".concat(inspect(serialized),"."))}invariant(0,"Unexpected input type: "+inspect(type))}var integerStringRegExp=/^-?(?:0|[1-9][0-9]*)$/,__Schema=new definition_GraphQLObjectType({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{description:{type:GraphQLString,resolve:function(schema){return schema.description}},types:{description:"A list of all types supported by this server.",type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Type))),resolve:function(schema){return objectValues(schema.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new GraphQLNonNull(__Type),resolve:function(schema){return schema.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:__Type,resolve:function(schema){return schema.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:__Type,resolve:function(schema){return schema.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Directive))),resolve:function(schema){return schema.getDirectives()}}}}}),__Directive=new definition_GraphQLObjectType({name:"__Directive",description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:function(){return{name:{type:new GraphQLNonNull(GraphQLString),resolve:function(directive){return directive.name}},description:{type:GraphQLString,resolve:function(directive){return directive.description}},isRepeatable:{type:new GraphQLNonNull(GraphQLBoolean),resolve:function(directive){return directive.isRepeatable}},locations:{type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__DirectiveLocation))),resolve:function(directive){return directive.locations}},args:{type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__InputValue))),args:{includeDeprecated:{type:GraphQLBoolean,defaultValue:!1}},resolve:function(field,_ref){return _ref.includeDeprecated?field.args:field.args.filter(function(arg){return null==arg.deprecationReason})}}}}}),__DirectiveLocation=new definition_GraphQLEnumType({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),__Type=new definition_GraphQLObjectType({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:new GraphQLNonNull(__TypeKind),resolve:function(type){return isScalarType(type)?TypeKind.SCALAR:isObjectType(type)?TypeKind.OBJECT:isInterfaceType(type)?TypeKind.INTERFACE:isUnionType(type)?TypeKind.UNION:isEnumType(type)?TypeKind.ENUM:isInputObjectType(type)?TypeKind.INPUT_OBJECT:isListType(type)?TypeKind.LIST:isNonNullType(type)?TypeKind.NON_NULL:void invariant(0,'Unexpected type: "'.concat(inspect(type),'".'))}},name:{type:GraphQLString,resolve:function(type){return void 0!==type.name?type.name:void 0}},description:{type:GraphQLString,resolve:function(type){return void 0!==type.description?type.description:void 0}},specifiedByUrl:{type:GraphQLString,resolve:function(obj){return void 0!==obj.specifiedByUrl?obj.specifiedByUrl:void 0}},fields:{type:new GraphQLList(new GraphQLNonNull(__Field)),args:{includeDeprecated:{type:GraphQLBoolean,defaultValue:!1}},resolve:function(type,_ref2){var includeDeprecated=_ref2.includeDeprecated;if(isObjectType(type)||isInterfaceType(type)){var fields=objectValues(type.getFields());return includeDeprecated?fields:fields.filter(function(field){return null==field.deprecationReason})}}},interfaces:{type:new GraphQLList(new GraphQLNonNull(__Type)),resolve:function(type){if(isObjectType(type)||isInterfaceType(type))return type.getInterfaces()}},possibleTypes:{type:new GraphQLList(new GraphQLNonNull(__Type)),resolve:function(type,_args,_context,_ref3){var schema=_ref3.schema;if(isAbstractType(type))return schema.getPossibleTypes(type)}},enumValues:{type:new GraphQLList(new GraphQLNonNull(__EnumValue)),args:{includeDeprecated:{type:GraphQLBoolean,defaultValue:!1}},resolve:function(type,_ref4){var includeDeprecated=_ref4.includeDeprecated;if(isEnumType(type)){var values=type.getValues();return includeDeprecated?values:values.filter(function(field){return null==field.deprecationReason})}}},inputFields:{type:new GraphQLList(new GraphQLNonNull(__InputValue)),args:{includeDeprecated:{type:GraphQLBoolean,defaultValue:!1}},resolve:function(type,_ref5){var includeDeprecated=_ref5.includeDeprecated;if(isInputObjectType(type)){var values=objectValues(type.getFields());return includeDeprecated?values:values.filter(function(field){return null==field.deprecationReason})}}},ofType:{type:__Type,resolve:function(type){return void 0!==type.ofType?type.ofType:void 0}}}}}),__Field=new definition_GraphQLObjectType({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:new GraphQLNonNull(GraphQLString),resolve:function(field){return field.name}},description:{type:GraphQLString,resolve:function(field){return field.description}},args:{type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__InputValue))),args:{includeDeprecated:{type:GraphQLBoolean,defaultValue:!1}},resolve:function(field,_ref6){return _ref6.includeDeprecated?field.args:field.args.filter(function(arg){return null==arg.deprecationReason})}},type:{type:new GraphQLNonNull(__Type),resolve:function(field){return field.type}},isDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),resolve:function(field){return null!=field.deprecationReason}},deprecationReason:{type:GraphQLString,resolve:function(field){return field.deprecationReason}}}}}),__InputValue=new definition_GraphQLObjectType({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:new GraphQLNonNull(GraphQLString),resolve:function(inputValue){return inputValue.name}},description:{type:GraphQLString,resolve:function(inputValue){return inputValue.description}},type:{type:new GraphQLNonNull(__Type),resolve:function(inputValue){return inputValue.type}},defaultValue:{type:GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(inputValue){var type=inputValue.type,valueAST=astFromValue(inputValue.defaultValue,type);return valueAST?print(valueAST):null}},isDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),resolve:function(field){return null!=field.deprecationReason}},deprecationReason:{type:GraphQLString,resolve:function(obj){return obj.deprecationReason}}}}}),__EnumValue=new definition_GraphQLObjectType({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:function(){return{name:{type:new GraphQLNonNull(GraphQLString),resolve:function(enumValue){return enumValue.name}},description:{type:GraphQLString,resolve:function(enumValue){return enumValue.description}},isDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),resolve:function(enumValue){return null!=enumValue.deprecationReason}},deprecationReason:{type:GraphQLString,resolve:function(enumValue){return enumValue.deprecationReason}}}}}),TypeKind=Object.freeze({SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"}),__TypeKind=new definition_GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:TypeKind.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:TypeKind.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:TypeKind.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:TypeKind.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:TypeKind.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:TypeKind.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:TypeKind.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:TypeKind.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),SchemaMetaFieldDef={name:"__schema",type:new GraphQLNonNull(__Schema),description:"Access the current type schema of this server.",args:[],resolve:function(_source,_args,_context,_ref7){return _ref7.schema},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},TypeMetaFieldDef={name:"__type",type:__Type,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new GraphQLNonNull(GraphQLString),defaultValue:void 0,deprecationReason:void 0,extensions:void 0,astNode:void 0}],resolve:function(_source,_ref8,_context,_ref9){var name=_ref8.name;return _ref9.schema.getType(name)},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},TypeNameMetaFieldDef={name:"__typename",type:new GraphQLNonNull(GraphQLString),description:"The name of the current Object type at runtime.",args:[],resolve:function(_source,_args,_context,_ref10){return _ref10.parentType.name},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},introspectionTypes=Object.freeze([__Schema,__Directive,__DirectiveLocation,__Type,__Field,__InputValue,__EnumValue,__TypeKind]);function isIntrospectionType(type){return introspectionTypes.some(function(_ref11){var name=_ref11.name;return type.name===name})}function isDirective(directive){return jsutils_instanceOf(directive,directives_GraphQLDirective)}function assertDirective(directive){if(!isDirective(directive))throw Error("Expected ".concat(inspect(directive)," to be a GraphQL directive."));return directive}var directives_GraphQLDirective=function(){function GraphQLDirective(config){this.name=config.name,this.description=config.description,this.locations=config.locations,this.isRepeatable=null!=(_config$isRepeatable=config.isRepeatable)&&_config$isRepeatable,this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,config.name||devAssert(0,"Directive must be named."),Array.isArray(config.locations)||devAssert(0,"@".concat(config.name," locations must be an Array."));var _config$isRepeatable,_config$args,args=null!=(_config$args=config.args)?_config$args:{};isObjectLike(args)&&!Array.isArray(args)||devAssert(0,"@".concat(config.name," args must be an object with argument names as keys.")),this.args=objectEntries(args).map(function(_ref){var argName=_ref[0],argConfig=_ref[1];return{name:argName,description:argConfig.description,type:argConfig.type,defaultValue:argConfig.defaultValue,deprecationReason:argConfig.deprecationReason,extensions:argConfig.extensions&&toObjMap(argConfig.extensions),astNode:argConfig.astNode}})}var protoProps,_proto=GraphQLDirective.prototype;return _proto.toConfig=function(){return{name:this.name,description:this.description,locations:this.locations,args:argsToArgsConfig(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}},_proto.toString=function(){return"@"+this.name},_proto.toJSON=function(){return this.toString()},protoProps=[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLDirective"}}],function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}(GraphQLDirective.prototype,protoProps),GraphQLDirective}();defineInspect(directives_GraphQLDirective);var GraphQLIncludeDirective=new directives_GraphQLDirective({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[DirectiveLocation.FIELD,DirectiveLocation.FRAGMENT_SPREAD,DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new GraphQLNonNull(GraphQLBoolean),description:"Included when true."}}}),GraphQLSkipDirective=new directives_GraphQLDirective({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[DirectiveLocation.FIELD,DirectiveLocation.FRAGMENT_SPREAD,DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new GraphQLNonNull(GraphQLBoolean),description:"Skipped when true."}}}),DEFAULT_DEPRECATION_REASON="No longer supported",GraphQLDeprecatedDirective=new directives_GraphQLDirective({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[DirectiveLocation.FIELD_DEFINITION,DirectiveLocation.ARGUMENT_DEFINITION,DirectiveLocation.INPUT_FIELD_DEFINITION,DirectiveLocation.ENUM_VALUE],args:{reason:{type:GraphQLString,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:DEFAULT_DEPRECATION_REASON}}}),GraphQLSpecifiedByDirective=new directives_GraphQLDirective({name:"specifiedBy",description:"Exposes a URL that specifies the behaviour of this scalar.",locations:[DirectiveLocation.SCALAR],args:{url:{type:new GraphQLNonNull(GraphQLString),description:"The URL that specifies the behaviour of this scalar."}}}),specifiedDirectives=Object.freeze([GraphQLIncludeDirective,GraphQLSkipDirective,GraphQLDeprecatedDirective,GraphQLSpecifiedByDirective]);function isSpecifiedDirective(directive){return specifiedDirectives.some(function(_ref2){return _ref2.name===directive.name})}function isSchema(schema){return jsutils_instanceOf(schema,schema_GraphQLSchema)}function assertSchema(schema){if(!isSchema(schema))throw Error("Expected ".concat(inspect(schema)," to be a GraphQL schema."));return schema}var schema_GraphQLSchema=function(){function GraphQLSchema(config){this.__validationErrors=!0===config.assumeValid?[]:void 0,isObjectLike(config)||devAssert(0,"Must provide configuration object."),!config.types||Array.isArray(config.types)||devAssert(0,'"types" must be Array if provided but got: '.concat(inspect(config.types),".")),!config.directives||Array.isArray(config.directives)||devAssert(0,'"directives" must be Array if provided but got: '+"".concat(inspect(config.directives),".")),this.description=config.description,this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,this.extensionASTNodes=config.extensionASTNodes,this._queryType=config.query,this._mutationType=config.mutation,this._subscriptionType=config.subscription,this._directives=null!=(_config$directives=config.directives)?_config$directives:specifiedDirectives;var _config$directives,allReferencedTypes=new Set(config.types);if(null!=config.types)for(var _i2=0,_config$types2=config.types;_i2<_config$types2.length;_i2++){var type=_config$types2[_i2];allReferencedTypes.delete(type),collectReferencedTypes(type,allReferencedTypes)}null!=this._queryType&&collectReferencedTypes(this._queryType,allReferencedTypes),null!=this._mutationType&&collectReferencedTypes(this._mutationType,allReferencedTypes),null!=this._subscriptionType&&collectReferencedTypes(this._subscriptionType,allReferencedTypes);for(var _i4=0,_this$_directives2=this._directives;_i4<_this$_directives2.length;_i4++){var directive=_this$_directives2[_i4];if(isDirective(directive))for(var _i6=0,_directive$args2=directive.args;_i6<_directive$args2.length;_i6++)collectReferencedTypes(_directive$args2[_i6].type,allReferencedTypes)}collectReferencedTypes(__Schema,allReferencedTypes),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(var _i8=0,_arrayFrom2=arrayFrom(allReferencedTypes);_i8<_arrayFrom2.length;_i8++){var namedType=_arrayFrom2[_i8];if(null!=namedType){var typeName=namedType.name;if(typeName||devAssert(0,"One of the provided types for building the Schema is missing a name."),void 0!==this._typeMap[typeName])throw Error('Schema must contain uniquely named types but contains multiple types named "'.concat(typeName,'".'));if(this._typeMap[typeName]=namedType,isInterfaceType(namedType))for(var _i10=0,_namedType$getInterfa2=namedType.getInterfaces();_i10<_namedType$getInterfa2.length;_i10++){var iface=_namedType$getInterfa2[_i10];if(isInterfaceType(iface)){var implementations=this._implementationsMap[iface.name];void 0===implementations&&(implementations=this._implementationsMap[iface.name]={objects:[],interfaces:[]}),implementations.interfaces.push(namedType)}}else if(isObjectType(namedType))for(var _i12=0,_namedType$getInterfa4=namedType.getInterfaces();_i12<_namedType$getInterfa4.length;_i12++){var _iface=_namedType$getInterfa4[_i12];if(isInterfaceType(_iface)){var _implementations=this._implementationsMap[_iface.name];void 0===_implementations&&(_implementations=this._implementationsMap[_iface.name]={objects:[],interfaces:[]}),_implementations.objects.push(namedType)}}}}}var protoProps,_proto=GraphQLSchema.prototype;return _proto.getQueryType=function(){return this._queryType},_proto.getMutationType=function(){return this._mutationType},_proto.getSubscriptionType=function(){return this._subscriptionType},_proto.getTypeMap=function(){return this._typeMap},_proto.getType=function(name){return this.getTypeMap()[name]},_proto.getPossibleTypes=function(abstractType){return isUnionType(abstractType)?abstractType.getTypes():this.getImplementations(abstractType).objects},_proto.getImplementations=function(interfaceType){var implementations=this._implementationsMap[interfaceType.name];return null!=implementations?implementations:{objects:[],interfaces:[]}},_proto.isPossibleType=function(abstractType,possibleType){return this.isSubType(abstractType,possibleType)},_proto.isSubType=function(abstractType,maybeSubType){var map=this._subTypeMap[abstractType.name];if(void 0===map){if(map=Object.create(null),isUnionType(abstractType))for(var _i14=0,_abstractType$getType2=abstractType.getTypes();_i14<_abstractType$getType2.length;_i14++)map[_abstractType$getType2[_i14].name]=!0;else{for(var implementations=this.getImplementations(abstractType),_i16=0,_implementations$obje2=implementations.objects;_i16<_implementations$obje2.length;_i16++)map[_implementations$obje2[_i16].name]=!0;for(var _i18=0,_implementations$inte2=implementations.interfaces;_i18<_implementations$inte2.length;_i18++)map[_implementations$inte2[_i18].name]=!0}this._subTypeMap[abstractType.name]=map}return void 0!==map[maybeSubType.name]},_proto.getDirectives=function(){return this._directives},_proto.getDirective=function(name){return find(this.getDirectives(),function(directive){return directive.name===name})},_proto.toConfig=function(){var _this$extensionASTNod;return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:objectValues(this.getTypeMap()),directives:this.getDirectives().slice(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!=(_this$extensionASTNod=this.extensionASTNodes)?_this$extensionASTNod:[],assumeValid:void 0!==this.__validationErrors}},protoProps=[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLSchema"}}],function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}(GraphQLSchema.prototype,protoProps),GraphQLSchema}();function collectReferencedTypes(type,typeSet){var namedType=definition_getNamedType(type);if(!typeSet.has(namedType)){if(typeSet.add(namedType),isUnionType(namedType))for(var _i20=0,_namedType$getTypes2=namedType.getTypes();_i20<_namedType$getTypes2.length;_i20++)collectReferencedTypes(_namedType$getTypes2[_i20],typeSet);else if(isObjectType(namedType)||isInterfaceType(namedType)){for(var _i22=0,_namedType$getInterfa6=namedType.getInterfaces();_i22<_namedType$getInterfa6.length;_i22++)collectReferencedTypes(_namedType$getInterfa6[_i22],typeSet);for(var _i24=0,_objectValues2=objectValues(namedType.getFields());_i24<_objectValues2.length;_i24++){var field=_objectValues2[_i24];collectReferencedTypes(field.type,typeSet);for(var _i26=0,_field$args2=field.args;_i26<_field$args2.length;_i26++)collectReferencedTypes(_field$args2[_i26].type,typeSet)}}else if(isInputObjectType(namedType))for(var _i28=0,_objectValues4=objectValues(namedType.getFields());_i28<_objectValues4.length;_i28++)collectReferencedTypes(_objectValues4[_i28].type,typeSet)}return typeSet}function validateSchema(schema){if(assertSchema(schema),schema.__validationErrors)return schema.__validationErrors;var context,_getOperationTypeNode,_getOperationTypeNode2,_getOperationTypeNode3,schema1,queryType,mutationType,subscriptionType,context1=new validate_SchemaValidationContext(schema);(queryType=(schema1=(context=context1).schema).getQueryType())?isObjectType(queryType)||context.reportError("Query root type must be Object type, it cannot be ".concat(inspect(queryType),"."),null!=(_getOperationTypeNode=getOperationTypeNode(schema1,"query"))?_getOperationTypeNode:queryType.astNode):context.reportError("Query root type must be provided.",schema1.astNode),(mutationType=schema1.getMutationType())&&!isObjectType(mutationType)&&context.reportError("Mutation root type must be Object type if provided, it cannot be "+"".concat(inspect(mutationType),"."),null!=(_getOperationTypeNode2=getOperationTypeNode(schema1,"mutation"))?_getOperationTypeNode2:mutationType.astNode),(subscriptionType=schema1.getSubscriptionType())&&!isObjectType(subscriptionType)&&context.reportError("Subscription root type must be Object type if provided, it cannot be "+"".concat(inspect(subscriptionType),"."),null!=(_getOperationTypeNode3=getOperationTypeNode(schema1,"subscription"))?_getOperationTypeNode3:subscriptionType.astNode),function(context){for(var _i4=0,_context$schema$getDi2=context.schema.getDirectives();_i4<_context$schema$getDi2.length;_i4++){var directive=_context$schema$getDi2[_i4];if(!isDirective(directive)){context.reportError("Expected directive but got: ".concat(inspect(directive),"."),null==directive?void 0:directive.astNode);continue}validateName(context,directive);for(var _i6=0,_directive$args2=directive.args;_i6<_directive$args2.length;_i6++){var _arg$astNode,arg=_directive$args2[_i6];validateName(context,arg),isInputType(arg.type)||context.reportError("The type of @".concat(directive.name,"(").concat(arg.name,":) must be Input Type ")+"but got: ".concat(inspect(arg.type),"."),arg.astNode),isRequiredArgument(arg)&&null!=arg.deprecationReason&&context.reportError("Required argument @".concat(directive.name,"(").concat(arg.name,":) cannot be deprecated."),[getDeprecatedDirectiveNode(arg.astNode),null==(_arg$astNode=arg.astNode)?void 0:_arg$astNode.type])}}}(context1),function(context){for(var context1,visitedTypes,fieldPath,fieldPathIndexByTypeName,validateInputObjectCircularRefs=(context1=context,visitedTypes=Object.create(null),fieldPath=[],fieldPathIndexByTypeName=Object.create(null),function detectCycleRecursive(inputObj){if(!visitedTypes[inputObj.name]){visitedTypes[inputObj.name]=!0,fieldPathIndexByTypeName[inputObj.name]=fieldPath.length;for(var fields=objectValues(inputObj.getFields()),_i30=0;_i30<fields.length;_i30++){var field=fields[_i30];if(isNonNullType(field.type)&&isInputObjectType(field.type.ofType)){var fieldType=field.type.ofType,cycleIndex=fieldPathIndexByTypeName[fieldType.name];if(fieldPath.push(field),void 0===cycleIndex)detectCycleRecursive(fieldType);else{var cyclePath=fieldPath.slice(cycleIndex),pathStr=cyclePath.map(function(fieldObj){return fieldObj.name}).join(".");context1.reportError('Cannot reference Input Object "'.concat(fieldType.name,'" within itself through a series of non-null fields: "').concat(pathStr,'".'),cyclePath.map(function(fieldObj){return fieldObj.astNode}))}fieldPath.pop()}}fieldPathIndexByTypeName[inputObj.name]=void 0}}),typeMap=context.schema.getTypeMap(),_i8=0,_objectValues2=objectValues(typeMap);_i8<_objectValues2.length;_i8++){var type=_objectValues2[_i8];if(!isNamedType(type)){context.reportError("Expected GraphQL named type but got: ".concat(inspect(type),"."),type.astNode);continue}isIntrospectionType(type)||validateName(context,type),isObjectType(type)||isInterfaceType(type)?(function(context,type){var fields=objectValues(type.getFields());0===fields.length&&context.reportError("Type ".concat(type.name," must define one or more fields."),getAllNodes(type));for(var _i10=0;_i10<fields.length;_i10++){var field=fields[_i10];validateName(context,field),isOutputType(field.type)||context.reportError("The type of ".concat(type.name,".").concat(field.name," must be Output Type ")+"but got: ".concat(inspect(field.type),"."),null==(_field$astNode=field.astNode)?void 0:_field$astNode.type);for(var _i12=0,_field$args2=field.args;_i12<_field$args2.length;_i12++){var _field$astNode,_arg$astNode2,_arg$astNode3,arg=_field$args2[_i12],argName=arg.name;validateName(context,arg),isInputType(arg.type)||context.reportError("The type of ".concat(type.name,".").concat(field.name,"(").concat(argName,":) must be Input ")+"Type but got: ".concat(inspect(arg.type),"."),null==(_arg$astNode2=arg.astNode)?void 0:_arg$astNode2.type),isRequiredArgument(arg)&&null!=arg.deprecationReason&&context.reportError("Required argument ".concat(type.name,".").concat(field.name,"(").concat(argName,":) cannot be deprecated."),[getDeprecatedDirectiveNode(arg.astNode),null==(_arg$astNode3=arg.astNode)?void 0:_arg$astNode3.type])}}}(context,type),function(context,type){for(var ifaceTypeNames=Object.create(null),_i14=0,_type$getInterfaces2=type.getInterfaces();_i14<_type$getInterfaces2.length;_i14++){var iface=_type$getInterfaces2[_i14];if(!isInterfaceType(iface)){context.reportError("Type ".concat(inspect(type)," must only implement Interface types, ")+"it cannot implement ".concat(inspect(iface),"."),getAllImplementsInterfaceNodes(type,iface));continue}if(type===iface){context.reportError("Type ".concat(type.name," cannot implement itself because it would create a circular reference."),getAllImplementsInterfaceNodes(type,iface));continue}if(ifaceTypeNames[iface.name]){context.reportError("Type ".concat(type.name," can only implement ").concat(iface.name," once."),getAllImplementsInterfaceNodes(type,iface));continue}ifaceTypeNames[iface.name]=!0,function(context,type,iface){for(var ifaceInterfaces=type.getInterfaces(),_i22=0,_iface$getInterfaces2=iface.getInterfaces();_i22<_iface$getInterfaces2.length;_i22++){var transitive=_iface$getInterfaces2[_i22];-1===ifaceInterfaces.indexOf(transitive)&&context.reportError(transitive===type?"Type ".concat(type.name," cannot implement ").concat(iface.name," because it would create a circular reference."):"Type ".concat(type.name," must implement ").concat(transitive.name," because it is implemented by ").concat(iface.name,"."),[].concat(getAllImplementsInterfaceNodes(iface,transitive),getAllImplementsInterfaceNodes(type,iface)))}}(context,type,iface),function(context,type,iface){for(var typeFieldMap=type.getFields(),_i16=0,_objectValues4=objectValues(iface.getFields());_i16<_objectValues4.length;_i16++){var _ifaceField$astNode,_typeField$astNode,ifaceField=_objectValues4[_i16],fieldName=ifaceField.name,typeField=typeFieldMap[fieldName];if(!typeField){context.reportError("Interface field ".concat(iface.name,".").concat(fieldName," expected but ").concat(type.name," does not provide it."),[ifaceField.astNode].concat(getAllNodes(type)));continue}isTypeSubTypeOf(context.schema,typeField.type,ifaceField.type)||context.reportError("Interface field ".concat(iface.name,".").concat(fieldName," expects type ")+"".concat(inspect(ifaceField.type)," but ").concat(type.name,".").concat(fieldName," ")+"is type ".concat(inspect(typeField.type),"."),[null==(_ifaceField$astNode=ifaceField.astNode)?void 0:_ifaceField$astNode.type,null==(_typeField$astNode=typeField.astNode)?void 0:_typeField$astNode.type]);for(var _i18=0,_ifaceField$args2=ifaceField.args;_i18<_ifaceField$args2.length;_i18++)if("continue"===function(_i18,_ifaceField$args2){var _ifaceArg$astNode,_typeArg$astNode,ifaceArg=_ifaceField$args2[_i18],argName=ifaceArg.name,typeArg=find(typeField.args,function(arg){return arg.name===argName});if(!typeArg)return context.reportError("Interface field argument ".concat(iface.name,".").concat(fieldName,"(").concat(argName,":) expected but ").concat(type.name,".").concat(fieldName," does not provide it."),[ifaceArg.astNode,typeField.astNode]),"continue";isEqualType(ifaceArg.type,typeArg.type)||context.reportError("Interface field argument ".concat(iface.name,".").concat(fieldName,"(").concat(argName,":) ")+"expects type ".concat(inspect(ifaceArg.type)," but ")+"".concat(type.name,".").concat(fieldName,"(").concat(argName,":) is type ")+"".concat(inspect(typeArg.type),"."),[null==(_ifaceArg$astNode=ifaceArg.astNode)?void 0:_ifaceArg$astNode.type,null==(_typeArg$astNode=typeArg.astNode)?void 0:_typeArg$astNode.type])}(_i18,_ifaceField$args2))continue;for(var _i20=0,_typeField$args2=typeField.args;_i20<_typeField$args2.length;_i20++)!function(_i20,_typeField$args2){var typeArg=_typeField$args2[_i20],argName=typeArg.name;!find(ifaceField.args,function(arg){return arg.name===argName})&&isRequiredArgument(typeArg)&&context.reportError("Object field ".concat(type.name,".").concat(fieldName," includes required argument ").concat(argName," that is missing from the Interface field ").concat(iface.name,".").concat(fieldName,"."),[typeArg.astNode,ifaceField.astNode])}(_i20,_typeField$args2)}}(context,type,iface)}}(context,type)):isUnionType(type)?function(context,union){var memberTypes=union.getTypes();0===memberTypes.length&&context.reportError("Union type ".concat(union.name," must define one or more member types."),getAllNodes(union));for(var includedTypeNames=Object.create(null),_i24=0;_i24<memberTypes.length;_i24++){var memberType=memberTypes[_i24];if(includedTypeNames[memberType.name]){context.reportError("Union type ".concat(union.name," can only include type ").concat(memberType.name," once."),getUnionMemberTypeNodes(union,memberType.name));continue}includedTypeNames[memberType.name]=!0,isObjectType(memberType)||context.reportError("Union type ".concat(union.name," can only include Object types, ")+"it cannot include ".concat(inspect(memberType),"."),getUnionMemberTypeNodes(union,String(memberType)))}}(context,type):isEnumType(type)?function(context,enumType){var enumValues=enumType.getValues();0===enumValues.length&&context.reportError("Enum type ".concat(enumType.name," must define one or more values."),getAllNodes(enumType));for(var _i26=0;_i26<enumValues.length;_i26++){var enumValue=enumValues[_i26],valueName=enumValue.name;validateName(context,enumValue),("true"===valueName||"false"===valueName||"null"===valueName)&&context.reportError("Enum type ".concat(enumType.name," cannot include value: ").concat(valueName,"."),enumValue.astNode)}}(context,type):isInputObjectType(type)&&(function(context,inputObj){var fields=objectValues(inputObj.getFields());0===fields.length&&context.reportError("Input Object type ".concat(inputObj.name," must define one or more fields."),getAllNodes(inputObj));for(var _i28=0;_i28<fields.length;_i28++){var _field$astNode2,_field$astNode3,field=fields[_i28];validateName(context,field),isInputType(field.type)||context.reportError("The type of ".concat(inputObj.name,".").concat(field.name," must be Input Type ")+"but got: ".concat(inspect(field.type),"."),null==(_field$astNode2=field.astNode)?void 0:_field$astNode2.type),isRequiredInputField(field)&&null!=field.deprecationReason&&context.reportError("Required input field ".concat(inputObj.name,".").concat(field.name," cannot be deprecated."),[getDeprecatedDirectiveNode(field.astNode),null==(_field$astNode3=field.astNode)?void 0:_field$astNode3.type])}}(context,type),validateInputObjectCircularRefs(type))}}(context1);var errors=context1.getErrors();return schema.__validationErrors=errors,errors}function assertValidSchema(schema){var errors=validateSchema(schema);if(0!==errors.length)throw Error(errors.map(function(error){return error.message}).join("\n\n"))}var validate_SchemaValidationContext=function(){function SchemaValidationContext(schema){this._errors=[],this.schema=schema}var _proto=SchemaValidationContext.prototype;return _proto.reportError=function(message,nodes){var _nodes=Array.isArray(nodes)?nodes.filter(Boolean):nodes;this.addError(new GraphQLError_GraphQLError(message,_nodes))},_proto.addError=function(error){this._errors.push(error)},_proto.getErrors=function(){return this._errors},SchemaValidationContext}();function getOperationTypeNode(schema,operation){for(var operationNodes=getAllSubNodes(schema,function(node){return node.operationTypes}),_i2=0;_i2<operationNodes.length;_i2++){var node=operationNodes[_i2];if(node.operation===operation)return node.type}}function validateName(context,node){var error=isValidNameError(node.name);error&&context.addError(locatedError(error,node.astNode))}function getAllNodes(object){var astNode=object.astNode,extensionASTNodes=object.extensionASTNodes;return astNode?extensionASTNodes?[astNode].concat(extensionASTNodes):[astNode]:null!=extensionASTNodes?extensionASTNodes:[]}function getAllSubNodes(object,getter){for(var subNodes=[],_i32=0,_getAllNodes2=getAllNodes(object);_i32<_getAllNodes2.length;_i32++){var _getter,node=_getAllNodes2[_i32];subNodes=subNodes.concat(null!=(_getter=getter(node))?_getter:[])}return subNodes}function getAllImplementsInterfaceNodes(type,iface){return getAllSubNodes(type,function(typeNode){return typeNode.interfaces}).filter(function(ifaceNode){return ifaceNode.name.value===iface.name})}function getUnionMemberTypeNodes(union,typeName){return getAllSubNodes(union,function(unionNode){return unionNode.types}).filter(function(typeNode){return typeNode.name.value===typeName})}function getDeprecatedDirectiveNode(definitionNode){var _definitionNode$direc;return null==definitionNode||null==(_definitionNode$direc=definitionNode.directives)?void 0:_definitionNode$direc.find(function(node){return node.name.value===GraphQLDeprecatedDirective.name})}function typeFromAST(schema,typeNode){var innerType;return typeNode.kind===Kind.LIST_TYPE?(innerType=typeFromAST(schema,typeNode.type))&&new GraphQLList(innerType):typeNode.kind===Kind.NON_NULL_TYPE?(innerType=typeFromAST(schema,typeNode.type))&&new GraphQLNonNull(innerType):typeNode.kind===Kind.NAMED_TYPE?schema.getType(typeNode.name.value):void invariant(0,"Unexpected type node: "+inspect(typeNode))}var TypeInfo_TypeInfo=function(){function TypeInfo(schema,getFieldDefFn,initialType){this._schema=schema,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=null!=getFieldDefFn?getFieldDefFn:TypeInfo_getFieldDef,initialType&&(isInputType(initialType)&&this._inputTypeStack.push(initialType),isCompositeType(initialType)&&this._parentTypeStack.push(initialType),isOutputType(initialType)&&this._typeStack.push(initialType))}var _proto=TypeInfo.prototype;return _proto.getType=function(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]},_proto.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},_proto.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},_proto.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},_proto.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},_proto.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},_proto.getDirective=function(){return this._directive},_proto.getArgument=function(){return this._argument},_proto.getEnumValue=function(){return this._enumValue},_proto.enter=function(node){var schema=this._schema;switch(node.kind){case Kind.SELECTION_SET:var namedType=definition_getNamedType(this.getType());this._parentTypeStack.push(isCompositeType(namedType)?namedType:void 0);break;case Kind.FIELD:var fieldDef,fieldType,parentType=this.getParentType();parentType&&(fieldDef=this._getFieldDef(schema,parentType,node))&&(fieldType=fieldDef.type),this._fieldDefStack.push(fieldDef),this._typeStack.push(isOutputType(fieldType)?fieldType:void 0);break;case Kind.DIRECTIVE:this._directive=schema.getDirective(node.name.value);break;case Kind.OPERATION_DEFINITION:switch(node.operation){case"query":type=schema.getQueryType();break;case"mutation":type=schema.getMutationType();break;case"subscription":type=schema.getSubscriptionType()}this._typeStack.push(isObjectType(type)?type:void 0);break;case Kind.INLINE_FRAGMENT:case Kind.FRAGMENT_DEFINITION:var typeConditionAST=node.typeCondition,outputType=typeConditionAST?typeFromAST(schema,typeConditionAST):definition_getNamedType(this.getType());this._typeStack.push(isOutputType(outputType)?outputType:void 0);break;case Kind.VARIABLE_DEFINITION:var inputType=typeFromAST(schema,node.type);this._inputTypeStack.push(isInputType(inputType)?inputType:void 0);break;case Kind.ARGUMENT:var type,_this$getDirective,argDef,argType,fieldOrDirective=null!=(_this$getDirective=this.getDirective())?_this$getDirective:this.getFieldDef();fieldOrDirective&&(argDef=find(fieldOrDirective.args,function(arg){return arg.name===node.name.value}))&&(argType=argDef.type),this._argument=argDef,this._defaultValueStack.push(argDef?argDef.defaultValue:void 0),this._inputTypeStack.push(isInputType(argType)?argType:void 0);break;case Kind.LIST:var listType=getNullableType(this.getInputType()),itemType=isListType(listType)?listType.ofType:listType;this._defaultValueStack.push(void 0),this._inputTypeStack.push(isInputType(itemType)?itemType:void 0);break;case Kind.OBJECT_FIELD:var inputFieldType,inputField,objectType=definition_getNamedType(this.getInputType());isInputObjectType(objectType)&&(inputField=objectType.getFields()[node.name.value])&&(inputFieldType=inputField.type),this._defaultValueStack.push(inputField?inputField.defaultValue:void 0),this._inputTypeStack.push(isInputType(inputFieldType)?inputFieldType:void 0);break;case Kind.ENUM:var enumValue,enumType=definition_getNamedType(this.getInputType());isEnumType(enumType)&&(enumValue=enumType.getValue(node.value)),this._enumValue=enumValue}},_proto.leave=function(node){switch(node.kind){case Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Kind.DIRECTIVE:this._directive=null;break;case Kind.OPERATION_DEFINITION:case Kind.INLINE_FRAGMENT:case Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Kind.LIST:case Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Kind.ENUM:this._enumValue=null}},TypeInfo}();function TypeInfo_getFieldDef(schema,parentType,fieldNode){var name=fieldNode.name.value;return name===SchemaMetaFieldDef.name&&schema.getQueryType()===parentType?SchemaMetaFieldDef:name===TypeMetaFieldDef.name&&schema.getQueryType()===parentType?TypeMetaFieldDef:name===TypeNameMetaFieldDef.name&&isCompositeType(parentType)?TypeNameMetaFieldDef:isObjectType(parentType)||isInterfaceType(parentType)?parentType.getFields()[name]:void 0}function visitWithTypeInfo(typeInfo,visitor){return{enter:function(node){typeInfo.enter(node);var fn=getVisitFn(visitor,node.kind,!1);if(fn){var result=fn.apply(visitor,arguments);return void 0!==result&&(typeInfo.leave(node),isNode(result)&&typeInfo.enter(result)),result}},leave:function(node){var result,fn=getVisitFn(visitor,node.kind,!0);return fn&&(result=fn.apply(visitor,arguments)),typeInfo.leave(node),result}}}function isDefinitionNode(node){return isExecutableDefinitionNode(node)||isTypeSystemDefinitionNode(node)||isTypeSystemExtensionNode(node)}function isExecutableDefinitionNode(node){return node.kind===Kind.OPERATION_DEFINITION||node.kind===Kind.FRAGMENT_DEFINITION}function isSelectionNode(node){return node.kind===Kind.FIELD||node.kind===Kind.FRAGMENT_SPREAD||node.kind===Kind.INLINE_FRAGMENT}function isValueNode(node){return node.kind===Kind.VARIABLE||node.kind===Kind.INT||node.kind===Kind.FLOAT||node.kind===Kind.STRING||node.kind===Kind.BOOLEAN||node.kind===Kind.NULL||node.kind===Kind.ENUM||node.kind===Kind.LIST||node.kind===Kind.OBJECT}function isTypeNode(node){return node.kind===Kind.NAMED_TYPE||node.kind===Kind.LIST_TYPE||node.kind===Kind.NON_NULL_TYPE}function isTypeSystemDefinitionNode(node){return node.kind===Kind.SCHEMA_DEFINITION||isTypeDefinitionNode(node)||node.kind===Kind.DIRECTIVE_DEFINITION}function isTypeDefinitionNode(node){return node.kind===Kind.SCALAR_TYPE_DEFINITION||node.kind===Kind.OBJECT_TYPE_DEFINITION||node.kind===Kind.INTERFACE_TYPE_DEFINITION||node.kind===Kind.UNION_TYPE_DEFINITION||node.kind===Kind.ENUM_TYPE_DEFINITION||node.kind===Kind.INPUT_OBJECT_TYPE_DEFINITION}function isTypeSystemExtensionNode(node){return node.kind===Kind.SCHEMA_EXTENSION||isTypeExtensionNode(node)}function isTypeExtensionNode(node){return node.kind===Kind.SCALAR_TYPE_EXTENSION||node.kind===Kind.OBJECT_TYPE_EXTENSION||node.kind===Kind.INTERFACE_TYPE_EXTENSION||node.kind===Kind.UNION_TYPE_EXTENSION||node.kind===Kind.ENUM_TYPE_EXTENSION||node.kind===Kind.INPUT_OBJECT_TYPE_EXTENSION}function ExecutableDefinitionsRule(context){return{Document:function(node){for(var _i2=0,_node$definitions2=node.definitions;_i2<_node$definitions2.length;_i2++){var definition=_node$definitions2[_i2];if(!isExecutableDefinitionNode(definition)){var defName=definition.kind===Kind.SCHEMA_DEFINITION||definition.kind===Kind.SCHEMA_EXTENSION?"schema":'"'+definition.name.value+'"';context.reportError(new GraphQLError_GraphQLError("The ".concat(defName," definition is not executable."),definition))}}return!1}}}function UniqueOperationNamesRule(context){var knownOperationNames=Object.create(null);return{OperationDefinition:function(node){var operationName=node.name;return operationName&&(knownOperationNames[operationName.value]?context.reportError(new GraphQLError_GraphQLError('There can be only one operation named "'.concat(operationName.value,'".'),[knownOperationNames[operationName.value],operationName])):knownOperationNames[operationName.value]=operationName),!1},FragmentDefinition:function(){return!1}}}function LoneAnonymousOperationRule(context){var operationCount=0;return{Document:function(node){operationCount=node.definitions.filter(function(definition){return definition.kind===Kind.OPERATION_DEFINITION}).length},OperationDefinition:function(node){!node.name&&operationCount>1&&context.reportError(new GraphQLError_GraphQLError("This anonymous operation must be the only defined operation.",node))}}}function SingleFieldSubscriptionsRule(context){return{OperationDefinition:function(node){"subscription"===node.operation&&1!==node.selectionSet.selections.length&&context.reportError(new GraphQLError_GraphQLError(node.name?'Subscription "'.concat(node.name.value,'" must select only one top level field.'):"Anonymous Subscription must select only one top level field.",node.selectionSet.selections.slice(1)))}}}function KnownTypeNamesRule(context){for(var schema=context.getSchema(),existingTypesMap=schema?schema.getTypeMap():Object.create(null),definedTypes=Object.create(null),_i2=0,_context$getDocument$2=context.getDocument().definitions;_i2<_context$getDocument$2.length;_i2++){var def=_context$getDocument$2[_i2];isTypeDefinitionNode(def)&&(definedTypes[def.name.value]=!0)}var typeNames=Object.keys(existingTypesMap).concat(Object.keys(definedTypes));return{NamedType:function(node,_1,parent1,_2,ancestors){var typeName=node.name.value;if(!existingTypesMap[typeName]&&!definedTypes[typeName]){var typeName1,value1,_ancestors$,definitionNode=null!=(_ancestors$=ancestors[2])?_ancestors$:parent1,isSDL=null!=definitionNode&&!Array.isArray(value1=definitionNode)&&(isTypeSystemDefinitionNode(value1)||isTypeSystemExtensionNode(value1));if(isSDL&&(typeName1=typeName,-1!==standardTypeNames.indexOf(typeName1)))return;var suggestedTypes=suggestionList(typeName,isSDL?standardTypeNames.concat(typeNames):typeNames);context.reportError(new GraphQLError_GraphQLError('Unknown type "'.concat(typeName,'".')+didYouMean(suggestedTypes),node))}}}}var standardTypeNames=[].concat(specifiedScalarTypes,introspectionTypes).map(function(type){return type.name});function FragmentsOnCompositeTypesRule(context){return{InlineFragment:function(node){var typeCondition=node.typeCondition;if(typeCondition){var type=typeFromAST(context.getSchema(),typeCondition);if(type&&!isCompositeType(type)){var typeStr=print(typeCondition);context.reportError(new GraphQLError_GraphQLError('Fragment cannot condition on non composite type "'.concat(typeStr,'".'),typeCondition))}}},FragmentDefinition:function(node){var type=typeFromAST(context.getSchema(),node.typeCondition);if(type&&!isCompositeType(type)){var typeStr=print(node.typeCondition);context.reportError(new GraphQLError_GraphQLError('Fragment "'.concat(node.name.value,'" cannot condition on non composite type "').concat(typeStr,'".'),node.typeCondition))}}}}function VariablesAreInputTypesRule(context){return{VariableDefinition:function(node){var type=typeFromAST(context.getSchema(),node.type);if(type&&!isInputType(type)){var variableName=node.variable.name.value,typeName=print(node.type);context.reportError(new GraphQLError_GraphQLError('Variable "$'.concat(variableName,'" cannot be non-input type "').concat(typeName,'".'),node.type))}}}}function ScalarLeafsRule(context){return{Field:function(node){var type=context.getType(),selectionSet=node.selectionSet;if(type){if(isLeafType(definition_getNamedType(type))){if(selectionSet){var fieldName=node.name.value,typeStr=inspect(type);context.reportError(new GraphQLError_GraphQLError('Field "'.concat(fieldName,'" must not have a selection since type "').concat(typeStr,'" has no subfields.'),selectionSet))}}else if(!selectionSet){var _fieldName=node.name.value,_typeStr=inspect(type);context.reportError(new GraphQLError_GraphQLError('Field "'.concat(_fieldName,'" of type "').concat(_typeStr,'" must have a selection of subfields. Did you mean "').concat(_fieldName,' { ... }"?'),node))}}}}}function FieldsOnCorrectTypeRule(context){return{Field:function(node){var type=context.getParentType();if(type&&!context.getFieldDef()){var type1,fieldName,schema=context.getSchema(),fieldName1=node.name.value,suggestion=didYouMean("to use an inline fragment on",function(schema,type,fieldName){if(!isAbstractType(type))return[];for(var suggestedTypes=new Set,usageCount=Object.create(null),_i2=0,_schema$getPossibleTy2=schema.getPossibleTypes(type);_i2<_schema$getPossibleTy2.length;_i2++){var possibleType=_schema$getPossibleTy2[_i2];if(possibleType.getFields()[fieldName]){suggestedTypes.add(possibleType),usageCount[possibleType.name]=1;for(var _i4=0,_possibleType$getInte2=possibleType.getInterfaces();_i4<_possibleType$getInte2.length;_i4++){var _usageCount$possibleI,possibleInterface=_possibleType$getInte2[_i4];possibleInterface.getFields()[fieldName]&&(suggestedTypes.add(possibleInterface),usageCount[possibleInterface.name]=(null!=(_usageCount$possibleI=usageCount[possibleInterface.name])?_usageCount$possibleI:0)+1)}}}return arrayFrom(suggestedTypes).sort(function(typeA,typeB){var usageCountDiff=usageCount[typeB.name]-usageCount[typeA.name];return 0!==usageCountDiff?usageCountDiff:isInterfaceType(typeA)&&schema.isSubType(typeA,typeB)?-1:isInterfaceType(typeB)&&schema.isSubType(typeB,typeA)?1:naturalCompare(typeA.name,typeB.name)}).map(function(x){return x.name})}(schema,type,fieldName1));""===suggestion&&(suggestion=didYouMean((type1=type,fieldName=fieldName1,isObjectType(type1)||isInterfaceType(type1)?suggestionList(fieldName,Object.keys(type1.getFields())):[]))),context.reportError(new GraphQLError_GraphQLError('Cannot query field "'.concat(fieldName1,'" on type "').concat(type.name,'".')+suggestion,node))}}}}function UniqueFragmentNamesRule(context){var knownFragmentNames=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(node){var fragmentName=node.name.value;return knownFragmentNames[fragmentName]?context.reportError(new GraphQLError_GraphQLError('There can be only one fragment named "'.concat(fragmentName,'".'),[knownFragmentNames[fragmentName],node.name])):knownFragmentNames[fragmentName]=node.name,!1}}}function KnownFragmentNamesRule(context){return{FragmentSpread:function(node){var fragmentName=node.name.value;context.getFragment(fragmentName)||context.reportError(new GraphQLError_GraphQLError('Unknown fragment "'.concat(fragmentName,'".'),node.name))}}}function NoUnusedFragmentsRule(context){var operationDefs=[],fragmentDefs=[];return{OperationDefinition:function(node){return operationDefs.push(node),!1},FragmentDefinition:function(node){return fragmentDefs.push(node),!1},Document:{leave:function(){for(var fragmentNameUsed=Object.create(null),_i2=0;_i2<operationDefs.length;_i2++)for(var operation=operationDefs[_i2],_i4=0,_context$getRecursive2=context.getRecursivelyReferencedFragments(operation);_i4<_context$getRecursive2.length;_i4++)fragmentNameUsed[_context$getRecursive2[_i4].name.value]=!0;for(var _i6=0;_i6<fragmentDefs.length;_i6++){var fragmentDef=fragmentDefs[_i6],fragName=fragmentDef.name.value;!0!==fragmentNameUsed[fragName]&&context.reportError(new GraphQLError_GraphQLError('Fragment "'.concat(fragName,'" is never used.'),fragmentDef))}}}}}function PossibleFragmentSpreadsRule(context){return{InlineFragment:function(node){var fragType=context.getType(),parentType=context.getParentType();if(isCompositeType(fragType)&&isCompositeType(parentType)&&!doTypesOverlap(context.getSchema(),fragType,parentType)){var parentTypeStr=inspect(parentType),fragTypeStr=inspect(fragType);context.reportError(new GraphQLError_GraphQLError('Fragment cannot be spread here as objects of type "'.concat(parentTypeStr,'" can never be of type "').concat(fragTypeStr,'".'),node))}},FragmentSpread:function(node){var fragName=node.name.value,fragType=function(context,name){var frag=context.getFragment(name);if(frag){var type=typeFromAST(context.getSchema(),frag.typeCondition);if(isCompositeType(type))return type}}(context,fragName),parentType=context.getParentType();if(fragType&&parentType&&!doTypesOverlap(context.getSchema(),fragType,parentType)){var parentTypeStr=inspect(parentType),fragTypeStr=inspect(fragType);context.reportError(new GraphQLError_GraphQLError('Fragment "'.concat(fragName,'" cannot be spread here as objects of type "').concat(parentTypeStr,'" can never be of type "').concat(fragTypeStr,'".'),node))}}}}function NoFragmentCyclesRule(context){var visitedFrags=Object.create(null),spreadPath=[],spreadPathIndexByName=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(node){return function detectCycleRecursive(fragment){if(!visitedFrags[fragment.name.value]){var fragmentName=fragment.name.value;visitedFrags[fragmentName]=!0;var spreadNodes=context.getFragmentSpreads(fragment.selectionSet);if(0!==spreadNodes.length){spreadPathIndexByName[fragmentName]=spreadPath.length;for(var _i2=0;_i2<spreadNodes.length;_i2++){var spreadNode=spreadNodes[_i2],spreadName=spreadNode.name.value,cycleIndex=spreadPathIndexByName[spreadName];if(spreadPath.push(spreadNode),void 0===cycleIndex){var spreadFragment=context.getFragment(spreadName);spreadFragment&&detectCycleRecursive(spreadFragment)}else{var cyclePath=spreadPath.slice(cycleIndex),viaPath=cyclePath.slice(0,-1).map(function(s){return'"'+s.name.value+'"'}).join(", ");context.reportError(new GraphQLError_GraphQLError('Cannot spread fragment "'.concat(spreadName,'" within itself')+(""!==viaPath?" via ".concat(viaPath,"."):"."),cyclePath))}spreadPath.pop()}spreadPathIndexByName[fragmentName]=void 0}}}(node),!1}}}function UniqueVariableNamesRule(context){var knownVariableNames=Object.create(null);return{OperationDefinition:function(){knownVariableNames=Object.create(null)},VariableDefinition:function(node){var variableName=node.variable.name.value;knownVariableNames[variableName]?context.reportError(new GraphQLError_GraphQLError('There can be only one variable named "$'.concat(variableName,'".'),[knownVariableNames[variableName],node.variable.name])):knownVariableNames[variableName]=node.variable.name}}}function NoUndefinedVariablesRule(context){var variableNameDefined=Object.create(null);return{OperationDefinition:{enter:function(){variableNameDefined=Object.create(null)},leave:function(operation){for(var usages=context.getRecursiveVariableUsages(operation),_i2=0;_i2<usages.length;_i2++){var node=usages[_i2].node,varName=node.name.value;!0!==variableNameDefined[varName]&&context.reportError(new GraphQLError_GraphQLError(operation.name?'Variable "$'.concat(varName,'" is not defined by operation "').concat(operation.name.value,'".'):'Variable "$'.concat(varName,'" is not defined.'),[node,operation]))}}},VariableDefinition:function(node){variableNameDefined[node.variable.name.value]=!0}}}function NoUnusedVariablesRule(context){var variableDefs=[];return{OperationDefinition:{enter:function(){variableDefs=[]},leave:function(operation){for(var variableNameUsed=Object.create(null),usages=context.getRecursiveVariableUsages(operation),_i2=0;_i2<usages.length;_i2++)variableNameUsed[usages[_i2].node.name.value]=!0;for(var _i4=0,_variableDefs2=variableDefs;_i4<_variableDefs2.length;_i4++){var variableDef=_variableDefs2[_i4],variableName=variableDef.variable.name.value;!0!==variableNameUsed[variableName]&&context.reportError(new GraphQLError_GraphQLError(operation.name?'Variable "$'.concat(variableName,'" is never used in operation "').concat(operation.name.value,'".'):'Variable "$'.concat(variableName,'" is never used.'),variableDef))}}},VariableDefinition:function(def){variableDefs.push(def)}}}function KnownDirectivesRule(context){for(var locationsMap=Object.create(null),schema=context.getSchema(),definedDirectives=schema?schema.getDirectives():specifiedDirectives,_i2=0;_i2<definedDirectives.length;_i2++){var directive=definedDirectives[_i2];locationsMap[directive.name]=directive.locations}for(var astDefinitions=context.getDocument().definitions,_i4=0;_i4<astDefinitions.length;_i4++){var def=astDefinitions[_i4];def.kind===Kind.DIRECTIVE_DEFINITION&&(locationsMap[def.name.value]=def.locations.map(function(name){return name.value}))}return{Directive:function(node,_key,_parent,_path,ancestors){var name=node.name.value,locations=locationsMap[name];if(!locations)return void context.reportError(new GraphQLError_GraphQLError('Unknown directive "@'.concat(name,'".'),node));var candidateLocation=function(ancestors){var appliedTo=ancestors[ancestors.length-1];switch(Array.isArray(appliedTo)&&invariant(0),appliedTo.kind){case Kind.OPERATION_DEFINITION:var operation=appliedTo.operation;switch(operation){case"query":return DirectiveLocation.QUERY;case"mutation":return DirectiveLocation.MUTATION;case"subscription":return DirectiveLocation.SUBSCRIPTION}invariant(0,"Unexpected operation: "+inspect(operation));return;case Kind.FIELD:return DirectiveLocation.FIELD;case Kind.FRAGMENT_SPREAD:return DirectiveLocation.FRAGMENT_SPREAD;case Kind.INLINE_FRAGMENT:return DirectiveLocation.INLINE_FRAGMENT;case Kind.FRAGMENT_DEFINITION:return DirectiveLocation.FRAGMENT_DEFINITION;case Kind.VARIABLE_DEFINITION:return DirectiveLocation.VARIABLE_DEFINITION;case Kind.SCHEMA_DEFINITION:case Kind.SCHEMA_EXTENSION:return DirectiveLocation.SCHEMA;case Kind.SCALAR_TYPE_DEFINITION:case Kind.SCALAR_TYPE_EXTENSION:return DirectiveLocation.SCALAR;case Kind.OBJECT_TYPE_DEFINITION:case Kind.OBJECT_TYPE_EXTENSION:return DirectiveLocation.OBJECT;case Kind.FIELD_DEFINITION:return DirectiveLocation.FIELD_DEFINITION;case Kind.INTERFACE_TYPE_DEFINITION:case Kind.INTERFACE_TYPE_EXTENSION:return DirectiveLocation.INTERFACE;case Kind.UNION_TYPE_DEFINITION:case Kind.UNION_TYPE_EXTENSION:return DirectiveLocation.UNION;case Kind.ENUM_TYPE_DEFINITION:case Kind.ENUM_TYPE_EXTENSION:return DirectiveLocation.ENUM;case Kind.ENUM_VALUE_DEFINITION:return DirectiveLocation.ENUM_VALUE;case Kind.INPUT_OBJECT_TYPE_DEFINITION:case Kind.INPUT_OBJECT_TYPE_EXTENSION:return DirectiveLocation.INPUT_OBJECT;case Kind.INPUT_VALUE_DEFINITION:return ancestors[ancestors.length-3].kind===Kind.INPUT_OBJECT_TYPE_DEFINITION?DirectiveLocation.INPUT_FIELD_DEFINITION:DirectiveLocation.ARGUMENT_DEFINITION}}(ancestors);candidateLocation&&-1===locations.indexOf(candidateLocation)&&context.reportError(new GraphQLError_GraphQLError('Directive "@'.concat(name,'" may not be used on ').concat(candidateLocation,"."),node))}}}function UniqueDirectivesPerLocationRule(context){for(var uniqueDirectiveMap=Object.create(null),schema=context.getSchema(),definedDirectives=schema?schema.getDirectives():specifiedDirectives,_i2=0;_i2<definedDirectives.length;_i2++){var directive=definedDirectives[_i2];uniqueDirectiveMap[directive.name]=!directive.isRepeatable}for(var astDefinitions=context.getDocument().definitions,_i4=0;_i4<astDefinitions.length;_i4++){var def=astDefinitions[_i4];def.kind===Kind.DIRECTIVE_DEFINITION&&(uniqueDirectiveMap[def.name.value]=!def.repeatable)}var schemaDirectives=Object.create(null),typeDirectivesMap=Object.create(null);return{enter:function(node){if(null!=node.directives){if(node.kind===Kind.SCHEMA_DEFINITION||node.kind===Kind.SCHEMA_EXTENSION)seenDirectives=schemaDirectives;else if(isTypeDefinitionNode(node)||isTypeExtensionNode(node)){var seenDirectives,typeName=node.name.value;void 0===(seenDirectives=typeDirectivesMap[typeName])&&(typeDirectivesMap[typeName]=seenDirectives=Object.create(null))}else seenDirectives=Object.create(null);for(var _i6=0,_node$directives2=node.directives;_i6<_node$directives2.length;_i6++){var _directive=_node$directives2[_i6],directiveName=_directive.name.value;uniqueDirectiveMap[directiveName]&&(seenDirectives[directiveName]?context.reportError(new GraphQLError_GraphQLError('The directive "@'.concat(directiveName,'" can only be used once at this location.'),[seenDirectives[directiveName],_directive])):seenDirectives[directiveName]=_directive)}}}}}function KnownArgumentNamesRule_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function KnownArgumentNamesRule_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?KnownArgumentNamesRule_ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):KnownArgumentNamesRule_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function KnownArgumentNamesRule(context){return KnownArgumentNamesRule_objectSpread(KnownArgumentNamesRule_objectSpread({},KnownArgumentNamesOnDirectivesRule(context)),{},{Argument:function(argNode){var argDef=context.getArgument(),fieldDef=context.getFieldDef(),parentType=context.getParentType();if(!argDef&&fieldDef&&parentType){var argName=argNode.name.value,suggestions=suggestionList(argName,fieldDef.args.map(function(arg){return arg.name}));context.reportError(new GraphQLError_GraphQLError('Unknown argument "'.concat(argName,'" on field "').concat(parentType.name,".").concat(fieldDef.name,'".')+didYouMean(suggestions),argNode))}}})}function KnownArgumentNamesOnDirectivesRule(context){for(var directiveArgs=Object.create(null),schema=context.getSchema(),definedDirectives=schema?schema.getDirectives():specifiedDirectives,_i2=0;_i2<definedDirectives.length;_i2++){var directive=definedDirectives[_i2];directiveArgs[directive.name]=directive.args.map(function(arg){return arg.name})}for(var astDefinitions=context.getDocument().definitions,_i4=0;_i4<astDefinitions.length;_i4++){var def=astDefinitions[_i4];if(def.kind===Kind.DIRECTIVE_DEFINITION){var _def$arguments,argsNodes=null!=(_def$arguments=def.arguments)?_def$arguments:[];directiveArgs[def.name.value]=argsNodes.map(function(arg){return arg.name.value})}}return{Directive:function(directiveNode){var directiveName=directiveNode.name.value,knownArgs=directiveArgs[directiveName];if(directiveNode.arguments&&knownArgs)for(var _i6=0,_directiveNode$argume2=directiveNode.arguments;_i6<_directiveNode$argume2.length;_i6++){var argNode=_directiveNode$argume2[_i6],argName=argNode.name.value;if(-1===knownArgs.indexOf(argName)){var suggestions=suggestionList(argName,knownArgs);context.reportError(new GraphQLError_GraphQLError('Unknown argument "'.concat(argName,'" on directive "@').concat(directiveName,'".')+didYouMean(suggestions),argNode))}}return!1}}}function UniqueArgumentNamesRule(context){var knownArgNames=Object.create(null);return{Field:function(){knownArgNames=Object.create(null)},Directive:function(){knownArgNames=Object.create(null)},Argument:function(node){var argName=node.name.value;return knownArgNames[argName]?context.reportError(new GraphQLError_GraphQLError('There can be only one argument named "'.concat(argName,'".'),[knownArgNames[argName],node.name])):knownArgNames[argName]=node.name,!1}}}function ValuesOfCorrectTypeRule(context){return{ListValue:function(node){if(!isListType(getNullableType(context.getParentInputType())))return isValidValueNode(context,node),!1},ObjectValue:function(node){var type=definition_getNamedType(context.getInputType());if(!isInputObjectType(type))return isValidValueNode(context,node),!1;for(var fieldNodeMap=keyMap(node.fields,function(field){return field.name.value}),_i2=0,_objectValues2=objectValues(type.getFields());_i2<_objectValues2.length;_i2++){var fieldDef=_objectValues2[_i2];if(!fieldNodeMap[fieldDef.name]&&isRequiredInputField(fieldDef)){var typeStr=inspect(fieldDef.type);context.reportError(new GraphQLError_GraphQLError('Field "'.concat(type.name,".").concat(fieldDef.name,'" of required type "').concat(typeStr,'" was not provided.'),node))}}},ObjectField:function(node){var parentType=definition_getNamedType(context.getParentInputType());if(!context.getInputType()&&isInputObjectType(parentType)){var suggestions=suggestionList(node.name.value,Object.keys(parentType.getFields()));context.reportError(new GraphQLError_GraphQLError('Field "'.concat(node.name.value,'" is not defined by type "').concat(parentType.name,'".')+didYouMean(suggestions),node))}},NullValue:function(node){var type=context.getInputType();isNonNullType(type)&&context.reportError(new GraphQLError_GraphQLError('Expected value of type "'.concat(inspect(type),'", found ').concat(print(node),"."),node))},EnumValue:function(node){return isValidValueNode(context,node)},IntValue:function(node){return isValidValueNode(context,node)},FloatValue:function(node){return isValidValueNode(context,node)},StringValue:function(node){return isValidValueNode(context,node)},BooleanValue:function(node){return isValidValueNode(context,node)}}}function isValidValueNode(context,node){var locationType=context.getInputType();if(locationType){var type=definition_getNamedType(locationType);if(!isLeafType(type)){var typeStr=inspect(locationType);context.reportError(new GraphQLError_GraphQLError('Expected value of type "'.concat(typeStr,'", found ').concat(print(node),"."),node));return}try{var parseResult=type.parseLiteral(node,void 0);if(void 0===parseResult){var _typeStr=inspect(locationType);context.reportError(new GraphQLError_GraphQLError('Expected value of type "'.concat(_typeStr,'", found ').concat(print(node),"."),node))}}catch(error){var _typeStr2=inspect(locationType);error instanceof GraphQLError_GraphQLError?context.reportError(error):context.reportError(new GraphQLError_GraphQLError('Expected value of type "'.concat(_typeStr2,'", found ').concat(print(node),"; ")+error.message,node,void 0,void 0,void 0,error))}}}function ProvidedRequiredArgumentsRule_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function ProvidedRequiredArgumentsRule_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ProvidedRequiredArgumentsRule_ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ProvidedRequiredArgumentsRule_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function ProvidedRequiredArgumentsRule(context){return ProvidedRequiredArgumentsRule_objectSpread(ProvidedRequiredArgumentsRule_objectSpread({},ProvidedRequiredArgumentsOnDirectivesRule(context)),{},{Field:{leave:function(fieldNode){var _fieldNode$arguments,fieldDef=context.getFieldDef();if(!fieldDef)return!1;for(var argNodeMap=keyMap(null!=(_fieldNode$arguments=fieldNode.arguments)?_fieldNode$arguments:[],function(arg){return arg.name.value}),_i2=0,_fieldDef$args2=fieldDef.args;_i2<_fieldDef$args2.length;_i2++){var argDef=_fieldDef$args2[_i2];if(!argNodeMap[argDef.name]&&isRequiredArgument(argDef)){var argTypeStr=inspect(argDef.type);context.reportError(new GraphQLError_GraphQLError('Field "'.concat(fieldDef.name,'" argument "').concat(argDef.name,'" of type "').concat(argTypeStr,'" is required, but it was not provided.'),fieldNode))}}}}})}function ProvidedRequiredArgumentsOnDirectivesRule(context){for(var requiredArgsMap=Object.create(null),schema=context.getSchema(),definedDirectives=schema?schema.getDirectives():specifiedDirectives,_i4=0;_i4<definedDirectives.length;_i4++){var directive=definedDirectives[_i4];requiredArgsMap[directive.name]=keyMap(directive.args.filter(isRequiredArgument),function(arg){return arg.name})}for(var astDefinitions=context.getDocument().definitions,_i6=0;_i6<astDefinitions.length;_i6++){var def=astDefinitions[_i6];if(def.kind===Kind.DIRECTIVE_DEFINITION){var _def$arguments,argNodes=null!=(_def$arguments=def.arguments)?_def$arguments:[];requiredArgsMap[def.name.value]=keyMap(argNodes.filter(isRequiredArgumentNode),function(arg){return arg.name.value})}}return{Directive:{leave:function(directiveNode){var directiveName=directiveNode.name.value,requiredArgs=requiredArgsMap[directiveName];if(requiredArgs)for(var _directiveNode$argume,argNodeMap=keyMap(null!=(_directiveNode$argume=directiveNode.arguments)?_directiveNode$argume:[],function(arg){return arg.name.value}),_i8=0,_Object$keys2=Object.keys(requiredArgs);_i8<_Object$keys2.length;_i8++){var argName=_Object$keys2[_i8];if(!argNodeMap[argName]){var argType=requiredArgs[argName].type,argTypeStr=isType(argType)?inspect(argType):print(argType);context.reportError(new GraphQLError_GraphQLError('Directive "@'.concat(directiveName,'" argument "').concat(argName,'" of type "').concat(argTypeStr,'" is required, but it was not provided.'),directiveNode))}}}}}}function isRequiredArgumentNode(arg){return arg.type.kind===Kind.NON_NULL_TYPE&&null==arg.defaultValue}function VariablesInAllowedPositionRule(context){var varDefMap=Object.create(null);return{OperationDefinition:{enter:function(){varDefMap=Object.create(null)},leave:function(operation){for(var usages=context.getRecursiveVariableUsages(operation),_i2=0;_i2<usages.length;_i2++){var _ref2=usages[_i2],node=_ref2.node,type=_ref2.type,defaultValue=_ref2.defaultValue,varName=node.name.value,varDef=varDefMap[varName];if(varDef&&type){var schema,varType,varDefaultValue,locationType,locationDefaultValue,schema1=context.getSchema(),varType1=typeFromAST(schema1,varDef.type);if(varType1&&(schema=schema1,varType=varType1,varDefaultValue=varDef.defaultValue,locationType=type,locationDefaultValue=defaultValue,isNonNullType(locationType)&&!isNonNullType(varType)?!((null!=varDefaultValue&&varDefaultValue.kind!==Kind.NULL||void 0!==locationDefaultValue)&&isTypeSubTypeOf(schema,varType,locationType.ofType)):!isTypeSubTypeOf(schema,varType,locationType))){var varTypeStr=inspect(varType1),typeStr=inspect(type);context.reportError(new GraphQLError_GraphQLError('Variable "$'.concat(varName,'" of type "').concat(varTypeStr,'" used in position expecting type "').concat(typeStr,'".'),[varDef,node]))}}}}},VariableDefinition:function(node){varDefMap[node.variable.name.value]=node}}}function OverlappingFieldsCanBeMergedRule(context){var comparedFragmentPairs=new OverlappingFieldsCanBeMergedRule_PairSet,cachedFieldsAndFragmentNames=new Map;return{SelectionSet:function(selectionSet){for(var conflicts=function(context,cachedFieldsAndFragmentNames,comparedFragmentPairs,parentType,selectionSet){var conflicts=[],_getFieldsAndFragment=getFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,parentType,selectionSet),fieldMap=_getFieldsAndFragment[0],fragmentNames=_getFieldsAndFragment[1];if(function(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,fieldMap){for(var _i5=0,_objectEntries2=objectEntries(fieldMap);_i5<_objectEntries2.length;_i5++){var _ref5=_objectEntries2[_i5],responseName=_ref5[0],fields=_ref5[1];if(fields.length>1)for(var i=0;i<fields.length;i++)for(var j=i+1;j<fields.length;j++){var conflict=findConflict(context,cachedFieldsAndFragmentNames,comparedFragmentPairs,!1,responseName,fields[i],fields[j]);conflict&&conflicts.push(conflict)}}}(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,fieldMap),0!==fragmentNames.length)for(var i=0;i<fragmentNames.length;i++){collectConflictsBetweenFieldsAndFragment(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,!1,fieldMap,fragmentNames[i]);for(var j=i+1;j<fragmentNames.length;j++)collectConflictsBetweenFragments(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,!1,fragmentNames[i],fragmentNames[j])}return conflicts}(context,cachedFieldsAndFragmentNames,comparedFragmentPairs,context.getParentType(),selectionSet),_i2=0;_i2<conflicts.length;_i2++){var _ref3=conflicts[_i2],_ref2$=_ref3[0],responseName=_ref2$[0],reason=_ref2$[1],fields1=_ref3[1],fields2=_ref3[2],reasonMsg=function reasonMessage(reason){return Array.isArray(reason)?reason.map(function(_ref){var responseName=_ref[0],subReason=_ref[1];return'subfields "'.concat(responseName,'" conflict because ')+reasonMessage(subReason)}).join(" and "):reason}(reason);context.reportError(new GraphQLError_GraphQLError('Fields "'.concat(responseName,'" conflict because ').concat(reasonMsg,". Use different aliases on the fields to fetch both if this was intentional."),fields1.concat(fields2)))}}}}function collectConflictsBetweenFieldsAndFragment(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fieldMap,fragmentName){var fragment=context.getFragment(fragmentName);if(fragment){var _getReferencedFieldsA=getReferencedFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,fragment),fieldMap2=_getReferencedFieldsA[0],fragmentNames2=_getReferencedFieldsA[1];if(fieldMap!==fieldMap2){collectConflictsBetween(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fieldMap,fieldMap2);for(var i=0;i<fragmentNames2.length;i++)collectConflictsBetweenFieldsAndFragment(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fieldMap,fragmentNames2[i])}}}function collectConflictsBetweenFragments(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fragmentName1,fragmentName2){if(!(fragmentName1===fragmentName2||comparedFragmentPairs.has(fragmentName1,fragmentName2,areMutuallyExclusive))){comparedFragmentPairs.add(fragmentName1,fragmentName2,areMutuallyExclusive);var fragment1=context.getFragment(fragmentName1),fragment2=context.getFragment(fragmentName2);if(fragment1&&fragment2){var _getReferencedFieldsA2=getReferencedFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,fragment1),fieldMap1=_getReferencedFieldsA2[0],fragmentNames1=_getReferencedFieldsA2[1],_getReferencedFieldsA3=getReferencedFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,fragment2),fieldMap2=_getReferencedFieldsA3[0],fragmentNames2=_getReferencedFieldsA3[1];collectConflictsBetween(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fieldMap1,fieldMap2);for(var j=0;j<fragmentNames2.length;j++)collectConflictsBetweenFragments(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fragmentName1,fragmentNames2[j]);for(var i=0;i<fragmentNames1.length;i++)collectConflictsBetweenFragments(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fragmentNames1[i],fragmentName2)}}}function collectConflictsBetween(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,parentFieldsAreMutuallyExclusive,fieldMap1,fieldMap2){for(var _i7=0,_Object$keys2=Object.keys(fieldMap1);_i7<_Object$keys2.length;_i7++){var responseName=_Object$keys2[_i7],fields2=fieldMap2[responseName];if(fields2)for(var fields1=fieldMap1[responseName],i=0;i<fields1.length;i++)for(var j=0;j<fields2.length;j++){var conflict=findConflict(context,cachedFieldsAndFragmentNames,comparedFragmentPairs,parentFieldsAreMutuallyExclusive,responseName,fields1[i],fields2[j]);conflict&&conflicts.push(conflict)}}}function findConflict(context,cachedFieldsAndFragmentNames,comparedFragmentPairs,parentFieldsAreMutuallyExclusive,responseName,field1,field2){var parentType1=field1[0],node1=field1[1],def1=field1[2],parentType2=field2[0],node2=field2[1],def2=field2[2],areMutuallyExclusive=parentFieldsAreMutuallyExclusive||parentType1!==parentType2&&isObjectType(parentType1)&&isObjectType(parentType2);if(!areMutuallyExclusive){var arguments1,arguments2,_node1$arguments,_node2$arguments,name1=node1.name.value,name2=node2.name.value;if(name1!==name2)return[[responseName,'"'.concat(name1,'" and "').concat(name2,'" are different fields')],[node1],[node2]];if(arguments1=null!=(_node1$arguments=node1.arguments)?_node1$arguments:[],arguments2=null!=(_node2$arguments=node2.arguments)?_node2$arguments:[],!(arguments1.length===arguments2.length&&arguments1.every(function(argument1){var value1,value2,argument2=find(arguments2,function(argument){return argument.name.value===argument1.name.value});return!!argument2&&(value1=argument1.value,value2=argument2.value,print(value1)===print(value2))})))return[[responseName,"they have differing arguments"],[node1],[node2]]}var type1=null==def1?void 0:def1.type,type2=null==def2?void 0:def2.type;if(type1&&type2&&function doTypesConflict(type1,type2){return isListType(type1)?!isListType(type2)||doTypesConflict(type1.ofType,type2.ofType):!!isListType(type2)||(isNonNullType(type1)?!isNonNullType(type2)||doTypesConflict(type1.ofType,type2.ofType):!!isNonNullType(type2)||!!(isLeafType(type1)||isLeafType(type2))&&type1!==type2)}(type1,type2))return[[responseName,'they return conflicting types "'.concat(inspect(type1),'" and "').concat(inspect(type2),'"')],[node1],[node2]];var selectionSet1=node1.selectionSet,selectionSet2=node2.selectionSet;if(selectionSet1&&selectionSet2){var conflicts=function(context,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,parentType1,selectionSet1,parentType2,selectionSet2){var conflicts=[],_getFieldsAndFragment2=getFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,parentType1,selectionSet1),fieldMap1=_getFieldsAndFragment2[0],fragmentNames1=_getFieldsAndFragment2[1],_getFieldsAndFragment3=getFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,parentType2,selectionSet2),fieldMap2=_getFieldsAndFragment3[0],fragmentNames2=_getFieldsAndFragment3[1];if(collectConflictsBetween(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fieldMap1,fieldMap2),0!==fragmentNames2.length)for(var j=0;j<fragmentNames2.length;j++)collectConflictsBetweenFieldsAndFragment(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fieldMap1,fragmentNames2[j]);if(0!==fragmentNames1.length)for(var i=0;i<fragmentNames1.length;i++)collectConflictsBetweenFieldsAndFragment(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fieldMap2,fragmentNames1[i]);for(var _i3=0;_i3<fragmentNames1.length;_i3++)for(var _j=0;_j<fragmentNames2.length;_j++)collectConflictsBetweenFragments(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fragmentNames1[_i3],fragmentNames2[_j]);return conflicts}(context,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,definition_getNamedType(type1),selectionSet1,definition_getNamedType(type2),selectionSet2),responseName1=responseName,node11=node1,node21=node2;return conflicts.length>0?[[responseName1,conflicts.map(function(_ref6){return _ref6[0]})],conflicts.reduce(function(allFields,_ref7){var fields1=_ref7[1];return allFields.concat(fields1)},[node11]),conflicts.reduce(function(allFields,_ref8){var fields2=_ref8[2];return allFields.concat(fields2)},[node21])]:void 0}}function getFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,parentType,selectionSet){var cached=cachedFieldsAndFragmentNames.get(selectionSet);if(!cached){var nodeAndDefs=Object.create(null),fragmentNames=Object.create(null);(function _collectFieldsAndFragmentNames(context,parentType,selectionSet,nodeAndDefs,fragmentNames){for(var _i9=0,_selectionSet$selecti2=selectionSet.selections;_i9<_selectionSet$selecti2.length;_i9++){var selection=_selectionSet$selecti2[_i9];switch(selection.kind){case Kind.FIELD:var fieldName=selection.name.value,fieldDef=void 0;(isObjectType(parentType)||isInterfaceType(parentType))&&(fieldDef=parentType.getFields()[fieldName]);var responseName=selection.alias?selection.alias.value:fieldName;nodeAndDefs[responseName]||(nodeAndDefs[responseName]=[]),nodeAndDefs[responseName].push([parentType,selection,fieldDef]);break;case Kind.FRAGMENT_SPREAD:fragmentNames[selection.name.value]=!0;break;case Kind.INLINE_FRAGMENT:var typeCondition=selection.typeCondition,inlineFragmentType=typeCondition?typeFromAST(context.getSchema(),typeCondition):parentType;_collectFieldsAndFragmentNames(context,inlineFragmentType,selection.selectionSet,nodeAndDefs,fragmentNames)}}})(context,parentType,selectionSet,nodeAndDefs,fragmentNames),cached=[nodeAndDefs,Object.keys(fragmentNames)],cachedFieldsAndFragmentNames.set(selectionSet,cached)}return cached}function getReferencedFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,fragment){var cached=cachedFieldsAndFragmentNames.get(fragment.selectionSet);if(cached)return cached;var fragmentType=typeFromAST(context.getSchema(),fragment.typeCondition);return getFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,fragmentType,fragment.selectionSet)}var OverlappingFieldsCanBeMergedRule_PairSet=function(){function PairSet(){this._data=Object.create(null)}var _proto=PairSet.prototype;return _proto.has=function(a,b,areMutuallyExclusive){var first=this._data[a],result=first&&first[b];return void 0!==result&&(!1!==areMutuallyExclusive||!1===result)},_proto.add=function(a,b,areMutuallyExclusive){this._pairSetAdd(a,b,areMutuallyExclusive),this._pairSetAdd(b,a,areMutuallyExclusive)},_proto._pairSetAdd=function(a,b,areMutuallyExclusive){var map=this._data[a];map||(map=Object.create(null),this._data[a]=map),map[b]=areMutuallyExclusive},PairSet}();function UniqueInputFieldNamesRule(context){var knownNameStack=[],knownNames=Object.create(null);return{ObjectValue:{enter:function(){knownNameStack.push(knownNames),knownNames=Object.create(null)},leave:function(){knownNames=knownNameStack.pop()}},ObjectField:function(node){var fieldName=node.name.value;knownNames[fieldName]?context.reportError(new GraphQLError_GraphQLError('There can be only one input field named "'.concat(fieldName,'".'),[knownNames[fieldName],node.name])):knownNames[fieldName]=node.name}}}function LoneSchemaDefinitionRule(context){var _ref,_ref2,_oldSchema$astNode,oldSchema=context.getSchema(),alreadyDefined=null!=(_ref=null!=(_ref2=null!=(_oldSchema$astNode=null==oldSchema?void 0:oldSchema.astNode)?_oldSchema$astNode:null==oldSchema?void 0:oldSchema.getQueryType())?_ref2:null==oldSchema?void 0:oldSchema.getMutationType())?_ref:null==oldSchema?void 0:oldSchema.getSubscriptionType(),schemaDefinitionsCount=0;return{SchemaDefinition:function(node){alreadyDefined?context.reportError(new GraphQLError_GraphQLError("Cannot define a new schema within a schema extension.",node)):(schemaDefinitionsCount>0&&context.reportError(new GraphQLError_GraphQLError("Must provide only one schema definition.",node)),++schemaDefinitionsCount)}}}function UniqueOperationTypesRule(context){var schema=context.getSchema(),definedOperationTypes=Object.create(null),existingOperationTypes=schema?{query:schema.getQueryType(),mutation:schema.getMutationType(),subscription:schema.getSubscriptionType()}:{};return{SchemaDefinition:checkOperationTypes,SchemaExtension:checkOperationTypes};function checkOperationTypes(node){for(var _node$operationTypes,operationTypesNodes=null!=(_node$operationTypes=node.operationTypes)?_node$operationTypes:[],_i2=0;_i2<operationTypesNodes.length;_i2++){var operationType=operationTypesNodes[_i2],operation=operationType.operation,alreadyDefinedOperationType=definedOperationTypes[operation];existingOperationTypes[operation]?context.reportError(new GraphQLError_GraphQLError("Type for ".concat(operation," already defined in the schema. It cannot be redefined."),operationType)):alreadyDefinedOperationType?context.reportError(new GraphQLError_GraphQLError("There can be only one ".concat(operation," type in schema."),[alreadyDefinedOperationType,operationType])):definedOperationTypes[operation]=operationType}return!1}}function UniqueTypeNamesRule(context){var knownTypeNames=Object.create(null),schema=context.getSchema();return{ScalarTypeDefinition:checkTypeName,ObjectTypeDefinition:checkTypeName,InterfaceTypeDefinition:checkTypeName,UnionTypeDefinition:checkTypeName,EnumTypeDefinition:checkTypeName,InputObjectTypeDefinition:checkTypeName};function checkTypeName(node){var typeName=node.name.value;return null!=schema&&schema.getType(typeName)?void context.reportError(new GraphQLError_GraphQLError('Type "'.concat(typeName,'" already exists in the schema. It cannot also be defined in this type definition.'),node.name)):(knownTypeNames[typeName]?context.reportError(new GraphQLError_GraphQLError('There can be only one type named "'.concat(typeName,'".'),[knownTypeNames[typeName],node.name])):knownTypeNames[typeName]=node.name,!1)}}function UniqueEnumValueNamesRule(context){var schema=context.getSchema(),existingTypeMap=schema?schema.getTypeMap():Object.create(null),knownValueNames=Object.create(null);return{EnumTypeDefinition:checkValueUniqueness,EnumTypeExtension:checkValueUniqueness};function checkValueUniqueness(node){var _node$values,typeName=node.name.value;knownValueNames[typeName]||(knownValueNames[typeName]=Object.create(null));for(var valueNodes=null!=(_node$values=node.values)?_node$values:[],valueNames=knownValueNames[typeName],_i2=0;_i2<valueNodes.length;_i2++){var valueDef=valueNodes[_i2],valueName=valueDef.name.value,existingType=existingTypeMap[typeName];isEnumType(existingType)&&existingType.getValue(valueName)?context.reportError(new GraphQLError_GraphQLError('Enum value "'.concat(typeName,".").concat(valueName,'" already exists in the schema. It cannot also be defined in this type extension.'),valueDef.name)):valueNames[valueName]?context.reportError(new GraphQLError_GraphQLError('Enum value "'.concat(typeName,".").concat(valueName,'" can only be defined once.'),[valueNames[valueName],valueDef.name])):valueNames[valueName]=valueDef.name}return!1}}function UniqueFieldDefinitionNamesRule(context){var schema=context.getSchema(),existingTypeMap=schema?schema.getTypeMap():Object.create(null),knownFieldNames=Object.create(null);return{InputObjectTypeDefinition:checkFieldUniqueness,InputObjectTypeExtension:checkFieldUniqueness,InterfaceTypeDefinition:checkFieldUniqueness,InterfaceTypeExtension:checkFieldUniqueness,ObjectTypeDefinition:checkFieldUniqueness,ObjectTypeExtension:checkFieldUniqueness};function checkFieldUniqueness(node){var _node$fields,typeName=node.name.value;knownFieldNames[typeName]||(knownFieldNames[typeName]=Object.create(null));for(var fieldNodes=null!=(_node$fields=node.fields)?_node$fields:[],fieldNames=knownFieldNames[typeName],_i2=0;_i2<fieldNodes.length;_i2++){var type,fieldName,fieldDef=fieldNodes[_i2],fieldName1=fieldDef.name.value;(type=existingTypeMap[typeName],fieldName=fieldName1,(isObjectType(type)||isInterfaceType(type)||isInputObjectType(type))&&null!=type.getFields()[fieldName])?context.reportError(new GraphQLError_GraphQLError('Field "'.concat(typeName,".").concat(fieldName1,'" already exists in the schema. It cannot also be defined in this type extension.'),fieldDef.name)):fieldNames[fieldName1]?context.reportError(new GraphQLError_GraphQLError('Field "'.concat(typeName,".").concat(fieldName1,'" can only be defined once.'),[fieldNames[fieldName1],fieldDef.name])):fieldNames[fieldName1]=fieldDef.name}return!1}}function UniqueDirectiveNamesRule(context){var knownDirectiveNames=Object.create(null),schema=context.getSchema();return{DirectiveDefinition:function(node){var directiveName=node.name.value;return null!=schema&&schema.getDirective(directiveName)?void context.reportError(new GraphQLError_GraphQLError('Directive "@'.concat(directiveName,'" already exists in the schema. It cannot be redefined.'),node.name)):(knownDirectiveNames[directiveName]?context.reportError(new GraphQLError_GraphQLError('There can be only one directive named "@'.concat(directiveName,'".'),[knownDirectiveNames[directiveName],node.name])):knownDirectiveNames[directiveName]=node.name,!1)}}}function PossibleTypeExtensionsRule_defineProperty(obj,key,value1){return key in obj?Object.defineProperty(obj,key,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value1,obj}function PossibleTypeExtensionsRule(context){for(var schema=context.getSchema(),definedTypes=Object.create(null),_i2=0,_context$getDocument$2=context.getDocument().definitions;_i2<_context$getDocument$2.length;_i2++){var def=_context$getDocument$2[_i2];isTypeDefinitionNode(def)&&(definedTypes[def.name.value]=def)}return{ScalarTypeExtension:checkExtension,ObjectTypeExtension:checkExtension,InterfaceTypeExtension:checkExtension,UnionTypeExtension:checkExtension,EnumTypeExtension:checkExtension,InputObjectTypeExtension:checkExtension};function checkExtension(node){var type,expectedKind,typeName=node.name.value,defNode=definedTypes[typeName],existingType=null==schema?void 0:schema.getType(typeName);if(defNode?expectedKind=defKindToExtKind[defNode.kind]:existingType&&(expectedKind=isScalarType(type=existingType)?Kind.SCALAR_TYPE_EXTENSION:isObjectType(type)?Kind.OBJECT_TYPE_EXTENSION:isInterfaceType(type)?Kind.INTERFACE_TYPE_EXTENSION:isUnionType(type)?Kind.UNION_TYPE_EXTENSION:isEnumType(type)?Kind.ENUM_TYPE_EXTENSION:isInputObjectType(type)?Kind.INPUT_OBJECT_TYPE_EXTENSION:void invariant(0,"Unexpected type: "+inspect(type))),expectedKind){if(expectedKind!==node.kind){var kindStr=function(kind){switch(kind){case Kind.SCALAR_TYPE_EXTENSION:return"scalar";case Kind.OBJECT_TYPE_EXTENSION:return"object";case Kind.INTERFACE_TYPE_EXTENSION:return"interface";case Kind.UNION_TYPE_EXTENSION:return"union";case Kind.ENUM_TYPE_EXTENSION:return"enum";case Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object"}invariant(0,"Unexpected kind: "+inspect(kind))}(node.kind);context.reportError(new GraphQLError_GraphQLError("Cannot extend non-".concat(kindStr,' type "').concat(typeName,'".'),defNode?[defNode,node]:node))}}else{var allTypeNames=Object.keys(definedTypes);schema&&(allTypeNames=allTypeNames.concat(Object.keys(schema.getTypeMap())));var suggestedTypes=suggestionList(typeName,allTypeNames);context.reportError(new GraphQLError_GraphQLError('Cannot extend type "'.concat(typeName,'" because it is not defined.')+didYouMean(suggestedTypes),node.name))}}}var defKindToExtKind=(PossibleTypeExtensionsRule_defineProperty(_defKindToExtKind={},Kind.SCALAR_TYPE_DEFINITION,Kind.SCALAR_TYPE_EXTENSION),PossibleTypeExtensionsRule_defineProperty(_defKindToExtKind,Kind.OBJECT_TYPE_DEFINITION,Kind.OBJECT_TYPE_EXTENSION),PossibleTypeExtensionsRule_defineProperty(_defKindToExtKind,Kind.INTERFACE_TYPE_DEFINITION,Kind.INTERFACE_TYPE_EXTENSION),PossibleTypeExtensionsRule_defineProperty(_defKindToExtKind,Kind.UNION_TYPE_DEFINITION,Kind.UNION_TYPE_EXTENSION),PossibleTypeExtensionsRule_defineProperty(_defKindToExtKind,Kind.ENUM_TYPE_DEFINITION,Kind.ENUM_TYPE_EXTENSION),PossibleTypeExtensionsRule_defineProperty(_defKindToExtKind,Kind.INPUT_OBJECT_TYPE_DEFINITION,Kind.INPUT_OBJECT_TYPE_EXTENSION),_defKindToExtKind),specifiedRules=Object.freeze([ExecutableDefinitionsRule,UniqueOperationNamesRule,LoneAnonymousOperationRule,SingleFieldSubscriptionsRule,KnownTypeNamesRule,FragmentsOnCompositeTypesRule,VariablesAreInputTypesRule,ScalarLeafsRule,FieldsOnCorrectTypeRule,UniqueFragmentNamesRule,KnownFragmentNamesRule,NoUnusedFragmentsRule,PossibleFragmentSpreadsRule,NoFragmentCyclesRule,UniqueVariableNamesRule,NoUndefinedVariablesRule,NoUnusedVariablesRule,KnownDirectivesRule,UniqueDirectivesPerLocationRule,KnownArgumentNamesRule,UniqueArgumentNamesRule,ValuesOfCorrectTypeRule,ProvidedRequiredArgumentsRule,VariablesInAllowedPositionRule,OverlappingFieldsCanBeMergedRule,UniqueInputFieldNamesRule]),specifiedSDLRules=Object.freeze([LoneSchemaDefinitionRule,UniqueOperationTypesRule,UniqueTypeNamesRule,UniqueEnumValueNamesRule,UniqueFieldDefinitionNamesRule,UniqueDirectiveNamesRule,KnownTypeNamesRule,KnownDirectivesRule,UniqueDirectivesPerLocationRule,PossibleTypeExtensionsRule,KnownArgumentNamesOnDirectivesRule,UniqueArgumentNamesRule,UniqueInputFieldNamesRule,ProvidedRequiredArgumentsOnDirectivesRule]);function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,subClass.__proto__=superClass}var ValidationContext_ASTValidationContext=function(){function ASTValidationContext(ast,onError){this._ast=ast,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=onError}var _proto=ASTValidationContext.prototype;return _proto.reportError=function(error){this._onError(error)},_proto.getDocument=function(){return this._ast},_proto.getFragment=function(name){var fragments=this._fragments;return fragments||(this._fragments=fragments=this.getDocument().definitions.reduce(function(frags,statement){return statement.kind===Kind.FRAGMENT_DEFINITION&&(frags[statement.name.value]=statement),frags},Object.create(null))),fragments[name]},_proto.getFragmentSpreads=function(node){var spreads=this._fragmentSpreads.get(node);if(!spreads){spreads=[];for(var setsToVisit=[node];0!==setsToVisit.length;)for(var set=setsToVisit.pop(),_i2=0,_set$selections2=set.selections;_i2<_set$selections2.length;_i2++){var selection=_set$selections2[_i2];selection.kind===Kind.FRAGMENT_SPREAD?spreads.push(selection):selection.selectionSet&&setsToVisit.push(selection.selectionSet)}this._fragmentSpreads.set(node,spreads)}return spreads},_proto.getRecursivelyReferencedFragments=function(operation){var fragments=this._recursivelyReferencedFragments.get(operation);if(!fragments){fragments=[];for(var collectedNames=Object.create(null),nodesToVisit=[operation.selectionSet];0!==nodesToVisit.length;)for(var node=nodesToVisit.pop(),_i4=0,_this$getFragmentSpre2=this.getFragmentSpreads(node);_i4<_this$getFragmentSpre2.length;_i4++){var fragName=_this$getFragmentSpre2[_i4].name.value;if(!0!==collectedNames[fragName]){collectedNames[fragName]=!0;var fragment=this.getFragment(fragName);fragment&&(fragments.push(fragment),nodesToVisit.push(fragment.selectionSet))}}this._recursivelyReferencedFragments.set(operation,fragments)}return fragments},ASTValidationContext}(),ValidationContext_SDLValidationContext=function(_ASTValidationContext){function SDLValidationContext(ast,schema,onError){var _this;return(_this=_ASTValidationContext.call(this,ast,onError)||this)._schema=schema,_this}return _inheritsLoose(SDLValidationContext,_ASTValidationContext),SDLValidationContext.prototype.getSchema=function(){return this._schema},SDLValidationContext}(ValidationContext_ASTValidationContext),ValidationContext_ValidationContext=function(_ASTValidationContext2){function ValidationContext(schema,ast,typeInfo,onError){var _this2;return(_this2=_ASTValidationContext2.call(this,ast,onError)||this)._schema=schema,_this2._typeInfo=typeInfo,_this2._variableUsages=new Map,_this2._recursiveVariableUsages=new Map,_this2}_inheritsLoose(ValidationContext,_ASTValidationContext2);var _proto3=ValidationContext.prototype;return _proto3.getSchema=function(){return this._schema},_proto3.getVariableUsages=function(node){var usages=this._variableUsages.get(node);if(!usages){var newUsages=[],typeInfo=new TypeInfo_TypeInfo(this._schema);visit(node,visitWithTypeInfo(typeInfo,{VariableDefinition:function(){return!1},Variable:function(variable){newUsages.push({node:variable,type:typeInfo.getInputType(),defaultValue:typeInfo.getDefaultValue()})}})),usages=newUsages,this._variableUsages.set(node,usages)}return usages},_proto3.getRecursiveVariableUsages=function(operation){var usages=this._recursiveVariableUsages.get(operation);if(!usages){usages=this.getVariableUsages(operation);for(var _i6=0,_this$getRecursivelyR2=this.getRecursivelyReferencedFragments(operation);_i6<_this$getRecursivelyR2.length;_i6++){var frag=_this$getRecursivelyR2[_i6];usages=usages.concat(this.getVariableUsages(frag))}this._recursiveVariableUsages.set(operation,usages)}return usages},_proto3.getType=function(){return this._typeInfo.getType()},_proto3.getParentType=function(){return this._typeInfo.getParentType()},_proto3.getInputType=function(){return this._typeInfo.getInputType()},_proto3.getParentInputType=function(){return this._typeInfo.getParentInputType()},_proto3.getFieldDef=function(){return this._typeInfo.getFieldDef()},_proto3.getDirective=function(){return this._typeInfo.getDirective()},_proto3.getArgument=function(){return this._typeInfo.getArgument()},_proto3.getEnumValue=function(){return this._typeInfo.getEnumValue()},ValidationContext}(ValidationContext_ASTValidationContext);function validate(schema,documentAST){var rules=arguments.length>2&&void 0!==arguments[2]?arguments[2]:specifiedRules,typeInfo=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new TypeInfo_TypeInfo(schema),options=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{maxErrors:void 0};documentAST||devAssert(0,"Must provide document."),assertValidSchema(schema);var abortObj=Object.freeze({}),errors=[],context=new ValidationContext_ValidationContext(schema,documentAST,typeInfo,function(error){if(null!=options.maxErrors&&errors.length>=options.maxErrors)throw errors.push(new GraphQLError_GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),abortObj;errors.push(error)}),visitor=visitInParallel(rules.map(function(rule){return rule(context)}));try{visit(documentAST,visitWithTypeInfo(typeInfo,visitor))}catch(e){if(e!==abortObj)throw e}return errors}function validateSDL(documentAST,schemaToExtend){var rules=arguments.length>2&&void 0!==arguments[2]?arguments[2]:specifiedSDLRules,errors=[],context=new ValidationContext_SDLValidationContext(documentAST,schemaToExtend,function(error){errors.push(error)});return visit(documentAST,visitInParallel(rules.map(function(rule){return rule(context)}))),errors}function addPath(prev,key,typename){return{prev:prev,key:key,typename:typename}}function pathToArray(path){for(var flattened=[],curr=path;curr;)flattened.push(curr.key),curr=curr.prev;return flattened.reverse()}function getOperationRootType(schema,operation){if("query"===operation.operation){var queryType=schema.getQueryType();if(!queryType)throw new GraphQLError_GraphQLError("Schema does not define the required query root type.",operation);return queryType}if("mutation"===operation.operation){var mutationType=schema.getMutationType();if(!mutationType)throw new GraphQLError_GraphQLError("Schema is not configured for mutations.",operation);return mutationType}if("subscription"===operation.operation){var subscriptionType=schema.getSubscriptionType();if(!subscriptionType)throw new GraphQLError_GraphQLError("Schema is not configured for subscriptions.",operation);return subscriptionType}throw new GraphQLError_GraphQLError("Can only have query, mutation and subscription operations.",operation)}function printPathArray(path){return path.map(function(key){return"number"==typeof key?"["+key.toString()+"]":"."+key}).join("")}function valueFromAST(valueNode,type,variables){if(valueNode){if(valueNode.kind===Kind.VARIABLE){var result,variableName=valueNode.name.value;if(null==variables||void 0===variables[variableName])return;var variableValue=variables[variableName];if(null===variableValue&&isNonNullType(type))return;return variableValue}if(isNonNullType(type)){if(valueNode.kind===Kind.NULL)return;return valueFromAST(valueNode,type.ofType,variables)}if(valueNode.kind===Kind.NULL)return null;if(isListType(type)){var itemType=type.ofType;if(valueNode.kind===Kind.LIST){for(var coercedValues=[],_i2=0,_valueNode$values2=valueNode.values;_i2<_valueNode$values2.length;_i2++){var itemNode=_valueNode$values2[_i2];if(isMissingVariable(itemNode,variables)){if(isNonNullType(itemType))return;coercedValues.push(null)}else{var itemValue=valueFromAST(itemNode,itemType,variables);if(void 0===itemValue)return;coercedValues.push(itemValue)}}return coercedValues}var coercedValue=valueFromAST(valueNode,itemType,variables);if(void 0===coercedValue)return;return[coercedValue]}if(isInputObjectType(type)){if(valueNode.kind!==Kind.OBJECT)return;for(var coercedObj=Object.create(null),fieldNodes=keyMap(valueNode.fields,function(field){return field.name.value}),_i4=0,_objectValues2=objectValues(type.getFields());_i4<_objectValues2.length;_i4++){var field=_objectValues2[_i4],fieldNode=fieldNodes[field.name];if(!fieldNode||isMissingVariable(fieldNode.value,variables)){if(void 0!==field.defaultValue)coercedObj[field.name]=field.defaultValue;else if(isNonNullType(field.type))return;continue}var fieldValue=valueFromAST(fieldNode.value,field.type,variables);if(void 0===fieldValue)return;coercedObj[field.name]=fieldValue}return coercedObj}if(isLeafType(type)){try{result=type.parseLiteral(valueNode,variables)}catch(_error){return}if(void 0===result)return;return result}invariant(0,"Unexpected input type: "+inspect(type))}}function isMissingVariable(valueNode,variables){return valueNode.kind===Kind.VARIABLE&&(null==variables||void 0===variables[valueNode.name.value])}function coerceInputValue(inputValue,type){var onError=arguments.length>2&&void 0!==arguments[2]?arguments[2]:defaultOnError;return function coerceInputValueImpl(inputValue,type,onError,path){if(isNonNullType(type))return null!=inputValue?coerceInputValueImpl(inputValue,type.ofType,onError,path):void onError(pathToArray(path),inputValue,new GraphQLError_GraphQLError('Expected non-nullable type "'.concat(inspect(type),'" not to be null.')));if(null==inputValue)return null;if(isListType(type)){var parseResult,itemType=type.ofType,coercedList=safeArrayFrom(inputValue,function(itemValue,index){return coerceInputValueImpl(itemValue,itemType,onError,addPath(path,index,void 0))});return null!=coercedList?coercedList:[coerceInputValueImpl(inputValue,itemType,onError,path)]}if(isInputObjectType(type)){if(!isObjectLike(inputValue))return void onError(pathToArray(path),inputValue,new GraphQLError_GraphQLError('Expected type "'.concat(type.name,'" to be an object.')));for(var coercedValue={},fieldDefs=type.getFields(),_i2=0,_objectValues2=objectValues(fieldDefs);_i2<_objectValues2.length;_i2++){var field=_objectValues2[_i2],fieldValue=inputValue[field.name];if(void 0===fieldValue){if(void 0!==field.defaultValue)coercedValue[field.name]=field.defaultValue;else if(isNonNullType(field.type)){var typeStr=inspect(field.type);onError(pathToArray(path),inputValue,new GraphQLError_GraphQLError('Field "'.concat(field.name,'" of required type "').concat(typeStr,'" was not provided.')))}continue}coercedValue[field.name]=coerceInputValueImpl(fieldValue,field.type,onError,addPath(path,field.name,type.name))}for(var _i4=0,_Object$keys2=Object.keys(inputValue);_i4<_Object$keys2.length;_i4++){var fieldName=_Object$keys2[_i4];if(!fieldDefs[fieldName]){var suggestions=suggestionList(fieldName,Object.keys(type.getFields()));onError(pathToArray(path),inputValue,new GraphQLError_GraphQLError('Field "'.concat(fieldName,'" is not defined by type "').concat(type.name,'".')+didYouMean(suggestions)))}}return coercedValue}if(isLeafType(type)){try{parseResult=type.parseValue(inputValue)}catch(error){error instanceof GraphQLError_GraphQLError?onError(pathToArray(path),inputValue,error):onError(pathToArray(path),inputValue,new GraphQLError_GraphQLError('Expected type "'.concat(type.name,'". ')+error.message,void 0,void 0,void 0,void 0,error));return}return void 0===parseResult&&onError(pathToArray(path),inputValue,new GraphQLError_GraphQLError('Expected type "'.concat(type.name,'".'))),parseResult}invariant(0,"Unexpected input type: "+inspect(type))}(inputValue,type,onError)}function defaultOnError(path,invalidValue,error){var errorPrefix="Invalid value "+inspect(invalidValue);throw path.length>0&&(errorPrefix+=' at "value'.concat(printPathArray(path),'"')),error.message=errorPrefix+": "+error.message,error}function getArgumentValues(def,node,variableValues){for(var _node$arguments,coercedValues={},argNodeMap=keyMap(null!=(_node$arguments=node.arguments)?_node$arguments:[],function(arg){return arg.name.value}),_i4=0,_def$args2=def.args;_i4<_def$args2.length;_i4++){var argDef=_def$args2[_i4],name=argDef.name,argType=argDef.type,argumentNode=argNodeMap[name];if(!argumentNode){if(void 0!==argDef.defaultValue)coercedValues[name]=argDef.defaultValue;else if(isNonNullType(argType))throw new GraphQLError_GraphQLError('Argument "'.concat(name,'" of required type "').concat(inspect(argType),'" ')+"was not provided.",node);continue}var valueNode=argumentNode.value,isNull=valueNode.kind===Kind.NULL;if(valueNode.kind===Kind.VARIABLE){var variableName=valueNode.name.value;if(null==variableValues||!values_hasOwnProperty(variableValues,variableName)){if(void 0!==argDef.defaultValue)coercedValues[name]=argDef.defaultValue;else if(isNonNullType(argType))throw new GraphQLError_GraphQLError('Argument "'.concat(name,'" of required type "').concat(inspect(argType),'" ')+'was provided the variable "$'.concat(variableName,'" which was not provided a runtime value.'),valueNode);continue}isNull=null==variableValues[variableName]}if(isNull&&isNonNullType(argType))throw new GraphQLError_GraphQLError('Argument "'.concat(name,'" of non-null type "').concat(inspect(argType),'" ')+"must not be null.",valueNode);var coercedValue=valueFromAST(valueNode,argType,variableValues);if(void 0===coercedValue)throw new GraphQLError_GraphQLError('Argument "'.concat(name,'" has invalid value ').concat(print(valueNode),"."),valueNode);coercedValues[name]=coercedValue}return coercedValues}function getDirectiveValues(directiveDef,node,variableValues){var directiveNode=node.directives&&find(node.directives,function(directive){return directive.name.value===directiveDef.name});if(directiveNode)return getArgumentValues(directiveDef,directiveNode,variableValues)}function values_hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}function execute(argsOrSchema,document1,rootValue,contextValue,variableValues,operationName,fieldResolver,typeResolver){return 1===arguments.length?executeImpl(argsOrSchema):executeImpl({schema:argsOrSchema,document:document1,rootValue:rootValue,contextValue:contextValue,variableValues:variableValues,operationName:operationName,fieldResolver:fieldResolver,typeResolver:typeResolver})}function executeSync(args){var result=executeImpl(args);if(isPromise(result))throw Error("GraphQL execution failed to complete synchronously.");return result}function executeImpl(args){var schema=args.schema,document1=args.document,rootValue=args.rootValue,contextValue=args.contextValue,variableValues=args.variableValues,operationName=args.operationName,fieldResolver=args.fieldResolver,typeResolver=args.typeResolver;assertValidExecutionArguments(schema,document1,variableValues);var exeContext=buildExecutionContext(schema,document1,rootValue,contextValue,variableValues,operationName,fieldResolver,typeResolver);if(Array.isArray(exeContext))return{errors:exeContext};var data=function(exeContext,operation,rootValue){var type=getOperationRootType(exeContext.schema,operation),fields=collectFields(exeContext,type,operation.selectionSet,Object.create(null),Object.create(null)),path=void 0;try{var exeContext1,parentType,sourceValue,path1,fields1,values,callback,initialValue,result="mutation"===operation.operation?(exeContext1=exeContext,parentType=type,sourceValue=rootValue,path1=path,fields1=fields,values=Object.keys(fields1),callback=function(results,responseName){var fieldNodes=fields1[responseName],fieldPath=addPath(path1,responseName,parentType.name),result=resolveField(exeContext1,parentType,sourceValue,fieldNodes,fieldPath);return void 0===result?results:isPromise(result)?result.then(function(resolvedResult){return results[responseName]=resolvedResult,results}):(results[responseName]=result,results)},initialValue=Object.create(null),values.reduce(function(previous,value1){return isPromise(previous)?previous.then(function(resolved){return callback(resolved,value1)}):callback(previous,value1)},initialValue)):executeFields(exeContext,type,rootValue,path,fields);if(isPromise(result))return result.then(void 0,function(error){return exeContext.errors.push(error),Promise.resolve(null)});return result}catch(error){return exeContext.errors.push(error),null}}(exeContext,exeContext.operation,rootValue);return function buildResponse(exeContext,data){return isPromise(data)?data.then(function(resolved){return buildResponse(exeContext,resolved)}):0===exeContext.errors.length?{data:data}:{errors:exeContext.errors,data:data}}(exeContext,data)}function assertValidExecutionArguments(schema,document1,rawVariableValues){document1||devAssert(0,"Must provide document."),assertValidSchema(schema),null==rawVariableValues||isObjectLike(rawVariableValues)||devAssert(0,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function buildExecutionContext(schema,document1,rootValue,contextValue,rawVariableValues,operationName,fieldResolver,typeResolver){for(var _definition$name,_operation$variableDe,operation,fragments=Object.create(null),_i2=0,_document$definitions2=document1.definitions;_i2<_document$definitions2.length;_i2++){var definition=_document$definitions2[_i2];switch(definition.kind){case Kind.OPERATION_DEFINITION:if(null==operationName){if(void 0!==operation)return[new GraphQLError_GraphQLError("Must provide operation name if query contains multiple operations.")];operation=definition}else(null==(_definition$name=definition.name)?void 0:_definition$name.value)===operationName&&(operation=definition);break;case Kind.FRAGMENT_DEFINITION:fragments[definition.name.value]=definition}}if(!operation)return null!=operationName?[new GraphQLError_GraphQLError('Unknown operation named "'.concat(operationName,'".'))]:[new GraphQLError_GraphQLError("Must provide an operation.")];var coercedVariableValues=function(schema,varDefNodes,inputs,options){var errors=[],maxErrors=null==options?void 0:options.maxErrors;try{var coerced=function(schema,varDefNodes,inputs,onError){for(var coercedValues={},_i2=0;_i2<varDefNodes.length;_i2++)if("continue"===function(_i2){var varDefNode=varDefNodes[_i2],varName=varDefNode.variable.name.value,varType=typeFromAST(schema,varDefNode.type);if(!isInputType(varType)){var varTypeStr=print(varDefNode.type);return onError(new GraphQLError_GraphQLError('Variable "$'.concat(varName,'" expected value of type "').concat(varTypeStr,'" which cannot be used as an input type.'),varDefNode.type)),"continue"}if(!values_hasOwnProperty(inputs,varName)){if(varDefNode.defaultValue)coercedValues[varName]=valueFromAST(varDefNode.defaultValue,varType);else if(isNonNullType(varType)){var _varTypeStr=inspect(varType);onError(new GraphQLError_GraphQLError('Variable "$'.concat(varName,'" of required type "').concat(_varTypeStr,'" was not provided.'),varDefNode))}return"continue"}var value1=inputs[varName];if(null===value1&&isNonNullType(varType)){var _varTypeStr2=inspect(varType);return onError(new GraphQLError_GraphQLError('Variable "$'.concat(varName,'" of non-null type "').concat(_varTypeStr2,'" must not be null.'),varDefNode)),"continue"}coercedValues[varName]=coerceInputValue(value1,varType,function(path,invalidValue,error){var prefix='Variable "$'.concat(varName,'" got invalid value ')+inspect(invalidValue);path.length>0&&(prefix+=' at "'.concat(varName).concat(printPathArray(path),'"')),onError(new GraphQLError_GraphQLError(prefix+"; "+error.message,varDefNode,void 0,void 0,void 0,error.originalError))})}(_i2))continue;return coercedValues}(schema,varDefNodes,inputs,function(error){if(null!=maxErrors&&errors.length>=maxErrors)throw new GraphQLError_GraphQLError("Too many errors processing variables, error limit reached. Execution aborted.");errors.push(error)});if(0===errors.length)return{coerced:coerced}}catch(error){errors.push(error)}return{errors:errors}}(schema,null!=(_operation$variableDe=operation.variableDefinitions)?_operation$variableDe:[],null!=rawVariableValues?rawVariableValues:{},{maxErrors:50});return coercedVariableValues.errors?coercedVariableValues.errors:{schema:schema,fragments:fragments,rootValue:rootValue,contextValue:contextValue,operation:operation,variableValues:coercedVariableValues.coerced,fieldResolver:null!=fieldResolver?fieldResolver:execute_defaultFieldResolver,typeResolver:null!=typeResolver?typeResolver:execute_defaultTypeResolver,errors:[]}}function executeFields(exeContext,parentType,sourceValue,path,fields){for(var keys,results=Object.create(null),containsPromise=!1,_i4=0,_Object$keys2=Object.keys(fields);_i4<_Object$keys2.length;_i4++){var responseName=_Object$keys2[_i4],fieldNodes=fields[responseName],fieldPath=addPath(path,responseName,parentType.name),result=resolveField(exeContext,parentType,sourceValue,fieldNodes,fieldPath);void 0!==result&&(results[responseName]=result,isPromise(result)&&(containsPromise=!0))}return containsPromise?Promise.all((keys=Object.keys(results)).map(function(name){return results[name]})).then(function(values){return values.reduce(function(resolvedObject,value1,i){return resolvedObject[keys[i]]=value1,resolvedObject},Object.create(null))}):results}function collectFields(exeContext,runtimeType,selectionSet,fields,visitedFragmentNames){for(var _i6=0,_selectionSet$selecti2=selectionSet.selections;_i6<_selectionSet$selecti2.length;_i6++){var selection=_selectionSet$selecti2[_i6];switch(selection.kind){case Kind.FIELD:if(!shouldIncludeNode(exeContext,selection))continue;var node,name=(node=selection).alias?node.alias.value:node.name.value;fields[name]||(fields[name]=[]),fields[name].push(selection);break;case Kind.INLINE_FRAGMENT:if(!shouldIncludeNode(exeContext,selection)||!doesFragmentConditionMatch(exeContext,selection,runtimeType))continue;collectFields(exeContext,runtimeType,selection.selectionSet,fields,visitedFragmentNames);break;case Kind.FRAGMENT_SPREAD:var fragName=selection.name.value;if(visitedFragmentNames[fragName]||!shouldIncludeNode(exeContext,selection))continue;visitedFragmentNames[fragName]=!0;var fragment=exeContext.fragments[fragName];if(!fragment||!doesFragmentConditionMatch(exeContext,fragment,runtimeType))continue;collectFields(exeContext,runtimeType,fragment.selectionSet,fields,visitedFragmentNames)}}return fields}function shouldIncludeNode(exeContext,node){var skip=getDirectiveValues(GraphQLSkipDirective,node,exeContext.variableValues);if((null==skip?void 0:skip.if)===!0)return!1;var include=getDirectiveValues(GraphQLIncludeDirective,node,exeContext.variableValues);return(null==include?void 0:include.if)!==!1}function doesFragmentConditionMatch(exeContext,fragment,type){var typeConditionNode=fragment.typeCondition;if(!typeConditionNode)return!0;var conditionalType=typeFromAST(exeContext.schema,typeConditionNode);return conditionalType===type||!!isAbstractType(conditionalType)&&exeContext.schema.isSubType(conditionalType,type)}function resolveField(exeContext,parentType,source,fieldNodes,path){var fieldName=fieldNodes[0].name.value,fieldDef=execute_getFieldDef(exeContext.schema,parentType,fieldName);if(fieldDef){var returnType=fieldDef.type,resolveFn=null!=(_fieldDef$resolve=fieldDef.resolve)?_fieldDef$resolve:exeContext.fieldResolver,info=buildResolveInfo(exeContext,fieldDef,fieldNodes,parentType,path);try{var _fieldDef$resolve,completed,args=getArgumentValues(fieldDef,fieldNodes[0],exeContext.variableValues),_contextValue=exeContext.contextValue,result=resolveFn(source,args,_contextValue,info);if(completed=isPromise(result)?result.then(function(resolved){return completeValue(exeContext,returnType,fieldNodes,info,path,resolved)}):completeValue(exeContext,returnType,fieldNodes,info,path,result),isPromise(completed))return completed.then(void 0,function(rawError){var error=locatedError(rawError,fieldNodes,pathToArray(path));return handleFieldError(error,returnType,exeContext)});return completed}catch(rawError){return handleFieldError(locatedError(rawError,fieldNodes,pathToArray(path)),returnType,exeContext)}}}function buildResolveInfo(exeContext,fieldDef,fieldNodes,parentType,path){return{fieldName:fieldDef.name,fieldNodes:fieldNodes,returnType:fieldDef.type,parentType:parentType,path:path,schema:exeContext.schema,fragments:exeContext.fragments,rootValue:exeContext.rootValue,operation:exeContext.operation,variableValues:exeContext.variableValues}}function handleFieldError(error,returnType,exeContext){if(isNonNullType(returnType))throw error;return exeContext.errors.push(error),null}function completeValue(exeContext,returnType,fieldNodes,info,path,result){if(result instanceof Error)throw result;if(isNonNullType(returnType)){var exeContext1,returnType1,fieldNodes1,info1,path1,result1,_returnType$resolveTy,runtimeType,completed=completeValue(exeContext,returnType.ofType,fieldNodes,info,path,result);if(null===completed)throw Error("Cannot return null for non-nullable field ".concat(info.parentType.name,".").concat(info.fieldName,"."));return completed}return null==result?null:isListType(returnType)?function(exeContext,returnType,fieldNodes,info,path,result){var itemType=returnType.ofType,containsPromise=!1,completedResults=safeArrayFrom(result,function(item,index){var completedItem,itemPath=addPath(path,index,void 0);try{if(completedItem=isPromise(item)?item.then(function(resolved){return completeValue(exeContext,itemType,fieldNodes,info,itemPath,resolved)}):completeValue(exeContext,itemType,fieldNodes,info,itemPath,item),isPromise(completedItem))return containsPromise=!0,completedItem.then(void 0,function(rawError){var error=locatedError(rawError,fieldNodes,pathToArray(itemPath));return handleFieldError(error,itemType,exeContext)});return completedItem}catch(rawError){return handleFieldError(locatedError(rawError,fieldNodes,pathToArray(itemPath)),itemType,exeContext)}});if(null==completedResults)throw new GraphQLError_GraphQLError('Expected Iterable, but did not find one for field "'.concat(info.parentType.name,".").concat(info.fieldName,'".'));return containsPromise?Promise.all(completedResults):completedResults}(exeContext,returnType,fieldNodes,info,path,result):isLeafType(returnType)?function(returnType,result){var serializedResult=returnType.serialize(result);if(void 0===serializedResult)throw Error('Expected a value of type "'.concat(inspect(returnType),'" but ')+"received: ".concat(inspect(result)));return serializedResult}(returnType,result):isAbstractType(returnType)?(exeContext1=exeContext,returnType1=returnType,fieldNodes1=fieldNodes,info1=info,path1=path,result1=result,isPromise(runtimeType=(null!=(_returnType$resolveTy=returnType1.resolveType)?_returnType$resolveTy:exeContext1.typeResolver)(result1,exeContext1.contextValue,info1,returnType1))?runtimeType.then(function(resolvedRuntimeType){return completeObjectValue(exeContext1,ensureValidRuntimeType(resolvedRuntimeType,exeContext1,returnType1,fieldNodes1,info1,result1),fieldNodes1,info1,path1,result1)}):completeObjectValue(exeContext1,ensureValidRuntimeType(runtimeType,exeContext1,returnType1,fieldNodes1,info1,result1),fieldNodes1,info1,path1,result1)):isObjectType(returnType)?completeObjectValue(exeContext,returnType,fieldNodes,info,path,result):void invariant(0,"Cannot complete value of unexpected output type: "+inspect(returnType))}function ensureValidRuntimeType(runtimeTypeOrName,exeContext,returnType,fieldNodes,info,result){if(null==runtimeTypeOrName)throw new GraphQLError_GraphQLError('Abstract type "'.concat(returnType.name,'" must resolve to an Object type at runtime for field "').concat(info.parentType.name,".").concat(info.fieldName,'". Either the "').concat(returnType.name,'" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.'),fieldNodes);var runtimeTypeName=isNamedType(runtimeTypeOrName)?runtimeTypeOrName.name:runtimeTypeOrName;if("string"!=typeof runtimeTypeName)throw new GraphQLError_GraphQLError('Abstract type "'.concat(returnType.name,'" must resolve to an Object type at runtime for field "').concat(info.parentType.name,".").concat(info.fieldName,'" with ')+"value ".concat(inspect(result),', received "').concat(inspect(runtimeTypeOrName),'".'));var runtimeType=exeContext.schema.getType(runtimeTypeName);if(null==runtimeType)throw new GraphQLError_GraphQLError('Abstract type "'.concat(returnType.name,'" was resolve to a type "').concat(runtimeTypeName,'" that does not exist inside schema.'),fieldNodes);if(!isObjectType(runtimeType))throw new GraphQLError_GraphQLError('Abstract type "'.concat(returnType.name,'" was resolve to a non-object type "').concat(runtimeTypeName,'".'),fieldNodes);if(!exeContext.schema.isSubType(returnType,runtimeType))throw new GraphQLError_GraphQLError('Runtime Object type "'.concat(runtimeType.name,'" is not a possible type for "').concat(returnType.name,'".'),fieldNodes);return runtimeType}function completeObjectValue(exeContext,returnType,fieldNodes,info,path,result){if(returnType.isTypeOf){var isTypeOf=returnType.isTypeOf(result,exeContext.contextValue,info);if(isPromise(isTypeOf))return isTypeOf.then(function(resolvedIsTypeOf){if(!resolvedIsTypeOf)throw invalidReturnTypeError(returnType,result,fieldNodes);return collectAndExecuteSubfields(exeContext,returnType,fieldNodes,path,result)});if(!isTypeOf)throw invalidReturnTypeError(returnType,result,fieldNodes)}return collectAndExecuteSubfields(exeContext,returnType,fieldNodes,path,result)}function invalidReturnTypeError(returnType,result,fieldNodes){return new GraphQLError_GraphQLError('Expected value of type "'.concat(returnType.name,'" but got: ').concat(inspect(result),"."),fieldNodes)}function collectAndExecuteSubfields(exeContext,returnType,fieldNodes,path,result){var subFieldNodes=collectSubfields(exeContext,returnType,fieldNodes);return executeFields(exeContext,returnType,result,path,subFieldNodes)}var collectSubfields=(fn=function(exeContext,returnType,fieldNodes){for(var subFieldNodes=Object.create(null),visitedFragmentNames=Object.create(null),_i8=0;_i8<fieldNodes.length;_i8++){var node=fieldNodes[_i8];node.selectionSet&&(subFieldNodes=collectFields(exeContext,returnType,node.selectionSet,subFieldNodes,visitedFragmentNames))}return subFieldNodes},function(a1,a2,a3){cache0||(cache0=new WeakMap);var cache2,cache1=cache0.get(a1);if(cache1){if(cache2=cache1.get(a2)){var cachedValue=cache2.get(a3);if(void 0!==cachedValue)return cachedValue}}else cache1=new WeakMap,cache0.set(a1,cache1);cache2||(cache2=new WeakMap,cache1.set(a2,cache2));var newValue=fn(a1,a2,a3);return cache2.set(a3,newValue),newValue}),execute_defaultTypeResolver=function(value1,contextValue,info,abstractType){if(isObjectLike(value1)&&"string"==typeof value1.__typename)return value1.__typename;for(var possibleTypes=info.schema.getPossibleTypes(abstractType),promisedIsTypeOfResults=[],i=0;i<possibleTypes.length;i++){var type=possibleTypes[i];if(type.isTypeOf){var isTypeOfResult=type.isTypeOf(value1,contextValue,info);if(isPromise(isTypeOfResult))promisedIsTypeOfResults[i]=isTypeOfResult;else if(isTypeOfResult)return type.name}}if(promisedIsTypeOfResults.length)return Promise.all(promisedIsTypeOfResults).then(function(isTypeOfResults){for(var _i9=0;_i9<isTypeOfResults.length;_i9++)if(isTypeOfResults[_i9])return possibleTypes[_i9].name})},execute_defaultFieldResolver=function(source,args,contextValue,info){if(isObjectLike(source)||"function"==typeof source){var property=source[info.fieldName];return"function"==typeof property?source[info.fieldName](args,contextValue,info):property}};function execute_getFieldDef(schema,parentType,fieldName){return fieldName===SchemaMetaFieldDef.name&&schema.getQueryType()===parentType?SchemaMetaFieldDef:fieldName===TypeMetaFieldDef.name&&schema.getQueryType()===parentType?TypeMetaFieldDef:fieldName===TypeNameMetaFieldDef.name?TypeNameMetaFieldDef:parentType.getFields()[fieldName]}function graphql(argsOrSchema,source,rootValue,contextValue,variableValues,operationName,fieldResolver,typeResolver){var _arguments=arguments;return new Promise(function(resolve){return resolve(1===_arguments.length?graphqlImpl(argsOrSchema):graphqlImpl({schema:argsOrSchema,source:source,rootValue:rootValue,contextValue:contextValue,variableValues:variableValues,operationName:operationName,fieldResolver:fieldResolver,typeResolver:typeResolver}))})}function graphqlSync(argsOrSchema,source,rootValue,contextValue,variableValues,operationName,fieldResolver,typeResolver){var result=1===arguments.length?graphqlImpl(argsOrSchema):graphqlImpl({schema:argsOrSchema,source:source,rootValue:rootValue,contextValue:contextValue,variableValues:variableValues,operationName:operationName,fieldResolver:fieldResolver,typeResolver:typeResolver});if(isPromise(result))throw Error("GraphQL execution failed to complete synchronously.");return result}function graphqlImpl(args){var document1,schema=args.schema,source=args.source,rootValue=args.rootValue,contextValue=args.contextValue,variableValues=args.variableValues,operationName=args.operationName,fieldResolver=args.fieldResolver,typeResolver=args.typeResolver,schemaValidationErrors=validateSchema(schema);if(schemaValidationErrors.length>0)return{errors:schemaValidationErrors};try{document1=parse(source)}catch(syntaxError){return{errors:[syntaxError]}}var validationErrors=validate(schema,document1);return validationErrors.length>0?{errors:validationErrors}:execute({schema:schema,document:document1,rootValue:rootValue,contextValue:contextValue,variableValues:variableValues,operationName:operationName,fieldResolver:fieldResolver,typeResolver:typeResolver})}function isAsyncIterable(maybeAsyncIterable){return"function"==typeof(null==maybeAsyncIterable?void 0:maybeAsyncIterable[SYMBOL_ASYNC_ITERATOR])}function asyncMapValue(value1,callback){return new Promise(function(resolve){return resolve(callback(value1))})}function iteratorResult(value1){return{value:value1,done:!1}}function subscribe(argsOrSchema,document1,rootValue,contextValue,variableValues,operationName,fieldResolver,subscribeFieldResolver){return 1===arguments.length?subscribeImpl(argsOrSchema):subscribeImpl({schema:argsOrSchema,document:document1,rootValue:rootValue,contextValue:contextValue,variableValues:variableValues,operationName:operationName,fieldResolver:fieldResolver,subscribeFieldResolver:subscribeFieldResolver})}function reportGraphQLError(error){if(error instanceof GraphQLError_GraphQLError)return{errors:[error]};throw error}function subscribeImpl(args){var schema=args.schema,document1=args.document,rootValue=args.rootValue,contextValue=args.contextValue,variableValues=args.variableValues,operationName=args.operationName,fieldResolver=args.fieldResolver,sourcePromise=createSourceEventStream(schema,document1,rootValue,contextValue,variableValues,operationName,args.subscribeFieldResolver),mapSourceToResponse=function(payload){return execute({schema:schema,document:document1,rootValue:payload,contextValue:contextValue,variableValues:variableValues,operationName:operationName,fieldResolver:fieldResolver})};return sourcePromise.then(function(resultOrStream){return isAsyncIterable(resultOrStream)?function(iterable,callback,rejectCallback){var $return,abruptClose,mapReject,obj,value1,iterator=iterable[SYMBOL_ASYNC_ITERATOR].call(iterable);function mapResult(result){return result.done?result:asyncMapValue(result.value,callback).then(iteratorResult,abruptClose)}return"function"==typeof iterator.return&&($return=iterator.return,abruptClose=function(error){var rethrow=function(){return Promise.reject(error)};return $return.call(iterator).then(rethrow,rethrow)}),rejectCallback&&(mapReject=function(error){return asyncMapValue(error,rejectCallback).then(iteratorResult,abruptClose)}),value1=function(){return this},SYMBOL_ASYNC_ITERATOR in(obj={next:function(){return iterator.next().then(mapResult,mapReject)},return:function(){return $return?$return.call(iterator).then(mapResult,mapReject):Promise.resolve({value:void 0,done:!0})},throw:function(error){return"function"==typeof iterator.throw?iterator.throw(error).then(mapResult,mapReject):Promise.reject(error).catch(abruptClose)}})?Object.defineProperty(obj,SYMBOL_ASYNC_ITERATOR,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[SYMBOL_ASYNC_ITERATOR]=value1,obj}(resultOrStream,mapSourceToResponse,reportGraphQLError):resultOrStream})}function createSourceEventStream(schema,document1,rootValue,contextValue,variableValues,operationName,fieldResolver){return assertValidExecutionArguments(schema,document1,variableValues),new Promise(function(resolve){var exeContext=buildExecutionContext(schema,document1,rootValue,contextValue,variableValues,operationName,fieldResolver);resolve(Array.isArray(exeContext)?{errors:exeContext}:function(exeContext){var schema=exeContext.schema,operation=exeContext.operation,variableValues=exeContext.variableValues,rootValue=exeContext.rootValue,type=getOperationRootType(schema,operation),fields=collectFields(exeContext,type,operation.selectionSet,Object.create(null),Object.create(null)),responseName=Object.keys(fields)[0],fieldNodes=fields[responseName],fieldName=fieldNodes[0].name.value,fieldDef=execute_getFieldDef(schema,type,fieldName);if(!fieldDef)throw new GraphQLError_GraphQLError('The subscription field "'.concat(fieldName,'" is not defined.'),fieldNodes);var path=addPath(void 0,responseName,type.name),info=buildResolveInfo(exeContext,fieldDef,fieldNodes,type,path);return new Promise(function(resolveResult){var _fieldDef$subscribe,args=getArgumentValues(fieldDef,fieldNodes[0],variableValues),contextValue=exeContext.contextValue;resolveResult((null!=(_fieldDef$subscribe=fieldDef.subscribe)?_fieldDef$subscribe:exeContext.fieldResolver)(rootValue,args,contextValue,info))}).then(function(eventStream){if(eventStream instanceof Error)throw locatedError(eventStream,fieldNodes,pathToArray(path));if(!isAsyncIterable(eventStream))throw Error("Subscription field must return Async Iterable. "+"Received: ".concat(inspect(eventStream),"."));return eventStream},function(error){throw locatedError(error,fieldNodes,pathToArray(path))})}(exeContext))}).catch(reportGraphQLError)}function NoDeprecatedCustomRule(context){return{Field:function(node){var fieldDef=context.getFieldDef(),deprecationReason=null==fieldDef?void 0:fieldDef.deprecationReason;if(fieldDef&&null!=deprecationReason){var parentType=context.getParentType();null!=parentType||invariant(0),context.reportError(new GraphQLError_GraphQLError("The field ".concat(parentType.name,".").concat(fieldDef.name," is deprecated. ").concat(deprecationReason),node))}},Argument:function(node){var argDef=context.getArgument(),deprecationReason=null==argDef?void 0:argDef.deprecationReason;if(argDef&&null!=deprecationReason){var directiveDef=context.getDirective();if(null!=directiveDef)context.reportError(new GraphQLError_GraphQLError('Directive "@'.concat(directiveDef.name,'" argument "').concat(argDef.name,'" is deprecated. ').concat(deprecationReason),node));else{var parentType=context.getParentType(),fieldDef=context.getFieldDef();null!=parentType&&null!=fieldDef||invariant(0),context.reportError(new GraphQLError_GraphQLError('Field "'.concat(parentType.name,".").concat(fieldDef.name,'" argument "').concat(argDef.name,'" is deprecated. ').concat(deprecationReason),node))}}},ObjectField:function(node){var inputObjectDef=definition_getNamedType(context.getParentInputType());if(isInputObjectType(inputObjectDef)){var inputFieldDef=inputObjectDef.getFields()[node.name.value],deprecationReason=null==inputFieldDef?void 0:inputFieldDef.deprecationReason;null!=deprecationReason&&context.reportError(new GraphQLError_GraphQLError("The input field ".concat(inputObjectDef.name,".").concat(inputFieldDef.name," is deprecated. ").concat(deprecationReason),node))}},EnumValue:function(node){var enumValueDef=context.getEnumValue(),deprecationReason=null==enumValueDef?void 0:enumValueDef.deprecationReason;if(enumValueDef&&null!=deprecationReason){var enumTypeDef=definition_getNamedType(context.getInputType());null!=enumTypeDef||invariant(0),context.reportError(new GraphQLError_GraphQLError('The enum value "'.concat(enumTypeDef.name,".").concat(enumValueDef.name,'" is deprecated. ').concat(deprecationReason),node))}}}}function NoSchemaIntrospectionCustomRule(context){return{Field:function(node){var type=definition_getNamedType(context.getType());type&&isIntrospectionType(type)&&context.reportError(new GraphQLError_GraphQLError('GraphQL introspection has been disabled, but the requested query contained the field "'.concat(node.name.value,'".'),node))}}}function formatError(error){error||devAssert(0,"Received null or undefined error.");var _error$message,message=null!=(_error$message=error.message)?_error$message:"An unknown error occurred.",locations=error.locations,path=error.path,extensions=error.extensions;return extensions&&Object.keys(extensions).length>0?{message:message,locations:locations,path:path,extensions:extensions}:{message:message,locations:locations,path:path}}function getIntrospectionQuery_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function getIntrospectionQuery(options){var optionsWithDefault=function(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?getIntrospectionQuery_ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):getIntrospectionQuery_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1},options),descriptions=optionsWithDefault.descriptions?"description":"",specifiedByUrl=optionsWithDefault.specifiedByUrl?"specifiedByUrl":"",directiveIsRepeatable=optionsWithDefault.directiveIsRepeatable?"isRepeatable":"",schemaDescription=optionsWithDefault.schemaDescription?descriptions:"";function inputDeprecation(str){return optionsWithDefault.inputValueDeprecation?str:""}return"\n query IntrospectionQuery {\n __schema {\n ".concat(schemaDescription,"\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n ").concat(descriptions,"\n ").concat(directiveIsRepeatable,"\n locations\n args").concat(inputDeprecation("(includeDeprecated: true)")," {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n ").concat(descriptions,"\n ").concat(specifiedByUrl,"\n fields(includeDeprecated: true) {\n name\n ").concat(descriptions,"\n args").concat(inputDeprecation("(includeDeprecated: true)")," {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields").concat(inputDeprecation("(includeDeprecated: true)")," {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n ").concat(descriptions,"\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n ").concat(descriptions,"\n type { ...TypeRef }\n defaultValue\n ").concat(inputDeprecation("isDeprecated"),"\n ").concat(inputDeprecation("deprecationReason"),"\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n ")}function getOperationAST(documentAST,operationName){for(var operation=null,_i2=0,_documentAST$definiti2=documentAST.definitions;_i2<_documentAST$definiti2.length;_i2++){var _definition$name,definition=_documentAST$definiti2[_i2];if(definition.kind===Kind.OPERATION_DEFINITION){if(null==operationName){if(operation)return null;operation=definition}else if((null==(_definition$name=definition.name)?void 0:_definition$name.value)===operationName)return definition}}return operation}function introspectionFromSchema_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function introspectionFromSchema(schema,options){var result=executeSync({schema:schema,document:parse(getIntrospectionQuery(function(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?introspectionFromSchema_ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):introspectionFromSchema_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0},options)))});return!result.errors&&result.data||invariant(0),result.data}function buildClientSchema(introspection,options){isObjectLike(introspection)&&isObjectLike(introspection.__schema)||devAssert(0,'Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: '.concat(inspect(introspection),"."));for(var schemaIntrospection=introspection.__schema,typeMap=keyValMap(schemaIntrospection.types,function(typeIntrospection){return typeIntrospection.name},function(typeIntrospection){return function(type){if(null!=type&&null!=type.name&&null!=type.kind)switch(type.kind){case TypeKind.SCALAR:return new definition_GraphQLScalarType({name:(scalarIntrospection=type).name,description:scalarIntrospection.description,specifiedByUrl:scalarIntrospection.specifiedByUrl});case TypeKind.OBJECT:return new definition_GraphQLObjectType({name:(objectIntrospection=type).name,description:objectIntrospection.description,interfaces:function(){return buildImplementationsList(objectIntrospection)},fields:function(){return buildFieldDefMap(objectIntrospection)}});case TypeKind.INTERFACE:return new definition_GraphQLInterfaceType({name:(interfaceIntrospection=type).name,description:interfaceIntrospection.description,interfaces:function(){return buildImplementationsList(interfaceIntrospection)},fields:function(){return buildFieldDefMap(interfaceIntrospection)}});case TypeKind.UNION:var scalarIntrospection,objectIntrospection,interfaceIntrospection,unionIntrospection=type;if(!unionIntrospection.possibleTypes){var unionIntrospectionStr=inspect(unionIntrospection);throw Error("Introspection result missing possibleTypes: ".concat(unionIntrospectionStr,"."))}return new definition_GraphQLUnionType({name:unionIntrospection.name,description:unionIntrospection.description,types:function(){return unionIntrospection.possibleTypes.map(getObjectType)}});case TypeKind.ENUM:var enumIntrospection=type;if(!enumIntrospection.enumValues){var enumIntrospectionStr=inspect(enumIntrospection);throw Error("Introspection result missing enumValues: ".concat(enumIntrospectionStr,"."))}return new definition_GraphQLEnumType({name:enumIntrospection.name,description:enumIntrospection.description,values:keyValMap(enumIntrospection.enumValues,function(valueIntrospection){return valueIntrospection.name},function(valueIntrospection){return{description:valueIntrospection.description,deprecationReason:valueIntrospection.deprecationReason}})});case TypeKind.INPUT_OBJECT:var inputObjectIntrospection=type;if(!inputObjectIntrospection.inputFields){var inputObjectIntrospectionStr=inspect(inputObjectIntrospection);throw Error("Introspection result missing inputFields: ".concat(inputObjectIntrospectionStr,"."))}return new definition_GraphQLInputObjectType({name:inputObjectIntrospection.name,description:inputObjectIntrospection.description,fields:function(){return buildInputValueDefMap(inputObjectIntrospection.inputFields)}})}var typeStr=inspect(type);throw Error("Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ".concat(typeStr,"."))}(typeIntrospection)}),_i2=0,_ref2=[].concat(specifiedScalarTypes,introspectionTypes);_i2<_ref2.length;_i2++){var stdType=_ref2[_i2];typeMap[stdType.name]&&(typeMap[stdType.name]=stdType)}var queryType=schemaIntrospection.queryType?getObjectType(schemaIntrospection.queryType):null,mutationType=schemaIntrospection.mutationType?getObjectType(schemaIntrospection.mutationType):null,subscriptionType=schemaIntrospection.subscriptionType?getObjectType(schemaIntrospection.subscriptionType):null,directives=schemaIntrospection.directives?schemaIntrospection.directives.map(function(directiveIntrospection){if(!directiveIntrospection.args){var directiveIntrospectionStr=inspect(directiveIntrospection);throw Error("Introspection result missing directive args: ".concat(directiveIntrospectionStr,"."))}if(!directiveIntrospection.locations){var _directiveIntrospectionStr=inspect(directiveIntrospection);throw Error("Introspection result missing directive locations: ".concat(_directiveIntrospectionStr,"."))}return new directives_GraphQLDirective({name:directiveIntrospection.name,description:directiveIntrospection.description,isRepeatable:directiveIntrospection.isRepeatable,locations:directiveIntrospection.locations.slice(),args:buildInputValueDefMap(directiveIntrospection.args)})}):[];return new schema_GraphQLSchema({description:schemaIntrospection.description,query:queryType,mutation:mutationType,subscription:subscriptionType,types:objectValues(typeMap),directives:directives,assumeValid:null==options?void 0:options.assumeValid});function getType(typeRef){if(typeRef.kind===TypeKind.LIST){var itemRef=typeRef.ofType;if(!itemRef)throw Error("Decorated type deeper than introspection query.");return new GraphQLList(getType(itemRef))}if(typeRef.kind===TypeKind.NON_NULL){var nullableRef=typeRef.ofType;if(!nullableRef)throw Error("Decorated type deeper than introspection query.");return new GraphQLNonNull(assertNullableType(getType(nullableRef)))}return getNamedType(typeRef)}function getNamedType(typeRef){var typeName=typeRef.name;if(!typeName)throw Error("Unknown type reference: ".concat(inspect(typeRef),"."));var type=typeMap[typeName];if(!type)throw Error("Invalid or incomplete schema, unknown type: ".concat(typeName,". Ensure that a full introspection query is used in order to build a client schema."));return type}function getObjectType(typeRef){return assertObjectType(getNamedType(typeRef))}function getInterfaceType(typeRef){return assertInterfaceType(getNamedType(typeRef))}function buildImplementationsList(implementingIntrospection){if(null===implementingIntrospection.interfaces&&implementingIntrospection.kind===TypeKind.INTERFACE)return[];if(!implementingIntrospection.interfaces){var implementingIntrospectionStr=inspect(implementingIntrospection);throw Error("Introspection result missing interfaces: ".concat(implementingIntrospectionStr,"."))}return implementingIntrospection.interfaces.map(getInterfaceType)}function buildFieldDefMap(typeIntrospection){if(!typeIntrospection.fields)throw Error("Introspection result missing fields: ".concat(inspect(typeIntrospection),"."));return keyValMap(typeIntrospection.fields,function(fieldIntrospection){return fieldIntrospection.name},buildField)}function buildField(fieldIntrospection){var type=getType(fieldIntrospection.type);if(!isOutputType(type)){var typeStr=inspect(type);throw Error("Introspection must provide output type for fields, but received: ".concat(typeStr,"."))}if(!fieldIntrospection.args){var fieldIntrospectionStr=inspect(fieldIntrospection);throw Error("Introspection result missing field args: ".concat(fieldIntrospectionStr,"."))}return{description:fieldIntrospection.description,deprecationReason:fieldIntrospection.deprecationReason,type:type,args:buildInputValueDefMap(fieldIntrospection.args)}}function buildInputValueDefMap(inputValueIntrospections){return keyValMap(inputValueIntrospections,function(inputValue){return inputValue.name},buildInputValue)}function buildInputValue(inputValueIntrospection){var type=getType(inputValueIntrospection.type);if(!isInputType(type)){var typeStr=inspect(type);throw Error("Introspection must provide input type for arguments, but received: ".concat(typeStr,"."))}var defaultValue=null!=inputValueIntrospection.defaultValue?valueFromAST(parser_parseValue(inputValueIntrospection.defaultValue),type):void 0;return{description:inputValueIntrospection.description,type:type,defaultValue:defaultValue,deprecationReason:inputValueIntrospection.deprecationReason}}}function extendSchema_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function extendSchema_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?extendSchema_ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):extendSchema_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function extendSchema(schema,documentAST,options){assertSchema(schema),null!=documentAST&&documentAST.kind===Kind.DOCUMENT||devAssert(0,"Must provide valid Document AST."),(null==options?void 0:options.assumeValid)!==!0&&(null==options?void 0:options.assumeValidSDL)!==!0&&function(documentAST,schema){var errors=validateSDL(documentAST,schema);if(0!==errors.length)throw Error(errors.map(function(error){return error.message}).join("\n\n"))}(documentAST,schema);var schemaConfig=schema.toConfig(),extendedConfig=extendSchemaImpl(schemaConfig,documentAST,options);return schemaConfig===extendedConfig?schema:new schema_GraphQLSchema(extendedConfig)}function extendSchemaImpl(schemaConfig,documentAST,options){for(var typeDefs=[],typeExtensionsMap=Object.create(null),directiveDefs=[],schemaExtensions=[],_i2=0,_documentAST$definiti2=documentAST.definitions;_i2<_documentAST$definiti2.length;_i2++){var def=_documentAST$definiti2[_i2];if(def.kind===Kind.SCHEMA_DEFINITION)schemaDef=def;else if(def.kind===Kind.SCHEMA_EXTENSION)schemaExtensions.push(def);else if(isTypeDefinitionNode(def))typeDefs.push(def);else if(isTypeExtensionNode(def)){var extendedTypeName=def.name.value,existingTypeExtensions=typeExtensionsMap[extendedTypeName];typeExtensionsMap[extendedTypeName]=existingTypeExtensions?existingTypeExtensions.concat([def]):[def]}else def.kind===Kind.DIRECTIVE_DEFINITION&&directiveDefs.push(def)}if(0===Object.keys(typeExtensionsMap).length&&0===typeDefs.length&&0===directiveDefs.length&&0===schemaExtensions.length&&null==schemaDef)return schemaConfig;for(var typeMap=Object.create(null),_i4=0,_schemaConfig$types2=schemaConfig.types;_i4<_schemaConfig$types2.length;_i4++){var type,existingType=_schemaConfig$types2[_i4];typeMap[existingType.name]=isIntrospectionType(type=existingType)||isSpecifiedScalarType(type)?type:isScalarType(type)?function(type){for(var _typeExtensionsMap$co2,_getSpecifiedByUrl,config=type.toConfig(),extensions=null!=(_typeExtensionsMap$co2=typeExtensionsMap[config.name])?_typeExtensionsMap$co2:[],specifiedByUrl=config.specifiedByUrl,_i8=0;_i8<extensions.length;_i8++)specifiedByUrl=null!=(_getSpecifiedByUrl=getSpecifiedByUrl(extensions[_i8]))?_getSpecifiedByUrl:specifiedByUrl;return new definition_GraphQLScalarType(extendSchema_objectSpread(extendSchema_objectSpread({},config),{},{specifiedByUrl:specifiedByUrl,extensionASTNodes:config.extensionASTNodes.concat(extensions)}))}(type):isObjectType(type)?function(type){var _typeExtensionsMap$co3,config=type.toConfig(),extensions=null!=(_typeExtensionsMap$co3=typeExtensionsMap[config.name])?_typeExtensionsMap$co3:[];return new definition_GraphQLObjectType(extendSchema_objectSpread(extendSchema_objectSpread({},config),{},{interfaces:function(){return[].concat(type.getInterfaces().map(replaceNamedType),buildInterfaces(extensions))},fields:function(){return extendSchema_objectSpread(extendSchema_objectSpread({},mapValue(config.fields,extendField)),buildFieldMap(extensions))},extensionASTNodes:config.extensionASTNodes.concat(extensions)}))}(type):isInterfaceType(type)?function(type){var _typeExtensionsMap$co4,config=type.toConfig(),extensions=null!=(_typeExtensionsMap$co4=typeExtensionsMap[config.name])?_typeExtensionsMap$co4:[];return new definition_GraphQLInterfaceType(extendSchema_objectSpread(extendSchema_objectSpread({},config),{},{interfaces:function(){return[].concat(type.getInterfaces().map(replaceNamedType),buildInterfaces(extensions))},fields:function(){return extendSchema_objectSpread(extendSchema_objectSpread({},mapValue(config.fields,extendField)),buildFieldMap(extensions))},extensionASTNodes:config.extensionASTNodes.concat(extensions)}))}(type):isUnionType(type)?function(type){var _typeExtensionsMap$co5,config=type.toConfig(),extensions=null!=(_typeExtensionsMap$co5=typeExtensionsMap[config.name])?_typeExtensionsMap$co5:[];return new definition_GraphQLUnionType(extendSchema_objectSpread(extendSchema_objectSpread({},config),{},{types:function(){return[].concat(type.getTypes().map(replaceNamedType),buildUnionTypes(extensions))},extensionASTNodes:config.extensionASTNodes.concat(extensions)}))}(type):isEnumType(type)?function(type){var _typeExtensionsMap$ty,config=type.toConfig(),extensions=null!=(_typeExtensionsMap$ty=typeExtensionsMap[type.name])?_typeExtensionsMap$ty:[];return new definition_GraphQLEnumType(extendSchema_objectSpread(extendSchema_objectSpread({},config),{},{values:extendSchema_objectSpread(extendSchema_objectSpread({},config.values),buildEnumValueMap(extensions)),extensionASTNodes:config.extensionASTNodes.concat(extensions)}))}(type):isInputObjectType(type)?function(type){var _typeExtensionsMap$co,config=type.toConfig(),extensions=null!=(_typeExtensionsMap$co=typeExtensionsMap[config.name])?_typeExtensionsMap$co:[];return new definition_GraphQLInputObjectType(extendSchema_objectSpread(extendSchema_objectSpread({},config),{},{fields:function(){return extendSchema_objectSpread(extendSchema_objectSpread({},mapValue(config.fields,function(field){return extendSchema_objectSpread(extendSchema_objectSpread({},field),{},{type:replaceType(field.type)})})),buildInputFieldMap(extensions))},extensionASTNodes:config.extensionASTNodes.concat(extensions)}))}(type):void invariant(0,"Unexpected type: "+inspect(type))}for(var _i6=0;_i6<typeDefs.length;_i6++){var _schemaDef,_schemaDef$descriptio,_schemaDef2,_options$assumeValid,schemaDef,_stdTypeMap$name,typeNode=typeDefs[_i6],name=typeNode.name.value;typeMap[name]=null!=(_stdTypeMap$name=stdTypeMap[name])?_stdTypeMap$name:function(astNode){var _typeExtensionsMap$na,name=astNode.name.value,description=getDescription(astNode,options),extensionNodes=null!=(_typeExtensionsMap$na=typeExtensionsMap[name])?_typeExtensionsMap$na:[];switch(astNode.kind){case Kind.OBJECT_TYPE_DEFINITION:var allNodes=[astNode].concat(extensionNodes);return new definition_GraphQLObjectType({name:name,description:description,interfaces:function(){return buildInterfaces(allNodes)},fields:function(){return buildFieldMap(allNodes)},astNode:astNode,extensionASTNodes:extensionNodes});case Kind.INTERFACE_TYPE_DEFINITION:var _allNodes=[astNode].concat(extensionNodes);return new definition_GraphQLInterfaceType({name:name,description:description,interfaces:function(){return buildInterfaces(_allNodes)},fields:function(){return buildFieldMap(_allNodes)},astNode:astNode,extensionASTNodes:extensionNodes});case Kind.ENUM_TYPE_DEFINITION:return new definition_GraphQLEnumType({name:name,description:description,values:buildEnumValueMap([astNode].concat(extensionNodes)),astNode:astNode,extensionASTNodes:extensionNodes});case Kind.UNION_TYPE_DEFINITION:var _allNodes3=[astNode].concat(extensionNodes);return new definition_GraphQLUnionType({name:name,description:description,types:function(){return buildUnionTypes(_allNodes3)},astNode:astNode,extensionASTNodes:extensionNodes});case Kind.SCALAR_TYPE_DEFINITION:return new definition_GraphQLScalarType({name:name,description:description,specifiedByUrl:getSpecifiedByUrl(astNode),astNode:astNode,extensionASTNodes:extensionNodes});case Kind.INPUT_OBJECT_TYPE_DEFINITION:var _allNodes4=[astNode].concat(extensionNodes);return new definition_GraphQLInputObjectType({name:name,description:description,fields:function(){return buildInputFieldMap(_allNodes4)},astNode:astNode,extensionASTNodes:extensionNodes})}invariant(0,"Unexpected type definition node: "+inspect(astNode))}(typeNode)}var operationTypes=extendSchema_objectSpread(extendSchema_objectSpread({query:schemaConfig.query&&replaceNamedType(schemaConfig.query),mutation:schemaConfig.mutation&&replaceNamedType(schemaConfig.mutation),subscription:schemaConfig.subscription&&replaceNamedType(schemaConfig.subscription)},schemaDef&&getOperationTypes([schemaDef])),getOperationTypes(schemaExtensions));return extendSchema_objectSpread(extendSchema_objectSpread({description:null==(_schemaDef=schemaDef)||null==(_schemaDef$descriptio=_schemaDef.description)?void 0:_schemaDef$descriptio.value},operationTypes),{},{types:objectValues(typeMap),directives:[].concat(schemaConfig.directives.map(function(directive){var config=directive.toConfig();return new directives_GraphQLDirective(extendSchema_objectSpread(extendSchema_objectSpread({},config),{},{args:mapValue(config.args,extendArg)}))}),directiveDefs.map(function(node){var locations=node.locations.map(function(_ref){return _ref.value});return new directives_GraphQLDirective({name:node.name.value,description:getDescription(node,options),locations:locations,isRepeatable:node.repeatable,args:buildArgumentMap(node.arguments),astNode:node})})),extensions:void 0,astNode:null!=(_schemaDef2=schemaDef)?_schemaDef2:schemaConfig.astNode,extensionASTNodes:schemaConfig.extensionASTNodes.concat(schemaExtensions),assumeValid:null!=(_options$assumeValid=null==options?void 0:options.assumeValid)&&_options$assumeValid});function replaceType(type){return isListType(type)?new GraphQLList(replaceType(type.ofType)):isNonNullType(type)?new GraphQLNonNull(replaceType(type.ofType)):replaceNamedType(type)}function replaceNamedType(type){return typeMap[type.name]}function extendField(field){return extendSchema_objectSpread(extendSchema_objectSpread({},field),{},{type:replaceType(field.type),args:mapValue(field.args,extendArg)})}function extendArg(arg){return extendSchema_objectSpread(extendSchema_objectSpread({},arg),{},{type:replaceType(arg.type)})}function getOperationTypes(nodes){for(var opTypes={},_i10=0;_i10<nodes.length;_i10++)for(var _node$operationTypes,operationTypesNodes=null!=(_node$operationTypes=nodes[_i10].operationTypes)?_node$operationTypes:[],_i12=0;_i12<operationTypesNodes.length;_i12++){var operationType=operationTypesNodes[_i12];opTypes[operationType.operation]=getNamedType(operationType.type)}return opTypes}function getNamedType(node){var _stdTypeMap$name2,name=node.name.value,type=null!=(_stdTypeMap$name2=stdTypeMap[name])?_stdTypeMap$name2:typeMap[name];if(void 0===type)throw Error('Unknown type: "'.concat(name,'".'));return type}function getWrappedType(node){return node.kind===Kind.LIST_TYPE?new GraphQLList(getWrappedType(node.type)):node.kind===Kind.NON_NULL_TYPE?new GraphQLNonNull(getWrappedType(node.type)):getNamedType(node)}function buildFieldMap(nodes){for(var fieldConfigMap=Object.create(null),_i14=0;_i14<nodes.length;_i14++)for(var _node$fields,nodeFields=null!=(_node$fields=nodes[_i14].fields)?_node$fields:[],_i16=0;_i16<nodeFields.length;_i16++){var field=nodeFields[_i16];fieldConfigMap[field.name.value]={type:getWrappedType(field.type),description:getDescription(field,options),args:buildArgumentMap(field.arguments),deprecationReason:getDeprecationReason(field),astNode:field}}return fieldConfigMap}function buildArgumentMap(args){for(var argsNodes=null!=args?args:[],argConfigMap=Object.create(null),_i18=0;_i18<argsNodes.length;_i18++){var arg=argsNodes[_i18],type=getWrappedType(arg.type);argConfigMap[arg.name.value]={type:type,description:getDescription(arg,options),defaultValue:valueFromAST(arg.defaultValue,type),deprecationReason:getDeprecationReason(arg),astNode:arg}}return argConfigMap}function buildInputFieldMap(nodes){for(var inputFieldMap=Object.create(null),_i20=0;_i20<nodes.length;_i20++)for(var _node$fields2,fieldsNodes=null!=(_node$fields2=nodes[_i20].fields)?_node$fields2:[],_i22=0;_i22<fieldsNodes.length;_i22++){var field=fieldsNodes[_i22],type=getWrappedType(field.type);inputFieldMap[field.name.value]={type:type,description:getDescription(field,options),defaultValue:valueFromAST(field.defaultValue,type),deprecationReason:getDeprecationReason(field),astNode:field}}return inputFieldMap}function buildEnumValueMap(nodes){for(var enumValueMap=Object.create(null),_i24=0;_i24<nodes.length;_i24++)for(var _node$values,valuesNodes=null!=(_node$values=nodes[_i24].values)?_node$values:[],_i26=0;_i26<valuesNodes.length;_i26++){var value1=valuesNodes[_i26];enumValueMap[value1.name.value]={description:getDescription(value1,options),deprecationReason:getDeprecationReason(value1),astNode:value1}}return enumValueMap}function buildInterfaces(nodes){for(var interfaces=[],_i28=0;_i28<nodes.length;_i28++)for(var _node$interfaces,interfacesNodes=null!=(_node$interfaces=nodes[_i28].interfaces)?_node$interfaces:[],_i30=0;_i30<interfacesNodes.length;_i30++){var type=interfacesNodes[_i30];interfaces.push(getNamedType(type))}return interfaces}function buildUnionTypes(nodes){for(var types=[],_i32=0;_i32<nodes.length;_i32++)for(var _node$types,typeNodes=null!=(_node$types=nodes[_i32].types)?_node$types:[],_i34=0;_i34<typeNodes.length;_i34++){var type=typeNodes[_i34];types.push(getNamedType(type))}return types}}var stdTypeMap=keyMap(specifiedScalarTypes.concat(introspectionTypes),function(type){return type.name});function getDeprecationReason(node){var deprecated=getDirectiveValues(GraphQLDeprecatedDirective,node);return null==deprecated?void 0:deprecated.reason}function getSpecifiedByUrl(node){var specifiedBy=getDirectiveValues(GraphQLSpecifiedByDirective,node);return null==specifiedBy?void 0:specifiedBy.url}function getDescription(node,options){if(node.description)return node.description.value;if((null==options?void 0:options.commentDescriptions)===!0){var rawValue=function(node){var loc=node.loc;if(loc){for(var comments=[],token=loc.startToken.prev;null!=token&&token.kind===TokenKind.COMMENT&&token.next&&token.prev&&token.line+1===token.next.line&&token.line!==token.prev.line;){var value1=String(token.value);comments.push(value1),token=token.prev}return comments.length>0?comments.reverse().join("\n"):void 0}}(node);if(void 0!==rawValue)return dedentBlockStringValue("\n"+rawValue)}}function buildASTSchema(documentAST,options){null!=documentAST&&documentAST.kind===Kind.DOCUMENT||devAssert(0,"Must provide valid Document AST."),(null==options?void 0:options.assumeValid)!==!0&&(null==options?void 0:options.assumeValidSDL)!==!0&&function(documentAST){var errors=validateSDL(documentAST);if(0!==errors.length)throw Error(errors.map(function(error){return error.message}).join("\n\n"))}(documentAST);var config=extendSchemaImpl({description:void 0,types:[],directives:[],extensions:void 0,extensionASTNodes:[],assumeValid:!1},documentAST,options);if(null==config.astNode)for(var _i2=0,_config$types2=config.types;_i2<_config$types2.length;_i2++){var type=_config$types2[_i2];switch(type.name){case"Query":config.query=type;break;case"Mutation":config.mutation=type;break;case"Subscription":config.subscription=type}}for(var directives=config.directives,_i4=0;_i4<specifiedDirectives.length;_i4++)!function(_i4){var stdDirective=specifiedDirectives[_i4];directives.every(function(directive){return directive.name!==stdDirective.name})&&directives.push(stdDirective)}(_i4);return new schema_GraphQLSchema(config)}function buildSchema(source,options){return buildASTSchema(parse(source,{noLocation:null==options?void 0:options.noLocation,allowLegacySDLEmptyFields:null==options?void 0:options.allowLegacySDLEmptyFields,allowLegacySDLImplementsInterfaces:null==options?void 0:options.allowLegacySDLImplementsInterfaces,experimentalFragmentVariables:null==options?void 0:options.experimentalFragmentVariables}),{commentDescriptions:null==options?void 0:options.commentDescriptions,assumeValidSDL:null==options?void 0:options.assumeValidSDL,assumeValid:null==options?void 0:options.assumeValid})}function lexicographicSortSchema_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function lexicographicSortSchema_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?lexicographicSortSchema_ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):lexicographicSortSchema_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function lexicographicSortSchema(schema){var maybeType,maybeType1,maybeType2,schemaConfig=schema.toConfig(),typeMap=keyValMap(sortByName(schemaConfig.types),function(type){return type.name},function(type){if(isScalarType(type)||isIntrospectionType(type))return type;if(isObjectType(type)){var config=type.toConfig();return new definition_GraphQLObjectType(lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},config),{},{interfaces:function(){return sortTypes(config.interfaces)},fields:function(){return sortFields(config.fields)}}))}if(isInterfaceType(type)){var _config=type.toConfig();return new definition_GraphQLInterfaceType(lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},_config),{},{interfaces:function(){return sortTypes(_config.interfaces)},fields:function(){return sortFields(_config.fields)}}))}if(isUnionType(type)){var _config2=type.toConfig();return new definition_GraphQLUnionType(lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},_config2),{},{types:function(){return sortTypes(_config2.types)}}))}if(isEnumType(type)){var _config3=type.toConfig();return new definition_GraphQLEnumType(lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},_config3),{},{values:sortObjMap(_config3.values)}))}if(isInputObjectType(type)){var _config4=type.toConfig();return new definition_GraphQLInputObjectType(lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},_config4),{},{fields:function(){return sortObjMap(_config4.fields,function(field){return lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},field),{},{type:replaceType(field.type)})})}}))}invariant(0,"Unexpected type: "+inspect(type))});return new schema_GraphQLSchema(lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},schemaConfig),{},{types:objectValues(typeMap),directives:sortByName(schemaConfig.directives).map(function(directive){var config=directive.toConfig();return new directives_GraphQLDirective(lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},config),{},{locations:sortBy(config.locations,function(x){return x}),args:sortArgs(config.args)}))}),query:(maybeType=schemaConfig.query)&&replaceNamedType(maybeType),mutation:(maybeType1=schemaConfig.mutation)&&replaceNamedType(maybeType1),subscription:(maybeType2=schemaConfig.subscription)&&replaceNamedType(maybeType2)}));function replaceType(type){return isListType(type)?new GraphQLList(replaceType(type.ofType)):isNonNullType(type)?new GraphQLNonNull(replaceType(type.ofType)):replaceNamedType(type)}function replaceNamedType(type){return typeMap[type.name]}function sortArgs(args){return sortObjMap(args,function(arg){return lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},arg),{},{type:replaceType(arg.type)})})}function sortFields(fieldsMap){return sortObjMap(fieldsMap,function(field){return lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},field),{},{type:replaceType(field.type),args:sortArgs(field.args)})})}function sortTypes(arr){return sortByName(arr).map(replaceNamedType)}}function sortObjMap(map,sortValueFn){for(var sortedMap=Object.create(null),sortedKeys=sortBy(Object.keys(map),function(x){return x}),_i2=0;_i2<sortedKeys.length;_i2++){var key=sortedKeys[_i2],value1=map[key];sortedMap[key]=sortValueFn?sortValueFn(value1):value1}return sortedMap}function sortByName(array){return sortBy(array,function(obj){return obj.name})}function sortBy(array,mapToKey){return array.slice().sort(function(obj1,obj2){return naturalCompare(mapToKey(obj1),mapToKey(obj2))})}function printSchema(schema,options){return printFilteredSchema(schema,function(n){return!isSpecifiedDirective(n)},isDefinedType,options)}function printIntrospectionSchema(schema,options){return printFilteredSchema(schema,isSpecifiedDirective,isIntrospectionType,options)}function isDefinedType(type){return!isSpecifiedScalarType(type)&&!isIntrospectionType(type)}function printFilteredSchema(schema,directiveFilter,typeFilter,options){var directives=schema.getDirectives().filter(directiveFilter),types=objectValues(schema.getTypeMap()).filter(typeFilter);return[function(schema){if(!(null==schema.description&&function(schema){var queryType=schema.getQueryType();if(queryType&&"Query"!==queryType.name)return!1;var mutationType=schema.getMutationType();if(mutationType&&"Mutation"!==mutationType.name)return!1;var subscriptionType=schema.getSubscriptionType();return!subscriptionType||"Subscription"===subscriptionType.name}(schema))){var operationTypes=[],queryType=schema.getQueryType();queryType&&operationTypes.push(" query: ".concat(queryType.name));var mutationType=schema.getMutationType();mutationType&&operationTypes.push(" mutation: ".concat(mutationType.name));var subscriptionType=schema.getSubscriptionType();return subscriptionType&&operationTypes.push(" subscription: ".concat(subscriptionType.name)),printDescription({},schema)+"schema {\n".concat(operationTypes.join("\n"),"\n}")}}(schema)].concat(directives.map(function(directive){var directive1,options1;return directive1=directive,printDescription(options1=options,directive1)+"directive @"+directive1.name+printArgs(options1,directive1.args)+(directive1.isRepeatable?" repeatable":"")+" on "+directive1.locations.join(" | ")}),types.map(function(type){return printType(type,options)})).filter(Boolean).join("\n\n")+"\n"}function printType(type,options){var type1,type2,options1,type3,options2,type4,options3,types,possibleTypes,type5,options4,values,type6,options5,fields;return isScalarType(type)?printDescription(options,type1=type)+"scalar ".concat(type1.name)+function(scalar){if(null==scalar.specifiedByUrl)return"";var urlAST=astFromValue(scalar.specifiedByUrl,GraphQLString);return urlAST||invariant(0,"Unexpected null value returned from `astFromValue` for specifiedByUrl")," @specifiedBy(url: "+print(urlAST)+")"}(type1):isObjectType(type)?(type2=type,printDescription(options1=options,type2)+"type ".concat(type2.name)+printImplementedInterfaces(type2)+printFields(options1,type2)):isInterfaceType(type)?(type3=type,printDescription(options2=options,type3)+"interface ".concat(type3.name)+printImplementedInterfaces(type3)+printFields(options2,type3)):isUnionType(type)?(type4=type,options3=options,possibleTypes=(types=type4.getTypes()).length?" = "+types.join(" | "):"",printDescription(options3,type4)+"union "+type4.name+possibleTypes):isEnumType(type)?(type5=type,options4=options,values=type5.getValues().map(function(value1,i){return printDescription(options4,value1," ",!i)+" "+value1.name+printDeprecated(value1.deprecationReason)}),printDescription(options4,type5)+"enum ".concat(type5.name)+printBlock(values)):isInputObjectType(type)?(type6=type,options5=options,fields=objectValues(type6.getFields()).map(function(f,i){return printDescription(options5,f," ",!i)+" "+printInputValue(f)}),printDescription(options5,type6)+"input ".concat(type6.name)+printBlock(fields)):void invariant(0,"Unexpected type: "+inspect(type))}function printImplementedInterfaces(type){var interfaces=type.getInterfaces();return interfaces.length?" implements "+interfaces.map(function(i){return i.name}).join(" & "):""}function printFields(options,type){return printBlock(objectValues(type.getFields()).map(function(f,i){return printDescription(options,f," ",!i)+" "+f.name+printArgs(options,f.args," ")+": "+String(f.type)+printDeprecated(f.deprecationReason)}))}function printBlock(items){return 0!==items.length?" {\n"+items.join("\n")+"\n}":""}function printArgs(options,args){var indentation=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return 0===args.length?"":args.every(function(arg){return!arg.description})?"("+args.map(printInputValue).join(", ")+")":"(\n"+args.map(function(arg,i){return printDescription(options,arg," "+indentation,!i)+" "+indentation+printInputValue(arg)}).join("\n")+"\n"+indentation+")"}function printInputValue(arg){var defaultAST=astFromValue(arg.defaultValue,arg.type),argDecl=arg.name+": "+String(arg.type);return defaultAST&&(argDecl+=" = ".concat(print(defaultAST))),argDecl+printDeprecated(arg.deprecationReason)}function printDeprecated(reason){if(null==reason)return"";var reasonAST=astFromValue(reason,GraphQLString);return reasonAST&&reason!==DEFAULT_DEPRECATION_REASON?" @deprecated(reason: "+print(reasonAST)+")":" @deprecated"}function printDescription(options,def){var description,indentation,firstInBlock,comment,indentation1=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",firstInBlock1=!(arguments.length>3)||void 0===arguments[3]||arguments[3],description1=def.description;if(null==description1)return"";if((null==options?void 0:options.commentDescriptions)===!0){return description=description1,indentation=indentation1,firstInBlock=firstInBlock1,comment=description.split("\n").map(function(line){return indentation+(""!==line?"# "+line:"#")}).join("\n"),(indentation&&!firstInBlock?"\n":"")+comment+"\n"}var preferMultipleLines=description1.length>70;return(indentation1&&!firstInBlock1?"\n"+indentation1:indentation1)+printBlockString(description1,"",preferMultipleLines).replace(/\n/g,"\n"+indentation1)+"\n"}function concatAST(documents){for(var definitions=[],_i2=0;_i2<documents.length;_i2++){var doc=documents[_i2];definitions=definitions.concat(doc.definitions)}return{kind:"Document",definitions:definitions}}function separateOperations(documentAST){for(var operations=[],depGraph=Object.create(null),_i2=0,_documentAST$definiti2=documentAST.definitions;_i2<_documentAST$definiti2.length;_i2++){var definitionNode=_documentAST$definiti2[_i2];switch(definitionNode.kind){case Kind.OPERATION_DEFINITION:operations.push(definitionNode);break;case Kind.FRAGMENT_DEFINITION:depGraph[definitionNode.name.value]=collectDependencies(definitionNode.selectionSet)}}for(var separatedDocumentASTs=Object.create(null),_i4=0;_i4<operations.length;_i4++){for(var _i41=_i4,operation=operations[_i41],dependencies=new Set,_i6=0,_collectDependencies2=collectDependencies(operation.selectionSet);_i6<_collectDependencies2.length;_i6++)!function collectTransitiveDependencies(collected,depGraph,fromName){if(!collected.has(fromName)){collected.add(fromName);var immediateDeps=depGraph[fromName];if(void 0!==immediateDeps)for(var _i8=0;_i8<immediateDeps.length;_i8++)collectTransitiveDependencies(collected,depGraph,immediateDeps[_i8])}}(dependencies,depGraph,_collectDependencies2[_i6]);separatedDocumentASTs[operation.name?operation.name.value:""]={kind:Kind.DOCUMENT,definitions:documentAST.definitions.filter(function(node){return node===operation||node.kind===Kind.FRAGMENT_DEFINITION&&dependencies.has(node.name.value)})}}return separatedDocumentASTs}function collectDependencies(selectionSet){var dependencies=[];return visit(selectionSet,{FragmentSpread:function(node){dependencies.push(node.name.value)}}),dependencies}function stripIgnoredCharacters(source){for(var sourceObj=jsutils_instanceOf(source,source_Source)?source:new source_Source(source),body=sourceObj.body,lexer=new lexer_Lexer(sourceObj),strippedBody="",wasLastAddedTokenNonPunctuator=!1;lexer.advance().kind!==TokenKind.EOF;){var currentToken=lexer.token,tokenKind=currentToken.kind,isNonPunctuator=!isPunctuatorTokenKind(currentToken.kind);wasLastAddedTokenNonPunctuator&&(isNonPunctuator||currentToken.kind===TokenKind.SPREAD)&&(strippedBody+=" ");var tokenBody=body.slice(currentToken.start,currentToken.end);tokenKind===TokenKind.BLOCK_STRING?strippedBody+=function(blockStr){var body=dedentBlockStringValue(blockStr.slice(3,-3));getBlockStringIndentation(body)>0&&(body="\n"+body);var lastChar=body[body.length-1];return('"'===lastChar&&'\\"""'!==body.slice(-4)||"\\"===lastChar)&&(body+="\n"),'"""'+body+'"""'}(tokenBody):strippedBody+=tokenBody,wasLastAddedTokenNonPunctuator=isNonPunctuator}return strippedBody}function findBreakingChanges_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function findBreakingChanges_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?findBreakingChanges_ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):findBreakingChanges_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}var BreakingChangeType=Object.freeze({TYPE_REMOVED:"TYPE_REMOVED",TYPE_CHANGED_KIND:"TYPE_CHANGED_KIND",TYPE_REMOVED_FROM_UNION:"TYPE_REMOVED_FROM_UNION",VALUE_REMOVED_FROM_ENUM:"VALUE_REMOVED_FROM_ENUM",REQUIRED_INPUT_FIELD_ADDED:"REQUIRED_INPUT_FIELD_ADDED",IMPLEMENTED_INTERFACE_REMOVED:"IMPLEMENTED_INTERFACE_REMOVED",FIELD_REMOVED:"FIELD_REMOVED",FIELD_CHANGED_KIND:"FIELD_CHANGED_KIND",REQUIRED_ARG_ADDED:"REQUIRED_ARG_ADDED",ARG_REMOVED:"ARG_REMOVED",ARG_CHANGED_KIND:"ARG_CHANGED_KIND",DIRECTIVE_REMOVED:"DIRECTIVE_REMOVED",DIRECTIVE_ARG_REMOVED:"DIRECTIVE_ARG_REMOVED",REQUIRED_DIRECTIVE_ARG_ADDED:"REQUIRED_DIRECTIVE_ARG_ADDED",DIRECTIVE_REPEATABLE_REMOVED:"DIRECTIVE_REPEATABLE_REMOVED",DIRECTIVE_LOCATION_REMOVED:"DIRECTIVE_LOCATION_REMOVED"}),DangerousChangeType=Object.freeze({VALUE_ADDED_TO_ENUM:"VALUE_ADDED_TO_ENUM",TYPE_ADDED_TO_UNION:"TYPE_ADDED_TO_UNION",OPTIONAL_INPUT_FIELD_ADDED:"OPTIONAL_INPUT_FIELD_ADDED",OPTIONAL_ARG_ADDED:"OPTIONAL_ARG_ADDED",IMPLEMENTED_INTERFACE_ADDED:"IMPLEMENTED_INTERFACE_ADDED",ARG_DEFAULT_VALUE_CHANGE:"ARG_DEFAULT_VALUE_CHANGE"});function findBreakingChanges(oldSchema,newSchema){return findSchemaChanges(oldSchema,newSchema).filter(function(change){return change.type in BreakingChangeType})}function findDangerousChanges(oldSchema,newSchema){return findSchemaChanges(oldSchema,newSchema).filter(function(change){return change.type in DangerousChangeType})}function findSchemaChanges(oldSchema,newSchema){return[].concat(function(oldSchema,newSchema){for(var schemaChanges=[],typesDiff=diff(objectValues(oldSchema.getTypeMap()),objectValues(newSchema.getTypeMap())),_i12=0,_typesDiff$removed2=typesDiff.removed;_i12<_typesDiff$removed2.length;_i12++){var oldType=_typesDiff$removed2[_i12];schemaChanges.push({type:BreakingChangeType.TYPE_REMOVED,description:isSpecifiedScalarType(oldType)?"Standard scalar ".concat(oldType.name," was removed because it is not referenced anymore."):"".concat(oldType.name," was removed.")})}for(var _i14=0,_typesDiff$persisted2=typesDiff.persisted;_i14<_typesDiff$persisted2.length;_i14++){var _ref4=_typesDiff$persisted2[_i14],_oldType=_ref4[0],newType=_ref4[1];isEnumType(_oldType)&&isEnumType(newType)?schemaChanges.push.apply(schemaChanges,function(oldType,newType){for(var schemaChanges=[],valuesDiff=diff(oldType.getValues(),newType.getValues()),_i26=0,_valuesDiff$added2=valuesDiff.added;_i26<_valuesDiff$added2.length;_i26++){var newValue=_valuesDiff$added2[_i26];schemaChanges.push({type:DangerousChangeType.VALUE_ADDED_TO_ENUM,description:"".concat(newValue.name," was added to enum type ").concat(oldType.name,".")})}for(var _i28=0,_valuesDiff$removed2=valuesDiff.removed;_i28<_valuesDiff$removed2.length;_i28++){var oldValue=_valuesDiff$removed2[_i28];schemaChanges.push({type:BreakingChangeType.VALUE_REMOVED_FROM_ENUM,description:"".concat(oldValue.name," was removed from enum type ").concat(oldType.name,".")})}return schemaChanges}(_oldType,newType)):isUnionType(_oldType)&&isUnionType(newType)?schemaChanges.push.apply(schemaChanges,function(oldType,newType){for(var schemaChanges=[],possibleTypesDiff=diff(oldType.getTypes(),newType.getTypes()),_i22=0,_possibleTypesDiff$ad2=possibleTypesDiff.added;_i22<_possibleTypesDiff$ad2.length;_i22++){var newPossibleType=_possibleTypesDiff$ad2[_i22];schemaChanges.push({type:DangerousChangeType.TYPE_ADDED_TO_UNION,description:"".concat(newPossibleType.name," was added to union type ").concat(oldType.name,".")})}for(var _i24=0,_possibleTypesDiff$re2=possibleTypesDiff.removed;_i24<_possibleTypesDiff$re2.length;_i24++){var oldPossibleType=_possibleTypesDiff$re2[_i24];schemaChanges.push({type:BreakingChangeType.TYPE_REMOVED_FROM_UNION,description:"".concat(oldPossibleType.name," was removed from union type ").concat(oldType.name,".")})}return schemaChanges}(_oldType,newType)):isInputObjectType(_oldType)&&isInputObjectType(newType)?schemaChanges.push.apply(schemaChanges,function(oldType,newType){for(var schemaChanges=[],fieldsDiff=diff(objectValues(oldType.getFields()),objectValues(newType.getFields())),_i16=0,_fieldsDiff$added2=fieldsDiff.added;_i16<_fieldsDiff$added2.length;_i16++){var newField=_fieldsDiff$added2[_i16];isRequiredInputField(newField)?schemaChanges.push({type:BreakingChangeType.REQUIRED_INPUT_FIELD_ADDED,description:"A required field ".concat(newField.name," on input type ").concat(oldType.name," was added.")}):schemaChanges.push({type:DangerousChangeType.OPTIONAL_INPUT_FIELD_ADDED,description:"An optional field ".concat(newField.name," on input type ").concat(oldType.name," was added.")})}for(var _i18=0,_fieldsDiff$removed2=fieldsDiff.removed;_i18<_fieldsDiff$removed2.length;_i18++){var oldField=_fieldsDiff$removed2[_i18];schemaChanges.push({type:BreakingChangeType.FIELD_REMOVED,description:"".concat(oldType.name,".").concat(oldField.name," was removed.")})}for(var _i20=0,_fieldsDiff$persisted2=fieldsDiff.persisted;_i20<_fieldsDiff$persisted2.length;_i20++){var _ref6=_fieldsDiff$persisted2[_i20],_oldField=_ref6[0],_newField=_ref6[1];isChangeSafeForInputObjectFieldOrFieldArg(_oldField.type,_newField.type)||schemaChanges.push({type:BreakingChangeType.FIELD_CHANGED_KIND,description:"".concat(oldType.name,".").concat(_oldField.name," changed type from ")+"".concat(String(_oldField.type)," to ").concat(String(_newField.type),".")})}return schemaChanges}(_oldType,newType)):isObjectType(_oldType)&&isObjectType(newType)||isInterfaceType(_oldType)&&isInterfaceType(newType)?schemaChanges.push.apply(schemaChanges,(function(oldType,newType){for(var schemaChanges=[],fieldsDiff=diff(objectValues(oldType.getFields()),objectValues(newType.getFields())),_i34=0,_fieldsDiff$removed4=fieldsDiff.removed;_i34<_fieldsDiff$removed4.length;_i34++){var oldField=_fieldsDiff$removed4[_i34];schemaChanges.push({type:BreakingChangeType.FIELD_REMOVED,description:"".concat(oldType.name,".").concat(oldField.name," was removed.")})}for(var _i36=0,_fieldsDiff$persisted4=fieldsDiff.persisted;_i36<_fieldsDiff$persisted4.length;_i36++){var _ref8=_fieldsDiff$persisted4[_i36],_oldField2=_ref8[0],newField=_ref8[1];schemaChanges.push.apply(schemaChanges,function(oldType,oldField,newField){for(var schemaChanges=[],argsDiff=diff(oldField.args,newField.args),_i38=0,_argsDiff$removed4=argsDiff.removed;_i38<_argsDiff$removed4.length;_i38++){var oldArg=_argsDiff$removed4[_i38];schemaChanges.push({type:BreakingChangeType.ARG_REMOVED,description:"".concat(oldType.name,".").concat(oldField.name," arg ").concat(oldArg.name," was removed.")})}for(var _i40=0,_argsDiff$persisted2=argsDiff.persisted;_i40<_argsDiff$persisted2.length;_i40++){var _ref10=_argsDiff$persisted2[_i40],_oldArg=_ref10[0],newArg=_ref10[1];if(isChangeSafeForInputObjectFieldOrFieldArg(_oldArg.type,newArg.type)){if(void 0!==_oldArg.defaultValue)if(void 0===newArg.defaultValue)schemaChanges.push({type:DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,description:"".concat(oldType.name,".").concat(oldField.name," arg ").concat(_oldArg.name," defaultValue was removed.")});else{var oldValueStr=stringifyValue(_oldArg.defaultValue,_oldArg.type),newValueStr=stringifyValue(newArg.defaultValue,newArg.type);oldValueStr!==newValueStr&&schemaChanges.push({type:DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,description:"".concat(oldType.name,".").concat(oldField.name," arg ").concat(_oldArg.name," has changed defaultValue from ").concat(oldValueStr," to ").concat(newValueStr,".")})}}else schemaChanges.push({type:BreakingChangeType.ARG_CHANGED_KIND,description:"".concat(oldType.name,".").concat(oldField.name," arg ").concat(_oldArg.name," has changed type from ")+"".concat(String(_oldArg.type)," to ").concat(String(newArg.type),".")})}for(var _i42=0,_argsDiff$added4=argsDiff.added;_i42<_argsDiff$added4.length;_i42++){var _newArg=_argsDiff$added4[_i42];isRequiredArgument(_newArg)?schemaChanges.push({type:BreakingChangeType.REQUIRED_ARG_ADDED,description:"A required arg ".concat(_newArg.name," on ").concat(oldType.name,".").concat(oldField.name," was added.")}):schemaChanges.push({type:DangerousChangeType.OPTIONAL_ARG_ADDED,description:"An optional arg ".concat(_newArg.name," on ").concat(oldType.name,".").concat(oldField.name," was added.")})}return schemaChanges}(oldType,_oldField2,newField)),!function isChangeSafeForObjectOrInterfaceField(oldType,newType){return isListType(oldType)?isListType(newType)&&isChangeSafeForObjectOrInterfaceField(oldType.ofType,newType.ofType)||isNonNullType(newType)&&isChangeSafeForObjectOrInterfaceField(oldType,newType.ofType):isNonNullType(oldType)?isNonNullType(newType)&&isChangeSafeForObjectOrInterfaceField(oldType.ofType,newType.ofType):isNamedType(newType)&&oldType.name===newType.name||isNonNullType(newType)&&isChangeSafeForObjectOrInterfaceField(oldType,newType.ofType)}(_oldField2.type,newField.type)&&schemaChanges.push({type:BreakingChangeType.FIELD_CHANGED_KIND,description:"".concat(oldType.name,".").concat(_oldField2.name," changed type from ")+"".concat(String(_oldField2.type)," to ").concat(String(newField.type),".")})}return schemaChanges})(_oldType,newType).concat(function(oldType,newType){for(var schemaChanges=[],interfacesDiff=diff(oldType.getInterfaces(),newType.getInterfaces()),_i30=0,_interfacesDiff$added2=interfacesDiff.added;_i30<_interfacesDiff$added2.length;_i30++){var newInterface=_interfacesDiff$added2[_i30];schemaChanges.push({type:DangerousChangeType.IMPLEMENTED_INTERFACE_ADDED,description:"".concat(newInterface.name," added to interfaces implemented by ").concat(oldType.name,".")})}for(var _i32=0,_interfacesDiff$remov2=interfacesDiff.removed;_i32<_interfacesDiff$remov2.length;_i32++){var oldInterface=_interfacesDiff$remov2[_i32];schemaChanges.push({type:BreakingChangeType.IMPLEMENTED_INTERFACE_REMOVED,description:"".concat(oldType.name," no longer implements interface ").concat(oldInterface.name,".")})}return schemaChanges}(_oldType,newType))):_oldType.constructor!==newType.constructor&&schemaChanges.push({type:BreakingChangeType.TYPE_CHANGED_KIND,description:"".concat(_oldType.name," changed from ")+"".concat(typeKindName(_oldType)," to ").concat(typeKindName(newType),".")})}return schemaChanges}(oldSchema,newSchema),function(oldSchema,newSchema){for(var schemaChanges=[],directivesDiff=diff(oldSchema.getDirectives(),newSchema.getDirectives()),_i2=0,_directivesDiff$remov2=directivesDiff.removed;_i2<_directivesDiff$remov2.length;_i2++){var oldDirective=_directivesDiff$remov2[_i2];schemaChanges.push({type:BreakingChangeType.DIRECTIVE_REMOVED,description:"".concat(oldDirective.name," was removed.")})}for(var _i4=0,_directivesDiff$persi2=directivesDiff.persisted;_i4<_directivesDiff$persi2.length;_i4++){for(var _ref2=_directivesDiff$persi2[_i4],_oldDirective=_ref2[0],newDirective=_ref2[1],argsDiff=diff(_oldDirective.args,newDirective.args),_i6=0,_argsDiff$added2=argsDiff.added;_i6<_argsDiff$added2.length;_i6++){var newArg=_argsDiff$added2[_i6];isRequiredArgument(newArg)&&schemaChanges.push({type:BreakingChangeType.REQUIRED_DIRECTIVE_ARG_ADDED,description:"A required arg ".concat(newArg.name," on directive ").concat(_oldDirective.name," was added.")})}for(var _i8=0,_argsDiff$removed2=argsDiff.removed;_i8<_argsDiff$removed2.length;_i8++){var oldArg=_argsDiff$removed2[_i8];schemaChanges.push({type:BreakingChangeType.DIRECTIVE_ARG_REMOVED,description:"".concat(oldArg.name," was removed from ").concat(_oldDirective.name,".")})}_oldDirective.isRepeatable&&!newDirective.isRepeatable&&schemaChanges.push({type:BreakingChangeType.DIRECTIVE_REPEATABLE_REMOVED,description:"Repeatable flag was removed from ".concat(_oldDirective.name,".")});for(var _i10=0,_oldDirective$locatio2=_oldDirective.locations;_i10<_oldDirective$locatio2.length;_i10++){var location=_oldDirective$locatio2[_i10];-1===newDirective.locations.indexOf(location)&&schemaChanges.push({type:BreakingChangeType.DIRECTIVE_LOCATION_REMOVED,description:"".concat(location," was removed from ").concat(_oldDirective.name,".")})}}return schemaChanges}(oldSchema,newSchema))}function isChangeSafeForInputObjectFieldOrFieldArg(oldType,newType){return isListType(oldType)?isListType(newType)&&isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType,newType.ofType):isNonNullType(oldType)?isNonNullType(newType)&&isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType,newType.ofType)||!isNonNullType(newType)&&isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType,newType):isNamedType(newType)&&oldType.name===newType.name}function typeKindName(type){return isScalarType(type)?"a Scalar type":isObjectType(type)?"an Object type":isInterfaceType(type)?"an Interface type":isUnionType(type)?"a Union type":isEnumType(type)?"an Enum type":isInputObjectType(type)?"an Input type":void invariant(0,"Unexpected type: "+inspect(type))}function stringifyValue(value1,type){var ast=astFromValue(value1,type);return null!=ast||invariant(0),print(visit(ast,{ObjectValue:function(objectNode){var fields=[].concat(objectNode.fields);return fields.sort(function(fieldA,fieldB){return naturalCompare(fieldA.name.value,fieldB.name.value)}),findBreakingChanges_objectSpread(findBreakingChanges_objectSpread({},objectNode),{},{fields:fields})}}))}function diff(oldArray,newArray){for(var added=[],removed=[],persisted=[],oldMap=keyMap(oldArray,function(_ref11){return _ref11.name}),newMap=keyMap(newArray,function(_ref12){return _ref12.name}),_i44=0;_i44<oldArray.length;_i44++){var oldItem=oldArray[_i44],newItem=newMap[oldItem.name];void 0===newItem?removed.push(oldItem):persisted.push([oldItem,newItem])}for(var _i46=0;_i46<newArray.length;_i46++){var _newItem=newArray[_i46];void 0===oldMap[_newItem.name]&&added.push(_newItem)}return{added:added,persisted:persisted,removed:removed}}function findDeprecatedUsages(schema,ast){return validate(schema,ast,[NoDeprecatedCustomRule])}}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},__webpack_require__.d=(exports1,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports1,key)&&Object.defineProperty(exports1,key,{enumerable:!0,get:definition[key]})},__webpack_require__.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports1=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports1,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports1,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module);var __webpack_exports__={};for(var __rspack_i in(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{run:()=>run});var _teambit_harmony__rspack_import_0=__webpack_require__(2337),_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_aspect_js__rspack_import_1=__webpack_require__(3389),_home_circleci_bit_bit_node_modules_teambit_docs_dist_docs_aspect_js__rspack_import_2=__webpack_require__(2021),_home_circleci_bit_bit_node_modules_teambit_compositions_dist_compositions_aspect_js__rspack_import_3=__webpack_require__(3453),_home_circleci_bit_bit_node_modules_teambit_pubsub_dist_pubsub_aspect_js__rspack_import_4=__webpack_require__(6525),_home_circleci_bit_bit_node_modules_teambit_react_dist_react_aspect_js__rspack_import_5=__webpack_require__(7075),_home_circleci_bit_bit_node_modules_teambit_command_bar_dist_command_bar_aspect_js__rspack_import_6=__webpack_require__(7463);__webpack_require__(755),__webpack_require__(5995),__webpack_require__(6195),__webpack_require__(9283),__webpack_require__(3893),__webpack_require__(497);let run=(config,customAspects=[])=>{let isBrowser="u">typeof window,windowConfig=isBrowser?window.harmonyAppConfig:void 0,mergedConfig={...config,...windowConfig};_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_aspect_js__rspack_import_1.default.id="teambit.preview/preview",_home_circleci_bit_bit_node_modules_teambit_docs_dist_docs_aspect_js__rspack_import_2.default.id="teambit.docs/docs",_home_circleci_bit_bit_node_modules_teambit_compositions_dist_compositions_aspect_js__rspack_import_3.default.id="teambit.compositions/compositions",_home_circleci_bit_bit_node_modules_teambit_pubsub_dist_pubsub_aspect_js__rspack_import_4.default.id="teambit.harmony/pubsub",_home_circleci_bit_bit_node_modules_teambit_react_dist_react_aspect_js__rspack_import_5.default.id="teambit.react/react",_home_circleci_bit_bit_node_modules_teambit_command_bar_dist_command_bar_aspect_js__rspack_import_6.default.id="teambit.explorer/command-bar",isBrowser&&function(...props){_teambit_harmony__rspack_import_0.Harmony.load([...customAspects,_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_aspect_js__rspack_import_1.default,_home_circleci_bit_bit_node_modules_teambit_docs_dist_docs_aspect_js__rspack_import_2.default,_home_circleci_bit_bit_node_modules_teambit_compositions_dist_compositions_aspect_js__rspack_import_3.default,_home_circleci_bit_bit_node_modules_teambit_pubsub_dist_pubsub_aspect_js__rspack_import_4.default,_home_circleci_bit_bit_node_modules_teambit_react_dist_react_aspect_js__rspack_import_5.default,_home_circleci_bit_bit_node_modules_teambit_command_bar_dist_command_bar_aspect_js__rspack_import_6.default],"preview",mergedConfig).then(harmony=>harmony.run().then(()=>harmony.get("teambit.preview/preview")).then(rootExtension=>{let ssrSetup=!isBrowser&&rootExtension.setupSsr,setup=rootExtension.setup;return Promise.resolve((ssrSetup||setup||function(){}).bind(rootExtension)()).then(()=>rootExtension)}).then(rootExtension=>isBrowser?rootExtension.render("teambit.workspace/workspace",...props):rootExtension.renderSsr("teambit.workspace/workspace",...props)).catch(err=>{throw err}))}()}})(),exports.run=__webpack_exports__.run,__webpack_exports__)-1===["run"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0})})();
|
|
33
|
+
`;async function fetchComponentAspects(componentId){try{return(await (0,_graphqlRequest().request)("/graphql",GET_COMPONENT_ASPECTS,{id:componentId.toString()})).getHost.get.aspects.map(x=>x.id)}catch(err){console.error(`[gql] error on "getComponentAspects" - "${err.toString()}"`);return}}},7154(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.loadLink=function({href}){return new Promise((resolve,reject)=>{let link=document.createElement("link");href.endsWith(".css")&&link.setAttribute("rel","stylesheet"),link.setAttribute("href",href),link.onload=()=>resolve(),link.onerror=(message,_,_1,_2,error)=>reject(error||Error(`[preview.preview] failed to load link: ${message}`)),document.head.appendChild(link)})},exports1.loadScript=function({src}){return new Promise((resolve,reject)=>{let script=document.createElement("script");script.setAttribute("defer","defer"),script.src=src,script.onload=()=>resolve(),script.onerror=(message,_,_1,_2,error)=>reject(error||Error(`[preview.preview] failed to load script: ${message}`)),document.head.appendChild(script)})}},2268(__unused_rspack_module,exports1,__webpack_require__){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0});var _exportNames={PreviewAspect:!0,PreviewRuntime:!0,ENV_PREVIEW_STRATEGY_NAME:!0,COMPONENT_PREVIEW_STRATEGY_NAME:!0};function _preview(){let data=__webpack_require__(3389);return _preview=function(){return data},data}Object.defineProperty(exports1,"COMPONENT_PREVIEW_STRATEGY_NAME",{enumerable:!0,get:function(){return _strategiesNames().COMPONENT_PREVIEW_STRATEGY_NAME}}),Object.defineProperty(exports1,"ENV_PREVIEW_STRATEGY_NAME",{enumerable:!0,get:function(){return _strategiesNames().ENV_PREVIEW_STRATEGY_NAME}}),Object.defineProperty(exports1,"PreviewAspect",{enumerable:!0,get:function(){return _preview().PreviewAspect}}),Object.defineProperty(exports1,"PreviewRuntime",{enumerable:!0,get:function(){return _preview().PreviewRuntime}}),Object.defineProperty(exports1,"default",{enumerable:!0,get:function(){return _preview().PreviewAspect}});var _events=__webpack_require__(2709);function _strategiesNames(){let data=__webpack_require__(9285);return _strategiesNames=function(){return data},data}Object.keys(_events).forEach(function(key){"default"===key||"__esModule"===key||Object.prototype.hasOwnProperty.call(_exportNames,key)||key in exports1&&exports1[key]===_events[key]||Object.defineProperty(exports1,key,{enumerable:!0,get:function(){return _events[key]}})})},9663(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _previewModules(){let data=__webpack_require__(6300);return _previewModules=function(){return data},data}Object.defineProperty(exports1,"__esModule",{value:!0}),Object.defineProperty(exports1,"PREVIEW_MODULES",{enumerable:!0,get:function(){return _previewModules().PREVIEW_MODULES}}),Object.defineProperty(exports1,"PreviewModules",{enumerable:!0,get:function(){return _previewModules().PreviewModules}}),Object.defineProperty(exports1,"linkModules",{enumerable:!0,get:function(){return _previewModules().linkModules}})},3389(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _harmony(){let data=__webpack_require__(2337);return _harmony=function(){return data},data}Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.default=exports1.PreviewRuntime=exports1.PreviewAspect=void 0;let PreviewRuntime=exports1.PreviewRuntime=new(_harmony()).RuntimeDefinition("preview"),PreviewAspect=exports1.PreviewAspect=_harmony().Aspect.create({id:"teambit.preview/preview",dependencies:[],defaultConfig:{},declareRuntime:PreviewRuntime});exports1.default=PreviewAspect},755(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _pubsub(){let data=__webpack_require__(8410);return _pubsub=function(){return data},data}function _harmony(){let data=__webpack_require__(2337);return _harmony=function(){return data},data}function _componentId(){let data=__webpack_require__(2435);return _componentId=function(){return data},data}function _crossFetch(){var e;let data=(e=__webpack_require__(2607))&&e.__esModule?e:{default:e};return _crossFetch=function(){return data},data}function _lodash(){let data=__webpack_require__(2935);return _lodash=function(){return data},data}function _exceptions(){let data=__webpack_require__(7414);return _exceptions=function(){return data},data}function _preview(){let data=__webpack_require__(3389);return _preview=function(){return data},data}function _events(){let data=__webpack_require__(2709);return _events=function(){return data},data}function _renderingContext(){let data=__webpack_require__(2269);return _renderingContext=function(){return data},data}function _fetchComponentAspects(){let data=__webpack_require__(9442);return _fetchComponentAspects=function(){return data},data}function _lruCache(){let data=__webpack_require__(4606);return _lruCache=function(){return data},data}function _previewModules(){let data=__webpack_require__(9663);return _previewModules=function(){return data},data}function _htmlUtils(){let data=__webpack_require__(7154);return _htmlUtils=function(){return data},data}function _sizeEvent(){let data=__webpack_require__(6575);return _sizeEvent=function(){return data},data}function _defineProperty(e,r,t){var i;return(r="symbol"==typeof(i=function(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(r,"string"))?i:i+"")in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class PreviewPreview{constructor(pubsub,previewSlot,renderingContextSlot){this.pubsub=pubsub,this.previewSlot=previewSlot,this.renderingContextSlot=renderingContextSlot,_defineProperty(this,"rerenderOnPreviewModulesUpdated",(0,_lodash().debounce)(()=>{this.isReady()&&this.render().catch(err=>{console.error("[preview.preview] failed re-rendering after preview module update",err)})},30)),_defineProperty(this,"isDev",!1),_defineProperty(this,"_setupPromise",void 0),_defineProperty(this,"setup",()=>this.isReady()?Promise.resolve():(this._setupPromise??=new Promise(resolve=>{_previewModules().PREVIEW_MODULES.onSet.add(()=>{this.isReady()&&resolve()})}),this._setupPromise)),_defineProperty(this,"render",async rootExt=>{window.document.body.style.width="fit-content";let{previewName,componentId,envId}=this.getLocation(),name=previewName||this.getDefault();rootExt&&(this.isDev="teambit.workspace/workspace"===rootExt);let preview=this.getPreview(name);if(!preview||!componentId)throw new(_exceptions()).PreviewNotFound(previewName);let includesAll=await Promise.all((preview.include||[]).map(async inclPreviewName=>{let includedPreview=this.getPreview(inclPreviewName);if(!includedPreview)return;let inclPreviewModule=await this.getPreviewModule(inclPreviewName,componentId);return includedPreview.selectPreviewModel?.(componentId.fullName,inclPreviewModule)})),query=this.getQuery(),includes="true"===this.getParam(query,"onlyOverview")?[]:includesAll.filter(module=>!!module).map(module=>{if(!module.default||!(0,_lodash().isObject)(module.default))return module;let keysWithoutDefault=Object.keys(module).filter(key=>"default"!==key),defaultKeys=Object.keys(module.default);return(0,_lodash().intersection)(keysWithoutDefault,defaultKeys).length===defaultKeys.length?module.default:module}),componentAspects=this.isDev?await this.getComponentAspects(componentId.toString()):void 0,previewModule=await this.getPreviewModule(name,componentId),render=preview.render(componentId,envId||"",previewModule,includes,this.getRenderingContext(componentAspects));return this.reportSize(),this.setViewport(),this.setFullScreen(),render}),_defineProperty(this,"componentAspectsCache",new(_lruCache()).LRUCache({max:100,ttl:432e5})),_defineProperty(this,"getComponentAspects",async componentId=>{let cached=this.componentAspectsCache.get(componentId);if(cached)return cached;let result=await (0,_fetchComponentAspects().fetchComponentAspects)(componentId);return this.componentAspectsCache.set(componentId,result),result}),this.registerClickPubSub()}registerClickPubSub(){window.addEventListener("click",e=>{let timestamp=Date.now(),clickEvent=Object.assign({},e);this.pubsub.pub(_preview().PreviewAspect.id,new(_events()).ClickInsideAnIframeEvent(timestamp,clickEvent))})}isReady(){let{previewName}=this.getLocation(),name=previewName||this.getDefault();if(!_previewModules().PREVIEW_MODULES.has(name))return!1;let preview=this.getPreview(name);return!!preview&&!!(preview.include?.every(included=>_previewModules().PREVIEW_MODULES.has(included))??!0)}setFullScreen(){let query=this.getQuery();if(!this.getParam(query,"fullscreen"))return;let root=window.document.getElementById("root");root&&(root.style.height="100vh")}setViewport(){let query=this.getQuery(),viewPort=this.getParam(query,"viewport");if(!viewPort){window.document.body.style.width="100%";return}window.document.body.style.maxWidth=`${viewPort}px`}reportSize(){if(!window?.parent||!window?.document)return;let publish=()=>{let root,prevHeight,height,width,{width:width1,height:height1}=(prevHeight=(root=window.document.getElementById("root")??window.document.documentElement).style.height,root.style.height="auto",height=root.scrollHeight,width=root.scrollWidth,root.style.height=prevHeight,{width,height});this.pubsub.pub(_preview().PreviewAspect.id,new(_sizeEvent()).SizeEvent({width:width1,height:height1}))};publish();let resizedObserver=new ResizeObserver((0,_lodash().debounce)(publish,100));resizedObserver.observe(window.document.documentElement);let root=window.document.getElementById("root");root&&resizedObserver.observe(root)}async getPreviewModule(previewName,id){let compShortId=id.fullName,relevantModel=_previewModules().PREVIEW_MODULES.get(previewName);if(!relevantModel)throw Error(`[preview.preview] missing preview "${previewName}"`);if(relevantModel.componentMap[compShortId])return relevantModel;let componentPreviews=await this.fetchComponentPreview(id,previewName);_previewModules().PREVIEW_MODULES.loadComponentPreviews(compShortId,componentPreviews);let component=componentPreviews[previewName],metadata=componentPreviews[`${previewName}_metadata`];return{modulesMap:relevantModel.modulesMap,componentMap:{[id.fullName]:component},componentMapMetadata:{[id.fullName]:metadata}}}async fetchComponentPreview(id,name){let previewFile,allFiles=await this.fetchComponentPreviewFiles(id,name);return null===allFiles?{}:(await Promise.all(allFiles.map(file=>{if(file.endsWith("-preview.js")){previewFile=file;return}return this.addComponentFileElement(id,file)})),previewFile)?this.loadPreviewScript(id,name,previewFile):{}}addComponentFileElement(id,previewBundleFileName){if(previewBundleFileName.endsWith(".js"))return this.addComponentFileScriptElement(id,previewBundleFileName);this.addComponentFileLinkElement(id,previewBundleFileName).catch(err=>{throw Error(`[preview.preview] failed loading asset "${previewBundleFileName}". Error - "${err?.toString()}"`)})}async fetchComponentPreviewFiles(id,previewName){let stringId=id.toString(),url=`/api/${stringId}/~aspect/preview-assets`,res=await (0,_crossFetch().default)(url);if(res.status>=400)throw new(_exceptions()).PreviewNotFound(previewName);let parsed=await res.json();if(parsed.isBundledWithEnv)return null;if(!parsed.files||!parsed.files.length)throw new(_exceptions()).PreviewNotFound(previewName);return parsed.files}addComponentFileScriptElement(id,previewBundleFileName){let stringId=id.toString(),src=`/api/${stringId}/~aspect/component-preview/${previewBundleFileName}`;return(0,_htmlUtils().loadScript)({src})}addComponentFileLinkElement(id,previewBundleFileName){let stringId=id.toString(),href=`/api/${stringId}/~aspect/component-preview/${previewBundleFileName}`;return(0,_htmlUtils().loadLink)({href})}async loadPreviewScript(id,previewName,previewBundleFileName){let src=`/api/${id.toString()}/~aspect/component-preview/${previewBundleFileName}`;await (0,_htmlUtils().loadScript)({src});let globalId=`${id.toStringWithoutVersion()}-preview`,componentPreview=window[globalId];if(!componentPreview)throw new(_exceptions()).PreviewNotFound(previewName);return componentPreview}registerPreview(preview){return this.previewSlot.register(preview),this}getRenderingContext(aspectsFilter){return new(_renderingContext()).RenderingContext(this.renderingContextSlot,{aspectsFilter})}registerRenderContext(renderContext){return this.renderingContextSlot.register(renderContext),this}getDefault(){let previews=this.previewSlot.values(),defaultOne=previews.find(previewCandidate=>previewCandidate.default);return defaultOne?.name||previews[0].name}getPreview(previewName){return this.previewSlot.values().find(previewCandidate=>previewCandidate.name===previewName)}getParam(query,param){return new URLSearchParams(query).get(param)}getQuery(){let[,after]=window.location.hash.substring(1).split("?");return after}getLocation(){let[before,after]=window.location.hash.substring(1).split("?");return{previewName:this.getParam(after,"preview"),envId:this.getParam(after,"env"),componentId:_componentId().ComponentID.tryFromString(before)}}static async provider([pubsub],config,[previewSlot,renderingContextSlot]){let preview=new PreviewPreview(pubsub,previewSlot,renderingContextSlot);return window.addEventListener("bit-preview-modules-updated",()=>{preview.rerenderOnPreviewModulesUpdated()}),window.addEventListener("hashchange",()=>{preview.render()}),preview}}_defineProperty(PreviewPreview,"runtime",_preview().PreviewRuntime),_defineProperty(PreviewPreview,"dependencies",[_pubsub().PubsubAspect]),_defineProperty(PreviewPreview,"slots",[_harmony().Slot.withType(),_harmony().Slot.withType()]),_preview().PreviewAspect.addRuntime(PreviewPreview)},2269(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.RenderingContext=void 0;class RenderingContext{constructor(contexts,options={}){this.contexts=contexts,this.options=options}get(aspectId){let contextFactory=this.contexts.get(aspectId);return contextFactory?.(this.options)}}exports1.RenderingContext=RenderingContext},6575(__unused_rspack_module,exports1,__webpack_require__){"use strict";var r,i;function _pubsub(){let data=__webpack_require__(8410);return _pubsub=function(){return data},data}Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.SizeEvent=void 0;class SizeEvent extends _pubsub().BitBaseEvent{constructor(sizeEvent){super(SizeEvent.TYPE,"0.0.1",new Date().getTime(),sizeEvent)}}exports1.SizeEvent=SizeEvent,(r="symbol"==typeof(i=function(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(r="TYPE","string"))?i:i+"")in SizeEvent?Object.defineProperty(SizeEvent,r,{value:"preview-size",enumerable:!0,configurable:!0,writable:!0}):SizeEvent[r]="preview-size"},9285(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.ENV_PREVIEW_STRATEGY_NAME=exports1.COMPONENT_PREVIEW_STRATEGY_NAME=void 0,exports1.ENV_PREVIEW_STRATEGY_NAME="env",exports1.COMPONENT_PREVIEW_STRATEGY_NAME="component"},8434(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.BitBaseEvent=void 0;class BitBaseEvent{constructor(type,version,timestamp,data){this.type=type,this.version=version,this.timestamp=timestamp,this.data=data}}exports1.BitBaseEvent=BitBaseEvent},8410(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _pubsub(){let data=__webpack_require__(6525);return _pubsub=function(){return data},data}function _bitBaseEvent(){let data=__webpack_require__(8434);return _bitBaseEvent=function(){return data},data}function _pubsubContext(){let data=__webpack_require__(9665);return _pubsubContext=function(){return data},data}Object.defineProperty(exports1,"__esModule",{value:!0}),Object.defineProperty(exports1,"BitBaseEvent",{enumerable:!0,get:function(){return _bitBaseEvent().BitBaseEvent}}),Object.defineProperty(exports1,"PubsubAspect",{enumerable:!0,get:function(){return _pubsub().PubsubAspect}}),Object.defineProperty(exports1,"default",{enumerable:!0,get:function(){return _pubsub().PubsubAspect}}),Object.defineProperty(exports1,"usePubSub",{enumerable:!0,get:function(){return _pubsubContext().usePubSub}}),Object.defineProperty(exports1,"usePubSubIframe",{enumerable:!0,get:function(){return _pubsubContext().usePubSubIframe}})},7559(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.PubSubNoParentError=void 0;class PubSubNoParentError extends Error{constructor(){super("could not connect to parent window"),this.name="PubSubNoParentError"}}exports1.PubSubNoParentError=PubSubNoParentError},9665(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _react(){let data=_interopRequireWildcard(__webpack_require__(2015));return _react=function(){return data},data}function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f)}for(let t in e)"default"!==t&&({}).hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(f,t,i):f[t]=e[t]);return f})(e,t)}Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.createProvider=function(pubSubContext){return({children})=>_react().default.createElement(pubsubRegistry.Provider,{value:pubSubContext},children)},exports1.pubsubRegistry=void 0,exports1.usePubSub=usePubSub,exports1.usePubSubIframe=function(ref){let pubSub=usePubSub();(0,_react().useEffect)(()=>{if(!ref?.current||!pubSub)return()=>{};let destroyConnection=pubSub.connect(ref.current);return()=>destroyConnection()},[ref?.current,pubSub])};let pubsubRegistry=exports1.pubsubRegistry=(0,_react().createContext)(void 0);function usePubSub(){return(0,_react().useContext)(pubsubRegistry)}},6525(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _harmony(){let data=__webpack_require__(2337);return _harmony=function(){return data},data}Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.default=exports1.PubsubAspect=void 0;let PubsubAspect=exports1.PubsubAspect=_harmony().Aspect.create({id:"teambit.harmony/pubsub",dependencies:[]});exports1.default=PubsubAspect},9283(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _preview(){let data=__webpack_require__(2268);return _preview=function(){return data},data}function _uiFoundationUi(){let data=__webpack_require__(2264);return _uiFoundationUi=function(){return data},data}function _eventemitter(){let data=__webpack_require__(7551);return _eventemitter=function(){return data},data}function _penpal(){let data=__webpack_require__(3652);return _penpal=function(){return data},data}function _noParentError(){let data=__webpack_require__(7559);return _noParentError=function(){return data},data}function _pubsub(){let data=__webpack_require__(6525);return _pubsub=function(){return data},data}function _defineProperty(e,r,t){var i;return(r="symbol"==typeof(i=function(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(r,"string"))?i:i+"")in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class PubsubPreview{constructor(){_defineProperty(this,"_parentPubsub",void 0),_defineProperty(this,"events",new(_eventemitter()).EventEmitter2),_defineProperty(this,"connectToParentPubSub",(retries=10)=>{if(retries<=0)throw new(_noParentError()).PubSubNoParentError;return(0,_penpal().connectToParent)({timeout:300,methods:{pub:this.handleMessageFromParent}}).promise.then(parentPubsub=>this._parentPubsub=parentPubsub).catch(e=>{if(e.code!==_penpal().ErrorCode.ConnectionTimeout)throw e;return this.connectToParentPubSub(retries-1)})}),_defineProperty(this,"handleMessageFromParent",(topic,message)=>{this.events.emit(topic,message)})}sub(topic,callback){let emitter=this.events;return emitter.on(topic,callback),()=>{emitter.off(topic,callback)}}pub(topic,event){this.events.emit(topic,event),this._parentPubsub?.pub(topic,event).catch(err=>{console.error("[Pubsub.preview]",err)})}inIframe(){try{return _uiFoundationUi().isBrowser&&window.self!==window.top}catch{return!1}}static async provider(){let pubsubPreview=new PubsubPreview;return pubsubPreview.inIframe()&&pubsubPreview.connectToParentPubSub().catch(err=>{err instanceof _noParentError().PubSubNoParentError||console.error("[Pubsub.preview]",err)}),pubsubPreview}}_defineProperty(PubsubPreview,"runtime",_preview().PreviewRuntime),_pubsub().PubsubAspect.addRuntime(PubsubPreview)},1110(__unused_rspack_module,exports1,__webpack_require__){"use strict";var ownKeys,__createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||(ownKeys=function(o){return(ownKeys=Object.getOwnPropertyNames||function(o){var ar=[];for(var k in o)Object.prototype.hasOwnProperty.call(o,k)&&(ar[ar.length]=k);return ar})(o)},function(mod){if(mod&&mod.__esModule)return mod;var result={};if(null!=mod)for(var k=ownKeys(mod),i=0;i<k.length;i++)"default"!==k[i]&&__createBinding(result,mod,k[i]);return __setModuleDefault(result,mod),result}),__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.HighlighterProvider=exports1.PARAM_NAME=void 0;let react_1=__importStar(__webpack_require__(2015)),classnames_1=__importDefault(__webpack_require__(7500)),react_ui_component_highlighter_1=__webpack_require__(5759),query_string_1=__importDefault(__webpack_require__(887)),highlighter_provider_module_scss_1=__importDefault(__webpack_require__(4440));exports1.PARAM_NAME="highlighter";let classes={container:highlighter_provider_module_scss_1.default.label};exports1.HighlighterProvider=({children})=>{let hash=function(){let[hash,setHash]=(0,react_1.useState)(window?window.location.hash:"");return(0,react_1.useEffect)(()=>{let updateHash=()=>{setHash(window.location.hash)};return updateHash(),window.addEventListener("hashchange",updateHash),()=>{window.removeEventListener("hashchange",updateHash)}},[]),hash}(),isActive=(0,react_1.useMemo)(()=>{let hashQuery=hash.split("?")[1];return"true"===query_string_1.default.parse(hashQuery)[exports1.PARAM_NAME]},[hash]);return react_1.default.createElement(react_ui_component_highlighter_1.ComponentHighlighter,{disabled:!isActive,className:(0,classnames_1.default)(highlighter_provider_module_scss_1.default.highlighter,isActive&&highlighter_provider_module_scss_1.default.active),classes:classes},children)}},9493(__unused_rspack_module,exports1,__webpack_require__){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.HighlighterProvider=void 0;var highlighter_provider_1=__webpack_require__(1110);Object.defineProperty(exports1,"HighlighterProvider",{enumerable:!0,get:function(){return highlighter_provider_1.HighlighterProvider}})},7075(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _harmony(){let data=__webpack_require__(2337);return _harmony=function(){return data},data}Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.default=exports1.ReactAspect=void 0;let ReactAspect=exports1.ReactAspect=_harmony().Aspect.create({id:"teambit.react/react"});exports1.default=ReactAspect},3893(__unused_rspack_module,exports1,__webpack_require__){"use strict";function _lodash(){var e;let data=(e=__webpack_require__(7065))&&e.__esModule?e:{default:e};return _lodash=function(){return data},data}function _harmony(){let data=__webpack_require__(2337);return _harmony=function(){return data},data}function _preview(){let data=__webpack_require__(2268);return _preview=function(){return data},data}function _reactUi(){let data=__webpack_require__(9493);return _reactUi=function(){return data},data}function _react(){let data=__webpack_require__(7075);return _react=function(){return data},data}function _defineProperty(e,r,t){var i;return(r="symbol"==typeof(i=function(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(r,"string"))?i:i+"")in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class ReactPreview{constructor(preview,providerSlot){this.preview=preview,this.providerSlot=providerSlot,_defineProperty(this,"getRenderingContext",({aspectsFilter})=>{let entries=this.providerSlot.toArray();if(aspectsFilter){let allowedAspects=new Set(aspectsFilter);allowedAspects.add(_react().ReactAspect.id),entries=entries.filter(([aspectId])=>allowedAspects.has(aspectId))}return{providers:(0,_lodash().default)(entries.map(([,provider])=>provider))}})}registerProvider(provider){this.providerSlot.register(provider)}static async provider([preview],config,[providerSlot]){let reactPreview=new ReactPreview(preview,providerSlot);return reactPreview.registerProvider([_reactUi().HighlighterProvider]),preview.registerRenderContext(reactPreview.getRenderingContext),reactPreview}}_defineProperty(ReactPreview,"runtime",_preview().PreviewRuntime),_defineProperty(ReactPreview,"slots",[_harmony().Slot.withType()]),_defineProperty(ReactPreview,"dependencies",[_preview().PreviewAspect]),_react().ReactAspect.addRuntime(ReactPreview)},8706(module){"use strict";module.exports={label:"element-highlighter.module__label--YzI5O",frame:"element-highlighter.module__frame--YzI5O"}},2698(module){"use strict";module.exports={overlayBorder:"frame.module__overlayBorder--ZWM3Z",hidden:"frame.module__hidden--ZWM3Z",offset:"6"}},9096(module){"use strict";module.exports={componentStrip:"component-strip.module__componentStrip--ZTk5M",nameBlock:"component-strip.module__nameBlock--ZTk5M",version:"component-strip.module__version--ZTk5M"}},4278(module){"use strict";module.exports={othersContainer:"label.module__othersContainer--XzVhM",othersTooltip:"label.module__othersTooltip--XzVhM",active:"label.module__active--XzVhM",hidden:"label.module__hidden--XzVhM"}},4440(module){"use strict";module.exports={highlighter:"highlighter-provider.module__highlighter--XzBjO",active:"highlighter-provider.module__active--XzBjO",label:"highlighter-provider.module__label--XzBjO"}},2015(module){"use strict";module.exports=require("react")},2326(module){"use strict";module.exports=require("react-dom")},7500(module){!function(){"use strict";var hasOwn={}.hasOwnProperty;function classNames(){for(var classes="",i=0;i<arguments.length;i++){var arg=arguments[i];arg&&(classes=appendClass(classes,function(arg){if("string"==typeof arg||"number"==typeof arg)return arg;if("object"!=typeof arg)return"";if(Array.isArray(arg))return classNames.apply(null,arg);if(arg.toString!==Object.prototype.toString&&!arg.toString.toString().includes("[native code]"))return arg.toString();var classes="";for(var key in arg)hasOwn.call(arg,key)&&arg[key]&&(classes=appendClass(classes,key));return classes}(arg)))}return classes}function appendClass(value1,newClass){return newClass?value1?value1+" "+newClass:value1+newClass:value1}module.exports?(classNames.default=classNames,module.exports=classNames):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return classNames}):window.classNames=classNames}()},3922(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.defaultJsonSerializer=void 0,exports1.defaultJsonSerializer=JSON},4927(__unused_rspack_module,exports1,__webpack_require__){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.GraphQLWebSocketClient=void 0;let resolveRequestDocument_js_1=__webpack_require__(6917),types_js_1=__webpack_require__(5928),PING="ping",PONG="pong",COMPLETE="complete";class GraphQLWebSocketMessage{get type(){return this._type}get id(){return this._id}get payload(){return this._payload}constructor(type,payload,id){this._type=type,this._payload=payload,this._id=id}get text(){let result={type:this.type};return null!=this.id&&void 0!=this.id&&(result.id=this.id),null!=this.payload&&void 0!=this.payload&&(result.payload=this.payload),JSON.stringify(result)}static parse(data,f){let{type,payload,id}=JSON.parse(data);return new GraphQLWebSocketMessage(type,f(payload),id)}}class GraphQLWebSocketClient{constructor(socket,{onInit,onAcknowledged,onPing,onPong}){this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=socket,socket.addEventListener("open",async e=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={},socket.send(new GraphQLWebSocketMessage("connection_init",onInit?await onInit():null).text)}),socket.addEventListener("close",e=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={}}),socket.addEventListener("error",e=>{console.error(e)}),socket.addEventListener("message",e=>{try{let message=function(data,f=a=>a){return GraphQLWebSocketMessage.parse(data,f)}(e.data);switch(message.type){case"connection_ack":this.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(this.socketState.acknowledged=!0,onAcknowledged&&onAcknowledged(message.payload));return;case PING:onPing?onPing(message.payload).then(r=>socket.send(Pong(r).text)):socket.send(Pong(null).text);return;case PONG:onPong&&onPong(message.payload);return}if(!this.socketState.acknowledged||void 0===message.id||null===message.id||!this.socketState.subscriptions[message.id])return;let{query,variables,subscriber}=this.socketState.subscriptions[message.id];switch(message.type){case"next":!message.payload.errors&&message.payload.data&&subscriber.next&&subscriber.next(message.payload.data),message.payload.errors&&subscriber.error&&subscriber.error(new types_js_1.ClientError({...message.payload,status:200},{query,variables}));return;case"error":subscriber.error&&subscriber.error(new types_js_1.ClientError({errors:message.payload,status:200},{query,variables}));return;case COMPLETE:subscriber.complete&&subscriber.complete(),delete this.socketState.subscriptions[message.id];return}}catch(e){console.error(e),socket.close(1006)}socket.close(4400,"Unknown graphql-ws message.")})}makeSubscribe(query,operationName,subscriber,variables){let subscriptionId=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[subscriptionId]={query,variables,subscriber},this.socket.send(new GraphQLWebSocketMessage("subscribe",{query,operationName,variables},subscriptionId).text),()=>{this.socket.send(new GraphQLWebSocketMessage(COMPLETE,void 0,subscriptionId).text),delete this.socketState.subscriptions[subscriptionId]}}rawRequest(query,variables){return new Promise((resolve,reject)=>{let result;this.rawSubscribe(query,{next:(data,extensions)=>result={data,extensions},error:reject,complete:()=>resolve(result)},variables)})}request(document1,variables){return new Promise((resolve,reject)=>{let result;this.subscribe(document1,{next:data=>result=data,error:reject,complete:()=>resolve(result)},variables)})}subscribe(document1,subscriber,variables){let{query,operationName}=(0,resolveRequestDocument_js_1.resolveRequestDocument)(document1);return this.makeSubscribe(query,operationName,subscriber,variables)}rawSubscribe(query,subscriber,variables){return this.makeSubscribe(query,void 0,subscriber,variables)}ping(payload){this.socket.send(new GraphQLWebSocketMessage(PING,payload,void 0).text)}close(){this.socket.close(1e3)}}function Pong(payload){return new GraphQLWebSocketMessage(PONG,payload,void 0)}GraphQLWebSocketClient.PROTOCOL="graphql-transport-ws",exports1.GraphQLWebSocketClient=GraphQLWebSocketClient},3028(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.HeadersInstanceToPlainObject=exports1.uppercase=void 0,exports1.uppercase=str=>str.toUpperCase(),exports1.HeadersInstanceToPlainObject=headers=>{let o={};return headers.forEach((v,k)=>{o[k]=v}),o}},6313(__unused_rspack_module,exports1,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(null!=mod)for(var k in mod)"default"!==k&&Object.prototype.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result};Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.request=exports1.rawRequest=exports1.GraphQLClient=exports1.ClientError=exports1.batchRequests=exports1.resolveRequestDocument=exports1.GraphQLWebSocketClient=exports1.gql=void 0;let defaultJsonSerializer_js_1=__webpack_require__(3922),helpers_js_1=__webpack_require__(3028),parseArgs_js_1=__webpack_require__(7491),resolveRequestDocument_js_1=__webpack_require__(6917),types_js_1=__webpack_require__(5928);Object.defineProperty(exports1,"ClientError",{enumerable:!0,get:function(){return types_js_1.ClientError}});let cross_fetch_1=__importStar(__webpack_require__(2607)),resolveHeaders=headers=>{let oHeaders={};return headers&&("u">typeof Headers&&headers instanceof Headers||cross_fetch_1&&cross_fetch_1.Headers&&headers instanceof cross_fetch_1.Headers?oHeaders=(0,helpers_js_1.HeadersInstanceToPlainObject)(headers):Array.isArray(headers)?headers.forEach(([name,value1])=>{name&&void 0!==value1&&(oHeaders[name]=value1)}):oHeaders=headers),oHeaders},cleanQuery=str=>str.replace(/([\s,]|#[^\n\r]+)+/g," ").trim();class GraphQLClient{constructor(url,requestConfig={}){this.url=url,this.requestConfig=requestConfig,this.rawRequest=async(...args)=>{let[queryOrOptions,variables,requestHeaders]=args,rawRequestOptions=(0,parseArgs_js_1.parseRawRequestArgs)(queryOrOptions,variables,requestHeaders),{headers,fetch=cross_fetch_1.default,method="POST",requestMiddleware,responseMiddleware,...fetchOptions}=this.requestConfig,{url}=this;void 0!==rawRequestOptions.signal&&(fetchOptions.signal=rawRequestOptions.signal);let{operationName}=(0,resolveRequestDocument_js_1.resolveRequestDocument)(rawRequestOptions.query);return makeRequest({url,query:rawRequestOptions.query,variables:rawRequestOptions.variables,headers:{...resolveHeaders(callOrIdentity(headers)),...resolveHeaders(rawRequestOptions.requestHeaders)},operationName,fetch,method,fetchOptions,middleware:requestMiddleware}).then(response=>(responseMiddleware&&responseMiddleware(response),response)).catch(error=>{throw responseMiddleware&&responseMiddleware(error),error})}}async request(documentOrOptions,...variablesAndRequestHeaders){let[variables,requestHeaders]=variablesAndRequestHeaders,requestOptions=(0,parseArgs_js_1.parseRequestArgs)(documentOrOptions,variables,requestHeaders),{headers,fetch=cross_fetch_1.default,method="POST",requestMiddleware,responseMiddleware,...fetchOptions}=this.requestConfig,{url}=this;void 0!==requestOptions.signal&&(fetchOptions.signal=requestOptions.signal);let{query,operationName}=(0,resolveRequestDocument_js_1.resolveRequestDocument)(requestOptions.document);return makeRequest({url,query,variables:requestOptions.variables,headers:{...resolveHeaders(callOrIdentity(headers)),...resolveHeaders(requestOptions.requestHeaders)},operationName,fetch,method,fetchOptions,middleware:requestMiddleware}).then(response=>(responseMiddleware&&responseMiddleware(response),response.data)).catch(error=>{throw responseMiddleware&&responseMiddleware(error),error})}batchRequests(documentsOrOptions,requestHeaders){let batchRequestOptions=(0,parseArgs_js_1.parseBatchRequestArgs)(documentsOrOptions,requestHeaders),{headers,...fetchOptions}=this.requestConfig;void 0!==batchRequestOptions.signal&&(fetchOptions.signal=batchRequestOptions.signal);let queries=batchRequestOptions.documents.map(({document:document1})=>(0,resolveRequestDocument_js_1.resolveRequestDocument)(document1).query),variables=batchRequestOptions.documents.map(({variables})=>variables);return makeRequest({url:this.url,query:queries,variables,headers:{...resolveHeaders(callOrIdentity(headers)),...resolveHeaders(batchRequestOptions.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??cross_fetch_1.default,method:this.requestConfig.method||"POST",fetchOptions,middleware:this.requestConfig.requestMiddleware}).then(response=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(response),response.data)).catch(error=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(error),error})}setHeaders(headers){return this.requestConfig.headers=headers,this}setHeader(key,value1){let{headers}=this.requestConfig;return headers?headers[key]=value1:this.requestConfig.headers={[key]:value1},this}setEndpoint(value1){return this.url=value1,this}}exports1.GraphQLClient=GraphQLClient;let makeRequest=async params=>{let method,{query,variables,fetchOptions}=params,fetcher=(method=(0,helpers_js_1.uppercase)(params.method??"post"),async params=>{let body,{url,query,variables,operationName,fetch,fetchOptions,middleware}=params,headers={...params.headers},queryParams="";"POST"===method?"string"==typeof(body=createRequestBody(query,variables,operationName,fetchOptions.jsonSerializer))&&(headers["Content-Type"]="application/json"):queryParams=(params=>{if(!Array.isArray(params.query)){let search=[`query=${encodeURIComponent(cleanQuery(params.query))}`];return params.variables&&search.push(`variables=${encodeURIComponent(params.jsonSerializer.stringify(params.variables))}`),params.operationName&&search.push(`operationName=${encodeURIComponent(params.operationName)}`),search.join("&")}if(void 0!==params.variables&&!Array.isArray(params.variables))throw Error("Cannot create query with given variable type, array expected");let payload=params.query.reduce((acc,currentQuery,index)=>(acc.push({query:cleanQuery(currentQuery),variables:params.variables?params.jsonSerializer.stringify(params.variables[index]):void 0}),acc),[]);return`query=${encodeURIComponent(params.jsonSerializer.stringify(payload))}`})({query,variables,operationName,jsonSerializer:fetchOptions.jsonSerializer??defaultJsonSerializer_js_1.defaultJsonSerializer});let init={method,headers,body,...fetchOptions},urlResolved=url,initResolved=init;if(middleware){let{url:urlNew,...initNew}=await Promise.resolve(middleware({...init,url,operationName,variables}));urlResolved=urlNew,initResolved=initNew}return queryParams&&(urlResolved=`${urlResolved}?${queryParams}`),await fetch(urlResolved,initResolved)}),isBatchingQuery=Array.isArray(params.query),response=await fetcher(params),result=await getResult(response,fetchOptions.jsonSerializer??defaultJsonSerializer_js_1.defaultJsonSerializer),successfullyReceivedData=Array.isArray(result)?!result.some(({data})=>!data):!!result.data,successfullyPassedErrorPolicy=Array.isArray(result)||!result.errors||Array.isArray(result.errors)&&!result.errors.length||"all"===fetchOptions.errorPolicy||"ignore"===fetchOptions.errorPolicy;if(response.ok&&successfullyPassedErrorPolicy&&successfullyReceivedData){let{errors:_,...rest}=(Array.isArray(result),result),data="ignore"===fetchOptions.errorPolicy?rest:result;return{...isBatchingQuery?{data}:data,headers:response.headers,status:response.status}}{let errorResult="string"==typeof result?{error:result}:result;throw new types_js_1.ClientError({...errorResult,status:response.status,headers:response.headers},{query,variables})}};async function request(urlOrOptions,document1,...variablesAndRequestHeaders){let requestOptions=(0,parseArgs_js_1.parseRequestExtendedArgs)(urlOrOptions,document1,...variablesAndRequestHeaders);return new GraphQLClient(requestOptions.url).request({...requestOptions})}exports1.rawRequest=async(...args)=>{let[urlOrOptions,query,...variablesAndRequestHeaders]=args,requestOptions=(0,parseArgs_js_1.parseRawRequestExtendedArgs)(urlOrOptions,query,...variablesAndRequestHeaders);return new GraphQLClient(requestOptions.url).rawRequest({...requestOptions})},exports1.request=request,exports1.batchRequests=async(...args)=>{let params=parseBatchRequestsArgsExtended(args);return new GraphQLClient(params.url).batchRequests(params)};let parseBatchRequestsArgsExtended=args=>1===args.length?args[0]:{url:args[0],documents:args[1],requestHeaders:args[2],signal:void 0},createRequestBody=(query,variables,operationName,jsonSerializer)=>{let jsonSerializer_=jsonSerializer??defaultJsonSerializer_js_1.defaultJsonSerializer;if(!Array.isArray(query))return jsonSerializer_.stringify({query,variables,operationName});if(void 0!==variables&&!Array.isArray(variables))throw Error("Cannot create request body with given variable type, array expected");let payload=query.reduce((acc,currentQuery,index)=>(acc.push({query:currentQuery,variables:variables?variables[index]:void 0}),acc),[]);return jsonSerializer_.stringify(payload)},getResult=async(response,jsonSerializer)=>{let contentType;return(response.headers.forEach((value1,key)=>{"content-type"===key.toLowerCase()&&(contentType=value1)}),contentType&&(contentType.toLowerCase().startsWith("application/json")||contentType.toLowerCase().startsWith("application/graphql+json")||contentType.toLowerCase().startsWith("application/graphql-response+json")))?jsonSerializer.parse(await response.text()):response.text()},callOrIdentity=value1=>"function"==typeof value1?value1():value1;exports1.gql=(chunks,...variables)=>chunks.reduce((acc,chunk,index)=>`${acc}${chunk}${index in variables?String(variables[index]):""}`,"");var graphql_ws_js_1=__webpack_require__(4927);Object.defineProperty(exports1,"GraphQLWebSocketClient",{enumerable:!0,get:function(){return graphql_ws_js_1.GraphQLWebSocketClient}});var resolveRequestDocument_js_2=__webpack_require__(6917);Object.defineProperty(exports1,"resolveRequestDocument",{enumerable:!0,get:function(){return resolveRequestDocument_js_2.resolveRequestDocument}}),exports1.default=request},7491(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.parseRawRequestExtendedArgs=exports1.parseRequestExtendedArgs=exports1.parseBatchRequestArgs=exports1.parseRawRequestArgs=exports1.parseRequestArgs=void 0,exports1.parseRequestArgs=(documentOrOptions,variables,requestHeaders)=>documentOrOptions.document?documentOrOptions:{document:documentOrOptions,variables:variables,requestHeaders:requestHeaders,signal:void 0},exports1.parseRawRequestArgs=(queryOrOptions,variables,requestHeaders)=>queryOrOptions.query?queryOrOptions:{query:queryOrOptions,variables:variables,requestHeaders:requestHeaders,signal:void 0},exports1.parseBatchRequestArgs=(documentsOrOptions,requestHeaders)=>documentsOrOptions.documents?documentsOrOptions:{documents:documentsOrOptions,requestHeaders:requestHeaders,signal:void 0},exports1.parseRequestExtendedArgs=(urlOrOptions,document1,...variablesAndRequestHeaders)=>{let[variables,requestHeaders]=variablesAndRequestHeaders;return urlOrOptions.document?urlOrOptions:{url:urlOrOptions,document:document1,variables,requestHeaders,signal:void 0}},exports1.parseRawRequestExtendedArgs=(urlOrOptions,query,...variablesAndRequestHeaders)=>{let[variables,requestHeaders]=variablesAndRequestHeaders;return urlOrOptions.query?urlOrOptions:{url:urlOrOptions,query:query,variables,requestHeaders,signal:void 0}}},6917(__unused_rspack_module,exports1,__webpack_require__){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.resolveRequestDocument=void 0;let graphql_1=__webpack_require__(9032),extractOperationName=document1=>{let operationName,operationDefinitions=document1.definitions.filter(definition=>"OperationDefinition"===definition.kind);return 1===operationDefinitions.length&&(operationName=operationDefinitions[0]?.name?.value),operationName};exports1.resolveRequestDocument=document1=>{if("string"==typeof document1){let operationName;try{let parsedDocument=(0,graphql_1.parse)(document1);operationName=extractOperationName(parsedDocument)}catch(err){}return{query:document1,operationName}}let operationName=extractOperationName(document1);return{query:(0,graphql_1.print)(document1),operationName}}},5928(__unused_rspack_module,exports1){"use strict";Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.ClientError=void 0;class ClientError extends Error{constructor(response,request){super(`${ClientError.extractMessage(response)}: ${JSON.stringify({response,request})}`),Object.setPrototypeOf(this,ClientError.prototype),this.response=response,this.request=request,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,ClientError)}static extractMessage(response){return response.errors?.[0]?.message??`GraphQL Error (Code: ${response.status})`}}exports1.ClientError=ClientError},4606(__unused_rspack_module,exports1,__webpack_require__){"use strict";var process=__webpack_require__(8558);Object.defineProperty(exports1,"__esModule",{value:!0}),exports1.LRUCache=void 0;let perf="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,warned=new Set,PROCESS="object"==typeof process&&process?process:{},emitWarning=(msg,type,code,fn)=>{"function"==typeof PROCESS.emitWarning?PROCESS.emitWarning(msg,type,code,fn):console.error(`[${code}] ${type}: ${msg}`)},AC=globalThis.AbortController,AS=globalThis.AbortSignal;if(void 0===AC){AS=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(_,fn){this._onabort.push(fn)}},AC=class{constructor(){warnACPolyfill()}signal=new AS;abort(reason){if(!this.signal.aborted){for(let fn of(this.signal.reason=reason,this.signal.aborted=!0,this.signal._onabort))fn(reason);this.signal.onabort?.(reason)}}};let printACPolyfillWarning=PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",warnACPolyfill=()=>{printACPolyfillWarning&&(printACPolyfillWarning=!1,emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",warnACPolyfill))}}Symbol("type");let isPosInt=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),getUintArray=max=>isPosInt(max)?max<=256?Uint8Array:max<=65536?Uint16Array:max<=0x100000000?Uint32Array:max<=Number.MAX_SAFE_INTEGER?ZeroArray:null:null;class ZeroArray extends Array{constructor(size){super(size),this.fill(0)}}class Stack{heap;length;static #constructing=!1;static create(max){let HeapCls=getUintArray(max);if(!HeapCls)return[];Stack.#constructing=!0;let s=new Stack(max,HeapCls);return Stack.#constructing=!1,s}constructor(max,HeapCls){if(!Stack.#constructing)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new HeapCls(max),this.length=0}push(n){this.heap[this.length++]=n}pop(){return this.heap[--this.length]}}class LRUCache{#max;#maxSize;#dispose;#disposeAfter;#fetchMethod;#memoMethod;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#size;#calculatedSize;#keyMap;#keyList;#valList;#next;#prev;#head;#tail;#free;#disposed;#sizes;#starts;#ttls;#hasDispose;#hasFetchMethod;#hasDisposeAfter;static unsafeExposeInternals(c){return{starts:c.#starts,ttls:c.#ttls,sizes:c.#sizes,keyMap:c.#keyMap,keyList:c.#keyList,valList:c.#valList,next:c.#next,prev:c.#prev,get head(){return c.#head},get tail(){return c.#tail},free:c.#free,isBackgroundFetch:p=>c.#isBackgroundFetch(p),backgroundFetch:(k,index,options,context)=>c.#backgroundFetch(k,index,options,context),moveToTail:index=>c.#moveToTail(index),indexes:options=>c.#indexes(options),rindexes:options=>c.#rindexes(options),isStale:index=>c.#isStale(index)}}get max(){return this.#max}get maxSize(){return this.#maxSize}get calculatedSize(){return this.#calculatedSize}get size(){return this.#size}get fetchMethod(){return this.#fetchMethod}get memoMethod(){return this.#memoMethod}get dispose(){return this.#dispose}get disposeAfter(){return this.#disposeAfter}constructor(options){const{max=0,ttl,ttlResolution=1,ttlAutopurge,updateAgeOnGet,updateAgeOnHas,allowStale,dispose,disposeAfter,noDisposeOnSet,noUpdateTTL,maxSize=0,maxEntrySize=0,sizeCalculation,fetchMethod,memoMethod,noDeleteOnFetchRejection,noDeleteOnStaleGet,allowStaleOnFetchRejection,allowStaleOnFetchAbort,ignoreFetchAbort}=options;if(0!==max&&!isPosInt(max))throw TypeError("max option must be a nonnegative integer");const UintArray=max?getUintArray(max):Array;if(!UintArray)throw Error("invalid max value: "+max);if(this.#max=max,this.#maxSize=maxSize,this.maxEntrySize=maxEntrySize||this.#maxSize,this.sizeCalculation=sizeCalculation,this.sizeCalculation){if(!this.#maxSize&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw TypeError("sizeCalculation set to non-function")}if(void 0!==memoMethod&&"function"!=typeof memoMethod)throw TypeError("memoMethod must be a function if defined");if(this.#memoMethod=memoMethod,void 0!==fetchMethod&&"function"!=typeof fetchMethod)throw TypeError("fetchMethod must be a function if specified");if(this.#fetchMethod=fetchMethod,this.#hasFetchMethod=!!fetchMethod,this.#keyMap=new Map,this.#keyList=Array(max).fill(void 0),this.#valList=Array(max).fill(void 0),this.#next=new UintArray(max),this.#prev=new UintArray(max),this.#head=0,this.#tail=0,this.#free=Stack.create(max),this.#size=0,this.#calculatedSize=0,"function"==typeof dispose&&(this.#dispose=dispose),"function"==typeof disposeAfter?(this.#disposeAfter=disposeAfter,this.#disposed=[]):(this.#disposeAfter=void 0,this.#disposed=void 0),this.#hasDispose=!!this.#dispose,this.#hasDisposeAfter=!!this.#disposeAfter,this.noDisposeOnSet=!!noDisposeOnSet,this.noUpdateTTL=!!noUpdateTTL,this.noDeleteOnFetchRejection=!!noDeleteOnFetchRejection,this.allowStaleOnFetchRejection=!!allowStaleOnFetchRejection,this.allowStaleOnFetchAbort=!!allowStaleOnFetchAbort,this.ignoreFetchAbort=!!ignoreFetchAbort,0!==this.maxEntrySize){if(0!==this.#maxSize&&!isPosInt(this.#maxSize))throw TypeError("maxSize must be a positive integer if specified");if(!isPosInt(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#initializeSizeTracking()}if(this.allowStale=!!allowStale,this.noDeleteOnStaleGet=!!noDeleteOnStaleGet,this.updateAgeOnGet=!!updateAgeOnGet,this.updateAgeOnHas=!!updateAgeOnHas,this.ttlResolution=isPosInt(ttlResolution)||0===ttlResolution?ttlResolution:1,this.ttlAutopurge=!!ttlAutopurge,this.ttl=ttl||0,this.ttl){if(!isPosInt(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#initializeTTLTracking()}if(0===this.#max&&0===this.ttl&&0===this.#maxSize)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#max&&!this.#maxSize){const code="LRU_CACHE_UNBOUNDED";(code=>!warned.has(code))(code)&&(warned.add(code),emitWarning("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",code,LRUCache))}}getRemainingTTL(key){return this.#keyMap.has(key)?1/0:0}#initializeTTLTracking(){let ttls=new ZeroArray(this.#max),starts=new ZeroArray(this.#max);this.#ttls=ttls,this.#starts=starts,this.#setItemTTL=(index,ttl,start=perf.now())=>{if(starts[index]=0!==ttl?start:0,ttls[index]=ttl,0!==ttl&&this.ttlAutopurge){let t=setTimeout(()=>{this.#isStale(index)&&this.#delete(this.#keyList[index],"expire")},ttl+1);t.unref&&t.unref()}},this.#updateItemAge=index=>{starts[index]=0!==ttls[index]?perf.now():0},this.#statusTTL=(status,index)=>{if(ttls[index]){let ttl=ttls[index],start=starts[index];if(!ttl||!start)return;status.ttl=ttl,status.start=start,status.now=cachedNow||getNow();let age=status.now-start;status.remainingTTL=ttl-age}};let cachedNow=0,getNow=()=>{let n=perf.now();if(this.ttlResolution>0){cachedNow=n;let t=setTimeout(()=>cachedNow=0,this.ttlResolution);t.unref&&t.unref()}return n};this.getRemainingTTL=key=>{let index=this.#keyMap.get(key);if(void 0===index)return 0;let ttl=ttls[index],start=starts[index];return ttl&&start?ttl-((cachedNow||getNow())-start):1/0},this.#isStale=index=>{let s=starts[index],t=ttls[index];return!!t&&!!s&&(cachedNow||getNow())-s>t}}#updateItemAge=()=>{};#statusTTL=()=>{};#setItemTTL=()=>{};#isStale=()=>!1;#initializeSizeTracking(){let sizes=new ZeroArray(this.#max);this.#calculatedSize=0,this.#sizes=sizes,this.#removeItemSize=index=>{this.#calculatedSize-=sizes[index],sizes[index]=0},this.#requireSize=(k,v,size,sizeCalculation)=>{if(this.#isBackgroundFetch(v))return 0;if(!isPosInt(size))if(sizeCalculation){if("function"!=typeof sizeCalculation)throw TypeError("sizeCalculation must be a function");if(!isPosInt(size=sizeCalculation(v,k)))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return size},this.#addItemSize=(index,size,status)=>{if(sizes[index]=size,this.#maxSize){let maxSize=this.#maxSize-sizes[index];for(;this.#calculatedSize>maxSize;)this.#evict(!0)}this.#calculatedSize+=sizes[index],status&&(status.entrySize=size,status.totalCalculatedSize=this.#calculatedSize)}}#removeItemSize=_i=>{};#addItemSize=(_i,_s,_st)=>{};#requireSize=(_k,_v,size,sizeCalculation)=>{if(size||sizeCalculation)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#indexes({allowStale=this.allowStale}={}){if(this.#size)for(let i=this.#tail;this.#isValidIndex(i)&&((allowStale||!this.#isStale(i))&&(yield i),i!==this.#head);)i=this.#prev[i]}*#rindexes({allowStale=this.allowStale}={}){if(this.#size)for(let i=this.#head;this.#isValidIndex(i)&&((allowStale||!this.#isStale(i))&&(yield i),i!==this.#tail);)i=this.#next[i]}#isValidIndex(index){return void 0!==index&&this.#keyMap.get(this.#keyList[index])===index}*entries(){for(let i of this.#indexes())void 0===this.#valList[i]||void 0===this.#keyList[i]||this.#isBackgroundFetch(this.#valList[i])||(yield[this.#keyList[i],this.#valList[i]])}*rentries(){for(let i of this.#rindexes())void 0===this.#valList[i]||void 0===this.#keyList[i]||this.#isBackgroundFetch(this.#valList[i])||(yield[this.#keyList[i],this.#valList[i]])}*keys(){for(let i of this.#indexes()){let k=this.#keyList[i];void 0===k||this.#isBackgroundFetch(this.#valList[i])||(yield k)}}*rkeys(){for(let i of this.#rindexes()){let k=this.#keyList[i];void 0===k||this.#isBackgroundFetch(this.#valList[i])||(yield k)}}*values(){for(let i of this.#indexes())void 0===this.#valList[i]||this.#isBackgroundFetch(this.#valList[i])||(yield this.#valList[i])}*rvalues(){for(let i of this.#rindexes())void 0===this.#valList[i]||this.#isBackgroundFetch(this.#valList[i])||(yield this.#valList[i])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(fn,getOptions={}){for(let i of this.#indexes()){let v=this.#valList[i],value1=this.#isBackgroundFetch(v)?v.__staleWhileFetching:v;if(void 0!==value1&&fn(value1,this.#keyList[i],this))return this.get(this.#keyList[i],getOptions)}}forEach(fn,thisp=this){for(let i of this.#indexes()){let v=this.#valList[i],value1=this.#isBackgroundFetch(v)?v.__staleWhileFetching:v;void 0!==value1&&fn.call(thisp,value1,this.#keyList[i],this)}}rforEach(fn,thisp=this){for(let i of this.#rindexes()){let v=this.#valList[i],value1=this.#isBackgroundFetch(v)?v.__staleWhileFetching:v;void 0!==value1&&fn.call(thisp,value1,this.#keyList[i],this)}}purgeStale(){let deleted=!1;for(let i of this.#rindexes({allowStale:!0}))this.#isStale(i)&&(this.#delete(this.#keyList[i],"expire"),deleted=!0);return deleted}info(key){let i=this.#keyMap.get(key);if(void 0===i)return;let v=this.#valList[i],value1=this.#isBackgroundFetch(v)?v.__staleWhileFetching:v;if(void 0===value1)return;let entry={value:value1};if(this.#ttls&&this.#starts){let ttl=this.#ttls[i],start=this.#starts[i];ttl&&start&&(entry.ttl=ttl-(perf.now()-start),entry.start=Date.now())}return this.#sizes&&(entry.size=this.#sizes[i]),entry}dump(){let arr=[];for(let i of this.#indexes({allowStale:!0})){let key=this.#keyList[i],v=this.#valList[i],value1=this.#isBackgroundFetch(v)?v.__staleWhileFetching:v;if(void 0===value1||void 0===key)continue;let entry={value:value1};if(this.#ttls&&this.#starts){entry.ttl=this.#ttls[i];let age=perf.now()-this.#starts[i];entry.start=Math.floor(Date.now()-age)}this.#sizes&&(entry.size=this.#sizes[i]),arr.unshift([key,entry])}return arr}load(arr){for(let[key,entry]of(this.clear(),arr)){if(entry.start){let age=Date.now()-entry.start;entry.start=perf.now()-age}this.set(key,entry.value,entry)}}set(k,v,setOptions={}){if(void 0===v)return this.delete(k),this;let{ttl=this.ttl,start,noDisposeOnSet=this.noDisposeOnSet,sizeCalculation=this.sizeCalculation,status}=setOptions,{noUpdateTTL=this.noUpdateTTL}=setOptions,size=this.#requireSize(k,v,setOptions.size||0,sizeCalculation);if(this.maxEntrySize&&size>this.maxEntrySize)return status&&(status.set="miss",status.maxEntrySizeExceeded=!0),this.#delete(k,"set"),this;let index=0===this.#size?void 0:this.#keyMap.get(k);if(void 0===index)index=0===this.#size?this.#tail:0!==this.#free.length?this.#free.pop():this.#size===this.#max?this.#evict(!1):this.#size,this.#keyList[index]=k,this.#valList[index]=v,this.#keyMap.set(k,index),this.#next[this.#tail]=index,this.#prev[index]=this.#tail,this.#tail=index,this.#size++,this.#addItemSize(index,size,status),status&&(status.set="add"),noUpdateTTL=!1;else{this.#moveToTail(index);let oldVal=this.#valList[index];if(v!==oldVal){if(this.#hasFetchMethod&&this.#isBackgroundFetch(oldVal)){oldVal.__abortController.abort(Error("replaced"));let{__staleWhileFetching:s}=oldVal;void 0!==s&&!noDisposeOnSet&&(this.#hasDispose&&this.#dispose?.(s,k,"set"),this.#hasDisposeAfter&&this.#disposed?.push([s,k,"set"]))}else!noDisposeOnSet&&(this.#hasDispose&&this.#dispose?.(oldVal,k,"set"),this.#hasDisposeAfter&&this.#disposed?.push([oldVal,k,"set"]));if(this.#removeItemSize(index),this.#addItemSize(index,size,status),this.#valList[index]=v,status){status.set="replace";let oldValue=oldVal&&this.#isBackgroundFetch(oldVal)?oldVal.__staleWhileFetching:oldVal;void 0!==oldValue&&(status.oldValue=oldValue)}}else status&&(status.set="update")}if(0===ttl||this.#ttls||this.#initializeTTLTracking(),this.#ttls&&(noUpdateTTL||this.#setItemTTL(index,ttl,start),status&&this.#statusTTL(status,index)),!noDisposeOnSet&&this.#hasDisposeAfter&&this.#disposed){let task,dt=this.#disposed;for(;task=dt?.shift();)this.#disposeAfter?.(...task)}return this}pop(){try{for(;this.#size;){let val=this.#valList[this.#head];if(this.#evict(!0),this.#isBackgroundFetch(val)){if(val.__staleWhileFetching)return val.__staleWhileFetching}else if(void 0!==val)return val}}finally{if(this.#hasDisposeAfter&&this.#disposed){let task,dt=this.#disposed;for(;task=dt?.shift();)this.#disposeAfter?.(...task)}}}#evict(free){let head=this.#head,k=this.#keyList[head],v=this.#valList[head];return this.#hasFetchMethod&&this.#isBackgroundFetch(v)?v.__abortController.abort(Error("evicted")):(this.#hasDispose||this.#hasDisposeAfter)&&(this.#hasDispose&&this.#dispose?.(v,k,"evict"),this.#hasDisposeAfter&&this.#disposed?.push([v,k,"evict"])),this.#removeItemSize(head),free&&(this.#keyList[head]=void 0,this.#valList[head]=void 0,this.#free.push(head)),1===this.#size?(this.#head=this.#tail=0,this.#free.length=0):this.#head=this.#next[head],this.#keyMap.delete(k),this.#size--,head}has(k,hasOptions={}){let{updateAgeOnHas=this.updateAgeOnHas,status}=hasOptions,index=this.#keyMap.get(k);if(void 0!==index){let v=this.#valList[index];if(this.#isBackgroundFetch(v)&&void 0===v.__staleWhileFetching)return!1;if(!this.#isStale(index))return updateAgeOnHas&&this.#updateItemAge(index),status&&(status.has="hit",this.#statusTTL(status,index)),!0;status&&(status.has="stale",this.#statusTTL(status,index))}else status&&(status.has="miss");return!1}peek(k,peekOptions={}){let{allowStale=this.allowStale}=peekOptions,index=this.#keyMap.get(k);if(void 0===index||!allowStale&&this.#isStale(index))return;let v=this.#valList[index];return this.#isBackgroundFetch(v)?v.__staleWhileFetching:v}#backgroundFetch(k,index,options,context){let v=void 0===index?void 0:this.#valList[index];if(this.#isBackgroundFetch(v))return v;let ac=new AC,{signal}=options;signal?.addEventListener("abort",()=>ac.abort(signal.reason),{signal:ac.signal});let fetchOpts={signal:ac.signal,options,context},cb=(v,updateCache=!1)=>{let{aborted}=ac.signal,ignoreAbort=options.ignoreFetchAbort&&void 0!==v;return(options.status&&(aborted&&!updateCache?(options.status.fetchAborted=!0,options.status.fetchError=ac.signal.reason,ignoreAbort&&(options.status.fetchAbortIgnored=!0)):options.status.fetchResolved=!0),!aborted||ignoreAbort||updateCache)?(this.#valList[index]===p&&(void 0===v?p.__staleWhileFetching?this.#valList[index]=p.__staleWhileFetching:this.#delete(k,"fetch"):(options.status&&(options.status.fetchUpdated=!0),this.set(k,v,fetchOpts.options))),v):fetchFail(ac.signal.reason)},fetchFail=er=>{let{aborted}=ac.signal,allowStaleAborted=aborted&&options.allowStaleOnFetchAbort,allowStale=allowStaleAborted||options.allowStaleOnFetchRejection,noDelete=allowStale||options.noDeleteOnFetchRejection;if(this.#valList[index]===p&&(noDelete&&void 0!==p.__staleWhileFetching?allowStaleAborted||(this.#valList[index]=p.__staleWhileFetching):this.#delete(k,"fetch")),allowStale)return options.status&&void 0!==p.__staleWhileFetching&&(options.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw er},pcall=(res,rej)=>{let fmp=this.#fetchMethod?.(k,v,fetchOpts);fmp&&fmp instanceof Promise&&fmp.then(v=>res(void 0===v?void 0:v),rej),ac.signal.addEventListener("abort",()=>{(!options.ignoreFetchAbort||options.allowStaleOnFetchAbort)&&(res(void 0),options.allowStaleOnFetchAbort&&(res=v=>cb(v,!0)))})};options.status&&(options.status.fetchDispatched=!0);let p=new Promise(pcall).then(cb,er=>(options.status&&(options.status.fetchRejected=!0,options.status.fetchError=er),fetchFail(er))),bf=Object.assign(p,{__abortController:ac,__staleWhileFetching:v,__returned:void 0});return void 0===index?(this.set(k,bf,{...fetchOpts.options,status:void 0}),index=this.#keyMap.get(k)):this.#valList[index]=bf,bf}#isBackgroundFetch(p){return!!this.#hasFetchMethod&&!!p&&p instanceof Promise&&p.hasOwnProperty("__staleWhileFetching")&&p.__abortController instanceof AC}async fetch(k,fetchOptions={}){let{allowStale=this.allowStale,updateAgeOnGet=this.updateAgeOnGet,noDeleteOnStaleGet=this.noDeleteOnStaleGet,ttl=this.ttl,noDisposeOnSet=this.noDisposeOnSet,size=0,sizeCalculation=this.sizeCalculation,noUpdateTTL=this.noUpdateTTL,noDeleteOnFetchRejection=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection=this.allowStaleOnFetchRejection,ignoreFetchAbort=this.ignoreFetchAbort,allowStaleOnFetchAbort=this.allowStaleOnFetchAbort,context,forceRefresh=!1,status,signal}=fetchOptions;if(!this.#hasFetchMethod)return status&&(status.fetch="get"),this.get(k,{allowStale,updateAgeOnGet,noDeleteOnStaleGet,status});let options={allowStale,updateAgeOnGet,noDeleteOnStaleGet,ttl,noDisposeOnSet,size,sizeCalculation,noUpdateTTL,noDeleteOnFetchRejection,allowStaleOnFetchRejection,allowStaleOnFetchAbort,ignoreFetchAbort,status,signal},index=this.#keyMap.get(k);if(void 0===index){status&&(status.fetch="miss");let p=this.#backgroundFetch(k,index,options,context);return p.__returned=p}{let v=this.#valList[index];if(this.#isBackgroundFetch(v)){let stale=allowStale&&void 0!==v.__staleWhileFetching;return status&&(status.fetch="inflight",stale&&(status.returnedStale=!0)),stale?v.__staleWhileFetching:v.__returned=v}let isStale=this.#isStale(index);if(!forceRefresh&&!isStale)return status&&(status.fetch="hit"),this.#moveToTail(index),updateAgeOnGet&&this.#updateItemAge(index),status&&this.#statusTTL(status,index),v;let p=this.#backgroundFetch(k,index,options,context),staleVal=void 0!==p.__staleWhileFetching&&allowStale;return status&&(status.fetch=isStale?"stale":"refresh",staleVal&&isStale&&(status.returnedStale=!0)),staleVal?p.__staleWhileFetching:p.__returned=p}}async forceFetch(k,fetchOptions={}){let v=await this.fetch(k,fetchOptions);if(void 0===v)throw Error("fetch() returned undefined");return v}memo(k,memoOptions={}){let memoMethod=this.#memoMethod;if(!memoMethod)throw Error("no memoMethod provided to constructor");let{context,forceRefresh,...options}=memoOptions,v=this.get(k,options);if(!forceRefresh&&void 0!==v)return v;let vv=memoMethod(k,v,{options,context});return this.set(k,vv,options),vv}get(k,getOptions={}){let{allowStale=this.allowStale,updateAgeOnGet=this.updateAgeOnGet,noDeleteOnStaleGet=this.noDeleteOnStaleGet,status}=getOptions,index=this.#keyMap.get(k);if(void 0!==index){let value1=this.#valList[index],fetching=this.#isBackgroundFetch(value1);return(status&&this.#statusTTL(status,index),this.#isStale(index))?(status&&(status.get="stale"),fetching)?(status&&allowStale&&void 0!==value1.__staleWhileFetching&&(status.returnedStale=!0),allowStale?value1.__staleWhileFetching:void 0):(noDeleteOnStaleGet||this.#delete(k,"expire"),status&&allowStale&&(status.returnedStale=!0),allowStale?value1:void 0):(status&&(status.get="hit"),fetching)?value1.__staleWhileFetching:(this.#moveToTail(index),updateAgeOnGet&&this.#updateItemAge(index),value1)}status&&(status.get="miss")}#connect(p,n){this.#prev[n]=p,this.#next[p]=n}#moveToTail(index){index!==this.#tail&&(index===this.#head?this.#head=this.#next[index]:this.#connect(this.#prev[index],this.#next[index]),this.#connect(this.#tail,index),this.#tail=index)}delete(k){return this.#delete(k,"delete")}#delete(k,reason){let deleted=!1;if(0!==this.#size){let index=this.#keyMap.get(k);if(void 0!==index)if(deleted=!0,1===this.#size)this.#clear(reason);else{this.#removeItemSize(index);let v=this.#valList[index];if(this.#isBackgroundFetch(v)?v.__abortController.abort(Error("deleted")):(this.#hasDispose||this.#hasDisposeAfter)&&(this.#hasDispose&&this.#dispose?.(v,k,reason),this.#hasDisposeAfter&&this.#disposed?.push([v,k,reason])),this.#keyMap.delete(k),this.#keyList[index]=void 0,this.#valList[index]=void 0,index===this.#tail)this.#tail=this.#prev[index];else if(index===this.#head)this.#head=this.#next[index];else{let pi=this.#prev[index];this.#next[pi]=this.#next[index];let ni=this.#next[index];this.#prev[ni]=this.#prev[index]}this.#size--,this.#free.push(index)}}if(this.#hasDisposeAfter&&this.#disposed?.length){let task,dt=this.#disposed;for(;task=dt?.shift();)this.#disposeAfter?.(...task)}return deleted}clear(){return this.#clear("delete")}#clear(reason){for(let index of this.#rindexes({allowStale:!0})){let v=this.#valList[index];if(this.#isBackgroundFetch(v))v.__abortController.abort(Error("deleted"));else{let k=this.#keyList[index];this.#hasDispose&&this.#dispose?.(v,k,reason),this.#hasDisposeAfter&&this.#disposed?.push([v,k,reason])}}if(this.#keyMap.clear(),this.#valList.fill(void 0),this.#keyList.fill(void 0),this.#ttls&&this.#starts&&(this.#ttls.fill(0),this.#starts.fill(0)),this.#sizes&&this.#sizes.fill(0),this.#head=0,this.#tail=0,this.#free.length=0,this.#calculatedSize=0,this.#size=0,this.#hasDisposeAfter&&this.#disposed){let task,dt=this.#disposed;for(;task=dt?.shift();)this.#disposeAfter?.(...task)}}}exports1.LRUCache=LRUCache},9032(__unused_rspack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{VariablesAreInputTypesRule:()=>VariablesAreInputTypesRule,SingleFieldSubscriptionsRule:()=>SingleFieldSubscriptionsRule,UniqueVariableNamesRule:()=>UniqueVariableNamesRule,GraphQLDeprecatedDirective:()=>GraphQLDeprecatedDirective,GraphQLNonNull:()=>GraphQLNonNull,__InputValue:()=>__InputValue,createSourceEventStream:()=>createSourceEventStream,execute:()=>execute,isDefinitionNode:()=>isDefinitionNode,isInterfaceType:()=>isInterfaceType,isRequiredArgument:()=>isRequiredArgument,isValidNameError:()=>isValidNameError,parseValue:()=>parser_parseValue,version:()=>version,NoUnusedVariablesRule:()=>NoUnusedVariablesRule,__DirectiveLocation:()=>__DirectiveLocation,findDangerousChanges:()=>findDangerousChanges,__TypeKind:()=>__TypeKind,isSchema:()=>isSchema,UniqueTypeNamesRule:()=>UniqueTypeNamesRule,NoSchemaIntrospectionCustomRule:()=>NoSchemaIntrospectionCustomRule,defaultTypeResolver:()=>execute_defaultTypeResolver,isType:()=>isType,UniqueFragmentNamesRule:()=>UniqueFragmentNamesRule,assertWrappingType:()=>assertWrappingType,getNullableType:()=>getNullableType,isObjectType:()=>isObjectType,printSchema:()=>printSchema,validate:()=>validate,BREAK:()=>BREAK,assertNonNullType:()=>assertNonNullType,assertNullableType:()=>assertNullableType,executeSync:()=>executeSync,isLeafType:()=>isLeafType,assertOutputType:()=>assertOutputType,buildASTSchema:()=>buildASTSchema,astFromValue:()=>astFromValue,Kind:()=>Kind,ProvidedRequiredArgumentsRule:()=>ProvidedRequiredArgumentsRule,UniqueDirectiveNamesRule:()=>UniqueDirectiveNamesRule,TypeKind:()=>TypeKind,KnownDirectivesRule:()=>KnownDirectivesRule,DEFAULT_DEPRECATION_REASON:()=>DEFAULT_DEPRECATION_REASON,assertInterfaceType:()=>assertInterfaceType,isValueNode:()=>isValueNode,GraphQLSpecifiedByDirective:()=>GraphQLSpecifiedByDirective,GraphQLFloat:()=>GraphQLFloat,UniqueFieldDefinitionNamesRule:()=>UniqueFieldDefinitionNamesRule,LoneAnonymousOperationRule:()=>LoneAnonymousOperationRule,VariablesInAllowedPositionRule:()=>VariablesInAllowedPositionRule,assertInputType:()=>assertInputType,formatError:()=>formatError,assertInputObjectType:()=>assertInputObjectType,isOutputType:()=>isOutputType,isWrappingType:()=>isWrappingType,assertLeafType:()=>assertLeafType,assertValidSchema:()=>assertValidSchema,FragmentsOnCompositeTypesRule:()=>FragmentsOnCompositeTypesRule,graphql:()=>graphql,UniqueOperationTypesRule:()=>UniqueOperationTypesRule,printError:()=>printError,UniqueEnumValueNamesRule:()=>UniqueEnumValueNamesRule,isNonNullType:()=>isNonNullType,isSelectionNode:()=>isSelectionNode,specifiedDirectives:()=>specifiedDirectives,validateSchema:()=>validateSchema,visit:()=>visit,GraphQLScalarType:()=>definition_GraphQLScalarType,assertEnumType:()=>assertEnumType,UniqueDirectivesPerLocationRule:()=>UniqueDirectivesPerLocationRule,getDirectiveValues:()=>getDirectiveValues,isEqualType:()=>isEqualType,isNamedType:()=>isNamedType,isTypeDefinitionNode:()=>isTypeDefinitionNode,parse:()=>parse,__Schema:()=>__Schema,isTypeSystemDefinitionNode:()=>isTypeSystemDefinitionNode,valueFromASTUntyped:()=>valueFromASTUntyped,LoneSchemaDefinitionRule:()=>LoneSchemaDefinitionRule,isTypeSubTypeOf:()=>isTypeSubTypeOf,UniqueArgumentNamesRule:()=>UniqueArgumentNamesRule,UniqueInputFieldNamesRule:()=>UniqueInputFieldNamesRule,locatedError:()=>locatedError,typeFromAST:()=>typeFromAST,printLocation:()=>printLocation,assertUnionType:()=>assertUnionType,separateOperations:()=>separateOperations,Location:()=>ast_Location,GraphQLObjectType:()=>definition_GraphQLObjectType,stripIgnoredCharacters:()=>stripIgnoredCharacters,visitInParallel:()=>visitInParallel,parseType:()=>parseType,isTypeNode:()=>isTypeNode,PossibleTypeExtensionsRule:()=>PossibleTypeExtensionsRule,getDescription:()=>getDescription,graphqlSync:()=>graphqlSync,DirectiveLocation:()=>DirectiveLocation,TypeNameMetaFieldDef:()=>TypeNameMetaFieldDef,coerceInputValue:()=>coerceInputValue,GraphQLInt:()=>GraphQLInt,GraphQLInterfaceType:()=>definition_GraphQLInterfaceType,UniqueOperationNamesRule:()=>UniqueOperationNamesRule,GraphQLSkipDirective:()=>GraphQLSkipDirective,isEnumType:()=>isEnumType,assertValidName:()=>assertValidName,buildClientSchema:()=>buildClientSchema,KnownArgumentNamesRule:()=>KnownArgumentNamesRule,ValuesOfCorrectTypeRule:()=>ValuesOfCorrectTypeRule,isInputObjectType:()=>isInputObjectType,GraphQLID:()=>GraphQLID,NoUnusedFragmentsRule:()=>NoUnusedFragmentsRule,isUnionType:()=>isUnionType,isSpecifiedScalarType:()=>isSpecifiedScalarType,printSourceLocation:()=>printSourceLocation,__EnumValue:()=>__EnumValue,getOperationAST:()=>getOperationAST,isExecutableDefinitionNode:()=>isExecutableDefinitionNode,isAbstractType:()=>isAbstractType,assertAbstractType:()=>assertAbstractType,isTypeExtensionNode:()=>isTypeExtensionNode,GraphQLInputObjectType:()=>definition_GraphQLInputObjectType,getNamedType:()=>definition_getNamedType,KnownFragmentNamesRule:()=>KnownFragmentNamesRule,isListType:()=>isListType,Lexer:()=>lexer_Lexer,isSpecifiedDirective:()=>isSpecifiedDirective,responsePathAsArray:()=>pathToArray,isDirective:()=>isDirective,TypeInfo:()=>TypeInfo_TypeInfo,assertScalarType:()=>assertScalarType,extendSchema:()=>extendSchema,isIntrospectionType:()=>isIntrospectionType,print:()=>print,getIntrospectionQuery:()=>getIntrospectionQuery,GraphQLBoolean:()=>GraphQLBoolean,KnownTypeNamesRule:()=>KnownTypeNamesRule,assertListType:()=>assertListType,concatAST:()=>concatAST,NoDeprecatedCustomRule:()=>NoDeprecatedCustomRule,defaultFieldResolver:()=>execute_defaultFieldResolver,GraphQLDirective:()=>directives_GraphQLDirective,getLocation:()=>getLocation,TypeMetaFieldDef:()=>TypeMetaFieldDef,ScalarLeafsRule:()=>ScalarLeafsRule,GraphQLIncludeDirective:()=>GraphQLIncludeDirective,assertSchema:()=>assertSchema,lexicographicSortSchema:()=>lexicographicSortSchema,specifiedRules:()=>specifiedRules,GraphQLList:()=>GraphQLList,isTypeSystemExtensionNode:()=>isTypeSystemExtensionNode,specifiedScalarTypes:()=>specifiedScalarTypes,BreakingChangeType:()=>BreakingChangeType,ExecutableDefinitionsRule:()=>ExecutableDefinitionsRule,assertDirective:()=>assertDirective,__Field:()=>__Field,getVisitFn:()=>getVisitFn,versionInfo:()=>versionInfo,SchemaMetaFieldDef:()=>SchemaMetaFieldDef,assertCompositeType:()=>assertCompositeType,findDeprecatedUsages:()=>findDeprecatedUsages,Token:()=>ast_Token,isRequiredInputField:()=>isRequiredInputField,DangerousChangeType:()=>DangerousChangeType,GraphQLUnionType:()=>definition_GraphQLUnionType,isCompositeType:()=>isCompositeType,GraphQLString:()=>GraphQLString,FieldsOnCorrectTypeRule:()=>FieldsOnCorrectTypeRule,assertType:()=>assertType,introspectionFromSchema:()=>introspectionFromSchema,doTypesOverlap:()=>doTypesOverlap,GraphQLEnumType:()=>definition_GraphQLEnumType,syntaxError:()=>syntaxError_syntaxError,NoFragmentCyclesRule:()=>NoFragmentCyclesRule,findBreakingChanges:()=>findBreakingChanges,ValidationContext:()=>ValidationContext_ValidationContext,OverlappingFieldsCanBeMergedRule:()=>OverlappingFieldsCanBeMergedRule,isScalarType:()=>isScalarType,assertObjectType:()=>assertObjectType,NoUndefinedVariablesRule:()=>NoUndefinedVariablesRule,getOperationRootType:()=>getOperationRootType,printType:()=>printType,visitWithTypeInfo:()=>visitWithTypeInfo,isInputType:()=>isInputType,__Directive:()=>__Directive,GraphQLSchema:()=>schema_GraphQLSchema,Source:()=>source_Source,GraphQLError:()=>GraphQLError_GraphQLError,assertNamedType:()=>assertNamedType,buildSchema:()=>buildSchema,introspectionTypes:()=>introspectionTypes,PossibleFragmentSpreadsRule:()=>PossibleFragmentSpreadsRule,__Type:()=>__Type,printIntrospectionSchema:()=>printIntrospectionSchema,TokenKind:()=>TokenKind,subscribe:()=>subscribe,isNullableType:()=>isNullableType,valueFromAST:()=>valueFromAST});var fn,cache0,_defKindToExtKind,version="15.8.0",versionInfo=Object.freeze({major:15,minor:8,patch:0,preReleaseTag:null});function isPromise(value1){return"function"==typeof(null==value1?void 0:value1.then)}function isObjectLike_typeof(obj){return(isObjectLike_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function isObjectLike(value1){return"object"==isObjectLike_typeof(value1)&&null!==value1}var SYMBOL_ITERATOR="function"==typeof Symbol&&null!=Symbol.iterator?Symbol.iterator:"@@iterator",SYMBOL_ASYNC_ITERATOR="function"==typeof Symbol&&null!=Symbol.asyncIterator?Symbol.asyncIterator:"@@asyncIterator",SYMBOL_TO_STRING_TAG="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function getLocation(source,position){for(var match,lineRegexp=/\r\n|[\n\r]/g,line=1,column=position+1;(match=lineRegexp.exec(source.body))&&match.index<position;)line+=1,column=position+1-(match.index+match[0].length);return{line:line,column:column}}function printLocation(location){return printSourceLocation(location.source,getLocation(location.source,location.start))}function printSourceLocation(source,sourceLocation){var firstLineColumnOffset=source.locationOffset.column-1,body=whitespace(firstLineColumnOffset)+source.body,lineIndex=sourceLocation.line-1,lineOffset=source.locationOffset.line-1,lineNum=sourceLocation.line+lineOffset,columnOffset=1===sourceLocation.line?firstLineColumnOffset:0,columnNum=sourceLocation.column+columnOffset,locationStr="".concat(source.name,":").concat(lineNum,":").concat(columnNum,"\n"),lines=body.split(/\r\n|[\n\r]/g),locationLine=lines[lineIndex];if(locationLine.length>120){for(var subLineIndex=Math.floor(columnNum/80),subLineColumnNum=columnNum%80,subLines=[],i=0;i<locationLine.length;i+=80)subLines.push(locationLine.slice(i,i+80));return locationStr+printPrefixedLines([["".concat(lineNum),subLines[0]]].concat(subLines.slice(1,subLineIndex+1).map(function(subLine){return["",subLine]}),[[" ",whitespace(subLineColumnNum-1)+"^"],["",subLines[subLineIndex+1]]]))}return locationStr+printPrefixedLines([["".concat(lineNum-1),lines[lineIndex-1]],["".concat(lineNum),locationLine],["",whitespace(columnNum-1)+"^"],["".concat(lineNum+1),lines[lineIndex+1]]])}function printPrefixedLines(lines){var existingLines=lines.filter(function(_ref){return _ref[0],void 0!==_ref[1]}),padLen=Math.max.apply(Math,existingLines.map(function(_ref2){return _ref2[0].length}));return existingLines.map(function(_ref3){var str,prefix=_ref3[0],line=_ref3[1];return whitespace(padLen-(str=prefix).length)+str+(line?" | "+line:" |")}).join("\n")}function whitespace(len){return Array(len+1).join(" ")}function GraphQLError_typeof(obj){return(GraphQLError_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _possibleConstructorReturn(self1,call){return call&&("object"===GraphQLError_typeof(call)||"function"==typeof call)?call:_assertThisInitialized(self1)}function _assertThisInitialized(self1){if(void 0===self1)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return self1}function GraphQLError_wrapNativeSuper(Class){var _cache="function"==typeof Map?new Map:void 0;return(GraphQLError_wrapNativeSuper=function(Class){var fn;if(null===Class||(fn=Class,-1===Function.toString.call(fn).indexOf("[native code]")))return Class;if("function"!=typeof Class)throw TypeError("Super expression must either be null or a function");if(void 0!==_cache){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper)}function Wrapper(){return GraphQLError_construct(Class,arguments,GraphQLError_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),GraphQLError_setPrototypeOf(Wrapper,Class)})(Class)}function GraphQLError_construct(Parent,args,Class){return(GraphQLError_construct=_isNativeReflectConstruct()?Reflect.construct:function(Parent,args,Class){var a=[null];a.push.apply(a,args);var instance=new(Function.bind.apply(Parent,a));return Class&&GraphQLError_setPrototypeOf(instance,Class.prototype),instance}).apply(null,arguments)}function _isNativeReflectConstruct(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function GraphQLError_setPrototypeOf(o,p){return(GraphQLError_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function GraphQLError_getPrototypeOf(o){return(GraphQLError_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var GraphQLError_GraphQLError=function(_Error){if("function"!=typeof _Error&&null!==_Error)throw TypeError("Super expression must either be null or a function");GraphQLError.prototype=Object.create(_Error&&_Error.prototype,{constructor:{value:GraphQLError,writable:!0,configurable:!0}}),_Error&&GraphQLError_setPrototypeOf(GraphQLError,_Error);var hasNativeReflectConstruct,protoProps,_super=(hasNativeReflectConstruct=_isNativeReflectConstruct(),function(){var result,Super=GraphQLError_getPrototypeOf(GraphQLError);return result=hasNativeReflectConstruct?Reflect.construct(Super,arguments,GraphQLError_getPrototypeOf(this).constructor):Super.apply(this,arguments),_possibleConstructorReturn(this,result)});function GraphQLError(message,nodes,source,positions,path,originalError,extensions){if(!(this instanceof GraphQLError))throw TypeError("Cannot call a class as a function");(_this=_super.call(this,message)).name="GraphQLError",_this.originalError=null!=originalError?originalError:void 0,_this.nodes=undefinedIfEmpty(Array.isArray(nodes)?nodes:nodes?[nodes]:void 0);for(var nodeLocations=[],_i2=0,_ref3=null!=(_this$nodes=_this.nodes)?_this$nodes:[];_i2<_ref3.length;_i2++){var _nodeLocations,_nodeLocations2,_nodeLocations3,_this,_this$nodes,loc=_ref3[_i2].loc;null!=loc&&nodeLocations.push(loc)}nodeLocations=undefinedIfEmpty(nodeLocations),_this.source=null!=source?source:null==(_nodeLocations=nodeLocations)?void 0:_nodeLocations[0].source,_this.positions=null!=positions?positions:null==(_nodeLocations2=nodeLocations)?void 0:_nodeLocations2.map(function(loc){return loc.start}),_this.locations=positions&&source?positions.map(function(pos){return getLocation(source,pos)}):null==(_nodeLocations3=nodeLocations)?void 0:_nodeLocations3.map(function(loc){return getLocation(loc.source,loc.start)}),_this.path=null!=path?path:void 0;var originalExtensions=null==originalError?void 0:originalError.extensions;return(null==extensions&&isObjectLike(originalExtensions)?_this.extensions=function(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({},originalExtensions):_this.extensions=null!=extensions?extensions:{},Object.defineProperties(_assertThisInitialized(_this),{message:{enumerable:!0},locations:{enumerable:null!=_this.locations},path:{enumerable:null!=_this.path},extensions:{enumerable:null!=_this.extensions&&Object.keys(_this.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=originalError&&originalError.stack)?(Object.defineProperty(_assertThisInitialized(_this),"stack",{value:originalError.stack,writable:!0,configurable:!0}),_possibleConstructorReturn(_this)):(Error.captureStackTrace?Error.captureStackTrace(_assertThisInitialized(_this),GraphQLError):Object.defineProperty(_assertThisInitialized(_this),"stack",{value:Error().stack,writable:!0,configurable:!0}),_this)}return protoProps=[{key:"toString",value:function(){return printError(this)}},{key:SYMBOL_TO_STRING_TAG,get:function(){return"Object"}}],function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}(GraphQLError.prototype,protoProps),GraphQLError}(GraphQLError_wrapNativeSuper(Error));function undefinedIfEmpty(array){return void 0===array||0===array.length?void 0:array}function printError(error){var output=error.message;if(error.nodes)for(var _i4=0,_error$nodes2=error.nodes;_i4<_error$nodes2.length;_i4++){var node=_error$nodes2[_i4];node.loc&&(output+="\n\n"+printLocation(node.loc))}else if(error.source&&error.locations)for(var _i6=0,_error$locations2=error.locations;_i6<_error$locations2.length;_i6++){var location=_error$locations2[_i6];output+="\n\n"+printSourceLocation(error.source,location)}return output}function syntaxError_syntaxError(source,position,description){return new GraphQLError_GraphQLError("Syntax Error: ".concat(description),void 0,source,[position])}var Kind=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});function invariant(condition,message){if(!condition)throw Error(null!=message?message:"Unexpected invariant triggered.")}var nodejsCustomInspectSymbol="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function defineInspect(classObject){var fn=classObject.prototype.toJSON;"function"==typeof fn||invariant(0),classObject.prototype.inspect=fn,nodejsCustomInspectSymbol&&(classObject.prototype[nodejsCustomInspectSymbol]=fn)}var ast_Location=function(){function Location(startToken,endToken,source){this.start=startToken.start,this.end=endToken.end,this.startToken=startToken,this.endToken=endToken,this.source=source}return Location.prototype.toJSON=function(){return{start:this.start,end:this.end}},Location}();defineInspect(ast_Location);var ast_Token=function(){function Token(kind,start,end,line,column,prev,value1){this.kind=kind,this.start=start,this.end=end,this.line=line,this.column=column,this.value=value1,this.prev=prev,this.next=null}return Token.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},Token}();function isNode(maybeNode){return null!=maybeNode&&"string"==typeof maybeNode.kind}defineInspect(ast_Token);var TokenKind=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function inspect_typeof(obj){return(inspect_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function inspect(value1){return function formatValue(value1,seenValues){switch(inspect_typeof(value1)){case"string":return JSON.stringify(value1);case"function":return value1.name?"[function ".concat(value1.name,"]"):"[function]";case"object":if(null===value1)return"null";return function(value1,previouslySeenValues){if(-1!==previouslySeenValues.indexOf(value1))return"[Circular]";var object,customInspectFn,object1,seenValues,keys,seenValues1=[].concat(previouslySeenValues,[value1]),customInspectFn1="function"==typeof(customInspectFn=(object=value1)[String(nodejsCustomInspectSymbol)])?customInspectFn:"function"==typeof object.inspect?object.inspect:void 0;if(void 0!==customInspectFn1){var customValue=customInspectFn1.call(value1);if(customValue!==value1)return"string"==typeof customValue?customValue:formatValue(customValue,seenValues1)}else if(Array.isArray(value1)){var array=value1,seenValues2=seenValues1;if(0===array.length)return"[]";if(seenValues2.length>2)return"[Array]";for(var len=Math.min(10,array.length),remaining=array.length-len,items=[],i=0;i<len;++i)items.push(formatValue(array[i],seenValues2));return 1===remaining?items.push("... 1 more item"):remaining>1&&items.push("... ".concat(remaining," more items")),"["+items.join(", ")+"]"}return object1=value1,seenValues=seenValues1,0===(keys=Object.keys(object1)).length?"{}":seenValues.length>2?"["+function(object){var tag=Object.prototype.toString.call(object).replace(/^\[object /,"").replace(/]$/,"");if("Object"===tag&&"function"==typeof object.constructor){var name=object.constructor.name;if("string"==typeof name&&""!==name)return name}return tag}(object1)+"]":"{ "+keys.map(function(key){var value1=formatValue(object1[key],seenValues);return key+": "+value1}).join(", ")+" }"}(value1,seenValues);default:return String(value1)}}(value1,[])}function devAssert(condition,message){if(!condition)throw Error(message)}let jsutils_instanceOf=function(value1,constructor){return value1 instanceof constructor};var source_Source=function(){var protoProps;function Source(body){var name=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",locationOffset=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof body||devAssert(0,"Body must be a string. Received: ".concat(inspect(body),".")),this.body=body,this.name=name,this.locationOffset=locationOffset,this.locationOffset.line>0||devAssert(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||devAssert(0,"column in locationOffset is 1-indexed and must be positive.")}return protoProps=[{key:SYMBOL_TO_STRING_TAG,get:function(){return"Source"}}],function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}(Source.prototype,protoProps),Source}(),DirectiveLocation=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function dedentBlockStringValue(rawString){var lines=rawString.split(/\r\n|[\n\r]/g),commonIndent=getBlockStringIndentation(rawString);if(0!==commonIndent)for(var i=1;i<lines.length;i++)lines[i]=lines[i].slice(commonIndent);for(var startLine=0;startLine<lines.length&&isBlank(lines[startLine]);)++startLine;for(var endLine=lines.length;endLine>startLine&&isBlank(lines[endLine-1]);)--endLine;return lines.slice(startLine,endLine).join("\n")}function isBlank(str){for(var i=0;i<str.length;++i)if(" "!==str[i]&&" "!==str[i])return!1;return!0}function getBlockStringIndentation(value1){for(var _commonIndent,isFirstLine=!0,isEmptyLine=!0,indent=0,commonIndent=null,i=0;i<value1.length;++i)switch(value1.charCodeAt(i)){case 13:10===value1.charCodeAt(i+1)&&++i;case 10:isFirstLine=!1,isEmptyLine=!0,indent=0;break;case 9:case 32:++indent;break;default:isEmptyLine&&!isFirstLine&&(null===commonIndent||indent<commonIndent)&&(commonIndent=indent),isEmptyLine=!1}return null!=(_commonIndent=commonIndent)?_commonIndent:0}function printBlockString(value1){var indentation=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",preferMultipleLines=arguments.length>2&&void 0!==arguments[2]&&arguments[2],isSingleLine=-1===value1.indexOf("\n"),hasLeadingSpace=" "===value1[0]||" "===value1[0],hasTrailingQuote='"'===value1[value1.length-1],hasTrailingSlash="\\"===value1[value1.length-1],printAsMultipleLines=!isSingleLine||hasTrailingQuote||hasTrailingSlash||preferMultipleLines,result="";return printAsMultipleLines&&!(isSingleLine&&hasLeadingSpace)&&(result+="\n"+indentation),result+=indentation?value1.replace(/\n/g,"\n"+indentation):value1,printAsMultipleLines&&(result+="\n"),'"""'+result.replace(/"""/g,'\\"""')+'"""'}var lexer_Lexer=function(){function Lexer(source){var startOfFileToken=new ast_Token(TokenKind.SOF,0,0,0,0,null);this.source=source,this.lastToken=startOfFileToken,this.token=startOfFileToken,this.line=1,this.lineStart=0}var _proto=Lexer.prototype;return _proto.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},_proto.lookahead=function(){var _token$next,token=this.token;if(token.kind!==TokenKind.EOF)do token=null!=(_token$next=token.next)?_token$next:token.next=function(lexer,prev){for(var source=lexer.source,body=source.body,bodyLength=body.length,pos=prev.end;pos<bodyLength;){var code,code1=body.charCodeAt(pos),_line=lexer.line,_col=1+pos-lexer.lineStart;switch(code1){case 65279:case 9:case 32:case 44:++pos;continue;case 10:++pos,++lexer.line,lexer.lineStart=pos;continue;case 13:10===body.charCodeAt(pos+1)?pos+=2:++pos,++lexer.line,lexer.lineStart=pos;continue;case 33:return new ast_Token(TokenKind.BANG,pos,pos+1,_line,_col,prev);case 35:return function(source,start,line,col,prev){var code,body=source.body,position=start;do code=body.charCodeAt(++position);while(!isNaN(code)&&(code>31||9===code));return new ast_Token(TokenKind.COMMENT,start,position,line,col,prev,body.slice(start+1,position))}(source,pos,_line,_col,prev);case 36:return new ast_Token(TokenKind.DOLLAR,pos,pos+1,_line,_col,prev);case 38:return new ast_Token(TokenKind.AMP,pos,pos+1,_line,_col,prev);case 40:return new ast_Token(TokenKind.PAREN_L,pos,pos+1,_line,_col,prev);case 41:return new ast_Token(TokenKind.PAREN_R,pos,pos+1,_line,_col,prev);case 46:if(46===body.charCodeAt(pos+1)&&46===body.charCodeAt(pos+2))return new ast_Token(TokenKind.SPREAD,pos,pos+3,_line,_col,prev);break;case 58:return new ast_Token(TokenKind.COLON,pos,pos+1,_line,_col,prev);case 61:return new ast_Token(TokenKind.EQUALS,pos,pos+1,_line,_col,prev);case 64:return new ast_Token(TokenKind.AT,pos,pos+1,_line,_col,prev);case 91:return new ast_Token(TokenKind.BRACKET_L,pos,pos+1,_line,_col,prev);case 93:return new ast_Token(TokenKind.BRACKET_R,pos,pos+1,_line,_col,prev);case 123:return new ast_Token(TokenKind.BRACE_L,pos,pos+1,_line,_col,prev);case 124:return new ast_Token(TokenKind.PIPE,pos,pos+1,_line,_col,prev);case 125:return new ast_Token(TokenKind.BRACE_R,pos,pos+1,_line,_col,prev);case 34:if(34===body.charCodeAt(pos+1)&&34===body.charCodeAt(pos+2))return function(source,start,line,col,prev,lexer){for(var body=source.body,position=start+3,chunkStart=position,code=0,rawValue="";position<body.length&&!isNaN(code=body.charCodeAt(position));){if(34===code&&34===body.charCodeAt(position+1)&&34===body.charCodeAt(position+2))return rawValue+=body.slice(chunkStart,position),new ast_Token(TokenKind.BLOCK_STRING,start,position+3,line,col,prev,dedentBlockStringValue(rawValue));if(code<32&&9!==code&&10!==code&&13!==code)throw syntaxError_syntaxError(source,position,"Invalid character within String: ".concat(printCharCode(code),"."));10===code?(++position,++lexer.line,lexer.lineStart=position):13===code?(10===body.charCodeAt(position+1)?position+=2:++position,++lexer.line,lexer.lineStart=position):92===code&&34===body.charCodeAt(position+1)&&34===body.charCodeAt(position+2)&&34===body.charCodeAt(position+3)?(rawValue+=body.slice(chunkStart,position)+'"""',position+=4,chunkStart=position):++position}throw syntaxError_syntaxError(source,position,"Unterminated string.")}(source,pos,_line,_col,prev,lexer);return function(source,start,line,col,prev){for(var body=source.body,position=start+1,chunkStart=position,code=0,value1="";position<body.length&&!isNaN(code=body.charCodeAt(position))&&10!==code&&13!==code;){if(34===code)return value1+=body.slice(chunkStart,position),new ast_Token(TokenKind.STRING,start,position+1,line,col,prev,value1);if(code<32&&9!==code)throw syntaxError_syntaxError(source,position,"Invalid character within String: ".concat(printCharCode(code),"."));if(++position,92===code){switch(value1+=body.slice(chunkStart,position-1),code=body.charCodeAt(position)){case 34:value1+='"';break;case 47:value1+="/";break;case 92:value1+="\\";break;case 98:value1+="\b";break;case 102:value1+="\f";break;case 110:value1+="\n";break;case 114:value1+="\r";break;case 116:value1+=" ";break;case 117:var a,b,c,d,charCode=(a=body.charCodeAt(position+1),b=body.charCodeAt(position+2),c=body.charCodeAt(position+3),d=body.charCodeAt(position+4),char2hex(a)<<12|char2hex(b)<<8|char2hex(c)<<4|char2hex(d));if(charCode<0){var invalidSequence=body.slice(position+1,position+5);throw syntaxError_syntaxError(source,position,"Invalid character escape sequence: \\u".concat(invalidSequence,"."))}value1+=String.fromCharCode(charCode),position+=4;break;default:throw syntaxError_syntaxError(source,position,"Invalid character escape sequence: \\".concat(String.fromCharCode(code),"."))}chunkStart=++position}}throw syntaxError_syntaxError(source,position,"Unterminated string.")}(source,pos,_line,_col,prev);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(source,start,firstCode,line,col,prev){var code,body=source.body,code1=firstCode,position=start,isFloat=!1;if(45===code1&&(code1=body.charCodeAt(++position)),48===code1){if((code1=body.charCodeAt(++position))>=48&&code1<=57)throw syntaxError_syntaxError(source,position,"Invalid number, unexpected digit after 0: ".concat(printCharCode(code1),"."))}else position=readDigits(source,position,code1),code1=body.charCodeAt(position);if(46===code1&&(isFloat=!0,code1=body.charCodeAt(++position),position=readDigits(source,position,code1),code1=body.charCodeAt(position)),(69===code1||101===code1)&&(isFloat=!0,(43===(code1=body.charCodeAt(++position))||45===code1)&&(code1=body.charCodeAt(++position)),position=readDigits(source,position,code1),code1=body.charCodeAt(position)),46===code1||95===(code=code1)||code>=65&&code<=90||code>=97&&code<=122)throw syntaxError_syntaxError(source,position,"Invalid number, expected digit but got: ".concat(printCharCode(code1),"."));return new ast_Token(isFloat?TokenKind.FLOAT:TokenKind.INT,start,position,line,col,prev,body.slice(start,position))}(source,pos,code1,_line,_col,prev);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:for(var source1=source,start=pos,line=_line,col=_col,prev1=prev,body1=source1.body,bodyLength1=body1.length,position=start+1,code2=0;position!==bodyLength1&&!isNaN(code2=body1.charCodeAt(position))&&(95===code2||code2>=48&&code2<=57||code2>=65&&code2<=90||code2>=97&&code2<=122);)++position;return new ast_Token(TokenKind.NAME,start,position,line,col,prev1,body1.slice(start,position))}throw syntaxError_syntaxError(source,pos,(code=code1)<32&&9!==code&&10!==code&&13!==code?"Cannot contain the invalid character ".concat(printCharCode(code),"."):39===code?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(printCharCode(code),"."))}var line1=lexer.line,col1=1+pos-lexer.lineStart;return new ast_Token(TokenKind.EOF,bodyLength,bodyLength,line1,col1,prev)}(this,token);while(token.kind===TokenKind.COMMENT);return token},Lexer}();function isPunctuatorTokenKind(kind){return kind===TokenKind.BANG||kind===TokenKind.DOLLAR||kind===TokenKind.AMP||kind===TokenKind.PAREN_L||kind===TokenKind.PAREN_R||kind===TokenKind.SPREAD||kind===TokenKind.COLON||kind===TokenKind.EQUALS||kind===TokenKind.AT||kind===TokenKind.BRACKET_L||kind===TokenKind.BRACKET_R||kind===TokenKind.BRACE_L||kind===TokenKind.PIPE||kind===TokenKind.BRACE_R}function printCharCode(code){return isNaN(code)?TokenKind.EOF:code<127?JSON.stringify(String.fromCharCode(code)):'"\\u'.concat(("00"+code.toString(16).toUpperCase()).slice(-4),'"')}function readDigits(source,start,firstCode){var body=source.body,position=start,code=firstCode;if(code>=48&&code<=57){do code=body.charCodeAt(++position);while(code>=48&&code<=57);return position}throw syntaxError_syntaxError(source,position,"Invalid number, expected digit but got: ".concat(printCharCode(code),"."))}function char2hex(a){return a>=48&&a<=57?a-48:a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:-1}function parse(source,options){return new parser_Parser(source,options).parseDocument()}function parser_parseValue(source,options){var parser=new parser_Parser(source,options);parser.expectToken(TokenKind.SOF);var value1=parser.parseValueLiteral(!1);return parser.expectToken(TokenKind.EOF),value1}function parseType(source,options){var parser=new parser_Parser(source,options);parser.expectToken(TokenKind.SOF);var type=parser.parseTypeReference();return parser.expectToken(TokenKind.EOF),type}var parser_Parser=function(){function Parser(source,options){var sourceObj=jsutils_instanceOf(source,source_Source)?source:new source_Source(source);this._lexer=new lexer_Lexer(sourceObj),this._options=options}var _proto=Parser.prototype;return _proto.parseName=function(){var token=this.expectToken(TokenKind.NAME);return{kind:Kind.NAME,value:token.value,loc:this.loc(token)}},_proto.parseDocument=function(){var start=this._lexer.token;return{kind:Kind.DOCUMENT,definitions:this.many(TokenKind.SOF,this.parseDefinition,TokenKind.EOF),loc:this.loc(start)}},_proto.parseDefinition=function(){if(this.peek(TokenKind.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else if(this.peek(TokenKind.BRACE_L))return this.parseOperationDefinition();else if(this.peekDescription())return this.parseTypeSystemDefinition();throw this.unexpected()},_proto.parseOperationDefinition=function(){var name,start=this._lexer.token;if(this.peek(TokenKind.BRACE_L))return{kind:Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(start)};var operation=this.parseOperationType();return this.peek(TokenKind.NAME)&&(name=this.parseName()),{kind:Kind.OPERATION_DEFINITION,operation:operation,name:name,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(start)}},_proto.parseOperationType=function(){var operationToken=this.expectToken(TokenKind.NAME);switch(operationToken.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(operationToken)},_proto.parseVariableDefinitions=function(){return this.optionalMany(TokenKind.PAREN_L,this.parseVariableDefinition,TokenKind.PAREN_R)},_proto.parseVariableDefinition=function(){var start=this._lexer.token;return{kind:Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(TokenKind.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(start)}},_proto.parseVariable=function(){var start=this._lexer.token;return this.expectToken(TokenKind.DOLLAR),{kind:Kind.VARIABLE,name:this.parseName(),loc:this.loc(start)}},_proto.parseSelectionSet=function(){var start=this._lexer.token;return{kind:Kind.SELECTION_SET,selections:this.many(TokenKind.BRACE_L,this.parseSelection,TokenKind.BRACE_R),loc:this.loc(start)}},_proto.parseSelection=function(){return this.peek(TokenKind.SPREAD)?this.parseFragment():this.parseField()},_proto.parseField=function(){var alias,name,start=this._lexer.token,nameOrAlias=this.parseName();return this.expectOptionalToken(TokenKind.COLON)?(alias=nameOrAlias,name=this.parseName()):name=nameOrAlias,{kind:Kind.FIELD,alias:alias,name:name,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(TokenKind.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(start)}},_proto.parseArguments=function(isConst){var item=isConst?this.parseConstArgument:this.parseArgument;return this.optionalMany(TokenKind.PAREN_L,item,TokenKind.PAREN_R)},_proto.parseArgument=function(){var start=this._lexer.token,name=this.parseName();return this.expectToken(TokenKind.COLON),{kind:Kind.ARGUMENT,name:name,value:this.parseValueLiteral(!1),loc:this.loc(start)}},_proto.parseConstArgument=function(){var start=this._lexer.token;return{kind:Kind.ARGUMENT,name:this.parseName(),value:(this.expectToken(TokenKind.COLON),this.parseValueLiteral(!0)),loc:this.loc(start)}},_proto.parseFragment=function(){var start=this._lexer.token;this.expectToken(TokenKind.SPREAD);var hasTypeCondition=this.expectOptionalKeyword("on");return!hasTypeCondition&&this.peek(TokenKind.NAME)?{kind:Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(start)}:{kind:Kind.INLINE_FRAGMENT,typeCondition:hasTypeCondition?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(start)}},_proto.parseFragmentDefinition=function(){var _this$_options,start=this._lexer.token;return(this.expectKeyword("fragment"),(null==(_this$_options=this._options)?void 0:_this$_options.experimentalFragmentVariables)===!0)?{kind:Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(start)}:{kind:Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(start)}},_proto.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},_proto.parseValueLiteral=function(isConst){var token=this._lexer.token;switch(token.kind){case TokenKind.BRACKET_L:return this.parseList(isConst);case TokenKind.BRACE_L:return this.parseObject(isConst);case TokenKind.INT:return this._lexer.advance(),{kind:Kind.INT,value:token.value,loc:this.loc(token)};case TokenKind.FLOAT:return this._lexer.advance(),{kind:Kind.FLOAT,value:token.value,loc:this.loc(token)};case TokenKind.STRING:case TokenKind.BLOCK_STRING:return this.parseStringLiteral();case TokenKind.NAME:switch(this._lexer.advance(),token.value){case"true":return{kind:Kind.BOOLEAN,value:!0,loc:this.loc(token)};case"false":return{kind:Kind.BOOLEAN,value:!1,loc:this.loc(token)};case"null":return{kind:Kind.NULL,loc:this.loc(token)};default:return{kind:Kind.ENUM,value:token.value,loc:this.loc(token)}}case TokenKind.DOLLAR:if(!isConst)return this.parseVariable()}throw this.unexpected()},_proto.parseStringLiteral=function(){var token=this._lexer.token;return this._lexer.advance(),{kind:Kind.STRING,value:token.value,block:token.kind===TokenKind.BLOCK_STRING,loc:this.loc(token)}},_proto.parseList=function(isConst){var _this=this,start=this._lexer.token;return{kind:Kind.LIST,values:this.any(TokenKind.BRACKET_L,function(){return _this.parseValueLiteral(isConst)},TokenKind.BRACKET_R),loc:this.loc(start)}},_proto.parseObject=function(isConst){var _this2=this,start=this._lexer.token;return{kind:Kind.OBJECT,fields:this.any(TokenKind.BRACE_L,function(){return _this2.parseObjectField(isConst)},TokenKind.BRACE_R),loc:this.loc(start)}},_proto.parseObjectField=function(isConst){var start=this._lexer.token,name=this.parseName();return this.expectToken(TokenKind.COLON),{kind:Kind.OBJECT_FIELD,name:name,value:this.parseValueLiteral(isConst),loc:this.loc(start)}},_proto.parseDirectives=function(isConst){for(var directives=[];this.peek(TokenKind.AT);)directives.push(this.parseDirective(isConst));return directives},_proto.parseDirective=function(isConst){var start=this._lexer.token;return this.expectToken(TokenKind.AT),{kind:Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(isConst),loc:this.loc(start)}},_proto.parseTypeReference=function(){var type,start=this._lexer.token;return(this.expectOptionalToken(TokenKind.BRACKET_L)?(type=this.parseTypeReference(),this.expectToken(TokenKind.BRACKET_R),type={kind:Kind.LIST_TYPE,type:type,loc:this.loc(start)}):type=this.parseNamedType(),this.expectOptionalToken(TokenKind.BANG))?{kind:Kind.NON_NULL_TYPE,type:type,loc:this.loc(start)}:type},_proto.parseNamedType=function(){var start=this._lexer.token;return{kind:Kind.NAMED_TYPE,name:this.parseName(),loc:this.loc(start)}},_proto.parseTypeSystemDefinition=function(){var keywordToken=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(keywordToken.kind===TokenKind.NAME)switch(keywordToken.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()}throw this.unexpected(keywordToken)},_proto.peekDescription=function(){return this.peek(TokenKind.STRING)||this.peek(TokenKind.BLOCK_STRING)},_proto.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},_proto.parseSchemaDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("schema");var directives=this.parseDirectives(!0),operationTypes=this.many(TokenKind.BRACE_L,this.parseOperationTypeDefinition,TokenKind.BRACE_R);return{kind:Kind.SCHEMA_DEFINITION,description:description,directives:directives,operationTypes:operationTypes,loc:this.loc(start)}},_proto.parseOperationTypeDefinition=function(){var start=this._lexer.token,operation=this.parseOperationType();this.expectToken(TokenKind.COLON);var type=this.parseNamedType();return{kind:Kind.OPERATION_TYPE_DEFINITION,operation:operation,type:type,loc:this.loc(start)}},_proto.parseScalarTypeDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("scalar");var name=this.parseName(),directives=this.parseDirectives(!0);return{kind:Kind.SCALAR_TYPE_DEFINITION,description:description,name:name,directives:directives,loc:this.loc(start)}},_proto.parseObjectTypeDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("type");var name=this.parseName(),interfaces=this.parseImplementsInterfaces(),directives=this.parseDirectives(!0),fields=this.parseFieldsDefinition();return{kind:Kind.OBJECT_TYPE_DEFINITION,description:description,name:name,interfaces:interfaces,directives:directives,fields:fields,loc:this.loc(start)}},_proto.parseImplementsInterfaces=function(){var _this$_options2;if(!this.expectOptionalKeyword("implements"))return[];if((null==(_this$_options2=this._options)?void 0:_this$_options2.allowLegacySDLImplementsInterfaces)===!0){var types=[];this.expectOptionalToken(TokenKind.AMP);do types.push(this.parseNamedType());while(this.expectOptionalToken(TokenKind.AMP)||this.peek(TokenKind.NAME));return types}return this.delimitedMany(TokenKind.AMP,this.parseNamedType)},_proto.parseFieldsDefinition=function(){var _this$_options3;return(null==(_this$_options3=this._options)?void 0:_this$_options3.allowLegacySDLEmptyFields)===!0&&this.peek(TokenKind.BRACE_L)&&this._lexer.lookahead().kind===TokenKind.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(TokenKind.BRACE_L,this.parseFieldDefinition,TokenKind.BRACE_R)},_proto.parseFieldDefinition=function(){var start=this._lexer.token,description=this.parseDescription(),name=this.parseName(),args=this.parseArgumentDefs();this.expectToken(TokenKind.COLON);var type=this.parseTypeReference(),directives=this.parseDirectives(!0);return{kind:Kind.FIELD_DEFINITION,description:description,name:name,arguments:args,type:type,directives:directives,loc:this.loc(start)}},_proto.parseArgumentDefs=function(){return this.optionalMany(TokenKind.PAREN_L,this.parseInputValueDef,TokenKind.PAREN_R)},_proto.parseInputValueDef=function(){var defaultValue,start=this._lexer.token,description=this.parseDescription(),name=this.parseName();this.expectToken(TokenKind.COLON);var type=this.parseTypeReference();this.expectOptionalToken(TokenKind.EQUALS)&&(defaultValue=this.parseValueLiteral(!0));var directives=this.parseDirectives(!0);return{kind:Kind.INPUT_VALUE_DEFINITION,description:description,name:name,type:type,defaultValue:defaultValue,directives:directives,loc:this.loc(start)}},_proto.parseInterfaceTypeDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("interface");var name=this.parseName(),interfaces=this.parseImplementsInterfaces(),directives=this.parseDirectives(!0),fields=this.parseFieldsDefinition();return{kind:Kind.INTERFACE_TYPE_DEFINITION,description:description,name:name,interfaces:interfaces,directives:directives,fields:fields,loc:this.loc(start)}},_proto.parseUnionTypeDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("union");var name=this.parseName(),directives=this.parseDirectives(!0),types=this.parseUnionMemberTypes();return{kind:Kind.UNION_TYPE_DEFINITION,description:description,name:name,directives:directives,types:types,loc:this.loc(start)}},_proto.parseUnionMemberTypes=function(){return this.expectOptionalToken(TokenKind.EQUALS)?this.delimitedMany(TokenKind.PIPE,this.parseNamedType):[]},_proto.parseEnumTypeDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("enum");var name=this.parseName(),directives=this.parseDirectives(!0),values=this.parseEnumValuesDefinition();return{kind:Kind.ENUM_TYPE_DEFINITION,description:description,name:name,directives:directives,values:values,loc:this.loc(start)}},_proto.parseEnumValuesDefinition=function(){return this.optionalMany(TokenKind.BRACE_L,this.parseEnumValueDefinition,TokenKind.BRACE_R)},_proto.parseEnumValueDefinition=function(){var start=this._lexer.token,description=this.parseDescription(),name=this.parseName(),directives=this.parseDirectives(!0);return{kind:Kind.ENUM_VALUE_DEFINITION,description:description,name:name,directives:directives,loc:this.loc(start)}},_proto.parseInputObjectTypeDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("input");var name=this.parseName(),directives=this.parseDirectives(!0),fields=this.parseInputFieldsDefinition();return{kind:Kind.INPUT_OBJECT_TYPE_DEFINITION,description:description,name:name,directives:directives,fields:fields,loc:this.loc(start)}},_proto.parseInputFieldsDefinition=function(){return this.optionalMany(TokenKind.BRACE_L,this.parseInputValueDef,TokenKind.BRACE_R)},_proto.parseTypeSystemExtension=function(){var keywordToken=this._lexer.lookahead();if(keywordToken.kind===TokenKind.NAME)switch(keywordToken.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(keywordToken)},_proto.parseSchemaExtension=function(){var start=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var directives=this.parseDirectives(!0),operationTypes=this.optionalMany(TokenKind.BRACE_L,this.parseOperationTypeDefinition,TokenKind.BRACE_R);if(0===directives.length&&0===operationTypes.length)throw this.unexpected();return{kind:Kind.SCHEMA_EXTENSION,directives:directives,operationTypes:operationTypes,loc:this.loc(start)}},_proto.parseScalarTypeExtension=function(){var start=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var name=this.parseName(),directives=this.parseDirectives(!0);if(0===directives.length)throw this.unexpected();return{kind:Kind.SCALAR_TYPE_EXTENSION,name:name,directives:directives,loc:this.loc(start)}},_proto.parseObjectTypeExtension=function(){var start=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var name=this.parseName(),interfaces=this.parseImplementsInterfaces(),directives=this.parseDirectives(!0),fields=this.parseFieldsDefinition();if(0===interfaces.length&&0===directives.length&&0===fields.length)throw this.unexpected();return{kind:Kind.OBJECT_TYPE_EXTENSION,name:name,interfaces:interfaces,directives:directives,fields:fields,loc:this.loc(start)}},_proto.parseInterfaceTypeExtension=function(){var start=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var name=this.parseName(),interfaces=this.parseImplementsInterfaces(),directives=this.parseDirectives(!0),fields=this.parseFieldsDefinition();if(0===interfaces.length&&0===directives.length&&0===fields.length)throw this.unexpected();return{kind:Kind.INTERFACE_TYPE_EXTENSION,name:name,interfaces:interfaces,directives:directives,fields:fields,loc:this.loc(start)}},_proto.parseUnionTypeExtension=function(){var start=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var name=this.parseName(),directives=this.parseDirectives(!0),types=this.parseUnionMemberTypes();if(0===directives.length&&0===types.length)throw this.unexpected();return{kind:Kind.UNION_TYPE_EXTENSION,name:name,directives:directives,types:types,loc:this.loc(start)}},_proto.parseEnumTypeExtension=function(){var start=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var name=this.parseName(),directives=this.parseDirectives(!0),values=this.parseEnumValuesDefinition();if(0===directives.length&&0===values.length)throw this.unexpected();return{kind:Kind.ENUM_TYPE_EXTENSION,name:name,directives:directives,values:values,loc:this.loc(start)}},_proto.parseInputObjectTypeExtension=function(){var start=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var name=this.parseName(),directives=this.parseDirectives(!0),fields=this.parseInputFieldsDefinition();if(0===directives.length&&0===fields.length)throw this.unexpected();return{kind:Kind.INPUT_OBJECT_TYPE_EXTENSION,name:name,directives:directives,fields:fields,loc:this.loc(start)}},_proto.parseDirectiveDefinition=function(){var start=this._lexer.token,description=this.parseDescription();this.expectKeyword("directive"),this.expectToken(TokenKind.AT);var name=this.parseName(),args=this.parseArgumentDefs(),repeatable=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var locations=this.parseDirectiveLocations();return{kind:Kind.DIRECTIVE_DEFINITION,description:description,name:name,arguments:args,repeatable:repeatable,locations:locations,loc:this.loc(start)}},_proto.parseDirectiveLocations=function(){return this.delimitedMany(TokenKind.PIPE,this.parseDirectiveLocation)},_proto.parseDirectiveLocation=function(){var start=this._lexer.token,name=this.parseName();if(void 0!==DirectiveLocation[name.value])return name;throw this.unexpected(start)},_proto.loc=function(startToken){var _this$_options4;if((null==(_this$_options4=this._options)?void 0:_this$_options4.noLocation)!==!0)return new ast_Location(startToken,this._lexer.lastToken,this._lexer.source)},_proto.peek=function(kind){return this._lexer.token.kind===kind},_proto.expectToken=function(kind){var token=this._lexer.token;if(token.kind===kind)return this._lexer.advance(),token;throw syntaxError_syntaxError(this._lexer.source,token.start,"Expected ".concat(getTokenKindDesc(kind),", found ").concat(getTokenDesc(token),"."))},_proto.expectOptionalToken=function(kind){var token=this._lexer.token;if(token.kind===kind)return this._lexer.advance(),token},_proto.expectKeyword=function(value1){var token=this._lexer.token;if(token.kind===TokenKind.NAME&&token.value===value1)this._lexer.advance();else throw syntaxError_syntaxError(this._lexer.source,token.start,'Expected "'.concat(value1,'", found ').concat(getTokenDesc(token),"."))},_proto.expectOptionalKeyword=function(value1){var token=this._lexer.token;return token.kind===TokenKind.NAME&&token.value===value1&&(this._lexer.advance(),!0)},_proto.unexpected=function(atToken){var token=null!=atToken?atToken:this._lexer.token;return syntaxError_syntaxError(this._lexer.source,token.start,"Unexpected ".concat(getTokenDesc(token),"."))},_proto.any=function(openKind,parseFn,closeKind){this.expectToken(openKind);for(var nodes=[];!this.expectOptionalToken(closeKind);)nodes.push(parseFn.call(this));return nodes},_proto.optionalMany=function(openKind,parseFn,closeKind){if(this.expectOptionalToken(openKind)){var nodes=[];do nodes.push(parseFn.call(this));while(!this.expectOptionalToken(closeKind));return nodes}return[]},_proto.many=function(openKind,parseFn,closeKind){this.expectToken(openKind);var nodes=[];do nodes.push(parseFn.call(this));while(!this.expectOptionalToken(closeKind));return nodes},_proto.delimitedMany=function(delimiterKind,parseFn){this.expectOptionalToken(delimiterKind);var nodes=[];do nodes.push(parseFn.call(this));while(this.expectOptionalToken(delimiterKind));return nodes},Parser}();function getTokenDesc(token){var value1=token.value;return getTokenKindDesc(token.kind)+(null!=value1?' "'.concat(value1,'"'):"")}function getTokenKindDesc(kind){return isPunctuatorTokenKind(kind)?'"'.concat(kind,'"'):kind}var QueryDocumentKeys={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},BREAK=Object.freeze({});function visit(root,visitor){var visitorKeys=arguments.length>2&&void 0!==arguments[2]?arguments[2]:QueryDocumentKeys,stack=void 0,inArray=Array.isArray(root),keys=[root],index=-1,edits=[],node=void 0,key=void 0,parent1=void 0,path=[],ancestors=[],newRoot=root;do{var _visitorKeys$node$kin,isLeaving=++index===keys.length,isEdited=isLeaving&&0!==edits.length;if(isLeaving){if(key=0===ancestors.length?void 0:path[path.length-1],node=parent1,parent1=ancestors.pop(),isEdited){if(inArray)node=node.slice();else{for(var clone={},_i2=0,_Object$keys2=Object.keys(node);_i2<_Object$keys2.length;_i2++){var k=_Object$keys2[_i2];clone[k]=node[k]}node=clone}for(var editOffset=0,ii=0;ii<edits.length;ii++){var editKey=edits[ii][0],editValue=edits[ii][1];inArray&&(editKey-=editOffset),inArray&&null===editValue?(node.splice(editKey,1),editOffset++):node[editKey]=editValue}}index=stack.index,keys=stack.keys,edits=stack.edits,inArray=stack.inArray,stack=stack.prev}else{if(key=parent1?inArray?index:keys[index]:void 0,null==(node=parent1?parent1[key]:newRoot))continue;parent1&&path.push(key)}var result=void 0;if(!Array.isArray(node)){if(!isNode(node))throw Error("Invalid AST Node: ".concat(inspect(node),"."));var visitFn=getVisitFn(visitor,node.kind,isLeaving);if(visitFn){if((result=visitFn.call(visitor,node,key,parent1,path,ancestors))===BREAK)break;if(!1===result){if(!isLeaving){path.pop();continue}}else if(void 0!==result&&(edits.push([key,result]),!isLeaving))if(isNode(result))node=result;else{path.pop();continue}}}void 0===result&&isEdited&&edits.push([key,node]),isLeaving?path.pop():(stack={inArray:inArray,index:index,keys:keys,edits:edits,prev:stack},keys=(inArray=Array.isArray(node))?node:null!=(_visitorKeys$node$kin=visitorKeys[node.kind])?_visitorKeys$node$kin:[],index=-1,edits=[],parent1&&ancestors.push(parent1),parent1=node)}while(void 0!==stack);return 0!==edits.length&&(newRoot=edits[edits.length-1][1]),newRoot}function visitInParallel(visitors){var skipping=Array(visitors.length);return{enter:function(node){for(var i=0;i<visitors.length;i++)if(null==skipping[i]){var fn=getVisitFn(visitors[i],node.kind,!1);if(fn){var result=fn.apply(visitors[i],arguments);if(!1===result)skipping[i]=node;else if(result===BREAK)skipping[i]=BREAK;else if(void 0!==result)return result}}},leave:function(node){for(var i=0;i<visitors.length;i++)if(null==skipping[i]){var fn=getVisitFn(visitors[i],node.kind,!0);if(fn){var result=fn.apply(visitors[i],arguments);if(result===BREAK)skipping[i]=BREAK;else if(void 0!==result&&!1!==result)return result}}else skipping[i]===node&&(skipping[i]=null)}}}function getVisitFn(visitor,kind,isLeaving){var kindVisitor=visitor[kind];if(kindVisitor){if(!isLeaving&&"function"==typeof kindVisitor)return kindVisitor;var kindSpecificVisitor=isLeaving?kindVisitor.leave:kindVisitor.enter;if("function"==typeof kindSpecificVisitor)return kindSpecificVisitor}else{var specificVisitor=isLeaving?visitor.leave:visitor.enter;if(specificVisitor){if("function"==typeof specificVisitor)return specificVisitor;var specificKindVisitor=specificVisitor[kind];if("function"==typeof specificKindVisitor)return specificKindVisitor}}}var find=Array.prototype.find?function(list,predicate){return Array.prototype.find.call(list,predicate)}:function(list,predicate){for(var _i2=0;_i2<list.length;_i2++){var value1=list[_i2];if(predicate(value1))return value1}},objectValues=Object.values||function(obj){return Object.keys(obj).map(function(key){return obj[key]})};function locatedError(rawOriginalError,nodes,path){var _nodes,originalError=rawOriginalError instanceof Error?rawOriginalError:Error("Unexpected error value: "+inspect(rawOriginalError));return Array.isArray(originalError.path)?originalError:new GraphQLError_GraphQLError(originalError.message,null!=(_nodes=originalError.nodes)?_nodes:nodes,originalError.source,originalError.positions,path,originalError)}var NAME_RX=/^[_a-zA-Z][_a-zA-Z0-9]*$/;function assertValidName(name){var error=isValidNameError(name);if(error)throw error;return name}function isValidNameError(name){return("string"==typeof name||devAssert(0,"Expected name to be a string."),name.length>1&&"_"===name[0]&&"_"===name[1])?new GraphQLError_GraphQLError('Name "'.concat(name,'" must not begin with "__", which is reserved by GraphQL introspection.')):NAME_RX.test(name)?void 0:new GraphQLError_GraphQLError('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'.concat(name,'" does not.'))}var objectEntries=Object.entries||function(obj){return Object.keys(obj).map(function(key){return[key,obj[key]]})};function keyMap(list,keyFn){return list.reduce(function(map,item){return map[keyFn(item)]=item,map},Object.create(null))}function mapValue(map,fn){for(var result=Object.create(null),_i2=0,_objectEntries2=objectEntries(map);_i2<_objectEntries2.length;_i2++){var _ref2=_objectEntries2[_i2],_key=_ref2[0],_value=_ref2[1];result[_key]=fn(_value,_key)}return result}function toObjMap(obj){if(null===Object.getPrototypeOf(obj))return obj;for(var map=Object.create(null),_i2=0,_objectEntries2=objectEntries(obj);_i2<_objectEntries2.length;_i2++){var _ref2=_objectEntries2[_i2],key=_ref2[0],value1=_ref2[1];map[key]=value1}return map}function keyValMap(list,keyFn,valFn){return list.reduce(function(map,item){return map[keyFn(item)]=valFn(item),map},Object.create(null))}function didYouMean(firstArg,secondArg){var _ref="string"==typeof firstArg?[firstArg,secondArg]:[void 0,firstArg],subMessage=_ref[0],suggestionsArg=_ref[1],message=" Did you mean ";subMessage&&(message+=subMessage+" ");var suggestions=suggestionsArg.map(function(x){return'"'.concat(x,'"')});switch(suggestions.length){case 0:return"";case 1:return message+suggestions[0]+"?";case 2:return message+suggestions[0]+" or "+suggestions[1]+"?"}var selected=suggestions.slice(0,5),lastItem=selected.pop();return message+selected.join(", ")+", or "+lastItem+"?"}function identityFunc(x){return x}function naturalCompare(aStr,bStr){for(var aIdx=0,bIdx=0;aIdx<aStr.length&&bIdx<bStr.length;){var aChar=aStr.charCodeAt(aIdx),bChar=bStr.charCodeAt(bIdx);if(isDigit(aChar)&&isDigit(bChar)){var aNum=0;do++aIdx,aNum=10*aNum+aChar-DIGIT_0,aChar=aStr.charCodeAt(aIdx);while(isDigit(aChar)&&aNum>0);var bNum=0;do++bIdx,bNum=10*bNum+bChar-DIGIT_0,bChar=bStr.charCodeAt(bIdx);while(isDigit(bChar)&&bNum>0);if(aNum<bNum)return -1;if(aNum>bNum)return 1}else{if(aChar<bChar)return -1;if(aChar>bChar)return 1;++aIdx,++bIdx}}return aStr.length-bStr.length}var DIGIT_0=48;function isDigit(code){return!isNaN(code)&&DIGIT_0<=code&&code<=57}function suggestionList(input,options){for(var optionsByDistance=Object.create(null),lexicalDistance=new suggestionList_LexicalDistance(input),threshold=Math.floor(.4*input.length)+1,_i2=0;_i2<options.length;_i2++){var option=options[_i2],distance=lexicalDistance.measure(option,threshold);void 0!==distance&&(optionsByDistance[option]=distance)}return Object.keys(optionsByDistance).sort(function(a,b){var distanceDiff=optionsByDistance[a]-optionsByDistance[b];return 0!==distanceDiff?distanceDiff:naturalCompare(a,b)})}var suggestionList_LexicalDistance=function(){function LexicalDistance(input){this._input=input,this._inputLowerCase=input.toLowerCase(),this._inputArray=stringToArray(this._inputLowerCase),this._rows=[Array(input.length+1).fill(0),Array(input.length+1).fill(0),Array(input.length+1).fill(0)]}return LexicalDistance.prototype.measure=function(option,threshold){if(this._input===option)return 0;var optionLowerCase=option.toLowerCase();if(this._inputLowerCase===optionLowerCase)return 1;var a=stringToArray(optionLowerCase),b=this._inputArray;if(a.length<b.length){var tmp=a;a=b,b=tmp}var aLength=a.length,bLength=b.length;if(!(aLength-bLength>threshold)){for(var rows=this._rows,j=0;j<=bLength;j++)rows[0][j]=j;for(var i=1;i<=aLength;i++){for(var upRow=rows[(i-1)%3],currentRow=rows[i%3],smallestCell=currentRow[0]=i,_j=1;_j<=bLength;_j++){var cost=+(a[i-1]!==b[_j-1]),currentCell=Math.min(upRow[_j]+1,currentRow[_j-1]+1,upRow[_j-1]+cost);i>1&&_j>1&&a[i-1]===b[_j-2]&&a[i-2]===b[_j-1]&&(currentCell=Math.min(currentCell,rows[(i-2)%3][_j-2]+1)),currentCell<smallestCell&&(smallestCell=currentCell),currentRow[_j]=currentCell}if(smallestCell>threshold)return}var distance=rows[aLength%3][bLength];return distance<=threshold?distance:void 0}},LexicalDistance}();function stringToArray(str){for(var strLength=str.length,array=Array(strLength),i=0;i<strLength;++i)array[i]=str.charCodeAt(i);return array}function print(ast){return visit(ast,{leave:printDocASTReducer})}var printDocASTReducer={Name:function(node){return node.value},Variable:function(node){return"$"+node.name},Document:function(node){return join(node.definitions,"\n\n")+"\n"},OperationDefinition:function(node){var op=node.operation,name=node.name,varDefs=wrap("(",join(node.variableDefinitions,", "),")"),directives=join(node.directives," "),selectionSet=node.selectionSet;return name||directives||varDefs||"query"!==op?join([op,join([name,varDefs]),directives,selectionSet]," "):selectionSet},VariableDefinition:function(_ref){var variable=_ref.variable,type=_ref.type,defaultValue=_ref.defaultValue,directives=_ref.directives;return variable+": "+type+wrap(" = ",defaultValue)+wrap(" ",join(directives," "))},SelectionSet:function(_ref2){return block(_ref2.selections)},Field:function(_ref3){var alias=_ref3.alias,name=_ref3.name,args=_ref3.arguments,directives=_ref3.directives,selectionSet=_ref3.selectionSet,prefix=wrap("",alias,": ")+name,argsLine=prefix+wrap("(",join(args,", "),")");return argsLine.length>80&&(argsLine=prefix+wrap("(\n",printer_indent(join(args,"\n")),"\n)")),join([argsLine,join(directives," "),selectionSet]," ")},Argument:function(_ref4){return _ref4.name+": "+_ref4.value},FragmentSpread:function(_ref5){return"..."+_ref5.name+wrap(" ",join(_ref5.directives," "))},InlineFragment:function(_ref6){var typeCondition=_ref6.typeCondition,directives=_ref6.directives,selectionSet=_ref6.selectionSet;return join(["...",wrap("on ",typeCondition),join(directives," "),selectionSet]," ")},FragmentDefinition:function(_ref7){var name=_ref7.name,typeCondition=_ref7.typeCondition,variableDefinitions=_ref7.variableDefinitions,directives=_ref7.directives,selectionSet=_ref7.selectionSet;return"fragment ".concat(name).concat(wrap("(",join(variableDefinitions,", "),")")," ")+"on ".concat(typeCondition," ").concat(wrap("",join(directives," ")," "))+selectionSet},IntValue:function(_ref8){return _ref8.value},FloatValue:function(_ref9){return _ref9.value},StringValue:function(_ref10,key){var value1=_ref10.value;return _ref10.block?printBlockString(value1,"description"===key?"":" "):JSON.stringify(value1)},BooleanValue:function(_ref11){return _ref11.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(_ref12){return _ref12.value},ListValue:function(_ref13){return"["+join(_ref13.values,", ")+"]"},ObjectValue:function(_ref14){return"{"+join(_ref14.fields,", ")+"}"},ObjectField:function(_ref15){return _ref15.name+": "+_ref15.value},Directive:function(_ref16){return"@"+_ref16.name+wrap("(",join(_ref16.arguments,", "),")")},NamedType:function(_ref17){return _ref17.name},ListType:function(_ref18){return"["+_ref18.type+"]"},NonNullType:function(_ref19){return _ref19.type+"!"},SchemaDefinition:addDescription(function(_ref20){var directives=_ref20.directives,operationTypes=_ref20.operationTypes;return join(["schema",join(directives," "),block(operationTypes)]," ")}),OperationTypeDefinition:function(_ref21){return _ref21.operation+": "+_ref21.type},ScalarTypeDefinition:addDescription(function(_ref22){return join(["scalar",_ref22.name,join(_ref22.directives," ")]," ")}),ObjectTypeDefinition:addDescription(function(_ref23){var name=_ref23.name,interfaces=_ref23.interfaces,directives=_ref23.directives,fields=_ref23.fields;return join(["type",name,wrap("implements ",join(interfaces," & ")),join(directives," "),block(fields)]," ")}),FieldDefinition:addDescription(function(_ref24){var name=_ref24.name,args=_ref24.arguments,type=_ref24.type,directives=_ref24.directives;return name+(hasMultilineItems(args)?wrap("(\n",printer_indent(join(args,"\n")),"\n)"):wrap("(",join(args,", "),")"))+": "+type+wrap(" ",join(directives," "))}),InputValueDefinition:addDescription(function(_ref25){var name=_ref25.name,type=_ref25.type,defaultValue=_ref25.defaultValue,directives=_ref25.directives;return join([name+": "+type,wrap("= ",defaultValue),join(directives," ")]," ")}),InterfaceTypeDefinition:addDescription(function(_ref26){var name=_ref26.name,interfaces=_ref26.interfaces,directives=_ref26.directives,fields=_ref26.fields;return join(["interface",name,wrap("implements ",join(interfaces," & ")),join(directives," "),block(fields)]," ")}),UnionTypeDefinition:addDescription(function(_ref27){var name=_ref27.name,directives=_ref27.directives,types=_ref27.types;return join(["union",name,join(directives," "),types&&0!==types.length?"= "+join(types," | "):""]," ")}),EnumTypeDefinition:addDescription(function(_ref28){var name=_ref28.name,directives=_ref28.directives,values=_ref28.values;return join(["enum",name,join(directives," "),block(values)]," ")}),EnumValueDefinition:addDescription(function(_ref29){return join([_ref29.name,join(_ref29.directives," ")]," ")}),InputObjectTypeDefinition:addDescription(function(_ref30){var name=_ref30.name,directives=_ref30.directives,fields=_ref30.fields;return join(["input",name,join(directives," "),block(fields)]," ")}),DirectiveDefinition:addDescription(function(_ref31){var name=_ref31.name,args=_ref31.arguments,repeatable=_ref31.repeatable,locations=_ref31.locations;return"directive @"+name+(hasMultilineItems(args)?wrap("(\n",printer_indent(join(args,"\n")),"\n)"):wrap("(",join(args,", "),")"))+(repeatable?" repeatable":"")+" on "+join(locations," | ")}),SchemaExtension:function(_ref32){var directives=_ref32.directives,operationTypes=_ref32.operationTypes;return join(["extend schema",join(directives," "),block(operationTypes)]," ")},ScalarTypeExtension:function(_ref33){return join(["extend scalar",_ref33.name,join(_ref33.directives," ")]," ")},ObjectTypeExtension:function(_ref34){var name=_ref34.name,interfaces=_ref34.interfaces,directives=_ref34.directives,fields=_ref34.fields;return join(["extend type",name,wrap("implements ",join(interfaces," & ")),join(directives," "),block(fields)]," ")},InterfaceTypeExtension:function(_ref35){var name=_ref35.name,interfaces=_ref35.interfaces,directives=_ref35.directives,fields=_ref35.fields;return join(["extend interface",name,wrap("implements ",join(interfaces," & ")),join(directives," "),block(fields)]," ")},UnionTypeExtension:function(_ref36){var name=_ref36.name,directives=_ref36.directives,types=_ref36.types;return join(["extend union",name,join(directives," "),types&&0!==types.length?"= "+join(types," | "):""]," ")},EnumTypeExtension:function(_ref37){var name=_ref37.name,directives=_ref37.directives,values=_ref37.values;return join(["extend enum",name,join(directives," "),block(values)]," ")},InputObjectTypeExtension:function(_ref38){var name=_ref38.name,directives=_ref38.directives,fields=_ref38.fields;return join(["extend input",name,join(directives," "),block(fields)]," ")}};function addDescription(cb){return function(node){return join([node.description,cb(node)],"\n")}}function join(maybeArray){var _maybeArray$filter$jo,separator=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!=(_maybeArray$filter$jo=null==maybeArray?void 0:maybeArray.filter(function(x){return x}).join(separator))?_maybeArray$filter$jo:""}function block(array){return wrap("{\n",printer_indent(join(array,"\n")),"\n}")}function wrap(start,maybeString){var end=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=maybeString&&""!==maybeString?start+maybeString+end:""}function printer_indent(str){return wrap(" ",str.replace(/\n/g,"\n "))}function isMultiline(str){return -1!==str.indexOf("\n")}function hasMultilineItems(maybeArray){return null!=maybeArray&&maybeArray.some(isMultiline)}function valueFromASTUntyped(valueNode,variables){switch(valueNode.kind){case Kind.NULL:return null;case Kind.INT:return parseInt(valueNode.value,10);case Kind.FLOAT:return parseFloat(valueNode.value);case Kind.STRING:case Kind.ENUM:case Kind.BOOLEAN:return valueNode.value;case Kind.LIST:return valueNode.values.map(function(node){return valueFromASTUntyped(node,variables)});case Kind.OBJECT:return keyValMap(valueNode.fields,function(field){return field.name.value},function(field){return valueFromASTUntyped(field.value,variables)});case Kind.VARIABLE:return null==variables?void 0:variables[valueNode.name.value]}invariant(0,"Unexpected value node: "+inspect(valueNode))}function definition_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function definition_createClass(Constructor,protoProps,staticProps){return protoProps&&definition_defineProperties(Constructor.prototype,protoProps),staticProps&&definition_defineProperties(Constructor,staticProps),Constructor}function isType(type){return isScalarType(type)||isObjectType(type)||isInterfaceType(type)||isUnionType(type)||isEnumType(type)||isInputObjectType(type)||isListType(type)||isNonNullType(type)}function assertType(type){if(!isType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL type."));return type}function isScalarType(type){return jsutils_instanceOf(type,definition_GraphQLScalarType)}function assertScalarType(type){if(!isScalarType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL Scalar type."));return type}function isObjectType(type){return jsutils_instanceOf(type,definition_GraphQLObjectType)}function assertObjectType(type){if(!isObjectType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL Object type."));return type}function isInterfaceType(type){return jsutils_instanceOf(type,definition_GraphQLInterfaceType)}function assertInterfaceType(type){if(!isInterfaceType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL Interface type."));return type}function isUnionType(type){return jsutils_instanceOf(type,definition_GraphQLUnionType)}function assertUnionType(type){if(!isUnionType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL Union type."));return type}function isEnumType(type){return jsutils_instanceOf(type,definition_GraphQLEnumType)}function assertEnumType(type){if(!isEnumType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL Enum type."));return type}function isInputObjectType(type){return jsutils_instanceOf(type,definition_GraphQLInputObjectType)}function assertInputObjectType(type){if(!isInputObjectType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL Input Object type."));return type}function isListType(type){return jsutils_instanceOf(type,GraphQLList)}function assertListType(type){if(!isListType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL List type."));return type}function isNonNullType(type){return jsutils_instanceOf(type,GraphQLNonNull)}function assertNonNullType(type){if(!isNonNullType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL Non-Null type."));return type}function isInputType(type){return isScalarType(type)||isEnumType(type)||isInputObjectType(type)||isWrappingType(type)&&isInputType(type.ofType)}function assertInputType(type){if(!isInputType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL input type."));return type}function isOutputType(type){return isScalarType(type)||isObjectType(type)||isInterfaceType(type)||isUnionType(type)||isEnumType(type)||isWrappingType(type)&&isOutputType(type.ofType)}function assertOutputType(type){if(!isOutputType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL output type."));return type}function isLeafType(type){return isScalarType(type)||isEnumType(type)}function assertLeafType(type){if(!isLeafType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL leaf type."));return type}function isCompositeType(type){return isObjectType(type)||isInterfaceType(type)||isUnionType(type)}function assertCompositeType(type){if(!isCompositeType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL composite type."));return type}function isAbstractType(type){return isInterfaceType(type)||isUnionType(type)}function assertAbstractType(type){if(!isAbstractType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL abstract type."));return type}function GraphQLList(ofType){if(!(this instanceof GraphQLList))return new GraphQLList(ofType);this.ofType=assertType(ofType)}function GraphQLNonNull(ofType){if(!(this instanceof GraphQLNonNull))return new GraphQLNonNull(ofType);this.ofType=assertNullableType(ofType)}function isWrappingType(type){return isListType(type)||isNonNullType(type)}function assertWrappingType(type){if(!isWrappingType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL wrapping type."));return type}function isNullableType(type){return isType(type)&&!isNonNullType(type)}function assertNullableType(type){if(!isNullableType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL nullable type."));return type}function getNullableType(type){if(type)return isNonNullType(type)?type.ofType:type}function isNamedType(type){return isScalarType(type)||isObjectType(type)||isInterfaceType(type)||isUnionType(type)||isEnumType(type)||isInputObjectType(type)}function assertNamedType(type){if(!isNamedType(type))throw Error("Expected ".concat(inspect(type)," to be a GraphQL named type."));return type}function definition_getNamedType(type){if(type){for(var unwrappedType=type;isWrappingType(unwrappedType);)unwrappedType=unwrappedType.ofType;return unwrappedType}}function resolveThunk(thunk){return"function"==typeof thunk?thunk():thunk}function undefineIfEmpty(arr){return arr&&arr.length>0?arr:void 0}GraphQLList.prototype.toString=function(){return"["+String(this.ofType)+"]"},GraphQLList.prototype.toJSON=function(){return this.toString()},Object.defineProperty(GraphQLList.prototype,SYMBOL_TO_STRING_TAG,{get:function(){return"GraphQLList"}}),defineInspect(GraphQLList),GraphQLNonNull.prototype.toString=function(){return String(this.ofType)+"!"},GraphQLNonNull.prototype.toJSON=function(){return this.toString()},Object.defineProperty(GraphQLNonNull.prototype,SYMBOL_TO_STRING_TAG,{get:function(){return"GraphQLNonNull"}}),defineInspect(GraphQLNonNull);var definition_GraphQLScalarType=function(){function GraphQLScalarType(config){var _config$parseValue,_config$serialize,_config$parseLiteral,parseValue=null!=(_config$parseValue=config.parseValue)?_config$parseValue:identityFunc;this.name=config.name,this.description=config.description,this.specifiedByUrl=config.specifiedByUrl,this.serialize=null!=(_config$serialize=config.serialize)?_config$serialize:identityFunc,this.parseValue=parseValue,this.parseLiteral=null!=(_config$parseLiteral=config.parseLiteral)?_config$parseLiteral:function(node,variables){return parseValue(valueFromASTUntyped(node,variables))},this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,this.extensionASTNodes=undefineIfEmpty(config.extensionASTNodes),"string"==typeof config.name||devAssert(0,"Must provide name."),null==config.specifiedByUrl||"string"==typeof config.specifiedByUrl||devAssert(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(inspect(config.specifiedByUrl),".")),null==config.serialize||"function"==typeof config.serialize||devAssert(0,"".concat(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.')),config.parseLiteral&&("function"==typeof config.parseValue&&"function"==typeof config.parseLiteral||devAssert(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var _proto=GraphQLScalarType.prototype;return _proto.toConfig=function(){var _this$extensionASTNod;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:null!=(_this$extensionASTNod=this.extensionASTNodes)?_this$extensionASTNod:[]}},_proto.toString=function(){return this.name},_proto.toJSON=function(){return this.toString()},definition_createClass(GraphQLScalarType,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLScalarType"}}]),GraphQLScalarType}();defineInspect(definition_GraphQLScalarType);var definition_GraphQLObjectType=function(){function GraphQLObjectType(config){this.name=config.name,this.description=config.description,this.isTypeOf=config.isTypeOf,this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,this.extensionASTNodes=undefineIfEmpty(config.extensionASTNodes),this._fields=defineFieldMap.bind(void 0,config),this._interfaces=defineInterfaces.bind(void 0,config),"string"==typeof config.name||devAssert(0,"Must provide name."),null==config.isTypeOf||"function"==typeof config.isTypeOf||devAssert(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(inspect(config.isTypeOf),"."))}var _proto2=GraphQLObjectType.prototype;return _proto2.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},_proto2.getInterfaces=function(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},_proto2.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:fieldsToFieldsConfig(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},_proto2.toString=function(){return this.name},_proto2.toJSON=function(){return this.toString()},definition_createClass(GraphQLObjectType,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLObjectType"}}]),GraphQLObjectType}();function defineInterfaces(config){var _resolveThunk,interfaces=null!=(_resolveThunk=resolveThunk(config.interfaces))?_resolveThunk:[];return Array.isArray(interfaces)||devAssert(0,"".concat(config.name," interfaces must be an Array or a function which returns an Array.")),interfaces}function defineFieldMap(config){var fieldMap=resolveThunk(config.fields);return isPlainObj(fieldMap)||devAssert(0,"".concat(config.name," fields must be an object with field names as keys or a function which returns such an object.")),mapValue(fieldMap,function(fieldConfig,fieldName){isPlainObj(fieldConfig)||devAssert(0,"".concat(config.name,".").concat(fieldName," field config must be an object.")),"isDeprecated"in fieldConfig&&devAssert(0,"".concat(config.name,".").concat(fieldName,' should provide "deprecationReason" instead of "isDeprecated".')),null==fieldConfig.resolve||"function"==typeof fieldConfig.resolve||devAssert(0,"".concat(config.name,".").concat(fieldName," field resolver must be a function if ")+"provided, but got: ".concat(inspect(fieldConfig.resolve),"."));var _fieldConfig$args,argsConfig=null!=(_fieldConfig$args=fieldConfig.args)?_fieldConfig$args:{};isPlainObj(argsConfig)||devAssert(0,"".concat(config.name,".").concat(fieldName," args must be an object with argument names as keys."));var args=objectEntries(argsConfig).map(function(_ref){var argName=_ref[0],argConfig=_ref[1];return{name:argName,description:argConfig.description,type:argConfig.type,defaultValue:argConfig.defaultValue,deprecationReason:argConfig.deprecationReason,extensions:argConfig.extensions&&toObjMap(argConfig.extensions),astNode:argConfig.astNode}});return{name:fieldName,description:fieldConfig.description,type:fieldConfig.type,args:args,resolve:fieldConfig.resolve,subscribe:fieldConfig.subscribe,isDeprecated:null!=fieldConfig.deprecationReason,deprecationReason:fieldConfig.deprecationReason,extensions:fieldConfig.extensions&&toObjMap(fieldConfig.extensions),astNode:fieldConfig.astNode}})}function isPlainObj(obj){return isObjectLike(obj)&&!Array.isArray(obj)}function fieldsToFieldsConfig(fields){return mapValue(fields,function(field){return{description:field.description,type:field.type,args:argsToArgsConfig(field.args),resolve:field.resolve,subscribe:field.subscribe,deprecationReason:field.deprecationReason,extensions:field.extensions,astNode:field.astNode}})}function argsToArgsConfig(args){return keyValMap(args,function(arg){return arg.name},function(arg){return{description:arg.description,type:arg.type,defaultValue:arg.defaultValue,deprecationReason:arg.deprecationReason,extensions:arg.extensions,astNode:arg.astNode}})}function isRequiredArgument(arg){return isNonNullType(arg.type)&&void 0===arg.defaultValue}defineInspect(definition_GraphQLObjectType);var definition_GraphQLInterfaceType=function(){function GraphQLInterfaceType(config){this.name=config.name,this.description=config.description,this.resolveType=config.resolveType,this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,this.extensionASTNodes=undefineIfEmpty(config.extensionASTNodes),this._fields=defineFieldMap.bind(void 0,config),this._interfaces=defineInterfaces.bind(void 0,config),"string"==typeof config.name||devAssert(0,"Must provide name."),null==config.resolveType||"function"==typeof config.resolveType||devAssert(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(inspect(config.resolveType),"."))}var _proto3=GraphQLInterfaceType.prototype;return _proto3.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},_proto3.getInterfaces=function(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},_proto3.toConfig=function(){var _this$extensionASTNod2;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:fieldsToFieldsConfig(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!=(_this$extensionASTNod2=this.extensionASTNodes)?_this$extensionASTNod2:[]}},_proto3.toString=function(){return this.name},_proto3.toJSON=function(){return this.toString()},definition_createClass(GraphQLInterfaceType,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLInterfaceType"}}]),GraphQLInterfaceType}();defineInspect(definition_GraphQLInterfaceType);var definition_GraphQLUnionType=function(){function GraphQLUnionType(config){this.name=config.name,this.description=config.description,this.resolveType=config.resolveType,this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,this.extensionASTNodes=undefineIfEmpty(config.extensionASTNodes),this._types=defineTypes.bind(void 0,config),"string"==typeof config.name||devAssert(0,"Must provide name."),null==config.resolveType||"function"==typeof config.resolveType||devAssert(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(inspect(config.resolveType),"."))}var _proto4=GraphQLUnionType.prototype;return _proto4.getTypes=function(){return"function"==typeof this._types&&(this._types=this._types()),this._types},_proto4.toConfig=function(){var _this$extensionASTNod3;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!=(_this$extensionASTNod3=this.extensionASTNodes)?_this$extensionASTNod3:[]}},_proto4.toString=function(){return this.name},_proto4.toJSON=function(){return this.toString()},definition_createClass(GraphQLUnionType,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLUnionType"}}]),GraphQLUnionType}();function defineTypes(config){var types=resolveThunk(config.types);return Array.isArray(types)||devAssert(0,"Must provide Array of types or a function which returns such an array for Union ".concat(config.name,".")),types}defineInspect(definition_GraphQLUnionType);var definition_GraphQLEnumType=function(){function GraphQLEnumType(config){var typeName,valueMap;this.name=config.name,this.description=config.description,this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,this.extensionASTNodes=undefineIfEmpty(config.extensionASTNodes),this._values=(typeName=this.name,isPlainObj(valueMap=config.values)||devAssert(0,"".concat(typeName," values must be an object with value names as keys.")),objectEntries(valueMap).map(function(_ref2){var valueName=_ref2[0],valueConfig=_ref2[1];return isPlainObj(valueConfig)||devAssert(0,"".concat(typeName,".").concat(valueName,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(inspect(valueConfig),".")),"isDeprecated"in valueConfig&&devAssert(0,"".concat(typeName,".").concat(valueName,' should provide "deprecationReason" instead of "isDeprecated".')),{name:valueName,description:valueConfig.description,value:void 0!==valueConfig.value?valueConfig.value:valueName,isDeprecated:null!=valueConfig.deprecationReason,deprecationReason:valueConfig.deprecationReason,extensions:valueConfig.extensions&&toObjMap(valueConfig.extensions),astNode:valueConfig.astNode}})),this._valueLookup=new Map(this._values.map(function(enumValue){return[enumValue.value,enumValue]})),this._nameLookup=keyMap(this._values,function(value1){return value1.name}),"string"==typeof config.name||devAssert(0,"Must provide name.")}var _proto5=GraphQLEnumType.prototype;return _proto5.getValues=function(){return this._values},_proto5.getValue=function(name){return this._nameLookup[name]},_proto5.serialize=function(outputValue){var enumValue=this._valueLookup.get(outputValue);if(void 0===enumValue)throw new GraphQLError_GraphQLError('Enum "'.concat(this.name,'" cannot represent value: ').concat(inspect(outputValue)));return enumValue.name},_proto5.parseValue=function(inputValue){if("string"!=typeof inputValue){var valueStr=inspect(inputValue);throw new GraphQLError_GraphQLError('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(valueStr,".")+didYouMeanEnumValue(this,valueStr))}var enumValue=this.getValue(inputValue);if(null==enumValue)throw new GraphQLError_GraphQLError('Value "'.concat(inputValue,'" does not exist in "').concat(this.name,'" enum.')+didYouMeanEnumValue(this,inputValue));return enumValue.value},_proto5.parseLiteral=function(valueNode,_variables){if(valueNode.kind!==Kind.ENUM){var valueStr=print(valueNode);throw new GraphQLError_GraphQLError('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(valueStr,".")+didYouMeanEnumValue(this,valueStr),valueNode)}var enumValue=this.getValue(valueNode.value);if(null==enumValue){var _valueStr=print(valueNode);throw new GraphQLError_GraphQLError('Value "'.concat(_valueStr,'" does not exist in "').concat(this.name,'" enum.')+didYouMeanEnumValue(this,_valueStr),valueNode)}return enumValue.value},_proto5.toConfig=function(){var _this$extensionASTNod4,values=keyValMap(this.getValues(),function(value1){return value1.name},function(value1){return{description:value1.description,value:value1.value,deprecationReason:value1.deprecationReason,extensions:value1.extensions,astNode:value1.astNode}});return{name:this.name,description:this.description,values:values,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!=(_this$extensionASTNod4=this.extensionASTNodes)?_this$extensionASTNod4:[]}},_proto5.toString=function(){return this.name},_proto5.toJSON=function(){return this.toString()},definition_createClass(GraphQLEnumType,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLEnumType"}}]),GraphQLEnumType}();function didYouMeanEnumValue(enumType,unknownValueStr){return didYouMean("the enum value",suggestionList(unknownValueStr,enumType.getValues().map(function(value1){return value1.name})))}defineInspect(definition_GraphQLEnumType);var definition_GraphQLInputObjectType=function(){function GraphQLInputObjectType(config){this.name=config.name,this.description=config.description,this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,this.extensionASTNodes=undefineIfEmpty(config.extensionASTNodes),this._fields=defineInputFieldMap.bind(void 0,config),"string"==typeof config.name||devAssert(0,"Must provide name.")}var _proto6=GraphQLInputObjectType.prototype;return _proto6.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},_proto6.toConfig=function(){var _this$extensionASTNod5,fields=mapValue(this.getFields(),function(field){return{description:field.description,type:field.type,defaultValue:field.defaultValue,deprecationReason:field.deprecationReason,extensions:field.extensions,astNode:field.astNode}});return{name:this.name,description:this.description,fields:fields,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!=(_this$extensionASTNod5=this.extensionASTNodes)?_this$extensionASTNod5:[]}},_proto6.toString=function(){return this.name},_proto6.toJSON=function(){return this.toString()},definition_createClass(GraphQLInputObjectType,[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLInputObjectType"}}]),GraphQLInputObjectType}();function defineInputFieldMap(config){var fieldMap=resolveThunk(config.fields);return isPlainObj(fieldMap)||devAssert(0,"".concat(config.name," fields must be an object with field names as keys or a function which returns such an object.")),mapValue(fieldMap,function(fieldConfig,fieldName){return"resolve"in fieldConfig&&devAssert(0,"".concat(config.name,".").concat(fieldName," field has a resolve property, but Input Types cannot define resolvers.")),{name:fieldName,description:fieldConfig.description,type:fieldConfig.type,defaultValue:fieldConfig.defaultValue,deprecationReason:fieldConfig.deprecationReason,extensions:fieldConfig.extensions&&toObjMap(fieldConfig.extensions),astNode:fieldConfig.astNode}})}function isRequiredInputField(field){return isNonNullType(field.type)&&void 0===field.defaultValue}function isEqualType(typeA,typeB){return typeA===typeB||!!(isNonNullType(typeA)&&isNonNullType(typeB)||isListType(typeA)&&isListType(typeB))&&isEqualType(typeA.ofType,typeB.ofType)}function isTypeSubTypeOf(schema,maybeSubType,superType){return maybeSubType===superType||(isNonNullType(superType)?!!isNonNullType(maybeSubType)&&isTypeSubTypeOf(schema,maybeSubType.ofType,superType.ofType):isNonNullType(maybeSubType)?isTypeSubTypeOf(schema,maybeSubType.ofType,superType):isListType(superType)?!!isListType(maybeSubType)&&isTypeSubTypeOf(schema,maybeSubType.ofType,superType.ofType):!isListType(maybeSubType)&&isAbstractType(superType)&&(isInterfaceType(maybeSubType)||isObjectType(maybeSubType))&&schema.isSubType(superType,maybeSubType))}function doTypesOverlap(schema,typeA,typeB){return typeA===typeB||(isAbstractType(typeA)?isAbstractType(typeB)?schema.getPossibleTypes(typeA).some(function(type){return schema.isSubType(typeB,type)}):schema.isSubType(typeA,typeB):!!isAbstractType(typeB)&&schema.isSubType(typeB,typeA))}defineInspect(definition_GraphQLInputObjectType);var arrayFrom=Array.from||function(obj,mapFn,thisArg){if(null==obj)throw TypeError("Array.from requires an array-like object - not null or undefined");var iteratorMethod=obj[SYMBOL_ITERATOR];if("function"==typeof iteratorMethod){for(var step,iterator=iteratorMethod.call(obj),result=[],i=0;!(step=iterator.next()).done;++i)if(result.push(mapFn.call(thisArg,step.value,i)),i>9999999)throw TypeError("Near-infinite iteration.");return result}var length=obj.length;if("number"==typeof length&&length>=0&&length%1===0){for(var _result=[],_i=0;_i<length;++_i)Object.prototype.hasOwnProperty.call(obj,_i)&&_result.push(mapFn.call(thisArg,obj[_i],_i));return _result}return[]},isFinitePolyfill=Number.isFinite||function(value1){return"number"==typeof value1&&isFinite(value1)};function safeArrayFrom_typeof(obj){return(safeArrayFrom_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function safeArrayFrom(collection){var mapFn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(item){return item};if(null==collection||"object"!==safeArrayFrom_typeof(collection))return null;if(Array.isArray(collection))return collection.map(mapFn);var iteratorMethod=collection[SYMBOL_ITERATOR];if("function"==typeof iteratorMethod){for(var step,iterator=iteratorMethod.call(collection),result=[],i=0;!(step=iterator.next()).done;++i)result.push(mapFn(step.value,i));return result}var length=collection.length;if("number"==typeof length&&length>=0&&length%1===0){for(var _result=[],_i=0;_i<length;++_i){if(!Object.prototype.hasOwnProperty.call(collection,_i))return null;_result.push(mapFn(collection[String(_i)],_i))}return _result}return null}var isInteger=Number.isInteger||function(value1){return"number"==typeof value1&&isFinite(value1)&&Math.floor(value1)===value1},GraphQLInt=new definition_GraphQLScalarType({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize:function(outputValue){var coercedValue=serializeObject(outputValue);if("boolean"==typeof coercedValue)return+!!coercedValue;var num=coercedValue;if("string"==typeof coercedValue&&""!==coercedValue&&(num=Number(coercedValue)),!isInteger(num))throw new GraphQLError_GraphQLError("Int cannot represent non-integer value: ".concat(inspect(coercedValue)));if(num>0x7fffffff||num<-0x80000000)throw new GraphQLError_GraphQLError("Int cannot represent non 32-bit signed integer value: "+inspect(coercedValue));return num},parseValue:function(inputValue){if(!isInteger(inputValue))throw new GraphQLError_GraphQLError("Int cannot represent non-integer value: ".concat(inspect(inputValue)));if(inputValue>0x7fffffff||inputValue<-0x80000000)throw new GraphQLError_GraphQLError("Int cannot represent non 32-bit signed integer value: ".concat(inputValue));return inputValue},parseLiteral:function(valueNode){if(valueNode.kind!==Kind.INT)throw new GraphQLError_GraphQLError("Int cannot represent non-integer value: ".concat(print(valueNode)),valueNode);var num=parseInt(valueNode.value,10);if(num>0x7fffffff||num<-0x80000000)throw new GraphQLError_GraphQLError("Int cannot represent non 32-bit signed integer value: ".concat(valueNode.value),valueNode);return num}}),GraphQLFloat=new definition_GraphQLScalarType({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:function(outputValue){var coercedValue=serializeObject(outputValue);if("boolean"==typeof coercedValue)return+!!coercedValue;var num=coercedValue;if("string"==typeof coercedValue&&""!==coercedValue&&(num=Number(coercedValue)),!isFinitePolyfill(num))throw new GraphQLError_GraphQLError("Float cannot represent non numeric value: ".concat(inspect(coercedValue)));return num},parseValue:function(inputValue){if(!isFinitePolyfill(inputValue))throw new GraphQLError_GraphQLError("Float cannot represent non numeric value: ".concat(inspect(inputValue)));return inputValue},parseLiteral:function(valueNode){if(valueNode.kind!==Kind.FLOAT&&valueNode.kind!==Kind.INT)throw new GraphQLError_GraphQLError("Float cannot represent non numeric value: ".concat(print(valueNode)),valueNode);return parseFloat(valueNode.value)}});function serializeObject(outputValue){if(isObjectLike(outputValue)){if("function"==typeof outputValue.valueOf){var valueOfResult=outputValue.valueOf();if(!isObjectLike(valueOfResult))return valueOfResult}if("function"==typeof outputValue.toJSON)return outputValue.toJSON()}return outputValue}var GraphQLString=new definition_GraphQLScalarType({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:function(outputValue){var coercedValue=serializeObject(outputValue);if("string"==typeof coercedValue)return coercedValue;if("boolean"==typeof coercedValue)return coercedValue?"true":"false";if(isFinitePolyfill(coercedValue))return coercedValue.toString();throw new GraphQLError_GraphQLError("String cannot represent value: ".concat(inspect(outputValue)))},parseValue:function(inputValue){if("string"!=typeof inputValue)throw new GraphQLError_GraphQLError("String cannot represent a non string value: ".concat(inspect(inputValue)));return inputValue},parseLiteral:function(valueNode){if(valueNode.kind!==Kind.STRING)throw new GraphQLError_GraphQLError("String cannot represent a non string value: ".concat(print(valueNode)),valueNode);return valueNode.value}}),GraphQLBoolean=new definition_GraphQLScalarType({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:function(outputValue){var coercedValue=serializeObject(outputValue);if("boolean"==typeof coercedValue)return coercedValue;if(isFinitePolyfill(coercedValue))return 0!==coercedValue;throw new GraphQLError_GraphQLError("Boolean cannot represent a non boolean value: ".concat(inspect(coercedValue)))},parseValue:function(inputValue){if("boolean"!=typeof inputValue)throw new GraphQLError_GraphQLError("Boolean cannot represent a non boolean value: ".concat(inspect(inputValue)));return inputValue},parseLiteral:function(valueNode){if(valueNode.kind!==Kind.BOOLEAN)throw new GraphQLError_GraphQLError("Boolean cannot represent a non boolean value: ".concat(print(valueNode)),valueNode);return valueNode.value}}),GraphQLID=new definition_GraphQLScalarType({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:function(outputValue){var coercedValue=serializeObject(outputValue);if("string"==typeof coercedValue)return coercedValue;if(isInteger(coercedValue))return String(coercedValue);throw new GraphQLError_GraphQLError("ID cannot represent value: ".concat(inspect(outputValue)))},parseValue:function(inputValue){if("string"==typeof inputValue)return inputValue;if(isInteger(inputValue))return inputValue.toString();throw new GraphQLError_GraphQLError("ID cannot represent value: ".concat(inspect(inputValue)))},parseLiteral:function(valueNode){if(valueNode.kind!==Kind.STRING&&valueNode.kind!==Kind.INT)throw new GraphQLError_GraphQLError("ID cannot represent a non-string and non-integer value: "+print(valueNode),valueNode);return valueNode.value}}),specifiedScalarTypes=Object.freeze([GraphQLString,GraphQLInt,GraphQLFloat,GraphQLBoolean,GraphQLID]);function isSpecifiedScalarType(type){return specifiedScalarTypes.some(function(_ref){var name=_ref.name;return type.name===name})}function astFromValue(value1,type){if(isNonNullType(type)){var astValue=astFromValue(value1,type.ofType);return(null==astValue?void 0:astValue.kind)===Kind.NULL?null:astValue}if(null===value1)return{kind:Kind.NULL};if(void 0===value1)return null;if(isListType(type)){var itemType=type.ofType,items=safeArrayFrom(value1);if(null!=items){for(var valuesNodes=[],_i2=0;_i2<items.length;_i2++){var itemNode=astFromValue(items[_i2],itemType);null!=itemNode&&valuesNodes.push(itemNode)}return{kind:Kind.LIST,values:valuesNodes}}return astFromValue(value1,itemType)}if(isInputObjectType(type)){if(!isObjectLike(value1))return null;for(var fieldNodes=[],_i4=0,_objectValues2=objectValues(type.getFields());_i4<_objectValues2.length;_i4++){var field=_objectValues2[_i4],fieldValue=astFromValue(value1[field.name],field.type);fieldValue&&fieldNodes.push({kind:Kind.OBJECT_FIELD,name:{kind:Kind.NAME,value:field.name},value:fieldValue})}return{kind:Kind.OBJECT,fields:fieldNodes}}if(isLeafType(type)){var serialized=type.serialize(value1);if(null==serialized)return null;if("boolean"==typeof serialized)return{kind:Kind.BOOLEAN,value:serialized};if("number"==typeof serialized&&isFinitePolyfill(serialized)){var stringNum=String(serialized);return integerStringRegExp.test(stringNum)?{kind:Kind.INT,value:stringNum}:{kind:Kind.FLOAT,value:stringNum}}if("string"==typeof serialized)return isEnumType(type)?{kind:Kind.ENUM,value:serialized}:type===GraphQLID&&integerStringRegExp.test(serialized)?{kind:Kind.INT,value:serialized}:{kind:Kind.STRING,value:serialized};throw TypeError("Cannot convert value to AST: ".concat(inspect(serialized),"."))}invariant(0,"Unexpected input type: "+inspect(type))}var integerStringRegExp=/^-?(?:0|[1-9][0-9]*)$/,__Schema=new definition_GraphQLObjectType({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{description:{type:GraphQLString,resolve:function(schema){return schema.description}},types:{description:"A list of all types supported by this server.",type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Type))),resolve:function(schema){return objectValues(schema.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new GraphQLNonNull(__Type),resolve:function(schema){return schema.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:__Type,resolve:function(schema){return schema.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:__Type,resolve:function(schema){return schema.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Directive))),resolve:function(schema){return schema.getDirectives()}}}}}),__Directive=new definition_GraphQLObjectType({name:"__Directive",description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:function(){return{name:{type:new GraphQLNonNull(GraphQLString),resolve:function(directive){return directive.name}},description:{type:GraphQLString,resolve:function(directive){return directive.description}},isRepeatable:{type:new GraphQLNonNull(GraphQLBoolean),resolve:function(directive){return directive.isRepeatable}},locations:{type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__DirectiveLocation))),resolve:function(directive){return directive.locations}},args:{type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__InputValue))),args:{includeDeprecated:{type:GraphQLBoolean,defaultValue:!1}},resolve:function(field,_ref){return _ref.includeDeprecated?field.args:field.args.filter(function(arg){return null==arg.deprecationReason})}}}}}),__DirectiveLocation=new definition_GraphQLEnumType({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),__Type=new definition_GraphQLObjectType({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:new GraphQLNonNull(__TypeKind),resolve:function(type){return isScalarType(type)?TypeKind.SCALAR:isObjectType(type)?TypeKind.OBJECT:isInterfaceType(type)?TypeKind.INTERFACE:isUnionType(type)?TypeKind.UNION:isEnumType(type)?TypeKind.ENUM:isInputObjectType(type)?TypeKind.INPUT_OBJECT:isListType(type)?TypeKind.LIST:isNonNullType(type)?TypeKind.NON_NULL:void invariant(0,'Unexpected type: "'.concat(inspect(type),'".'))}},name:{type:GraphQLString,resolve:function(type){return void 0!==type.name?type.name:void 0}},description:{type:GraphQLString,resolve:function(type){return void 0!==type.description?type.description:void 0}},specifiedByUrl:{type:GraphQLString,resolve:function(obj){return void 0!==obj.specifiedByUrl?obj.specifiedByUrl:void 0}},fields:{type:new GraphQLList(new GraphQLNonNull(__Field)),args:{includeDeprecated:{type:GraphQLBoolean,defaultValue:!1}},resolve:function(type,_ref2){var includeDeprecated=_ref2.includeDeprecated;if(isObjectType(type)||isInterfaceType(type)){var fields=objectValues(type.getFields());return includeDeprecated?fields:fields.filter(function(field){return null==field.deprecationReason})}}},interfaces:{type:new GraphQLList(new GraphQLNonNull(__Type)),resolve:function(type){if(isObjectType(type)||isInterfaceType(type))return type.getInterfaces()}},possibleTypes:{type:new GraphQLList(new GraphQLNonNull(__Type)),resolve:function(type,_args,_context,_ref3){var schema=_ref3.schema;if(isAbstractType(type))return schema.getPossibleTypes(type)}},enumValues:{type:new GraphQLList(new GraphQLNonNull(__EnumValue)),args:{includeDeprecated:{type:GraphQLBoolean,defaultValue:!1}},resolve:function(type,_ref4){var includeDeprecated=_ref4.includeDeprecated;if(isEnumType(type)){var values=type.getValues();return includeDeprecated?values:values.filter(function(field){return null==field.deprecationReason})}}},inputFields:{type:new GraphQLList(new GraphQLNonNull(__InputValue)),args:{includeDeprecated:{type:GraphQLBoolean,defaultValue:!1}},resolve:function(type,_ref5){var includeDeprecated=_ref5.includeDeprecated;if(isInputObjectType(type)){var values=objectValues(type.getFields());return includeDeprecated?values:values.filter(function(field){return null==field.deprecationReason})}}},ofType:{type:__Type,resolve:function(type){return void 0!==type.ofType?type.ofType:void 0}}}}}),__Field=new definition_GraphQLObjectType({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:new GraphQLNonNull(GraphQLString),resolve:function(field){return field.name}},description:{type:GraphQLString,resolve:function(field){return field.description}},args:{type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__InputValue))),args:{includeDeprecated:{type:GraphQLBoolean,defaultValue:!1}},resolve:function(field,_ref6){return _ref6.includeDeprecated?field.args:field.args.filter(function(arg){return null==arg.deprecationReason})}},type:{type:new GraphQLNonNull(__Type),resolve:function(field){return field.type}},isDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),resolve:function(field){return null!=field.deprecationReason}},deprecationReason:{type:GraphQLString,resolve:function(field){return field.deprecationReason}}}}}),__InputValue=new definition_GraphQLObjectType({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:new GraphQLNonNull(GraphQLString),resolve:function(inputValue){return inputValue.name}},description:{type:GraphQLString,resolve:function(inputValue){return inputValue.description}},type:{type:new GraphQLNonNull(__Type),resolve:function(inputValue){return inputValue.type}},defaultValue:{type:GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(inputValue){var type=inputValue.type,valueAST=astFromValue(inputValue.defaultValue,type);return valueAST?print(valueAST):null}},isDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),resolve:function(field){return null!=field.deprecationReason}},deprecationReason:{type:GraphQLString,resolve:function(obj){return obj.deprecationReason}}}}}),__EnumValue=new definition_GraphQLObjectType({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:function(){return{name:{type:new GraphQLNonNull(GraphQLString),resolve:function(enumValue){return enumValue.name}},description:{type:GraphQLString,resolve:function(enumValue){return enumValue.description}},isDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),resolve:function(enumValue){return null!=enumValue.deprecationReason}},deprecationReason:{type:GraphQLString,resolve:function(enumValue){return enumValue.deprecationReason}}}}}),TypeKind=Object.freeze({SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"}),__TypeKind=new definition_GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:TypeKind.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:TypeKind.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:TypeKind.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:TypeKind.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:TypeKind.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:TypeKind.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:TypeKind.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:TypeKind.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),SchemaMetaFieldDef={name:"__schema",type:new GraphQLNonNull(__Schema),description:"Access the current type schema of this server.",args:[],resolve:function(_source,_args,_context,_ref7){return _ref7.schema},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},TypeMetaFieldDef={name:"__type",type:__Type,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new GraphQLNonNull(GraphQLString),defaultValue:void 0,deprecationReason:void 0,extensions:void 0,astNode:void 0}],resolve:function(_source,_ref8,_context,_ref9){var name=_ref8.name;return _ref9.schema.getType(name)},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},TypeNameMetaFieldDef={name:"__typename",type:new GraphQLNonNull(GraphQLString),description:"The name of the current Object type at runtime.",args:[],resolve:function(_source,_args,_context,_ref10){return _ref10.parentType.name},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},introspectionTypes=Object.freeze([__Schema,__Directive,__DirectiveLocation,__Type,__Field,__InputValue,__EnumValue,__TypeKind]);function isIntrospectionType(type){return introspectionTypes.some(function(_ref11){var name=_ref11.name;return type.name===name})}function isDirective(directive){return jsutils_instanceOf(directive,directives_GraphQLDirective)}function assertDirective(directive){if(!isDirective(directive))throw Error("Expected ".concat(inspect(directive)," to be a GraphQL directive."));return directive}var directives_GraphQLDirective=function(){function GraphQLDirective(config){this.name=config.name,this.description=config.description,this.locations=config.locations,this.isRepeatable=null!=(_config$isRepeatable=config.isRepeatable)&&_config$isRepeatable,this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,config.name||devAssert(0,"Directive must be named."),Array.isArray(config.locations)||devAssert(0,"@".concat(config.name," locations must be an Array."));var _config$isRepeatable,_config$args,args=null!=(_config$args=config.args)?_config$args:{};isObjectLike(args)&&!Array.isArray(args)||devAssert(0,"@".concat(config.name," args must be an object with argument names as keys.")),this.args=objectEntries(args).map(function(_ref){var argName=_ref[0],argConfig=_ref[1];return{name:argName,description:argConfig.description,type:argConfig.type,defaultValue:argConfig.defaultValue,deprecationReason:argConfig.deprecationReason,extensions:argConfig.extensions&&toObjMap(argConfig.extensions),astNode:argConfig.astNode}})}var protoProps,_proto=GraphQLDirective.prototype;return _proto.toConfig=function(){return{name:this.name,description:this.description,locations:this.locations,args:argsToArgsConfig(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}},_proto.toString=function(){return"@"+this.name},_proto.toJSON=function(){return this.toString()},protoProps=[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLDirective"}}],function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}(GraphQLDirective.prototype,protoProps),GraphQLDirective}();defineInspect(directives_GraphQLDirective);var GraphQLIncludeDirective=new directives_GraphQLDirective({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[DirectiveLocation.FIELD,DirectiveLocation.FRAGMENT_SPREAD,DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new GraphQLNonNull(GraphQLBoolean),description:"Included when true."}}}),GraphQLSkipDirective=new directives_GraphQLDirective({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[DirectiveLocation.FIELD,DirectiveLocation.FRAGMENT_SPREAD,DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new GraphQLNonNull(GraphQLBoolean),description:"Skipped when true."}}}),DEFAULT_DEPRECATION_REASON="No longer supported",GraphQLDeprecatedDirective=new directives_GraphQLDirective({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[DirectiveLocation.FIELD_DEFINITION,DirectiveLocation.ARGUMENT_DEFINITION,DirectiveLocation.INPUT_FIELD_DEFINITION,DirectiveLocation.ENUM_VALUE],args:{reason:{type:GraphQLString,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:DEFAULT_DEPRECATION_REASON}}}),GraphQLSpecifiedByDirective=new directives_GraphQLDirective({name:"specifiedBy",description:"Exposes a URL that specifies the behaviour of this scalar.",locations:[DirectiveLocation.SCALAR],args:{url:{type:new GraphQLNonNull(GraphQLString),description:"The URL that specifies the behaviour of this scalar."}}}),specifiedDirectives=Object.freeze([GraphQLIncludeDirective,GraphQLSkipDirective,GraphQLDeprecatedDirective,GraphQLSpecifiedByDirective]);function isSpecifiedDirective(directive){return specifiedDirectives.some(function(_ref2){return _ref2.name===directive.name})}function isSchema(schema){return jsutils_instanceOf(schema,schema_GraphQLSchema)}function assertSchema(schema){if(!isSchema(schema))throw Error("Expected ".concat(inspect(schema)," to be a GraphQL schema."));return schema}var schema_GraphQLSchema=function(){function GraphQLSchema(config){this.__validationErrors=!0===config.assumeValid?[]:void 0,isObjectLike(config)||devAssert(0,"Must provide configuration object."),!config.types||Array.isArray(config.types)||devAssert(0,'"types" must be Array if provided but got: '.concat(inspect(config.types),".")),!config.directives||Array.isArray(config.directives)||devAssert(0,'"directives" must be Array if provided but got: '+"".concat(inspect(config.directives),".")),this.description=config.description,this.extensions=config.extensions&&toObjMap(config.extensions),this.astNode=config.astNode,this.extensionASTNodes=config.extensionASTNodes,this._queryType=config.query,this._mutationType=config.mutation,this._subscriptionType=config.subscription,this._directives=null!=(_config$directives=config.directives)?_config$directives:specifiedDirectives;var _config$directives,allReferencedTypes=new Set(config.types);if(null!=config.types)for(var _i2=0,_config$types2=config.types;_i2<_config$types2.length;_i2++){var type=_config$types2[_i2];allReferencedTypes.delete(type),collectReferencedTypes(type,allReferencedTypes)}null!=this._queryType&&collectReferencedTypes(this._queryType,allReferencedTypes),null!=this._mutationType&&collectReferencedTypes(this._mutationType,allReferencedTypes),null!=this._subscriptionType&&collectReferencedTypes(this._subscriptionType,allReferencedTypes);for(var _i4=0,_this$_directives2=this._directives;_i4<_this$_directives2.length;_i4++){var directive=_this$_directives2[_i4];if(isDirective(directive))for(var _i6=0,_directive$args2=directive.args;_i6<_directive$args2.length;_i6++)collectReferencedTypes(_directive$args2[_i6].type,allReferencedTypes)}collectReferencedTypes(__Schema,allReferencedTypes),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(var _i8=0,_arrayFrom2=arrayFrom(allReferencedTypes);_i8<_arrayFrom2.length;_i8++){var namedType=_arrayFrom2[_i8];if(null!=namedType){var typeName=namedType.name;if(typeName||devAssert(0,"One of the provided types for building the Schema is missing a name."),void 0!==this._typeMap[typeName])throw Error('Schema must contain uniquely named types but contains multiple types named "'.concat(typeName,'".'));if(this._typeMap[typeName]=namedType,isInterfaceType(namedType))for(var _i10=0,_namedType$getInterfa2=namedType.getInterfaces();_i10<_namedType$getInterfa2.length;_i10++){var iface=_namedType$getInterfa2[_i10];if(isInterfaceType(iface)){var implementations=this._implementationsMap[iface.name];void 0===implementations&&(implementations=this._implementationsMap[iface.name]={objects:[],interfaces:[]}),implementations.interfaces.push(namedType)}}else if(isObjectType(namedType))for(var _i12=0,_namedType$getInterfa4=namedType.getInterfaces();_i12<_namedType$getInterfa4.length;_i12++){var _iface=_namedType$getInterfa4[_i12];if(isInterfaceType(_iface)){var _implementations=this._implementationsMap[_iface.name];void 0===_implementations&&(_implementations=this._implementationsMap[_iface.name]={objects:[],interfaces:[]}),_implementations.objects.push(namedType)}}}}}var protoProps,_proto=GraphQLSchema.prototype;return _proto.getQueryType=function(){return this._queryType},_proto.getMutationType=function(){return this._mutationType},_proto.getSubscriptionType=function(){return this._subscriptionType},_proto.getTypeMap=function(){return this._typeMap},_proto.getType=function(name){return this.getTypeMap()[name]},_proto.getPossibleTypes=function(abstractType){return isUnionType(abstractType)?abstractType.getTypes():this.getImplementations(abstractType).objects},_proto.getImplementations=function(interfaceType){var implementations=this._implementationsMap[interfaceType.name];return null!=implementations?implementations:{objects:[],interfaces:[]}},_proto.isPossibleType=function(abstractType,possibleType){return this.isSubType(abstractType,possibleType)},_proto.isSubType=function(abstractType,maybeSubType){var map=this._subTypeMap[abstractType.name];if(void 0===map){if(map=Object.create(null),isUnionType(abstractType))for(var _i14=0,_abstractType$getType2=abstractType.getTypes();_i14<_abstractType$getType2.length;_i14++)map[_abstractType$getType2[_i14].name]=!0;else{for(var implementations=this.getImplementations(abstractType),_i16=0,_implementations$obje2=implementations.objects;_i16<_implementations$obje2.length;_i16++)map[_implementations$obje2[_i16].name]=!0;for(var _i18=0,_implementations$inte2=implementations.interfaces;_i18<_implementations$inte2.length;_i18++)map[_implementations$inte2[_i18].name]=!0}this._subTypeMap[abstractType.name]=map}return void 0!==map[maybeSubType.name]},_proto.getDirectives=function(){return this._directives},_proto.getDirective=function(name){return find(this.getDirectives(),function(directive){return directive.name===name})},_proto.toConfig=function(){var _this$extensionASTNod;return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:objectValues(this.getTypeMap()),directives:this.getDirectives().slice(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!=(_this$extensionASTNod=this.extensionASTNodes)?_this$extensionASTNod:[],assumeValid:void 0!==this.__validationErrors}},protoProps=[{key:SYMBOL_TO_STRING_TAG,get:function(){return"GraphQLSchema"}}],function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}(GraphQLSchema.prototype,protoProps),GraphQLSchema}();function collectReferencedTypes(type,typeSet){var namedType=definition_getNamedType(type);if(!typeSet.has(namedType)){if(typeSet.add(namedType),isUnionType(namedType))for(var _i20=0,_namedType$getTypes2=namedType.getTypes();_i20<_namedType$getTypes2.length;_i20++)collectReferencedTypes(_namedType$getTypes2[_i20],typeSet);else if(isObjectType(namedType)||isInterfaceType(namedType)){for(var _i22=0,_namedType$getInterfa6=namedType.getInterfaces();_i22<_namedType$getInterfa6.length;_i22++)collectReferencedTypes(_namedType$getInterfa6[_i22],typeSet);for(var _i24=0,_objectValues2=objectValues(namedType.getFields());_i24<_objectValues2.length;_i24++){var field=_objectValues2[_i24];collectReferencedTypes(field.type,typeSet);for(var _i26=0,_field$args2=field.args;_i26<_field$args2.length;_i26++)collectReferencedTypes(_field$args2[_i26].type,typeSet)}}else if(isInputObjectType(namedType))for(var _i28=0,_objectValues4=objectValues(namedType.getFields());_i28<_objectValues4.length;_i28++)collectReferencedTypes(_objectValues4[_i28].type,typeSet)}return typeSet}function validateSchema(schema){if(assertSchema(schema),schema.__validationErrors)return schema.__validationErrors;var context,_getOperationTypeNode,_getOperationTypeNode2,_getOperationTypeNode3,schema1,queryType,mutationType,subscriptionType,context1=new validate_SchemaValidationContext(schema);(queryType=(schema1=(context=context1).schema).getQueryType())?isObjectType(queryType)||context.reportError("Query root type must be Object type, it cannot be ".concat(inspect(queryType),"."),null!=(_getOperationTypeNode=getOperationTypeNode(schema1,"query"))?_getOperationTypeNode:queryType.astNode):context.reportError("Query root type must be provided.",schema1.astNode),(mutationType=schema1.getMutationType())&&!isObjectType(mutationType)&&context.reportError("Mutation root type must be Object type if provided, it cannot be "+"".concat(inspect(mutationType),"."),null!=(_getOperationTypeNode2=getOperationTypeNode(schema1,"mutation"))?_getOperationTypeNode2:mutationType.astNode),(subscriptionType=schema1.getSubscriptionType())&&!isObjectType(subscriptionType)&&context.reportError("Subscription root type must be Object type if provided, it cannot be "+"".concat(inspect(subscriptionType),"."),null!=(_getOperationTypeNode3=getOperationTypeNode(schema1,"subscription"))?_getOperationTypeNode3:subscriptionType.astNode),function(context){for(var _i4=0,_context$schema$getDi2=context.schema.getDirectives();_i4<_context$schema$getDi2.length;_i4++){var directive=_context$schema$getDi2[_i4];if(!isDirective(directive)){context.reportError("Expected directive but got: ".concat(inspect(directive),"."),null==directive?void 0:directive.astNode);continue}validateName(context,directive);for(var _i6=0,_directive$args2=directive.args;_i6<_directive$args2.length;_i6++){var _arg$astNode,arg=_directive$args2[_i6];validateName(context,arg),isInputType(arg.type)||context.reportError("The type of @".concat(directive.name,"(").concat(arg.name,":) must be Input Type ")+"but got: ".concat(inspect(arg.type),"."),arg.astNode),isRequiredArgument(arg)&&null!=arg.deprecationReason&&context.reportError("Required argument @".concat(directive.name,"(").concat(arg.name,":) cannot be deprecated."),[getDeprecatedDirectiveNode(arg.astNode),null==(_arg$astNode=arg.astNode)?void 0:_arg$astNode.type])}}}(context1),function(context){for(var context1,visitedTypes,fieldPath,fieldPathIndexByTypeName,validateInputObjectCircularRefs=(context1=context,visitedTypes=Object.create(null),fieldPath=[],fieldPathIndexByTypeName=Object.create(null),function detectCycleRecursive(inputObj){if(!visitedTypes[inputObj.name]){visitedTypes[inputObj.name]=!0,fieldPathIndexByTypeName[inputObj.name]=fieldPath.length;for(var fields=objectValues(inputObj.getFields()),_i30=0;_i30<fields.length;_i30++){var field=fields[_i30];if(isNonNullType(field.type)&&isInputObjectType(field.type.ofType)){var fieldType=field.type.ofType,cycleIndex=fieldPathIndexByTypeName[fieldType.name];if(fieldPath.push(field),void 0===cycleIndex)detectCycleRecursive(fieldType);else{var cyclePath=fieldPath.slice(cycleIndex),pathStr=cyclePath.map(function(fieldObj){return fieldObj.name}).join(".");context1.reportError('Cannot reference Input Object "'.concat(fieldType.name,'" within itself through a series of non-null fields: "').concat(pathStr,'".'),cyclePath.map(function(fieldObj){return fieldObj.astNode}))}fieldPath.pop()}}fieldPathIndexByTypeName[inputObj.name]=void 0}}),typeMap=context.schema.getTypeMap(),_i8=0,_objectValues2=objectValues(typeMap);_i8<_objectValues2.length;_i8++){var type=_objectValues2[_i8];if(!isNamedType(type)){context.reportError("Expected GraphQL named type but got: ".concat(inspect(type),"."),type.astNode);continue}isIntrospectionType(type)||validateName(context,type),isObjectType(type)||isInterfaceType(type)?(function(context,type){var fields=objectValues(type.getFields());0===fields.length&&context.reportError("Type ".concat(type.name," must define one or more fields."),getAllNodes(type));for(var _i10=0;_i10<fields.length;_i10++){var field=fields[_i10];validateName(context,field),isOutputType(field.type)||context.reportError("The type of ".concat(type.name,".").concat(field.name," must be Output Type ")+"but got: ".concat(inspect(field.type),"."),null==(_field$astNode=field.astNode)?void 0:_field$astNode.type);for(var _i12=0,_field$args2=field.args;_i12<_field$args2.length;_i12++){var _field$astNode,_arg$astNode2,_arg$astNode3,arg=_field$args2[_i12],argName=arg.name;validateName(context,arg),isInputType(arg.type)||context.reportError("The type of ".concat(type.name,".").concat(field.name,"(").concat(argName,":) must be Input ")+"Type but got: ".concat(inspect(arg.type),"."),null==(_arg$astNode2=arg.astNode)?void 0:_arg$astNode2.type),isRequiredArgument(arg)&&null!=arg.deprecationReason&&context.reportError("Required argument ".concat(type.name,".").concat(field.name,"(").concat(argName,":) cannot be deprecated."),[getDeprecatedDirectiveNode(arg.astNode),null==(_arg$astNode3=arg.astNode)?void 0:_arg$astNode3.type])}}}(context,type),function(context,type){for(var ifaceTypeNames=Object.create(null),_i14=0,_type$getInterfaces2=type.getInterfaces();_i14<_type$getInterfaces2.length;_i14++){var iface=_type$getInterfaces2[_i14];if(!isInterfaceType(iface)){context.reportError("Type ".concat(inspect(type)," must only implement Interface types, ")+"it cannot implement ".concat(inspect(iface),"."),getAllImplementsInterfaceNodes(type,iface));continue}if(type===iface){context.reportError("Type ".concat(type.name," cannot implement itself because it would create a circular reference."),getAllImplementsInterfaceNodes(type,iface));continue}if(ifaceTypeNames[iface.name]){context.reportError("Type ".concat(type.name," can only implement ").concat(iface.name," once."),getAllImplementsInterfaceNodes(type,iface));continue}ifaceTypeNames[iface.name]=!0,function(context,type,iface){for(var ifaceInterfaces=type.getInterfaces(),_i22=0,_iface$getInterfaces2=iface.getInterfaces();_i22<_iface$getInterfaces2.length;_i22++){var transitive=_iface$getInterfaces2[_i22];-1===ifaceInterfaces.indexOf(transitive)&&context.reportError(transitive===type?"Type ".concat(type.name," cannot implement ").concat(iface.name," because it would create a circular reference."):"Type ".concat(type.name," must implement ").concat(transitive.name," because it is implemented by ").concat(iface.name,"."),[].concat(getAllImplementsInterfaceNodes(iface,transitive),getAllImplementsInterfaceNodes(type,iface)))}}(context,type,iface),function(context,type,iface){for(var typeFieldMap=type.getFields(),_i16=0,_objectValues4=objectValues(iface.getFields());_i16<_objectValues4.length;_i16++){var _ifaceField$astNode,_typeField$astNode,ifaceField=_objectValues4[_i16],fieldName=ifaceField.name,typeField=typeFieldMap[fieldName];if(!typeField){context.reportError("Interface field ".concat(iface.name,".").concat(fieldName," expected but ").concat(type.name," does not provide it."),[ifaceField.astNode].concat(getAllNodes(type)));continue}isTypeSubTypeOf(context.schema,typeField.type,ifaceField.type)||context.reportError("Interface field ".concat(iface.name,".").concat(fieldName," expects type ")+"".concat(inspect(ifaceField.type)," but ").concat(type.name,".").concat(fieldName," ")+"is type ".concat(inspect(typeField.type),"."),[null==(_ifaceField$astNode=ifaceField.astNode)?void 0:_ifaceField$astNode.type,null==(_typeField$astNode=typeField.astNode)?void 0:_typeField$astNode.type]);for(var _i18=0,_ifaceField$args2=ifaceField.args;_i18<_ifaceField$args2.length;_i18++)if("continue"===function(_i18,_ifaceField$args2){var _ifaceArg$astNode,_typeArg$astNode,ifaceArg=_ifaceField$args2[_i18],argName=ifaceArg.name,typeArg=find(typeField.args,function(arg){return arg.name===argName});if(!typeArg)return context.reportError("Interface field argument ".concat(iface.name,".").concat(fieldName,"(").concat(argName,":) expected but ").concat(type.name,".").concat(fieldName," does not provide it."),[ifaceArg.astNode,typeField.astNode]),"continue";isEqualType(ifaceArg.type,typeArg.type)||context.reportError("Interface field argument ".concat(iface.name,".").concat(fieldName,"(").concat(argName,":) ")+"expects type ".concat(inspect(ifaceArg.type)," but ")+"".concat(type.name,".").concat(fieldName,"(").concat(argName,":) is type ")+"".concat(inspect(typeArg.type),"."),[null==(_ifaceArg$astNode=ifaceArg.astNode)?void 0:_ifaceArg$astNode.type,null==(_typeArg$astNode=typeArg.astNode)?void 0:_typeArg$astNode.type])}(_i18,_ifaceField$args2))continue;for(var _i20=0,_typeField$args2=typeField.args;_i20<_typeField$args2.length;_i20++)!function(_i20,_typeField$args2){var typeArg=_typeField$args2[_i20],argName=typeArg.name;!find(ifaceField.args,function(arg){return arg.name===argName})&&isRequiredArgument(typeArg)&&context.reportError("Object field ".concat(type.name,".").concat(fieldName," includes required argument ").concat(argName," that is missing from the Interface field ").concat(iface.name,".").concat(fieldName,"."),[typeArg.astNode,ifaceField.astNode])}(_i20,_typeField$args2)}}(context,type,iface)}}(context,type)):isUnionType(type)?function(context,union){var memberTypes=union.getTypes();0===memberTypes.length&&context.reportError("Union type ".concat(union.name," must define one or more member types."),getAllNodes(union));for(var includedTypeNames=Object.create(null),_i24=0;_i24<memberTypes.length;_i24++){var memberType=memberTypes[_i24];if(includedTypeNames[memberType.name]){context.reportError("Union type ".concat(union.name," can only include type ").concat(memberType.name," once."),getUnionMemberTypeNodes(union,memberType.name));continue}includedTypeNames[memberType.name]=!0,isObjectType(memberType)||context.reportError("Union type ".concat(union.name," can only include Object types, ")+"it cannot include ".concat(inspect(memberType),"."),getUnionMemberTypeNodes(union,String(memberType)))}}(context,type):isEnumType(type)?function(context,enumType){var enumValues=enumType.getValues();0===enumValues.length&&context.reportError("Enum type ".concat(enumType.name," must define one or more values."),getAllNodes(enumType));for(var _i26=0;_i26<enumValues.length;_i26++){var enumValue=enumValues[_i26],valueName=enumValue.name;validateName(context,enumValue),("true"===valueName||"false"===valueName||"null"===valueName)&&context.reportError("Enum type ".concat(enumType.name," cannot include value: ").concat(valueName,"."),enumValue.astNode)}}(context,type):isInputObjectType(type)&&(function(context,inputObj){var fields=objectValues(inputObj.getFields());0===fields.length&&context.reportError("Input Object type ".concat(inputObj.name," must define one or more fields."),getAllNodes(inputObj));for(var _i28=0;_i28<fields.length;_i28++){var _field$astNode2,_field$astNode3,field=fields[_i28];validateName(context,field),isInputType(field.type)||context.reportError("The type of ".concat(inputObj.name,".").concat(field.name," must be Input Type ")+"but got: ".concat(inspect(field.type),"."),null==(_field$astNode2=field.astNode)?void 0:_field$astNode2.type),isRequiredInputField(field)&&null!=field.deprecationReason&&context.reportError("Required input field ".concat(inputObj.name,".").concat(field.name," cannot be deprecated."),[getDeprecatedDirectiveNode(field.astNode),null==(_field$astNode3=field.astNode)?void 0:_field$astNode3.type])}}(context,type),validateInputObjectCircularRefs(type))}}(context1);var errors=context1.getErrors();return schema.__validationErrors=errors,errors}function assertValidSchema(schema){var errors=validateSchema(schema);if(0!==errors.length)throw Error(errors.map(function(error){return error.message}).join("\n\n"))}var validate_SchemaValidationContext=function(){function SchemaValidationContext(schema){this._errors=[],this.schema=schema}var _proto=SchemaValidationContext.prototype;return _proto.reportError=function(message,nodes){var _nodes=Array.isArray(nodes)?nodes.filter(Boolean):nodes;this.addError(new GraphQLError_GraphQLError(message,_nodes))},_proto.addError=function(error){this._errors.push(error)},_proto.getErrors=function(){return this._errors},SchemaValidationContext}();function getOperationTypeNode(schema,operation){for(var operationNodes=getAllSubNodes(schema,function(node){return node.operationTypes}),_i2=0;_i2<operationNodes.length;_i2++){var node=operationNodes[_i2];if(node.operation===operation)return node.type}}function validateName(context,node){var error=isValidNameError(node.name);error&&context.addError(locatedError(error,node.astNode))}function getAllNodes(object){var astNode=object.astNode,extensionASTNodes=object.extensionASTNodes;return astNode?extensionASTNodes?[astNode].concat(extensionASTNodes):[astNode]:null!=extensionASTNodes?extensionASTNodes:[]}function getAllSubNodes(object,getter){for(var subNodes=[],_i32=0,_getAllNodes2=getAllNodes(object);_i32<_getAllNodes2.length;_i32++){var _getter,node=_getAllNodes2[_i32];subNodes=subNodes.concat(null!=(_getter=getter(node))?_getter:[])}return subNodes}function getAllImplementsInterfaceNodes(type,iface){return getAllSubNodes(type,function(typeNode){return typeNode.interfaces}).filter(function(ifaceNode){return ifaceNode.name.value===iface.name})}function getUnionMemberTypeNodes(union,typeName){return getAllSubNodes(union,function(unionNode){return unionNode.types}).filter(function(typeNode){return typeNode.name.value===typeName})}function getDeprecatedDirectiveNode(definitionNode){var _definitionNode$direc;return null==definitionNode||null==(_definitionNode$direc=definitionNode.directives)?void 0:_definitionNode$direc.find(function(node){return node.name.value===GraphQLDeprecatedDirective.name})}function typeFromAST(schema,typeNode){var innerType;return typeNode.kind===Kind.LIST_TYPE?(innerType=typeFromAST(schema,typeNode.type))&&new GraphQLList(innerType):typeNode.kind===Kind.NON_NULL_TYPE?(innerType=typeFromAST(schema,typeNode.type))&&new GraphQLNonNull(innerType):typeNode.kind===Kind.NAMED_TYPE?schema.getType(typeNode.name.value):void invariant(0,"Unexpected type node: "+inspect(typeNode))}var TypeInfo_TypeInfo=function(){function TypeInfo(schema,getFieldDefFn,initialType){this._schema=schema,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=null!=getFieldDefFn?getFieldDefFn:TypeInfo_getFieldDef,initialType&&(isInputType(initialType)&&this._inputTypeStack.push(initialType),isCompositeType(initialType)&&this._parentTypeStack.push(initialType),isOutputType(initialType)&&this._typeStack.push(initialType))}var _proto=TypeInfo.prototype;return _proto.getType=function(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]},_proto.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},_proto.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},_proto.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},_proto.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},_proto.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},_proto.getDirective=function(){return this._directive},_proto.getArgument=function(){return this._argument},_proto.getEnumValue=function(){return this._enumValue},_proto.enter=function(node){var schema=this._schema;switch(node.kind){case Kind.SELECTION_SET:var namedType=definition_getNamedType(this.getType());this._parentTypeStack.push(isCompositeType(namedType)?namedType:void 0);break;case Kind.FIELD:var fieldDef,fieldType,parentType=this.getParentType();parentType&&(fieldDef=this._getFieldDef(schema,parentType,node))&&(fieldType=fieldDef.type),this._fieldDefStack.push(fieldDef),this._typeStack.push(isOutputType(fieldType)?fieldType:void 0);break;case Kind.DIRECTIVE:this._directive=schema.getDirective(node.name.value);break;case Kind.OPERATION_DEFINITION:switch(node.operation){case"query":type=schema.getQueryType();break;case"mutation":type=schema.getMutationType();break;case"subscription":type=schema.getSubscriptionType()}this._typeStack.push(isObjectType(type)?type:void 0);break;case Kind.INLINE_FRAGMENT:case Kind.FRAGMENT_DEFINITION:var typeConditionAST=node.typeCondition,outputType=typeConditionAST?typeFromAST(schema,typeConditionAST):definition_getNamedType(this.getType());this._typeStack.push(isOutputType(outputType)?outputType:void 0);break;case Kind.VARIABLE_DEFINITION:var inputType=typeFromAST(schema,node.type);this._inputTypeStack.push(isInputType(inputType)?inputType:void 0);break;case Kind.ARGUMENT:var type,_this$getDirective,argDef,argType,fieldOrDirective=null!=(_this$getDirective=this.getDirective())?_this$getDirective:this.getFieldDef();fieldOrDirective&&(argDef=find(fieldOrDirective.args,function(arg){return arg.name===node.name.value}))&&(argType=argDef.type),this._argument=argDef,this._defaultValueStack.push(argDef?argDef.defaultValue:void 0),this._inputTypeStack.push(isInputType(argType)?argType:void 0);break;case Kind.LIST:var listType=getNullableType(this.getInputType()),itemType=isListType(listType)?listType.ofType:listType;this._defaultValueStack.push(void 0),this._inputTypeStack.push(isInputType(itemType)?itemType:void 0);break;case Kind.OBJECT_FIELD:var inputFieldType,inputField,objectType=definition_getNamedType(this.getInputType());isInputObjectType(objectType)&&(inputField=objectType.getFields()[node.name.value])&&(inputFieldType=inputField.type),this._defaultValueStack.push(inputField?inputField.defaultValue:void 0),this._inputTypeStack.push(isInputType(inputFieldType)?inputFieldType:void 0);break;case Kind.ENUM:var enumValue,enumType=definition_getNamedType(this.getInputType());isEnumType(enumType)&&(enumValue=enumType.getValue(node.value)),this._enumValue=enumValue}},_proto.leave=function(node){switch(node.kind){case Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Kind.DIRECTIVE:this._directive=null;break;case Kind.OPERATION_DEFINITION:case Kind.INLINE_FRAGMENT:case Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Kind.LIST:case Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Kind.ENUM:this._enumValue=null}},TypeInfo}();function TypeInfo_getFieldDef(schema,parentType,fieldNode){var name=fieldNode.name.value;return name===SchemaMetaFieldDef.name&&schema.getQueryType()===parentType?SchemaMetaFieldDef:name===TypeMetaFieldDef.name&&schema.getQueryType()===parentType?TypeMetaFieldDef:name===TypeNameMetaFieldDef.name&&isCompositeType(parentType)?TypeNameMetaFieldDef:isObjectType(parentType)||isInterfaceType(parentType)?parentType.getFields()[name]:void 0}function visitWithTypeInfo(typeInfo,visitor){return{enter:function(node){typeInfo.enter(node);var fn=getVisitFn(visitor,node.kind,!1);if(fn){var result=fn.apply(visitor,arguments);return void 0!==result&&(typeInfo.leave(node),isNode(result)&&typeInfo.enter(result)),result}},leave:function(node){var result,fn=getVisitFn(visitor,node.kind,!0);return fn&&(result=fn.apply(visitor,arguments)),typeInfo.leave(node),result}}}function isDefinitionNode(node){return isExecutableDefinitionNode(node)||isTypeSystemDefinitionNode(node)||isTypeSystemExtensionNode(node)}function isExecutableDefinitionNode(node){return node.kind===Kind.OPERATION_DEFINITION||node.kind===Kind.FRAGMENT_DEFINITION}function isSelectionNode(node){return node.kind===Kind.FIELD||node.kind===Kind.FRAGMENT_SPREAD||node.kind===Kind.INLINE_FRAGMENT}function isValueNode(node){return node.kind===Kind.VARIABLE||node.kind===Kind.INT||node.kind===Kind.FLOAT||node.kind===Kind.STRING||node.kind===Kind.BOOLEAN||node.kind===Kind.NULL||node.kind===Kind.ENUM||node.kind===Kind.LIST||node.kind===Kind.OBJECT}function isTypeNode(node){return node.kind===Kind.NAMED_TYPE||node.kind===Kind.LIST_TYPE||node.kind===Kind.NON_NULL_TYPE}function isTypeSystemDefinitionNode(node){return node.kind===Kind.SCHEMA_DEFINITION||isTypeDefinitionNode(node)||node.kind===Kind.DIRECTIVE_DEFINITION}function isTypeDefinitionNode(node){return node.kind===Kind.SCALAR_TYPE_DEFINITION||node.kind===Kind.OBJECT_TYPE_DEFINITION||node.kind===Kind.INTERFACE_TYPE_DEFINITION||node.kind===Kind.UNION_TYPE_DEFINITION||node.kind===Kind.ENUM_TYPE_DEFINITION||node.kind===Kind.INPUT_OBJECT_TYPE_DEFINITION}function isTypeSystemExtensionNode(node){return node.kind===Kind.SCHEMA_EXTENSION||isTypeExtensionNode(node)}function isTypeExtensionNode(node){return node.kind===Kind.SCALAR_TYPE_EXTENSION||node.kind===Kind.OBJECT_TYPE_EXTENSION||node.kind===Kind.INTERFACE_TYPE_EXTENSION||node.kind===Kind.UNION_TYPE_EXTENSION||node.kind===Kind.ENUM_TYPE_EXTENSION||node.kind===Kind.INPUT_OBJECT_TYPE_EXTENSION}function ExecutableDefinitionsRule(context){return{Document:function(node){for(var _i2=0,_node$definitions2=node.definitions;_i2<_node$definitions2.length;_i2++){var definition=_node$definitions2[_i2];if(!isExecutableDefinitionNode(definition)){var defName=definition.kind===Kind.SCHEMA_DEFINITION||definition.kind===Kind.SCHEMA_EXTENSION?"schema":'"'+definition.name.value+'"';context.reportError(new GraphQLError_GraphQLError("The ".concat(defName," definition is not executable."),definition))}}return!1}}}function UniqueOperationNamesRule(context){var knownOperationNames=Object.create(null);return{OperationDefinition:function(node){var operationName=node.name;return operationName&&(knownOperationNames[operationName.value]?context.reportError(new GraphQLError_GraphQLError('There can be only one operation named "'.concat(operationName.value,'".'),[knownOperationNames[operationName.value],operationName])):knownOperationNames[operationName.value]=operationName),!1},FragmentDefinition:function(){return!1}}}function LoneAnonymousOperationRule(context){var operationCount=0;return{Document:function(node){operationCount=node.definitions.filter(function(definition){return definition.kind===Kind.OPERATION_DEFINITION}).length},OperationDefinition:function(node){!node.name&&operationCount>1&&context.reportError(new GraphQLError_GraphQLError("This anonymous operation must be the only defined operation.",node))}}}function SingleFieldSubscriptionsRule(context){return{OperationDefinition:function(node){"subscription"===node.operation&&1!==node.selectionSet.selections.length&&context.reportError(new GraphQLError_GraphQLError(node.name?'Subscription "'.concat(node.name.value,'" must select only one top level field.'):"Anonymous Subscription must select only one top level field.",node.selectionSet.selections.slice(1)))}}}function KnownTypeNamesRule(context){for(var schema=context.getSchema(),existingTypesMap=schema?schema.getTypeMap():Object.create(null),definedTypes=Object.create(null),_i2=0,_context$getDocument$2=context.getDocument().definitions;_i2<_context$getDocument$2.length;_i2++){var def=_context$getDocument$2[_i2];isTypeDefinitionNode(def)&&(definedTypes[def.name.value]=!0)}var typeNames=Object.keys(existingTypesMap).concat(Object.keys(definedTypes));return{NamedType:function(node,_1,parent1,_2,ancestors){var typeName=node.name.value;if(!existingTypesMap[typeName]&&!definedTypes[typeName]){var typeName1,value1,_ancestors$,definitionNode=null!=(_ancestors$=ancestors[2])?_ancestors$:parent1,isSDL=null!=definitionNode&&!Array.isArray(value1=definitionNode)&&(isTypeSystemDefinitionNode(value1)||isTypeSystemExtensionNode(value1));if(isSDL&&(typeName1=typeName,-1!==standardTypeNames.indexOf(typeName1)))return;var suggestedTypes=suggestionList(typeName,isSDL?standardTypeNames.concat(typeNames):typeNames);context.reportError(new GraphQLError_GraphQLError('Unknown type "'.concat(typeName,'".')+didYouMean(suggestedTypes),node))}}}}var standardTypeNames=[].concat(specifiedScalarTypes,introspectionTypes).map(function(type){return type.name});function FragmentsOnCompositeTypesRule(context){return{InlineFragment:function(node){var typeCondition=node.typeCondition;if(typeCondition){var type=typeFromAST(context.getSchema(),typeCondition);if(type&&!isCompositeType(type)){var typeStr=print(typeCondition);context.reportError(new GraphQLError_GraphQLError('Fragment cannot condition on non composite type "'.concat(typeStr,'".'),typeCondition))}}},FragmentDefinition:function(node){var type=typeFromAST(context.getSchema(),node.typeCondition);if(type&&!isCompositeType(type)){var typeStr=print(node.typeCondition);context.reportError(new GraphQLError_GraphQLError('Fragment "'.concat(node.name.value,'" cannot condition on non composite type "').concat(typeStr,'".'),node.typeCondition))}}}}function VariablesAreInputTypesRule(context){return{VariableDefinition:function(node){var type=typeFromAST(context.getSchema(),node.type);if(type&&!isInputType(type)){var variableName=node.variable.name.value,typeName=print(node.type);context.reportError(new GraphQLError_GraphQLError('Variable "$'.concat(variableName,'" cannot be non-input type "').concat(typeName,'".'),node.type))}}}}function ScalarLeafsRule(context){return{Field:function(node){var type=context.getType(),selectionSet=node.selectionSet;if(type){if(isLeafType(definition_getNamedType(type))){if(selectionSet){var fieldName=node.name.value,typeStr=inspect(type);context.reportError(new GraphQLError_GraphQLError('Field "'.concat(fieldName,'" must not have a selection since type "').concat(typeStr,'" has no subfields.'),selectionSet))}}else if(!selectionSet){var _fieldName=node.name.value,_typeStr=inspect(type);context.reportError(new GraphQLError_GraphQLError('Field "'.concat(_fieldName,'" of type "').concat(_typeStr,'" must have a selection of subfields. Did you mean "').concat(_fieldName,' { ... }"?'),node))}}}}}function FieldsOnCorrectTypeRule(context){return{Field:function(node){var type=context.getParentType();if(type&&!context.getFieldDef()){var type1,fieldName,schema=context.getSchema(),fieldName1=node.name.value,suggestion=didYouMean("to use an inline fragment on",function(schema,type,fieldName){if(!isAbstractType(type))return[];for(var suggestedTypes=new Set,usageCount=Object.create(null),_i2=0,_schema$getPossibleTy2=schema.getPossibleTypes(type);_i2<_schema$getPossibleTy2.length;_i2++){var possibleType=_schema$getPossibleTy2[_i2];if(possibleType.getFields()[fieldName]){suggestedTypes.add(possibleType),usageCount[possibleType.name]=1;for(var _i4=0,_possibleType$getInte2=possibleType.getInterfaces();_i4<_possibleType$getInte2.length;_i4++){var _usageCount$possibleI,possibleInterface=_possibleType$getInte2[_i4];possibleInterface.getFields()[fieldName]&&(suggestedTypes.add(possibleInterface),usageCount[possibleInterface.name]=(null!=(_usageCount$possibleI=usageCount[possibleInterface.name])?_usageCount$possibleI:0)+1)}}}return arrayFrom(suggestedTypes).sort(function(typeA,typeB){var usageCountDiff=usageCount[typeB.name]-usageCount[typeA.name];return 0!==usageCountDiff?usageCountDiff:isInterfaceType(typeA)&&schema.isSubType(typeA,typeB)?-1:isInterfaceType(typeB)&&schema.isSubType(typeB,typeA)?1:naturalCompare(typeA.name,typeB.name)}).map(function(x){return x.name})}(schema,type,fieldName1));""===suggestion&&(suggestion=didYouMean((type1=type,fieldName=fieldName1,isObjectType(type1)||isInterfaceType(type1)?suggestionList(fieldName,Object.keys(type1.getFields())):[]))),context.reportError(new GraphQLError_GraphQLError('Cannot query field "'.concat(fieldName1,'" on type "').concat(type.name,'".')+suggestion,node))}}}}function UniqueFragmentNamesRule(context){var knownFragmentNames=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(node){var fragmentName=node.name.value;return knownFragmentNames[fragmentName]?context.reportError(new GraphQLError_GraphQLError('There can be only one fragment named "'.concat(fragmentName,'".'),[knownFragmentNames[fragmentName],node.name])):knownFragmentNames[fragmentName]=node.name,!1}}}function KnownFragmentNamesRule(context){return{FragmentSpread:function(node){var fragmentName=node.name.value;context.getFragment(fragmentName)||context.reportError(new GraphQLError_GraphQLError('Unknown fragment "'.concat(fragmentName,'".'),node.name))}}}function NoUnusedFragmentsRule(context){var operationDefs=[],fragmentDefs=[];return{OperationDefinition:function(node){return operationDefs.push(node),!1},FragmentDefinition:function(node){return fragmentDefs.push(node),!1},Document:{leave:function(){for(var fragmentNameUsed=Object.create(null),_i2=0;_i2<operationDefs.length;_i2++)for(var operation=operationDefs[_i2],_i4=0,_context$getRecursive2=context.getRecursivelyReferencedFragments(operation);_i4<_context$getRecursive2.length;_i4++)fragmentNameUsed[_context$getRecursive2[_i4].name.value]=!0;for(var _i6=0;_i6<fragmentDefs.length;_i6++){var fragmentDef=fragmentDefs[_i6],fragName=fragmentDef.name.value;!0!==fragmentNameUsed[fragName]&&context.reportError(new GraphQLError_GraphQLError('Fragment "'.concat(fragName,'" is never used.'),fragmentDef))}}}}}function PossibleFragmentSpreadsRule(context){return{InlineFragment:function(node){var fragType=context.getType(),parentType=context.getParentType();if(isCompositeType(fragType)&&isCompositeType(parentType)&&!doTypesOverlap(context.getSchema(),fragType,parentType)){var parentTypeStr=inspect(parentType),fragTypeStr=inspect(fragType);context.reportError(new GraphQLError_GraphQLError('Fragment cannot be spread here as objects of type "'.concat(parentTypeStr,'" can never be of type "').concat(fragTypeStr,'".'),node))}},FragmentSpread:function(node){var fragName=node.name.value,fragType=function(context,name){var frag=context.getFragment(name);if(frag){var type=typeFromAST(context.getSchema(),frag.typeCondition);if(isCompositeType(type))return type}}(context,fragName),parentType=context.getParentType();if(fragType&&parentType&&!doTypesOverlap(context.getSchema(),fragType,parentType)){var parentTypeStr=inspect(parentType),fragTypeStr=inspect(fragType);context.reportError(new GraphQLError_GraphQLError('Fragment "'.concat(fragName,'" cannot be spread here as objects of type "').concat(parentTypeStr,'" can never be of type "').concat(fragTypeStr,'".'),node))}}}}function NoFragmentCyclesRule(context){var visitedFrags=Object.create(null),spreadPath=[],spreadPathIndexByName=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(node){return function detectCycleRecursive(fragment){if(!visitedFrags[fragment.name.value]){var fragmentName=fragment.name.value;visitedFrags[fragmentName]=!0;var spreadNodes=context.getFragmentSpreads(fragment.selectionSet);if(0!==spreadNodes.length){spreadPathIndexByName[fragmentName]=spreadPath.length;for(var _i2=0;_i2<spreadNodes.length;_i2++){var spreadNode=spreadNodes[_i2],spreadName=spreadNode.name.value,cycleIndex=spreadPathIndexByName[spreadName];if(spreadPath.push(spreadNode),void 0===cycleIndex){var spreadFragment=context.getFragment(spreadName);spreadFragment&&detectCycleRecursive(spreadFragment)}else{var cyclePath=spreadPath.slice(cycleIndex),viaPath=cyclePath.slice(0,-1).map(function(s){return'"'+s.name.value+'"'}).join(", ");context.reportError(new GraphQLError_GraphQLError('Cannot spread fragment "'.concat(spreadName,'" within itself')+(""!==viaPath?" via ".concat(viaPath,"."):"."),cyclePath))}spreadPath.pop()}spreadPathIndexByName[fragmentName]=void 0}}}(node),!1}}}function UniqueVariableNamesRule(context){var knownVariableNames=Object.create(null);return{OperationDefinition:function(){knownVariableNames=Object.create(null)},VariableDefinition:function(node){var variableName=node.variable.name.value;knownVariableNames[variableName]?context.reportError(new GraphQLError_GraphQLError('There can be only one variable named "$'.concat(variableName,'".'),[knownVariableNames[variableName],node.variable.name])):knownVariableNames[variableName]=node.variable.name}}}function NoUndefinedVariablesRule(context){var variableNameDefined=Object.create(null);return{OperationDefinition:{enter:function(){variableNameDefined=Object.create(null)},leave:function(operation){for(var usages=context.getRecursiveVariableUsages(operation),_i2=0;_i2<usages.length;_i2++){var node=usages[_i2].node,varName=node.name.value;!0!==variableNameDefined[varName]&&context.reportError(new GraphQLError_GraphQLError(operation.name?'Variable "$'.concat(varName,'" is not defined by operation "').concat(operation.name.value,'".'):'Variable "$'.concat(varName,'" is not defined.'),[node,operation]))}}},VariableDefinition:function(node){variableNameDefined[node.variable.name.value]=!0}}}function NoUnusedVariablesRule(context){var variableDefs=[];return{OperationDefinition:{enter:function(){variableDefs=[]},leave:function(operation){for(var variableNameUsed=Object.create(null),usages=context.getRecursiveVariableUsages(operation),_i2=0;_i2<usages.length;_i2++)variableNameUsed[usages[_i2].node.name.value]=!0;for(var _i4=0,_variableDefs2=variableDefs;_i4<_variableDefs2.length;_i4++){var variableDef=_variableDefs2[_i4],variableName=variableDef.variable.name.value;!0!==variableNameUsed[variableName]&&context.reportError(new GraphQLError_GraphQLError(operation.name?'Variable "$'.concat(variableName,'" is never used in operation "').concat(operation.name.value,'".'):'Variable "$'.concat(variableName,'" is never used.'),variableDef))}}},VariableDefinition:function(def){variableDefs.push(def)}}}function KnownDirectivesRule(context){for(var locationsMap=Object.create(null),schema=context.getSchema(),definedDirectives=schema?schema.getDirectives():specifiedDirectives,_i2=0;_i2<definedDirectives.length;_i2++){var directive=definedDirectives[_i2];locationsMap[directive.name]=directive.locations}for(var astDefinitions=context.getDocument().definitions,_i4=0;_i4<astDefinitions.length;_i4++){var def=astDefinitions[_i4];def.kind===Kind.DIRECTIVE_DEFINITION&&(locationsMap[def.name.value]=def.locations.map(function(name){return name.value}))}return{Directive:function(node,_key,_parent,_path,ancestors){var name=node.name.value,locations=locationsMap[name];if(!locations)return void context.reportError(new GraphQLError_GraphQLError('Unknown directive "@'.concat(name,'".'),node));var candidateLocation=function(ancestors){var appliedTo=ancestors[ancestors.length-1];switch(Array.isArray(appliedTo)&&invariant(0),appliedTo.kind){case Kind.OPERATION_DEFINITION:var operation=appliedTo.operation;switch(operation){case"query":return DirectiveLocation.QUERY;case"mutation":return DirectiveLocation.MUTATION;case"subscription":return DirectiveLocation.SUBSCRIPTION}invariant(0,"Unexpected operation: "+inspect(operation));return;case Kind.FIELD:return DirectiveLocation.FIELD;case Kind.FRAGMENT_SPREAD:return DirectiveLocation.FRAGMENT_SPREAD;case Kind.INLINE_FRAGMENT:return DirectiveLocation.INLINE_FRAGMENT;case Kind.FRAGMENT_DEFINITION:return DirectiveLocation.FRAGMENT_DEFINITION;case Kind.VARIABLE_DEFINITION:return DirectiveLocation.VARIABLE_DEFINITION;case Kind.SCHEMA_DEFINITION:case Kind.SCHEMA_EXTENSION:return DirectiveLocation.SCHEMA;case Kind.SCALAR_TYPE_DEFINITION:case Kind.SCALAR_TYPE_EXTENSION:return DirectiveLocation.SCALAR;case Kind.OBJECT_TYPE_DEFINITION:case Kind.OBJECT_TYPE_EXTENSION:return DirectiveLocation.OBJECT;case Kind.FIELD_DEFINITION:return DirectiveLocation.FIELD_DEFINITION;case Kind.INTERFACE_TYPE_DEFINITION:case Kind.INTERFACE_TYPE_EXTENSION:return DirectiveLocation.INTERFACE;case Kind.UNION_TYPE_DEFINITION:case Kind.UNION_TYPE_EXTENSION:return DirectiveLocation.UNION;case Kind.ENUM_TYPE_DEFINITION:case Kind.ENUM_TYPE_EXTENSION:return DirectiveLocation.ENUM;case Kind.ENUM_VALUE_DEFINITION:return DirectiveLocation.ENUM_VALUE;case Kind.INPUT_OBJECT_TYPE_DEFINITION:case Kind.INPUT_OBJECT_TYPE_EXTENSION:return DirectiveLocation.INPUT_OBJECT;case Kind.INPUT_VALUE_DEFINITION:return ancestors[ancestors.length-3].kind===Kind.INPUT_OBJECT_TYPE_DEFINITION?DirectiveLocation.INPUT_FIELD_DEFINITION:DirectiveLocation.ARGUMENT_DEFINITION}}(ancestors);candidateLocation&&-1===locations.indexOf(candidateLocation)&&context.reportError(new GraphQLError_GraphQLError('Directive "@'.concat(name,'" may not be used on ').concat(candidateLocation,"."),node))}}}function UniqueDirectivesPerLocationRule(context){for(var uniqueDirectiveMap=Object.create(null),schema=context.getSchema(),definedDirectives=schema?schema.getDirectives():specifiedDirectives,_i2=0;_i2<definedDirectives.length;_i2++){var directive=definedDirectives[_i2];uniqueDirectiveMap[directive.name]=!directive.isRepeatable}for(var astDefinitions=context.getDocument().definitions,_i4=0;_i4<astDefinitions.length;_i4++){var def=astDefinitions[_i4];def.kind===Kind.DIRECTIVE_DEFINITION&&(uniqueDirectiveMap[def.name.value]=!def.repeatable)}var schemaDirectives=Object.create(null),typeDirectivesMap=Object.create(null);return{enter:function(node){if(null!=node.directives){if(node.kind===Kind.SCHEMA_DEFINITION||node.kind===Kind.SCHEMA_EXTENSION)seenDirectives=schemaDirectives;else if(isTypeDefinitionNode(node)||isTypeExtensionNode(node)){var seenDirectives,typeName=node.name.value;void 0===(seenDirectives=typeDirectivesMap[typeName])&&(typeDirectivesMap[typeName]=seenDirectives=Object.create(null))}else seenDirectives=Object.create(null);for(var _i6=0,_node$directives2=node.directives;_i6<_node$directives2.length;_i6++){var _directive=_node$directives2[_i6],directiveName=_directive.name.value;uniqueDirectiveMap[directiveName]&&(seenDirectives[directiveName]?context.reportError(new GraphQLError_GraphQLError('The directive "@'.concat(directiveName,'" can only be used once at this location.'),[seenDirectives[directiveName],_directive])):seenDirectives[directiveName]=_directive)}}}}}function KnownArgumentNamesRule_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function KnownArgumentNamesRule_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?KnownArgumentNamesRule_ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):KnownArgumentNamesRule_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function KnownArgumentNamesRule(context){return KnownArgumentNamesRule_objectSpread(KnownArgumentNamesRule_objectSpread({},KnownArgumentNamesOnDirectivesRule(context)),{},{Argument:function(argNode){var argDef=context.getArgument(),fieldDef=context.getFieldDef(),parentType=context.getParentType();if(!argDef&&fieldDef&&parentType){var argName=argNode.name.value,suggestions=suggestionList(argName,fieldDef.args.map(function(arg){return arg.name}));context.reportError(new GraphQLError_GraphQLError('Unknown argument "'.concat(argName,'" on field "').concat(parentType.name,".").concat(fieldDef.name,'".')+didYouMean(suggestions),argNode))}}})}function KnownArgumentNamesOnDirectivesRule(context){for(var directiveArgs=Object.create(null),schema=context.getSchema(),definedDirectives=schema?schema.getDirectives():specifiedDirectives,_i2=0;_i2<definedDirectives.length;_i2++){var directive=definedDirectives[_i2];directiveArgs[directive.name]=directive.args.map(function(arg){return arg.name})}for(var astDefinitions=context.getDocument().definitions,_i4=0;_i4<astDefinitions.length;_i4++){var def=astDefinitions[_i4];if(def.kind===Kind.DIRECTIVE_DEFINITION){var _def$arguments,argsNodes=null!=(_def$arguments=def.arguments)?_def$arguments:[];directiveArgs[def.name.value]=argsNodes.map(function(arg){return arg.name.value})}}return{Directive:function(directiveNode){var directiveName=directiveNode.name.value,knownArgs=directiveArgs[directiveName];if(directiveNode.arguments&&knownArgs)for(var _i6=0,_directiveNode$argume2=directiveNode.arguments;_i6<_directiveNode$argume2.length;_i6++){var argNode=_directiveNode$argume2[_i6],argName=argNode.name.value;if(-1===knownArgs.indexOf(argName)){var suggestions=suggestionList(argName,knownArgs);context.reportError(new GraphQLError_GraphQLError('Unknown argument "'.concat(argName,'" on directive "@').concat(directiveName,'".')+didYouMean(suggestions),argNode))}}return!1}}}function UniqueArgumentNamesRule(context){var knownArgNames=Object.create(null);return{Field:function(){knownArgNames=Object.create(null)},Directive:function(){knownArgNames=Object.create(null)},Argument:function(node){var argName=node.name.value;return knownArgNames[argName]?context.reportError(new GraphQLError_GraphQLError('There can be only one argument named "'.concat(argName,'".'),[knownArgNames[argName],node.name])):knownArgNames[argName]=node.name,!1}}}function ValuesOfCorrectTypeRule(context){return{ListValue:function(node){if(!isListType(getNullableType(context.getParentInputType())))return isValidValueNode(context,node),!1},ObjectValue:function(node){var type=definition_getNamedType(context.getInputType());if(!isInputObjectType(type))return isValidValueNode(context,node),!1;for(var fieldNodeMap=keyMap(node.fields,function(field){return field.name.value}),_i2=0,_objectValues2=objectValues(type.getFields());_i2<_objectValues2.length;_i2++){var fieldDef=_objectValues2[_i2];if(!fieldNodeMap[fieldDef.name]&&isRequiredInputField(fieldDef)){var typeStr=inspect(fieldDef.type);context.reportError(new GraphQLError_GraphQLError('Field "'.concat(type.name,".").concat(fieldDef.name,'" of required type "').concat(typeStr,'" was not provided.'),node))}}},ObjectField:function(node){var parentType=definition_getNamedType(context.getParentInputType());if(!context.getInputType()&&isInputObjectType(parentType)){var suggestions=suggestionList(node.name.value,Object.keys(parentType.getFields()));context.reportError(new GraphQLError_GraphQLError('Field "'.concat(node.name.value,'" is not defined by type "').concat(parentType.name,'".')+didYouMean(suggestions),node))}},NullValue:function(node){var type=context.getInputType();isNonNullType(type)&&context.reportError(new GraphQLError_GraphQLError('Expected value of type "'.concat(inspect(type),'", found ').concat(print(node),"."),node))},EnumValue:function(node){return isValidValueNode(context,node)},IntValue:function(node){return isValidValueNode(context,node)},FloatValue:function(node){return isValidValueNode(context,node)},StringValue:function(node){return isValidValueNode(context,node)},BooleanValue:function(node){return isValidValueNode(context,node)}}}function isValidValueNode(context,node){var locationType=context.getInputType();if(locationType){var type=definition_getNamedType(locationType);if(!isLeafType(type)){var typeStr=inspect(locationType);context.reportError(new GraphQLError_GraphQLError('Expected value of type "'.concat(typeStr,'", found ').concat(print(node),"."),node));return}try{var parseResult=type.parseLiteral(node,void 0);if(void 0===parseResult){var _typeStr=inspect(locationType);context.reportError(new GraphQLError_GraphQLError('Expected value of type "'.concat(_typeStr,'", found ').concat(print(node),"."),node))}}catch(error){var _typeStr2=inspect(locationType);error instanceof GraphQLError_GraphQLError?context.reportError(error):context.reportError(new GraphQLError_GraphQLError('Expected value of type "'.concat(_typeStr2,'", found ').concat(print(node),"; ")+error.message,node,void 0,void 0,void 0,error))}}}function ProvidedRequiredArgumentsRule_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function ProvidedRequiredArgumentsRule_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ProvidedRequiredArgumentsRule_ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ProvidedRequiredArgumentsRule_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function ProvidedRequiredArgumentsRule(context){return ProvidedRequiredArgumentsRule_objectSpread(ProvidedRequiredArgumentsRule_objectSpread({},ProvidedRequiredArgumentsOnDirectivesRule(context)),{},{Field:{leave:function(fieldNode){var _fieldNode$arguments,fieldDef=context.getFieldDef();if(!fieldDef)return!1;for(var argNodeMap=keyMap(null!=(_fieldNode$arguments=fieldNode.arguments)?_fieldNode$arguments:[],function(arg){return arg.name.value}),_i2=0,_fieldDef$args2=fieldDef.args;_i2<_fieldDef$args2.length;_i2++){var argDef=_fieldDef$args2[_i2];if(!argNodeMap[argDef.name]&&isRequiredArgument(argDef)){var argTypeStr=inspect(argDef.type);context.reportError(new GraphQLError_GraphQLError('Field "'.concat(fieldDef.name,'" argument "').concat(argDef.name,'" of type "').concat(argTypeStr,'" is required, but it was not provided.'),fieldNode))}}}}})}function ProvidedRequiredArgumentsOnDirectivesRule(context){for(var requiredArgsMap=Object.create(null),schema=context.getSchema(),definedDirectives=schema?schema.getDirectives():specifiedDirectives,_i4=0;_i4<definedDirectives.length;_i4++){var directive=definedDirectives[_i4];requiredArgsMap[directive.name]=keyMap(directive.args.filter(isRequiredArgument),function(arg){return arg.name})}for(var astDefinitions=context.getDocument().definitions,_i6=0;_i6<astDefinitions.length;_i6++){var def=astDefinitions[_i6];if(def.kind===Kind.DIRECTIVE_DEFINITION){var _def$arguments,argNodes=null!=(_def$arguments=def.arguments)?_def$arguments:[];requiredArgsMap[def.name.value]=keyMap(argNodes.filter(isRequiredArgumentNode),function(arg){return arg.name.value})}}return{Directive:{leave:function(directiveNode){var directiveName=directiveNode.name.value,requiredArgs=requiredArgsMap[directiveName];if(requiredArgs)for(var _directiveNode$argume,argNodeMap=keyMap(null!=(_directiveNode$argume=directiveNode.arguments)?_directiveNode$argume:[],function(arg){return arg.name.value}),_i8=0,_Object$keys2=Object.keys(requiredArgs);_i8<_Object$keys2.length;_i8++){var argName=_Object$keys2[_i8];if(!argNodeMap[argName]){var argType=requiredArgs[argName].type,argTypeStr=isType(argType)?inspect(argType):print(argType);context.reportError(new GraphQLError_GraphQLError('Directive "@'.concat(directiveName,'" argument "').concat(argName,'" of type "').concat(argTypeStr,'" is required, but it was not provided.'),directiveNode))}}}}}}function isRequiredArgumentNode(arg){return arg.type.kind===Kind.NON_NULL_TYPE&&null==arg.defaultValue}function VariablesInAllowedPositionRule(context){var varDefMap=Object.create(null);return{OperationDefinition:{enter:function(){varDefMap=Object.create(null)},leave:function(operation){for(var usages=context.getRecursiveVariableUsages(operation),_i2=0;_i2<usages.length;_i2++){var _ref2=usages[_i2],node=_ref2.node,type=_ref2.type,defaultValue=_ref2.defaultValue,varName=node.name.value,varDef=varDefMap[varName];if(varDef&&type){var schema,varType,varDefaultValue,locationType,locationDefaultValue,schema1=context.getSchema(),varType1=typeFromAST(schema1,varDef.type);if(varType1&&(schema=schema1,varType=varType1,varDefaultValue=varDef.defaultValue,locationType=type,locationDefaultValue=defaultValue,isNonNullType(locationType)&&!isNonNullType(varType)?!((null!=varDefaultValue&&varDefaultValue.kind!==Kind.NULL||void 0!==locationDefaultValue)&&isTypeSubTypeOf(schema,varType,locationType.ofType)):!isTypeSubTypeOf(schema,varType,locationType))){var varTypeStr=inspect(varType1),typeStr=inspect(type);context.reportError(new GraphQLError_GraphQLError('Variable "$'.concat(varName,'" of type "').concat(varTypeStr,'" used in position expecting type "').concat(typeStr,'".'),[varDef,node]))}}}}},VariableDefinition:function(node){varDefMap[node.variable.name.value]=node}}}function OverlappingFieldsCanBeMergedRule(context){var comparedFragmentPairs=new OverlappingFieldsCanBeMergedRule_PairSet,cachedFieldsAndFragmentNames=new Map;return{SelectionSet:function(selectionSet){for(var conflicts=function(context,cachedFieldsAndFragmentNames,comparedFragmentPairs,parentType,selectionSet){var conflicts=[],_getFieldsAndFragment=getFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,parentType,selectionSet),fieldMap=_getFieldsAndFragment[0],fragmentNames=_getFieldsAndFragment[1];if(function(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,fieldMap){for(var _i5=0,_objectEntries2=objectEntries(fieldMap);_i5<_objectEntries2.length;_i5++){var _ref5=_objectEntries2[_i5],responseName=_ref5[0],fields=_ref5[1];if(fields.length>1)for(var i=0;i<fields.length;i++)for(var j=i+1;j<fields.length;j++){var conflict=findConflict(context,cachedFieldsAndFragmentNames,comparedFragmentPairs,!1,responseName,fields[i],fields[j]);conflict&&conflicts.push(conflict)}}}(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,fieldMap),0!==fragmentNames.length)for(var i=0;i<fragmentNames.length;i++){collectConflictsBetweenFieldsAndFragment(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,!1,fieldMap,fragmentNames[i]);for(var j=i+1;j<fragmentNames.length;j++)collectConflictsBetweenFragments(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,!1,fragmentNames[i],fragmentNames[j])}return conflicts}(context,cachedFieldsAndFragmentNames,comparedFragmentPairs,context.getParentType(),selectionSet),_i2=0;_i2<conflicts.length;_i2++){var _ref3=conflicts[_i2],_ref2$=_ref3[0],responseName=_ref2$[0],reason=_ref2$[1],fields1=_ref3[1],fields2=_ref3[2],reasonMsg=function reasonMessage(reason){return Array.isArray(reason)?reason.map(function(_ref){var responseName=_ref[0],subReason=_ref[1];return'subfields "'.concat(responseName,'" conflict because ')+reasonMessage(subReason)}).join(" and "):reason}(reason);context.reportError(new GraphQLError_GraphQLError('Fields "'.concat(responseName,'" conflict because ').concat(reasonMsg,". Use different aliases on the fields to fetch both if this was intentional."),fields1.concat(fields2)))}}}}function collectConflictsBetweenFieldsAndFragment(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fieldMap,fragmentName){var fragment=context.getFragment(fragmentName);if(fragment){var _getReferencedFieldsA=getReferencedFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,fragment),fieldMap2=_getReferencedFieldsA[0],fragmentNames2=_getReferencedFieldsA[1];if(fieldMap!==fieldMap2){collectConflictsBetween(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fieldMap,fieldMap2);for(var i=0;i<fragmentNames2.length;i++)collectConflictsBetweenFieldsAndFragment(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fieldMap,fragmentNames2[i])}}}function collectConflictsBetweenFragments(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fragmentName1,fragmentName2){if(!(fragmentName1===fragmentName2||comparedFragmentPairs.has(fragmentName1,fragmentName2,areMutuallyExclusive))){comparedFragmentPairs.add(fragmentName1,fragmentName2,areMutuallyExclusive);var fragment1=context.getFragment(fragmentName1),fragment2=context.getFragment(fragmentName2);if(fragment1&&fragment2){var _getReferencedFieldsA2=getReferencedFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,fragment1),fieldMap1=_getReferencedFieldsA2[0],fragmentNames1=_getReferencedFieldsA2[1],_getReferencedFieldsA3=getReferencedFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,fragment2),fieldMap2=_getReferencedFieldsA3[0],fragmentNames2=_getReferencedFieldsA3[1];collectConflictsBetween(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fieldMap1,fieldMap2);for(var j=0;j<fragmentNames2.length;j++)collectConflictsBetweenFragments(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fragmentName1,fragmentNames2[j]);for(var i=0;i<fragmentNames1.length;i++)collectConflictsBetweenFragments(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fragmentNames1[i],fragmentName2)}}}function collectConflictsBetween(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,parentFieldsAreMutuallyExclusive,fieldMap1,fieldMap2){for(var _i7=0,_Object$keys2=Object.keys(fieldMap1);_i7<_Object$keys2.length;_i7++){var responseName=_Object$keys2[_i7],fields2=fieldMap2[responseName];if(fields2)for(var fields1=fieldMap1[responseName],i=0;i<fields1.length;i++)for(var j=0;j<fields2.length;j++){var conflict=findConflict(context,cachedFieldsAndFragmentNames,comparedFragmentPairs,parentFieldsAreMutuallyExclusive,responseName,fields1[i],fields2[j]);conflict&&conflicts.push(conflict)}}}function findConflict(context,cachedFieldsAndFragmentNames,comparedFragmentPairs,parentFieldsAreMutuallyExclusive,responseName,field1,field2){var parentType1=field1[0],node1=field1[1],def1=field1[2],parentType2=field2[0],node2=field2[1],def2=field2[2],areMutuallyExclusive=parentFieldsAreMutuallyExclusive||parentType1!==parentType2&&isObjectType(parentType1)&&isObjectType(parentType2);if(!areMutuallyExclusive){var arguments1,arguments2,_node1$arguments,_node2$arguments,name1=node1.name.value,name2=node2.name.value;if(name1!==name2)return[[responseName,'"'.concat(name1,'" and "').concat(name2,'" are different fields')],[node1],[node2]];if(arguments1=null!=(_node1$arguments=node1.arguments)?_node1$arguments:[],arguments2=null!=(_node2$arguments=node2.arguments)?_node2$arguments:[],!(arguments1.length===arguments2.length&&arguments1.every(function(argument1){var value1,value2,argument2=find(arguments2,function(argument){return argument.name.value===argument1.name.value});return!!argument2&&(value1=argument1.value,value2=argument2.value,print(value1)===print(value2))})))return[[responseName,"they have differing arguments"],[node1],[node2]]}var type1=null==def1?void 0:def1.type,type2=null==def2?void 0:def2.type;if(type1&&type2&&function doTypesConflict(type1,type2){return isListType(type1)?!isListType(type2)||doTypesConflict(type1.ofType,type2.ofType):!!isListType(type2)||(isNonNullType(type1)?!isNonNullType(type2)||doTypesConflict(type1.ofType,type2.ofType):!!isNonNullType(type2)||!!(isLeafType(type1)||isLeafType(type2))&&type1!==type2)}(type1,type2))return[[responseName,'they return conflicting types "'.concat(inspect(type1),'" and "').concat(inspect(type2),'"')],[node1],[node2]];var selectionSet1=node1.selectionSet,selectionSet2=node2.selectionSet;if(selectionSet1&&selectionSet2){var conflicts=function(context,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,parentType1,selectionSet1,parentType2,selectionSet2){var conflicts=[],_getFieldsAndFragment2=getFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,parentType1,selectionSet1),fieldMap1=_getFieldsAndFragment2[0],fragmentNames1=_getFieldsAndFragment2[1],_getFieldsAndFragment3=getFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,parentType2,selectionSet2),fieldMap2=_getFieldsAndFragment3[0],fragmentNames2=_getFieldsAndFragment3[1];if(collectConflictsBetween(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fieldMap1,fieldMap2),0!==fragmentNames2.length)for(var j=0;j<fragmentNames2.length;j++)collectConflictsBetweenFieldsAndFragment(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fieldMap1,fragmentNames2[j]);if(0!==fragmentNames1.length)for(var i=0;i<fragmentNames1.length;i++)collectConflictsBetweenFieldsAndFragment(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fieldMap2,fragmentNames1[i]);for(var _i3=0;_i3<fragmentNames1.length;_i3++)for(var _j=0;_j<fragmentNames2.length;_j++)collectConflictsBetweenFragments(context,conflicts,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,fragmentNames1[_i3],fragmentNames2[_j]);return conflicts}(context,cachedFieldsAndFragmentNames,comparedFragmentPairs,areMutuallyExclusive,definition_getNamedType(type1),selectionSet1,definition_getNamedType(type2),selectionSet2),responseName1=responseName,node11=node1,node21=node2;return conflicts.length>0?[[responseName1,conflicts.map(function(_ref6){return _ref6[0]})],conflicts.reduce(function(allFields,_ref7){var fields1=_ref7[1];return allFields.concat(fields1)},[node11]),conflicts.reduce(function(allFields,_ref8){var fields2=_ref8[2];return allFields.concat(fields2)},[node21])]:void 0}}function getFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,parentType,selectionSet){var cached=cachedFieldsAndFragmentNames.get(selectionSet);if(!cached){var nodeAndDefs=Object.create(null),fragmentNames=Object.create(null);(function _collectFieldsAndFragmentNames(context,parentType,selectionSet,nodeAndDefs,fragmentNames){for(var _i9=0,_selectionSet$selecti2=selectionSet.selections;_i9<_selectionSet$selecti2.length;_i9++){var selection=_selectionSet$selecti2[_i9];switch(selection.kind){case Kind.FIELD:var fieldName=selection.name.value,fieldDef=void 0;(isObjectType(parentType)||isInterfaceType(parentType))&&(fieldDef=parentType.getFields()[fieldName]);var responseName=selection.alias?selection.alias.value:fieldName;nodeAndDefs[responseName]||(nodeAndDefs[responseName]=[]),nodeAndDefs[responseName].push([parentType,selection,fieldDef]);break;case Kind.FRAGMENT_SPREAD:fragmentNames[selection.name.value]=!0;break;case Kind.INLINE_FRAGMENT:var typeCondition=selection.typeCondition,inlineFragmentType=typeCondition?typeFromAST(context.getSchema(),typeCondition):parentType;_collectFieldsAndFragmentNames(context,inlineFragmentType,selection.selectionSet,nodeAndDefs,fragmentNames)}}})(context,parentType,selectionSet,nodeAndDefs,fragmentNames),cached=[nodeAndDefs,Object.keys(fragmentNames)],cachedFieldsAndFragmentNames.set(selectionSet,cached)}return cached}function getReferencedFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,fragment){var cached=cachedFieldsAndFragmentNames.get(fragment.selectionSet);if(cached)return cached;var fragmentType=typeFromAST(context.getSchema(),fragment.typeCondition);return getFieldsAndFragmentNames(context,cachedFieldsAndFragmentNames,fragmentType,fragment.selectionSet)}var OverlappingFieldsCanBeMergedRule_PairSet=function(){function PairSet(){this._data=Object.create(null)}var _proto=PairSet.prototype;return _proto.has=function(a,b,areMutuallyExclusive){var first=this._data[a],result=first&&first[b];return void 0!==result&&(!1!==areMutuallyExclusive||!1===result)},_proto.add=function(a,b,areMutuallyExclusive){this._pairSetAdd(a,b,areMutuallyExclusive),this._pairSetAdd(b,a,areMutuallyExclusive)},_proto._pairSetAdd=function(a,b,areMutuallyExclusive){var map=this._data[a];map||(map=Object.create(null),this._data[a]=map),map[b]=areMutuallyExclusive},PairSet}();function UniqueInputFieldNamesRule(context){var knownNameStack=[],knownNames=Object.create(null);return{ObjectValue:{enter:function(){knownNameStack.push(knownNames),knownNames=Object.create(null)},leave:function(){knownNames=knownNameStack.pop()}},ObjectField:function(node){var fieldName=node.name.value;knownNames[fieldName]?context.reportError(new GraphQLError_GraphQLError('There can be only one input field named "'.concat(fieldName,'".'),[knownNames[fieldName],node.name])):knownNames[fieldName]=node.name}}}function LoneSchemaDefinitionRule(context){var _ref,_ref2,_oldSchema$astNode,oldSchema=context.getSchema(),alreadyDefined=null!=(_ref=null!=(_ref2=null!=(_oldSchema$astNode=null==oldSchema?void 0:oldSchema.astNode)?_oldSchema$astNode:null==oldSchema?void 0:oldSchema.getQueryType())?_ref2:null==oldSchema?void 0:oldSchema.getMutationType())?_ref:null==oldSchema?void 0:oldSchema.getSubscriptionType(),schemaDefinitionsCount=0;return{SchemaDefinition:function(node){alreadyDefined?context.reportError(new GraphQLError_GraphQLError("Cannot define a new schema within a schema extension.",node)):(schemaDefinitionsCount>0&&context.reportError(new GraphQLError_GraphQLError("Must provide only one schema definition.",node)),++schemaDefinitionsCount)}}}function UniqueOperationTypesRule(context){var schema=context.getSchema(),definedOperationTypes=Object.create(null),existingOperationTypes=schema?{query:schema.getQueryType(),mutation:schema.getMutationType(),subscription:schema.getSubscriptionType()}:{};return{SchemaDefinition:checkOperationTypes,SchemaExtension:checkOperationTypes};function checkOperationTypes(node){for(var _node$operationTypes,operationTypesNodes=null!=(_node$operationTypes=node.operationTypes)?_node$operationTypes:[],_i2=0;_i2<operationTypesNodes.length;_i2++){var operationType=operationTypesNodes[_i2],operation=operationType.operation,alreadyDefinedOperationType=definedOperationTypes[operation];existingOperationTypes[operation]?context.reportError(new GraphQLError_GraphQLError("Type for ".concat(operation," already defined in the schema. It cannot be redefined."),operationType)):alreadyDefinedOperationType?context.reportError(new GraphQLError_GraphQLError("There can be only one ".concat(operation," type in schema."),[alreadyDefinedOperationType,operationType])):definedOperationTypes[operation]=operationType}return!1}}function UniqueTypeNamesRule(context){var knownTypeNames=Object.create(null),schema=context.getSchema();return{ScalarTypeDefinition:checkTypeName,ObjectTypeDefinition:checkTypeName,InterfaceTypeDefinition:checkTypeName,UnionTypeDefinition:checkTypeName,EnumTypeDefinition:checkTypeName,InputObjectTypeDefinition:checkTypeName};function checkTypeName(node){var typeName=node.name.value;return null!=schema&&schema.getType(typeName)?void context.reportError(new GraphQLError_GraphQLError('Type "'.concat(typeName,'" already exists in the schema. It cannot also be defined in this type definition.'),node.name)):(knownTypeNames[typeName]?context.reportError(new GraphQLError_GraphQLError('There can be only one type named "'.concat(typeName,'".'),[knownTypeNames[typeName],node.name])):knownTypeNames[typeName]=node.name,!1)}}function UniqueEnumValueNamesRule(context){var schema=context.getSchema(),existingTypeMap=schema?schema.getTypeMap():Object.create(null),knownValueNames=Object.create(null);return{EnumTypeDefinition:checkValueUniqueness,EnumTypeExtension:checkValueUniqueness};function checkValueUniqueness(node){var _node$values,typeName=node.name.value;knownValueNames[typeName]||(knownValueNames[typeName]=Object.create(null));for(var valueNodes=null!=(_node$values=node.values)?_node$values:[],valueNames=knownValueNames[typeName],_i2=0;_i2<valueNodes.length;_i2++){var valueDef=valueNodes[_i2],valueName=valueDef.name.value,existingType=existingTypeMap[typeName];isEnumType(existingType)&&existingType.getValue(valueName)?context.reportError(new GraphQLError_GraphQLError('Enum value "'.concat(typeName,".").concat(valueName,'" already exists in the schema. It cannot also be defined in this type extension.'),valueDef.name)):valueNames[valueName]?context.reportError(new GraphQLError_GraphQLError('Enum value "'.concat(typeName,".").concat(valueName,'" can only be defined once.'),[valueNames[valueName],valueDef.name])):valueNames[valueName]=valueDef.name}return!1}}function UniqueFieldDefinitionNamesRule(context){var schema=context.getSchema(),existingTypeMap=schema?schema.getTypeMap():Object.create(null),knownFieldNames=Object.create(null);return{InputObjectTypeDefinition:checkFieldUniqueness,InputObjectTypeExtension:checkFieldUniqueness,InterfaceTypeDefinition:checkFieldUniqueness,InterfaceTypeExtension:checkFieldUniqueness,ObjectTypeDefinition:checkFieldUniqueness,ObjectTypeExtension:checkFieldUniqueness};function checkFieldUniqueness(node){var _node$fields,typeName=node.name.value;knownFieldNames[typeName]||(knownFieldNames[typeName]=Object.create(null));for(var fieldNodes=null!=(_node$fields=node.fields)?_node$fields:[],fieldNames=knownFieldNames[typeName],_i2=0;_i2<fieldNodes.length;_i2++){var type,fieldName,fieldDef=fieldNodes[_i2],fieldName1=fieldDef.name.value;(type=existingTypeMap[typeName],fieldName=fieldName1,(isObjectType(type)||isInterfaceType(type)||isInputObjectType(type))&&null!=type.getFields()[fieldName])?context.reportError(new GraphQLError_GraphQLError('Field "'.concat(typeName,".").concat(fieldName1,'" already exists in the schema. It cannot also be defined in this type extension.'),fieldDef.name)):fieldNames[fieldName1]?context.reportError(new GraphQLError_GraphQLError('Field "'.concat(typeName,".").concat(fieldName1,'" can only be defined once.'),[fieldNames[fieldName1],fieldDef.name])):fieldNames[fieldName1]=fieldDef.name}return!1}}function UniqueDirectiveNamesRule(context){var knownDirectiveNames=Object.create(null),schema=context.getSchema();return{DirectiveDefinition:function(node){var directiveName=node.name.value;return null!=schema&&schema.getDirective(directiveName)?void context.reportError(new GraphQLError_GraphQLError('Directive "@'.concat(directiveName,'" already exists in the schema. It cannot be redefined.'),node.name)):(knownDirectiveNames[directiveName]?context.reportError(new GraphQLError_GraphQLError('There can be only one directive named "@'.concat(directiveName,'".'),[knownDirectiveNames[directiveName],node.name])):knownDirectiveNames[directiveName]=node.name,!1)}}}function PossibleTypeExtensionsRule_defineProperty(obj,key,value1){return key in obj?Object.defineProperty(obj,key,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value1,obj}function PossibleTypeExtensionsRule(context){for(var schema=context.getSchema(),definedTypes=Object.create(null),_i2=0,_context$getDocument$2=context.getDocument().definitions;_i2<_context$getDocument$2.length;_i2++){var def=_context$getDocument$2[_i2];isTypeDefinitionNode(def)&&(definedTypes[def.name.value]=def)}return{ScalarTypeExtension:checkExtension,ObjectTypeExtension:checkExtension,InterfaceTypeExtension:checkExtension,UnionTypeExtension:checkExtension,EnumTypeExtension:checkExtension,InputObjectTypeExtension:checkExtension};function checkExtension(node){var type,expectedKind,typeName=node.name.value,defNode=definedTypes[typeName],existingType=null==schema?void 0:schema.getType(typeName);if(defNode?expectedKind=defKindToExtKind[defNode.kind]:existingType&&(expectedKind=isScalarType(type=existingType)?Kind.SCALAR_TYPE_EXTENSION:isObjectType(type)?Kind.OBJECT_TYPE_EXTENSION:isInterfaceType(type)?Kind.INTERFACE_TYPE_EXTENSION:isUnionType(type)?Kind.UNION_TYPE_EXTENSION:isEnumType(type)?Kind.ENUM_TYPE_EXTENSION:isInputObjectType(type)?Kind.INPUT_OBJECT_TYPE_EXTENSION:void invariant(0,"Unexpected type: "+inspect(type))),expectedKind){if(expectedKind!==node.kind){var kindStr=function(kind){switch(kind){case Kind.SCALAR_TYPE_EXTENSION:return"scalar";case Kind.OBJECT_TYPE_EXTENSION:return"object";case Kind.INTERFACE_TYPE_EXTENSION:return"interface";case Kind.UNION_TYPE_EXTENSION:return"union";case Kind.ENUM_TYPE_EXTENSION:return"enum";case Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object"}invariant(0,"Unexpected kind: "+inspect(kind))}(node.kind);context.reportError(new GraphQLError_GraphQLError("Cannot extend non-".concat(kindStr,' type "').concat(typeName,'".'),defNode?[defNode,node]:node))}}else{var allTypeNames=Object.keys(definedTypes);schema&&(allTypeNames=allTypeNames.concat(Object.keys(schema.getTypeMap())));var suggestedTypes=suggestionList(typeName,allTypeNames);context.reportError(new GraphQLError_GraphQLError('Cannot extend type "'.concat(typeName,'" because it is not defined.')+didYouMean(suggestedTypes),node.name))}}}var defKindToExtKind=(PossibleTypeExtensionsRule_defineProperty(_defKindToExtKind={},Kind.SCALAR_TYPE_DEFINITION,Kind.SCALAR_TYPE_EXTENSION),PossibleTypeExtensionsRule_defineProperty(_defKindToExtKind,Kind.OBJECT_TYPE_DEFINITION,Kind.OBJECT_TYPE_EXTENSION),PossibleTypeExtensionsRule_defineProperty(_defKindToExtKind,Kind.INTERFACE_TYPE_DEFINITION,Kind.INTERFACE_TYPE_EXTENSION),PossibleTypeExtensionsRule_defineProperty(_defKindToExtKind,Kind.UNION_TYPE_DEFINITION,Kind.UNION_TYPE_EXTENSION),PossibleTypeExtensionsRule_defineProperty(_defKindToExtKind,Kind.ENUM_TYPE_DEFINITION,Kind.ENUM_TYPE_EXTENSION),PossibleTypeExtensionsRule_defineProperty(_defKindToExtKind,Kind.INPUT_OBJECT_TYPE_DEFINITION,Kind.INPUT_OBJECT_TYPE_EXTENSION),_defKindToExtKind),specifiedRules=Object.freeze([ExecutableDefinitionsRule,UniqueOperationNamesRule,LoneAnonymousOperationRule,SingleFieldSubscriptionsRule,KnownTypeNamesRule,FragmentsOnCompositeTypesRule,VariablesAreInputTypesRule,ScalarLeafsRule,FieldsOnCorrectTypeRule,UniqueFragmentNamesRule,KnownFragmentNamesRule,NoUnusedFragmentsRule,PossibleFragmentSpreadsRule,NoFragmentCyclesRule,UniqueVariableNamesRule,NoUndefinedVariablesRule,NoUnusedVariablesRule,KnownDirectivesRule,UniqueDirectivesPerLocationRule,KnownArgumentNamesRule,UniqueArgumentNamesRule,ValuesOfCorrectTypeRule,ProvidedRequiredArgumentsRule,VariablesInAllowedPositionRule,OverlappingFieldsCanBeMergedRule,UniqueInputFieldNamesRule]),specifiedSDLRules=Object.freeze([LoneSchemaDefinitionRule,UniqueOperationTypesRule,UniqueTypeNamesRule,UniqueEnumValueNamesRule,UniqueFieldDefinitionNamesRule,UniqueDirectiveNamesRule,KnownTypeNamesRule,KnownDirectivesRule,UniqueDirectivesPerLocationRule,PossibleTypeExtensionsRule,KnownArgumentNamesOnDirectivesRule,UniqueArgumentNamesRule,UniqueInputFieldNamesRule,ProvidedRequiredArgumentsOnDirectivesRule]);function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,subClass.__proto__=superClass}var ValidationContext_ASTValidationContext=function(){function ASTValidationContext(ast,onError){this._ast=ast,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=onError}var _proto=ASTValidationContext.prototype;return _proto.reportError=function(error){this._onError(error)},_proto.getDocument=function(){return this._ast},_proto.getFragment=function(name){var fragments=this._fragments;return fragments||(this._fragments=fragments=this.getDocument().definitions.reduce(function(frags,statement){return statement.kind===Kind.FRAGMENT_DEFINITION&&(frags[statement.name.value]=statement),frags},Object.create(null))),fragments[name]},_proto.getFragmentSpreads=function(node){var spreads=this._fragmentSpreads.get(node);if(!spreads){spreads=[];for(var setsToVisit=[node];0!==setsToVisit.length;)for(var set=setsToVisit.pop(),_i2=0,_set$selections2=set.selections;_i2<_set$selections2.length;_i2++){var selection=_set$selections2[_i2];selection.kind===Kind.FRAGMENT_SPREAD?spreads.push(selection):selection.selectionSet&&setsToVisit.push(selection.selectionSet)}this._fragmentSpreads.set(node,spreads)}return spreads},_proto.getRecursivelyReferencedFragments=function(operation){var fragments=this._recursivelyReferencedFragments.get(operation);if(!fragments){fragments=[];for(var collectedNames=Object.create(null),nodesToVisit=[operation.selectionSet];0!==nodesToVisit.length;)for(var node=nodesToVisit.pop(),_i4=0,_this$getFragmentSpre2=this.getFragmentSpreads(node);_i4<_this$getFragmentSpre2.length;_i4++){var fragName=_this$getFragmentSpre2[_i4].name.value;if(!0!==collectedNames[fragName]){collectedNames[fragName]=!0;var fragment=this.getFragment(fragName);fragment&&(fragments.push(fragment),nodesToVisit.push(fragment.selectionSet))}}this._recursivelyReferencedFragments.set(operation,fragments)}return fragments},ASTValidationContext}(),ValidationContext_SDLValidationContext=function(_ASTValidationContext){function SDLValidationContext(ast,schema,onError){var _this;return(_this=_ASTValidationContext.call(this,ast,onError)||this)._schema=schema,_this}return _inheritsLoose(SDLValidationContext,_ASTValidationContext),SDLValidationContext.prototype.getSchema=function(){return this._schema},SDLValidationContext}(ValidationContext_ASTValidationContext),ValidationContext_ValidationContext=function(_ASTValidationContext2){function ValidationContext(schema,ast,typeInfo,onError){var _this2;return(_this2=_ASTValidationContext2.call(this,ast,onError)||this)._schema=schema,_this2._typeInfo=typeInfo,_this2._variableUsages=new Map,_this2._recursiveVariableUsages=new Map,_this2}_inheritsLoose(ValidationContext,_ASTValidationContext2);var _proto3=ValidationContext.prototype;return _proto3.getSchema=function(){return this._schema},_proto3.getVariableUsages=function(node){var usages=this._variableUsages.get(node);if(!usages){var newUsages=[],typeInfo=new TypeInfo_TypeInfo(this._schema);visit(node,visitWithTypeInfo(typeInfo,{VariableDefinition:function(){return!1},Variable:function(variable){newUsages.push({node:variable,type:typeInfo.getInputType(),defaultValue:typeInfo.getDefaultValue()})}})),usages=newUsages,this._variableUsages.set(node,usages)}return usages},_proto3.getRecursiveVariableUsages=function(operation){var usages=this._recursiveVariableUsages.get(operation);if(!usages){usages=this.getVariableUsages(operation);for(var _i6=0,_this$getRecursivelyR2=this.getRecursivelyReferencedFragments(operation);_i6<_this$getRecursivelyR2.length;_i6++){var frag=_this$getRecursivelyR2[_i6];usages=usages.concat(this.getVariableUsages(frag))}this._recursiveVariableUsages.set(operation,usages)}return usages},_proto3.getType=function(){return this._typeInfo.getType()},_proto3.getParentType=function(){return this._typeInfo.getParentType()},_proto3.getInputType=function(){return this._typeInfo.getInputType()},_proto3.getParentInputType=function(){return this._typeInfo.getParentInputType()},_proto3.getFieldDef=function(){return this._typeInfo.getFieldDef()},_proto3.getDirective=function(){return this._typeInfo.getDirective()},_proto3.getArgument=function(){return this._typeInfo.getArgument()},_proto3.getEnumValue=function(){return this._typeInfo.getEnumValue()},ValidationContext}(ValidationContext_ASTValidationContext);function validate(schema,documentAST){var rules=arguments.length>2&&void 0!==arguments[2]?arguments[2]:specifiedRules,typeInfo=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new TypeInfo_TypeInfo(schema),options=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{maxErrors:void 0};documentAST||devAssert(0,"Must provide document."),assertValidSchema(schema);var abortObj=Object.freeze({}),errors=[],context=new ValidationContext_ValidationContext(schema,documentAST,typeInfo,function(error){if(null!=options.maxErrors&&errors.length>=options.maxErrors)throw errors.push(new GraphQLError_GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),abortObj;errors.push(error)}),visitor=visitInParallel(rules.map(function(rule){return rule(context)}));try{visit(documentAST,visitWithTypeInfo(typeInfo,visitor))}catch(e){if(e!==abortObj)throw e}return errors}function validateSDL(documentAST,schemaToExtend){var rules=arguments.length>2&&void 0!==arguments[2]?arguments[2]:specifiedSDLRules,errors=[],context=new ValidationContext_SDLValidationContext(documentAST,schemaToExtend,function(error){errors.push(error)});return visit(documentAST,visitInParallel(rules.map(function(rule){return rule(context)}))),errors}function addPath(prev,key,typename){return{prev:prev,key:key,typename:typename}}function pathToArray(path){for(var flattened=[],curr=path;curr;)flattened.push(curr.key),curr=curr.prev;return flattened.reverse()}function getOperationRootType(schema,operation){if("query"===operation.operation){var queryType=schema.getQueryType();if(!queryType)throw new GraphQLError_GraphQLError("Schema does not define the required query root type.",operation);return queryType}if("mutation"===operation.operation){var mutationType=schema.getMutationType();if(!mutationType)throw new GraphQLError_GraphQLError("Schema is not configured for mutations.",operation);return mutationType}if("subscription"===operation.operation){var subscriptionType=schema.getSubscriptionType();if(!subscriptionType)throw new GraphQLError_GraphQLError("Schema is not configured for subscriptions.",operation);return subscriptionType}throw new GraphQLError_GraphQLError("Can only have query, mutation and subscription operations.",operation)}function printPathArray(path){return path.map(function(key){return"number"==typeof key?"["+key.toString()+"]":"."+key}).join("")}function valueFromAST(valueNode,type,variables){if(valueNode){if(valueNode.kind===Kind.VARIABLE){var result,variableName=valueNode.name.value;if(null==variables||void 0===variables[variableName])return;var variableValue=variables[variableName];if(null===variableValue&&isNonNullType(type))return;return variableValue}if(isNonNullType(type)){if(valueNode.kind===Kind.NULL)return;return valueFromAST(valueNode,type.ofType,variables)}if(valueNode.kind===Kind.NULL)return null;if(isListType(type)){var itemType=type.ofType;if(valueNode.kind===Kind.LIST){for(var coercedValues=[],_i2=0,_valueNode$values2=valueNode.values;_i2<_valueNode$values2.length;_i2++){var itemNode=_valueNode$values2[_i2];if(isMissingVariable(itemNode,variables)){if(isNonNullType(itemType))return;coercedValues.push(null)}else{var itemValue=valueFromAST(itemNode,itemType,variables);if(void 0===itemValue)return;coercedValues.push(itemValue)}}return coercedValues}var coercedValue=valueFromAST(valueNode,itemType,variables);if(void 0===coercedValue)return;return[coercedValue]}if(isInputObjectType(type)){if(valueNode.kind!==Kind.OBJECT)return;for(var coercedObj=Object.create(null),fieldNodes=keyMap(valueNode.fields,function(field){return field.name.value}),_i4=0,_objectValues2=objectValues(type.getFields());_i4<_objectValues2.length;_i4++){var field=_objectValues2[_i4],fieldNode=fieldNodes[field.name];if(!fieldNode||isMissingVariable(fieldNode.value,variables)){if(void 0!==field.defaultValue)coercedObj[field.name]=field.defaultValue;else if(isNonNullType(field.type))return;continue}var fieldValue=valueFromAST(fieldNode.value,field.type,variables);if(void 0===fieldValue)return;coercedObj[field.name]=fieldValue}return coercedObj}if(isLeafType(type)){try{result=type.parseLiteral(valueNode,variables)}catch(_error){return}if(void 0===result)return;return result}invariant(0,"Unexpected input type: "+inspect(type))}}function isMissingVariable(valueNode,variables){return valueNode.kind===Kind.VARIABLE&&(null==variables||void 0===variables[valueNode.name.value])}function coerceInputValue(inputValue,type){var onError=arguments.length>2&&void 0!==arguments[2]?arguments[2]:defaultOnError;return function coerceInputValueImpl(inputValue,type,onError,path){if(isNonNullType(type))return null!=inputValue?coerceInputValueImpl(inputValue,type.ofType,onError,path):void onError(pathToArray(path),inputValue,new GraphQLError_GraphQLError('Expected non-nullable type "'.concat(inspect(type),'" not to be null.')));if(null==inputValue)return null;if(isListType(type)){var parseResult,itemType=type.ofType,coercedList=safeArrayFrom(inputValue,function(itemValue,index){return coerceInputValueImpl(itemValue,itemType,onError,addPath(path,index,void 0))});return null!=coercedList?coercedList:[coerceInputValueImpl(inputValue,itemType,onError,path)]}if(isInputObjectType(type)){if(!isObjectLike(inputValue))return void onError(pathToArray(path),inputValue,new GraphQLError_GraphQLError('Expected type "'.concat(type.name,'" to be an object.')));for(var coercedValue={},fieldDefs=type.getFields(),_i2=0,_objectValues2=objectValues(fieldDefs);_i2<_objectValues2.length;_i2++){var field=_objectValues2[_i2],fieldValue=inputValue[field.name];if(void 0===fieldValue){if(void 0!==field.defaultValue)coercedValue[field.name]=field.defaultValue;else if(isNonNullType(field.type)){var typeStr=inspect(field.type);onError(pathToArray(path),inputValue,new GraphQLError_GraphQLError('Field "'.concat(field.name,'" of required type "').concat(typeStr,'" was not provided.')))}continue}coercedValue[field.name]=coerceInputValueImpl(fieldValue,field.type,onError,addPath(path,field.name,type.name))}for(var _i4=0,_Object$keys2=Object.keys(inputValue);_i4<_Object$keys2.length;_i4++){var fieldName=_Object$keys2[_i4];if(!fieldDefs[fieldName]){var suggestions=suggestionList(fieldName,Object.keys(type.getFields()));onError(pathToArray(path),inputValue,new GraphQLError_GraphQLError('Field "'.concat(fieldName,'" is not defined by type "').concat(type.name,'".')+didYouMean(suggestions)))}}return coercedValue}if(isLeafType(type)){try{parseResult=type.parseValue(inputValue)}catch(error){error instanceof GraphQLError_GraphQLError?onError(pathToArray(path),inputValue,error):onError(pathToArray(path),inputValue,new GraphQLError_GraphQLError('Expected type "'.concat(type.name,'". ')+error.message,void 0,void 0,void 0,void 0,error));return}return void 0===parseResult&&onError(pathToArray(path),inputValue,new GraphQLError_GraphQLError('Expected type "'.concat(type.name,'".'))),parseResult}invariant(0,"Unexpected input type: "+inspect(type))}(inputValue,type,onError)}function defaultOnError(path,invalidValue,error){var errorPrefix="Invalid value "+inspect(invalidValue);throw path.length>0&&(errorPrefix+=' at "value'.concat(printPathArray(path),'"')),error.message=errorPrefix+": "+error.message,error}function getArgumentValues(def,node,variableValues){for(var _node$arguments,coercedValues={},argNodeMap=keyMap(null!=(_node$arguments=node.arguments)?_node$arguments:[],function(arg){return arg.name.value}),_i4=0,_def$args2=def.args;_i4<_def$args2.length;_i4++){var argDef=_def$args2[_i4],name=argDef.name,argType=argDef.type,argumentNode=argNodeMap[name];if(!argumentNode){if(void 0!==argDef.defaultValue)coercedValues[name]=argDef.defaultValue;else if(isNonNullType(argType))throw new GraphQLError_GraphQLError('Argument "'.concat(name,'" of required type "').concat(inspect(argType),'" ')+"was not provided.",node);continue}var valueNode=argumentNode.value,isNull=valueNode.kind===Kind.NULL;if(valueNode.kind===Kind.VARIABLE){var variableName=valueNode.name.value;if(null==variableValues||!values_hasOwnProperty(variableValues,variableName)){if(void 0!==argDef.defaultValue)coercedValues[name]=argDef.defaultValue;else if(isNonNullType(argType))throw new GraphQLError_GraphQLError('Argument "'.concat(name,'" of required type "').concat(inspect(argType),'" ')+'was provided the variable "$'.concat(variableName,'" which was not provided a runtime value.'),valueNode);continue}isNull=null==variableValues[variableName]}if(isNull&&isNonNullType(argType))throw new GraphQLError_GraphQLError('Argument "'.concat(name,'" of non-null type "').concat(inspect(argType),'" ')+"must not be null.",valueNode);var coercedValue=valueFromAST(valueNode,argType,variableValues);if(void 0===coercedValue)throw new GraphQLError_GraphQLError('Argument "'.concat(name,'" has invalid value ').concat(print(valueNode),"."),valueNode);coercedValues[name]=coercedValue}return coercedValues}function getDirectiveValues(directiveDef,node,variableValues){var directiveNode=node.directives&&find(node.directives,function(directive){return directive.name.value===directiveDef.name});if(directiveNode)return getArgumentValues(directiveDef,directiveNode,variableValues)}function values_hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}function execute(argsOrSchema,document1,rootValue,contextValue,variableValues,operationName,fieldResolver,typeResolver){return 1===arguments.length?executeImpl(argsOrSchema):executeImpl({schema:argsOrSchema,document:document1,rootValue:rootValue,contextValue:contextValue,variableValues:variableValues,operationName:operationName,fieldResolver:fieldResolver,typeResolver:typeResolver})}function executeSync(args){var result=executeImpl(args);if(isPromise(result))throw Error("GraphQL execution failed to complete synchronously.");return result}function executeImpl(args){var schema=args.schema,document1=args.document,rootValue=args.rootValue,contextValue=args.contextValue,variableValues=args.variableValues,operationName=args.operationName,fieldResolver=args.fieldResolver,typeResolver=args.typeResolver;assertValidExecutionArguments(schema,document1,variableValues);var exeContext=buildExecutionContext(schema,document1,rootValue,contextValue,variableValues,operationName,fieldResolver,typeResolver);if(Array.isArray(exeContext))return{errors:exeContext};var data=function(exeContext,operation,rootValue){var type=getOperationRootType(exeContext.schema,operation),fields=collectFields(exeContext,type,operation.selectionSet,Object.create(null),Object.create(null)),path=void 0;try{var exeContext1,parentType,sourceValue,path1,fields1,values,callback,initialValue,result="mutation"===operation.operation?(exeContext1=exeContext,parentType=type,sourceValue=rootValue,path1=path,fields1=fields,values=Object.keys(fields1),callback=function(results,responseName){var fieldNodes=fields1[responseName],fieldPath=addPath(path1,responseName,parentType.name),result=resolveField(exeContext1,parentType,sourceValue,fieldNodes,fieldPath);return void 0===result?results:isPromise(result)?result.then(function(resolvedResult){return results[responseName]=resolvedResult,results}):(results[responseName]=result,results)},initialValue=Object.create(null),values.reduce(function(previous,value1){return isPromise(previous)?previous.then(function(resolved){return callback(resolved,value1)}):callback(previous,value1)},initialValue)):executeFields(exeContext,type,rootValue,path,fields);if(isPromise(result))return result.then(void 0,function(error){return exeContext.errors.push(error),Promise.resolve(null)});return result}catch(error){return exeContext.errors.push(error),null}}(exeContext,exeContext.operation,rootValue);return function buildResponse(exeContext,data){return isPromise(data)?data.then(function(resolved){return buildResponse(exeContext,resolved)}):0===exeContext.errors.length?{data:data}:{errors:exeContext.errors,data:data}}(exeContext,data)}function assertValidExecutionArguments(schema,document1,rawVariableValues){document1||devAssert(0,"Must provide document."),assertValidSchema(schema),null==rawVariableValues||isObjectLike(rawVariableValues)||devAssert(0,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function buildExecutionContext(schema,document1,rootValue,contextValue,rawVariableValues,operationName,fieldResolver,typeResolver){for(var _definition$name,_operation$variableDe,operation,fragments=Object.create(null),_i2=0,_document$definitions2=document1.definitions;_i2<_document$definitions2.length;_i2++){var definition=_document$definitions2[_i2];switch(definition.kind){case Kind.OPERATION_DEFINITION:if(null==operationName){if(void 0!==operation)return[new GraphQLError_GraphQLError("Must provide operation name if query contains multiple operations.")];operation=definition}else(null==(_definition$name=definition.name)?void 0:_definition$name.value)===operationName&&(operation=definition);break;case Kind.FRAGMENT_DEFINITION:fragments[definition.name.value]=definition}}if(!operation)return null!=operationName?[new GraphQLError_GraphQLError('Unknown operation named "'.concat(operationName,'".'))]:[new GraphQLError_GraphQLError("Must provide an operation.")];var coercedVariableValues=function(schema,varDefNodes,inputs,options){var errors=[],maxErrors=null==options?void 0:options.maxErrors;try{var coerced=function(schema,varDefNodes,inputs,onError){for(var coercedValues={},_i2=0;_i2<varDefNodes.length;_i2++)if("continue"===function(_i2){var varDefNode=varDefNodes[_i2],varName=varDefNode.variable.name.value,varType=typeFromAST(schema,varDefNode.type);if(!isInputType(varType)){var varTypeStr=print(varDefNode.type);return onError(new GraphQLError_GraphQLError('Variable "$'.concat(varName,'" expected value of type "').concat(varTypeStr,'" which cannot be used as an input type.'),varDefNode.type)),"continue"}if(!values_hasOwnProperty(inputs,varName)){if(varDefNode.defaultValue)coercedValues[varName]=valueFromAST(varDefNode.defaultValue,varType);else if(isNonNullType(varType)){var _varTypeStr=inspect(varType);onError(new GraphQLError_GraphQLError('Variable "$'.concat(varName,'" of required type "').concat(_varTypeStr,'" was not provided.'),varDefNode))}return"continue"}var value1=inputs[varName];if(null===value1&&isNonNullType(varType)){var _varTypeStr2=inspect(varType);return onError(new GraphQLError_GraphQLError('Variable "$'.concat(varName,'" of non-null type "').concat(_varTypeStr2,'" must not be null.'),varDefNode)),"continue"}coercedValues[varName]=coerceInputValue(value1,varType,function(path,invalidValue,error){var prefix='Variable "$'.concat(varName,'" got invalid value ')+inspect(invalidValue);path.length>0&&(prefix+=' at "'.concat(varName).concat(printPathArray(path),'"')),onError(new GraphQLError_GraphQLError(prefix+"; "+error.message,varDefNode,void 0,void 0,void 0,error.originalError))})}(_i2))continue;return coercedValues}(schema,varDefNodes,inputs,function(error){if(null!=maxErrors&&errors.length>=maxErrors)throw new GraphQLError_GraphQLError("Too many errors processing variables, error limit reached. Execution aborted.");errors.push(error)});if(0===errors.length)return{coerced:coerced}}catch(error){errors.push(error)}return{errors:errors}}(schema,null!=(_operation$variableDe=operation.variableDefinitions)?_operation$variableDe:[],null!=rawVariableValues?rawVariableValues:{},{maxErrors:50});return coercedVariableValues.errors?coercedVariableValues.errors:{schema:schema,fragments:fragments,rootValue:rootValue,contextValue:contextValue,operation:operation,variableValues:coercedVariableValues.coerced,fieldResolver:null!=fieldResolver?fieldResolver:execute_defaultFieldResolver,typeResolver:null!=typeResolver?typeResolver:execute_defaultTypeResolver,errors:[]}}function executeFields(exeContext,parentType,sourceValue,path,fields){for(var keys,results=Object.create(null),containsPromise=!1,_i4=0,_Object$keys2=Object.keys(fields);_i4<_Object$keys2.length;_i4++){var responseName=_Object$keys2[_i4],fieldNodes=fields[responseName],fieldPath=addPath(path,responseName,parentType.name),result=resolveField(exeContext,parentType,sourceValue,fieldNodes,fieldPath);void 0!==result&&(results[responseName]=result,isPromise(result)&&(containsPromise=!0))}return containsPromise?Promise.all((keys=Object.keys(results)).map(function(name){return results[name]})).then(function(values){return values.reduce(function(resolvedObject,value1,i){return resolvedObject[keys[i]]=value1,resolvedObject},Object.create(null))}):results}function collectFields(exeContext,runtimeType,selectionSet,fields,visitedFragmentNames){for(var _i6=0,_selectionSet$selecti2=selectionSet.selections;_i6<_selectionSet$selecti2.length;_i6++){var selection=_selectionSet$selecti2[_i6];switch(selection.kind){case Kind.FIELD:if(!shouldIncludeNode(exeContext,selection))continue;var node,name=(node=selection).alias?node.alias.value:node.name.value;fields[name]||(fields[name]=[]),fields[name].push(selection);break;case Kind.INLINE_FRAGMENT:if(!shouldIncludeNode(exeContext,selection)||!doesFragmentConditionMatch(exeContext,selection,runtimeType))continue;collectFields(exeContext,runtimeType,selection.selectionSet,fields,visitedFragmentNames);break;case Kind.FRAGMENT_SPREAD:var fragName=selection.name.value;if(visitedFragmentNames[fragName]||!shouldIncludeNode(exeContext,selection))continue;visitedFragmentNames[fragName]=!0;var fragment=exeContext.fragments[fragName];if(!fragment||!doesFragmentConditionMatch(exeContext,fragment,runtimeType))continue;collectFields(exeContext,runtimeType,fragment.selectionSet,fields,visitedFragmentNames)}}return fields}function shouldIncludeNode(exeContext,node){var skip=getDirectiveValues(GraphQLSkipDirective,node,exeContext.variableValues);if((null==skip?void 0:skip.if)===!0)return!1;var include=getDirectiveValues(GraphQLIncludeDirective,node,exeContext.variableValues);return(null==include?void 0:include.if)!==!1}function doesFragmentConditionMatch(exeContext,fragment,type){var typeConditionNode=fragment.typeCondition;if(!typeConditionNode)return!0;var conditionalType=typeFromAST(exeContext.schema,typeConditionNode);return conditionalType===type||!!isAbstractType(conditionalType)&&exeContext.schema.isSubType(conditionalType,type)}function resolveField(exeContext,parentType,source,fieldNodes,path){var fieldName=fieldNodes[0].name.value,fieldDef=execute_getFieldDef(exeContext.schema,parentType,fieldName);if(fieldDef){var returnType=fieldDef.type,resolveFn=null!=(_fieldDef$resolve=fieldDef.resolve)?_fieldDef$resolve:exeContext.fieldResolver,info=buildResolveInfo(exeContext,fieldDef,fieldNodes,parentType,path);try{var _fieldDef$resolve,completed,args=getArgumentValues(fieldDef,fieldNodes[0],exeContext.variableValues),_contextValue=exeContext.contextValue,result=resolveFn(source,args,_contextValue,info);if(completed=isPromise(result)?result.then(function(resolved){return completeValue(exeContext,returnType,fieldNodes,info,path,resolved)}):completeValue(exeContext,returnType,fieldNodes,info,path,result),isPromise(completed))return completed.then(void 0,function(rawError){var error=locatedError(rawError,fieldNodes,pathToArray(path));return handleFieldError(error,returnType,exeContext)});return completed}catch(rawError){return handleFieldError(locatedError(rawError,fieldNodes,pathToArray(path)),returnType,exeContext)}}}function buildResolveInfo(exeContext,fieldDef,fieldNodes,parentType,path){return{fieldName:fieldDef.name,fieldNodes:fieldNodes,returnType:fieldDef.type,parentType:parentType,path:path,schema:exeContext.schema,fragments:exeContext.fragments,rootValue:exeContext.rootValue,operation:exeContext.operation,variableValues:exeContext.variableValues}}function handleFieldError(error,returnType,exeContext){if(isNonNullType(returnType))throw error;return exeContext.errors.push(error),null}function completeValue(exeContext,returnType,fieldNodes,info,path,result){if(result instanceof Error)throw result;if(isNonNullType(returnType)){var exeContext1,returnType1,fieldNodes1,info1,path1,result1,_returnType$resolveTy,runtimeType,completed=completeValue(exeContext,returnType.ofType,fieldNodes,info,path,result);if(null===completed)throw Error("Cannot return null for non-nullable field ".concat(info.parentType.name,".").concat(info.fieldName,"."));return completed}return null==result?null:isListType(returnType)?function(exeContext,returnType,fieldNodes,info,path,result){var itemType=returnType.ofType,containsPromise=!1,completedResults=safeArrayFrom(result,function(item,index){var completedItem,itemPath=addPath(path,index,void 0);try{if(completedItem=isPromise(item)?item.then(function(resolved){return completeValue(exeContext,itemType,fieldNodes,info,itemPath,resolved)}):completeValue(exeContext,itemType,fieldNodes,info,itemPath,item),isPromise(completedItem))return containsPromise=!0,completedItem.then(void 0,function(rawError){var error=locatedError(rawError,fieldNodes,pathToArray(itemPath));return handleFieldError(error,itemType,exeContext)});return completedItem}catch(rawError){return handleFieldError(locatedError(rawError,fieldNodes,pathToArray(itemPath)),itemType,exeContext)}});if(null==completedResults)throw new GraphQLError_GraphQLError('Expected Iterable, but did not find one for field "'.concat(info.parentType.name,".").concat(info.fieldName,'".'));return containsPromise?Promise.all(completedResults):completedResults}(exeContext,returnType,fieldNodes,info,path,result):isLeafType(returnType)?function(returnType,result){var serializedResult=returnType.serialize(result);if(void 0===serializedResult)throw Error('Expected a value of type "'.concat(inspect(returnType),'" but ')+"received: ".concat(inspect(result)));return serializedResult}(returnType,result):isAbstractType(returnType)?(exeContext1=exeContext,returnType1=returnType,fieldNodes1=fieldNodes,info1=info,path1=path,result1=result,isPromise(runtimeType=(null!=(_returnType$resolveTy=returnType1.resolveType)?_returnType$resolveTy:exeContext1.typeResolver)(result1,exeContext1.contextValue,info1,returnType1))?runtimeType.then(function(resolvedRuntimeType){return completeObjectValue(exeContext1,ensureValidRuntimeType(resolvedRuntimeType,exeContext1,returnType1,fieldNodes1,info1,result1),fieldNodes1,info1,path1,result1)}):completeObjectValue(exeContext1,ensureValidRuntimeType(runtimeType,exeContext1,returnType1,fieldNodes1,info1,result1),fieldNodes1,info1,path1,result1)):isObjectType(returnType)?completeObjectValue(exeContext,returnType,fieldNodes,info,path,result):void invariant(0,"Cannot complete value of unexpected output type: "+inspect(returnType))}function ensureValidRuntimeType(runtimeTypeOrName,exeContext,returnType,fieldNodes,info,result){if(null==runtimeTypeOrName)throw new GraphQLError_GraphQLError('Abstract type "'.concat(returnType.name,'" must resolve to an Object type at runtime for field "').concat(info.parentType.name,".").concat(info.fieldName,'". Either the "').concat(returnType.name,'" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.'),fieldNodes);var runtimeTypeName=isNamedType(runtimeTypeOrName)?runtimeTypeOrName.name:runtimeTypeOrName;if("string"!=typeof runtimeTypeName)throw new GraphQLError_GraphQLError('Abstract type "'.concat(returnType.name,'" must resolve to an Object type at runtime for field "').concat(info.parentType.name,".").concat(info.fieldName,'" with ')+"value ".concat(inspect(result),', received "').concat(inspect(runtimeTypeOrName),'".'));var runtimeType=exeContext.schema.getType(runtimeTypeName);if(null==runtimeType)throw new GraphQLError_GraphQLError('Abstract type "'.concat(returnType.name,'" was resolve to a type "').concat(runtimeTypeName,'" that does not exist inside schema.'),fieldNodes);if(!isObjectType(runtimeType))throw new GraphQLError_GraphQLError('Abstract type "'.concat(returnType.name,'" was resolve to a non-object type "').concat(runtimeTypeName,'".'),fieldNodes);if(!exeContext.schema.isSubType(returnType,runtimeType))throw new GraphQLError_GraphQLError('Runtime Object type "'.concat(runtimeType.name,'" is not a possible type for "').concat(returnType.name,'".'),fieldNodes);return runtimeType}function completeObjectValue(exeContext,returnType,fieldNodes,info,path,result){if(returnType.isTypeOf){var isTypeOf=returnType.isTypeOf(result,exeContext.contextValue,info);if(isPromise(isTypeOf))return isTypeOf.then(function(resolvedIsTypeOf){if(!resolvedIsTypeOf)throw invalidReturnTypeError(returnType,result,fieldNodes);return collectAndExecuteSubfields(exeContext,returnType,fieldNodes,path,result)});if(!isTypeOf)throw invalidReturnTypeError(returnType,result,fieldNodes)}return collectAndExecuteSubfields(exeContext,returnType,fieldNodes,path,result)}function invalidReturnTypeError(returnType,result,fieldNodes){return new GraphQLError_GraphQLError('Expected value of type "'.concat(returnType.name,'" but got: ').concat(inspect(result),"."),fieldNodes)}function collectAndExecuteSubfields(exeContext,returnType,fieldNodes,path,result){var subFieldNodes=collectSubfields(exeContext,returnType,fieldNodes);return executeFields(exeContext,returnType,result,path,subFieldNodes)}var collectSubfields=(fn=function(exeContext,returnType,fieldNodes){for(var subFieldNodes=Object.create(null),visitedFragmentNames=Object.create(null),_i8=0;_i8<fieldNodes.length;_i8++){var node=fieldNodes[_i8];node.selectionSet&&(subFieldNodes=collectFields(exeContext,returnType,node.selectionSet,subFieldNodes,visitedFragmentNames))}return subFieldNodes},function(a1,a2,a3){cache0||(cache0=new WeakMap);var cache2,cache1=cache0.get(a1);if(cache1){if(cache2=cache1.get(a2)){var cachedValue=cache2.get(a3);if(void 0!==cachedValue)return cachedValue}}else cache1=new WeakMap,cache0.set(a1,cache1);cache2||(cache2=new WeakMap,cache1.set(a2,cache2));var newValue=fn(a1,a2,a3);return cache2.set(a3,newValue),newValue}),execute_defaultTypeResolver=function(value1,contextValue,info,abstractType){if(isObjectLike(value1)&&"string"==typeof value1.__typename)return value1.__typename;for(var possibleTypes=info.schema.getPossibleTypes(abstractType),promisedIsTypeOfResults=[],i=0;i<possibleTypes.length;i++){var type=possibleTypes[i];if(type.isTypeOf){var isTypeOfResult=type.isTypeOf(value1,contextValue,info);if(isPromise(isTypeOfResult))promisedIsTypeOfResults[i]=isTypeOfResult;else if(isTypeOfResult)return type.name}}if(promisedIsTypeOfResults.length)return Promise.all(promisedIsTypeOfResults).then(function(isTypeOfResults){for(var _i9=0;_i9<isTypeOfResults.length;_i9++)if(isTypeOfResults[_i9])return possibleTypes[_i9].name})},execute_defaultFieldResolver=function(source,args,contextValue,info){if(isObjectLike(source)||"function"==typeof source){var property=source[info.fieldName];return"function"==typeof property?source[info.fieldName](args,contextValue,info):property}};function execute_getFieldDef(schema,parentType,fieldName){return fieldName===SchemaMetaFieldDef.name&&schema.getQueryType()===parentType?SchemaMetaFieldDef:fieldName===TypeMetaFieldDef.name&&schema.getQueryType()===parentType?TypeMetaFieldDef:fieldName===TypeNameMetaFieldDef.name?TypeNameMetaFieldDef:parentType.getFields()[fieldName]}function graphql(argsOrSchema,source,rootValue,contextValue,variableValues,operationName,fieldResolver,typeResolver){var _arguments=arguments;return new Promise(function(resolve){return resolve(1===_arguments.length?graphqlImpl(argsOrSchema):graphqlImpl({schema:argsOrSchema,source:source,rootValue:rootValue,contextValue:contextValue,variableValues:variableValues,operationName:operationName,fieldResolver:fieldResolver,typeResolver:typeResolver}))})}function graphqlSync(argsOrSchema,source,rootValue,contextValue,variableValues,operationName,fieldResolver,typeResolver){var result=1===arguments.length?graphqlImpl(argsOrSchema):graphqlImpl({schema:argsOrSchema,source:source,rootValue:rootValue,contextValue:contextValue,variableValues:variableValues,operationName:operationName,fieldResolver:fieldResolver,typeResolver:typeResolver});if(isPromise(result))throw Error("GraphQL execution failed to complete synchronously.");return result}function graphqlImpl(args){var document1,schema=args.schema,source=args.source,rootValue=args.rootValue,contextValue=args.contextValue,variableValues=args.variableValues,operationName=args.operationName,fieldResolver=args.fieldResolver,typeResolver=args.typeResolver,schemaValidationErrors=validateSchema(schema);if(schemaValidationErrors.length>0)return{errors:schemaValidationErrors};try{document1=parse(source)}catch(syntaxError){return{errors:[syntaxError]}}var validationErrors=validate(schema,document1);return validationErrors.length>0?{errors:validationErrors}:execute({schema:schema,document:document1,rootValue:rootValue,contextValue:contextValue,variableValues:variableValues,operationName:operationName,fieldResolver:fieldResolver,typeResolver:typeResolver})}function isAsyncIterable(maybeAsyncIterable){return"function"==typeof(null==maybeAsyncIterable?void 0:maybeAsyncIterable[SYMBOL_ASYNC_ITERATOR])}function asyncMapValue(value1,callback){return new Promise(function(resolve){return resolve(callback(value1))})}function iteratorResult(value1){return{value:value1,done:!1}}function subscribe(argsOrSchema,document1,rootValue,contextValue,variableValues,operationName,fieldResolver,subscribeFieldResolver){return 1===arguments.length?subscribeImpl(argsOrSchema):subscribeImpl({schema:argsOrSchema,document:document1,rootValue:rootValue,contextValue:contextValue,variableValues:variableValues,operationName:operationName,fieldResolver:fieldResolver,subscribeFieldResolver:subscribeFieldResolver})}function reportGraphQLError(error){if(error instanceof GraphQLError_GraphQLError)return{errors:[error]};throw error}function subscribeImpl(args){var schema=args.schema,document1=args.document,rootValue=args.rootValue,contextValue=args.contextValue,variableValues=args.variableValues,operationName=args.operationName,fieldResolver=args.fieldResolver,sourcePromise=createSourceEventStream(schema,document1,rootValue,contextValue,variableValues,operationName,args.subscribeFieldResolver),mapSourceToResponse=function(payload){return execute({schema:schema,document:document1,rootValue:payload,contextValue:contextValue,variableValues:variableValues,operationName:operationName,fieldResolver:fieldResolver})};return sourcePromise.then(function(resultOrStream){return isAsyncIterable(resultOrStream)?function(iterable,callback,rejectCallback){var $return,abruptClose,mapReject,obj,value1,iterator=iterable[SYMBOL_ASYNC_ITERATOR].call(iterable);function mapResult(result){return result.done?result:asyncMapValue(result.value,callback).then(iteratorResult,abruptClose)}return"function"==typeof iterator.return&&($return=iterator.return,abruptClose=function(error){var rethrow=function(){return Promise.reject(error)};return $return.call(iterator).then(rethrow,rethrow)}),rejectCallback&&(mapReject=function(error){return asyncMapValue(error,rejectCallback).then(iteratorResult,abruptClose)}),value1=function(){return this},SYMBOL_ASYNC_ITERATOR in(obj={next:function(){return iterator.next().then(mapResult,mapReject)},return:function(){return $return?$return.call(iterator).then(mapResult,mapReject):Promise.resolve({value:void 0,done:!0})},throw:function(error){return"function"==typeof iterator.throw?iterator.throw(error).then(mapResult,mapReject):Promise.reject(error).catch(abruptClose)}})?Object.defineProperty(obj,SYMBOL_ASYNC_ITERATOR,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[SYMBOL_ASYNC_ITERATOR]=value1,obj}(resultOrStream,mapSourceToResponse,reportGraphQLError):resultOrStream})}function createSourceEventStream(schema,document1,rootValue,contextValue,variableValues,operationName,fieldResolver){return assertValidExecutionArguments(schema,document1,variableValues),new Promise(function(resolve){var exeContext=buildExecutionContext(schema,document1,rootValue,contextValue,variableValues,operationName,fieldResolver);resolve(Array.isArray(exeContext)?{errors:exeContext}:function(exeContext){var schema=exeContext.schema,operation=exeContext.operation,variableValues=exeContext.variableValues,rootValue=exeContext.rootValue,type=getOperationRootType(schema,operation),fields=collectFields(exeContext,type,operation.selectionSet,Object.create(null),Object.create(null)),responseName=Object.keys(fields)[0],fieldNodes=fields[responseName],fieldName=fieldNodes[0].name.value,fieldDef=execute_getFieldDef(schema,type,fieldName);if(!fieldDef)throw new GraphQLError_GraphQLError('The subscription field "'.concat(fieldName,'" is not defined.'),fieldNodes);var path=addPath(void 0,responseName,type.name),info=buildResolveInfo(exeContext,fieldDef,fieldNodes,type,path);return new Promise(function(resolveResult){var _fieldDef$subscribe,args=getArgumentValues(fieldDef,fieldNodes[0],variableValues),contextValue=exeContext.contextValue;resolveResult((null!=(_fieldDef$subscribe=fieldDef.subscribe)?_fieldDef$subscribe:exeContext.fieldResolver)(rootValue,args,contextValue,info))}).then(function(eventStream){if(eventStream instanceof Error)throw locatedError(eventStream,fieldNodes,pathToArray(path));if(!isAsyncIterable(eventStream))throw Error("Subscription field must return Async Iterable. "+"Received: ".concat(inspect(eventStream),"."));return eventStream},function(error){throw locatedError(error,fieldNodes,pathToArray(path))})}(exeContext))}).catch(reportGraphQLError)}function NoDeprecatedCustomRule(context){return{Field:function(node){var fieldDef=context.getFieldDef(),deprecationReason=null==fieldDef?void 0:fieldDef.deprecationReason;if(fieldDef&&null!=deprecationReason){var parentType=context.getParentType();null!=parentType||invariant(0),context.reportError(new GraphQLError_GraphQLError("The field ".concat(parentType.name,".").concat(fieldDef.name," is deprecated. ").concat(deprecationReason),node))}},Argument:function(node){var argDef=context.getArgument(),deprecationReason=null==argDef?void 0:argDef.deprecationReason;if(argDef&&null!=deprecationReason){var directiveDef=context.getDirective();if(null!=directiveDef)context.reportError(new GraphQLError_GraphQLError('Directive "@'.concat(directiveDef.name,'" argument "').concat(argDef.name,'" is deprecated. ').concat(deprecationReason),node));else{var parentType=context.getParentType(),fieldDef=context.getFieldDef();null!=parentType&&null!=fieldDef||invariant(0),context.reportError(new GraphQLError_GraphQLError('Field "'.concat(parentType.name,".").concat(fieldDef.name,'" argument "').concat(argDef.name,'" is deprecated. ').concat(deprecationReason),node))}}},ObjectField:function(node){var inputObjectDef=definition_getNamedType(context.getParentInputType());if(isInputObjectType(inputObjectDef)){var inputFieldDef=inputObjectDef.getFields()[node.name.value],deprecationReason=null==inputFieldDef?void 0:inputFieldDef.deprecationReason;null!=deprecationReason&&context.reportError(new GraphQLError_GraphQLError("The input field ".concat(inputObjectDef.name,".").concat(inputFieldDef.name," is deprecated. ").concat(deprecationReason),node))}},EnumValue:function(node){var enumValueDef=context.getEnumValue(),deprecationReason=null==enumValueDef?void 0:enumValueDef.deprecationReason;if(enumValueDef&&null!=deprecationReason){var enumTypeDef=definition_getNamedType(context.getInputType());null!=enumTypeDef||invariant(0),context.reportError(new GraphQLError_GraphQLError('The enum value "'.concat(enumTypeDef.name,".").concat(enumValueDef.name,'" is deprecated. ').concat(deprecationReason),node))}}}}function NoSchemaIntrospectionCustomRule(context){return{Field:function(node){var type=definition_getNamedType(context.getType());type&&isIntrospectionType(type)&&context.reportError(new GraphQLError_GraphQLError('GraphQL introspection has been disabled, but the requested query contained the field "'.concat(node.name.value,'".'),node))}}}function formatError(error){error||devAssert(0,"Received null or undefined error.");var _error$message,message=null!=(_error$message=error.message)?_error$message:"An unknown error occurred.",locations=error.locations,path=error.path,extensions=error.extensions;return extensions&&Object.keys(extensions).length>0?{message:message,locations:locations,path:path,extensions:extensions}:{message:message,locations:locations,path:path}}function getIntrospectionQuery_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function getIntrospectionQuery(options){var optionsWithDefault=function(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?getIntrospectionQuery_ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):getIntrospectionQuery_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1},options),descriptions=optionsWithDefault.descriptions?"description":"",specifiedByUrl=optionsWithDefault.specifiedByUrl?"specifiedByUrl":"",directiveIsRepeatable=optionsWithDefault.directiveIsRepeatable?"isRepeatable":"",schemaDescription=optionsWithDefault.schemaDescription?descriptions:"";function inputDeprecation(str){return optionsWithDefault.inputValueDeprecation?str:""}return"\n query IntrospectionQuery {\n __schema {\n ".concat(schemaDescription,"\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n ").concat(descriptions,"\n ").concat(directiveIsRepeatable,"\n locations\n args").concat(inputDeprecation("(includeDeprecated: true)")," {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n ").concat(descriptions,"\n ").concat(specifiedByUrl,"\n fields(includeDeprecated: true) {\n name\n ").concat(descriptions,"\n args").concat(inputDeprecation("(includeDeprecated: true)")," {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields").concat(inputDeprecation("(includeDeprecated: true)")," {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n ").concat(descriptions,"\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n ").concat(descriptions,"\n type { ...TypeRef }\n defaultValue\n ").concat(inputDeprecation("isDeprecated"),"\n ").concat(inputDeprecation("deprecationReason"),"\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n ")}function getOperationAST(documentAST,operationName){for(var operation=null,_i2=0,_documentAST$definiti2=documentAST.definitions;_i2<_documentAST$definiti2.length;_i2++){var _definition$name,definition=_documentAST$definiti2[_i2];if(definition.kind===Kind.OPERATION_DEFINITION){if(null==operationName){if(operation)return null;operation=definition}else if((null==(_definition$name=definition.name)?void 0:_definition$name.value)===operationName)return definition}}return operation}function introspectionFromSchema_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function introspectionFromSchema(schema,options){var result=executeSync({schema:schema,document:parse(getIntrospectionQuery(function(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?introspectionFromSchema_ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):introspectionFromSchema_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0},options)))});return!result.errors&&result.data||invariant(0),result.data}function buildClientSchema(introspection,options){isObjectLike(introspection)&&isObjectLike(introspection.__schema)||devAssert(0,'Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: '.concat(inspect(introspection),"."));for(var schemaIntrospection=introspection.__schema,typeMap=keyValMap(schemaIntrospection.types,function(typeIntrospection){return typeIntrospection.name},function(typeIntrospection){return function(type){if(null!=type&&null!=type.name&&null!=type.kind)switch(type.kind){case TypeKind.SCALAR:return new definition_GraphQLScalarType({name:(scalarIntrospection=type).name,description:scalarIntrospection.description,specifiedByUrl:scalarIntrospection.specifiedByUrl});case TypeKind.OBJECT:return new definition_GraphQLObjectType({name:(objectIntrospection=type).name,description:objectIntrospection.description,interfaces:function(){return buildImplementationsList(objectIntrospection)},fields:function(){return buildFieldDefMap(objectIntrospection)}});case TypeKind.INTERFACE:return new definition_GraphQLInterfaceType({name:(interfaceIntrospection=type).name,description:interfaceIntrospection.description,interfaces:function(){return buildImplementationsList(interfaceIntrospection)},fields:function(){return buildFieldDefMap(interfaceIntrospection)}});case TypeKind.UNION:var scalarIntrospection,objectIntrospection,interfaceIntrospection,unionIntrospection=type;if(!unionIntrospection.possibleTypes){var unionIntrospectionStr=inspect(unionIntrospection);throw Error("Introspection result missing possibleTypes: ".concat(unionIntrospectionStr,"."))}return new definition_GraphQLUnionType({name:unionIntrospection.name,description:unionIntrospection.description,types:function(){return unionIntrospection.possibleTypes.map(getObjectType)}});case TypeKind.ENUM:var enumIntrospection=type;if(!enumIntrospection.enumValues){var enumIntrospectionStr=inspect(enumIntrospection);throw Error("Introspection result missing enumValues: ".concat(enumIntrospectionStr,"."))}return new definition_GraphQLEnumType({name:enumIntrospection.name,description:enumIntrospection.description,values:keyValMap(enumIntrospection.enumValues,function(valueIntrospection){return valueIntrospection.name},function(valueIntrospection){return{description:valueIntrospection.description,deprecationReason:valueIntrospection.deprecationReason}})});case TypeKind.INPUT_OBJECT:var inputObjectIntrospection=type;if(!inputObjectIntrospection.inputFields){var inputObjectIntrospectionStr=inspect(inputObjectIntrospection);throw Error("Introspection result missing inputFields: ".concat(inputObjectIntrospectionStr,"."))}return new definition_GraphQLInputObjectType({name:inputObjectIntrospection.name,description:inputObjectIntrospection.description,fields:function(){return buildInputValueDefMap(inputObjectIntrospection.inputFields)}})}var typeStr=inspect(type);throw Error("Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ".concat(typeStr,"."))}(typeIntrospection)}),_i2=0,_ref2=[].concat(specifiedScalarTypes,introspectionTypes);_i2<_ref2.length;_i2++){var stdType=_ref2[_i2];typeMap[stdType.name]&&(typeMap[stdType.name]=stdType)}var queryType=schemaIntrospection.queryType?getObjectType(schemaIntrospection.queryType):null,mutationType=schemaIntrospection.mutationType?getObjectType(schemaIntrospection.mutationType):null,subscriptionType=schemaIntrospection.subscriptionType?getObjectType(schemaIntrospection.subscriptionType):null,directives=schemaIntrospection.directives?schemaIntrospection.directives.map(function(directiveIntrospection){if(!directiveIntrospection.args){var directiveIntrospectionStr=inspect(directiveIntrospection);throw Error("Introspection result missing directive args: ".concat(directiveIntrospectionStr,"."))}if(!directiveIntrospection.locations){var _directiveIntrospectionStr=inspect(directiveIntrospection);throw Error("Introspection result missing directive locations: ".concat(_directiveIntrospectionStr,"."))}return new directives_GraphQLDirective({name:directiveIntrospection.name,description:directiveIntrospection.description,isRepeatable:directiveIntrospection.isRepeatable,locations:directiveIntrospection.locations.slice(),args:buildInputValueDefMap(directiveIntrospection.args)})}):[];return new schema_GraphQLSchema({description:schemaIntrospection.description,query:queryType,mutation:mutationType,subscription:subscriptionType,types:objectValues(typeMap),directives:directives,assumeValid:null==options?void 0:options.assumeValid});function getType(typeRef){if(typeRef.kind===TypeKind.LIST){var itemRef=typeRef.ofType;if(!itemRef)throw Error("Decorated type deeper than introspection query.");return new GraphQLList(getType(itemRef))}if(typeRef.kind===TypeKind.NON_NULL){var nullableRef=typeRef.ofType;if(!nullableRef)throw Error("Decorated type deeper than introspection query.");return new GraphQLNonNull(assertNullableType(getType(nullableRef)))}return getNamedType(typeRef)}function getNamedType(typeRef){var typeName=typeRef.name;if(!typeName)throw Error("Unknown type reference: ".concat(inspect(typeRef),"."));var type=typeMap[typeName];if(!type)throw Error("Invalid or incomplete schema, unknown type: ".concat(typeName,". Ensure that a full introspection query is used in order to build a client schema."));return type}function getObjectType(typeRef){return assertObjectType(getNamedType(typeRef))}function getInterfaceType(typeRef){return assertInterfaceType(getNamedType(typeRef))}function buildImplementationsList(implementingIntrospection){if(null===implementingIntrospection.interfaces&&implementingIntrospection.kind===TypeKind.INTERFACE)return[];if(!implementingIntrospection.interfaces){var implementingIntrospectionStr=inspect(implementingIntrospection);throw Error("Introspection result missing interfaces: ".concat(implementingIntrospectionStr,"."))}return implementingIntrospection.interfaces.map(getInterfaceType)}function buildFieldDefMap(typeIntrospection){if(!typeIntrospection.fields)throw Error("Introspection result missing fields: ".concat(inspect(typeIntrospection),"."));return keyValMap(typeIntrospection.fields,function(fieldIntrospection){return fieldIntrospection.name},buildField)}function buildField(fieldIntrospection){var type=getType(fieldIntrospection.type);if(!isOutputType(type)){var typeStr=inspect(type);throw Error("Introspection must provide output type for fields, but received: ".concat(typeStr,"."))}if(!fieldIntrospection.args){var fieldIntrospectionStr=inspect(fieldIntrospection);throw Error("Introspection result missing field args: ".concat(fieldIntrospectionStr,"."))}return{description:fieldIntrospection.description,deprecationReason:fieldIntrospection.deprecationReason,type:type,args:buildInputValueDefMap(fieldIntrospection.args)}}function buildInputValueDefMap(inputValueIntrospections){return keyValMap(inputValueIntrospections,function(inputValue){return inputValue.name},buildInputValue)}function buildInputValue(inputValueIntrospection){var type=getType(inputValueIntrospection.type);if(!isInputType(type)){var typeStr=inspect(type);throw Error("Introspection must provide input type for arguments, but received: ".concat(typeStr,"."))}var defaultValue=null!=inputValueIntrospection.defaultValue?valueFromAST(parser_parseValue(inputValueIntrospection.defaultValue),type):void 0;return{description:inputValueIntrospection.description,type:type,defaultValue:defaultValue,deprecationReason:inputValueIntrospection.deprecationReason}}}function extendSchema_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function extendSchema_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?extendSchema_ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):extendSchema_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function extendSchema(schema,documentAST,options){assertSchema(schema),null!=documentAST&&documentAST.kind===Kind.DOCUMENT||devAssert(0,"Must provide valid Document AST."),(null==options?void 0:options.assumeValid)!==!0&&(null==options?void 0:options.assumeValidSDL)!==!0&&function(documentAST,schema){var errors=validateSDL(documentAST,schema);if(0!==errors.length)throw Error(errors.map(function(error){return error.message}).join("\n\n"))}(documentAST,schema);var schemaConfig=schema.toConfig(),extendedConfig=extendSchemaImpl(schemaConfig,documentAST,options);return schemaConfig===extendedConfig?schema:new schema_GraphQLSchema(extendedConfig)}function extendSchemaImpl(schemaConfig,documentAST,options){for(var typeDefs=[],typeExtensionsMap=Object.create(null),directiveDefs=[],schemaExtensions=[],_i2=0,_documentAST$definiti2=documentAST.definitions;_i2<_documentAST$definiti2.length;_i2++){var def=_documentAST$definiti2[_i2];if(def.kind===Kind.SCHEMA_DEFINITION)schemaDef=def;else if(def.kind===Kind.SCHEMA_EXTENSION)schemaExtensions.push(def);else if(isTypeDefinitionNode(def))typeDefs.push(def);else if(isTypeExtensionNode(def)){var extendedTypeName=def.name.value,existingTypeExtensions=typeExtensionsMap[extendedTypeName];typeExtensionsMap[extendedTypeName]=existingTypeExtensions?existingTypeExtensions.concat([def]):[def]}else def.kind===Kind.DIRECTIVE_DEFINITION&&directiveDefs.push(def)}if(0===Object.keys(typeExtensionsMap).length&&0===typeDefs.length&&0===directiveDefs.length&&0===schemaExtensions.length&&null==schemaDef)return schemaConfig;for(var typeMap=Object.create(null),_i4=0,_schemaConfig$types2=schemaConfig.types;_i4<_schemaConfig$types2.length;_i4++){var type,existingType=_schemaConfig$types2[_i4];typeMap[existingType.name]=isIntrospectionType(type=existingType)||isSpecifiedScalarType(type)?type:isScalarType(type)?function(type){for(var _typeExtensionsMap$co2,_getSpecifiedByUrl,config=type.toConfig(),extensions=null!=(_typeExtensionsMap$co2=typeExtensionsMap[config.name])?_typeExtensionsMap$co2:[],specifiedByUrl=config.specifiedByUrl,_i8=0;_i8<extensions.length;_i8++)specifiedByUrl=null!=(_getSpecifiedByUrl=getSpecifiedByUrl(extensions[_i8]))?_getSpecifiedByUrl:specifiedByUrl;return new definition_GraphQLScalarType(extendSchema_objectSpread(extendSchema_objectSpread({},config),{},{specifiedByUrl:specifiedByUrl,extensionASTNodes:config.extensionASTNodes.concat(extensions)}))}(type):isObjectType(type)?function(type){var _typeExtensionsMap$co3,config=type.toConfig(),extensions=null!=(_typeExtensionsMap$co3=typeExtensionsMap[config.name])?_typeExtensionsMap$co3:[];return new definition_GraphQLObjectType(extendSchema_objectSpread(extendSchema_objectSpread({},config),{},{interfaces:function(){return[].concat(type.getInterfaces().map(replaceNamedType),buildInterfaces(extensions))},fields:function(){return extendSchema_objectSpread(extendSchema_objectSpread({},mapValue(config.fields,extendField)),buildFieldMap(extensions))},extensionASTNodes:config.extensionASTNodes.concat(extensions)}))}(type):isInterfaceType(type)?function(type){var _typeExtensionsMap$co4,config=type.toConfig(),extensions=null!=(_typeExtensionsMap$co4=typeExtensionsMap[config.name])?_typeExtensionsMap$co4:[];return new definition_GraphQLInterfaceType(extendSchema_objectSpread(extendSchema_objectSpread({},config),{},{interfaces:function(){return[].concat(type.getInterfaces().map(replaceNamedType),buildInterfaces(extensions))},fields:function(){return extendSchema_objectSpread(extendSchema_objectSpread({},mapValue(config.fields,extendField)),buildFieldMap(extensions))},extensionASTNodes:config.extensionASTNodes.concat(extensions)}))}(type):isUnionType(type)?function(type){var _typeExtensionsMap$co5,config=type.toConfig(),extensions=null!=(_typeExtensionsMap$co5=typeExtensionsMap[config.name])?_typeExtensionsMap$co5:[];return new definition_GraphQLUnionType(extendSchema_objectSpread(extendSchema_objectSpread({},config),{},{types:function(){return[].concat(type.getTypes().map(replaceNamedType),buildUnionTypes(extensions))},extensionASTNodes:config.extensionASTNodes.concat(extensions)}))}(type):isEnumType(type)?function(type){var _typeExtensionsMap$ty,config=type.toConfig(),extensions=null!=(_typeExtensionsMap$ty=typeExtensionsMap[type.name])?_typeExtensionsMap$ty:[];return new definition_GraphQLEnumType(extendSchema_objectSpread(extendSchema_objectSpread({},config),{},{values:extendSchema_objectSpread(extendSchema_objectSpread({},config.values),buildEnumValueMap(extensions)),extensionASTNodes:config.extensionASTNodes.concat(extensions)}))}(type):isInputObjectType(type)?function(type){var _typeExtensionsMap$co,config=type.toConfig(),extensions=null!=(_typeExtensionsMap$co=typeExtensionsMap[config.name])?_typeExtensionsMap$co:[];return new definition_GraphQLInputObjectType(extendSchema_objectSpread(extendSchema_objectSpread({},config),{},{fields:function(){return extendSchema_objectSpread(extendSchema_objectSpread({},mapValue(config.fields,function(field){return extendSchema_objectSpread(extendSchema_objectSpread({},field),{},{type:replaceType(field.type)})})),buildInputFieldMap(extensions))},extensionASTNodes:config.extensionASTNodes.concat(extensions)}))}(type):void invariant(0,"Unexpected type: "+inspect(type))}for(var _i6=0;_i6<typeDefs.length;_i6++){var _schemaDef,_schemaDef$descriptio,_schemaDef2,_options$assumeValid,schemaDef,_stdTypeMap$name,typeNode=typeDefs[_i6],name=typeNode.name.value;typeMap[name]=null!=(_stdTypeMap$name=stdTypeMap[name])?_stdTypeMap$name:function(astNode){var _typeExtensionsMap$na,name=astNode.name.value,description=getDescription(astNode,options),extensionNodes=null!=(_typeExtensionsMap$na=typeExtensionsMap[name])?_typeExtensionsMap$na:[];switch(astNode.kind){case Kind.OBJECT_TYPE_DEFINITION:var allNodes=[astNode].concat(extensionNodes);return new definition_GraphQLObjectType({name:name,description:description,interfaces:function(){return buildInterfaces(allNodes)},fields:function(){return buildFieldMap(allNodes)},astNode:astNode,extensionASTNodes:extensionNodes});case Kind.INTERFACE_TYPE_DEFINITION:var _allNodes=[astNode].concat(extensionNodes);return new definition_GraphQLInterfaceType({name:name,description:description,interfaces:function(){return buildInterfaces(_allNodes)},fields:function(){return buildFieldMap(_allNodes)},astNode:astNode,extensionASTNodes:extensionNodes});case Kind.ENUM_TYPE_DEFINITION:return new definition_GraphQLEnumType({name:name,description:description,values:buildEnumValueMap([astNode].concat(extensionNodes)),astNode:astNode,extensionASTNodes:extensionNodes});case Kind.UNION_TYPE_DEFINITION:var _allNodes3=[astNode].concat(extensionNodes);return new definition_GraphQLUnionType({name:name,description:description,types:function(){return buildUnionTypes(_allNodes3)},astNode:astNode,extensionASTNodes:extensionNodes});case Kind.SCALAR_TYPE_DEFINITION:return new definition_GraphQLScalarType({name:name,description:description,specifiedByUrl:getSpecifiedByUrl(astNode),astNode:astNode,extensionASTNodes:extensionNodes});case Kind.INPUT_OBJECT_TYPE_DEFINITION:var _allNodes4=[astNode].concat(extensionNodes);return new definition_GraphQLInputObjectType({name:name,description:description,fields:function(){return buildInputFieldMap(_allNodes4)},astNode:astNode,extensionASTNodes:extensionNodes})}invariant(0,"Unexpected type definition node: "+inspect(astNode))}(typeNode)}var operationTypes=extendSchema_objectSpread(extendSchema_objectSpread({query:schemaConfig.query&&replaceNamedType(schemaConfig.query),mutation:schemaConfig.mutation&&replaceNamedType(schemaConfig.mutation),subscription:schemaConfig.subscription&&replaceNamedType(schemaConfig.subscription)},schemaDef&&getOperationTypes([schemaDef])),getOperationTypes(schemaExtensions));return extendSchema_objectSpread(extendSchema_objectSpread({description:null==(_schemaDef=schemaDef)||null==(_schemaDef$descriptio=_schemaDef.description)?void 0:_schemaDef$descriptio.value},operationTypes),{},{types:objectValues(typeMap),directives:[].concat(schemaConfig.directives.map(function(directive){var config=directive.toConfig();return new directives_GraphQLDirective(extendSchema_objectSpread(extendSchema_objectSpread({},config),{},{args:mapValue(config.args,extendArg)}))}),directiveDefs.map(function(node){var locations=node.locations.map(function(_ref){return _ref.value});return new directives_GraphQLDirective({name:node.name.value,description:getDescription(node,options),locations:locations,isRepeatable:node.repeatable,args:buildArgumentMap(node.arguments),astNode:node})})),extensions:void 0,astNode:null!=(_schemaDef2=schemaDef)?_schemaDef2:schemaConfig.astNode,extensionASTNodes:schemaConfig.extensionASTNodes.concat(schemaExtensions),assumeValid:null!=(_options$assumeValid=null==options?void 0:options.assumeValid)&&_options$assumeValid});function replaceType(type){return isListType(type)?new GraphQLList(replaceType(type.ofType)):isNonNullType(type)?new GraphQLNonNull(replaceType(type.ofType)):replaceNamedType(type)}function replaceNamedType(type){return typeMap[type.name]}function extendField(field){return extendSchema_objectSpread(extendSchema_objectSpread({},field),{},{type:replaceType(field.type),args:mapValue(field.args,extendArg)})}function extendArg(arg){return extendSchema_objectSpread(extendSchema_objectSpread({},arg),{},{type:replaceType(arg.type)})}function getOperationTypes(nodes){for(var opTypes={},_i10=0;_i10<nodes.length;_i10++)for(var _node$operationTypes,operationTypesNodes=null!=(_node$operationTypes=nodes[_i10].operationTypes)?_node$operationTypes:[],_i12=0;_i12<operationTypesNodes.length;_i12++){var operationType=operationTypesNodes[_i12];opTypes[operationType.operation]=getNamedType(operationType.type)}return opTypes}function getNamedType(node){var _stdTypeMap$name2,name=node.name.value,type=null!=(_stdTypeMap$name2=stdTypeMap[name])?_stdTypeMap$name2:typeMap[name];if(void 0===type)throw Error('Unknown type: "'.concat(name,'".'));return type}function getWrappedType(node){return node.kind===Kind.LIST_TYPE?new GraphQLList(getWrappedType(node.type)):node.kind===Kind.NON_NULL_TYPE?new GraphQLNonNull(getWrappedType(node.type)):getNamedType(node)}function buildFieldMap(nodes){for(var fieldConfigMap=Object.create(null),_i14=0;_i14<nodes.length;_i14++)for(var _node$fields,nodeFields=null!=(_node$fields=nodes[_i14].fields)?_node$fields:[],_i16=0;_i16<nodeFields.length;_i16++){var field=nodeFields[_i16];fieldConfigMap[field.name.value]={type:getWrappedType(field.type),description:getDescription(field,options),args:buildArgumentMap(field.arguments),deprecationReason:getDeprecationReason(field),astNode:field}}return fieldConfigMap}function buildArgumentMap(args){for(var argsNodes=null!=args?args:[],argConfigMap=Object.create(null),_i18=0;_i18<argsNodes.length;_i18++){var arg=argsNodes[_i18],type=getWrappedType(arg.type);argConfigMap[arg.name.value]={type:type,description:getDescription(arg,options),defaultValue:valueFromAST(arg.defaultValue,type),deprecationReason:getDeprecationReason(arg),astNode:arg}}return argConfigMap}function buildInputFieldMap(nodes){for(var inputFieldMap=Object.create(null),_i20=0;_i20<nodes.length;_i20++)for(var _node$fields2,fieldsNodes=null!=(_node$fields2=nodes[_i20].fields)?_node$fields2:[],_i22=0;_i22<fieldsNodes.length;_i22++){var field=fieldsNodes[_i22],type=getWrappedType(field.type);inputFieldMap[field.name.value]={type:type,description:getDescription(field,options),defaultValue:valueFromAST(field.defaultValue,type),deprecationReason:getDeprecationReason(field),astNode:field}}return inputFieldMap}function buildEnumValueMap(nodes){for(var enumValueMap=Object.create(null),_i24=0;_i24<nodes.length;_i24++)for(var _node$values,valuesNodes=null!=(_node$values=nodes[_i24].values)?_node$values:[],_i26=0;_i26<valuesNodes.length;_i26++){var value1=valuesNodes[_i26];enumValueMap[value1.name.value]={description:getDescription(value1,options),deprecationReason:getDeprecationReason(value1),astNode:value1}}return enumValueMap}function buildInterfaces(nodes){for(var interfaces=[],_i28=0;_i28<nodes.length;_i28++)for(var _node$interfaces,interfacesNodes=null!=(_node$interfaces=nodes[_i28].interfaces)?_node$interfaces:[],_i30=0;_i30<interfacesNodes.length;_i30++){var type=interfacesNodes[_i30];interfaces.push(getNamedType(type))}return interfaces}function buildUnionTypes(nodes){for(var types=[],_i32=0;_i32<nodes.length;_i32++)for(var _node$types,typeNodes=null!=(_node$types=nodes[_i32].types)?_node$types:[],_i34=0;_i34<typeNodes.length;_i34++){var type=typeNodes[_i34];types.push(getNamedType(type))}return types}}var stdTypeMap=keyMap(specifiedScalarTypes.concat(introspectionTypes),function(type){return type.name});function getDeprecationReason(node){var deprecated=getDirectiveValues(GraphQLDeprecatedDirective,node);return null==deprecated?void 0:deprecated.reason}function getSpecifiedByUrl(node){var specifiedBy=getDirectiveValues(GraphQLSpecifiedByDirective,node);return null==specifiedBy?void 0:specifiedBy.url}function getDescription(node,options){if(node.description)return node.description.value;if((null==options?void 0:options.commentDescriptions)===!0){var rawValue=function(node){var loc=node.loc;if(loc){for(var comments=[],token=loc.startToken.prev;null!=token&&token.kind===TokenKind.COMMENT&&token.next&&token.prev&&token.line+1===token.next.line&&token.line!==token.prev.line;){var value1=String(token.value);comments.push(value1),token=token.prev}return comments.length>0?comments.reverse().join("\n"):void 0}}(node);if(void 0!==rawValue)return dedentBlockStringValue("\n"+rawValue)}}function buildASTSchema(documentAST,options){null!=documentAST&&documentAST.kind===Kind.DOCUMENT||devAssert(0,"Must provide valid Document AST."),(null==options?void 0:options.assumeValid)!==!0&&(null==options?void 0:options.assumeValidSDL)!==!0&&function(documentAST){var errors=validateSDL(documentAST);if(0!==errors.length)throw Error(errors.map(function(error){return error.message}).join("\n\n"))}(documentAST);var config=extendSchemaImpl({description:void 0,types:[],directives:[],extensions:void 0,extensionASTNodes:[],assumeValid:!1},documentAST,options);if(null==config.astNode)for(var _i2=0,_config$types2=config.types;_i2<_config$types2.length;_i2++){var type=_config$types2[_i2];switch(type.name){case"Query":config.query=type;break;case"Mutation":config.mutation=type;break;case"Subscription":config.subscription=type}}for(var directives=config.directives,_i4=0;_i4<specifiedDirectives.length;_i4++)!function(_i4){var stdDirective=specifiedDirectives[_i4];directives.every(function(directive){return directive.name!==stdDirective.name})&&directives.push(stdDirective)}(_i4);return new schema_GraphQLSchema(config)}function buildSchema(source,options){return buildASTSchema(parse(source,{noLocation:null==options?void 0:options.noLocation,allowLegacySDLEmptyFields:null==options?void 0:options.allowLegacySDLEmptyFields,allowLegacySDLImplementsInterfaces:null==options?void 0:options.allowLegacySDLImplementsInterfaces,experimentalFragmentVariables:null==options?void 0:options.experimentalFragmentVariables}),{commentDescriptions:null==options?void 0:options.commentDescriptions,assumeValidSDL:null==options?void 0:options.assumeValidSDL,assumeValid:null==options?void 0:options.assumeValid})}function lexicographicSortSchema_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function lexicographicSortSchema_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?lexicographicSortSchema_ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):lexicographicSortSchema_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function lexicographicSortSchema(schema){var maybeType,maybeType1,maybeType2,schemaConfig=schema.toConfig(),typeMap=keyValMap(sortByName(schemaConfig.types),function(type){return type.name},function(type){if(isScalarType(type)||isIntrospectionType(type))return type;if(isObjectType(type)){var config=type.toConfig();return new definition_GraphQLObjectType(lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},config),{},{interfaces:function(){return sortTypes(config.interfaces)},fields:function(){return sortFields(config.fields)}}))}if(isInterfaceType(type)){var _config=type.toConfig();return new definition_GraphQLInterfaceType(lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},_config),{},{interfaces:function(){return sortTypes(_config.interfaces)},fields:function(){return sortFields(_config.fields)}}))}if(isUnionType(type)){var _config2=type.toConfig();return new definition_GraphQLUnionType(lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},_config2),{},{types:function(){return sortTypes(_config2.types)}}))}if(isEnumType(type)){var _config3=type.toConfig();return new definition_GraphQLEnumType(lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},_config3),{},{values:sortObjMap(_config3.values)}))}if(isInputObjectType(type)){var _config4=type.toConfig();return new definition_GraphQLInputObjectType(lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},_config4),{},{fields:function(){return sortObjMap(_config4.fields,function(field){return lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},field),{},{type:replaceType(field.type)})})}}))}invariant(0,"Unexpected type: "+inspect(type))});return new schema_GraphQLSchema(lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},schemaConfig),{},{types:objectValues(typeMap),directives:sortByName(schemaConfig.directives).map(function(directive){var config=directive.toConfig();return new directives_GraphQLDirective(lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},config),{},{locations:sortBy(config.locations,function(x){return x}),args:sortArgs(config.args)}))}),query:(maybeType=schemaConfig.query)&&replaceNamedType(maybeType),mutation:(maybeType1=schemaConfig.mutation)&&replaceNamedType(maybeType1),subscription:(maybeType2=schemaConfig.subscription)&&replaceNamedType(maybeType2)}));function replaceType(type){return isListType(type)?new GraphQLList(replaceType(type.ofType)):isNonNullType(type)?new GraphQLNonNull(replaceType(type.ofType)):replaceNamedType(type)}function replaceNamedType(type){return typeMap[type.name]}function sortArgs(args){return sortObjMap(args,function(arg){return lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},arg),{},{type:replaceType(arg.type)})})}function sortFields(fieldsMap){return sortObjMap(fieldsMap,function(field){return lexicographicSortSchema_objectSpread(lexicographicSortSchema_objectSpread({},field),{},{type:replaceType(field.type),args:sortArgs(field.args)})})}function sortTypes(arr){return sortByName(arr).map(replaceNamedType)}}function sortObjMap(map,sortValueFn){for(var sortedMap=Object.create(null),sortedKeys=sortBy(Object.keys(map),function(x){return x}),_i2=0;_i2<sortedKeys.length;_i2++){var key=sortedKeys[_i2],value1=map[key];sortedMap[key]=sortValueFn?sortValueFn(value1):value1}return sortedMap}function sortByName(array){return sortBy(array,function(obj){return obj.name})}function sortBy(array,mapToKey){return array.slice().sort(function(obj1,obj2){return naturalCompare(mapToKey(obj1),mapToKey(obj2))})}function printSchema(schema,options){return printFilteredSchema(schema,function(n){return!isSpecifiedDirective(n)},isDefinedType,options)}function printIntrospectionSchema(schema,options){return printFilteredSchema(schema,isSpecifiedDirective,isIntrospectionType,options)}function isDefinedType(type){return!isSpecifiedScalarType(type)&&!isIntrospectionType(type)}function printFilteredSchema(schema,directiveFilter,typeFilter,options){var directives=schema.getDirectives().filter(directiveFilter),types=objectValues(schema.getTypeMap()).filter(typeFilter);return[function(schema){if(!(null==schema.description&&function(schema){var queryType=schema.getQueryType();if(queryType&&"Query"!==queryType.name)return!1;var mutationType=schema.getMutationType();if(mutationType&&"Mutation"!==mutationType.name)return!1;var subscriptionType=schema.getSubscriptionType();return!subscriptionType||"Subscription"===subscriptionType.name}(schema))){var operationTypes=[],queryType=schema.getQueryType();queryType&&operationTypes.push(" query: ".concat(queryType.name));var mutationType=schema.getMutationType();mutationType&&operationTypes.push(" mutation: ".concat(mutationType.name));var subscriptionType=schema.getSubscriptionType();return subscriptionType&&operationTypes.push(" subscription: ".concat(subscriptionType.name)),printDescription({},schema)+"schema {\n".concat(operationTypes.join("\n"),"\n}")}}(schema)].concat(directives.map(function(directive){var directive1,options1;return directive1=directive,printDescription(options1=options,directive1)+"directive @"+directive1.name+printArgs(options1,directive1.args)+(directive1.isRepeatable?" repeatable":"")+" on "+directive1.locations.join(" | ")}),types.map(function(type){return printType(type,options)})).filter(Boolean).join("\n\n")+"\n"}function printType(type,options){var type1,type2,options1,type3,options2,type4,options3,types,possibleTypes,type5,options4,values,type6,options5,fields;return isScalarType(type)?printDescription(options,type1=type)+"scalar ".concat(type1.name)+function(scalar){if(null==scalar.specifiedByUrl)return"";var urlAST=astFromValue(scalar.specifiedByUrl,GraphQLString);return urlAST||invariant(0,"Unexpected null value returned from `astFromValue` for specifiedByUrl")," @specifiedBy(url: "+print(urlAST)+")"}(type1):isObjectType(type)?(type2=type,printDescription(options1=options,type2)+"type ".concat(type2.name)+printImplementedInterfaces(type2)+printFields(options1,type2)):isInterfaceType(type)?(type3=type,printDescription(options2=options,type3)+"interface ".concat(type3.name)+printImplementedInterfaces(type3)+printFields(options2,type3)):isUnionType(type)?(type4=type,options3=options,possibleTypes=(types=type4.getTypes()).length?" = "+types.join(" | "):"",printDescription(options3,type4)+"union "+type4.name+possibleTypes):isEnumType(type)?(type5=type,options4=options,values=type5.getValues().map(function(value1,i){return printDescription(options4,value1," ",!i)+" "+value1.name+printDeprecated(value1.deprecationReason)}),printDescription(options4,type5)+"enum ".concat(type5.name)+printBlock(values)):isInputObjectType(type)?(type6=type,options5=options,fields=objectValues(type6.getFields()).map(function(f,i){return printDescription(options5,f," ",!i)+" "+printInputValue(f)}),printDescription(options5,type6)+"input ".concat(type6.name)+printBlock(fields)):void invariant(0,"Unexpected type: "+inspect(type))}function printImplementedInterfaces(type){var interfaces=type.getInterfaces();return interfaces.length?" implements "+interfaces.map(function(i){return i.name}).join(" & "):""}function printFields(options,type){return printBlock(objectValues(type.getFields()).map(function(f,i){return printDescription(options,f," ",!i)+" "+f.name+printArgs(options,f.args," ")+": "+String(f.type)+printDeprecated(f.deprecationReason)}))}function printBlock(items){return 0!==items.length?" {\n"+items.join("\n")+"\n}":""}function printArgs(options,args){var indentation=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return 0===args.length?"":args.every(function(arg){return!arg.description})?"("+args.map(printInputValue).join(", ")+")":"(\n"+args.map(function(arg,i){return printDescription(options,arg," "+indentation,!i)+" "+indentation+printInputValue(arg)}).join("\n")+"\n"+indentation+")"}function printInputValue(arg){var defaultAST=astFromValue(arg.defaultValue,arg.type),argDecl=arg.name+": "+String(arg.type);return defaultAST&&(argDecl+=" = ".concat(print(defaultAST))),argDecl+printDeprecated(arg.deprecationReason)}function printDeprecated(reason){if(null==reason)return"";var reasonAST=astFromValue(reason,GraphQLString);return reasonAST&&reason!==DEFAULT_DEPRECATION_REASON?" @deprecated(reason: "+print(reasonAST)+")":" @deprecated"}function printDescription(options,def){var description,indentation,firstInBlock,comment,indentation1=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",firstInBlock1=!(arguments.length>3)||void 0===arguments[3]||arguments[3],description1=def.description;if(null==description1)return"";if((null==options?void 0:options.commentDescriptions)===!0){return description=description1,indentation=indentation1,firstInBlock=firstInBlock1,comment=description.split("\n").map(function(line){return indentation+(""!==line?"# "+line:"#")}).join("\n"),(indentation&&!firstInBlock?"\n":"")+comment+"\n"}var preferMultipleLines=description1.length>70;return(indentation1&&!firstInBlock1?"\n"+indentation1:indentation1)+printBlockString(description1,"",preferMultipleLines).replace(/\n/g,"\n"+indentation1)+"\n"}function concatAST(documents){for(var definitions=[],_i2=0;_i2<documents.length;_i2++){var doc=documents[_i2];definitions=definitions.concat(doc.definitions)}return{kind:"Document",definitions:definitions}}function separateOperations(documentAST){for(var operations=[],depGraph=Object.create(null),_i2=0,_documentAST$definiti2=documentAST.definitions;_i2<_documentAST$definiti2.length;_i2++){var definitionNode=_documentAST$definiti2[_i2];switch(definitionNode.kind){case Kind.OPERATION_DEFINITION:operations.push(definitionNode);break;case Kind.FRAGMENT_DEFINITION:depGraph[definitionNode.name.value]=collectDependencies(definitionNode.selectionSet)}}for(var separatedDocumentASTs=Object.create(null),_i4=0;_i4<operations.length;_i4++){for(var _i41=_i4,operation=operations[_i41],dependencies=new Set,_i6=0,_collectDependencies2=collectDependencies(operation.selectionSet);_i6<_collectDependencies2.length;_i6++)!function collectTransitiveDependencies(collected,depGraph,fromName){if(!collected.has(fromName)){collected.add(fromName);var immediateDeps=depGraph[fromName];if(void 0!==immediateDeps)for(var _i8=0;_i8<immediateDeps.length;_i8++)collectTransitiveDependencies(collected,depGraph,immediateDeps[_i8])}}(dependencies,depGraph,_collectDependencies2[_i6]);separatedDocumentASTs[operation.name?operation.name.value:""]={kind:Kind.DOCUMENT,definitions:documentAST.definitions.filter(function(node){return node===operation||node.kind===Kind.FRAGMENT_DEFINITION&&dependencies.has(node.name.value)})}}return separatedDocumentASTs}function collectDependencies(selectionSet){var dependencies=[];return visit(selectionSet,{FragmentSpread:function(node){dependencies.push(node.name.value)}}),dependencies}function stripIgnoredCharacters(source){for(var sourceObj=jsutils_instanceOf(source,source_Source)?source:new source_Source(source),body=sourceObj.body,lexer=new lexer_Lexer(sourceObj),strippedBody="",wasLastAddedTokenNonPunctuator=!1;lexer.advance().kind!==TokenKind.EOF;){var currentToken=lexer.token,tokenKind=currentToken.kind,isNonPunctuator=!isPunctuatorTokenKind(currentToken.kind);wasLastAddedTokenNonPunctuator&&(isNonPunctuator||currentToken.kind===TokenKind.SPREAD)&&(strippedBody+=" ");var tokenBody=body.slice(currentToken.start,currentToken.end);tokenKind===TokenKind.BLOCK_STRING?strippedBody+=function(blockStr){var body=dedentBlockStringValue(blockStr.slice(3,-3));getBlockStringIndentation(body)>0&&(body="\n"+body);var lastChar=body[body.length-1];return('"'===lastChar&&'\\"""'!==body.slice(-4)||"\\"===lastChar)&&(body+="\n"),'"""'+body+'"""'}(tokenBody):strippedBody+=tokenBody,wasLastAddedTokenNonPunctuator=isNonPunctuator}return strippedBody}function findBreakingChanges_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function findBreakingChanges_objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?findBreakingChanges_ownKeys(Object(source),!0).forEach(function(key){var obj,key1,value1;obj=target,key1=key,value1=source[key],key1 in obj?Object.defineProperty(obj,key1,{value:value1,enumerable:!0,configurable:!0,writable:!0}):obj[key1]=value1}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):findBreakingChanges_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}var BreakingChangeType=Object.freeze({TYPE_REMOVED:"TYPE_REMOVED",TYPE_CHANGED_KIND:"TYPE_CHANGED_KIND",TYPE_REMOVED_FROM_UNION:"TYPE_REMOVED_FROM_UNION",VALUE_REMOVED_FROM_ENUM:"VALUE_REMOVED_FROM_ENUM",REQUIRED_INPUT_FIELD_ADDED:"REQUIRED_INPUT_FIELD_ADDED",IMPLEMENTED_INTERFACE_REMOVED:"IMPLEMENTED_INTERFACE_REMOVED",FIELD_REMOVED:"FIELD_REMOVED",FIELD_CHANGED_KIND:"FIELD_CHANGED_KIND",REQUIRED_ARG_ADDED:"REQUIRED_ARG_ADDED",ARG_REMOVED:"ARG_REMOVED",ARG_CHANGED_KIND:"ARG_CHANGED_KIND",DIRECTIVE_REMOVED:"DIRECTIVE_REMOVED",DIRECTIVE_ARG_REMOVED:"DIRECTIVE_ARG_REMOVED",REQUIRED_DIRECTIVE_ARG_ADDED:"REQUIRED_DIRECTIVE_ARG_ADDED",DIRECTIVE_REPEATABLE_REMOVED:"DIRECTIVE_REPEATABLE_REMOVED",DIRECTIVE_LOCATION_REMOVED:"DIRECTIVE_LOCATION_REMOVED"}),DangerousChangeType=Object.freeze({VALUE_ADDED_TO_ENUM:"VALUE_ADDED_TO_ENUM",TYPE_ADDED_TO_UNION:"TYPE_ADDED_TO_UNION",OPTIONAL_INPUT_FIELD_ADDED:"OPTIONAL_INPUT_FIELD_ADDED",OPTIONAL_ARG_ADDED:"OPTIONAL_ARG_ADDED",IMPLEMENTED_INTERFACE_ADDED:"IMPLEMENTED_INTERFACE_ADDED",ARG_DEFAULT_VALUE_CHANGE:"ARG_DEFAULT_VALUE_CHANGE"});function findBreakingChanges(oldSchema,newSchema){return findSchemaChanges(oldSchema,newSchema).filter(function(change){return change.type in BreakingChangeType})}function findDangerousChanges(oldSchema,newSchema){return findSchemaChanges(oldSchema,newSchema).filter(function(change){return change.type in DangerousChangeType})}function findSchemaChanges(oldSchema,newSchema){return[].concat(function(oldSchema,newSchema){for(var schemaChanges=[],typesDiff=diff(objectValues(oldSchema.getTypeMap()),objectValues(newSchema.getTypeMap())),_i12=0,_typesDiff$removed2=typesDiff.removed;_i12<_typesDiff$removed2.length;_i12++){var oldType=_typesDiff$removed2[_i12];schemaChanges.push({type:BreakingChangeType.TYPE_REMOVED,description:isSpecifiedScalarType(oldType)?"Standard scalar ".concat(oldType.name," was removed because it is not referenced anymore."):"".concat(oldType.name," was removed.")})}for(var _i14=0,_typesDiff$persisted2=typesDiff.persisted;_i14<_typesDiff$persisted2.length;_i14++){var _ref4=_typesDiff$persisted2[_i14],_oldType=_ref4[0],newType=_ref4[1];isEnumType(_oldType)&&isEnumType(newType)?schemaChanges.push.apply(schemaChanges,function(oldType,newType){for(var schemaChanges=[],valuesDiff=diff(oldType.getValues(),newType.getValues()),_i26=0,_valuesDiff$added2=valuesDiff.added;_i26<_valuesDiff$added2.length;_i26++){var newValue=_valuesDiff$added2[_i26];schemaChanges.push({type:DangerousChangeType.VALUE_ADDED_TO_ENUM,description:"".concat(newValue.name," was added to enum type ").concat(oldType.name,".")})}for(var _i28=0,_valuesDiff$removed2=valuesDiff.removed;_i28<_valuesDiff$removed2.length;_i28++){var oldValue=_valuesDiff$removed2[_i28];schemaChanges.push({type:BreakingChangeType.VALUE_REMOVED_FROM_ENUM,description:"".concat(oldValue.name," was removed from enum type ").concat(oldType.name,".")})}return schemaChanges}(_oldType,newType)):isUnionType(_oldType)&&isUnionType(newType)?schemaChanges.push.apply(schemaChanges,function(oldType,newType){for(var schemaChanges=[],possibleTypesDiff=diff(oldType.getTypes(),newType.getTypes()),_i22=0,_possibleTypesDiff$ad2=possibleTypesDiff.added;_i22<_possibleTypesDiff$ad2.length;_i22++){var newPossibleType=_possibleTypesDiff$ad2[_i22];schemaChanges.push({type:DangerousChangeType.TYPE_ADDED_TO_UNION,description:"".concat(newPossibleType.name," was added to union type ").concat(oldType.name,".")})}for(var _i24=0,_possibleTypesDiff$re2=possibleTypesDiff.removed;_i24<_possibleTypesDiff$re2.length;_i24++){var oldPossibleType=_possibleTypesDiff$re2[_i24];schemaChanges.push({type:BreakingChangeType.TYPE_REMOVED_FROM_UNION,description:"".concat(oldPossibleType.name," was removed from union type ").concat(oldType.name,".")})}return schemaChanges}(_oldType,newType)):isInputObjectType(_oldType)&&isInputObjectType(newType)?schemaChanges.push.apply(schemaChanges,function(oldType,newType){for(var schemaChanges=[],fieldsDiff=diff(objectValues(oldType.getFields()),objectValues(newType.getFields())),_i16=0,_fieldsDiff$added2=fieldsDiff.added;_i16<_fieldsDiff$added2.length;_i16++){var newField=_fieldsDiff$added2[_i16];isRequiredInputField(newField)?schemaChanges.push({type:BreakingChangeType.REQUIRED_INPUT_FIELD_ADDED,description:"A required field ".concat(newField.name," on input type ").concat(oldType.name," was added.")}):schemaChanges.push({type:DangerousChangeType.OPTIONAL_INPUT_FIELD_ADDED,description:"An optional field ".concat(newField.name," on input type ").concat(oldType.name," was added.")})}for(var _i18=0,_fieldsDiff$removed2=fieldsDiff.removed;_i18<_fieldsDiff$removed2.length;_i18++){var oldField=_fieldsDiff$removed2[_i18];schemaChanges.push({type:BreakingChangeType.FIELD_REMOVED,description:"".concat(oldType.name,".").concat(oldField.name," was removed.")})}for(var _i20=0,_fieldsDiff$persisted2=fieldsDiff.persisted;_i20<_fieldsDiff$persisted2.length;_i20++){var _ref6=_fieldsDiff$persisted2[_i20],_oldField=_ref6[0],_newField=_ref6[1];isChangeSafeForInputObjectFieldOrFieldArg(_oldField.type,_newField.type)||schemaChanges.push({type:BreakingChangeType.FIELD_CHANGED_KIND,description:"".concat(oldType.name,".").concat(_oldField.name," changed type from ")+"".concat(String(_oldField.type)," to ").concat(String(_newField.type),".")})}return schemaChanges}(_oldType,newType)):isObjectType(_oldType)&&isObjectType(newType)||isInterfaceType(_oldType)&&isInterfaceType(newType)?schemaChanges.push.apply(schemaChanges,(function(oldType,newType){for(var schemaChanges=[],fieldsDiff=diff(objectValues(oldType.getFields()),objectValues(newType.getFields())),_i34=0,_fieldsDiff$removed4=fieldsDiff.removed;_i34<_fieldsDiff$removed4.length;_i34++){var oldField=_fieldsDiff$removed4[_i34];schemaChanges.push({type:BreakingChangeType.FIELD_REMOVED,description:"".concat(oldType.name,".").concat(oldField.name," was removed.")})}for(var _i36=0,_fieldsDiff$persisted4=fieldsDiff.persisted;_i36<_fieldsDiff$persisted4.length;_i36++){var _ref8=_fieldsDiff$persisted4[_i36],_oldField2=_ref8[0],newField=_ref8[1];schemaChanges.push.apply(schemaChanges,function(oldType,oldField,newField){for(var schemaChanges=[],argsDiff=diff(oldField.args,newField.args),_i38=0,_argsDiff$removed4=argsDiff.removed;_i38<_argsDiff$removed4.length;_i38++){var oldArg=_argsDiff$removed4[_i38];schemaChanges.push({type:BreakingChangeType.ARG_REMOVED,description:"".concat(oldType.name,".").concat(oldField.name," arg ").concat(oldArg.name," was removed.")})}for(var _i40=0,_argsDiff$persisted2=argsDiff.persisted;_i40<_argsDiff$persisted2.length;_i40++){var _ref10=_argsDiff$persisted2[_i40],_oldArg=_ref10[0],newArg=_ref10[1];if(isChangeSafeForInputObjectFieldOrFieldArg(_oldArg.type,newArg.type)){if(void 0!==_oldArg.defaultValue)if(void 0===newArg.defaultValue)schemaChanges.push({type:DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,description:"".concat(oldType.name,".").concat(oldField.name," arg ").concat(_oldArg.name," defaultValue was removed.")});else{var oldValueStr=stringifyValue(_oldArg.defaultValue,_oldArg.type),newValueStr=stringifyValue(newArg.defaultValue,newArg.type);oldValueStr!==newValueStr&&schemaChanges.push({type:DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,description:"".concat(oldType.name,".").concat(oldField.name," arg ").concat(_oldArg.name," has changed defaultValue from ").concat(oldValueStr," to ").concat(newValueStr,".")})}}else schemaChanges.push({type:BreakingChangeType.ARG_CHANGED_KIND,description:"".concat(oldType.name,".").concat(oldField.name," arg ").concat(_oldArg.name," has changed type from ")+"".concat(String(_oldArg.type)," to ").concat(String(newArg.type),".")})}for(var _i42=0,_argsDiff$added4=argsDiff.added;_i42<_argsDiff$added4.length;_i42++){var _newArg=_argsDiff$added4[_i42];isRequiredArgument(_newArg)?schemaChanges.push({type:BreakingChangeType.REQUIRED_ARG_ADDED,description:"A required arg ".concat(_newArg.name," on ").concat(oldType.name,".").concat(oldField.name," was added.")}):schemaChanges.push({type:DangerousChangeType.OPTIONAL_ARG_ADDED,description:"An optional arg ".concat(_newArg.name," on ").concat(oldType.name,".").concat(oldField.name," was added.")})}return schemaChanges}(oldType,_oldField2,newField)),!function isChangeSafeForObjectOrInterfaceField(oldType,newType){return isListType(oldType)?isListType(newType)&&isChangeSafeForObjectOrInterfaceField(oldType.ofType,newType.ofType)||isNonNullType(newType)&&isChangeSafeForObjectOrInterfaceField(oldType,newType.ofType):isNonNullType(oldType)?isNonNullType(newType)&&isChangeSafeForObjectOrInterfaceField(oldType.ofType,newType.ofType):isNamedType(newType)&&oldType.name===newType.name||isNonNullType(newType)&&isChangeSafeForObjectOrInterfaceField(oldType,newType.ofType)}(_oldField2.type,newField.type)&&schemaChanges.push({type:BreakingChangeType.FIELD_CHANGED_KIND,description:"".concat(oldType.name,".").concat(_oldField2.name," changed type from ")+"".concat(String(_oldField2.type)," to ").concat(String(newField.type),".")})}return schemaChanges})(_oldType,newType).concat(function(oldType,newType){for(var schemaChanges=[],interfacesDiff=diff(oldType.getInterfaces(),newType.getInterfaces()),_i30=0,_interfacesDiff$added2=interfacesDiff.added;_i30<_interfacesDiff$added2.length;_i30++){var newInterface=_interfacesDiff$added2[_i30];schemaChanges.push({type:DangerousChangeType.IMPLEMENTED_INTERFACE_ADDED,description:"".concat(newInterface.name," added to interfaces implemented by ").concat(oldType.name,".")})}for(var _i32=0,_interfacesDiff$remov2=interfacesDiff.removed;_i32<_interfacesDiff$remov2.length;_i32++){var oldInterface=_interfacesDiff$remov2[_i32];schemaChanges.push({type:BreakingChangeType.IMPLEMENTED_INTERFACE_REMOVED,description:"".concat(oldType.name," no longer implements interface ").concat(oldInterface.name,".")})}return schemaChanges}(_oldType,newType))):_oldType.constructor!==newType.constructor&&schemaChanges.push({type:BreakingChangeType.TYPE_CHANGED_KIND,description:"".concat(_oldType.name," changed from ")+"".concat(typeKindName(_oldType)," to ").concat(typeKindName(newType),".")})}return schemaChanges}(oldSchema,newSchema),function(oldSchema,newSchema){for(var schemaChanges=[],directivesDiff=diff(oldSchema.getDirectives(),newSchema.getDirectives()),_i2=0,_directivesDiff$remov2=directivesDiff.removed;_i2<_directivesDiff$remov2.length;_i2++){var oldDirective=_directivesDiff$remov2[_i2];schemaChanges.push({type:BreakingChangeType.DIRECTIVE_REMOVED,description:"".concat(oldDirective.name," was removed.")})}for(var _i4=0,_directivesDiff$persi2=directivesDiff.persisted;_i4<_directivesDiff$persi2.length;_i4++){for(var _ref2=_directivesDiff$persi2[_i4],_oldDirective=_ref2[0],newDirective=_ref2[1],argsDiff=diff(_oldDirective.args,newDirective.args),_i6=0,_argsDiff$added2=argsDiff.added;_i6<_argsDiff$added2.length;_i6++){var newArg=_argsDiff$added2[_i6];isRequiredArgument(newArg)&&schemaChanges.push({type:BreakingChangeType.REQUIRED_DIRECTIVE_ARG_ADDED,description:"A required arg ".concat(newArg.name," on directive ").concat(_oldDirective.name," was added.")})}for(var _i8=0,_argsDiff$removed2=argsDiff.removed;_i8<_argsDiff$removed2.length;_i8++){var oldArg=_argsDiff$removed2[_i8];schemaChanges.push({type:BreakingChangeType.DIRECTIVE_ARG_REMOVED,description:"".concat(oldArg.name," was removed from ").concat(_oldDirective.name,".")})}_oldDirective.isRepeatable&&!newDirective.isRepeatable&&schemaChanges.push({type:BreakingChangeType.DIRECTIVE_REPEATABLE_REMOVED,description:"Repeatable flag was removed from ".concat(_oldDirective.name,".")});for(var _i10=0,_oldDirective$locatio2=_oldDirective.locations;_i10<_oldDirective$locatio2.length;_i10++){var location=_oldDirective$locatio2[_i10];-1===newDirective.locations.indexOf(location)&&schemaChanges.push({type:BreakingChangeType.DIRECTIVE_LOCATION_REMOVED,description:"".concat(location," was removed from ").concat(_oldDirective.name,".")})}}return schemaChanges}(oldSchema,newSchema))}function isChangeSafeForInputObjectFieldOrFieldArg(oldType,newType){return isListType(oldType)?isListType(newType)&&isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType,newType.ofType):isNonNullType(oldType)?isNonNullType(newType)&&isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType,newType.ofType)||!isNonNullType(newType)&&isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType,newType):isNamedType(newType)&&oldType.name===newType.name}function typeKindName(type){return isScalarType(type)?"a Scalar type":isObjectType(type)?"an Object type":isInterfaceType(type)?"an Interface type":isUnionType(type)?"a Union type":isEnumType(type)?"an Enum type":isInputObjectType(type)?"an Input type":void invariant(0,"Unexpected type: "+inspect(type))}function stringifyValue(value1,type){var ast=astFromValue(value1,type);return null!=ast||invariant(0),print(visit(ast,{ObjectValue:function(objectNode){var fields=[].concat(objectNode.fields);return fields.sort(function(fieldA,fieldB){return naturalCompare(fieldA.name.value,fieldB.name.value)}),findBreakingChanges_objectSpread(findBreakingChanges_objectSpread({},objectNode),{},{fields:fields})}}))}function diff(oldArray,newArray){for(var added=[],removed=[],persisted=[],oldMap=keyMap(oldArray,function(_ref11){return _ref11.name}),newMap=keyMap(newArray,function(_ref12){return _ref12.name}),_i44=0;_i44<oldArray.length;_i44++){var oldItem=oldArray[_i44],newItem=newMap[oldItem.name];void 0===newItem?removed.push(oldItem):persisted.push([oldItem,newItem])}for(var _i46=0;_i46<newArray.length;_i46++){var _newItem=newArray[_i46];void 0===oldMap[_newItem.name]&&added.push(_newItem)}return{added:added,persisted:persisted,removed:removed}}function findDeprecatedUsages(schema,ast){return validate(schema,ast,[NoDeprecatedCustomRule])}}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},__webpack_require__.d=(exports1,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports1,key)&&Object.defineProperty(exports1,key,{enumerable:!0,get:definition[key]})},__webpack_require__.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports1=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports1,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports1,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module);var __webpack_exports__={};for(var __rspack_i in(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{run:()=>run});var _teambit_harmony__rspack_import_0=__webpack_require__(2337),_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_aspect_js__rspack_import_1=__webpack_require__(3389),_home_circleci_bit_bit_node_modules_teambit_docs_dist_docs_aspect_js__rspack_import_2=__webpack_require__(2021),_home_circleci_bit_bit_node_modules_teambit_compositions_dist_compositions_aspect_js__rspack_import_3=__webpack_require__(3453),_home_circleci_bit_bit_node_modules_teambit_pubsub_dist_pubsub_aspect_js__rspack_import_4=__webpack_require__(6525),_home_circleci_bit_bit_node_modules_teambit_react_dist_react_aspect_js__rspack_import_5=__webpack_require__(7075),_home_circleci_bit_bit_node_modules_teambit_command_bar_dist_command_bar_aspect_js__rspack_import_6=__webpack_require__(7463);__webpack_require__(755),__webpack_require__(5995),__webpack_require__(6195),__webpack_require__(9283),__webpack_require__(3893),__webpack_require__(497);let run=(config,customAspects=[])=>{let isBrowser="u">typeof window,windowConfig=isBrowser?window.harmonyAppConfig:void 0,mergedConfig={...config,...windowConfig};_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_aspect_js__rspack_import_1.default.id="teambit.preview/preview",_home_circleci_bit_bit_node_modules_teambit_docs_dist_docs_aspect_js__rspack_import_2.default.id="teambit.docs/docs",_home_circleci_bit_bit_node_modules_teambit_compositions_dist_compositions_aspect_js__rspack_import_3.default.id="teambit.compositions/compositions",_home_circleci_bit_bit_node_modules_teambit_pubsub_dist_pubsub_aspect_js__rspack_import_4.default.id="teambit.harmony/pubsub",_home_circleci_bit_bit_node_modules_teambit_react_dist_react_aspect_js__rspack_import_5.default.id="teambit.react/react",_home_circleci_bit_bit_node_modules_teambit_command_bar_dist_command_bar_aspect_js__rspack_import_6.default.id="teambit.explorer/command-bar",isBrowser&&function(...props){_teambit_harmony__rspack_import_0.Harmony.load([...customAspects,_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_aspect_js__rspack_import_1.default,_home_circleci_bit_bit_node_modules_teambit_docs_dist_docs_aspect_js__rspack_import_2.default,_home_circleci_bit_bit_node_modules_teambit_compositions_dist_compositions_aspect_js__rspack_import_3.default,_home_circleci_bit_bit_node_modules_teambit_pubsub_dist_pubsub_aspect_js__rspack_import_4.default,_home_circleci_bit_bit_node_modules_teambit_react_dist_react_aspect_js__rspack_import_5.default,_home_circleci_bit_bit_node_modules_teambit_command_bar_dist_command_bar_aspect_js__rspack_import_6.default],"preview",mergedConfig).then(harmony=>harmony.run().then(()=>harmony.get("teambit.preview/preview")).then(rootExtension=>{let ssrSetup=!isBrowser&&rootExtension.setupSsr,setup=rootExtension.setup;return Promise.resolve((ssrSetup||setup||function(){}).bind(rootExtension)()).then(()=>rootExtension)}).then(rootExtension=>isBrowser?rootExtension.render("teambit.workspace/workspace",...props):rootExtension.renderSsr("teambit.workspace/workspace",...props)).catch(err=>{throw err}))}()}})(),exports.run=__webpack_exports__.run,__webpack_exports__)-1===["run"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0})})();
|