UNPKG

@r3l/app

Version:
2 lines 51.5 kB
(window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[]).push([[2],{"../../node_modules/@apollo/react-hooks/lib/react-hooks.esm.js":function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return v})),r.d(t,"c",(function(){return f}));var n=r("../../node_modules/@apollo/react-common/lib/react-common.esm.js"),i=r("../../node_modules/tslib/tslib.es6.js"),s=r("../../node_modules/react/index.js"),o=r.n(s),a=r("../../node_modules/apollo-client/bundle.esm.js"),c=r("../../node_modules/@wry/equality/lib/equality.esm.js"),u=r("../../node_modules/ts-invariant/lib/invariant.esm.js"),l=function(){function e(e,t){this.isMounted=!1,this.previousOptions={},this.context={},this.options={},this.options=e||{},this.context=t||{}}return e.prototype.getOptions=function(){return this.options},e.prototype.setOptions=function(e,t){void 0===t&&(t=!1),t&&!Object(c.a)(this.options,e)&&(this.previousOptions=this.options),this.options=e},e.prototype.unmount=function(){this.isMounted=!1},e.prototype.refreshClient=function(){var e=this.options&&this.options.client||this.context&&this.context.client;Object(u.b)(!!e,2);var t=!1;return e!==this.client&&(t=!0,this.client=e,this.cleanup()),{client:this.client,isNew:t}},e.prototype.verifyDocumentType=function(e,t){var r=Object(n.e)(e);Object(n.d)(t),Object(n.d)(r.type);Object(u.b)(r.type===t,3)},e}(),p=function(e){function t(t){var r=t.options,n=t.context,i=t.onNewData,s=e.call(this,r,n)||this;return s.previousData={},s.currentObservable={},s.runLazy=!1,s.runLazyQuery=function(e){s.cleanup(),s.runLazy=!0,s.lazyOptions=e,s.onNewData()},s.getExecuteResult=function(){var e=s.getQueryResult();return s.startQuerySubscription(),e},s.obsRefetch=function(e){return s.currentObservable.query.refetch(e)},s.obsFetchMore=function(e){return s.currentObservable.query.fetchMore(e)},s.obsUpdateQuery=function(e){return s.currentObservable.query.updateQuery(e)},s.obsStartPolling=function(e){s.currentObservable&&s.currentObservable.query&&s.currentObservable.query.startPolling(e)},s.obsStopPolling=function(){s.currentObservable&&s.currentObservable.query&&s.currentObservable.query.stopPolling()},s.obsSubscribeToMore=function(e){return s.currentObservable.query.subscribeToMore(e)},s.onNewData=i,s}return Object(i.c)(t,e),t.prototype.execute=function(){this.refreshClient();var e=this.getOptions(),t=e.skip,r=e.query;return(t||r!==this.previousData.query)&&(this.removeQuerySubscription(),this.previousData.query=r),this.updateObservableQuery(),this.isMounted&&this.startQuerySubscription(),this.getExecuteSsrResult()||this.getExecuteResult()},t.prototype.executeLazy=function(){return this.runLazy?[this.runLazyQuery,this.execute()]:[this.runLazyQuery,{loading:!1,networkStatus:a.c.ready,called:!1,data:void 0}]},t.prototype.fetchData=function(){var e=this.getOptions();if(e.skip||!1===e.ssr)return!1;var t=this.currentObservable.query;return!!t.getCurrentResult().loading&&t.result()},t.prototype.afterExecute=function(e){var t=(void 0===e?{}:e).lazy,r=void 0!==t&&t;return this.isMounted=!0,r&&!this.runLazy||this.handleErrorOrCompleted(),this.previousOptions=this.getOptions(),this.unmount.bind(this)},t.prototype.cleanup=function(){this.removeQuerySubscription(),delete this.currentObservable.query,delete this.previousData.result},t.prototype.getOptions=function(){var t=e.prototype.getOptions.call(this);return this.lazyOptions&&(t.variables=Object(i.a)(Object(i.a)({},t.variables),this.lazyOptions.variables),t.context=Object(i.a)(Object(i.a)({},t.context),this.lazyOptions.context)),this.runLazy&&delete t.skip,t},t.prototype.ssrInitiated=function(){return this.context&&this.context.renderPromises},t.prototype.getExecuteSsrResult=function(){var e,t=!1===this.getOptions().ssr,r=this.refreshClient().client.disableNetworkFetches,n=Object(i.a)({loading:!0,networkStatus:a.c.loading,called:!0,data:void 0,stale:!1,client:this.client},this.observableQueryFields());return t&&(this.ssrInitiated()||r)?(this.previousData.result=n,n):(this.ssrInitiated()&&(e=this.context.renderPromises.addQueryPromise(this,this.getExecuteResult)||n),e)},t.prototype.prepareObservableQueryOptions=function(){var e=this.getOptions();this.verifyDocumentType(e.query,n.b.Query);var t=e.displayName||"Query";return!this.ssrInitiated()||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e.fetchPolicy="cache-first"),Object(i.a)(Object(i.a)({},e),{displayName:t,context:e.context,metadata:{reactComponent:{displayName:t}}})},t.prototype.initializeObservableQuery=function(){var e,t;if(this.ssrInitiated()&&(this.currentObservable.query=this.context.renderPromises.getSSRObservable(this.getOptions())),!this.currentObservable.query){var r=this.prepareObservableQueryOptions();this.previousData.observableQueryOptions=Object(i.a)(Object(i.a)({},r),{children:null}),this.currentObservable.query=this.refreshClient().client.watchQuery(Object(i.a)({},r)),this.ssrInitiated()&&(null===(t=null===(e=this.context)||void 0===e?void 0:e.renderPromises)||void 0===t||t.registerSSRObservable(this.currentObservable.query,r))}},t.prototype.updateObservableQuery=function(){if(this.currentObservable.query){var e=Object(i.a)(Object(i.a)({},this.prepareObservableQueryOptions()),{children:null});Object(c.a)(e,this.previousData.observableQueryOptions)||(this.previousData.observableQueryOptions=e,this.currentObservable.query.setOptions(e).catch((function(){})))}else this.initializeObservableQuery()},t.prototype.startQuerySubscription=function(){var e=this;if(!this.currentObservable.subscription&&!this.getOptions().skip){var t=this.currentObservable.query;this.currentObservable.subscription=t.subscribe({next:function(t){var r=t.loading,n=t.networkStatus,i=t.data,s=e.previousData.result;s&&s.loading===r&&s.networkStatus===n&&Object(c.a)(s.data,i)||e.onNewData()},error:function(t){if(e.resubscribeToQuery(),!t.hasOwnProperty("graphQLErrors"))throw t;var r=e.previousData.result;(r&&r.loading||!Object(c.a)(t,e.previousData.error))&&(e.previousData.error=t,e.onNewData())}})}},t.prototype.resubscribeToQuery=function(){this.removeQuerySubscription();var e=this.currentObservable.query.getLastError(),t=this.currentObservable.query.getLastResult();this.currentObservable.query.resetLastResults(),this.startQuerySubscription(),Object.assign(this.currentObservable.query,{lastError:e,lastResult:t})},t.prototype.getQueryResult=function(){var e=this.observableQueryFields(),t=this.getOptions();if(t.skip)e=Object(i.a)(Object(i.a)({},e),{data:void 0,error:void 0,loading:!1,called:!0});else{var r=this.currentObservable.query.getCurrentResult(),n=r.loading,s=r.partial,o=r.networkStatus,c=r.errors,u=r.error,l=r.data;if(c&&c.length>0&&(u=new a.b({graphQLErrors:c})),e=Object(i.a)(Object(i.a)({},e),{loading:n,networkStatus:o,error:u,called:!0}),n){var p=this.previousData.result&&this.previousData.result.data;e.data=p&&l?Object(i.a)(Object(i.a)({},p),l):p||l}else if(u)Object.assign(e,{data:(this.currentObservable.query.getLastResult()||{}).data});else{var h=this.currentObservable.query.options.fetchPolicy;if(t.partialRefetch&&!l&&s&&"cache-only"!==h)return Object.assign(e,{loading:!0,networkStatus:a.c.loading}),e.refetch(),e;e.data=l}}return e.client=this.client,this.previousData.loading=this.previousData.result&&this.previousData.result.loading||!1,this.previousData.result=e,this.currentObservable.query&&this.currentObservable.query.resetQueryStoreErrors(),e},t.prototype.handleErrorOrCompleted=function(){if(this.currentObservable.query&&this.previousData.result){var e=this.previousData.result,t=e.data,r=e.loading,n=e.error;if(!r){var i=this.getOptions(),s=i.query,o=i.variables,a=i.onCompleted,u=i.onError;if(this.previousOptions&&!this.previousData.loading&&Object(c.a)(this.previousOptions.query,s)&&Object(c.a)(this.previousOptions.variables,o))return;a&&!n?a(t):u&&n&&u(n)}}},t.prototype.removeQuerySubscription=function(){this.currentObservable.subscription&&(this.currentObservable.subscription.unsubscribe(),delete this.currentObservable.subscription)},t.prototype.observableQueryFields=function(){return{variables:this.currentObservable.query.variables,refetch:this.obsRefetch,fetchMore:this.obsFetchMore,updateQuery:this.obsUpdateQuery,startPolling:this.obsStartPolling,stopPolling:this.obsStopPolling,subscribeToMore:this.obsSubscribeToMore}},t}(l);function h(e,t,r){void 0===r&&(r=!1);var o=Object(s.useContext)(Object(n.c)()),a=Object(s.useReducer)((function(e){return e+1}),0),u=a[0],l=a[1],h=t?Object(i.a)(Object(i.a)({},t),{query:e}):{query:e},f=Object(s.useRef)(),d=f.current||new p({options:h,context:o,onNewData:function(){d.ssrInitiated()?l():Promise.resolve().then(l)}});d.setOptions(h),d.context=o,d.ssrInitiated()&&!f.current&&(f.current=d);var v,b,y,O={options:Object(i.a)(Object(i.a)({},h),{onError:void 0,onCompleted:void 0}),context:o,tick:u},E=(v=function(){return r?d.executeLazy():d.execute()},b=O,(y=Object(s.useRef)()).current&&Object(c.a)(b,y.current.key)||(y.current={key:b,value:v()}),y.current.value),m=r?E[1]:E;return Object(s.useEffect)((function(){return f.current||(f.current=d),function(){return d.cleanup()}}),[]),Object(s.useEffect)((function(){return d.afterExecute({lazy:r})}),[m.loading,m.networkStatus,m.error,m.data]),E}function f(e,t){return h(e,t,!1)}var d=function(e){function t(t){var r=t.options,i=t.context,s=t.result,o=t.setResult,a=e.call(this,r,i)||this;return a.runMutation=function(e){void 0===e&&(e={}),a.onMutationStart();var t=a.generateNewMutationId();return a.mutate(e).then((function(e){return a.onMutationCompleted(e,t),e})).catch((function(e){if(a.onMutationError(e,t),!a.getOptions().onError)throw e}))},a.verifyDocumentType(r.mutation,n.b.Mutation),a.result=s,a.setResult=o,a.mostRecentMutationId=0,a}return Object(i.c)(t,e),t.prototype.execute=function(e){return this.isMounted=!0,this.verifyDocumentType(this.getOptions().mutation,n.b.Mutation),e.client=this.refreshClient().client,[this.runMutation,e]},t.prototype.afterExecute=function(){return this.isMounted=!0,this.unmount.bind(this)},t.prototype.cleanup=function(){},t.prototype.mutate=function(e){var t=this.getOptions(),r=t.mutation,n=t.variables,s=t.optimisticResponse,o=t.update,a=t.context,c=void 0===a?{}:a,u=t.awaitRefetchQueries,l=void 0!==u&&u,p=t.fetchPolicy,h=Object(i.a)({},e),f=Object.assign({},n,h.variables);return delete h.variables,this.refreshClient().client.mutate(Object(i.a)({mutation:r,optimisticResponse:s,refetchQueries:h.refetchQueries||this.getOptions().refetchQueries,awaitRefetchQueries:l,update:o,context:c,fetchPolicy:p,variables:f},h))},t.prototype.onMutationStart=function(){this.result.loading||this.getOptions().ignoreResults||this.updateResult({loading:!0,error:void 0,data:void 0,called:!0})},t.prototype.onMutationCompleted=function(e,t){var r=this.getOptions(),n=r.onCompleted,i=r.ignoreResults,s=e.data,o=e.errors,c=o&&o.length>0?new a.b({graphQLErrors:o}):void 0;this.isMostRecentMutation(t)&&!i&&this.updateResult({called:!0,loading:!1,data:s,error:c}),n&&n(s)},t.prototype.onMutationError=function(e,t){var r=this.getOptions().onError;this.isMostRecentMutation(t)&&this.updateResult({loading:!1,error:e,data:void 0,called:!0}),r&&r(e)},t.prototype.generateNewMutationId=function(){return++this.mostRecentMutationId},t.prototype.isMostRecentMutation=function(e){return this.mostRecentMutationId===e},t.prototype.updateResult=function(e){!this.isMounted||this.previousResult&&Object(c.a)(this.previousResult,e)||(this.setResult(e),this.previousResult=e)},t}(l);function v(e,t){var r=Object(s.useContext)(Object(n.c)()),o=Object(s.useState)({called:!1,loading:!1}),a=o[0],c=o[1],u=t?Object(i.a)(Object(i.a)({},t),{mutation:e}):{mutation:e},l=Object(s.useRef)();var p=(l.current||(l.current=new d({options:u,context:r,result:a,setResult:c})),l.current);return p.setOptions(u),p.context=r,Object(s.useEffect)((function(){return p.afterExecute()})),p.execute(a)}!function(e){function t(t){var r=t.options,n=t.context,i=t.setResult,s=e.call(this,r,n)||this;return s.currentObservable={},s.setResult=i,s.initialize(r),s}Object(i.c)(t,e),t.prototype.execute=function(e){if(!0===this.getOptions().skip)return this.cleanup(),{loading:!1,error:void 0,data:void 0,variables:this.getOptions().variables};var t=e;this.refreshClient().isNew&&(t=this.getLoadingResult());var r=this.getOptions().shouldResubscribe;return"function"==typeof r&&(r=!!r(this.getOptions())),!1!==r&&this.previousOptions&&Object.keys(this.previousOptions).length>0&&(this.previousOptions.subscription!==this.getOptions().subscription||!Object(c.a)(this.previousOptions.variables,this.getOptions().variables)||this.previousOptions.skip!==this.getOptions().skip)&&(this.cleanup(),t=this.getLoadingResult()),this.initialize(this.getOptions()),this.startSubscription(),this.previousOptions=this.getOptions(),Object(i.a)(Object(i.a)({},t),{variables:this.getOptions().variables})},t.prototype.afterExecute=function(){this.isMounted=!0},t.prototype.cleanup=function(){this.endSubscription(),delete this.currentObservable.query},t.prototype.initialize=function(e){this.currentObservable.query||!0===this.getOptions().skip||(this.currentObservable.query=this.refreshClient().client.subscribe({query:e.subscription,variables:e.variables,fetchPolicy:e.fetchPolicy}))},t.prototype.startSubscription=function(){this.currentObservable.subscription||(this.currentObservable.subscription=this.currentObservable.query.subscribe({next:this.updateCurrentData.bind(this),error:this.updateError.bind(this),complete:this.completeSubscription.bind(this)}))},t.prototype.getLoadingResult=function(){return{loading:!0,error:void 0,data:void 0}},t.prototype.updateResult=function(e){this.isMounted&&this.setResult(e)},t.prototype.updateCurrentData=function(e){var t=this.getOptions().onSubscriptionData;this.updateResult({data:e.data,loading:!1,error:void 0}),t&&t({client:this.refreshClient().client,subscriptionData:e})},t.prototype.updateError=function(e){this.updateResult({error:e,loading:!1})},t.prototype.completeSubscription=function(){var e=this.getOptions().onSubscriptionComplete;e&&e(),this.endSubscription()},t.prototype.endSubscription=function(){this.currentObservable.subscription&&(this.currentObservable.subscription.unsubscribe(),delete this.currentObservable.subscription)}}(l);function b(){var e=o.a.useContext(Object(n.c)()).client;return Object(u.b)(e,1),e}!function(){function e(){this.queryPromises=new Map,this.queryInfoTrie=new Map}e.prototype.registerSSRObservable=function(e,t){this.lookupQueryInfo(t).observable=e},e.prototype.getSSRObservable=function(e){return this.lookupQueryInfo(e).observable},e.prototype.addQueryPromise=function(e,t){return this.lookupQueryInfo(e.getOptions()).seen?t():(this.queryPromises.set(e.getOptions(),new Promise((function(t){t(e.fetchData())}))),null)},e.prototype.hasPromises=function(){return this.queryPromises.size>0},e.prototype.consumeAndAwaitPromises=function(){var e=this,t=[];return this.queryPromises.forEach((function(r,n){e.lookupQueryInfo(n).seen=!0,t.push(r)})),this.queryPromises.clear(),Promise.all(t)},e.prototype.lookupQueryInfo=function(e){var t=this.queryInfoTrie,r=e.query,n=e.variables,i=t.get(r)||new Map;t.has(r)||t.set(r,i);var s=JSON.stringify(n),o=i.get(s)||{seen:!1,observable:null};return i.has(s)||i.set(s,o),o}}()},"../../node_modules/graphql-tag/lib/index.js":function(e,t,r){"use strict";r.d(t,"b",(function(){return se}));var n=function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.create;Object.create;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"function"==typeof Symbol&&null!=Symbol.iterator&&Symbol.iterator,"function"==typeof Symbol&&null!=Symbol.asyncIterator&&Symbol.asyncIterator;var s="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function o(e,t){for(var r,n=/\r\n|[\n\r]/g,i=1,s=t+1;(r=n.exec(e.body))&&r.index<t;)i+=1,s=t+1-(r.index+r[0].length);return{line:i,column:s}}function a(e){return c(e.source,o(e.source,e.start))}function c(e,t){var r=e.locationOffset.column-1,n=l(r)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=1===t.line?r:0,c=t.column+a,p="".concat(e.name,":").concat(o,":").concat(c,"\n"),h=n.split(/\r\n|[\n\r]/g),f=h[i];if(f.length>120){for(var d=Math.floor(c/80),v=c%80,b=[],y=0;y<f.length;y+=80)b.push(f.slice(y,y+80));return p+u([["".concat(o),b[0]]].concat(b.slice(1,d+1).map((function(e){return["",e]})),[[" ",l(v-1)+"^"],["",b[d+1]]]))}return p+u([["".concat(o-1),h[i-1]],["".concat(o),f],["",l(c-1)+"^"],["".concat(o+1),h[i+1]]])}function u(e){var t=e.filter((function(e){e[0];return void 0!==e[1]})),r=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,n=e[0],i=e[1];return l(r-(t=n).length)+t+(i?" | "+i:" |")})).join("\n")}function l(e){return Array(e+1).join(" ")}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?d(e):t}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){var t="function"==typeof Map?new Map:void 0;return(v=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return b(e,arguments,E(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),O(n,e)})(e)}function b(e,t,r){return(b=y()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&O(i,r.prototype),i}).apply(null,arguments)}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(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 O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&O(e,t)}(v,e);var t,r,n,u,l,p=(t=v,r=y(),function(){var e,n=E(t);if(r){var i=E(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return f(this,e)});function v(e,t,r,n,s,a,c){var u,l,h,b,y;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),y=p.call(this,e);var O,E=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,m=r;!m&&E&&(m=null===(O=E[0].loc)||void 0===O?void 0:O.source);var N,T=n;!T&&E&&(T=E.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),T&&0===T.length&&(T=void 0),n&&r?N=n.map((function(e){return o(r,e)})):E&&(N=E.reduce((function(e,t){return t.loc&&e.push(o(t.loc.source,t.loc.start)),e}),[]));var I,g=c;if(null==g&&null!=a){var _=a.extensions;"object"==i(I=_)&&null!==I&&(g=_)}return Object.defineProperties(d(y),{name:{value:"GraphQLError"},message:{value:e,enumerable:!0,writable:!0},locations:{value:null!==(u=N)&&void 0!==u?u:void 0,enumerable:null!=N},path:{value:null!=s?s:void 0,enumerable:null!=s},nodes:{value:null!=E?E:void 0},source:{value:null!==(l=m)&&void 0!==l?l:void 0},positions:{value:null!==(h=T)&&void 0!==h?h:void 0},originalError:{value:a},extensions:{value:null!==(b=g)&&void 0!==b?b:void 0,enumerable:null!=g}}),null!=a&&a.stack?(Object.defineProperty(d(y),"stack",{value:a.stack,writable:!0,configurable:!0}),f(y)):(Error.captureStackTrace?Error.captureStackTrace(d(y),v):Object.defineProperty(d(y),"stack",{value:Error().stack,writable:!0,configurable:!0}),y)}return n=v,(u=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r<n.length;r++){var i=n[r];i.loc&&(t+="\n\n"+a(i.loc))}else if(e.source&&e.locations)for(var s=0,o=e.locations;s<o.length;s++){var u=o[s];t+="\n\n"+c(e.source,u)}return t}(this)}},{key:s,get:function(){return"Object"}}])&&h(n.prototype,u),l&&h(n,l),v}(v(Error));function N(e,t,r){return new m("Syntax Error: ".concat(r),void 0,e,[t])}var T=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"});var I="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function g(e){var t=e.prototype.toJSON;"function"==typeof t||function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}(0),e.prototype.inspect=t,I&&(e.prototype[I]=t)}var _=function(){function e(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();g(_);var x=function(){function e(e,t,r,n,i,s,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=s,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();g(x);var D=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 k(e){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e){return S(e,[])}function S(e,t){switch(k(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var r=[].concat(t,[e]),n=function(e){var t=e[String(I)];if("function"==typeof t)return t;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==n){var i=n.call(e);if(i!==e)return"string"==typeof i?i:S(i,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var r=Math.min(10,e.length),n=e.length-r,i=[],s=0;s<r;++s)i.push(S(e[s],t));1===n?i.push("... 1 more item"):n>1&&i.push("... ".concat(n," more items"));return"["+i.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);if(0===r.length)return"{}";if(t.length>2)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]";return"{ "+r.map((function(r){return r+": "+S(e[r],t)})).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}function R(e,t){if(!Boolean(e))throw new Error(t)}var C=function(e,t){return e instanceof t};function w(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var L=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||R(0,"Body must be a string. Received: ".concat(A(e),".")),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||R(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||R(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r,n;return t=e,(r=[{key:s,get:function(){return"Source"}}])&&w(t.prototype,r),n&&w(t,n),e}();var F=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 M(e){var t=e.split(/\r\n|[\n\r]/g),r=function(e){for(var t,r=!0,n=!0,i=0,s=null,o=0;o<e.length;++o)switch(e.charCodeAt(o)){case 13:10===e.charCodeAt(o+1)&&++o;case 10:r=!1,n=!0,i=0;break;case 9:case 32:++i;break;default:n&&!r&&(null===s||i<s)&&(s=i),n=!1}return null!==(t=s)&&void 0!==t?t:0}(e);if(0!==r)for(var n=1;n<t.length;n++)t[n]=t[n].slice(r);for(var i=0;i<t.length&&P(t[i]);)++i;for(var s=t.length;s>i&&P(t[s-1]);)--s;return t.slice(i,s).join("\n")}function P(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}var j=function(){function e(e){var t=new x(D.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==D.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=U(this,e)}while(e.kind===D.COMMENT);return e},e}();function B(e){return isNaN(e)?D.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function U(e,t){for(var r=e.source,n=r.body,i=n.length,s=t.end;s<i;){var o=n.charCodeAt(s),a=e.line,c=1+s-e.lineStart;switch(o){case 65279:case 9:case 32:case 44:++s;continue;case 10:++s,++e.line,e.lineStart=s;continue;case 13:10===n.charCodeAt(s+1)?s+=2:++s,++e.line,e.lineStart=s;continue;case 33:return new x(D.BANG,s,s+1,a,c,t);case 35:return Q(r,s,a,c,t);case 36:return new x(D.DOLLAR,s,s+1,a,c,t);case 38:return new x(D.AMP,s,s+1,a,c,t);case 40:return new x(D.PAREN_L,s,s+1,a,c,t);case 41:return new x(D.PAREN_R,s,s+1,a,c,t);case 46:if(46===n.charCodeAt(s+1)&&46===n.charCodeAt(s+2))return new x(D.SPREAD,s,s+3,a,c,t);break;case 58:return new x(D.COLON,s,s+1,a,c,t);case 61:return new x(D.EQUALS,s,s+1,a,c,t);case 64:return new x(D.AT,s,s+1,a,c,t);case 91:return new x(D.BRACKET_L,s,s+1,a,c,t);case 93:return new x(D.BRACKET_R,s,s+1,a,c,t);case 123:return new x(D.BRACE_L,s,s+1,a,c,t);case 124:return new x(D.PIPE,s,s+1,a,c,t);case 125:return new x(D.BRACE_R,s,s+1,a,c,t);case 34:return 34===n.charCodeAt(s+1)&&34===n.charCodeAt(s+2)?Y(r,s,a,c,t,e):G(r,s,a,c,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return V(r,s,o,a,c,t);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:return J(r,s,a,c,t)}throw N(r,s,q(o))}var u=e.line,l=1+s-e.lineStart;return new x(D.EOF,i,i,u,l,t)}function q(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(B(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(B(e),".")}function Q(e,t,r,n,i){var s,o=e.body,a=t;do{s=o.charCodeAt(++a)}while(!isNaN(s)&&(s>31||9===s));return new x(D.COMMENT,t,a,r,n,i,o.slice(t+1,a))}function V(e,t,r,n,i,s){var o=e.body,a=r,c=t,u=!1;if(45===a&&(a=o.charCodeAt(++c)),48===a){if((a=o.charCodeAt(++c))>=48&&a<=57)throw N(e,c,"Invalid number, unexpected digit after 0: ".concat(B(a),"."))}else c=K(e,c,a),a=o.charCodeAt(c);if(46===a&&(u=!0,a=o.charCodeAt(++c),c=K(e,c,a),a=o.charCodeAt(c)),69!==a&&101!==a||(u=!0,43!==(a=o.charCodeAt(++c))&&45!==a||(a=o.charCodeAt(++c)),c=K(e,c,a),a=o.charCodeAt(c)),46===a||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(a))throw N(e,c,"Invalid number, expected digit but got: ".concat(B(a),"."));return new x(u?D.FLOAT:D.INT,t,c,n,i,s,o.slice(t,c))}function K(e,t,r){var n=e.body,i=t,s=r;if(s>=48&&s<=57){do{s=n.charCodeAt(++i)}while(s>=48&&s<=57);return i}throw N(e,i,"Invalid number, expected digit but got: ".concat(B(s),"."))}function G(e,t,r,n,i){for(var s,o,a,c,u=e.body,l=t+1,p=l,h=0,f="";l<u.length&&!isNaN(h=u.charCodeAt(l))&&10!==h&&13!==h;){if(34===h)return f+=u.slice(p,l),new x(D.STRING,t,l+1,r,n,i,f);if(h<32&&9!==h)throw N(e,l,"Invalid character within String: ".concat(B(h),"."));if(++l,92===h){switch(f+=u.slice(p,l-1),h=u.charCodeAt(l)){case 34:f+='"';break;case 47:f+="/";break;case 92:f+="\\";break;case 98:f+="\b";break;case 102:f+="\f";break;case 110:f+="\n";break;case 114:f+="\r";break;case 116:f+="\t";break;case 117:var d=(s=u.charCodeAt(l+1),o=u.charCodeAt(l+2),a=u.charCodeAt(l+3),c=u.charCodeAt(l+4),z(s)<<12|z(o)<<8|z(a)<<4|z(c));if(d<0){var v=u.slice(l+1,l+5);throw N(e,l,"Invalid character escape sequence: \\u".concat(v,"."))}f+=String.fromCharCode(d),l+=4;break;default:throw N(e,l,"Invalid character escape sequence: \\".concat(String.fromCharCode(h),"."))}p=++l}}throw N(e,l,"Unterminated string.")}function Y(e,t,r,n,i,s){for(var o=e.body,a=t+3,c=a,u=0,l="";a<o.length&&!isNaN(u=o.charCodeAt(a));){if(34===u&&34===o.charCodeAt(a+1)&&34===o.charCodeAt(a+2))return l+=o.slice(c,a),new x(D.BLOCK_STRING,t,a+3,r,n,i,M(l));if(u<32&&9!==u&&10!==u&&13!==u)throw N(e,a,"Invalid character within String: ".concat(B(u),"."));10===u?(++a,++s.line,s.lineStart=a):13===u?(10===o.charCodeAt(a+1)?a+=2:++a,++s.line,s.lineStart=a):92===u&&34===o.charCodeAt(a+1)&&34===o.charCodeAt(a+2)&&34===o.charCodeAt(a+3)?(l+=o.slice(c,a)+'"""',c=a+=4):++a}throw N(e,a,"Unterminated string.")}function z(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function J(e,t,r,n,i){for(var s=e.body,o=s.length,a=t+1,c=0;a!==o&&!isNaN(c=s.charCodeAt(a))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++a;return new x(D.NAME,t,a,r,n,i,s.slice(t,a))}var X=function(){function e(e,t){var r=function(e){return C(e,L)}(e)?e:new L(e);this._lexer=new j(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(D.NAME);return{kind:T.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:T.DOCUMENT,definitions:this.many(D.SOF,this.parseDefinition,D.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(D.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(D.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(D.BRACE_L))return{kind:T.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(D.NAME)&&(t=this.parseName()),{kind:T.OPERATION_DEFINITION,operation:r,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(D.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(D.PAREN_L,this.parseVariableDefinition,D.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:T.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(D.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(D.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(D.DOLLAR),{kind:T.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:T.SELECTION_SET,selections:this.many(D.BRACE_L,this.parseSelection,D.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(D.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(D.COLON)?(e=n,t=this.parseName()):t=n,{kind:T.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(D.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(D.PAREN_L,t,D.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(D.COLON),{kind:T.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:T.ARGUMENT,name:this.parseName(),value:(this.expectToken(D.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(D.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(D.NAME)?{kind:T.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:T.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:T.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:T.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case D.BRACKET_L:return this.parseList(e);case D.BRACE_L:return this.parseObject(e);case D.INT:return this._lexer.advance(),{kind:T.INT,value:t.value,loc:this.loc(t)};case D.FLOAT:return this._lexer.advance(),{kind:T.FLOAT,value:t.value,loc:this.loc(t)};case D.STRING:case D.BLOCK_STRING:return this.parseStringLiteral();case D.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:T.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:T.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:T.NULL,loc:this.loc(t)};default:return{kind:T.ENUM,value:t.value,loc:this.loc(t)}}case D.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:T.STRING,value:e.value,block:e.kind===D.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:T.LIST,values:this.any(D.BRACKET_L,(function(){return t.parseValueLiteral(e)}),D.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:T.OBJECT,fields:this.any(D.BRACE_L,(function(){return t.parseObjectField(e)}),D.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(D.COLON),{kind:T.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(D.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(D.AT),{kind:T.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(D.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(D.BRACKET_R),e={kind:T.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(D.BANG)?{kind:T.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:T.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===D.NAME)switch(e.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(e)},t.peekDescription=function(){return this.peek(D.STRING)||this.peek(D.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var r=this.parseDirectives(!0),n=this.many(D.BRACE_L,this.parseOperationTypeDefinition,D.BRACE_R);return{kind:T.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(D.COLON);var r=this.parseNamedType();return{kind:T.OPERATION_TYPE_DEFINITION,operation:t,type:r,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var r=this.parseName(),n=this.parseDirectives(!0);return{kind:T.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),s=this.parseFieldsDefinition();return{kind:T.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:s,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(D.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(D.AMP)||this.peek(D.NAME));return t}return this.delimitedMany(D.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(D.BRACE_L)&&this._lexer.lookahead().kind===D.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(D.BRACE_L,this.parseFieldDefinition,D.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(D.COLON);var i=this.parseTypeReference(),s=this.parseDirectives(!0);return{kind:T.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:s,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(D.PAREN_L,this.parseInputValueDef,D.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(D.COLON);var n,i=this.parseTypeReference();this.expectOptionalToken(D.EQUALS)&&(n=this.parseValueLiteral(!0));var s=this.parseDirectives(!0);return{kind:T.INPUT_VALUE_DEFINITION,description:t,name:r,type:i,defaultValue:n,directives:s,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),s=this.parseFieldsDefinition();return{kind:T.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:s,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:T.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(D.EQUALS)?this.delimitedMany(D.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:T.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(D.BRACE_L,this.parseEnumValueDefinition,D.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:T.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:T.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(D.BRACE_L,this.parseInputValueDef,D.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===D.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),r=this.optionalMany(D.BRACE_L,this.parseOperationTypeDefinition,D.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:T.SCHEMA_EXTENSION,directives:t,operationTypes:r,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),r=this.parseDirectives(!0);if(0===r.length)throw this.unexpected();return{kind:T.SCALAR_TYPE_EXTENSION,name:t,directives:r,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:T.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:T.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:T.UNION_TYPE_EXTENSION,name:t,directives:r,types:n,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:T.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:T.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(D.AT);var r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var s=this.parseDirectiveLocations();return{kind:T.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:s,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(D.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==F[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new _(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw N(this._lexer.source,t.start,"Expected ".concat(W(e),", found ").concat(H(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==D.NAME||t.value!==e)throw N(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(H(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===D.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return N(this._lexer.source,t.start,"Unexpected ".concat(H(t),"."))},t.any=function(e,t,r){this.expectToken(e);for(var n=[];!this.expectOptionalToken(r);)n.push(t.call(this));return n},t.optionalMany=function(e,t,r){if(this.expectOptionalToken(e)){var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}return[]},t.many=function(e,t,r){this.expectToken(e);var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r},e}();function H(e){var t=e.value;return W(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function W(e){return function(e){return e===D.BANG||e===D.DOLLAR||e===D.AMP||e===D.PAREN_L||e===D.PAREN_R||e===D.SPREAD||e===D.COLON||e===D.EQUALS||e===D.AT||e===D.BRACKET_L||e===D.BRACKET_R||e===D.BRACE_L||e===D.PIPE||e===D.BRACE_R}(e)?'"'.concat(e,'"'):e}var $=new Map,Z=new Map,ee=!0,te=!1;function re(e){return e.replace(/[\s,]+/g," ").trim()}function ne(e){var t=new Set,r=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var n=e.name.value,i=re((o=e.loc).source.body.substring(o.start,o.end)),s=Z.get(n);s&&!s.has(i)?ee&&console.warn("Warning: fragment with name "+n+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):s||Z.set(n,s=new Set),s.add(i),t.has(i)||(t.add(i),r.push(e))}else r.push(e);var o})),n(n({},e),{definitions:r})}function ie(e){var t=re(e);if(!$.has(t)){var r=function(e,t){return new X(e,t).parseDocument()}(e,{experimentalFragmentVariables:te});if(!r||"Document"!==r.kind)throw new Error("Not a valid GraphQL document.");$.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(r){var n=e[r];n&&"object"==typeof n&&t.add(n)}))}));var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}(ne(r)))}return $.get(t)}function se(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];"string"==typeof e&&(e=[e]);var n=e[0];return t.forEach((function(t,r){t&&"Document"===t.kind?n+=t.loc.source.body:n+=t,n+=e[r+1]})),ie(n)}var oe,ae={gql:se,resetCaches:function(){$.clear(),Z.clear()},disableFragmentWarnings:function(){ee=!1},enableExperimentalFragmentVariables:function(){te=!0},disableExperimentalFragmentVariables:function(){te=!1}};(oe=se||(se={})).gql=ae.gql,oe.resetCaches=ae.resetCaches,oe.disableFragmentWarnings=ae.disableFragmentWarnings,oe.enableExperimentalFragmentVariables=ae.enableExperimentalFragmentVariables,oe.disableExperimentalFragmentVariables=ae.disableExperimentalFragmentVariables,se.default=se;t.a=se}}]);
//# sourceMappingURL=vendors~activity-activity-container~admin-web-contractParams-container~admin-web-flagged-component~a~7cf7b174.bundle.4b3d8863bb1a083564a1.js.map