@rcsb/rcsb-saguaro-app 4.0.2 → 4.0.6
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/README.md +2 -2
- package/build/dist/RcsbFvWeb/RcsbFvBuilder/RcsbFvInstanceBuilder.d.ts +2 -3
- package/build/dist/RcsbFvWeb/WebTools/SelectButton.d.ts +6 -1
- package/build/dist/RcsbFvWeb/WebTools/WebToolsManager.d.ts +2 -3
- package/build/dist/app.js +1 -1
- package/build/dist/app.js.LICENSE.txt +1 -16
- package/build/dist/app.js.map +1 -1
- package/build/dist/worker.js +1 -1
- package/build/dist/worker.js.map +1 -1
- package/package.json +3 -4
- package/CHANGELOG.md +0 -262
package/build/dist/worker.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see worker.js.LICENSE.txt */
|
|
2
|
-
(()=>{"use strict";var e={535:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLRequest=void 0;const c=n(381),u=o(n(36)),l=o(n(518)),f=s(n(185));t.GraphQLRequest=class{constructor(e,t,n){switch(e){case"yosemite":this.client=new c.ApolloClient(Object.assign({link:(0,c.createHttpLink)(Object.assign({uri:l.schema},t)),cache:new c.InMemoryCache},n));break;case"borrego":this.client=new c.ApolloClient(Object.assign({link:(0,c.createHttpLink)(Object.assign({uri:u.schema},t)),cache:new c.InMemoryCache},n));break;default:this.client=new c.ApolloClient(Object.assign({link:(0,c.createHttpLink)(Object.assign({uri:e},t)),cache:new c.InMemoryCache},n))}}request(e,t){return a(this,void 0,void 0,(function*(){try{return(yield this.client.query({query:(0,f.default)(t),variables:Object.assign({},e)})).data}catch(e){throw console.error(e),e}}))}}},471:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbClient=void 0;const i=n(193),o=n(212),a=n(344),s=n(822),c=n(69),u=n(591),l=n(764);t.RcsbClient=class{constructor(){this.rcsbQueryAnnotations=new i.RcsbQueryAnnotations,this.rcsbQueryAlignment=new o.RcsbQueryAlignment,this.rcsbQueryEntityInstances=new a.RcsbQueryEntryInstances,this.rcsbQueryMutipleEntityInstances=new s.RcsbQueryMultipleEntityInstances,this.rcsbQueryEntryProperties=new c.RcsbQueryMultipleEntriesProperties,this.rcsbQueryInterfaceInstances=new u.RcsbQueryInterfaceInstances,this.rcsbQueryAssemblyInterfaces=new l.RcsbQueryAssemblyInterfaces}requestRcsbPdbAnnotations(e){return r(this,void 0,void 0,(function*(){return yield this.rcsbQueryAnnotations.request(e)}))}requestAlignment(e){return r(this,void 0,void 0,(function*(){return yield this.rcsbQueryAlignment.request(e)}))}requestEntityInstances(e){return r(this,void 0,void 0,(function*(){return yield this.rcsbQueryEntityInstances.request(e)}))}requestMultipleEntityInstances(e){return r(this,void 0,void 0,(function*(){return yield this.rcsbQueryMutipleEntityInstances.request(e)}))}requestMultipleEntriesProperties(e){return r(this,void 0,void 0,(function*(){return yield this.rcsbQueryEntryProperties.request(e)}))}requestInterfaceInstances(e){return r(this,void 0,void 0,(function*(){return yield this.rcsbQueryInterfaceInstances.request(e)}))}requestAssemblyInterfaces(e){return r(this,void 0,void 0,(function*(){return yield this.rcsbQueryAssemblyInterfaces.request(e)}))}}},212:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbQueryAlignment=void 0;const o=i(n(477)),a=n(535);t.RcsbQueryAlignment=class{constructor(){this.client=new a.GraphQLRequest("borrego")}request(e){return r(this,void 0,void 0,(function*(){try{return(yield this.client.request({queryId:e.queryId,from:e.from,to:e.to,range:e.range},o.default)).alignment}catch(e){throw console.error(e),e}}))}}},193:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbQueryAnnotations=void 0;const o=i(n(312)),a=n(535);t.RcsbQueryAnnotations=class{constructor(){this.client=new a.GraphQLRequest("borrego")}request(e){return r(this,void 0,void 0,(function*(){try{return(yield this.client.request({queryId:e.queryId,reference:e.reference,sources:e.sources,filters:e.filters,range:e.range},o.default)).annotations}catch(e){throw console.error(e),e}}))}}},764:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbQueryAssemblyInterfaces=void 0;const o=n(535),a=i(n(131));t.RcsbQueryAssemblyInterfaces=class{constructor(){this.client=new o.GraphQLRequest("yosemite")}request(e){return r(this,void 0,void 0,(function*(){try{return(yield this.client.request(e,a.default)).assemblies}catch(e){throw console.error(e),e}}))}}},344:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbQueryEntryInstances=void 0;const o=i(n(22)),a=n(535);t.RcsbQueryEntryInstances=class{constructor(){this.client=new a.GraphQLRequest("yosemite")}request(e){return r(this,void 0,void 0,(function*(){try{return(yield this.client.request({entry_id:e.entry_id},o.default)).entry}catch(e){throw console.error(e),e}}))}}},591:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbQueryInterfaceInstances=void 0;const o=n(535),a=i(n(650));t.RcsbQueryInterfaceInstances=class{constructor(){this.client=new o.GraphQLRequest("yosemite")}request(e){return r(this,void 0,void 0,(function*(){try{return(yield this.client.request(e,a.default)).interfaces}catch(e){throw console.error(e),e}}))}}},822:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbQueryMultipleEntityInstances=void 0;const o=i(n(307)),a=n(535);t.RcsbQueryMultipleEntityInstances=class{constructor(){this.client=new a.GraphQLRequest("yosemite")}request(e){return r(this,void 0,void 0,(function*(){try{return(yield this.client.request({entity_ids:e.entity_ids},o.default)).polymer_entities}catch(e){throw console.error(e),e}}))}}},69:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbQueryMultipleEntriesProperties=void 0;const o=i(n(787)),a=n(535);t.RcsbQueryMultipleEntriesProperties=class{constructor(){this.client=new a.GraphQLRequest("yosemite")}request(e){return r(this,void 0,void 0,(function*(){try{return(yield this.client.request({entry_ids:e.entry_ids},o.default)).entries}catch(e){throw console.error(e),e}}))}}},185:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ce,disableExperimentalFragmentVariables:()=>te,disableFragmentWarnings:()=>Z,enableExperimentalFragmentVariables:()=>ee,gql:()=>H,resetCaches:()=>X});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};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},i(e)}Object.create,Object.create;var o=n(763);function a(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,o=t+1;(n=r.exec(e.body))&&n.index<t;)i+=1,o=t+1-(n.index+n[0].length);return{line:i,column:o}}function s(e){return c(e.source,a(e.source,e.start))}function c(e,t){var n=e.locationOffset.column-1,r=l(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?n:0,c=t.column+s,f="".concat(e.name,":").concat(a,":").concat(c,"\n"),p=r.split(/\r\n|[\n\r]/g),h=p[i];if(h.length>120){for(var d=Math.floor(c/80),y=c%80,v=[],m=0;m<h.length;m+=80)v.push(h.slice(m,m+80));return f+u([["".concat(a),v[0]]].concat(v.slice(1,d+1).map((function(e){return["",e]})),[[" ",l(y-1)+"^"],["",v[d+1]]]))}return f+u([["".concat(a-1),p[i-1]],["".concat(a),h],["",l(c-1)+"^"],["".concat(a+1),p[i+1]]])}function u(e){var t=e.filter((function(e){return e[0],void 0!==e[1]})),n=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,r=e[0],i=e[1];return l(n-(t=r).length)+t+(i?" | "+i:" |")})).join("\n")}function l(e){return Array(e+1).join(" ")}function f(e){return f="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},f(e)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?v(e):t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){var t="function"==typeof Map?new Map:void 0;return m=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;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,r)}function r(){return b(e,arguments,w(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_(r,e)},m(e)}function b(e,t,n){return b=g()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&_(i,n.prototype),i},b.apply(null,arguments)}function g(){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 _(e,t){return _=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var E=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&&_(e,t)}(f,e);var t,n,r,u,l=(t=f,n=g(),function(){var e,r=w(t);if(n){var i=w(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return y(this,e)});function f(e,t,n,r,o,s,c){var u,d,m,b;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(b=l.call(this,e)).name="GraphQLError",b.originalError=null!=s?s:void 0,b.nodes=O(Array.isArray(t)?t:t?[t]:void 0);for(var g=[],_=0,w=null!==(E=b.nodes)&&void 0!==E?E:[];_<w.length;_++){var E,k=w[_].loc;null!=k&&g.push(k)}g=O(g),b.source=null!=n?n:null===(u=g)||void 0===u?void 0:u[0].source,b.positions=null!=r?r:null===(d=g)||void 0===d?void 0:d.map((function(e){return e.start})),b.locations=r&&n?r.map((function(e){return a(n,e)})):null===(m=g)||void 0===m?void 0:m.map((function(e){return a(e.source,e.start)})),b.path=null!=o?o:void 0;var S,T=null==s?void 0:s.extensions;return null==c&&"object"==i(S=T)&&null!==S?b.extensions=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},T):b.extensions=null!=c?c:{},Object.defineProperties(v(b),{message:{enumerable:!0},locations:{enumerable:null!=b.locations},path:{enumerable:null!=b.path},extensions:{enumerable:null!=b.extensions&&Object.keys(b.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=s&&s.stack?(Object.defineProperty(v(b),"stack",{value:s.stack,writable:!0,configurable:!0}),y(b)):(Error.captureStackTrace?Error.captureStackTrace(v(b),f):Object.defineProperty(v(b),"stack",{value:Error().stack,writable:!0,configurable:!0}),b)}return r=f,(u=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n<r.length;n++){var i=r[n];i.loc&&(t+="\n\n"+s(i.loc))}else if(e.source&&e.locations)for(var o=0,a=e.locations;o<a.length;o++){var u=a[o];t+="\n\n"+c(e.source,u)}return t}(this)}},{key:o.YF,get:function(){return"Object"}}])&&d(r.prototype,u),f}(m(Error));function O(e){return void 0===e||0===e.length?void 0:e}function k(e,t,n){return new E("Syntax Error: ".concat(n),void 0,e,[t])}var S=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"}),T=n(217),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"}),x=n(143),I=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"}),N=n(392),A=function(){function e(e){var t=new T.WU(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=C(this,e)}while(e.kind===D.COMMENT);return e},e}();function R(e){return isNaN(e)?D.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function C(e,t){for(var n=e.source,r=n.body,i=r.length,o=t.end;o<i;){var a=r.charCodeAt(o),s=e.line,c=1+o-e.lineStart;switch(a){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===r.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 33:return new T.WU(D.BANG,o,o+1,s,c,t);case 35:return j(n,o,s,c,t);case 36:return new T.WU(D.DOLLAR,o,o+1,s,c,t);case 38:return new T.WU(D.AMP,o,o+1,s,c,t);case 40:return new T.WU(D.PAREN_L,o,o+1,s,c,t);case 41:return new T.WU(D.PAREN_R,o,o+1,s,c,t);case 46:if(46===r.charCodeAt(o+1)&&46===r.charCodeAt(o+2))return new T.WU(D.SPREAD,o,o+3,s,c,t);break;case 58:return new T.WU(D.COLON,o,o+1,s,c,t);case 61:return new T.WU(D.EQUALS,o,o+1,s,c,t);case 64:return new T.WU(D.AT,o,o+1,s,c,t);case 91:return new T.WU(D.BRACKET_L,o,o+1,s,c,t);case 93:return new T.WU(D.BRACKET_R,o,o+1,s,c,t);case 123:return new T.WU(D.BRACE_L,o,o+1,s,c,t);case 124:return new T.WU(D.PIPE,o,o+1,s,c,t);case 125:return new T.WU(D.BRACE_R,o,o+1,s,c,t);case 34:return 34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)?Q(n,o,s,c,t,e):M(n,o,s,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 F(n,o,a,s,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 V(n,o,s,c,t)}throw k(n,o,P(a))}var u=e.line,l=1+o-e.lineStart;return new T.WU(D.EOF,i,i,u,l,t)}function P(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(R(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(R(e),".")}function j(e,t,n,r,i){var o,a=e.body,s=t;do{o=a.charCodeAt(++s)}while(!isNaN(o)&&(o>31||9===o));return new T.WU(D.COMMENT,t,s,n,r,i,a.slice(t+1,s))}function F(e,t,n,r,i,o){var a=e.body,s=n,c=t,u=!1;if(45===s&&(s=a.charCodeAt(++c)),48===s){if((s=a.charCodeAt(++c))>=48&&s<=57)throw k(e,c,"Invalid number, unexpected digit after 0: ".concat(R(s),"."))}else c=q(e,c,s),s=a.charCodeAt(c);if(46===s&&(u=!0,s=a.charCodeAt(++c),c=q(e,c,s),s=a.charCodeAt(c)),69!==s&&101!==s||(u=!0,43!==(s=a.charCodeAt(++c))&&45!==s||(s=a.charCodeAt(++c)),c=q(e,c,s),s=a.charCodeAt(c)),46===s||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(s))throw k(e,c,"Invalid number, expected digit but got: ".concat(R(s),"."));return new T.WU(u?D.FLOAT:D.INT,t,c,r,i,o,a.slice(t,c))}function q(e,t,n){var r=e.body,i=t,o=n;if(o>=48&&o<=57){do{o=r.charCodeAt(++i)}while(o>=48&&o<=57);return i}throw k(e,i,"Invalid number, expected digit but got: ".concat(R(o),"."))}function M(e,t,n,r,i){for(var o,a,s,c,u=e.body,l=t+1,f=l,p=0,h="";l<u.length&&!isNaN(p=u.charCodeAt(l))&&10!==p&&13!==p;){if(34===p)return h+=u.slice(f,l),new T.WU(D.STRING,t,l+1,n,r,i,h);if(p<32&&9!==p)throw k(e,l,"Invalid character within String: ".concat(R(p),"."));if(++l,92===p){switch(h+=u.slice(f,l-1),p=u.charCodeAt(l)){case 34:h+='"';break;case 47:h+="/";break;case 92:h+="\\";break;case 98:h+="\b";break;case 102:h+="\f";break;case 110:h+="\n";break;case 114:h+="\r";break;case 116:h+="\t";break;case 117:var d=(o=u.charCodeAt(l+1),a=u.charCodeAt(l+2),s=u.charCodeAt(l+3),c=u.charCodeAt(l+4),L(o)<<12|L(a)<<8|L(s)<<4|L(c));if(d<0){var y=u.slice(l+1,l+5);throw k(e,l,"Invalid character escape sequence: \\u".concat(y,"."))}h+=String.fromCharCode(d),l+=4;break;default:throw k(e,l,"Invalid character escape sequence: \\".concat(String.fromCharCode(p),"."))}f=++l}}throw k(e,l,"Unterminated string.")}function Q(e,t,n,r,i,o){for(var a=e.body,s=t+3,c=s,u=0,l="";s<a.length&&!isNaN(u=a.charCodeAt(s));){if(34===u&&34===a.charCodeAt(s+1)&&34===a.charCodeAt(s+2))return l+=a.slice(c,s),new T.WU(D.BLOCK_STRING,t,s+3,n,r,i,(0,N.W7)(l));if(u<32&&9!==u&&10!==u&&13!==u)throw k(e,s,"Invalid character within String: ".concat(R(u),"."));10===u?(++s,++o.line,o.lineStart=s):13===u?(10===a.charCodeAt(s+1)?s+=2:++s,++o.line,o.lineStart=s):92===u&&34===a.charCodeAt(s+1)&&34===a.charCodeAt(s+2)&&34===a.charCodeAt(s+3)?(l+=a.slice(c,s)+'"""',c=s+=4):++s}throw k(e,s,"Unterminated string.")}function L(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function V(e,t,n,r,i){for(var o=e.body,a=o.length,s=t+1,c=0;s!==a&&!isNaN(c=o.charCodeAt(s))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++s;return new T.WU(D.NAME,t,s,n,r,i,o.slice(t,s))}var U=function(){function e(e,t){var n=(0,x.T)(e)?e:new x.H(e);this._lexer=new A(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(D.NAME);return{kind:S.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:S.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:S.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(D.NAME)&&(t=this.parseName()),{kind:S.OPERATION_DEFINITION,operation:n,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:S.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:S.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:S.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,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(D.COLON)?(e=r,t=this.parseName()):t=r,{kind:S.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(n)}},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:S.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:S.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:S.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:S.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:S.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:S.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:S.INT,value:t.value,loc:this.loc(t)};case D.FLOAT:return this._lexer.advance(),{kind:S.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:S.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:S.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:S.NULL,loc:this.loc(t)};default:return{kind:S.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:S.STRING,value:e.value,block:e.kind===D.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:S.LIST,values:this.any(D.BRACKET_L,(function(){return t.parseValueLiteral(e)}),D.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:S.OBJECT,fields:this.any(D.BRACE_L,(function(){return t.parseObjectField(e)}),D.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(D.COLON),{kind:S.OBJECT_FIELD,name:n,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:S.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:S.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(D.BANG)?{kind:S.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:S.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 n=this.parseDirectives(!0),r=this.many(D.BRACE_L,this.parseOperationTypeDefinition,D.BRACE_R);return{kind:S.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(D.COLON);var n=this.parseNamedType();return{kind:S.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:S.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:S.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,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(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(D.COLON);var i=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:S.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o,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(),n=this.parseName();this.expectToken(D.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(D.EQUALS)&&(r=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:S.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:o,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:S.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:S.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,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 n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:S.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,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(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:S.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:S.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,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),n=this.optionalMany(D.BRACE_L,this.parseOperationTypeDefinition,D.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:S.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:S.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:S.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:S.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:S.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:S.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:S.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(D.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:S.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o,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!==I[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 T.Ye(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 k(this._lexer.source,t.start,"Expected ".concat(W(e),", found ").concat(B(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 k(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(B(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 k(this._lexer.source,t.start,"Unexpected ".concat(B(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n},e}();function B(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 z=new Map,G=new Map,K=!0,Y=!1;function J(e){return e.replace(/[\s,]+/g," ").trim()}function $(e){var t=J(e);if(!z.has(t)){var n=function(e,t){return new U(e,t).parseDocument()}(e,{experimentalFragmentVariables:Y,allowLegacyFragmentVariables:Y});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");z.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}(function(e){var t=new Set,n=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,i=J((a=e.loc).source.body.substring(a.start,a.end)),o=G.get(r);o&&!o.has(i)?K&&console.warn("Warning: fragment with name "+r+" 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"):o||G.set(r,o=new Set),o.add(i),t.has(i)||(t.add(i),n.push(e))}else n.push(e);var a})),r(r({},e),{definitions:n})}(n)))}return z.get(t)}function H(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach((function(t,n){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[n+1]})),$(r)}function X(){z.clear(),G.clear()}function Z(){K=!1}function ee(){Y=!0}function te(){Y=!1}var ne,re=H,ie=X,oe=Z,ae=ee,se=te;(ne=H||(H={})).gql=re,ne.resetCaches=ie,ne.disableFragmentWarnings=oe,ne.enableExperimentalFragmentVariables=ae,ne.disableExperimentalFragmentVariables=se,H.default=H;const ce=H},418:e=>{var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,s,c=i(e),u=1;u<arguments.length;u++){for(var l in a=Object(arguments[u]))n.call(a,l)&&(c[l]=a[l]);if(t){s=t(a);for(var f=0;f<s.length;f++)r.call(a,s[f])&&(c[s[f]]=a[s[f]])}}return c}},477:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r="query QueryAlignment($queryId: String!, $from: SequenceReference, $to:SequenceReference, $range:[Int]){\n alignment(\n queryId:$queryId\n from:$from\n to:$to\n range:$range\n ){\n query_sequence\n target_alignment {\n target_id\n orientation\n target_sequence\n coverage {\n query_coverage\n query_length\n target_coverage\n target_length\n }\n aligned_regions {\n query_begin\n query_end\n target_begin\n target_end\n exon_shift\n }\n }\n\n }\n}"},312:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r="query QueryAnnotations($queryId: String!, $reference: SequenceReference, $sources:[Source], $range:[Int], $filters: [FilterInput]){\n annotations(\n queryId:$queryId\n reference:$reference\n sources:$sources\n range:$range\n filters:$filters\n ){\n source\n target_id\n target_identifiers{\n target_id\n entry_id\n assembly_id\n entity_id\n asym_id\n interface_id\n interface_partner_index\n }\n features {\n type\n provenance_source\n description\n feature_id\n name\n feature_positions {\n beg_seq_id\n end_seq_id\n beg_ori_id\n end_ori_id\n range_id\n open_begin\n open_end\n value\n values\n }\n }\n }\n}"},131:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r="query QueryAssemblyInterfaces($assembly_ids: [String!]!){\n assemblies(\n assembly_ids: $assembly_ids\n ){\n rcsb_id\n interfaces{\n rcsb_id\n }\n }\n}\n"},22:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r="query QueryEntryInstance($entry_id: String!){\n entry(\n entry_id:$entry_id\n ){\n polymer_entities {\n polymer_entity_instances{\n rcsb_id\n polymer_entity{\n rcsb_polymer_entity{\n pdbx_description\n }\n entity_poly{\n rcsb_entity_polymer_type\n }\n rcsb_entity_source_organism {\n ncbi_scientific_name\n }\n }\n rcsb_polymer_entity_instance_container_identifiers{\n asym_id\n auth_asym_id\n entry_id\n entity_id\n auth_to_entity_poly_seq_mapping\n }\n }\n }\n assemblies {\n rcsb_assembly_container_identifiers {\n assembly_id\n }\n pdbx_struct_assembly_gen{\n asym_id_list\n }\n\n }\n }\n}"},650:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r="query QueryInterfaceInstance($interface_ids: [String!]!){\n interfaces(\n interface_ids:$interface_ids\n ){\n rcsb_interface_container_identifiers{\n rcsb_id\n interface_id\n assembly_id\n entry_id\n }\n rcsb_interface_partner{\n interface_partner_identifier{\n asym_id\n }\n }\n rcsb_interface_operator\n }\n}"},307:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r="query QueryMultipleEntityInstances($entity_ids: [String!]!){\n polymer_entities(\n entity_ids:$entity_ids\n ){\n polymer_entity_instances{\n rcsb_id\n polymer_entity{\n rcsb_polymer_entity{\n pdbx_description\n }\n entity_poly{\n rcsb_entity_polymer_type\n }\n rcsb_entity_source_organism {\n ncbi_scientific_name\n }\n }\n rcsb_polymer_entity_instance_container_identifiers{\n asym_id\n auth_asym_id\n entry_id\n entity_id\n auth_to_entity_poly_seq_mapping\n }\n }\n }\n}"},787:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r="query multiple_entries_properties($entry_ids: [String!]!){\n entries(entry_ids:$entry_ids){\n rcsb_id\n rcsb_entry_info{\n experimental_method\n resolution_combined\n }\n }\n}"},408:(e,t,n)=>{var r=n(418),i=60103,o=60109,a=60110;if("function"==typeof Symbol&&Symbol.for){var s=Symbol.for;i=s("react.element"),s("react.portal"),s("react.fragment"),s("react.strict_mode"),s("react.profiler"),o=s("react.provider"),a=s("react.context"),s("react.forward_ref"),s("react.suspense"),s("react.memo"),s("react.lazy")}"function"==typeof Symbol&&Symbol.iterator;function c(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},l={};function f(e,t,n){this.props=e,this.context=t,this.refs=l,this.updater=n||u}function p(){}function h(e,t,n){this.props=e,this.context=t,this.refs=l,this.updater=n||u}f.prototype.isReactComponent={},f.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(c(85));this.updater.enqueueSetState(this,e,t,"setState")},f.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},p.prototype=f.prototype;var d=h.prototype=new p;d.constructor=h,r(d,f.prototype),d.isPureReactComponent=!0;var y=null,v=Object.prototype.hasOwnProperty,m={key:!0,ref:!0,__self:!0,__source:!0};var b=null;function g(){var e=b;if(null===e)throw Error(c(321));return e}t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:a,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},t.createElement=function(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)v.call(t,r)&&!m.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var u=Array(c),l=0;l<c;l++)u[l]=arguments[l+2];o.children=u}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===o[r]&&(o[r]=c[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:y}},t.useCallback=function(e,t){return g().useCallback(e,t)},t.useContext=function(e,t){return g().useContext(e,t)},t.useEffect=function(e,t){return g().useEffect(e,t)},t.useMemo=function(e,t){return g().useMemo(e,t)},t.useRef=function(e){return g().useRef(e)},t.useState=function(e){return g().useState(e)}},294:(e,t,n)=>{e.exports=n(408)},381:(e,t,n)=>{n.r(t),n.d(t,{ApolloCache:()=>hr,ApolloClient:()=>pr,ApolloConsumer:()=>Oi,ApolloError:()=>Xt,ApolloLink:()=>Ee,ApolloProvider:()=>Ei,Cache:()=>fr,DocumentType:()=>wi,HttpLink:()=>rt,InMemoryCache:()=>li,MissingFieldError:()=>dr,NetworkStatus:()=>Ht,Observable:()=>Y,ObservableQuery:()=>sn,applyNextFetchPolicy:()=>ln,checkFetcher:()=>Fe,concat:()=>di,createHttpLink:()=>nt,createSignalIfSupported:()=>Xe,defaultDataIdFromObject:()=>mr,defaultPrinter:()=>Ye,disableExperimentalFragmentVariables:()=>mi.disableExperimentalFragmentVariables,disableFragmentWarnings:()=>mi.disableFragmentWarnings,empty:()=>fi,enableExperimentalFragmentVariables:()=>mi.enableExperimentalFragmentVariables,execute:()=>Oe,fallbackHttpConfig:()=>Ke,from:()=>pi,fromError:()=>et,fromPromise:()=>vi,getApolloContext:()=>_i,gql:()=>mi.gql,isApolloError:()=>$t,isReference:()=>ee,makeReference:()=>Z,makeVar:()=>Zn,mergeOptions:()=>lr,operationName:()=>Ti,parseAndCheckHttpResponse:()=>je,parser:()=>Di,resetApolloContext:()=>_i,resetCaches:()=>mi.resetCaches,rewriteURIForGET:()=>Ze,selectHttpOptionsAndBody:()=>Je,selectHttpOptionsAndBodyInternal:()=>$e,selectURI:()=>Re,serializeFetchParameter:()=>Ae,setLogVerbosity:()=>p,split:()=>hi,throwServerError:()=>Ce,toPromise:()=>yi,useApolloClient:()=>ki,useLazyQuery:()=>Ri,useMutation:()=>Ci,useQuery:()=>Ii,useReactiveVar:()=>ji,useSubscription:()=>Pi});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};Object.create,Object.create;var i="Invariant Violation",o=Object.setPrototypeOf,a=void 0===o?function(e,t){return e.__proto__=t,e}:o,s=function(e){function t(n){void 0===n&&(n=i);var r=e.call(this,"number"==typeof n?i+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=i,a(r,t.prototype),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error);function c(e,t){if(!e)throw new s(t)}var u=["debug","log","warn","error","silent"],l=u.indexOf("log");function f(e){return function(){if(u.indexOf(e)>=l){var t=console[e]||console.log;return t.apply(console,arguments)}}}function p(e){var t=u[l];return l=Math.max(0,u.indexOf(e)),t}function h(e){try{return e()}catch(e){}}!function(e){e.debug=f("debug"),e.log=f("log"),e.warn=f("warn"),e.error=f("error")}(c||(c={}));const d=h((function(){return globalThis}))||h((function(){return window}))||h((function(){return self}))||h((function(){return global}))||h((function(){return h.constructor("return this")()}));var y="__",v=[y,y].join("DEV");const m=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(d,v,{value:"production"!==h((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),d[v]}}();function b(e){try{return e()}catch(e){}}var g=b((function(){return globalThis}))||b((function(){return window}))||b((function(){return self}))||b((function(){return n.g}))||b((function(){return b.constructor("return this")()})),_=!1;!g||b((function(){return"production"}))||b((function(){return process}))||(Object.defineProperty(g,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),_=!0),n(143).H,_&&(delete g.process,_=!1),__DEV__?c("boolean"==typeof m,m):c("boolean"==typeof m,36);var w=function(e,t){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},w(e,t)};function E(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}w(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var O=function(){return O=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},O.apply(this,arguments)};function k(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function S(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function T(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function D(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function N(e,t,n){return t&&I(e.prototype,t),n&&I(e,n),e}Object.create,Object.create;var A=function(){return"function"==typeof Symbol},R=function(e){return A()&&Boolean(Symbol[e])},C=function(e){return R(e)?Symbol[e]:"@@"+e};A()&&!R("observable")&&(Symbol.observable=Symbol("observable"));var P=C("iterator"),j=C("observable"),F=C("species");function q(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function M(e){var t=e.constructor;return void 0!==t&&null===(t=t[F])&&(t=void 0),void 0!==t?t:Y}function Q(e){return e instanceof Y}function L(e){L.log?L.log(e):setTimeout((function(){throw e}))}function V(e){Promise.resolve().then((function(){try{e()}catch(e){L(e)}}))}function U(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=q(t,"unsubscribe");n&&n.call(t)}}catch(e){L(e)}}function B(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function W(e,t,n){e._state="running";var r=e._observer;try{var i=q(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(B(e),!i)throw n;i.call(r,n);break;case"complete":B(e),i&&i.call(r)}}catch(e){L(e)}"closed"===e._state?U(e):"running"===e._state&&(e._state="ready")}function z(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void V((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(W(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)}))):void W(e,t,n);e._queue.push({type:t,value:n})}}var G=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new K(this);try{this._cleanup=t.call(void 0,n)}catch(e){n.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(B(this),U(this))},N(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),K=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){z(this._subscription,"next",e)},t.error=function(e){z(this._subscription,"error",e)},t.complete=function(){z(this._subscription,"complete")},N(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),Y=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new G(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(n,r){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),n()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(M(this))((function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(M(this))((function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=M(this),r=arguments.length>1,i=!1,o=arguments[1],a=o;return new n((function(n){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||r)try{a=e(a,t)}catch(e){return n.error(e)}else a=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(a),n.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=M(this);return new i((function(t){var r,o=0;return function e(a){r=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===n.length?(r=void 0,t.complete()):e(i.from(n[o++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=M(this);return new n((function(r){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var o=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){r.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))},t[j]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=q(t,j);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return Q(i)&&i.constructor===n?i:new n((function(e){return i.subscribe(e)}))}if(R("iterator")&&(r=q(t,P)))return new n((function(e){V((function(){if(!e.closed){for(var n,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.call(t));!(n=i()).done;){var o=n.value;if(e.next(o),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){V((function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i="function"==typeof this?this:e;return new i((function(e){V((function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}}))}))},N(e,null,[{key:F,get:function(){return this}}]),e}();function J(e){return null!==e&&"object"==typeof e}function $(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new s("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new s(41);"FragmentDefinition"===e.kind&&r.push(e)})),void 0===n&&(__DEV__?c(1===r.length,"Found ".concat(r.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):c(1===r.length,42),n=r[0].name.value),O(O({},e),{definitions:D([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)})}function H(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function X(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=t&&t[e.name.value];return __DEV__?c(n,"No fragment named ".concat(e.name.value,".")):c(n,43),n;default:return null}}function Z(e){return{__ref:String(e)}}function ee(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function te(e,t,n,r){if(function(e){return"IntValue"===e.kind}(n)||function(e){return"FloatValue"===e.kind}(n))e[t.value]=Number(n.value);else if(function(e){return"BooleanValue"===e.kind}(n)||function(e){return"StringValue"===e.kind}(n))e[t.value]=n.value;else if(function(e){return"ObjectValue"===e.kind}(n)){var i={};n.fields.map((function(e){return te(i,e.name,e.value,r)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(n)){var o=(r||{})[n.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(n))e[t.value]=n.values.map((function(e){var n={};return te(n,t,e,r),n[t.value]}));else if(function(e){return"EnumValue"===e.kind}(n))e[t.value]=n.value;else{if(!function(e){return"NullValue"===e.kind}(n))throw __DEV__?new s('The inline argument "'.concat(t.value,'" of kind "').concat(n.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new s(52);e[t.value]=null}}A()&&Object.defineProperty(Y,Symbol("extensions"),{value:{symbol:j,hostReportError:L},configurable:!0});var ne=["connection","include","skip","client","rest","export"],re=Object.assign((function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach((function(e){i[e]=t[e]})),"".concat(n.connection.key,"(").concat(ie(i),")")}return n.connection.key}var o=e;if(t){var a=ie(t);o+="(".concat(a,")")}return n&&Object.keys(n).forEach((function(e){-1===ne.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?o+="@".concat(e,"(").concat(ie(n[e]),")"):o+="@".concat(e))})),o}),{setStringify:function(e){var t=ie;return ie=e,t}}),ie=function(e){return JSON.stringify(e,oe)};function oe(e,t){return J(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{})),t}function ae(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return te(n,r,i,t)})),n}return null}function se(e){return e.alias?e.alias.value:e.name.value}function ce(e,t,n){if("string"==typeof e.__typename)return e.__typename;for(var r=0,i=t.selections;r<i.length;r++){var o=i[r];if(ue(o)){if("__typename"===o.name.value)return e[se(o)]}else{var a=ce(e,X(o,n).selectionSet,n);if("string"==typeof a)return a}}}function ue(e){return"Field"===e.kind}function le(e){return"InlineFragment"===e.kind}function fe(e){__DEV__?c(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):c(e&&"Document"===e.kind,44);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new s('Schema type definitions not allowed in queries. Found: "'.concat(e.kind,'"')):new s(45);return e}));return __DEV__?c(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):c(t.length<=1,46),e}function pe(e){return fe(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function he(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function de(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function ye(e){var t=pe(e);return __DEV__?c(t&&"query"===t.operation,"Must contain a query definition."):c(t&&"query"===t.operation,47),t}function ve(e){var t;fe(e);for(var n=0,r=e.definitions;n<r.length;n++){var i=r[n];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new s("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new s(51)}function me(e){var t=Object.create(null),n=e&&e.variableDefinitions;return n&&n.length&&n.forEach((function(e){e.defaultValue&&te(t,e.variable.name,e.defaultValue)})),t}function be(e,t){return t?t(e):Y.of()}function ge(e){return"function"==typeof e?new Ee(e):e}function _e(e){return e.request.length<=1}var we=function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}return E(t,e),t}(Error),Ee=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return Y.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(ge).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,n,r){var i=ge(n),o=ge(r||new e(be));return _e(i)&&_e(o)?new e((function(e){return t(e)?i.request(e)||Y.of():o.request(e)||Y.of()})):new e((function(e,n){return t(e)?i.request(e,n)||Y.of():o.request(e,n)||Y.of()}))},e.execute=function(e,t){return e.request(function(e,t){var n=O({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n=O(O({},n),"function"==typeof e?e(n):e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return O({},n)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?he(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(t.indexOf(i)<0)throw __DEV__?new s("illegal argument: ".concat(i)):new s(24)}return e}(t))))||Y.of()},e.concat=function(t,n){var r=ge(t);if(_e(r))return __DEV__&&c.warn(new we("You are calling concat on a terminating link, which will have no effect",r)),r;var i=ge(n);return _e(i)?new e((function(e){return r.request(e,(function(e){return i.request(e)||Y.of()}))||Y.of()})):new e((function(e,t){return r.request(e,(function(e){return i.request(e,t)||Y.of()}))||Y.of()}))},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(be)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new s("request is not implemented"):new s(19)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),Oe=Ee.execute;function ke(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var r=e[t];void 0!==r&&(n[t]=r)}))})),n}var Se=n(821),Te=n(217),De={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"]},xe=Object.freeze({});function Ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:De,r=void 0,i=Array.isArray(e),o=[e],a=-1,s=[],c=void 0,u=void 0,l=void 0,f=[],p=[],h=e;do{var d=++a===o.length,y=d&&0!==s.length;if(d){if(u=0===p.length?void 0:f[f.length-1],c=l,l=p.pop(),y){if(i)c=c.slice();else{for(var v={},m=0,b=Object.keys(c);m<b.length;m++){var g=b[m];v[g]=c[g]}c=v}for(var _=0,w=0;w<s.length;w++){var E=s[w][0],O=s[w][1];i&&(E-=_),i&&null===O?(c.splice(E,1),_++):c[E]=O}}a=r.index,o=r.keys,s=r.edits,i=r.inArray,r=r.prev}else{if(u=l?i?a:o[a]:void 0,null==(c=l?l[u]:h))continue;l&&f.push(u)}var k,S=void 0;if(!Array.isArray(c)){if(!(0,Te.UG)(c))throw new Error("Invalid AST Node: ".concat((0,Se.Z)(c),"."));var T=Ne(t,c.kind,d);if(T){if((S=T.call(t,c,u,l,f,p))===xe)break;if(!1===S){if(!d){f.pop();continue}}else if(void 0!==S&&(s.push([u,S]),!d)){if(!(0,Te.UG)(S)){f.pop();continue}c=S}}}void 0===S&&y&&s.push([u,c]),d?f.pop():(r={inArray:i,index:a,keys:o,edits:s,prev:r},o=(i=Array.isArray(c))?c:null!==(k=n[c.kind])&&void 0!==k?k:[],a=-1,s=[],l&&p.push(l),l=c)}while(void 0!==r);return 0!==s.length&&(h=s[s.length-1][1]),h}function Ne(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var o=n?e.leave:e.enter;if(o){if("function"==typeof o)return o;var a=o[t];if("function"==typeof a)return a}}}var Ae=function(e,t){var n;try{n=JSON.stringify(e)}catch(e){var r=__DEV__?new s("Network request failed. ".concat(t," is not serializable: ").concat(e.message)):new s(21);throw r.parseError=e,r}return n},Re=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")},Ce=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r},Pe=Object.prototype.hasOwnProperty;function je(e){return function(t){return t.text().then((function(e){try{return JSON.parse(e)}catch(r){var n=r;throw n.name="ServerParseError",n.response=t,n.statusCode=t.status,n.bodyText=e,n}})).then((function(n){return t.status>=300&&Ce(t,n,"Response not successful: Received status code ".concat(t.status)),Array.isArray(n)||Pe.call(n,"data")||Pe.call(n,"errors")||Ce(t,n,"Server response was missing for query '".concat(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName,"'.")),n}))}}var Fe=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new s("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new s(20)},qe=n(392);function Me(e){return Ie(e,{leave:Qe})}var Qe={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return Ve(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=Be("(",Ve(e.variableDefinitions,", "),")"),i=Ve(e.directives," "),o=e.selectionSet;return n||i||r||"query"!==t?Ve([t,Ve([n,r]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,i=e.directives;return t+": "+n+Be(" = ",r)+Be(" ",Ve(i," "))},SelectionSet:function(e){return Ue(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,o=e.selectionSet,a=Be("",t,": ")+n,s=a+Be("(",Ve(r,", "),")");return s.length>80&&(s=a+Be("(\n",We(Ve(r,"\n")),"\n)")),Ve([s,Ve(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+Be(" ",Ve(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return Ve(["...",Be("on ",t),Ve(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(Be("(",Ve(r,", "),")")," ")+"on ".concat(n," ").concat(Be("",Ve(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?(0,qe.LZ)(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+Ve(e.values,", ")+"]"},ObjectValue:function(e){return"{"+Ve(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+Be("(",Ve(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:Le((function(e){var t=e.directives,n=e.operationTypes;return Ve(["schema",Ve(t," "),Ue(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:Le((function(e){return Ve(["scalar",e.name,Ve(e.directives," ")]," ")})),ObjectTypeDefinition:Le((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Ve(["type",t,Be("implements ",Ve(n," & ")),Ve(r," "),Ue(i)]," ")})),FieldDefinition:Le((function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(Ge(n)?Be("(\n",We(Ve(n,"\n")),"\n)"):Be("(",Ve(n,", "),")"))+": "+r+Be(" ",Ve(i," "))})),InputValueDefinition:Le((function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return Ve([t+": "+n,Be("= ",r),Ve(i," ")]," ")})),InterfaceTypeDefinition:Le((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Ve(["interface",t,Be("implements ",Ve(n," & ")),Ve(r," "),Ue(i)]," ")})),UnionTypeDefinition:Le((function(e){var t=e.name,n=e.directives,r=e.types;return Ve(["union",t,Ve(n," "),r&&0!==r.length?"= "+Ve(r," | "):""]," ")})),EnumTypeDefinition:Le((function(e){var t=e.name,n=e.directives,r=e.values;return Ve(["enum",t,Ve(n," "),Ue(r)]," ")})),EnumValueDefinition:Le((function(e){return Ve([e.name,Ve(e.directives," ")]," ")})),InputObjectTypeDefinition:Le((function(e){var t=e.name,n=e.directives,r=e.fields;return Ve(["input",t,Ve(n," "),Ue(r)]," ")})),DirectiveDefinition:Le((function(e){var t=e.name,n=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+t+(Ge(n)?Be("(\n",We(Ve(n,"\n")),"\n)"):Be("(",Ve(n,", "),")"))+(r?" repeatable":"")+" on "+Ve(i," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return Ve(["extend schema",Ve(t," "),Ue(n)]," ")},ScalarTypeExtension:function(e){return Ve(["extend scalar",e.name,Ve(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Ve(["extend type",t,Be("implements ",Ve(n," & ")),Ve(r," "),Ue(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Ve(["extend interface",t,Be("implements ",Ve(n," & ")),Ve(r," "),Ue(i)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return Ve(["extend union",t,Ve(n," "),r&&0!==r.length?"= "+Ve(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return Ve(["extend enum",t,Ve(n," "),Ue(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return Ve(["extend input",t,Ve(n," "),Ue(r)]," ")}};function Le(e){return function(t){return Ve([t.description,e(t)],"\n")}}function Ve(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function Ue(e){return Be("{\n",We(Ve(e,"\n")),"\n}")}function Be(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function We(e){return Be(" ",e.replace(/\n/g,"\n "))}function ze(e){return-1!==e.indexOf("\n")}function Ge(e){return null!=e&&e.some(ze)}var Ke={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},Ye=function(e,t){return t(e)};function Je(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return n.unshift(t),$e.apply(void 0,D([e,Ye],n,!1))}function $e(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={},o={};n.forEach((function(e){i=O(O(O({},i),e.options),{headers:O(O({},i.headers),He(e.headers))}),e.credentials&&(i.credentials=e.credentials),o=O(O({},o),e.http)}));var a=e.operationName,s=e.extensions,c=e.variables,u=e.query,l={operationName:a,variables:c};return o.includeExtensions&&(l.extensions=s),o.includeQuery&&(l.query=t(u,Me)),{options:i,body:l}}function He(e){if(e){var t=Object.create(null);return Object.keys(Object(e)).forEach((function(n){t[n.toLowerCase()]=e[n]})),t}return e}var Xe=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}};function Ze(e,t){var n=[],r=function(e,t){n.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&r("query",t.query),t.operationName&&r("operationName",t.operationName),t.variables){var i=void 0;try{i=Ae(t.variables,"Variables map")}catch(e){return{parseError:e}}r("variables",i)}if(t.extensions){var o=void 0;try{o=Ae(t.extensions,"Extensions map")}catch(e){return{parseError:e}}r("extensions",o)}var a="",s=e,c=e.indexOf("#");-1!==c&&(a=e.substr(c),s=e.substr(0,c));var u=-1===s.indexOf("?")?"?":"&";return{newURI:s+u+n.join("&")+a}}function et(e){return new Y((function(t){t.error(e)}))}var tt=h((function(){return fetch})),nt=function(e){void 0===e&&(e={});var t=e.uri,n=void 0===t?"/graphql":t,r=e.fetch,i=e.print,o=void 0===i?Ye:i,a=e.includeExtensions,s=e.useGETForQueries,c=e.includeUnusedVariables,u=void 0!==c&&c,l=k(e,["uri","fetch","print","includeExtensions","useGETForQueries","includeUnusedVariables"]);__DEV__&&Fe(r||tt);var f={http:{includeExtensions:a},options:l.fetchOptions,credentials:l.credentials,headers:l.headers};return new Ee((function(e){var t=Re(e,n),i=e.getContext(),a={};if(i.clientAwareness){var c=i.clientAwareness,l=c.name,p=c.version;l&&(a["apollographql-client-name"]=l),p&&(a["apollographql-client-version"]=p)}var d,y=O(O({},a),i.headers),v={http:i.http,options:i.fetchOptions,credentials:i.credentials,headers:y},m=$e(e,o,Ke,f,v),b=m.options,g=m.body;if(g.variables&&!u){var _=new Set(Object.keys(g.variables));Ie(e.query,{Variable:function(e,t,n){n&&"VariableDefinition"!==n.kind&&_.delete(e.name.value)}}),_.size&&(g.variables=O({},g.variables),_.forEach((function(e){delete g.variables[e]})))}if(!b.signal){var w=Xe(),E=w.controller,k=w.signal;(d=E)&&(b.signal=k)}if(s&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(b.method="GET"),"GET"===b.method){var S=Ze(t,g),T=S.newURI,D=S.parseError;if(D)return et(D);t=T}else try{b.body=Ae(g,"Payload")}catch(D){return et(D)}return new Y((function(n){return(r||h((function(){return fetch}))||tt)(t,b).then((function(t){return e.setContext({response:t}),t})).then(je(e)).then((function(e){return n.next(e),n.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){d&&d.abort()}}))}))},rt=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,nt(t).request)||this;return n.options=t,n}return E(t,e),t}(Ee),it=Object.prototype,ot=it.toString,at=it.hasOwnProperty,st=Function.prototype.toString,ct=new Map;function ut(e,t){try{return lt(e,t)}finally{ct.clear()}}function lt(e,t){if(e===t)return!0;var n,r,i,o=ot.call(e);if(o!==ot.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(dt(e,t))return!0;var a=ft(e),s=ft(t),c=a.length;if(c!==s.length)return!1;for(var u=0;u<c;++u)if(!at.call(t,a[u]))return!1;for(u=0;u<c;++u){var l=a[u];if(!lt(e[l],t[l]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==""+t;case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(dt(e,t))return!0;for(var f=e.entries(),p="[object Map]"===o;;){var h=f.next();if(h.done)break;var d=h.value,y=d[0],v=d[1];if(!t.has(y))return!1;if(p&&!lt(v,t.get(y)))return!1}return!0;case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return-1===m;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var b=st.call(e);return b===st.call(t)&&(r=ht,!((i=(n=b).length-r.length)>=0&&n.indexOf(r,i)===i))}return!1}function ft(e){return Object.keys(e).filter(pt,e)}function pt(e){return void 0!==this[e]}var ht="{ [native code] }";function dt(e,t){var n=ct.get(e);if(n){if(n.has(t))return!0}else ct.set(e,n=new Set);return n.add(t),!1}var yt,vt,mt=function(){return Object.create(null)},bt=Array.prototype,gt=bt.forEach,_t=bt.slice,wt=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=mt),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return gt.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(_t.call(e)))},e.prototype.getChildTrie=function(t){var n=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),r=n.get(t);return r||n.set(t,r=new e(this.weakness,this.makeData)),r},e}(),Et="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),Ot="function"==typeof WeakSet,kt="function"==typeof Symbol&&"function"==typeof Symbol.for,St=function(){function e(){this.known=new(Ot?WeakSet:Set),this.pool=new wt(Et),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return J(e)&&this.known.has(e)},e.prototype.pass=function(e){if(J(e)){var t=function(e){return J(e)?Array.isArray(e)?e.slice(0):O({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(J(e)){var n=this.passes.get(e);if(n)return n;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var r=e.map(this.admit,this);return(s=this.pool.lookupArray(r)).array||(this.known.add(s.array=r),__DEV__&&Object.freeze(r)),s.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),o=[i],a=this.sortedKeys(e);o.push(a.json);var s,c=o.length;if(a.sorted.forEach((function(n){o.push(t.admit(e[n]))})),!(s=this.pool.lookupArray(o)).object){var u=s.object=Object.create(i);this.known.add(u),a.sorted.forEach((function(e,t){u[e]=o[c+t]})),__DEV__&&Object.freeze(u)}return s.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var r=JSON.stringify(t);(n.keys=this.keysByJSON.get(r))||this.keysByJSON.set(r,n.keys={sorted:t,json:r})}return n.keys},e}(),Tt=Object.assign((function(e){if(J(e)){void 0===yt&&Dt();var t=yt.admit(e),n=vt.get(t);return void 0===n&&vt.set(t,n=JSON.stringify(t)),n}return JSON.stringify(e)}),{reset:Dt});function Dt(){yt=new St,vt=new(Et?WeakMap:Map)}function xt(e,t,n){return new Y((function(r){var i=r.next,o=r.error,a=r.complete,s=0,c=!1,u={then:function(e){return new Promise((function(t){return t(e())}))}};function l(e,t){return e?function(t){++s;var n=function(){return e(t)};u=u.then(n,n).then((function(e){--s,i&&i.call(r,e),c&&f.complete()}),(function(e){throw--s,e})).catch((function(e){o&&o.call(r,e)}))}:function(e){return t&&t.call(r,e)}}var f={next:l(t,i),error:l(n,o),complete:function(){c=!0,s||a&&a.call(r)}},p=e.subscribe(f);return function(){return p.unsubscribe()}}))}function It(e){return e.errors&&e.errors.length>0||!1}function Nt(e,t,n){var r=0;return e.forEach((function(n,i){t.call(this,n,i,e)&&(e[r++]=n)}),n),e.length=r,e}var At={kind:"Field",name:{kind:"Name",value:"__typename"}};function Rt(e,t){return e.selectionSet.selections.every((function(e){return"FragmentSpread"===e.kind&&Rt(t[e.name.value],t)}))}function Ct(e){return Rt(pe(e)||function(e){__DEV__?c("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):c("Document"===e.kind,48),__DEV__?c(e.definitions.length<=1,"Fragment must have exactly one definition."):c(e.definitions.length<=1,49);var t=e.definitions[0];return __DEV__?c("FragmentDefinition"===t.kind,"Must be a fragment definition."):c("FragmentDefinition"===t.kind,50),t}(e),H(de(e)))?null:e}function Pt(e){return function(t){return e.some((function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)}))}}function jt(e,t){var n=Object.create(null),r=[],i=Object.create(null),o=[],a=Ct(Ie(t,{Variable:{enter:function(e,t,r){"VariableDefinition"!==r.kind&&(n[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&e.some((function(e){return e.remove}))&&t.directives&&t.directives.some(Pt(e)))return t.arguments&&t.arguments.forEach((function(e){"Variable"===e.value.kind&&r.push({name:e.value.name.value})})),t.selectionSet&&Mt(t.selectionSet).forEach((function(e){o.push({name:e.name.value})})),null}},FragmentSpread:{enter:function(e){i[e.name.value]=!0}},Directive:{enter:function(t){if(Pt(e)(t))return null}}}));return a&&Nt(r,(function(e){return!!e.name&&!n[e.name]})).length&&(a=function(e,t){var n=function(e){return function(t){return e.some((function(e){return t.value&&"Variable"===t.value.kind&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))}))}}(e);return Ct(Ie(t,{OperationDefinition:{enter:function(t){return O(O({},t),{variableDefinitions:t.variableDefinitions?t.variableDefinitions.filter((function(t){return!e.some((function(e){return e.name===t.variable.name.value}))})):[]})}},Field:{enter:function(t){if(e.some((function(e){return e.remove}))){var r=0;if(t.arguments&&t.arguments.forEach((function(e){n(e)&&(r+=1)})),1===r)return null}}},Argument:{enter:function(e){if(n(e))return null}}}))}(r,a)),a&&Nt(o,(function(e){return!!e.name&&!i[e.name]})).length&&(a=function(e,t){function n(t){if(e.some((function(e){return e.name===t.name.value})))return null}return Ct(Ie(t,{FragmentSpread:{enter:n},FragmentDefinition:{enter:n}}))}(o,a)),a}var Ft=Object.assign((function(e){return Ie(fe(e),{SelectionSet:{enter:function(e,t,n){if(!n||"OperationDefinition"!==n.kind){var r=e.selections;if(r&&!r.some((function(e){return ue(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var i=n;if(!(ue(i)&&i.directives&&i.directives.some((function(e){return"export"===e.name.value}))))return O(O({},e),{selections:D(D([],r,!0),[At],!1)})}}}}})}),{added:function(e){return e===At}}),qt={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&c.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),t}};function Mt(e){var t=[];return e.selections.forEach((function(e){(ue(e)||le(e))&&e.selectionSet?Mt(e.selectionSet).forEach((function(e){return t.push(e)})):"FragmentSpread"===e.kind&&t.push(e)})),t}function Qt(e){return"query"===ve(e).operation?e:Ie(e,{OperationDefinition:{enter:function(e){return O(O({},e),{operation:"query"})}}})}function Lt(e,t){var n=e.directives;return!n||!n.length||function(e){var t=[];return e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var n=e.arguments,r=e.name.value;__DEV__?c(n&&1===n.length,"Incorrect number of arguments for the @".concat(r," directive.")):c(n&&1===n.length,38);var i=n[0];__DEV__?c(i.name&&"if"===i.name.value,"Invalid argument for the @".concat(r," directive.")):c(i.name&&"if"===i.name.value,39);var o=i.value;__DEV__?c(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @".concat(r," directive must be a variable or a boolean value.")):c(o&&("Variable"===o.kind||"BooleanValue"===o.kind),40),t.push({directive:e,ifArgument:i})}})),t}(n).every((function(e){var n=e.directive,r=e.ifArgument,i=!1;return"Variable"===r.value.kind?(i=t&&t[r.value.name.value],__DEV__?c(void 0!==i,"Invalid variable referenced in @".concat(n.name.value," directive.")):c(void 0!==i,37)):i=r.value.value,"skip"===n.name.value?!i:i}))}function Vt(e,t){return function(e){var t=[];return Ie(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function Ut(e){return e&&Vt(["client"],e)&&Vt(["export"],e)}var Bt=new Map;function Wt(e){var t=Bt.get(e)||1;return Bt.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function zt(e,t,n){var r=[];e.forEach((function(e){return e[t]&&r.push(e)})),r.forEach((function(e){return e[t](n)}))}function Gt(e){function t(t){Object.defineProperty(e,t,{value:Y})}return kt&&Symbol.species&&t(Symbol.species),t("@@species"),e}function Kt(e){return e&&"function"==typeof e.then}var Yt=function(e){function t(t){var n=e.call(this,(function(e){return n.addObserver(e),function(){return n.removeObserver(e)}}))||this;return n.observers=new Set,n.addCount=0,n.promise=new Promise((function(e,t){n.resolve=e,n.reject=t})),n.handlers={next:function(e){null!==n.sub&&(n.latest=["next",e],zt(n.observers,"next",e))},error:function(e){var t=n.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),n.sub=null,n.latest=["error",e],n.reject(e),zt(n.observers,"error",e))},complete:function(){if(null!==n.sub){var e=n.sources.shift();e?Kt(e)?e.then((function(e){return n.sub=e.subscribe(n.handlers)})):n.sub=e.subscribe(n.handlers):(n.sub=null,n.latest&&"next"===n.latest[0]?n.resolve(n.latest[1]):n.resolve(),zt(n.observers,"complete"))}}},n.cancel=function(e){n.reject(e),n.sources=[],n.handlers.complete()},n.promise.catch((function(e){})),"function"==typeof t&&(t=[new Y(t)]),Kt(t)?t.then((function(e){return n.start(e)}),n.handlers.error):n.start(t),n}return E(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],n=e[t];n&&n.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e),++this.addCount)},t.prototype.removeObserver=function(e,t){this.observers.delete(e)&&--this.addCount<1&&!t&&this.handlers.error(new Error("Observable cancelled prematurely"))},t.prototype.cleanup=function(e){var t=this,n=!1,r=function(){n||(n=!0,t.observers.delete(i),e())},i={next:r,error:r,complete:r},o=this.addCount;this.addObserver(i),this.addCount=o},t}(Y);function Jt(e){return Array.isArray(e)&&e.length>0}function $t(e){return e.hasOwnProperty("graphQLErrors")}Gt(Yt);var Ht,Xt=function(e){function t(n){var r,i,o=n.graphQLErrors,a=n.clientErrors,s=n.networkError,c=n.errorMessage,u=n.extraInfo,l=e.call(this,c)||this;return l.graphQLErrors=o||[],l.clientErrors=a||[],l.networkError=s||null,l.message=c||(i="",(Jt((r=l).graphQLErrors)||Jt(r.clientErrors))&&(r.graphQLErrors||[]).concat(r.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+="".concat(t,"\n")})),r.networkError&&(i+="".concat(r.networkError.message,"\n")),i=i.replace(/\n$/,"")),l.extraInfo=u,l.__proto__=t.prototype,l}return E(t,e),t}(Error);function Zt(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(Ht||(Ht={}));var en=Object.prototype.toString;function tn(e){return nn(e)}function nn(e,t){switch(en.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach((function(e,r){n[r]=nn(e,t)})),n;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach((function(n){r[n]=nn(e[n],t)})),r;default:return e}}var rn=Object.assign,on=Object.hasOwnProperty,an=!1,sn=function(e){function t(t){var n=t.queryManager,r=t.queryInfo,i=t.options,o=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=cn)}catch(e){}var n=!o.observers.size;o.observers.add(e);var r=o.last;return r&&r.error?e.error&&e.error(r.error):r&&r.result&&e.next&&e.next(r.result),n&&o.reobserve().catch((function(){})),function(){o.observers.delete(e)&&!o.observers.size&&o.tearDownQuery()}}))||this;o.observers=new Set,o.subscriptions=new Set,o.isTornDown=!1,o.options=i,o.queryId=r.queryId||n.generateQueryId();var a=pe(i.query);return o.queryName=a&&a.name&&a.name.value,o.initialFetchPolicy=i.fetchPolicy||"cache-first",o.queryManager=n,o.queryInfo=r,o}return E(t,e),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:n},i=e.subscribe(r)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),n=this.queryInfo.networkStatus||t&&t.networkStatus||Ht.ready,r=O(O({},t),{loading:Zt(n),networkStatus:n}),i=this.options.fetchPolicy,o=void 0===i?"cache-first":i;if("network-only"===o||"no-cache"===o||"standby"===o||this.queryManager.transform(this.options.query).hasForcedResolvers);else{var a=this.queryInfo.getDiff();(a.complete||this.options.returnPartialData)&&(r.data=a.result),ut(r.data,{})&&(r.data=void 0),a.complete?(delete r.partial,!a.complete||r.networkStatus!==Ht.loading||"cache-first"!==o&&"cache-only"!==o||(r.networkStatus=Ht.ready,r.loading=!1)):r.partial=!0,!__DEV__||a.complete||this.options.partialRefetch||r.loading||r.data||r.error||un(a.missing)}return e&&this.updateLastResult(r),r},t.prototype.isDifferentFromLastResult=function(e){return!this.last||!ut(this.last.result,e)},t.prototype.getLast=function(e,t){var n=this.last;if(n&&n[e]&&(!t||ut(n.variables,this.variables)))return n[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,n={pollInterval:0},r=this.options.fetchPolicy;if(n.fetchPolicy="cache-and-network"===r?r:"no-cache"===r?"no-cache":"network-only",__DEV__&&e&&on.call(e,"variables")){var i=ye(this.options.query),o=i.variableDefinitions;o&&o.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&c.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=i.name)||void 0===t?void 0:t.value)||JSON.stringify(i),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!ut(this.options.variables,e)&&(n.variables=this.options.variables=O(O({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(n,Ht.refetch)},t.prototype.fetchMore=function(e){var t=this,n=O(O({},e.query?e:O(O(O({},this.options),e),{variables:O(O({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),r=this.queryManager.generateQueryId();return n.notifyOnNetworkStatusChange&&(this.queryInfo.networkStatus=Ht.fetchMore,this.observe()),this.queryManager.fetchQuery(r,n,Ht.fetchMore).then((function(r){var i=r.data,o=e.updateQuery;return o?(__DEV__&&!an&&(__DEV__&&c.warn("The updateQuery callback for fetchMore is deprecated, and will be removed\nin the next major version of Apollo Client.\n\nPlease convert updateQuery functions to field policies with appropriate\nread and merge functions, or use/adapt a helper function (such as\nconcatPagination, offsetLimitPagination, or relayStylePagination) from\n@apollo/client/utilities.\n\nThe field policy system handles pagination more effectively than a\nhand-written updateQuery function, and you only need to define the policy\nonce, rather than every time you call fetchMore."),an=!0),t.updateQuery((function(e){return o(e,{fetchMoreResult:i,variables:n.variables})}))):t.queryManager.cache.writeQuery({query:n.query,variables:n.variables,data:i}),r})).finally((function(){t.queryManager.stopQuery(r),t.reobserve()}))},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery((function(e,t){var i=t.variables;return r(e,{subscriptionData:n,variables:i})}))},error:function(t){e.onError?e.onError(t):__DEV__&&c.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return ut(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.initialFetchPolicy,variables:e},Ht.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,n=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});n&&(t.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,n=this.options.pollInterval;if(n){if(!t||t.interval!==n){__DEV__?c(n,"Attempted to start a polling query without a polling interval."):c(n,10),(t||(this.pollingInfo={})).interval=n;var r=function(){e.pollingInfo&&(Zt(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"network-only"},Ht.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(r,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=O(O({},this.last),{result:this.queryManager.assumeImmutableResults?e:tn(e),variables:t}),Jt(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var n=this;this.isTornDown=!1;var r=t===Ht.refetch||t===Ht.fetchMore||t===Ht.poll,i=this.options.variables,o=r?ke(this.options,e):rn(this.options,ke(e));r||(this.updatePolling(),e&&e.variables&&!e.fetchPolicy&&!ut(e.variables,i)&&(o.fetchPolicy=this.initialFetchPolicy,void 0===t&&(t=Ht.setVariables)));var a=o.variables&&O({},o.variables),s=this.fetch(o,t),c={next:function(e){n.reportResult(e,a)},error:function(e){n.reportError(e,a)}};return r||(this.concast&&this.observer&&this.concast.removeObserver(this.observer,!0),this.concast=s,this.observer=c),s.addObserver(c),s.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){(this.getLastError()||this.isDifferentFromLastResult(e))&&(this.updateLastResult(e,t),zt(this.observers,"next",e))},t.prototype.reportError=function(e,t){var n=O(O({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:Ht.error,loading:!1});this.updateLastResult(n,t),zt(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(Y);function cn(e){__DEV__&&c.error("Unhandled error",e.message,e.stack)}function un(e){__DEV__&&e&&__DEV__&&c.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}function ln(e){var t=e.fetchPolicy,n=void 0===t?"cache-first":t,r=e.nextFetchPolicy;r&&(e.fetchPolicy="function"==typeof r?r.call(e,n):r)}Gt(sn);var fn=Object.prototype.hasOwnProperty;function pn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return hn(e)}function hn(e){var t=e[0]||{},n=e.length;if(n>1)for(var r=new yn,i=1;i<n;++i)t=r.merge(t,e[i]);return t}var dn=function(e,t,n){return this.merge(e[n],t[n])},yn=function(){function e(e){void 0===e&&(e=dn),this.reconciler=e,this.isObject=J,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var n=this,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return J(t)&&J(e)?(Object.keys(t).forEach((function(i){if(fn.call(e,i)){var o=e[i];if(t[i]!==o){var a=n.reconciler.apply(n,D([e,t,i],r,!1));a!==o&&((e=n.shallowCopyForMerge(e))[i]=a)}}else(e=n.shallowCopyForMerge(e))[i]=t[i]})),e):t},e.prototype.shallowCopyForMerge=function(e){if(J(e)){if(this.pastCopies.has(e)){if(!Object.isFrozen(e))return e;this.pastCopies.delete(e)}e=Array.isArray(e)?e.slice(0):O({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e)}return e},e}(),vn=null,mn={},bn=1,gn="@wry/context:Slot",_n=Array,wn=_n[gn]||function(){var e=function(){function e(){this.id=["slot",bn++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=vn;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===mn)break;return e!==vn&&(vn.slots[this.id]=t),!0}return vn&&(vn.slots[this.id]=mn),!1},e.prototype.getValue=function(){if(this.hasValue())return vn.slots[this.id]},e.prototype.withValue=function(e,t,n,r){var i,o=((i={__proto__:null})[this.id]=e,i),a=vn;vn={parent:a,slots:o};try{return t.apply(r,n)}finally{vn=a}},e.bind=function(e){var t=vn;return function(){var n=vn;try{return vn=t,e.apply(this,arguments)}finally{vn=n}}},e.noContext=function(e,t,n){if(!vn)return e.apply(n,t);var r=vn;try{return vn=null,e.apply(n,t)}finally{vn=r}},e}();try{Object.defineProperty(_n,gn,{value:_n[gn]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();function En(){}wn.bind,wn.noContext;var On,kn=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=En),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var n=t.older,r=t.newer;r&&(r.older=n),n&&(n.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t},e.prototype.set=function(e,t){var n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),Sn=new wn,Tn=Object.prototype.hasOwnProperty,Dn=void 0===(On=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:On;function xn(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var In=[];function Nn(e,t){if(!e)throw new Error(t||"assertion failure")}function An(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var Rn=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!jn(this))return Cn(this),this.value[0]},e.prototype.recompute=function(e){return Nn(!this.recomputing,"already recomputing"),Cn(this),jn(this)?function(e,t){return Un(e),Sn.withValue(e,Pn,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{xn(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,jn(e)||qn(e)}(e),An(e.value)}(this,e):An(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Fn(this),xn(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),Un(this),Mn(this,(function(t,n){t.setDirty(),Bn(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=In.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(Dn(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),In.push(this.deps),this.deps=null)},e.count=0,e}();function Cn(e){var t=Sn.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),jn(e)?Qn(t,e):Ln(t,e),t}function Pn(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function jn(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Fn(e){Mn(e,Qn)}function qn(e){Mn(e,Ln)}function Mn(e,t){var n=e.parents.size;if(n)for(var r=Dn(e.parents),i=0;i<n;++i)t(r[i],e)}function Qn(e,t){Nn(e.childValues.has(t)),Nn(jn(t));var n=!jn(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=In.pop()||new Set;e.dirtyChildren.add(t),n&&Fn(e)}function Ln(e,t){Nn(e.childValues.has(t)),Nn(!jn(t));var n,r,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(n=o,r=t.value,(i=n.length)>0&&i===r.length&&n[i-1]===r[i-1]||e.setDirty()),Vn(e,t),jn(e)||qn(e)}function Vn(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(In.length<100&&In.push(n),e.dirtyChildren=null))}function Un(e){e.childValues.size>0&&e.childValues.forEach((function(t,n){Bn(e,n)})),e.forgetDeps(),Nn(null===e.dirtyChildren)}function Bn(e,t){t.parents.delete(e),e.childValues.delete(t),Vn(e,t)}var Wn={setDirty:!0,dispose:!0,forget:!0};function zn(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=Sn.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(xn(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&Tn.call(Wn,n)?n:"setDirty";Dn(r).forEach((function(e){return e[i]()})),t.delete(e),xn(r)}},r}function Gn(){var e=new wt("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}Gn();var Kn=new Set;function Yn(e,t){void 0===t&&(t=Object.create(null));var n=new kn(t.max||Math.pow(2,16),(function(e){return e.dispose()})),r=t.keyArgs,i=t.makeCacheKey||Gn(),o=function(){var o=i.apply(null,r?r.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var a=n.get(o);a||(n.set(o,a=new Rn(e)),a.subscribe=t.subscribe,a.forget=function(){return n.delete(o)});var s=a.recompute(Array.prototype.slice.call(arguments));return n.set(o,a),Kn.add(n),Sn.hasValue()||(Kn.forEach((function(e){return e.clean()})),Kn.clear()),s};function a(e){var t=n.get(e);t&&t.setDirty()}function s(e){var t=n.get(e);if(t)return t.peek()}function c(e){return n.delete(e)}return Object.defineProperty(o,"size",{get:function(){return n.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=a,o.dirty=function(){a(i.apply(null,arguments))},o.peekKey=s,o.peek=function(){return s(i.apply(null,arguments))},o.forgetKey=c,o.forget=function(){return c(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=r?function(){return i.apply(null,r.apply(null,arguments))}:i,Object.freeze(o)}var Jn=new wn,$n=new WeakMap;function Hn(e){var t=$n.get(e);return t||$n.set(e,t={vars:new Set,dep:zn()}),t}function Xn(e){Hn(e).vars.forEach((function(t){return t.forgetCache(e)}))}function Zn(e){var t=new Set,n=new Set,r=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){Hn(e).dep.dirty(r),er(e)}));var a=Array.from(n);n.clear(),a.forEach((function(t){return t(e)}))}}else{var s=Jn.getValue();s&&(i(s),Hn(s).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var i=r.attachCache=function(e){return t.add(e),Hn(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}function er(e){e.broadcastWatches&&e.broadcastWatches()}var tr=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=pn(t.resolvers,e)})):this.resolvers=pn(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,r=e.context,i=e.variables,o=e.onlyRunForcedResolvers,a=void 0!==o&&o;return S(this,void 0,void 0,(function(){return T(this,(function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,a).then((function(e){return O(O({},n),{data:e.result})}))]:[2,n]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return Vt(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){fe(e);var t=jt([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=Ie(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return ue(e)&&"__typename"===e.name.value})))return null}}})),t}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return O(O({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),S(this,void 0,void 0,(function(){return T(this,(function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(e){return O(O({},t),e.exportedVariables)}))]:[2,O({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return Ie(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return xe}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:Qt(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,i,o){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i=function(){return!0}),void 0===o&&(o=!1),S(this,void 0,void 0,(function(){var a,s,c,u,l,f,p,h,d;return T(this,(function(y){return a=ve(e),s=de(e),c=H(s),u=a.operation,l=u?u.charAt(0).toUpperCase()+u.slice(1):"Query",p=(f=this).cache,h=f.client,d={fragmentMap:c,context:O(O({},n),{cache:p,client:h}),variables:r,fragmentMatcher:i,defaultOperationType:l,exportedVariables:{},onlyRunForcedResolvers:o},[2,this.resolveSelectionSet(a.selectionSet,t,d).then((function(e){return{result:e,exportedVariables:d.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return S(this,void 0,void 0,(function(){var r,i,o,a,s,u=this;return T(this,(function(l){return r=n.fragmentMap,i=n.context,o=n.variables,a=[t],s=function(e){return S(u,void 0,void 0,(function(){var s,u;return T(this,(function(l){return Lt(e,o)?ue(e)?[2,this.resolveField(e,t,n).then((function(t){var n;void 0!==t&&a.push(((n={})[se(e)]=t,n))}))]:(le(e)?s=e:(s=r[e.name.value],__DEV__?c(s,"No fragment named ".concat(e.name.value)):c(s,9)),s&&s.typeCondition&&(u=s.typeCondition.name.value,n.fragmentMatcher(t,u,i))?[2,this.resolveSelectionSet(s.selectionSet,t,n).then((function(e){a.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(s)).then((function(){return hn(a)}))]}))}))},e.prototype.resolveField=function(e,t,n){return S(this,void 0,void 0,(function(){var r,i,o,a,s,c,u,l,f,p=this;return T(this,(function(h){return r=n.variables,i=e.name.value,o=se(e),a=i!==o,s=t[o]||t[i],c=Promise.resolve(s),n.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(u=t.__typename||n.defaultOperationType,(l=this.resolvers&&this.resolvers[u])&&(f=l[a?i:o])&&(c=Promise.resolve(Jn.withValue(this.cache,f,[t,ae(e,r),n.context,{field:e,fragmentMap:n.fragmentMap}])))),[2,c.then((function(t){return void 0===t&&(t=s),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?p.resolveSubSelectedArray(e,t,n):e.selectionSet?p.resolveSelectionSet(e.selectionSet,t,n):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,n){var r=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?r.resolveSubSelectedArray(e,t,n):e.selectionSet?r.resolveSelectionSet(e.selectionSet,t,n):void 0})))},e}(),nr=new(Et?WeakMap:Map);function rr(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return nr.set(e,(nr.get(e)+1)%1e15),n.apply(this,arguments)})}function ir(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var or=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;nr.has(n)||(nr.set(n,0),rr(n,"evict"),rr(n,"modify"),rr(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||Ht.loading;return this.variables&&this.networkStatus!==Ht.loading&&!ut(this.variables,e.variables)&&(t=Ht.setVariables),ut(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){ir(this),this.lastDiff=void 0,this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&ut(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var n=this.observableQuery;if(n&&"no-cache"===n.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||ut(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():e.reobserve()})):delete this.oqListener)},e.prototype.notify=function(){var e=this;ir(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(Zt(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var r=O(O({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&ut(r,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=r))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===nr.get(this.cache)&&ut(t,n.variables)&&ut(e.data,n.result.data))},e.prototype.markResult=function(e,t,n){var r=this;this.graphQLErrors=Jt(e.errors)?e.errors:[],this.reset(),"no-cache"===t.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(t.variables)):0!==n&&(ar(e,t.errorPolicy)?this.cache.performTransaction((function(i){if(r.shouldWrite(e,t.variables))i.writeQuery({query:r.document,data:e.data,variables:t.variables,overwrite:1===n}),r.lastWrite={result:e,variables:t.variables,dmCount:nr.get(r.cache)};else if(r.lastDiff&&r.lastDiff.diff.complete)return void(e.data=r.lastDiff.diff.result);var o=r.getDiffOptions(t.variables),a=i.diff(o);r.stopped||r.updateWatch(t.variables),r.updateLastDiff(a,o),a.complete&&(e.data=a.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=Ht.ready},e.prototype.markError=function(e){return this.networkStatus=Ht.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function ar(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!It(e);return!r&&n&&e.data&&(r=!0),r}var sr=Object.prototype.hasOwnProperty,cr=function(){function e(e){var t=e.cache,n=e.link,r=e.queryDeduplication,i=void 0!==r&&r,o=e.onBroadcast,a=e.ssrMode,s=void 0!==a&&a,c=e.clientAwareness,u=void 0===c?{}:c,l=e.localState,f=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(Et?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=n,this.queryDeduplication=i,this.clientAwareness=u,this.localState=l||new tr({cache:t}),this.ssrMode=s,this.assumeImmutableResults=!!f,(this.onBroadcast=o)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,n){e.stopQueryNoBroadcast(n)})),this.cancelPendingFetches(__DEV__?new s("QueryManager stopped while query was in flight"):new s(11))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,r=e.optimisticResponse,i=e.updateQueries,o=e.refetchQueries,a=void 0===o?[]:o,s=e.awaitRefetchQueries,u=void 0!==s&&s,l=e.update,f=e.onQueryUpdated,p=e.errorPolicy,h=void 0===p?"none":p,d=e.fetchPolicy,y=void 0===d?"network-only":d,v=e.keepRootFields,m=e.context;return S(this,void 0,void 0,(function(){var e,o,s;return T(this,(function(p){switch(p.label){case 0:return __DEV__?c(t,"mutation option is required. You must specify your GraphQL document in the mutation option."):c(t,12),__DEV__?c("network-only"===y||"no-cache"===y,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):c("network-only"===y||"no-cache"===y,13),e=this.generateMutationId(),t=this.transform(t).document,n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,m)]:[3,2];case 1:n=p.sent(),p.label=2;case 2:return o=this.mutationStore&&(this.mutationStore[e]={mutation:t,variables:n,loading:!0,error:null}),r&&this.markMutationOptimistic(r,{mutationId:e,document:t,variables:n,fetchPolicy:y,errorPolicy:h,context:m,updateQueries:i,update:l,keepRootFields:v}),this.broadcastQueries(),s=this,[2,new Promise((function(c,p){return xt(s.getObservableFromLink(t,O(O({},m),{optimisticResponse:r}),n,!1),(function(c){if(It(c)&&"none"===h)throw new Xt({graphQLErrors:c.errors});o&&(o.loading=!1,o.error=null);var p=O({},c);return"function"==typeof a&&(a=a(p)),"ignore"===h&&It(p)&&delete p.errors,s.markMutationResult({mutationId:e,result:p,document:t,variables:n,fetchPolicy:y,errorPolicy:h,context:m,update:l,updateQueries:i,awaitRefetchQueries:u,refetchQueries:a,removeOptimistic:r?e:void 0,onQueryUpdated:f,keepRootFields:v})})).subscribe({next:function(e){s.broadcastQueries(),c(e)},error:function(t){o&&(o.loading=!1,o.error=t),r&&s.cache.removeOptimistic(e),s.broadcastQueries(),p(t instanceof Xt?t:new Xt({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var n=this;void 0===t&&(t=this.cache);var r=e.result,i=[],o="no-cache"===e.fetchPolicy;if(!o&&ar(r,e.errorPolicy)){i.push({result:r.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables});var a=e.updateQueries;a&&this.queries.forEach((function(e,o){var s=e.observableQuery,c=s&&s.queryName;if(c&&sr.call(a,c)){var u=a[c],l=n.queries.get(o),f=l.document,p=l.variables,h=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),d=h.result;if(h.complete&&d){var y=u(d,{mutationResult:r,queryName:f&&he(f)||void 0,queryVariables:p});y&&i.push({result:y,dataId:"ROOT_QUERY",query:f,variables:p})}}}))}if(i.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var s=[];if(this.refetchQueries({updateCache:function(t){o||i.forEach((function(e){return t.write(e)}));var a=e.update;if(a){if(!o){var s=t.diff({id:"ROOT_MUTATION",query:n.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});s.complete&&(r=O(O({},r),{data:s.result}))}a(t,r,{context:e.context,variables:e.variables})}o||e.keepRootFields||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return s.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(s).then((function(){return r}))}return Promise.resolve(r)},e.prototype.markMutationOptimistic=function(e,t){var n=this,r="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{n.markMutationResult(O(O({},t),{result:{data:r}}),e)}catch(e){__DEV__&&c.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,n){return this.fetchQueryObservable(e,t,n).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t,n=this.transformCache;if(!n.has(e)){var r=this.cache.transformDocument(e),i=(t=this.cache.transformForLink(r),jt([qt],fe(t))),o=this.localState.clientQuery(r),a=i&&this.localState.serverQuery(i),s={document:r,hasClientExports:Ut(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:a,defaultVars:me(pe(r)),asQuery:O(O({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?O(O({},e),{operation:"query"}):e}))})},c=function(e){e&&!n.has(e)&&n.set(e,s)};c(e),c(r),c(o),c(a)}return n.get(e)},e.prototype.getVariables=function(e,t){return O(O({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=O(O({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new or(this),n=new sn({queryManager:this,queryInfo:t,options:e});return this.queries.set(n.queryId,t),t.init({document:e.query,observableQuery:n,variables:e.variables}),n},e.prototype.query=function(e,t){var n=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?c(e.query,"query option is required. You must specify your GraphQL document in the query option."):c(e.query,14),__DEV__?c("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):c("Document"===e.query.kind,15),__DEV__?c(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):c(!e.returnPartialData,16),__DEV__?c(!e.pollInterval,"pollInterval option only supported on watchQuery."):c(!e.pollInterval,17),this.fetchQuery(t,e).finally((function(){return n.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new s("Store reset while query was in flight (not completed in link chain)"):new s(18)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=Ht.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,r=new Map,i=new Set;return Array.isArray(e)&&e.forEach((function(e){var n;"string"==typeof e?r.set(e,!1):J(n=e)&&"Document"===n.kind&&Array.isArray(n.definitions)?r.set(t.transform(e).document,!1):J(e)&&e.query&&i.add(e)})),this.queries.forEach((function(t,i){var o=t.observableQuery,a=t.document;if(o){if("all"===e)return void n.set(i,o);var s=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||s&&r.has(s)||a&&r.has(a))&&(n.set(i,o),s&&r.set(s,!0),a&&r.set(a,!0))}})),i.size&&i.forEach((function(e){var r=Wt("legacyOneTimeQuery"),i=t.getQuery(r).init({document:e.query,variables:e.variables}),o=new sn({queryManager:t,queryInfo:i,options:O(O({},e),{fetchPolicy:"network-only"})});c(o.queryId===r),i.setObservableQuery(o),n.set(r,o)})),__DEV__&&r.size&&r.forEach((function(e,t){e||__DEV__&&c.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))})),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach((function(r,i){var o=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&n.push(r.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.errorPolicy,o=e.variables,a=e.context,s=void 0===a?{}:a;n=this.transform(n).document,o=this.getVariables(n,o);var c=function(e){return t.getObservableFromLink(n,s,e).map((function(o){if("no-cache"!==r&&(ar(o,i)&&t.cache.write({query:n,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),It(o))throw new Xt({graphQLErrors:o.errors});return o}))};if(this.transform(n).hasClientExports){var u=this.localState.addExportedVariables(n,o,s).then(c);return new Y((function(e){var t=null;return u.then((function(n){return t=n.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return c(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.getQuery(e).stop(),this.queries.delete(e)},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var i,o,a=this;void 0===r&&(r=null!==(i=null==t?void 0:t.queryDeduplication)&&void 0!==i?i:this.queryDeduplication);var s=this.transform(e).serverQuery;if(s){var c=this.inFlightLinkObservables,u=this.link,l={query:s,variables:n,operationName:he(s)||void 0,context:this.prepareContext(O(O({},t),{forceFetch:!r}))};if(t=l.context,r){var f=c.get(s)||new Map;c.set(s,f);var p=Tt(n);if(!(o=f.get(p))){var h=new Yt([Oe(u,l)]);f.set(p,o=h),h.cleanup((function(){f.delete(p)&&f.size<1&&c.delete(s)}))}}else o=new Yt([Oe(u,l)])}else o=new Yt([Y.of({data:{}})]),t=this.prepareContext(t);var d=this.transform(e).clientQuery;return d&&(o=xt(o,(function(e){return a.localState.runResolvers({document:d,remoteResult:e,context:t,variables:n})}))),o},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId();return xt(this.getObservableFromLink(e.document,n.context,n.variables),(function(i){var o=Jt(i.errors);if(r>=e.lastRequestId){if(o&&"none"===n.errorPolicy)throw e.markError(new Xt({graphQLErrors:i.errors}));e.markResult(i,n,t),e.markReady()}var a={data:i.data,loading:!1,networkStatus:e.networkStatus||Ht.ready};return o&&"ignore"!==n.errorPolicy&&(a.errors=i.errors),a}),(function(t){var n=$t(t)?t:new Xt({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n}))},e.prototype.fetchQueryObservable=function(e,t,n){var r=this;void 0===n&&(n=Ht.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),a=this.getQuery(e),s=t.fetchPolicy,c=void 0===s?"cache-first":s,u=t.errorPolicy,l=void 0===u?"none":u,f=t.returnPartialData,p=void 0!==f&&f,h=t.notifyOnNetworkStatusChange,d=void 0!==h&&h,y=t.context,v=void 0===y?{}:y,m=Object.assign({},t,{query:i,variables:o,fetchPolicy:c,errorPolicy:l,returnPartialData:p,notifyOnNetworkStatusChange:d,context:v}),b=function(e){return m.variables=e,r.fetchQueryByPolicy(a,m,n)};this.fetchCancelFns.set(e,(function(e){setTimeout((function(){return g.cancel(e)}))}));var g=new Yt(this.transform(m.query).hasClientExports?this.localState.addExportedVariables(m.query,m.variables,m.context).then(b):b(m.variables));return g.cleanup((function(){r.fetchCancelFns.delete(e),ln(t)})),g},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,i=e.optimistic,o=void 0!==i&&i,a=e.removeOptimistic,s=void 0===a?o?Wt("refetchQueries"):void 0:a,c=e.onQueryUpdated,u=new Map;r&&this.getObservableQueries(r).forEach((function(e,n){u.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})}));var l=new Map;return n&&this.cache.batch({update:n,optimistic:o&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof or&&e.watcher.observableQuery;if(r){if(c){u.delete(r.queryId);var i=c(r,t,n);return!0===i&&(i=r.refetch()),!1!==i&&l.set(r,i),i}null!==c&&u.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),u.size&&u.forEach((function(e,n){var r,i=e.oq,o=e.lastDiff,a=e.diff;if(c){if(!a){var s=i.queryInfo;s.reset(),a=s.getDiff()}r=c(i,a,o)}c&&!0!==r||(r=i.refetch()),!1!==r&&l.set(i,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)})),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,n){var r=this,i=t.query,o=t.variables,a=t.fetchPolicy,s=t.refetchWritePolicy,c=t.errorPolicy,u=t.returnPartialData,l=t.context,f=t.notifyOnNetworkStatusChange,p=e.networkStatus;e.init({document:i,variables:o,networkStatus:n});var h=function(){return e.getDiff(o)},d=function(t,n){void 0===n&&(n=e.networkStatus||Ht.loading);var a=t.result;!__DEV__||u||ut(a,{})||un(t.missing);var s=function(e){return Y.of(O({data:e,loading:Zt(n),networkStatus:n},t.complete?null:{partial:!0}))};return a&&r.transform(i).hasForcedResolvers?r.localState.runResolvers({document:i,remoteResult:{data:a},context:l,variables:o,onlyRunForcedResolvers:!0}).then((function(e){return s(e.data||void 0)})):s(a)},y="no-cache"===a?0:n===Ht.refetch&&"merge"!==s?1:2,v=function(){return r.getResultsFromLink(e,y,{variables:o,context:l,fetchPolicy:a,errorPolicy:c})},m=f&&"number"==typeof p&&p!==n&&Zt(n);switch(a){default:case"cache-first":return(b=h()).complete?[d(b,e.markReady())]:u||m?[d(b),v()]:[v()];case"cache-and-network":var b;return(b=h()).complete||u||m?[d(b),v()]:[v()];case"cache-only":return[d(h(),e.markReady())];case"network-only":return m?[d(h()),v()]:[v()];case"no-cache":return m?[d(e.getDiff()),v()]:[v()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new or(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return O(O({},t),{clientAwareness:this.clientAwareness})},e}(),ur=!1;function lr(e,t){return ke(e,t,t.variables&&{variables:O(O({},e.variables),t.variables)})}var fr,pr=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.uri,r=e.credentials,i=e.headers,o=e.cache,a=e.ssrMode,u=void 0!==a&&a,l=e.ssrForceFetchDelay,f=void 0===l?0:l,p=e.connectToDevTools,h=void 0===p?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:p,d=e.queryDeduplication,y=void 0===d||d,v=e.defaultOptions,m=e.assumeImmutableResults,b=void 0!==m&&m,g=e.resolvers,_=e.typeDefs,w=e.fragmentMatcher,E=e.name,O=e.version,k=e.link;if(k||(k=n?new rt({uri:n,credentials:r,headers:i}):Ee.empty()),!o)throw __DEV__?new s("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new s(7);if(this.link=k,this.cache=o,this.disableNetworkFetches=u||f>0,this.queryDeduplication=y,this.defaultOptions=v||{},this.typeDefs=_,f&&setTimeout((function(){return t.disableNetworkFetches=!1}),f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),h&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!ur&&__DEV__&&(ur=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var S=window.navigator,T=S&&S.userAgent,D=void 0;"string"==typeof T&&(T.indexOf("Chrome/")>-1?D="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":T.indexOf("Firefox/")>-1&&(D="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),D&&__DEV__&&c.log("Download the Apollo DevTools for a better development experience: "+D)}this.version="3.5.8",this.localState=new tr({cache:o,client:this,resolvers:g,fragmentMatcher:w}),this.queryManager=new cr({cache:this.cache,link:this.link,queryDeduplication:y,ssrMode:u,clientAwareness:{name:E,version:O},localState:this.localState,assumeImmutableResults:b,onBroadcast:h?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=lr(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=O(O({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=lr(this.defaultOptions.query,e)),__DEV__?c("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):c("cache-and-network"!==e.fetchPolicy,8),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=O(O({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=lr(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return Oe(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach((function(e,t){n.push(t),r.push(e)}));var i=Promise.all(r);return i.queries=n,i.results=r,i.catch((function(e){__DEV__&&c.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}();fr||(fr={});var hr=function(){function e(){this.getFragmentDoc=Yn($)}return e.prototype.batch=function(e){var t,n=this,r="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction((function(){return t=e.update(n)}),r),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(O(O({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(O(O({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,r=k(e,["id","data"]);return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,r=e.fragment,i=e.fragmentName,o=k(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(r,i),dataId:t,result:n}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var r=n.readQuery(e),i=t(r);return null==i?r:(n.writeQuery(O(O({},e),{data:i})),i)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var r=n.readFragment(e),i=t(r);return null==i?r:(n.writeFragment(O(O({},e),{data:i})),i)}})},e}(),dr=function(e,t,n,r){this.message=e,this.path=t,this.query=n,this.variables=r};function yr(e){return __DEV__&&(t=e,(n=new Set([t])).forEach((function(e){J(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(t){J(e[t])&&n.add(e[t])}))}))),e;var t,n}var vr=Object.prototype.hasOwnProperty;function mr(e,t){var n=e.__typename,r=e.id,i=e._id;if("string"==typeof n&&(t&&(t.keyObject=void 0!==r?{id:r}:void 0!==i?{_id:i}:void 0),void 0===r&&(r=i),void 0!==r))return"".concat(n,":").concat("number"==typeof r||"string"==typeof r?r:JSON.stringify(r))}var br={dataIdFromObject:mr,addTypename:!0,resultCaching:!0,canonizeResults:!1};function gr(e){var t=e.canonizeResults;return void 0===t?br.canonizeResults:t}var _r=/^[_a-z][_0-9a-z]*/i;function wr(e){var t=e.match(_r);return t?t[0]:e}function Er(e,t,n){return!!J(t)&&(Array.isArray(t)?t.every((function(t){return Er(e,t,n)})):e.selections.every((function(e){if(ue(e)&&Lt(e,n)){var r=se(e);return vr.call(t,r)&&(!e.selectionSet||Er(e.selectionSet,t[r],n))}return!0})))}function Or(e){return J(e)&&!ee(e)&&!Array.isArray(e)}var kr=Object.create(null),Sr=function(){return kr},Tr=Object.create(null),Dr=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return yr(ee(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return ee(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return Z(e);if(ee(e))return e;var r=n.policies.identify(e)[0];if(r){var i=Z(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return O({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),vr.call(this.data,e)){var n=this.data[e];if(n&&vr.call(n,t))return n[t]}return"__typename"===t&&vr.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Ar?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),vr.call(this.data,e)?this.data[e]:this instanceof Ar?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;ee(e)&&(e=e.__ref),ee(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(n=e):e,o="string"==typeof t?this.lookup(n=t):t;if(o){__DEV__?c("string"==typeof n,"store.merge expects a string ID"):c("string"==typeof n,1);var a=new yn(Cr).merge(i,o);if(this.data[n]=a,a!==i&&(delete this.refs[n],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(o).forEach((function(e){if(!i||i[e]!==a[e]){s[e]=1;var t=wr(e);t===e||r.policies.hasKeyArgs(a.__typename,t)||(s[t]=1),void 0!==a[e]||r instanceof Ar||delete a[e]}})),!s.__typename||i&&i.__typename||this.policies.rootTypenamesById[n]!==a.__typename||delete s.__typename,Object.keys(s).forEach((function(e){return r.group.dirty(n,e)}))}}},e.prototype.modify=function(e,t){var n=this,r=this.lookup(e);if(r){var i=Object.create(null),o=!1,a=!0,s={DELETE:kr,INVALIDATE:Tr,isReference:ee,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||Z(e)}:t,{store:n})}};if(Object.keys(r).forEach((function(c){var u=wr(c),l=r[c];if(void 0!==l){var f="function"==typeof t?t:t[c]||t[u];if(f){var p=f===Sr?kr:f(yr(l),O(O({},s),{fieldName:u,storeFieldName:c,storage:n.getStorage(e,c)}));p===Tr?n.group.dirty(e,c):(p===kr&&(p=void 0),p!==l&&(i[c]=p,o=!0,l=p))}void 0!==l&&(a=!1)}})),o)return this.merge(e,i),a&&(this instanceof Ar?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,n){var r,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),a=t&&n?this.policies.getStoreFieldName({typename:o,fieldName:t,args:n}):t;return this.modify(e,a?((r={})[a]=Sr,r):Sr)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(vr.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof Ar&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach((function(t){vr.call(e.policies.rootTypenamesById,t)||n.push(t)})),n.length&&(t.__META={extraRootIds:n.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(n){e&&vr.call(e,n)||t.delete(n)})),e){var n=e.__META,r=k(e,["__META"]);Object.keys(r).forEach((function(e){t.merge(e,r[e])})),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Ar?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach((function(r){vr.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])}));var r=Object.keys(n);if(r.length){for(var i=this;i instanceof Ar;)i=i.parent;r.forEach((function(e){return i.delete(e)}))}return r},e.prototype.findChildRefIds=function(e){if(!vr.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach((function(e){ee(e)&&(t[e.__ref]=!0),J(e)&&Object.keys(e).forEach((function(t){var n=e[t];J(n)&&r.add(n)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),xr=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?zn():null,this.keyMaker=new wt(Et)},e.prototype.depend=function(e,t){if(this.d){this.d(Ir(e,t));var n=wr(t);n!==t&&this.d(Ir(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(Ir(e,t),"__exists"===t?"forget":"setDirty")},e}();function Ir(e,t){return t+"#"+e}function Nr(e,t){Pr(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var n=t.policies,r=t.resultCaching,i=void 0===r||r,o=t.seed,a=e.call(this,n,new xr(i))||this;return a.stump=new Rr(a),a.storageTrie=new wt(Et),o&&a.replace(o),a}return E(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(Dr||(Dr={}));var Ar=function(e){function t(t,n,r,i){var o=e.call(this,n.policies,i)||this;return o.id=t,o.parent=n,o.replay=r,o.group=i,r(o),o}return E(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var r=t.data[e],i=n.lookup(e);i?r?r!==i&&Object.keys(r).forEach((function(n){ut(r[n],i[n])||t.group.dirty(e,n)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(n){t.group.dirty(e,n)}))):t.delete(e)})),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return O(O({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return vr.call(this.data,t)?O(O({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(Dr),Rr=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new xr(t.group.caching,t.group))||this}return E(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(Ar);function Cr(e,t,n){var r=e[n],i=t[n];return ut(r,i)?r:i}function Pr(e){return!!(e instanceof Dr&&e.group.caching)}function jr(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var Fr=function(){function e(e){var t=this;this.knownResults=new(Et?WeakMap:Map),this.config=ke(e,{addTypename:!1!==e.addTypename,canonizeResults:gr(e)}),this.canon=e.canon||new St,this.executeSelectionSet=Yn((function(e){var n,r=e.context.canonizeResults,i=jr(e);i[3]=!r;var o=(n=t.executeSelectionSet).peek.apply(n,i);return o?r?O(O({},o),{result:t.canon.admit(o.result)}):o:(Nr(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:jr,makeCacheKey:function(e,t,n,r){if(Pr(n.store))return n.store.makeCacheKey(e,ee(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=Yn((function(e){return Nr(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(Pr(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new St},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,r=e.rootId,i=void 0===r?"ROOT_QUERY":r,o=e.variables,a=e.returnPartialData,s=void 0===a||a,c=e.canonizeResults,u=void 0===c?this.config.canonizeResults:c,l=this.config.cache.policies;o=O(O({},me(ye(n))),o);var f,p=Z(i),h=new yn,d=this.executeSelectionSet({selectionSet:ve(n).selectionSet,objectOrReference:p,enclosingRef:p,context:{store:t,query:n,policies:l,variables:o,varString:Tt(o),canonizeResults:u,fragmentMap:H(de(n)),merge:function(e,t){return h.merge(e,t)}}});if(d.missing&&(f=[new dr(qr(d.missing),d.missing,n,o)],!s))throw f[0];return{result:d.result,complete:!f,missing:f}},e.prototype.isFresh=function(e,t,n,r){if(Pr(r.store)&&this.knownResults.get(e)===n){var i=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,n=e.selectionSet,r=e.objectOrReference,i=e.enclosingRef,o=e.context;if(ee(r)&&!o.policies.rootTypenamesById[r.__ref]&&!o.store.has(r.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(r.__ref," object")};var a,s=o.variables,c=o.policies,u=o.store.getFieldValue(r,"__typename"),l={};function f(e,t){var n;return e.missing&&(a=o.merge(a,((n={})[t]=e.missing,n))),e.result}this.config.addTypename&&"string"==typeof u&&!c.rootIdsByTypename[u]&&(l={__typename:u});var p=new Set(n.selections);p.forEach((function(e){var n,h;if(Lt(e,s))if(ue(e)){var d=c.readField({fieldName:e.name.value,field:e,variables:o.variables,from:r},o),y=se(e);void 0===d?Ft.added(e)||(a=o.merge(a,((n={})[y]="Can't find field '".concat(e.name.value,"' on ").concat(ee(r)?r.__ref+" object":"object "+JSON.stringify(r,null,2)),n))):Array.isArray(d)?d=f(t.executeSubSelectedArray({field:e,array:d,enclosingRef:i,context:o}),y):e.selectionSet?null!=d&&(d=f(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:d,enclosingRef:ee(d)?d:i,context:o}),y)):o.canonizeResults&&(d=t.canon.pass(d)),void 0!==d&&(l=o.merge(l,((h={})[y]=d,h)))}else{var v=X(e,o.fragmentMap);v&&c.fragmentMatches(v,u)&&v.selectionSet.selections.forEach(p.add,p)}}));var h={result:l,missing:a},d=o.canonizeResults?this.canon.admit(h):yr(h);return d.result&&this.knownResults.set(d.result,n),d},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,o=e.enclosingRef,a=e.context;function s(e,n){var r;return e.missing&&(t=a.merge(t,((r={})[n]=e.missing,r))),e.result}return r.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map((function(e,t){return null===e?null:Array.isArray(e)?s(n.executeSubSelectedArray({field:r,array:e,enclosingRef:o,context:a}),t):r.selectionSet?s(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:ee(e)?e:o,context:a}),t):(__DEV__&&function(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach((function(n){J(n)&&(__DEV__?c(!ee(n),"Missing selection set for object of type ".concat(function(e,t){return ee(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,n)," returned for query field ").concat(t.name.value)):c(!ee(n),5),Object.values(n).forEach(r.add,r))}))}}(a.store,r,e),e)})),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function qr(e){try{JSON.stringify(e,(function(e,t){if("string"==typeof t)throw t;return t}))}catch(e){return e}}var Mr=Object.create(null);function Qr(e){var t=JSON.stringify(e);return Mr[t]||(Mr[t]=Object.create(null))}function Lr(e){var t=Qr(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,n){var r=function(e,t){return n.readField(t,e)},i=n.keyObject=Ur(e,(function(e){var i=zr(n.storeObject,e,r);return void 0===i&&t!==n.storeObject&&vr.call(t,e[0])&&(i=zr(t,e,Wr)),__DEV__?c(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):c(void 0!==i,2),i}));return"".concat(n.typename,":").concat(JSON.stringify(i))})}function Vr(e){var t=Qr(e);return t.keyArgsFn||(t.keyArgsFn=function(t,n){var r=n.field,i=n.variables,o=n.fieldName,a=Ur(e,(function(e){var n=e[0],o=n.charAt(0);if("@"!==o)if("$"!==o){if(t)return zr(t,e)}else{var a=n.slice(1);if(i&&vr.call(i,a)){var s=e.slice(0);return s[0]=a,zr(i,s)}}else if(r&&Jt(r.directives)){var c=n.slice(1),u=r.directives.find((function(e){return e.name.value===c})),l=u&&ae(u,i);return l&&zr(l,e.slice(1))}})),s=JSON.stringify(a);return(t||"{}"!==s)&&(o+=":"+s),o})}function Ur(e,t){var n=new yn;return Br(e).reduce((function(e,r){var i,o=t(r);if(void 0!==o){for(var a=r.length-1;a>=0;--a)(i={})[r[a]]=o,o=i;e=n.merge(e,o)}return e}),Object.create(null))}function Br(e){var t=Qr(e);if(!t.paths){var n=t.paths=[],r=[];e.forEach((function(t,i){Array.isArray(t)?(Br(t).forEach((function(e){return n.push(r.concat(e))})),r.length=0):(r.push(t),Array.isArray(e[i+1])||(n.push(r.slice(0)),r.length=0))}))}return t.paths}function Wr(e,t){return e[t]}function zr(e,t,n){return n=n||Wr,Gr(t.reduce((function e(t,r){return Array.isArray(t)?t.map((function(t){return e(t,r)})):t&&n(t,r)}),e))}function Gr(e){return J(e)?Array.isArray(e)?e.map(Gr):Ur(Object.keys(e).sort(),(function(t){return zr(e,t)})):e}function Kr(e){return void 0!==e.args?e.args:e.field?ae(e.field,e.variables):null}re.setStringify(Tt);var Yr=function(){},Jr=function(e,t){return t.fieldName},$r=function(e,t,n){return(0,n.mergeObjects)(e,t)},Hr=function(e,t){return t},Xr=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=O({dataIdFromObject:mr},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var n,r=this,i=t&&(t.typename||(null===(n=t.storeObject)||void 0===n?void 0:n.__typename))||e.__typename;if(i===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var o,a=t&&t.storeObject||e,s=O(O({},t),{typename:i,storeObject:a,readField:t&&t.readField||function(){var e=ei(arguments,a);return r.readField(e,{store:r.cache.data,variables:e.variables})}}),c=i&&this.getTypePolicy(i),u=c&&c.keyFn||this.config.dataIdFromObject;u;){var l=u(e,s);if(!Array.isArray(l)){o=l;break}u=Lr(l)}return o=o?String(o):void 0,s.keyObject?[o,s.keyObject]:[o]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(n){var r=e[n],i=r.queryType,o=r.mutationType,a=r.subscriptionType,s=k(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),o&&t.setRootTypename("Mutation",n),a&&t.setRootTypename("Subscription",n),vr.call(t.toBeAdded,n)?t.toBeAdded[n].push(s):t.toBeAdded[n]=[s]}))},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"==typeof t?t:!0===t?$r:!1===t?Hr:e.merge}a(r,t.merge),r.keyFn=!1===i?Yr:Array.isArray(i)?Lr(i):"function"==typeof i?i:r.keyFn,o&&Object.keys(o).forEach((function(t){var r=n.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)r.read=i;else{var s=i.keyArgs,c=i.read,u=i.merge;r.keyFn=!1===s?Jr:Array.isArray(s)?Vr(s):"function"==typeof s?s:r.keyFn,"function"==typeof c&&(r.read=c),a(r,u)}r.read&&r.merge&&(r.keyFn=r.keyFn||Jr)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?c(!r||r===e,"Cannot change root ".concat(e," __typename more than once")):c(!r||r===e,3),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(n){t.getSupertypeSet(n,!0),e[n].forEach((function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(_r);r&&r[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!vr.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var r=this.supertypeMap.get(e);r&&r.size&&r.forEach((function(e){var r=t.getTypePolicy(e),i=r.fields,o=k(r,["fields"]);Object.assign(n,o),Object.assign(n.fields,i)}))}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach((function(n){t.updateTypePolicy(e,n)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var a=this.getSupertypeSet(t,!0),s=[a],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&s.indexOf(t)<0&&s.push(t)},l=!(!n||!this.fuzzySubtypes.size),f=!1,p=0;p<s.length;++p){var h=s[p];if(h.has(o))return a.has(o)||(f&&__DEV__&&c.warn("Inferring subtype ".concat(t," of supertype ").concat(o)),a.add(o)),!0;h.forEach(u),l&&p===s.length-1&&Er(e.selectionSet,n,r)&&(l=!1,f=!0,this.fuzzySubtypes.forEach((function(e,n){var r=t.match(e);r&&r[0]===t&&u(n)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var n=this.getFieldPolicy(e,t,!1);return!(!n||!n.keyFn)},e.prototype.getStoreFieldName=function(e){var t,n=e.typename,r=e.fieldName,i=this.getFieldPolicy(n,r,!1),o=i&&i.keyFn;if(o&&n)for(var a={typename:n,fieldName:r,field:e.field||null,variables:e.variables},s=Kr(e);o;){var c=o(s,a);if(!Array.isArray(c)){t=c||r;break}o=Vr(c)}return void 0===t&&(t=e.field?function(e,t){var n=null;e.directives&&(n={},e.directives.forEach((function(e){n[e.name.value]={},e.arguments&&e.arguments.forEach((function(r){var i=r.name,o=r.value;return te(n[e.name.value],i,o,t)}))})));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach((function(e){var n=e.name,i=e.value;return te(r,n,i,t)}))),re(e.name.value,r,n)}(e.field,e.variables):re(r,Kr(e))),!1===t?r:r===wr(t)?t:r+":"+t},e.prototype.readField=function(e,t){var n=e.from;if(n&&(e.field||e.fieldName)){if(void 0===e.typename){var r=t.store.getFieldValue(n,"__typename");r&&(e.typename=r)}var i=this.getStoreFieldName(e),o=wr(i),a=t.store.getFieldValue(n,i),s=this.getFieldPolicy(e.typename,o,!1),c=s&&s.read;if(c){var u=Zr(this,n,e,t,t.store.getStorage(ee(n)?n.__ref:n,i));return Jn.withValue(this.cache,c,[a,u])}return a}},e.prototype.getReadFunction=function(e,t){var n=this.getFieldPolicy(e,t,!1);return n&&n.read},e.prototype.getMergeFunction=function(e,t,n){var r=this.getFieldPolicy(e,t,!1),i=r&&r.merge;return!i&&n&&(i=(r=this.getTypePolicy(n))&&r.merge),i},e.prototype.runMergeFunction=function(e,t,n,r,i){var o=n.field,a=n.typename,s=n.merge;return s===$r?ti(r.store)(e,t):s===Hr?t:(r.overwrite&&(e=void 0),s(e,t,Zr(this,void 0,{typename:a,fieldName:o.name.value,field:o,variables:r.variables},r,i||Object.create(null))))},e}();function Zr(e,t,n,r,i){var o=e.getStoreFieldName(n),a=wr(o),s=n.variables||r.variables,c=r.store,u=c.toReference,l=c.canRead;return{args:Kr(n),field:n.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:ee,toReference:u,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(ei(arguments,t,r),r)},mergeObjects:ti(r.store)}}function ei(e,t,n){var r,i,o,a=e[0],s=e[1],u=e.length;return"string"==typeof a?r={fieldName:a,from:u>1?s:t}:(r=O({},a),vr.call(r,"from")||(r.from=t)),__DEV__&&void 0===r.from&&__DEV__&&c.warn("Undefined 'from' passed to readField with arguments ".concat((i=Array.from(e),o=Wt("stringifyForDisplay"),JSON.stringify(i,(function(e,t){return void 0===t?o:t})).split(JSON.stringify(o)).join("<undefined>")))),void 0===r.variables&&(r.variables=n),r}function ti(e){return function(t,n){if(Array.isArray(t)||Array.isArray(n))throw __DEV__?new s("Cannot automatically merge arrays"):new s(4);if(J(t)&&J(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(ee(t)&&Or(n))return e.merge(t.__ref,n),t;if(Or(t)&&ee(n))return e.merge(t,n.__ref),n;if(Or(t)&&Or(n))return O(O({},t),n)}return n}}function ni(e,t,n){var r="".concat(t).concat(n),i=e.flavors.get(r);return i||e.flavors.set(r,i=e.clientOnly===t&&e.deferred===n?e:O(O({},e),{clientOnly:t,deferred:n})),i}var ri=function(){function e(e,t){this.cache=e,this.reader=t}return e.prototype.writeToStore=function(e,t){var n=this,r=t.query,i=t.result,o=t.dataId,a=t.variables,u=t.overwrite,l=pe(r),f=new yn;a=O(O({},me(l)),a);var p={store:e,written:Object.create(null),merge:function(e,t){return f.merge(e,t)},variables:a,varString:Tt(a),fragmentMap:H(de(r)),overwrite:!!u,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map},h=this.processSelectionSet({result:i||Object.create(null),dataId:o,selectionSet:l.selectionSet,mergeTree:{map:new Map},context:p});if(!ee(h))throw __DEV__?new s("Could not identify object ".concat(JSON.stringify(i))):new s(6);return p.incomingById.forEach((function(t,r){var i=t.storeObject,o=t.mergeTree,a=t.fieldNodeSet,s=Z(r);if(o&&o.map.size){var u=n.applyMerges(o,s,i,p);if(ee(u))return;i=u}if(__DEV__&&!p.overwrite){var l=Object.create(null);a.forEach((function(e){e.selectionSet&&(l[e.name.value]=!0)})),Object.keys(i).forEach((function(e){(function(e){return!0===l[wr(e)]})(e)&&!function(e){var t=o&&o.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"==typeof t&&t},o=i(e);if(o){var a=i(t);if(a&&!ee(o)&&!ut(o,a)&&!Object.keys(o).every((function(e){return void 0!==r.getFieldValue(a,e)}))){var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),u=wr(n),l="".concat(s,".").concat(u);if(!ui.has(l)){ui.add(l);var f=[];Array.isArray(o)||Array.isArray(a)||[o,a].forEach((function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||f.includes(t)||f.push(t)})),__DEV__&&c.warn("Cache data may be lost when replacing the ".concat(u," field of a ").concat(s," object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(f.length?"either ensure all objects of type "+f.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(l," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(o).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(a).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}}}}(s,i,e,p.store)}))}e.merge(r,i)})),e.retain(h.__ref),h},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,r=e.result,i=e.selectionSet,o=e.context,a=e.mergeTree,s=this.cache.policies,u=Object.create(null),l=n&&s.rootTypenamesById[n]||ce(r,i,o.fragmentMap)||n&&o.store.get(n,"__typename");"string"==typeof l&&(u.__typename=l);var f=function(){var e=ei(arguments,u,o.variables);if(ee(e.from)){var t=o.incomingById.get(e.from.__ref);if(t){var n=s.readField(O(O({},e),{from:t.storeObject}),o);if(void 0!==n)return n}}return s.readField(e,o)},p=new Set;this.flattenFields(i,r,o,l).forEach((function(e,n){var i,o=se(n),h=r[o];if(p.add(n),void 0!==h){var d=s.getStoreFieldName({typename:l,fieldName:n.name.value,field:n,variables:e.variables}),y=oi(a,d),v=t.processFieldValue(h,n,n.selectionSet?ni(e,!1,!1):e,y),m=void 0;n.selectionSet&&(ee(v)||Or(v))&&(m=f("__typename",v));var b=s.getMergeFunction(l,n.name.value,m);b?y.info={field:n,typename:l,merge:b}:ci(a,d),u=e.merge(u,((i={})[d]=v,i))}else!__DEV__||e.clientOnly||e.deferred||Ft.added(n)||s.getReadFunction(l,n.name.value)||__DEV__&&c.error("Missing field '".concat(se(n),"' while writing result ").concat(JSON.stringify(r,null,2)).substring(0,1e3))}));try{var h=s.identify(r,{typename:l,selectionSet:i,fragmentMap:o.fragmentMap,storeObject:u,readField:f}),d=h[0],y=h[1];n=n||d,y&&(u=o.merge(u,y))}catch(e){if(!n)throw e}if("string"==typeof n){var v=Z(n),m=o.written[n]||(o.written[n]=[]);if(m.indexOf(i)>=0)return v;if(m.push(i),this.reader&&this.reader.isFresh(r,v,i,o))return v;var b=o.incomingById.get(n);return b?(b.storeObject=o.merge(b.storeObject,u),b.mergeTree=ai(b.mergeTree,a),p.forEach((function(e){return b.fieldNodeSet.add(e)}))):o.incomingById.set(n,{storeObject:u,mergeTree:si(a)?void 0:a,fieldNodeSet:p}),v}return u},e.prototype.processFieldValue=function(e,t,n,r){var i=this;return t.selectionSet&&null!==e?Array.isArray(e)?e.map((function(e,o){var a=i.processFieldValue(e,t,n,oi(r,o));return ci(r,o),a})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?tn(e):e},e.prototype.flattenFields=function(e,t,n,r){void 0===r&&(r=ce(t,e,n.fragmentMap));var i=new Map,o=this.cache.policies,a=new wt(!1);return function e(s,c){var u=a.lookup(s,c.clientOnly,c.deferred);u.visited||(u.visited=!0,s.selections.forEach((function(a){if(Lt(a,n.variables)){var s=c.clientOnly,u=c.deferred;if(s&&u||!Jt(a.directives)||a.directives.forEach((function(e){var t=e.name.value;if("client"===t&&(s=!0),"defer"===t){var r=ae(e,n.variables);r&&!1===r.if||(u=!0)}})),ue(a)){var l=i.get(a);l&&(s=s&&l.clientOnly,u=u&&l.deferred),i.set(a,ni(n,s,u))}else{var f=X(a,n.fragmentMap);f&&o.fragmentMatches(f,r,t,n.variables)&&e(f.selectionSet,ni(n,s,u))}}})))}(e,n),i},e.prototype.applyMerges=function(e,t,n,r,i){var o,a=this;if(e.map.size&&!ee(n)){var s,u=Array.isArray(n)||!ee(t)&&!Or(t)?void 0:t,l=n;u&&!i&&(i=[ee(u)?u.__ref:u]);var f=function(e,t){return Array.isArray(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var n=f(u,t),o=f(l,t);if(void 0!==o){i&&i.push(t);var p=a.applyMerges(e,n,o,r,i);p!==o&&(s=s||new Map).set(t,p),i&&c(i.pop()===t)}})),s&&(n=Array.isArray(l)?l.slice(0):O({},l),s.forEach((function(e,t){n[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&(o=r.store).getStorage.apply(o,i)):n},e}(),ii=[];function oi(e,t){var n=e.map;return n.has(t)||n.set(t,ii.pop()||{map:new Map}),n.get(t)}function ai(e,t){if(e===t||!t||si(t))return e;if(!e||si(e))return t;var n=e.info&&t.info?O(O({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,i={info:n,map:r?new Map:e.map.size?e.map:t.map};if(r){var o=new Set(t.map.keys());e.map.forEach((function(e,n){i.map.set(n,ai(e,t.map.get(n))),o.delete(n)})),o.forEach((function(n){i.map.set(n,ai(t.map.get(n),e.map.get(n)))}))}return i}function si(e){return!e||!(e.info||e.map.size)}function ci(e,t){var n=e.map,r=n.get(t);r&&si(r)&&(ii.push(r),n.delete(t))}var ui=new Set,li=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=Zn,n.txCount=0,n.config=function(e){return ke(br,e)}(t),n.addTypename=!!n.config.addTypename,n.policies=new Xr({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return E(t,e),t.prototype.init=function(){var e=this.data=new Dr.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader;this.storeWriter=new ri(this,this.storeReader=new Fr({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:gr(this.config),canon:e?void 0:n&&n.canon})),this.maybeBroadcastWatch=Yn((function(e,n){return t.broadcastWatch(e,n)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(Pr(n)){var r=e.optimistic,i=e.rootId,o=e.variables;return n.makeCacheKey(e.query,e.callback,Tt({optimistic:r,rootId:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,n=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore(O(O({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(e){if(e instanceof dr)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(vr.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore(O(O({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||function(e){Hn(e).vars.forEach((function(t){return t.attachCache(e)}))}(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&Xn(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){Tt.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(ee(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){__DEV__&&c.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(vr.call(e,"id"))return!1;e=O(O({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),Tt.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),Xn(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,n=this,r=e.update,i=e.optimistic,o=void 0===i||i,a=e.removeOptimistic,s=e.onWatchUpdated,c=function(e){var i=n,o=i.data,a=i.optimisticData;++n.txCount,e&&(n.data=n.optimisticData=e);try{return t=r(n)}finally{--n.txCount,n.data=o,n.optimisticData=a}},u=new Set;return s&&!this.txCount&&this.broadcastWatches(O(O({},e),{onWatchUpdated:function(e){return u.add(e),!1}})),"string"==typeof o?this.optimisticData=this.optimisticData.addLayer(o,c):!1===o?c(this.data):c(),"string"==typeof a&&(this.optimisticData=this.optimisticData.removeLayer(a)),s&&u.size?(this.broadcastWatches(O(O({},e),{onWatchUpdated:function(e,t){var n=s.call(this,e,t);return!1!==n&&u.delete(e),n}})),u.size&&u.forEach((function(e){return n.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=Ft(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(n){return t.maybeBroadcastWatch(n,e)}))},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,r,n))||n&&ut(n.result,r.result)||e.callback(e.lastDiff=r,n)},t}(hr),fi=Ee.empty,pi=Ee.from,hi=Ee.split,di=Ee.concat;function yi(e){var t=!1;return new Promise((function(n,r){e.subscribe({next:function(e){t?__DEV__&&c.warn("Promise Wrapper does not support multiple results from Observable"):(t=!0,n(e))},error:r})}))}function vi(e){return new Y((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}var mi=n(185);p(m?"log":"silent");var bi=n(294),gi=kt?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function _i(){var e=bi.createContext[gi];return e||(Object.defineProperty(bi.createContext,gi,{value:e=bi.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}var wi,Ei=function(e){var t=e.client,n=e.children,r=_i();return bi.createElement(r.Consumer,null,(function(e){return void 0===e&&(e={}),t&&e.client!==t&&(e=Object.assign({},e,{client:t})),__DEV__?c(e.client,'ApolloProvider was not passed a client instance. Make sure you pass in your client via the "client" prop.'):c(e.client,26),bi.createElement(r.Provider,{value:e},n)}))},Oi=function(e){var t=_i();return bi.createElement(t.Consumer,null,(function(t){return __DEV__?c(t&&t.client,'Could not find "client" in the context of ApolloConsumer. Wrap the root component in an <ApolloProvider>.'):c(t&&t.client,25),e.children(t.client)}))};function ki(e){var t=(0,bi.useContext)(_i()),n=e||t.client;return __DEV__?c(!!n,'Could not find "client" in the context or passed in as an option. Wrap the root component in an <ApolloProvider>, or pass an ApolloClient instance in via options.'):c(!!n,29),n}!function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(wi||(wi={}));var Si=new Map;function Ti(e){var t;switch(e){case wi.Query:t="Query";break;case wi.Mutation:t="Mutation";break;case wi.Subscription:t="Subscription"}return t}function Di(e){var t,n,r=Si.get(e);if(r)return r;__DEV__?c(!!e&&!!e.kind,"Argument of ".concat(e," passed to parser was not a valid GraphQL ")+"DocumentNode. You may need to use 'graphql-tag' or another method to convert your operation into a document"):c(!!e&&!!e.kind,30);var i=e.definitions.filter((function(e){return"FragmentDefinition"===e.kind})),o=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"query"===e.operation})),a=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation})),s=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"subscription"===e.operation}));__DEV__?c(!i.length||o.length||a.length||s.length,"Passing only a fragment to 'graphql' is not yet supported. You must include a query, subscription or mutation as well"):c(!i.length||o.length||a.length||s.length,31),__DEV__?c(o.length+a.length+s.length<=1,"react-apollo only supports a query, subscription, or a mutation per HOC. "+"".concat(e," had ").concat(o.length," queries, ").concat(s.length," ")+"subscriptions and ".concat(a.length," mutations. ")+"You can use 'compose' to join multiple operation types to a component"):c(o.length+a.length+s.length<=1,32),n=o.length?wi.Query:wi.Mutation,o.length||a.length||(n=wi.Subscription);var u=o.length?o:a.length?a:s;__DEV__?c(1===u.length,"react-apollo only supports one definition per HOC. ".concat(e," had ")+"".concat(u.length," definitions. ")+"You can use 'compose' to join multiple operation types to a component"):c(1===u.length,33);var l=u[0];t=l.variableDefinitions||[];var f={name:l.name&&"Name"===l.name.kind?l.name.value:"data",type:n,variables:t};return Si.set(e,f),f}function xi(e,t){var n=Di(e),r=Ti(t),i=Ti(n.type);__DEV__?c(n.type===t,"Running a ".concat(r," requires a graphql ")+"".concat(r,", but a ").concat(i," was used instead.")):c(n.type===t,34)}function Ii(e,t){var n,r=(0,bi.useContext)(_i()),i=ki(null==t?void 0:t.client),o=i.defaultOptions.watchQuery;xi(e,wi.Query);var a,s=(0,bi.useState)((function(){var n=Ni(e,t,o),a=null;return r.renderPromises&&(a=r.renderPromises.getSSRObservable(n)),a||(a=i.watchQuery(n),r.renderPromises&&r.renderPromises.registerSSRObservable(a,n)),r.renderPromises&&!1!==(null==t?void 0:t.ssr)&&!(null==t?void 0:t.skip)&&a.getCurrentResult().loading&&r.renderPromises.addQueryPromise({getOptions:function(){return Ni(e,t,o)},fetchData:function(){return new Promise((function(e){var t=a.subscribe({next:function(n){n.loading||(e(),t.unsubscribe())},error:function(){e(),t.unsubscribe()},complete:function(){e()}})}))}},(function(){return null})),a})),c=s[0],u=s[1],l=(0,bi.useState)((function(){var e,n,r=c.getCurrentResult();return!r.loading&&t&&(r.error?null===(e=t.onError)||void 0===e||e.call(t,r.error):r.data&&(null===(n=t.onCompleted)||void 0===n||n.call(t,r.data))),r})),f=l[0],p=l[1],h=(0,bi.useRef)({client:i,query:e,options:t,result:f,previousData:void 0,watchQueryOptions:Ni(e,t,o)});(0,bi.useEffect)((function(){var n,r,a,s=Ni(e,t,o);if(h.current.client===i&&ut(h.current.query,e))ut(h.current.watchQueryOptions,s)||(c.setOptions(s).catch((function(){})),a=c.getCurrentResult(),h.current.watchQueryOptions=s);else{var l=i.watchQuery(s);u(l),a=l.getCurrentResult()}if(a){var f=h.current.result;f.data&&(h.current.previousData=f.data),p(h.current.result=a),!a.loading&&t&&(a.error?null===(n=t.onError)||void 0===n||n.call(t,a.error):a.data&&(null===(r=t.onCompleted)||void 0===r||r.call(t,a.data)))}Object.assign(h.current,{client:i,query:e})}),[c,i,e,t]),(0,bi.useEffect)((function(){if(!r.renderPromises){var e=c.subscribe(t,(function n(r){var i,o,a=c.last;e.unsubscribe();try{c.resetLastResults(),e=c.subscribe(t,n)}finally{c.last=a}if(!r.hasOwnProperty("graphQLErrors"))throw r;var s=h.current.result;(s&&s.loading||!ut(r,s.error))&&(p(h.current.result={data:s.data,error:r,loading:!1,networkStatus:Ht.error}),null===(o=null===(i=h.current.options)||void 0===i?void 0:i.onError)||void 0===o||o.call(i,r))}));return function(){return e.unsubscribe()}}function t(){var e,t,n=h.current.result,r=c.getCurrentResult();n&&n.loading===r.loading&&n.networkStatus===r.networkStatus&&ut(n.data,r.data)||(n.data&&(h.current.previousData=n.data),p(h.current.result=r),r.loading||null===(t=null===(e=h.current.options)||void 0===e?void 0:e.onCompleted)||void 0===t||t.call(e,r.data))}}),[c,r.renderPromises,i.disableNetworkFetches]),a=(n=f).partial,f=k(n,["partial"]),!a||!(null==t?void 0:t.partialRefetch)||f.loading||f.data&&0!==Object.keys(f.data).length||"cache-only"===c.options.fetchPolicy||(f=O(O({},f),{loading:!0,networkStatus:Ht.refetch}),c.refetch()),r.renderPromises&&!1!==(null==t?void 0:t.ssr)&&!(null==t?void 0:t.skip)&&f.loading&&c.setOptions(Ni(e,t,o)).catch((function(){})),Object.assign(h.current,{options:t}),(r.renderPromises||i.disableNetworkFetches)&&!1===(null==t?void 0:t.ssr)?f=h.current.result={loading:!0,data:void 0,error:void 0,networkStatus:Ht.loading}:((null==t?void 0:t.skip)||"standby"===(null==t?void 0:t.fetchPolicy))&&(f={loading:!1,data:void 0,error:void 0,networkStatus:Ht.ready}),f.errors&&f.errors.length&&(f=O(O({},f),{error:f.error||new Xt({graphQLErrors:f.errors})}));var d=(0,bi.useMemo)((function(){return{refetch:c.refetch.bind(c),fetchMore:c.fetchMore.bind(c),updateQuery:c.updateQuery.bind(c),startPolling:c.startPolling.bind(c),stopPolling:c.stopPolling.bind(c),subscribeToMore:c.subscribeToMore.bind(c)}}),[c]);return O(O(O({},d),{variables:Ni(e,t,o).variables,client:i,called:!0,previousData:h.current.previousData}),f)}function Ni(e,t,n){var r;void 0===t&&(t={});var i=t.skip,o=(t.ssr,t.onCompleted,t.onError,t.displayName,k(t,["skip","ssr","onCompleted","onError","displayName"])),a=O({query:e},o);return n&&(a=lr(n,a)),i?a.fetchPolicy="standby":(!(null===(r=a.context)||void 0===r?void 0:r.renderPromises)||"network-only"!==a.fetchPolicy&&"cache-and-network"!==a.fetchPolicy)&&a.fetchPolicy||(a.fetchPolicy="cache-first"),a.variables||(a.variables={}),a}var Ai=["refetch","fetchMore","updateQuery","startPolling","subscribeToMore"];function Ri(e,t){var n=(0,bi.useState)({called:!1}),r=n[0],i=n[1],o=Ii(e,O(O(O({},t),r.options),{fetchPolicy:r.called?null==t?void 0:t.fetchPolicy:"standby",skip:void 0}));r.called||(o=O(O({},o),{loading:!1,data:void 0,error:void 0,called:!1}));var a=(0,bi.useMemo)((function(){for(var e={},t=function(t){var n=o[t];e[t]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i((function(e){return O(O({},e),{called:!0})})),n.apply(void 0,e)}},n=0,r=Ai;n<r.length;n++)t(r[n]);return e}),[]);return o.error=o.error||void 0,Object.assign(o,a),[(0,bi.useCallback)((function(e){return i({called:!0,options:e}),o.refetch(null==e?void 0:e.variables).then((function(e){var t=O(O({},o),{data:e.data,error:e.error,called:!0,loading:!1});return Object.assign(t,a),t}))}),[]),o]}function Ci(e,t){var n=ki(null==t?void 0:t.client);xi(e,wi.Mutation);var r=(0,bi.useState)({called:!1,loading:!1,client:n}),i=r[0],o=r[1],a=(0,bi.useRef)({result:i,mutationId:0,isMounted:!0,client:n,mutation:e,options:t});Object.assign(a.current,{client:n,options:t,mutation:e});var s=(0,bi.useCallback)((function(e){void 0===e&&(e={});var t=a.current,n=t.client,r=t.options,i=t.mutation,s=O(O({},r),{mutation:i});a.current.result.loading||s.ignoreResults||o(a.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:n});var c=++a.current.mutationId,u=lr(s,e);return n.mutate(u).then((function(t){var r,i,l=t.data,f=t.errors,p=f&&f.length>0?new Xt({graphQLErrors:f}):void 0;if(c===a.current.mutationId&&!u.ignoreResults){var h={called:!0,loading:!1,data:l,error:p,client:n};a.current.isMounted&&!ut(a.current.result,h)&&o(a.current.result=h)}return null===(r=s.onCompleted)||void 0===r||r.call(s,t.data),null===(i=e.onCompleted)||void 0===i||i.call(e,t.data),t})).catch((function(t){var r,i;if(c===a.current.mutationId&&a.current.isMounted){var l={loading:!1,error:t,data:void 0,called:!0,client:n};ut(a.current.result,l)||o(a.current.result=l)}if(s.onError||u.onError)return null===(r=s.onError)||void 0===r||r.call(s,t),null===(i=e.onError)||void 0===i||i.call(e,t),{data:void 0,errors:t};throw t}))}),[]),c=(0,bi.useCallback)((function(){o({called:!1,loading:!1,client:n})}),[]);return(0,bi.useEffect)((function(){return function(){a.current.isMounted=!1}}),[]),[s,O({reset:c},i)]}function Pi(e,t){var n=ki(null==t?void 0:t.client);xi(e,wi.Subscription);var r=(0,bi.useState)({loading:!(null==t?void 0:t.skip),error:void 0,data:void 0,variables:null==t?void 0:t.variables}),i=r[0],o=r[1],a=(0,bi.useState)((function(){return(null==t?void 0:t.skip)?null:n.subscribe({query:e,variables:null==t?void 0:t.variables,fetchPolicy:null==t?void 0:t.fetchPolicy,context:null==t?void 0:t.context})})),s=a[0],c=a[1],u=(0,bi.useRef)({client:n,subscription:e,options:t});return(0,bi.useEffect)((function(){var r,i,a,s,l=null==t?void 0:t.shouldResubscribe;"function"==typeof l&&(l=!!l(t)),(null==t?void 0:t.skip)&&!(null==t?void 0:t.skip)!=!(null===(r=u.current.options)||void 0===r?void 0:r.skip)?(o({loading:!1,data:void 0,error:void 0,variables:null==t?void 0:t.variables}),c(null)):!1===l||n===u.current.client&&e===u.current.subscription&&(null==t?void 0:t.fetchPolicy)===(null===(i=u.current.options)||void 0===i?void 0:i.fetchPolicy)&&!(null==t?void 0:t.skip)==!(null===(a=u.current.options)||void 0===a?void 0:a.skip)&&ut(null==t?void 0:t.variables,null===(s=u.current.options)||void 0===s?void 0:s.variables)||(o({loading:!0,data:void 0,error:void 0,variables:null==t?void 0:t.variables}),c(n.subscribe({query:e,variables:null==t?void 0:t.variables,fetchPolicy:null==t?void 0:t.fetchPolicy,context:null==t?void 0:t.context}))),Object.assign(u.current,{client:n,subscription:e,options:t})}),[n,e,t]),(0,bi.useEffect)((function(){if(s){var e=s.subscribe({next:function(e){var r,i,a={loading:!1,data:e.data,error:void 0,variables:null==t?void 0:t.variables};o(a),null===(i=null===(r=u.current.options)||void 0===r?void 0:r.onSubscriptionData)||void 0===i||i.call(r,{client:n,subscriptionData:a})},error:function(e){o({loading:!1,data:void 0,error:e,variables:null==t?void 0:t.variables})},complete:function(){var e,t;null===(t=null===(e=u.current.options)||void 0===e?void 0:e.onSubscriptionComplete)||void 0===t||t.call(e)}});return function(){e.unsubscribe()}}}),[s]),i}function ji(e){var t=e(),n=(0,bi.useState)(t)[1];return(0,bi.useEffect)((function(){var r=e();if(t===r)return e.onNextChange(n);n(r)}),[t]),t}},821:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(695);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},i(e)}function o(e){return a(e,[])}function a(e,t){switch(i(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 n=[].concat(t,[e]),i=function(e){var t=e[String(r.Z)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==i){var o=i.call(e);if(o!==e)return"string"==typeof o?o:a(o,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],o=0;o<n;++o)i.push(a(e[o],t));return 1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map((function(n){return n+": "+a(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},695:(e,t,n)=>{n.d(t,{Z:()=>r});const r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0},217:(e,t,n)=>{n.d(t,{Ye:()=>o,WU:()=>a,UG:()=>s});var r=n(695);function i(e){var t=e.prototype.toJSON;"function"==typeof t||function(e,t){if(!Boolean(0))throw new Error("Unexpected invariant triggered.")}(),e.prototype.inspect=t,r.Z&&(e.prototype[r.Z]=t)}var o=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();i(o);var a=function(){function e(e,t,n,r,i,o,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function s(e){return null!=e&&"string"==typeof e.kind}i(a)},392:(e,t,n)=>{function r(e){var t=e.split(/\r\n|[\n\r]/g),n=function(e){for(var t,n=!0,r=!0,i=0,o=null,a=0;a<e.length;++a)switch(e.charCodeAt(a)){case 13:10===e.charCodeAt(a+1)&&++a;case 10:n=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(null===o||i<o)&&(o=i),r=!1}return null!==(t=o)&&void 0!==t?t:0}(e);if(0!==n)for(var r=1;r<t.length;r++)t[r]=t[r].slice(n);for(var o=0;o<t.length&&i(t[o]);)++o;for(var a=t.length;a>o&&i(t[a-1]);)--a;return t.slice(o,a).join("\n")}function i(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a="\\"===e[e.length-1],s=!r||o||a||n,c="";return!s||r&&i||(c+="\n"+t),c+=t?e.replace(/\n/g,"\n"+t):e,s&&(c+="\n"),'"""'+c.replace(/"""/g,'\\"""')+'"""'}n.d(t,{W7:()=>r,LZ:()=>o})},143:(e,t,n)=>{n.d(t,{H:()=>s,T:()=>c});var r=n(763),i=n(821);function o(e,t){if(!Boolean(e))throw new Error(t)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||o(0,"Body must be a string. Received: ".concat((0,i.Z)(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||o(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||o(0,"column in locationOffset is 1-indexed and must be positive.")}var t,n;return t=e,(n=[{key:r.YF,get:function(){return"Source"}}])&&a(t.prototype,n),e}();function c(e){return e instanceof s}},763:(e,t,n)=>{n.d(t,{YF:()=>r}),"function"==typeof Symbol&&null!=Symbol.iterator&&Symbol.iterator,"function"==typeof Symbol&&null!=Symbol.asyncIterator&&Symbol.asyncIterator;var r="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag"},36:e=>{e.exports=JSON.parse('{"schema":"https://1d-coordinates.rcsb.org/graphql","documents":"src/RcsbGraphQL/Queries/Borrego/*.graphql","interfaceOutputFile":"src/RcsbGraphQL/Types/Borrego/GqlTypes.ts"}')},518:e=>{e.exports=JSON.parse('{"schema":"https://data.rcsb.org/graphql","documents":"src/RcsbGraphQL/Queries/Yosemite/*.graphql","interfaceOutputFile":"src/RcsbGraphQL/Types/Yosemite/GqlTypes.ts","pluginFile":[{"pluginFile":"src/RcsbGraphQL/Plugins/fullpath_schema_keys.js","outputFile":"src/RcsbGraphQL/Types/Yosemite/CorePaths.ts"},{"pluginFile":"src/RcsbGraphQL/Plugins/enumerate_schema_keys.js","outputFile":"src/RcsbGraphQL/Types/Yosemite/CoreConstants.ts"}]}')}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{const e=n(471);self.onmessage=function(t){const n=t.data;(new e.RcsbClient).requestAlignment(n).then((e=>{postMessage(e)}))}})()})();
|
|
2
|
+
(()=>{"use strict";var e={535:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLRequest=void 0;const c=n(572),u=o(n(36)),l=o(n(518)),f=s(n(642));t.GraphQLRequest=class{constructor(e,t,n){switch(e){case"yosemite":this.client=new c.ApolloClient(Object.assign({link:(0,c.createHttpLink)(Object.assign({uri:l.schema},t)),cache:new c.InMemoryCache},n));break;case"borrego":this.client=new c.ApolloClient(Object.assign({link:(0,c.createHttpLink)(Object.assign({uri:u.schema},t)),cache:new c.InMemoryCache},n));break;default:this.client=new c.ApolloClient(Object.assign({link:(0,c.createHttpLink)(Object.assign({uri:e},t)),cache:new c.InMemoryCache},n))}}request(e,t){return a(this,void 0,void 0,(function*(){try{return(yield this.client.query({query:(0,f.default)(t),variables:Object.assign({},e)})).data}catch(e){throw console.error(e),e}}))}}},471:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbClient=void 0;const i=n(193),o=n(212),a=n(344),s=n(822),c=n(69),u=n(591),l=n(764);t.RcsbClient=class{constructor(){this.rcsbQueryAnnotations=new i.RcsbQueryAnnotations,this.rcsbQueryAlignment=new o.RcsbQueryAlignment,this.rcsbQueryEntityInstances=new a.RcsbQueryEntryInstances,this.rcsbQueryMutipleEntityInstances=new s.RcsbQueryMultipleEntityInstances,this.rcsbQueryEntryProperties=new c.RcsbQueryMultipleEntriesProperties,this.rcsbQueryInterfaceInstances=new u.RcsbQueryInterfaceInstances,this.rcsbQueryAssemblyInterfaces=new l.RcsbQueryAssemblyInterfaces}requestRcsbPdbAnnotations(e){return r(this,void 0,void 0,(function*(){return yield this.rcsbQueryAnnotations.request(e)}))}requestAlignment(e){return r(this,void 0,void 0,(function*(){return yield this.rcsbQueryAlignment.request(e)}))}requestEntityInstances(e){return r(this,void 0,void 0,(function*(){return yield this.rcsbQueryEntityInstances.request(e)}))}requestMultipleEntityInstances(e){return r(this,void 0,void 0,(function*(){return yield this.rcsbQueryMutipleEntityInstances.request(e)}))}requestMultipleEntriesProperties(e){return r(this,void 0,void 0,(function*(){return yield this.rcsbQueryEntryProperties.request(e)}))}requestInterfaceInstances(e){return r(this,void 0,void 0,(function*(){return yield this.rcsbQueryInterfaceInstances.request(e)}))}requestAssemblyInterfaces(e){return r(this,void 0,void 0,(function*(){return yield this.rcsbQueryAssemblyInterfaces.request(e)}))}}},212:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbQueryAlignment=void 0;const o=i(n(477)),a=n(535);t.RcsbQueryAlignment=class{constructor(){this.client=new a.GraphQLRequest("borrego")}request(e){return r(this,void 0,void 0,(function*(){try{return(yield this.client.request({queryId:e.queryId,from:e.from,to:e.to,range:e.range},o.default)).alignment}catch(e){throw console.error(e),e}}))}}},193:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbQueryAnnotations=void 0;const o=i(n(312)),a=n(535);t.RcsbQueryAnnotations=class{constructor(){this.client=new a.GraphQLRequest("borrego")}request(e){return r(this,void 0,void 0,(function*(){try{return(yield this.client.request({queryId:e.queryId,reference:e.reference,sources:e.sources,filters:e.filters,range:e.range},o.default)).annotations}catch(e){throw console.error(e),e}}))}}},764:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbQueryAssemblyInterfaces=void 0;const o=n(535),a=i(n(131));t.RcsbQueryAssemblyInterfaces=class{constructor(){this.client=new o.GraphQLRequest("yosemite")}request(e){return r(this,void 0,void 0,(function*(){try{return(yield this.client.request(e,a.default)).assemblies}catch(e){throw console.error(e),e}}))}}},344:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbQueryEntryInstances=void 0;const o=i(n(22)),a=n(535);t.RcsbQueryEntryInstances=class{constructor(){this.client=new a.GraphQLRequest("yosemite")}request(e){return r(this,void 0,void 0,(function*(){try{return(yield this.client.request({entry_id:e.entry_id},o.default)).entry}catch(e){throw console.error(e),e}}))}}},591:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbQueryInterfaceInstances=void 0;const o=n(535),a=i(n(650));t.RcsbQueryInterfaceInstances=class{constructor(){this.client=new o.GraphQLRequest("yosemite")}request(e){return r(this,void 0,void 0,(function*(){try{return(yield this.client.request(e,a.default)).interfaces}catch(e){throw console.error(e),e}}))}}},822:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbQueryMultipleEntityInstances=void 0;const o=i(n(307)),a=n(535);t.RcsbQueryMultipleEntityInstances=class{constructor(){this.client=new a.GraphQLRequest("yosemite")}request(e){return r(this,void 0,void 0,(function*(){try{return(yield this.client.request({entity_ids:e.entity_ids},o.default)).polymer_entities}catch(e){throw console.error(e),e}}))}}},69:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RcsbQueryMultipleEntriesProperties=void 0;const o=i(n(787)),a=n(535);t.RcsbQueryMultipleEntriesProperties=class{constructor(){this.client=new a.GraphQLRequest("yosemite")}request(e){return r(this,void 0,void 0,(function*(){try{return(yield this.client.request({entry_ids:e.entry_ids},o.default)).entries}catch(e){throw console.error(e),e}}))}}},642:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ce,disableExperimentalFragmentVariables:()=>te,disableFragmentWarnings:()=>X,enableExperimentalFragmentVariables:()=>ee,gql:()=>H,resetCaches:()=>Z});var r=n(655);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},i(e)}var o=n(763);function a(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,o=t+1;(n=r.exec(e.body))&&n.index<t;)i+=1,o=t+1-(n.index+n[0].length);return{line:i,column:o}}function s(e){return c(e.source,a(e.source,e.start))}function c(e,t){var n=e.locationOffset.column-1,r=l(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?n:0,c=t.column+s,f="".concat(e.name,":").concat(a,":").concat(c,"\n"),p=r.split(/\r\n|[\n\r]/g),h=p[i];if(h.length>120){for(var d=Math.floor(c/80),y=c%80,v=[],m=0;m<h.length;m+=80)v.push(h.slice(m,m+80));return f+u([["".concat(a),v[0]]].concat(v.slice(1,d+1).map((function(e){return["",e]})),[[" ",l(y-1)+"^"],["",v[d+1]]]))}return f+u([["".concat(a-1),p[i-1]],["".concat(a),h],["",l(c-1)+"^"],["".concat(a+1),p[i+1]]])}function u(e){var t=e.filter((function(e){return e[0],void 0!==e[1]})),n=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,r=e[0],i=e[1];return l(n-(t=r).length)+t+(i?" | "+i:" |")})).join("\n")}function l(e){return Array(e+1).join(" ")}function f(e){return f="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},f(e)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?v(e):t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){var t="function"==typeof Map?new Map:void 0;return m=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;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,r)}function r(){return b(e,arguments,w(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_(r,e)},m(e)}function b(e,t,n){return b=g()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&_(i,n.prototype),i},b.apply(null,arguments)}function g(){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 _(e,t){return _=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var E=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&&_(e,t)}(f,e);var t,n,r,u,l=(t=f,n=g(),function(){var e,r=w(t);if(n){var i=w(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return y(this,e)});function f(e,t,n,r,o,s,c){var u,d,m,b;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(b=l.call(this,e)).name="GraphQLError",b.originalError=null!=s?s:void 0,b.nodes=O(Array.isArray(t)?t:t?[t]:void 0);for(var g=[],_=0,w=null!==(E=b.nodes)&&void 0!==E?E:[];_<w.length;_++){var E,k=w[_].loc;null!=k&&g.push(k)}g=O(g),b.source=null!=n?n:null===(u=g)||void 0===u?void 0:u[0].source,b.positions=null!=r?r:null===(d=g)||void 0===d?void 0:d.map((function(e){return e.start})),b.locations=r&&n?r.map((function(e){return a(n,e)})):null===(m=g)||void 0===m?void 0:m.map((function(e){return a(e.source,e.start)})),b.path=null!=o?o:void 0;var S,T=null==s?void 0:s.extensions;return null==c&&"object"==i(S=T)&&null!==S?b.extensions=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},T):b.extensions=null!=c?c:{},Object.defineProperties(v(b),{message:{enumerable:!0},locations:{enumerable:null!=b.locations},path:{enumerable:null!=b.path},extensions:{enumerable:null!=b.extensions&&Object.keys(b.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=s&&s.stack?(Object.defineProperty(v(b),"stack",{value:s.stack,writable:!0,configurable:!0}),y(b)):(Error.captureStackTrace?Error.captureStackTrace(v(b),f):Object.defineProperty(v(b),"stack",{value:Error().stack,writable:!0,configurable:!0}),b)}return r=f,(u=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n<r.length;n++){var i=r[n];i.loc&&(t+="\n\n"+s(i.loc))}else if(e.source&&e.locations)for(var o=0,a=e.locations;o<a.length;o++){var u=a[o];t+="\n\n"+c(e.source,u)}return t}(this)}},{key:o.YF,get:function(){return"Object"}}])&&d(r.prototype,u),f}(m(Error));function O(e){return void 0===e||0===e.length?void 0:e}function k(e,t,n){return new E("Syntax Error: ".concat(n),void 0,e,[t])}var S=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"}),T=n(217),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"}),x=n(143),I=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"}),N=n(392),R=function(){function e(e){var t=new T.WU(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=C(this,e)}while(e.kind===D.COMMENT);return e},e}();function A(e){return isNaN(e)?D.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function C(e,t){for(var n=e.source,r=n.body,i=r.length,o=t.end;o<i;){var a=r.charCodeAt(o),s=e.line,c=1+o-e.lineStart;switch(a){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===r.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 33:return new T.WU(D.BANG,o,o+1,s,c,t);case 35:return F(n,o,s,c,t);case 36:return new T.WU(D.DOLLAR,o,o+1,s,c,t);case 38:return new T.WU(D.AMP,o,o+1,s,c,t);case 40:return new T.WU(D.PAREN_L,o,o+1,s,c,t);case 41:return new T.WU(D.PAREN_R,o,o+1,s,c,t);case 46:if(46===r.charCodeAt(o+1)&&46===r.charCodeAt(o+2))return new T.WU(D.SPREAD,o,o+3,s,c,t);break;case 58:return new T.WU(D.COLON,o,o+1,s,c,t);case 61:return new T.WU(D.EQUALS,o,o+1,s,c,t);case 64:return new T.WU(D.AT,o,o+1,s,c,t);case 91:return new T.WU(D.BRACKET_L,o,o+1,s,c,t);case 93:return new T.WU(D.BRACKET_R,o,o+1,s,c,t);case 123:return new T.WU(D.BRACE_L,o,o+1,s,c,t);case 124:return new T.WU(D.PIPE,o,o+1,s,c,t);case 125:return new T.WU(D.BRACE_R,o,o+1,s,c,t);case 34:return 34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)?Q(n,o,s,c,t,e):M(n,o,s,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 j(n,o,a,s,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 V(n,o,s,c,t)}throw k(n,o,P(a))}var u=e.line,l=1+o-e.lineStart;return new T.WU(D.EOF,i,i,u,l,t)}function P(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(A(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(A(e),".")}function F(e,t,n,r,i){var o,a=e.body,s=t;do{o=a.charCodeAt(++s)}while(!isNaN(o)&&(o>31||9===o));return new T.WU(D.COMMENT,t,s,n,r,i,a.slice(t+1,s))}function j(e,t,n,r,i,o){var a=e.body,s=n,c=t,u=!1;if(45===s&&(s=a.charCodeAt(++c)),48===s){if((s=a.charCodeAt(++c))>=48&&s<=57)throw k(e,c,"Invalid number, unexpected digit after 0: ".concat(A(s),"."))}else c=q(e,c,s),s=a.charCodeAt(c);if(46===s&&(u=!0,s=a.charCodeAt(++c),c=q(e,c,s),s=a.charCodeAt(c)),69!==s&&101!==s||(u=!0,43!==(s=a.charCodeAt(++c))&&45!==s||(s=a.charCodeAt(++c)),c=q(e,c,s),s=a.charCodeAt(c)),46===s||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(s))throw k(e,c,"Invalid number, expected digit but got: ".concat(A(s),"."));return new T.WU(u?D.FLOAT:D.INT,t,c,r,i,o,a.slice(t,c))}function q(e,t,n){var r=e.body,i=t,o=n;if(o>=48&&o<=57){do{o=r.charCodeAt(++i)}while(o>=48&&o<=57);return i}throw k(e,i,"Invalid number, expected digit but got: ".concat(A(o),"."))}function M(e,t,n,r,i){for(var o,a,s,c,u=e.body,l=t+1,f=l,p=0,h="";l<u.length&&!isNaN(p=u.charCodeAt(l))&&10!==p&&13!==p;){if(34===p)return h+=u.slice(f,l),new T.WU(D.STRING,t,l+1,n,r,i,h);if(p<32&&9!==p)throw k(e,l,"Invalid character within String: ".concat(A(p),"."));if(++l,92===p){switch(h+=u.slice(f,l-1),p=u.charCodeAt(l)){case 34:h+='"';break;case 47:h+="/";break;case 92:h+="\\";break;case 98:h+="\b";break;case 102:h+="\f";break;case 110:h+="\n";break;case 114:h+="\r";break;case 116:h+="\t";break;case 117:var d=(o=u.charCodeAt(l+1),a=u.charCodeAt(l+2),s=u.charCodeAt(l+3),c=u.charCodeAt(l+4),L(o)<<12|L(a)<<8|L(s)<<4|L(c));if(d<0){var y=u.slice(l+1,l+5);throw k(e,l,"Invalid character escape sequence: \\u".concat(y,"."))}h+=String.fromCharCode(d),l+=4;break;default:throw k(e,l,"Invalid character escape sequence: \\".concat(String.fromCharCode(p),"."))}f=++l}}throw k(e,l,"Unterminated string.")}function Q(e,t,n,r,i,o){for(var a=e.body,s=t+3,c=s,u=0,l="";s<a.length&&!isNaN(u=a.charCodeAt(s));){if(34===u&&34===a.charCodeAt(s+1)&&34===a.charCodeAt(s+2))return l+=a.slice(c,s),new T.WU(D.BLOCK_STRING,t,s+3,n,r,i,(0,N.W7)(l));if(u<32&&9!==u&&10!==u&&13!==u)throw k(e,s,"Invalid character within String: ".concat(A(u),"."));10===u?(++s,++o.line,o.lineStart=s):13===u?(10===a.charCodeAt(s+1)?s+=2:++s,++o.line,o.lineStart=s):92===u&&34===a.charCodeAt(s+1)&&34===a.charCodeAt(s+2)&&34===a.charCodeAt(s+3)?(l+=a.slice(c,s)+'"""',c=s+=4):++s}throw k(e,s,"Unterminated string.")}function L(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function V(e,t,n,r,i){for(var o=e.body,a=o.length,s=t+1,c=0;s!==a&&!isNaN(c=o.charCodeAt(s))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++s;return new T.WU(D.NAME,t,s,n,r,i,o.slice(t,s))}var U=function(){function e(e,t){var n=(0,x.T)(e)?e:new x.H(e);this._lexer=new R(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(D.NAME);return{kind:S.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:S.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:S.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(D.NAME)&&(t=this.parseName()),{kind:S.OPERATION_DEFINITION,operation:n,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:S.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:S.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:S.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,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(D.COLON)?(e=r,t=this.parseName()):t=r,{kind:S.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(n)}},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:S.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:S.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:S.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:S.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:S.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:S.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:S.INT,value:t.value,loc:this.loc(t)};case D.FLOAT:return this._lexer.advance(),{kind:S.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:S.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:S.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:S.NULL,loc:this.loc(t)};default:return{kind:S.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:S.STRING,value:e.value,block:e.kind===D.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:S.LIST,values:this.any(D.BRACKET_L,(function(){return t.parseValueLiteral(e)}),D.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:S.OBJECT,fields:this.any(D.BRACE_L,(function(){return t.parseObjectField(e)}),D.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(D.COLON),{kind:S.OBJECT_FIELD,name:n,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:S.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:S.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(D.BANG)?{kind:S.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:S.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 n=this.parseDirectives(!0),r=this.many(D.BRACE_L,this.parseOperationTypeDefinition,D.BRACE_R);return{kind:S.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(D.COLON);var n=this.parseNamedType();return{kind:S.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:S.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:S.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,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(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(D.COLON);var i=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:S.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o,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(),n=this.parseName();this.expectToken(D.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(D.EQUALS)&&(r=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:S.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:o,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:S.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:S.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,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 n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:S.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,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(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:S.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:S.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,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),n=this.optionalMany(D.BRACE_L,this.parseOperationTypeDefinition,D.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:S.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:S.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:S.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:S.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:S.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:S.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:S.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(D.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:S.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o,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!==I[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 T.Ye(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 k(this._lexer.source,t.start,"Expected ".concat(W(e),", found ").concat(B(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 k(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(B(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 k(this._lexer.source,t.start,"Unexpected ".concat(B(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n},e}();function B(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 G=new Map,z=new Map,K=!0,Y=!1;function J(e){return e.replace(/[\s,]+/g," ").trim()}function $(e){var t=J(e);if(!G.has(t)){var n=function(e,t){return new U(e,t).parseDocument()}(e,{experimentalFragmentVariables:Y,allowLegacyFragmentVariables:Y});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");G.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}(function(e){var t=new Set,n=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,i=J((a=e.loc).source.body.substring(a.start,a.end)),o=z.get(r);o&&!o.has(i)?K&&console.warn("Warning: fragment with name "+r+" 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"):o||z.set(r,o=new Set),o.add(i),t.has(i)||(t.add(i),n.push(e))}else n.push(e);var a})),(0,r.pi)((0,r.pi)({},e),{definitions:n})}(n)))}return G.get(t)}function H(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach((function(t,n){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[n+1]})),$(r)}function Z(){G.clear(),z.clear()}function X(){K=!1}function ee(){Y=!0}function te(){Y=!1}var ne,re=H,ie=Z,oe=X,ae=ee,se=te;(ne=H||(H={})).gql=re,ne.resetCaches=ie,ne.disableFragmentWarnings=oe,ne.enableExperimentalFragmentVariables=ae,ne.disableExperimentalFragmentVariables=se,H.default=H;const ce=H},418:e=>{var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,s,c=i(e),u=1;u<arguments.length;u++){for(var l in a=Object(arguments[u]))n.call(a,l)&&(c[l]=a[l]);if(t){s=t(a);for(var f=0;f<s.length;f++)r.call(a,s[f])&&(c[s[f]]=a[s[f]])}}return c}},477:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r="query QueryAlignment($queryId: String!, $from: SequenceReference, $to:SequenceReference, $range:[Int]){\n alignment(\n queryId:$queryId\n from:$from\n to:$to\n range:$range\n ){\n query_sequence\n target_alignment {\n target_id\n orientation\n target_sequence\n coverage {\n query_coverage\n query_length\n target_coverage\n target_length\n }\n aligned_regions {\n query_begin\n query_end\n target_begin\n target_end\n exon_shift\n }\n }\n\n }\n}"},312:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r="query QueryAnnotations($queryId: String!, $reference: SequenceReference, $sources:[Source], $range:[Int], $filters: [FilterInput]){\n annotations(\n queryId:$queryId\n reference:$reference\n sources:$sources\n range:$range\n filters:$filters\n ){\n source\n target_id\n target_identifiers{\n target_id\n entry_id\n assembly_id\n entity_id\n asym_id\n interface_id\n interface_partner_index\n }\n features {\n type\n provenance_source\n description\n feature_id\n name\n feature_positions {\n beg_seq_id\n end_seq_id\n beg_ori_id\n end_ori_id\n range_id\n open_begin\n open_end\n value\n values\n }\n }\n }\n}"},131:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r="query QueryAssemblyInterfaces($assembly_ids: [String!]!){\n assemblies(\n assembly_ids: $assembly_ids\n ){\n rcsb_id\n interfaces{\n rcsb_id\n }\n }\n}\n"},22:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r="query QueryEntryInstance($entry_id: String!){\n entry(\n entry_id:$entry_id\n ){\n polymer_entities {\n polymer_entity_instances{\n rcsb_id\n polymer_entity{\n rcsb_polymer_entity{\n pdbx_description\n }\n entity_poly{\n rcsb_entity_polymer_type\n }\n rcsb_entity_source_organism {\n ncbi_scientific_name\n }\n }\n rcsb_polymer_entity_instance_container_identifiers{\n asym_id\n auth_asym_id\n entry_id\n entity_id\n auth_to_entity_poly_seq_mapping\n }\n }\n }\n assemblies {\n rcsb_assembly_container_identifiers {\n assembly_id\n }\n pdbx_struct_assembly_gen{\n asym_id_list\n }\n\n }\n }\n}"},650:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r="query QueryInterfaceInstance($interface_ids: [String!]!){\n interfaces(\n interface_ids:$interface_ids\n ){\n rcsb_interface_container_identifiers{\n rcsb_id\n interface_id\n assembly_id\n entry_id\n }\n rcsb_interface_partner{\n interface_partner_identifier{\n asym_id\n }\n }\n rcsb_interface_operator\n }\n}"},307:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r="query QueryMultipleEntityInstances($entity_ids: [String!]!){\n polymer_entities(\n entity_ids:$entity_ids\n ){\n polymer_entity_instances{\n rcsb_id\n polymer_entity{\n rcsb_polymer_entity{\n pdbx_description\n }\n entity_poly{\n rcsb_entity_polymer_type\n }\n rcsb_entity_source_organism {\n ncbi_scientific_name\n }\n }\n rcsb_polymer_entity_instance_container_identifiers{\n asym_id\n auth_asym_id\n entry_id\n entity_id\n auth_to_entity_poly_seq_mapping\n }\n }\n }\n}"},787:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r="query multiple_entries_properties($entry_ids: [String!]!){\n entries(entry_ids:$entry_ids){\n rcsb_id\n rcsb_entry_info{\n experimental_method\n resolution_combined\n }\n }\n}"},408:(e,t,n)=>{var r=n(418),i=60103,o=60109,a=60110;if("function"==typeof Symbol&&Symbol.for){var s=Symbol.for;i=s("react.element"),s("react.portal"),s("react.fragment"),s("react.strict_mode"),s("react.profiler"),o=s("react.provider"),a=s("react.context"),s("react.forward_ref"),s("react.suspense"),s("react.memo"),s("react.lazy")}"function"==typeof Symbol&&Symbol.iterator;function c(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},l={};function f(e,t,n){this.props=e,this.context=t,this.refs=l,this.updater=n||u}function p(){}function h(e,t,n){this.props=e,this.context=t,this.refs=l,this.updater=n||u}f.prototype.isReactComponent={},f.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(c(85));this.updater.enqueueSetState(this,e,t,"setState")},f.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},p.prototype=f.prototype;var d=h.prototype=new p;d.constructor=h,r(d,f.prototype),d.isPureReactComponent=!0;var y=null,v=Object.prototype.hasOwnProperty,m={key:!0,ref:!0,__self:!0,__source:!0};var b=null;function g(){var e=b;if(null===e)throw Error(c(321));return e}t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:a,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},t.createElement=function(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)v.call(t,r)&&!m.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var u=Array(c),l=0;l<c;l++)u[l]=arguments[l+2];o.children=u}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===o[r]&&(o[r]=c[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:y}},t.useCallback=function(e,t){return g().useCallback(e,t)},t.useContext=function(e,t){return g().useContext(e,t)},t.useEffect=function(e,t){return g().useEffect(e,t)},t.useMemo=function(e,t){return g().useMemo(e,t)},t.useRef=function(e){return g().useRef(e)},t.useState=function(e){return g().useState(e)}},294:(e,t,n)=>{e.exports=n(408)},655:(e,t,n)=>{n.d(t,{ZT:()=>i,pi:()=>o,_T:()=>a,mG:()=>s,Jh:()=>c,ev:()=>u});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function u(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,Object.create},572:(e,t,n)=>{n.r(t),n.d(t,{ApolloCache:()=>yr,ApolloClient:()=>dr,ApolloConsumer:()=>mi,ApolloError:()=>an,ApolloLink:()=>ye,ApolloProvider:()=>vi,Cache:()=>hr,DocumentType:()=>yi,HttpLink:()=>$e,InMemoryCache:()=>ii,MissingFieldError:()=>vr,NetworkStatus:()=>on,Observable:()=>V,ObservableQuery:()=>dn,applyNextFetchPolicy:()=>mn,checkFetcher:()=>Ie,concat:()=>ci,createHttpLink:()=>Je,createSignalIfSupported:()=>Ge,defaultDataIdFromObject:()=>St,defaultPrinter:()=>Ve,disableExperimentalFragmentVariables:()=>fi.disableExperimentalFragmentVariables,disableFragmentWarnings:()=>fi.disableFragmentWarnings,empty:()=>oi,enableExperimentalFragmentVariables:()=>fi.enableExperimentalFragmentVariables,execute:()=>ve,fallbackHttpConfig:()=>Le,from:()=>ai,fromError:()=>Ke,fromPromise:()=>li,getApolloContext:()=>di,gql:()=>fi.gql,isApolloError:()=>rn,isReference:()=>K,makeReference:()=>z,makeVar:()=>tr,mergeOptions:()=>pr,operationName:()=>_i,parseAndCheckHttpResponse:()=>xe,parser:()=>wi,resetApolloContext:()=>di,resetCaches:()=>fi.resetCaches,rewriteURIForGET:()=>ze,selectHttpOptionsAndBody:()=>Ue,selectHttpOptionsAndBodyInternal:()=>Be,selectURI:()=>Se,serializeFetchParameter:()=>ke,setLogVerbosity:()=>p,split:()=>si,throwServerError:()=>Te,toPromise:()=>ui,useApolloClient:()=>bi,useLazyQuery:()=>Ti,useMutation:()=>Di,useQuery:()=>Oi,useReactiveVar:()=>Ii,useSubscription:()=>xi});var r=n(655),i="Invariant Violation",o=Object.setPrototypeOf,a=void 0===o?function(e,t){return e.__proto__=t,e}:o,s=function(e){function t(n){void 0===n&&(n=i);var r=e.call(this,"number"==typeof n?i+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=i,a(r,t.prototype),r}return(0,r.ZT)(t,e),t}(Error);function c(e,t){if(!e)throw new s(t)}var u=["debug","log","warn","error","silent"],l=u.indexOf("log");function f(e){return function(){if(u.indexOf(e)>=l){var t=console[e]||console.log;return t.apply(console,arguments)}}}function p(e){var t=u[l];return l=Math.max(0,u.indexOf(e)),t}function h(e){try{return e()}catch(e){}}!function(e){e.debug=f("debug"),e.log=f("log"),e.warn=f("warn"),e.error=f("error")}(c||(c={}));const d=h((function(){return globalThis}))||h((function(){return window}))||h((function(){return self}))||h((function(){return global}))||h((function(){return h.constructor("return this")()}));var y="__",v=[y,y].join("DEV");const m=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(d,v,{value:"production"!==h((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),d[v]}}();function b(e){try{return e()}catch(e){}}var g=b((function(){return globalThis}))||b((function(){return window}))||b((function(){return self}))||b((function(){return n.g}))||b((function(){return b.constructor("return this")()})),_=!1;function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),e}!g||b((function(){return"production"}))||b((function(){return process}))||(Object.defineProperty(g,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),_=!0),n(143).H,_&&(delete g.process,_=!1),__DEV__?c("boolean"==typeof m,m):c("boolean"==typeof m,36);var k=function(){return"function"==typeof Symbol},S=function(e){return k()&&Boolean(Symbol[e])},T=function(e){return S(e)?Symbol[e]:"@@"+e};k()&&!S("observable")&&(Symbol.observable=Symbol("observable"));var D=T("iterator"),x=T("observable"),I=T("species");function N(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function R(e){var t=e.constructor;return void 0!==t&&null===(t=t[I])&&(t=void 0),void 0!==t?t:V}function A(e){return e instanceof V}function C(e){C.log?C.log(e):setTimeout((function(){throw e}))}function P(e){Promise.resolve().then((function(){try{e()}catch(e){C(e)}}))}function F(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=N(t,"unsubscribe");n&&n.call(t)}}catch(e){C(e)}}function j(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function q(e,t,n){e._state="running";var r=e._observer;try{var i=N(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(j(e),!i)throw n;i.call(r,n);break;case"complete":j(e),i&&i.call(r)}}catch(e){C(e)}"closed"===e._state?F(e):"running"===e._state&&(e._state="ready")}function M(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void P((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(q(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)}))):void q(e,t,n);e._queue.push({type:t,value:n})}}var Q=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new L(this);try{this._cleanup=t.call(void 0,n)}catch(e){n.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(j(this),F(this))},O(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),L=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){M(this._subscription,"next",e)},t.error=function(e){M(this._subscription,"error",e)},t.complete=function(){M(this._subscription,"complete")},O(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),V=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new Q(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(n,r){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),n()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(R(this))((function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(R(this))((function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=R(this),r=arguments.length>1,i=!1,o=arguments[1],a=o;return new n((function(n){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||r)try{a=e(a,t)}catch(e){return n.error(e)}else a=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(a),n.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=R(this);return new i((function(t){var r,o=0;return function e(a){r=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===n.length?(r=void 0,t.complete()):e(i.from(n[o++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=R(this);return new n((function(r){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var o=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){r.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))},t[x]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=N(t,x);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return A(i)&&i.constructor===n?i:new n((function(e){return i.subscribe(e)}))}if(S("iterator")&&(r=N(t,D)))return new n((function(e){P((function(){if(!e.closed){for(var n,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.call(t));!(n=i()).done;){var o=n.value;if(e.next(o),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){P((function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i="function"==typeof this?this:e;return new i((function(e){P((function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}}))}))},O(e,null,[{key:I,get:function(){return this}}]),e}();function U(e){return null!==e&&"object"==typeof e}function B(e,t){var n=t,i=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new s("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new s(41);"FragmentDefinition"===e.kind&&i.push(e)})),void 0===n&&(__DEV__?c(1===i.length,"Found ".concat(i.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):c(1===i.length,42),n=i[0].name.value),(0,r.pi)((0,r.pi)({},e),{definitions:(0,r.ev)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)})}function W(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function G(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=t&&t[e.name.value];return __DEV__?c(n,"No fragment named ".concat(e.name.value,".")):c(n,43),n;default:return null}}function z(e){return{__ref:String(e)}}function K(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function Y(e,t,n,r){if(function(e){return"IntValue"===e.kind}(n)||function(e){return"FloatValue"===e.kind}(n))e[t.value]=Number(n.value);else if(function(e){return"BooleanValue"===e.kind}(n)||function(e){return"StringValue"===e.kind}(n))e[t.value]=n.value;else if(function(e){return"ObjectValue"===e.kind}(n)){var i={};n.fields.map((function(e){return Y(i,e.name,e.value,r)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(n)){var o=(r||{})[n.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(n))e[t.value]=n.values.map((function(e){var n={};return Y(n,t,e,r),n[t.value]}));else if(function(e){return"EnumValue"===e.kind}(n))e[t.value]=n.value;else{if(!function(e){return"NullValue"===e.kind}(n))throw __DEV__?new s('The inline argument "'.concat(t.value,'" of kind "').concat(n.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new s(52);e[t.value]=null}}k()&&Object.defineProperty(V,Symbol("extensions"),{value:{symbol:x,hostReportError:C},configurable:!0});var J=["connection","include","skip","client","rest","export"],$=Object.assign((function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach((function(e){i[e]=t[e]})),"".concat(n.connection.key,"(").concat(H(i),")")}return n.connection.key}var o=e;if(t){var a=H(t);o+="(".concat(a,")")}return n&&Object.keys(n).forEach((function(e){-1===J.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?o+="@".concat(e,"(").concat(H(n[e]),")"):o+="@".concat(e))})),o}),{setStringify:function(e){var t=H;return H=e,t}}),H=function(e){return JSON.stringify(e,Z)};function Z(e,t){return U(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{})),t}function X(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return Y(n,r,i,t)})),n}return null}function ee(e){return e.alias?e.alias.value:e.name.value}function te(e,t,n){if("string"==typeof e.__typename)return e.__typename;for(var r=0,i=t.selections;r<i.length;r++){var o=i[r];if(ne(o)){if("__typename"===o.name.value)return e[ee(o)]}else{var a=te(e,G(o,n).selectionSet,n);if("string"==typeof a)return a}}}function ne(e){return"Field"===e.kind}function re(e){return"InlineFragment"===e.kind}function ie(e){__DEV__?c(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):c(e&&"Document"===e.kind,44);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new s('Schema type definitions not allowed in queries. Found: "'.concat(e.kind,'"')):new s(45);return e}));return __DEV__?c(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):c(t.length<=1,46),e}function oe(e){return ie(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function ae(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function se(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function ce(e){var t=oe(e);return __DEV__?c(t&&"query"===t.operation,"Must contain a query definition."):c(t&&"query"===t.operation,47),t}function ue(e){var t;ie(e);for(var n=0,r=e.definitions;n<r.length;n++){var i=r[n];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new s("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new s(51)}function le(e){var t=Object.create(null),n=e&&e.variableDefinitions;return n&&n.length&&n.forEach((function(e){e.defaultValue&&Y(t,e.variable.name,e.defaultValue)})),t}function fe(e,t){return t?t(e):V.of()}function pe(e){return"function"==typeof e?new ye(e):e}function he(e){return e.request.length<=1}var de=function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}return(0,r.ZT)(t,e),t}(Error),ye=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return V.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(pe).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,n,r){var i=pe(n),o=pe(r||new e(fe));return he(i)&&he(o)?new e((function(e){return t(e)?i.request(e)||V.of():o.request(e)||V.of()})):new e((function(e,n){return t(e)?i.request(e,n)||V.of():o.request(e,n)||V.of()}))},e.execute=function(e,t){return e.request(function(e,t){var n=(0,r.pi)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n="function"==typeof e?(0,r.pi)((0,r.pi)({},n),e(n)):(0,r.pi)((0,r.pi)({},n),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return(0,r.pi)({},n)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?ae(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(t.indexOf(i)<0)throw __DEV__?new s("illegal argument: ".concat(i)):new s(24)}return e}(t))))||V.of()},e.concat=function(t,n){var r=pe(t);if(he(r))return __DEV__&&c.warn(new de("You are calling concat on a terminating link, which will have no effect",r)),r;var i=pe(n);return he(i)?new e((function(e){return r.request(e,(function(e){return i.request(e)||V.of()}))||V.of()})):new e((function(e,t){return r.request(e,(function(e){return i.request(e,t)||V.of()}))||V.of()}))},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(fe)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new s("request is not implemented"):new s(19)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),ve=ye.execute;function me(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var r=e[t];void 0!==r&&(n[t]=r)}))})),n}var be=n(821),ge=n(217),_e={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"]},we=Object.freeze({});function Ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_e,r=void 0,i=Array.isArray(e),o=[e],a=-1,s=[],c=void 0,u=void 0,l=void 0,f=[],p=[],h=e;do{var d=++a===o.length,y=d&&0!==s.length;if(d){if(u=0===p.length?void 0:f[f.length-1],c=l,l=p.pop(),y){if(i)c=c.slice();else{for(var v={},m=0,b=Object.keys(c);m<b.length;m++){var g=b[m];v[g]=c[g]}c=v}for(var _=0,w=0;w<s.length;w++){var E=s[w][0],O=s[w][1];i&&(E-=_),i&&null===O?(c.splice(E,1),_++):c[E]=O}}a=r.index,o=r.keys,s=r.edits,i=r.inArray,r=r.prev}else{if(u=l?i?a:o[a]:void 0,null==(c=l?l[u]:h))continue;l&&f.push(u)}var k,S=void 0;if(!Array.isArray(c)){if(!(0,ge.UG)(c))throw new Error("Invalid AST Node: ".concat((0,be.Z)(c),"."));var T=Oe(t,c.kind,d);if(T){if((S=T.call(t,c,u,l,f,p))===we)break;if(!1===S){if(!d){f.pop();continue}}else if(void 0!==S&&(s.push([u,S]),!d)){if(!(0,ge.UG)(S)){f.pop();continue}c=S}}}void 0===S&&y&&s.push([u,c]),d?f.pop():(r={inArray:i,index:a,keys:o,edits:s,prev:r},o=(i=Array.isArray(c))?c:null!==(k=n[c.kind])&&void 0!==k?k:[],a=-1,s=[],l&&p.push(l),l=c)}while(void 0!==r);return 0!==s.length&&(h=s[s.length-1][1]),h}function Oe(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var o=n?e.leave:e.enter;if(o){if("function"==typeof o)return o;var a=o[t];if("function"==typeof a)return a}}}var ke=function(e,t){var n;try{n=JSON.stringify(e)}catch(e){var r=__DEV__?new s("Network request failed. ".concat(t," is not serializable: ").concat(e.message)):new s(21);throw r.parseError=e,r}return n},Se=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")},Te=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r},De=Object.prototype.hasOwnProperty;function xe(e){return function(t){return t.text().then((function(e){try{return JSON.parse(e)}catch(r){var n=r;throw n.name="ServerParseError",n.response=t,n.statusCode=t.status,n.bodyText=e,n}})).then((function(n){return t.status>=300&&Te(t,n,"Response not successful: Received status code ".concat(t.status)),Array.isArray(n)||De.call(n,"data")||De.call(n,"errors")||Te(t,n,"Server response was missing for query '".concat(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName,"'.")),n}))}}var Ie=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new s("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new s(20)},Ne=n(392);function Re(e){return Ee(e,{leave:Ae})}var Ae={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return Pe(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=je("(",Pe(e.variableDefinitions,", "),")"),i=Pe(e.directives," "),o=e.selectionSet;return n||i||r||"query"!==t?Pe([t,Pe([n,r]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,i=e.directives;return t+": "+n+je(" = ",r)+je(" ",Pe(i," "))},SelectionSet:function(e){return Fe(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,o=e.selectionSet,a=je("",t,": ")+n,s=a+je("(",Pe(r,", "),")");return s.length>80&&(s=a+je("(\n",qe(Pe(r,"\n")),"\n)")),Pe([s,Pe(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+je(" ",Pe(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return Pe(["...",je("on ",t),Pe(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(je("(",Pe(r,", "),")")," ")+"on ".concat(n," ").concat(je("",Pe(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?(0,Ne.LZ)(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+Pe(e.values,", ")+"]"},ObjectValue:function(e){return"{"+Pe(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+je("(",Pe(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:Ce((function(e){var t=e.directives,n=e.operationTypes;return Pe(["schema",Pe(t," "),Fe(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:Ce((function(e){return Pe(["scalar",e.name,Pe(e.directives," ")]," ")})),ObjectTypeDefinition:Ce((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Pe(["type",t,je("implements ",Pe(n," & ")),Pe(r," "),Fe(i)]," ")})),FieldDefinition:Ce((function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(Qe(n)?je("(\n",qe(Pe(n,"\n")),"\n)"):je("(",Pe(n,", "),")"))+": "+r+je(" ",Pe(i," "))})),InputValueDefinition:Ce((function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return Pe([t+": "+n,je("= ",r),Pe(i," ")]," ")})),InterfaceTypeDefinition:Ce((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Pe(["interface",t,je("implements ",Pe(n," & ")),Pe(r," "),Fe(i)]," ")})),UnionTypeDefinition:Ce((function(e){var t=e.name,n=e.directives,r=e.types;return Pe(["union",t,Pe(n," "),r&&0!==r.length?"= "+Pe(r," | "):""]," ")})),EnumTypeDefinition:Ce((function(e){var t=e.name,n=e.directives,r=e.values;return Pe(["enum",t,Pe(n," "),Fe(r)]," ")})),EnumValueDefinition:Ce((function(e){return Pe([e.name,Pe(e.directives," ")]," ")})),InputObjectTypeDefinition:Ce((function(e){var t=e.name,n=e.directives,r=e.fields;return Pe(["input",t,Pe(n," "),Fe(r)]," ")})),DirectiveDefinition:Ce((function(e){var t=e.name,n=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+t+(Qe(n)?je("(\n",qe(Pe(n,"\n")),"\n)"):je("(",Pe(n,", "),")"))+(r?" repeatable":"")+" on "+Pe(i," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return Pe(["extend schema",Pe(t," "),Fe(n)]," ")},ScalarTypeExtension:function(e){return Pe(["extend scalar",e.name,Pe(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Pe(["extend type",t,je("implements ",Pe(n," & ")),Pe(r," "),Fe(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Pe(["extend interface",t,je("implements ",Pe(n," & ")),Pe(r," "),Fe(i)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return Pe(["extend union",t,Pe(n," "),r&&0!==r.length?"= "+Pe(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return Pe(["extend enum",t,Pe(n," "),Fe(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return Pe(["extend input",t,Pe(n," "),Fe(r)]," ")}};function Ce(e){return function(t){return Pe([t.description,e(t)],"\n")}}function Pe(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function Fe(e){return je("{\n",qe(Pe(e,"\n")),"\n}")}function je(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function qe(e){return je(" ",e.replace(/\n/g,"\n "))}function Me(e){return-1!==e.indexOf("\n")}function Qe(e){return null!=e&&e.some(Me)}var Le={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},Ve=function(e,t){return t(e)};function Ue(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return n.unshift(t),Be.apply(void 0,(0,r.ev)([e,Ve],n,!1))}function Be(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var o={},a={};n.forEach((function(e){o=(0,r.pi)((0,r.pi)((0,r.pi)({},o),e.options),{headers:(0,r.pi)((0,r.pi)({},o.headers),We(e.headers))}),e.credentials&&(o.credentials=e.credentials),a=(0,r.pi)((0,r.pi)({},a),e.http)}));var s=e.operationName,c=e.extensions,u=e.variables,l=e.query,f={operationName:s,variables:u};return a.includeExtensions&&(f.extensions=c),a.includeQuery&&(f.query=t(l,Re)),{options:o,body:f}}function We(e){if(e){var t=Object.create(null);return Object.keys(Object(e)).forEach((function(n){t[n.toLowerCase()]=e[n]})),t}return e}var Ge=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}};function ze(e,t){var n=[],r=function(e,t){n.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&r("query",t.query),t.operationName&&r("operationName",t.operationName),t.variables){var i=void 0;try{i=ke(t.variables,"Variables map")}catch(e){return{parseError:e}}r("variables",i)}if(t.extensions){var o=void 0;try{o=ke(t.extensions,"Extensions map")}catch(e){return{parseError:e}}r("extensions",o)}var a="",s=e,c=e.indexOf("#");-1!==c&&(a=e.substr(c),s=e.substr(0,c));var u=-1===s.indexOf("?")?"?":"&";return{newURI:s+u+n.join("&")+a}}function Ke(e){return new V((function(t){t.error(e)}))}var Ye=h((function(){return fetch})),Je=function(e){void 0===e&&(e={});var t=e.uri,n=void 0===t?"/graphql":t,i=e.fetch,o=e.print,a=void 0===o?Ve:o,s=e.includeExtensions,c=e.useGETForQueries,u=e.includeUnusedVariables,l=void 0!==u&&u,f=(0,r._T)(e,["uri","fetch","print","includeExtensions","useGETForQueries","includeUnusedVariables"]);__DEV__&&Ie(i||Ye);var p={http:{includeExtensions:s},options:f.fetchOptions,credentials:f.credentials,headers:f.headers};return new ye((function(e){var t=Se(e,n),o=e.getContext(),s={};if(o.clientAwareness){var u=o.clientAwareness,f=u.name,d=u.version;f&&(s["apollographql-client-name"]=f),d&&(s["apollographql-client-version"]=d)}var y,v=(0,r.pi)((0,r.pi)({},s),o.headers),m={http:o.http,options:o.fetchOptions,credentials:o.credentials,headers:v},b=Be(e,a,Le,p,m),g=b.options,_=b.body;if(_.variables&&!l){var w=new Set(Object.keys(_.variables));Ee(e.query,{Variable:function(e,t,n){n&&"VariableDefinition"!==n.kind&&w.delete(e.name.value)}}),w.size&&(_.variables=(0,r.pi)({},_.variables),w.forEach((function(e){delete _.variables[e]})))}if(!g.signal){var E=Ge(),O=E.controller,k=E.signal;(y=O)&&(g.signal=k)}if(c&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(g.method="GET"),"GET"===g.method){var S=ze(t,_),T=S.newURI,D=S.parseError;if(D)return Ke(D);t=T}else try{g.body=ke(_,"Payload")}catch(D){return Ke(D)}return new V((function(n){return(i||h((function(){return fetch}))||Ye)(t,g).then((function(t){return e.setContext({response:t}),t})).then(xe(e)).then((function(e){return n.next(e),n.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){y&&y.abort()}}))}))},$e=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,Je(t).request)||this;return n.options=t,n}return(0,r.ZT)(t,e),t}(ye),He=Object.prototype,Ze=He.toString,Xe=He.hasOwnProperty,et=Function.prototype.toString,tt=new Map;function nt(e,t){try{return rt(e,t)}finally{tt.clear()}}function rt(e,t){if(e===t)return!0;var n,r,i,o=Ze.call(e);if(o!==Ze.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(st(e,t))return!0;var a=it(e),s=it(t),c=a.length;if(c!==s.length)return!1;for(var u=0;u<c;++u)if(!Xe.call(t,a[u]))return!1;for(u=0;u<c;++u){var l=a[u];if(!rt(e[l],t[l]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==""+t;case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(st(e,t))return!0;for(var f=e.entries(),p="[object Map]"===o;;){var h=f.next();if(h.done)break;var d=h.value,y=d[0],v=d[1];if(!t.has(y))return!1;if(p&&!rt(v,t.get(y)))return!1}return!0;case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return-1===m;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var b=et.call(e);return b===et.call(t)&&(r=at,!((i=(n=b).length-r.length)>=0&&n.indexOf(r,i)===i))}return!1}function it(e){return Object.keys(e).filter(ot,e)}function ot(e){return void 0!==this[e]}var at="{ [native code] }";function st(e,t){var n=tt.get(e);if(n){if(n.has(t))return!0}else tt.set(e,n=new Set);return n.add(t),!1}var ct=function(){return Object.create(null)},ut=Array.prototype,lt=ut.forEach,ft=ut.slice,pt=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=ct),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return lt.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(ft.call(e)))},e.prototype.getChildTrie=function(t){var n=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),r=n.get(t);return r||n.set(t,r=new e(this.weakness,this.makeData)),r},e}(),ht="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),dt="function"==typeof WeakSet,yt="function"==typeof Symbol&&"function"==typeof Symbol.for;function vt(e,t){var n=e.directives;return!n||!n.length||function(e){var t=[];return e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var n=e.arguments,r=e.name.value;__DEV__?c(n&&1===n.length,"Incorrect number of arguments for the @".concat(r," directive.")):c(n&&1===n.length,38);var i=n[0];__DEV__?c(i.name&&"if"===i.name.value,"Invalid argument for the @".concat(r," directive.")):c(i.name&&"if"===i.name.value,39);var o=i.value;__DEV__?c(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @".concat(r," directive must be a variable or a boolean value.")):c(o&&("Variable"===o.kind||"BooleanValue"===o.kind),40),t.push({directive:e,ifArgument:i})}})),t}(n).every((function(e){var n=e.directive,r=e.ifArgument,i=!1;return"Variable"===r.value.kind?(i=t&&t[r.value.name.value],__DEV__?c(void 0!==i,"Invalid variable referenced in @".concat(n.name.value," directive.")):c(void 0!==i,37)):i=r.value.value,"skip"===n.name.value?!i:i}))}function mt(e,t){return function(e){var t=[];return Ee(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function bt(e){return e&&mt(["client"],e)&&mt(["export"],e)}var gt=Object.prototype.hasOwnProperty;function _t(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return wt(e)}function wt(e){var t=e[0]||{},n=e.length;if(n>1)for(var r=new Ot,i=1;i<n;++i)t=r.merge(t,e[i]);return t}var Et=function(e,t,n){return this.merge(e[n],t[n])},Ot=function(){function e(e){void 0===e&&(e=Et),this.reconciler=e,this.isObject=U,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var n=this,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return U(t)&&U(e)?(Object.keys(t).forEach((function(o){if(gt.call(e,o)){var a=e[o];if(t[o]!==a){var s=n.reconciler.apply(n,(0,r.ev)([e,t,o],i,!1));s!==a&&((e=n.shallowCopyForMerge(e))[o]=s)}}else(e=n.shallowCopyForMerge(e))[o]=t[o]})),e):t},e.prototype.shallowCopyForMerge=function(e){if(U(e)){if(this.pastCopies.has(e)){if(!Object.isFrozen(e))return e;this.pastCopies.delete(e)}e=Array.isArray(e)?e.slice(0):(0,r.pi)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e)}return e},e}(),kt=Object.prototype.hasOwnProperty;function St(e,t){var n=e.__typename,r=e.id,i=e._id;if("string"==typeof n&&(t&&(t.keyObject=void 0!==r?{id:r}:void 0!==i?{_id:i}:void 0),void 0===r&&(r=i),void 0!==r))return"".concat(n,":").concat("number"==typeof r||"string"==typeof r?r:JSON.stringify(r))}var Tt={dataIdFromObject:St,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Dt(e){var t=e.canonizeResults;return void 0===t?Tt.canonizeResults:t}var xt=/^[_a-z][_0-9a-z]*/i;function It(e){var t=e.match(xt);return t?t[0]:e}function Nt(e,t,n){return!!U(t)&&(Pt(t)?t.every((function(t){return Nt(e,t,n)})):e.selections.every((function(e){if(ne(e)&&vt(e,n)){var r=ee(e);return kt.call(t,r)&&(!e.selectionSet||Nt(e.selectionSet,t[r],n))}return!0})))}function Rt(e){return U(e)&&!K(e)&&!Pt(e)}var At,Ct,Pt=function(e){return Array.isArray(e)},Ft=function(){function e(){this.known=new(dt?WeakSet:Set),this.pool=new pt(ht),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return U(e)&&this.known.has(e)},e.prototype.pass=function(e){if(U(e)){var t=function(e){return U(e)?Pt(e)?e.slice(0):(0,r.pi)({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(U(e)){var n=this.passes.get(e);if(n)return n;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var r=e.map(this.admit,this);return(s=this.pool.lookupArray(r)).array||(this.known.add(s.array=r),__DEV__&&Object.freeze(r)),s.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),o=[i],a=this.sortedKeys(e);o.push(a.json);var s,c=o.length;if(a.sorted.forEach((function(n){o.push(t.admit(e[n]))})),!(s=this.pool.lookupArray(o)).object){var u=s.object=Object.create(i);this.known.add(u),a.sorted.forEach((function(e,t){u[e]=o[c+t]})),__DEV__&&Object.freeze(u)}return s.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var r=JSON.stringify(t);(n.keys=this.keysByJSON.get(r))||this.keysByJSON.set(r,n.keys={sorted:t,json:r})}return n.keys},e}(),jt=Object.assign((function(e){if(U(e)){void 0===At&&qt();var t=At.admit(e),n=Ct.get(t);return void 0===n&&Ct.set(t,n=JSON.stringify(t)),n}return JSON.stringify(e)}),{reset:qt});function qt(){At=new Ft,Ct=new(ht?WeakMap:Map)}function Mt(e,t,n){return new V((function(r){var i=r.next,o=r.error,a=r.complete,s=0,c=!1,u={then:function(e){return new Promise((function(t){return t(e())}))}};function l(e,t){return e?function(t){++s;var n=function(){return e(t)};u=u.then(n,n).then((function(e){--s,i&&i.call(r,e),c&&f.complete()}),(function(e){throw--s,e})).catch((function(e){o&&o.call(r,e)}))}:function(e){return t&&t.call(r,e)}}var f={next:l(t,i),error:l(n,o),complete:function(){c=!0,s||a&&a.call(r)}},p=e.subscribe(f);return function(){return p.unsubscribe()}}))}function Qt(e){return e.errors&&e.errors.length>0||!1}function Lt(e,t,n){var r=0;return e.forEach((function(n,i){t.call(this,n,i,e)&&(e[r++]=n)}),n),e.length=r,e}var Vt={kind:"Field",name:{kind:"Name",value:"__typename"}};function Ut(e,t){return e.selectionSet.selections.every((function(e){return"FragmentSpread"===e.kind&&Ut(t[e.name.value],t)}))}function Bt(e){return Ut(oe(e)||function(e){__DEV__?c("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):c("Document"===e.kind,48),__DEV__?c(e.definitions.length<=1,"Fragment must have exactly one definition."):c(e.definitions.length<=1,49);var t=e.definitions[0];return __DEV__?c("FragmentDefinition"===t.kind,"Must be a fragment definition."):c("FragmentDefinition"===t.kind,50),t}(e),W(se(e)))?null:e}function Wt(e){return function(t){return e.some((function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)}))}}function Gt(e,t){var n=Object.create(null),i=[],o=Object.create(null),a=[],s=Bt(Ee(t,{Variable:{enter:function(e,t,r){"VariableDefinition"!==r.kind&&(n[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&e.some((function(e){return e.remove}))&&t.directives&&t.directives.some(Wt(e)))return t.arguments&&t.arguments.forEach((function(e){"Variable"===e.value.kind&&i.push({name:e.value.name.value})})),t.selectionSet&&Yt(t.selectionSet).forEach((function(e){a.push({name:e.name.value})})),null}},FragmentSpread:{enter:function(e){o[e.name.value]=!0}},Directive:{enter:function(t){if(Wt(e)(t))return null}}}));return s&&Lt(i,(function(e){return!!e.name&&!n[e.name]})).length&&(s=function(e,t){var n=function(e){return function(t){return e.some((function(e){return t.value&&"Variable"===t.value.kind&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))}))}}(e);return Bt(Ee(t,{OperationDefinition:{enter:function(t){return(0,r.pi)((0,r.pi)({},t),{variableDefinitions:t.variableDefinitions?t.variableDefinitions.filter((function(t){return!e.some((function(e){return e.name===t.variable.name.value}))})):[]})}},Field:{enter:function(t){if(e.some((function(e){return e.remove}))){var r=0;if(t.arguments&&t.arguments.forEach((function(e){n(e)&&(r+=1)})),1===r)return null}}},Argument:{enter:function(e){if(n(e))return null}}}))}(i,s)),s&&Lt(a,(function(e){return!!e.name&&!o[e.name]})).length&&(s=function(e,t){function n(t){if(e.some((function(e){return e.name===t.name.value})))return null}return Bt(Ee(t,{FragmentSpread:{enter:n},FragmentDefinition:{enter:n}}))}(a,s)),s}var zt=Object.assign((function(e){return Ee(ie(e),{SelectionSet:{enter:function(e,t,n){if(!n||"OperationDefinition"!==n.kind){var i=e.selections;if(i&&!i.some((function(e){return ne(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var o=n;if(!(ne(o)&&o.directives&&o.directives.some((function(e){return"export"===e.name.value}))))return(0,r.pi)((0,r.pi)({},e),{selections:(0,r.ev)((0,r.ev)([],i,!0),[Vt],!1)})}}}}})}),{added:function(e){return e===Vt}}),Kt={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&c.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),t}};function Yt(e){var t=[];return e.selections.forEach((function(e){(ne(e)||re(e))&&e.selectionSet?Yt(e.selectionSet).forEach((function(e){return t.push(e)})):"FragmentSpread"===e.kind&&t.push(e)})),t}function Jt(e){return"query"===ue(e).operation?e:Ee(e,{OperationDefinition:{enter:function(e){return(0,r.pi)((0,r.pi)({},e),{operation:"query"})}}})}var $t=new Map;function Ht(e){var t=$t.get(e)||1;return $t.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function Zt(e,t,n){var r=[];e.forEach((function(e){return e[t]&&r.push(e)})),r.forEach((function(e){return e[t](n)}))}function Xt(e){function t(t){Object.defineProperty(e,t,{value:V})}return yt&&Symbol.species&&t(Symbol.species),t("@@species"),e}function en(e){return e&&"function"==typeof e.then}var tn=function(e){function t(t){var n=e.call(this,(function(e){return n.addObserver(e),function(){return n.removeObserver(e)}}))||this;return n.observers=new Set,n.addCount=0,n.promise=new Promise((function(e,t){n.resolve=e,n.reject=t})),n.handlers={next:function(e){null!==n.sub&&(n.latest=["next",e],Zt(n.observers,"next",e))},error:function(e){var t=n.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),n.sub=null,n.latest=["error",e],n.reject(e),Zt(n.observers,"error",e))},complete:function(){if(null!==n.sub){var e=n.sources.shift();e?en(e)?e.then((function(e){return n.sub=e.subscribe(n.handlers)})):n.sub=e.subscribe(n.handlers):(n.sub=null,n.latest&&"next"===n.latest[0]?n.resolve(n.latest[1]):n.resolve(),Zt(n.observers,"complete"))}}},n.cancel=function(e){n.reject(e),n.sources=[],n.handlers.complete()},n.promise.catch((function(e){})),"function"==typeof t&&(t=[new V(t)]),en(t)?t.then((function(e){return n.start(e)}),n.handlers.error):n.start(t),n}return(0,r.ZT)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],n=e[t];n&&n.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e),++this.addCount)},t.prototype.removeObserver=function(e,t){this.observers.delete(e)&&--this.addCount<1&&!t&&this.handlers.error(new Error("Observable cancelled prematurely"))},t.prototype.cleanup=function(e){var t=this,n=!1,r=function(){n||(n=!0,t.observers.delete(i),e())},i={next:r,error:r,complete:r},o=this.addCount;this.addObserver(i),this.addCount=o},t}(V);function nn(e){return Array.isArray(e)&&e.length>0}function rn(e){return e.hasOwnProperty("graphQLErrors")}Xt(tn);var on,an=function(e){function t(n){var r,i,o=n.graphQLErrors,a=n.clientErrors,s=n.networkError,c=n.errorMessage,u=n.extraInfo,l=e.call(this,c)||this;return l.graphQLErrors=o||[],l.clientErrors=a||[],l.networkError=s||null,l.message=c||(i="",(nn((r=l).graphQLErrors)||nn(r.clientErrors))&&(r.graphQLErrors||[]).concat(r.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+="".concat(t,"\n")})),r.networkError&&(i+="".concat(r.networkError.message,"\n")),i=i.replace(/\n$/,"")),l.extraInfo=u,l.__proto__=t.prototype,l}return(0,r.ZT)(t,e),t}(Error);function sn(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(on||(on={}));var cn=Object.prototype.toString;function un(e){return ln(e)}function ln(e,t){switch(cn.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach((function(e,r){n[r]=ln(e,t)})),n;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach((function(n){r[n]=ln(e[n],t)})),r;default:return e}}var fn=Object.assign,pn=Object.hasOwnProperty,hn=!1,dn=function(e){function t(t){var n=t.queryManager,r=t.queryInfo,i=t.options,o=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=yn)}catch(e){}var n=!o.observers.size;o.observers.add(e);var r=o.last;return r&&r.error?e.error&&e.error(r.error):r&&r.result&&e.next&&e.next(r.result),n&&o.reobserve().catch((function(){})),function(){o.observers.delete(e)&&!o.observers.size&&o.tearDownQuery()}}))||this;o.observers=new Set,o.subscriptions=new Set,o.isTornDown=!1,o.options=i,o.queryId=r.queryId||n.generateQueryId();var a=oe(i.query);return o.queryName=a&&a.name&&a.name.value,o.initialFetchPolicy=i.fetchPolicy||"cache-first",o.queryManager=n,o.queryInfo=r,o}return(0,r.ZT)(t,e),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:n},i=e.subscribe(r)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),n=this.queryInfo.networkStatus||t&&t.networkStatus||on.ready,i=(0,r.pi)((0,r.pi)({},t),{loading:sn(n),networkStatus:n}),o=this.options.fetchPolicy,a=void 0===o?"cache-first":o;if("network-only"===a||"no-cache"===a||"standby"===a||this.queryManager.transform(this.options.query).hasForcedResolvers);else{var s=this.queryInfo.getDiff();(s.complete||this.options.returnPartialData)&&(i.data=s.result),nt(i.data,{})&&(i.data=void 0),s.complete?(delete i.partial,!s.complete||i.networkStatus!==on.loading||"cache-first"!==a&&"cache-only"!==a||(i.networkStatus=on.ready,i.loading=!1)):i.partial=!0,!__DEV__||s.complete||this.options.partialRefetch||i.loading||i.data||i.error||vn(s.missing)}return e&&this.updateLastResult(i),i},t.prototype.isDifferentFromLastResult=function(e){return!this.last||!nt(this.last.result,e)},t.prototype.getLast=function(e,t){var n=this.last;if(n&&n[e]&&(!t||nt(n.variables,this.variables)))return n[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,n={pollInterval:0},i=this.options.fetchPolicy;if(n.fetchPolicy="cache-and-network"===i?i:"no-cache"===i?"no-cache":"network-only",__DEV__&&e&&pn.call(e,"variables")){var o=ce(this.options.query),a=o.variableDefinitions;a&&a.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&c.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=o.name)||void 0===t?void 0:t.value)||JSON.stringify(o),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!nt(this.options.variables,e)&&(n.variables=this.options.variables=(0,r.pi)((0,r.pi)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(n,on.refetch)},t.prototype.fetchMore=function(e){var t=this,n=(0,r.pi)((0,r.pi)({},e.query?e:(0,r.pi)((0,r.pi)((0,r.pi)({},this.options),e),{variables:(0,r.pi)((0,r.pi)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),i=this.queryManager.generateQueryId();return n.notifyOnNetworkStatusChange&&(this.queryInfo.networkStatus=on.fetchMore,this.observe()),this.queryManager.fetchQuery(i,n,on.fetchMore).then((function(r){var i=r.data,o=e.updateQuery;return o?(__DEV__&&!hn&&(__DEV__&&c.warn("The updateQuery callback for fetchMore is deprecated, and will be removed\nin the next major version of Apollo Client.\n\nPlease convert updateQuery functions to field policies with appropriate\nread and merge functions, or use/adapt a helper function (such as\nconcatPagination, offsetLimitPagination, or relayStylePagination) from\n@apollo/client/utilities.\n\nThe field policy system handles pagination more effectively than a\nhand-written updateQuery function, and you only need to define the policy\nonce, rather than every time you call fetchMore."),hn=!0),t.updateQuery((function(e){return o(e,{fetchMoreResult:i,variables:n.variables})}))):t.queryManager.cache.writeQuery({query:n.query,variables:n.variables,data:i}),r})).finally((function(){t.queryManager.stopQuery(i),t.reobserve()}))},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery((function(e,t){var i=t.variables;return r(e,{subscriptionData:n,variables:i})}))},error:function(t){e.onError?e.onError(t):__DEV__&&c.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return nt(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.initialFetchPolicy,variables:e},on.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,n=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});n&&(t.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,n=this.options.pollInterval;if(n){if(!t||t.interval!==n){__DEV__?c(n,"Attempted to start a polling query without a polling interval."):c(n,10),(t||(this.pollingInfo={})).interval=n;var r=function(){e.pollingInfo&&(sn(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"network-only"},on.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(r,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=(0,r.pi)((0,r.pi)({},this.last),{result:this.queryManager.assumeImmutableResults?e:un(e),variables:t}),nn(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var n=this;this.isTornDown=!1;var i=t===on.refetch||t===on.fetchMore||t===on.poll,o=this.options.variables,a=i?me(this.options,e):fn(this.options,me(e));i||(this.updatePolling(),e&&e.variables&&!e.fetchPolicy&&!nt(e.variables,o)&&(a.fetchPolicy=this.initialFetchPolicy,void 0===t&&(t=on.setVariables)));var s=a.variables&&(0,r.pi)({},a.variables),c=this.fetch(a,t),u={next:function(e){n.reportResult(e,s)},error:function(e){n.reportError(e,s)}};return i||(this.concast&&this.observer&&this.concast.removeObserver(this.observer,!0),this.concast=c,this.observer=u),c.addObserver(u),c.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var n=this.getLastError();(n||this.isDifferentFromLastResult(e))&&((n||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),Zt(this.observers,"next",e))},t.prototype.reportError=function(e,t){var n=(0,r.pi)((0,r.pi)({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:on.error,loading:!1});this.updateLastResult(n,t),Zt(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(V);function yn(e){__DEV__&&c.error("Unhandled error",e.message,e.stack)}function vn(e){__DEV__&&e&&__DEV__&&c.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}function mn(e){var t=e.fetchPolicy,n=void 0===t?"cache-first":t,r=e.nextFetchPolicy;r&&(e.fetchPolicy="function"==typeof r?r.call(e,n):r)}Xt(dn);var bn=null,gn={},_n=1,wn="@wry/context:Slot",En=Array,On=En[wn]||function(){var e=function(){function e(){this.id=["slot",_n++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=bn;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===gn)break;return e!==bn&&(bn.slots[this.id]=t),!0}return bn&&(bn.slots[this.id]=gn),!1},e.prototype.getValue=function(){if(this.hasValue())return bn.slots[this.id]},e.prototype.withValue=function(e,t,n,r){var i,o=((i={__proto__:null})[this.id]=e,i),a=bn;bn={parent:a,slots:o};try{return t.apply(r,n)}finally{bn=a}},e.bind=function(e){var t=bn;return function(){var n=bn;try{return bn=t,e.apply(this,arguments)}finally{bn=n}}},e.noContext=function(e,t,n){if(!bn)return e.apply(n,t);var r=bn;try{return bn=null,e.apply(n,t)}finally{bn=r}},e}();try{Object.defineProperty(En,wn,{value:En[wn]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();function kn(){}On.bind,On.noContext;var Sn,Tn=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=kn),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var n=t.older,r=t.newer;r&&(r.older=n),n&&(n.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t},e.prototype.set=function(e,t){var n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),Dn=new On,xn=Object.prototype.hasOwnProperty,In=void 0===(Sn=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:Sn;function Nn(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var Rn=[];function An(e,t){if(!e)throw new Error(t||"assertion failure")}function Cn(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var Pn=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!qn(this))return Fn(this),this.value[0]},e.prototype.recompute=function(e){return An(!this.recomputing,"already recomputing"),Fn(this),qn(this)?function(e,t){return Wn(e),Dn.withValue(e,jn,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{Nn(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,qn(e)||Qn(e)}(e),Cn(e.value)}(this,e):Cn(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Mn(this),Nn(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),Wn(this),Ln(this,(function(t,n){t.setDirty(),Gn(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=Rn.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(In(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),Rn.push(this.deps),this.deps=null)},e.count=0,e}();function Fn(e){var t=Dn.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),qn(e)?Vn(t,e):Un(t,e),t}function jn(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function qn(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Mn(e){Ln(e,Vn)}function Qn(e){Ln(e,Un)}function Ln(e,t){var n=e.parents.size;if(n)for(var r=In(e.parents),i=0;i<n;++i)t(r[i],e)}function Vn(e,t){An(e.childValues.has(t)),An(qn(t));var n=!qn(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=Rn.pop()||new Set;e.dirtyChildren.add(t),n&&Mn(e)}function Un(e,t){An(e.childValues.has(t)),An(!qn(t));var n,r,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(n=o,r=t.value,(i=n.length)>0&&i===r.length&&n[i-1]===r[i-1]||e.setDirty()),Bn(e,t),qn(e)||Qn(e)}function Bn(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(Rn.length<100&&Rn.push(n),e.dirtyChildren=null))}function Wn(e){e.childValues.size>0&&e.childValues.forEach((function(t,n){Gn(e,n)})),e.forgetDeps(),An(null===e.dirtyChildren)}function Gn(e,t){t.parents.delete(e),e.childValues.delete(t),Bn(e,t)}var zn={setDirty:!0,dispose:!0,forget:!0};function Kn(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=Dn.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(Nn(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&xn.call(zn,n)?n:"setDirty";In(r).forEach((function(e){return e[i]()})),t.delete(e),Nn(r)}},r}function Yn(){var e=new pt("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}Yn();var Jn=new Set;function $n(e,t){void 0===t&&(t=Object.create(null));var n=new Tn(t.max||Math.pow(2,16),(function(e){return e.dispose()})),r=t.keyArgs,i=t.makeCacheKey||Yn(),o=function(){var o=i.apply(null,r?r.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var a=n.get(o);a||(n.set(o,a=new Pn(e)),a.subscribe=t.subscribe,a.forget=function(){return n.delete(o)});var s=a.recompute(Array.prototype.slice.call(arguments));return n.set(o,a),Jn.add(n),Dn.hasValue()||(Jn.forEach((function(e){return e.clean()})),Jn.clear()),s};function a(e){var t=n.get(e);t&&t.setDirty()}function s(e){var t=n.get(e);if(t)return t.peek()}function c(e){return n.delete(e)}return Object.defineProperty(o,"size",{get:function(){return n.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=a,o.dirty=function(){a(i.apply(null,arguments))},o.peekKey=s,o.peek=function(){return s(i.apply(null,arguments))},o.forgetKey=c,o.forget=function(){return c(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=r?function(){return i.apply(null,r.apply(null,arguments))}:i,Object.freeze(o)}var Hn=new On,Zn=new WeakMap;function Xn(e){var t=Zn.get(e);return t||Zn.set(e,t={vars:new Set,dep:Kn()}),t}function er(e){Xn(e).vars.forEach((function(t){return t.forgetCache(e)}))}function tr(e){var t=new Set,n=new Set,r=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){Xn(e).dep.dirty(r),nr(e)}));var a=Array.from(n);n.clear(),a.forEach((function(t){return t(e)}))}}else{var s=Hn.getValue();s&&(i(s),Xn(s).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var i=r.attachCache=function(e){return t.add(e),Xn(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}function nr(e){e.broadcastWatches&&e.broadcastWatches()}var rr=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=_t(t.resolvers,e)})):this.resolvers=_t(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,i=e.context,o=e.variables,a=e.onlyRunForcedResolvers,s=void 0!==a&&a;return(0,r.mG)(this,void 0,void 0,(function(){return(0,r.Jh)(this,(function(e){return t?[2,this.resolveDocument(t,n.data,i,o,this.fragmentMatcher,s).then((function(e){return(0,r.pi)((0,r.pi)({},n),{data:e.result})}))]:[2,n]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return mt(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){ie(e);var t=Gt([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=Ee(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return ne(e)&&"__typename"===e.name.value})))return null}}})),t}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,r.pi)((0,r.pi)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),(0,r.mG)(this,void 0,void 0,(function(){return(0,r.Jh)(this,(function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(e){return(0,r.pi)((0,r.pi)({},t),e.exportedVariables)}))]:[2,(0,r.pi)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return Ee(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return we}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:Jt(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,i,o,a){return void 0===n&&(n={}),void 0===i&&(i={}),void 0===o&&(o=function(){return!0}),void 0===a&&(a=!1),(0,r.mG)(this,void 0,void 0,(function(){var s,c,u,l,f,p,h,d,y;return(0,r.Jh)(this,(function(v){return s=ue(e),c=se(e),u=W(c),l=s.operation,f=l?l.charAt(0).toUpperCase()+l.slice(1):"Query",h=(p=this).cache,d=p.client,y={fragmentMap:u,context:(0,r.pi)((0,r.pi)({},n),{cache:h,client:d}),variables:i,fragmentMatcher:o,defaultOperationType:f,exportedVariables:{},onlyRunForcedResolvers:a},[2,this.resolveSelectionSet(s.selectionSet,t,y).then((function(e){return{result:e,exportedVariables:y.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return(0,r.mG)(this,void 0,void 0,(function(){var i,o,a,s,u,l=this;return(0,r.Jh)(this,(function(f){return i=n.fragmentMap,o=n.context,a=n.variables,s=[t],u=function(e){return(0,r.mG)(l,void 0,void 0,(function(){var u,l;return(0,r.Jh)(this,(function(r){return vt(e,a)?ne(e)?[2,this.resolveField(e,t,n).then((function(t){var n;void 0!==t&&s.push(((n={})[ee(e)]=t,n))}))]:(re(e)?u=e:(u=i[e.name.value],__DEV__?c(u,"No fragment named ".concat(e.name.value)):c(u,9)),u&&u.typeCondition&&(l=u.typeCondition.name.value,n.fragmentMatcher(t,l,o))?[2,this.resolveSelectionSet(u.selectionSet,t,n).then((function(e){s.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(u)).then((function(){return wt(s)}))]}))}))},e.prototype.resolveField=function(e,t,n){return(0,r.mG)(this,void 0,void 0,(function(){var i,o,a,s,c,u,l,f,p,h=this;return(0,r.Jh)(this,(function(r){return i=n.variables,o=e.name.value,a=ee(e),s=o!==a,c=t[a]||t[o],u=Promise.resolve(c),n.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(l=t.__typename||n.defaultOperationType,(f=this.resolvers&&this.resolvers[l])&&(p=f[s?o:a])&&(u=Promise.resolve(Hn.withValue(this.cache,p,[t,X(e,i),n.context,{field:e,fragmentMap:n.fragmentMap}])))),[2,u.then((function(t){return void 0===t&&(t=c),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?h.resolveSubSelectedArray(e,t,n):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t,n):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,n){var r=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?r.resolveSubSelectedArray(e,t,n):e.selectionSet?r.resolveSelectionSet(e.selectionSet,t,n):void 0})))},e}(),ir=new(ht?WeakMap:Map);function or(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return ir.set(e,(ir.get(e)+1)%1e15),n.apply(this,arguments)})}function ar(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var sr=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;ir.has(n)||(ir.set(n,0),or(n,"evict"),or(n,"modify"),or(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||on.loading;return this.variables&&this.networkStatus!==on.loading&&!nt(this.variables,e.variables)&&(t=on.setVariables),nt(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){ar(this),this.lastDiff=void 0,this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&nt(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var n=this.observableQuery;if(n&&"no-cache"===n.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||nt(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():e.reobserve()})):delete this.oqListener)},e.prototype.notify=function(){var e=this;ar(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(sn(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var i=(0,r.pi)((0,r.pi)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&nt(i,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===ir.get(this.cache)&&nt(t,n.variables)&&nt(e.data,n.result.data))},e.prototype.markResult=function(e,t,n){var r=this;this.graphQLErrors=nn(e.errors)?e.errors:[],this.reset(),"no-cache"===t.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(t.variables)):0!==n&&(cr(e,t.errorPolicy)?this.cache.performTransaction((function(i){if(r.shouldWrite(e,t.variables))i.writeQuery({query:r.document,data:e.data,variables:t.variables,overwrite:1===n}),r.lastWrite={result:e,variables:t.variables,dmCount:ir.get(r.cache)};else if(r.lastDiff&&r.lastDiff.diff.complete)return void(e.data=r.lastDiff.diff.result);var o=r.getDiffOptions(t.variables),a=i.diff(o);r.stopped||r.updateWatch(t.variables),r.updateLastDiff(a,o),a.complete&&(e.data=a.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=on.ready},e.prototype.markError=function(e){return this.networkStatus=on.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function cr(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!Qt(e);return!r&&n&&e.data&&(r=!0),r}var ur=Object.prototype.hasOwnProperty,lr=function(){function e(e){var t=e.cache,n=e.link,r=e.queryDeduplication,i=void 0!==r&&r,o=e.onBroadcast,a=e.ssrMode,s=void 0!==a&&a,c=e.clientAwareness,u=void 0===c?{}:c,l=e.localState,f=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(ht?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=n,this.queryDeduplication=i,this.clientAwareness=u,this.localState=l||new rr({cache:t}),this.ssrMode=s,this.assumeImmutableResults=!!f,(this.onBroadcast=o)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,n){e.stopQueryNoBroadcast(n)})),this.cancelPendingFetches(__DEV__?new s("QueryManager stopped while query was in flight"):new s(11))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,i=e.optimisticResponse,o=e.updateQueries,a=e.refetchQueries,s=void 0===a?[]:a,u=e.awaitRefetchQueries,l=void 0!==u&&u,f=e.update,p=e.onQueryUpdated,h=e.errorPolicy,d=void 0===h?"none":h,y=e.fetchPolicy,v=void 0===y?"network-only":y,m=e.keepRootFields,b=e.context;return(0,r.mG)(this,void 0,void 0,(function(){var e,a,u;return(0,r.Jh)(this,(function(h){switch(h.label){case 0:return __DEV__?c(t,"mutation option is required. You must specify your GraphQL document in the mutation option."):c(t,12),__DEV__?c("network-only"===v||"no-cache"===v,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):c("network-only"===v||"no-cache"===v,13),e=this.generateMutationId(),t=this.transform(t).document,n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,b)]:[3,2];case 1:n=h.sent(),h.label=2;case 2:return a=this.mutationStore&&(this.mutationStore[e]={mutation:t,variables:n,loading:!0,error:null}),i&&this.markMutationOptimistic(i,{mutationId:e,document:t,variables:n,fetchPolicy:v,errorPolicy:d,context:b,updateQueries:o,update:f,keepRootFields:m}),this.broadcastQueries(),u=this,[2,new Promise((function(c,h){return Mt(u.getObservableFromLink(t,(0,r.pi)((0,r.pi)({},b),{optimisticResponse:i}),n,!1),(function(c){if(Qt(c)&&"none"===d)throw new an({graphQLErrors:c.errors});a&&(a.loading=!1,a.error=null);var h=(0,r.pi)({},c);return"function"==typeof s&&(s=s(h)),"ignore"===d&&Qt(h)&&delete h.errors,u.markMutationResult({mutationId:e,result:h,document:t,variables:n,fetchPolicy:v,errorPolicy:d,context:b,update:f,updateQueries:o,awaitRefetchQueries:l,refetchQueries:s,removeOptimistic:i?e:void 0,onQueryUpdated:p,keepRootFields:m})})).subscribe({next:function(e){u.broadcastQueries(),c(e)},error:function(t){a&&(a.loading=!1,a.error=t),i&&u.cache.removeOptimistic(e),u.broadcastQueries(),h(t instanceof an?t:new an({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var n=this;void 0===t&&(t=this.cache);var i=e.result,o=[],a="no-cache"===e.fetchPolicy;if(!a&&cr(i,e.errorPolicy)){o.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables});var s=e.updateQueries;s&&this.queries.forEach((function(e,r){var a=e.observableQuery,c=a&&a.queryName;if(c&&ur.call(s,c)){var u=s[c],l=n.queries.get(r),f=l.document,p=l.variables,h=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),d=h.result;if(h.complete&&d){var y=u(d,{mutationResult:i,queryName:f&&ae(f)||void 0,queryVariables:p});y&&o.push({result:y,dataId:"ROOT_QUERY",query:f,variables:p})}}}))}if(o.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var c=[];if(this.refetchQueries({updateCache:function(t){a||o.forEach((function(e){return t.write(e)}));var s=e.update;if(s){if(!a){var c=t.diff({id:"ROOT_MUTATION",query:n.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});c.complete&&(i=(0,r.pi)((0,r.pi)({},i),{data:c.result}))}s(t,i,{context:e.context,variables:e.variables})}a||e.keepRootFields||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return c.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(c).then((function(){return i}))}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(e,t){var n=this,i="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{n.markMutationResult((0,r.pi)((0,r.pi)({},t),{result:{data:i}}),e)}catch(e){__DEV__&&c.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,n){return this.fetchQueryObservable(e,t,n).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t,n=this.transformCache;if(!n.has(e)){var i=this.cache.transformDocument(e),o=(t=this.cache.transformForLink(i),Gt([Kt],ie(t))),a=this.localState.clientQuery(i),s=o&&this.localState.serverQuery(o),c={document:i,hasClientExports:bt(i),hasForcedResolvers:this.localState.shouldForceResolvers(i),clientQuery:a,serverQuery:s,defaultVars:le(oe(i)),asQuery:(0,r.pi)((0,r.pi)({},i),{definitions:i.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,r.pi)((0,r.pi)({},e),{operation:"query"}):e}))})},u=function(e){e&&!n.has(e)&&n.set(e,c)};u(e),u(i),u(a),u(s)}return n.get(e)},e.prototype.getVariables=function(e,t){return(0,r.pi)((0,r.pi)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,r.pi)((0,r.pi)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new sr(this),n=new dn({queryManager:this,queryInfo:t,options:e});return this.queries.set(n.queryId,t),t.init({document:e.query,observableQuery:n,variables:e.variables}),n},e.prototype.query=function(e,t){var n=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?c(e.query,"query option is required. You must specify your GraphQL document in the query option."):c(e.query,14),__DEV__?c("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):c("Document"===e.query.kind,15),__DEV__?c(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):c(!e.returnPartialData,16),__DEV__?c(!e.pollInterval,"pollInterval option only supported on watchQuery."):c(!e.pollInterval,17),this.fetchQuery(t,e).finally((function(){return n.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new s("Store reset while query was in flight (not completed in link chain)"):new s(18)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=on.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,i=new Map,o=new Set;return Array.isArray(e)&&e.forEach((function(e){var n;"string"==typeof e?i.set(e,!1):U(n=e)&&"Document"===n.kind&&Array.isArray(n.definitions)?i.set(t.transform(e).document,!1):U(e)&&e.query&&o.add(e)})),this.queries.forEach((function(t,r){var o=t.observableQuery,a=t.document;if(o){if("all"===e)return void n.set(r,o);var s=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||s&&i.has(s)||a&&i.has(a))&&(n.set(r,o),s&&i.set(s,!0),a&&i.set(a,!0))}})),o.size&&o.forEach((function(e){var i=Ht("legacyOneTimeQuery"),o=t.getQuery(i).init({document:e.query,variables:e.variables}),a=new dn({queryManager:t,queryInfo:o,options:(0,r.pi)((0,r.pi)({},e),{fetchPolicy:"network-only"})});c(a.queryId===i),o.setObservableQuery(a),n.set(i,a)})),__DEV__&&i.size&&i.forEach((function(e,t){e||__DEV__&&c.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))})),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach((function(r,i){var o=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&n.push(r.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.errorPolicy,o=e.variables,a=e.context,s=void 0===a?{}:a;n=this.transform(n).document,o=this.getVariables(n,o);var c=function(e){return t.getObservableFromLink(n,s,e).map((function(o){if("no-cache"!==r&&(cr(o,i)&&t.cache.write({query:n,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),Qt(o))throw new an({graphQLErrors:o.errors});return o}))};if(this.transform(n).hasClientExports){var u=this.localState.addExportedVariables(n,o,s).then(c);return new V((function(e){var t=null;return u.then((function(n){return t=n.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return c(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.getQuery(e).stop(),this.queries.delete(e)},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,i){var o,a,s=this;void 0===i&&(i=null!==(o=null==t?void 0:t.queryDeduplication)&&void 0!==o?o:this.queryDeduplication);var c=this.transform(e).serverQuery;if(c){var u=this.inFlightLinkObservables,l=this.link,f={query:c,variables:n,operationName:ae(c)||void 0,context:this.prepareContext((0,r.pi)((0,r.pi)({},t),{forceFetch:!i}))};if(t=f.context,i){var p=u.get(c)||new Map;u.set(c,p);var h=jt(n);if(!(a=p.get(h))){var d=new tn([ve(l,f)]);p.set(h,a=d),d.cleanup((function(){p.delete(h)&&p.size<1&&u.delete(c)}))}}else a=new tn([ve(l,f)])}else a=new tn([V.of({data:{}})]),t=this.prepareContext(t);var y=this.transform(e).clientQuery;return y&&(a=Mt(a,(function(e){return s.localState.runResolvers({document:y,remoteResult:e,context:t,variables:n})}))),a},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId();return Mt(this.getObservableFromLink(e.document,n.context,n.variables),(function(i){var o=nn(i.errors);if(r>=e.lastRequestId){if(o&&"none"===n.errorPolicy)throw e.markError(new an({graphQLErrors:i.errors}));e.markResult(i,n,t),e.markReady()}var a={data:i.data,loading:!1,networkStatus:e.networkStatus||on.ready};return o&&"ignore"!==n.errorPolicy&&(a.errors=i.errors),a}),(function(t){var n=rn(t)?t:new an({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n}))},e.prototype.fetchQueryObservable=function(e,t,n){var r=this;void 0===n&&(n=on.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),a=this.getQuery(e),s=t.fetchPolicy,c=void 0===s?"cache-first":s,u=t.errorPolicy,l=void 0===u?"none":u,f=t.returnPartialData,p=void 0!==f&&f,h=t.notifyOnNetworkStatusChange,d=void 0!==h&&h,y=t.context,v=void 0===y?{}:y,m=Object.assign({},t,{query:i,variables:o,fetchPolicy:c,errorPolicy:l,returnPartialData:p,notifyOnNetworkStatusChange:d,context:v}),b=function(e){return m.variables=e,r.fetchQueryByPolicy(a,m,n)};this.fetchCancelFns.set(e,(function(e){setTimeout((function(){return g.cancel(e)}))}));var g=new tn(this.transform(m.query).hasClientExports?this.localState.addExportedVariables(m.query,m.variables,m.context).then(b):b(m.variables));return g.cleanup((function(){r.fetchCancelFns.delete(e),mn(t)})),g},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,i=e.optimistic,o=void 0!==i&&i,a=e.removeOptimistic,s=void 0===a?o?Ht("refetchQueries"):void 0:a,c=e.onQueryUpdated,u=new Map;r&&this.getObservableQueries(r).forEach((function(e,n){u.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})}));var l=new Map;return n&&this.cache.batch({update:n,optimistic:o&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof sr&&e.watcher.observableQuery;if(r){if(c){u.delete(r.queryId);var i=c(r,t,n);return!0===i&&(i=r.refetch()),!1!==i&&l.set(r,i),i}null!==c&&u.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),u.size&&u.forEach((function(e,n){var r,i=e.oq,o=e.lastDiff,a=e.diff;if(c){if(!a){var s=i.queryInfo;s.reset(),a=s.getDiff()}r=c(i,a,o)}c&&!0!==r||(r=i.refetch()),!1!==r&&l.set(i,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)})),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,n){var i=this,o=t.query,a=t.variables,s=t.fetchPolicy,c=t.refetchWritePolicy,u=t.errorPolicy,l=t.returnPartialData,f=t.context,p=t.notifyOnNetworkStatusChange,h=e.networkStatus;e.init({document:o,variables:a,networkStatus:n});var d=function(){return e.getDiff(a)},y=function(t,n){void 0===n&&(n=e.networkStatus||on.loading);var s=t.result;!__DEV__||l||nt(s,{})||vn(t.missing);var c=function(e){return V.of((0,r.pi)({data:e,loading:sn(n),networkStatus:n},t.complete?null:{partial:!0}))};return s&&i.transform(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:s},context:f,variables:a,onlyRunForcedResolvers:!0}).then((function(e){return c(e.data||void 0)})):c(s)},v="no-cache"===s?0:n===on.refetch&&"merge"!==c?1:2,m=function(){return i.getResultsFromLink(e,v,{variables:a,context:f,fetchPolicy:s,errorPolicy:u})},b=p&&"number"==typeof h&&h!==n&&sn(n);switch(s){default:case"cache-first":return(g=d()).complete?[y(g,e.markReady())]:l||b?[y(g),m()]:[m()];case"cache-and-network":var g;return(g=d()).complete||l||b?[y(g),m()]:[m()];case"cache-only":return[y(d(),e.markReady())];case"network-only":return b?[y(d()),m()]:[m()];case"no-cache":return b?[y(e.getDiff()),m()]:[m()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new sr(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,r.pi)((0,r.pi)({},t),{clientAwareness:this.clientAwareness})},e}(),fr=!1;function pr(e,t){return me(e,t,t.variables&&{variables:(0,r.pi)((0,r.pi)({},e.variables),t.variables)})}var hr,dr=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.uri,r=e.credentials,i=e.headers,o=e.cache,a=e.ssrMode,u=void 0!==a&&a,l=e.ssrForceFetchDelay,f=void 0===l?0:l,p=e.connectToDevTools,h=void 0===p?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:p,d=e.queryDeduplication,y=void 0===d||d,v=e.defaultOptions,m=e.assumeImmutableResults,b=void 0!==m&&m,g=e.resolvers,_=e.typeDefs,w=e.fragmentMatcher,E=e.name,O=e.version,k=e.link;if(k||(k=n?new $e({uri:n,credentials:r,headers:i}):ye.empty()),!o)throw __DEV__?new s("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new s(7);if(this.link=k,this.cache=o,this.disableNetworkFetches=u||f>0,this.queryDeduplication=y,this.defaultOptions=v||{},this.typeDefs=_,f&&setTimeout((function(){return t.disableNetworkFetches=!1}),f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),h&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!fr&&__DEV__&&(fr=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var S=window.navigator,T=S&&S.userAgent,D=void 0;"string"==typeof T&&(T.indexOf("Chrome/")>-1?D="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":T.indexOf("Firefox/")>-1&&(D="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),D&&__DEV__&&c.log("Download the Apollo DevTools for a better development experience: "+D)}this.version="3.5.9",this.localState=new rr({cache:o,client:this,resolvers:g,fragmentMatcher:w}),this.queryManager=new lr({cache:this.cache,link:this.link,queryDeduplication:y,ssrMode:u,clientAwareness:{name:E,version:O},localState:this.localState,assumeImmutableResults:b,onBroadcast:h?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=pr(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,r.pi)((0,r.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=pr(this.defaultOptions.query,e)),__DEV__?c("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):c("cache-and-network"!==e.fetchPolicy,8),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,r.pi)((0,r.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=pr(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return ve(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach((function(e,t){n.push(t),r.push(e)}));var i=Promise.all(r);return i.queries=n,i.results=r,i.catch((function(e){__DEV__&&c.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}();hr||(hr={});var yr=function(){function e(){this.getFragmentDoc=$n(B)}return e.prototype.batch=function(e){var t,n=this,r="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction((function(){return t=e.update(n)}),r),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,r.pi)((0,r.pi)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,r.pi)((0,r.pi)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,i=(0,r._T)(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,i=e.fragment,o=e.fragmentName,a=(0,r._T)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(i,o),dataId:t,result:n}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var i=n.readQuery(e),o=t(i);return null==o?i:(n.writeQuery((0,r.pi)((0,r.pi)({},e),{data:o})),o)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var i=n.readFragment(e),o=t(i);return null==o?i:(n.writeFragment((0,r.pi)((0,r.pi)({},e),{data:o})),o)}})},e}(),vr=function(e,t,n,r){this.message=e,this.path=t,this.query=n,this.variables=r};function mr(e){return __DEV__&&(t=e,(n=new Set([t])).forEach((function(e){U(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(t){U(e[t])&&n.add(e[t])}))}))),e;var t,n}var br=Object.create(null),gr=function(){return br},_r=Object.create(null),wr=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return mr(K(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return K(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return z(e);if(K(e))return e;var r=n.policies.identify(e)[0];if(r){var i=z(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return(0,r.pi)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),kt.call(this.data,e)){var n=this.data[e];if(n&&kt.call(n,t))return n[t]}return"__typename"===t&&kt.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Sr?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),kt.call(this.data,e)?this.data[e]:this instanceof Sr?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;K(e)&&(e=e.__ref),K(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(n=e):e,o="string"==typeof t?this.lookup(n=t):t;if(o){__DEV__?c("string"==typeof n,"store.merge expects a string ID"):c("string"==typeof n,1);var a=new Ot(Dr).merge(i,o);if(this.data[n]=a,a!==i&&(delete this.refs[n],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(o).forEach((function(e){if(!i||i[e]!==a[e]){s[e]=1;var t=It(e);t===e||r.policies.hasKeyArgs(a.__typename,t)||(s[t]=1),void 0!==a[e]||r instanceof Sr||delete a[e]}})),!s.__typename||i&&i.__typename||this.policies.rootTypenamesById[n]!==a.__typename||delete s.__typename,Object.keys(s).forEach((function(e){return r.group.dirty(n,e)}))}}},e.prototype.modify=function(e,t){var n=this,i=this.lookup(e);if(i){var o=Object.create(null),a=!1,s=!0,c={DELETE:br,INVALIDATE:_r,isReference:K,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||z(e)}:t,{store:n})}};if(Object.keys(i).forEach((function(u){var l=It(u),f=i[u];if(void 0!==f){var p="function"==typeof t?t:t[u]||t[l];if(p){var h=p===gr?br:p(mr(f),(0,r.pi)((0,r.pi)({},c),{fieldName:l,storeFieldName:u,storage:n.getStorage(e,u)}));h===_r?n.group.dirty(e,u):(h===br&&(h=void 0),h!==f&&(o[u]=h,a=!0,f=h))}void 0!==f&&(s=!1)}})),a)return this.merge(e,o),s&&(this instanceof Sr?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,n){var r,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),a=t&&n?this.policies.getStoreFieldName({typename:o,fieldName:t,args:n}):t;return this.modify(e,a?((r={})[a]=gr,r):gr)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(kt.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof Sr&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach((function(t){kt.call(e.policies.rootTypenamesById,t)||n.push(t)})),n.length&&(t.__META={extraRootIds:n.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(n){e&&kt.call(e,n)||t.delete(n)})),e){var n=e.__META,i=(0,r._T)(e,["__META"]);Object.keys(i).forEach((function(e){t.merge(e,i[e])})),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Sr?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach((function(r){kt.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])}));var r=Object.keys(n);if(r.length){for(var i=this;i instanceof Sr;)i=i.parent;r.forEach((function(e){return i.delete(e)}))}return r},e.prototype.findChildRefIds=function(e){if(!kt.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach((function(e){K(e)&&(t[e.__ref]=!0),U(e)&&Object.keys(e).forEach((function(t){var n=e[t];U(n)&&r.add(n)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Er=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?Kn():null,this.keyMaker=new pt(ht)},e.prototype.depend=function(e,t){if(this.d){this.d(Or(e,t));var n=It(t);n!==t&&this.d(Or(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(Or(e,t),"__exists"===t?"forget":"setDirty")},e}();function Or(e,t){return t+"#"+e}function kr(e,t){xr(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var n=t.policies,r=t.resultCaching,i=void 0===r||r,o=t.seed,a=e.call(this,n,new Er(i))||this;return a.stump=new Tr(a),a.storageTrie=new pt(ht),o&&a.replace(o),a}return(0,r.ZT)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(wr||(wr={}));var Sr=function(e){function t(t,n,r,i){var o=e.call(this,n.policies,i)||this;return o.id=t,o.parent=n,o.replay=r,o.group=i,r(o),o}return(0,r.ZT)(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var r=t.data[e],i=n.lookup(e);i?r?r!==i&&Object.keys(r).forEach((function(n){nt(r[n],i[n])||t.group.dirty(e,n)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(n){t.group.dirty(e,n)}))):t.delete(e)})),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,r.pi)((0,r.pi)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return kt.call(this.data,t)?(0,r.pi)((0,r.pi)({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(wr),Tr=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new Er(t.group.caching,t.group))||this}return(0,r.ZT)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(Sr);function Dr(e,t,n){var r=e[n],i=t[n];return nt(r,i)?r:i}function xr(e){return!!(e instanceof wr&&e.group.caching)}function Ir(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var Nr=function(){function e(e){var t=this;this.knownResults=new(ht?WeakMap:Map),this.config=me(e,{addTypename:!1!==e.addTypename,canonizeResults:Dt(e)}),this.canon=e.canon||new Ft,this.executeSelectionSet=$n((function(e){var n,i=e.context.canonizeResults,o=Ir(e);o[3]=!i;var a=(n=t.executeSelectionSet).peek.apply(n,o);return a?i?(0,r.pi)((0,r.pi)({},a),{result:t.canon.admit(a.result)}):a:(kr(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:Ir,makeCacheKey:function(e,t,n,r){if(xr(n.store))return n.store.makeCacheKey(e,K(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=$n((function(e){return kr(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(xr(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Ft},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,i=e.rootId,o=void 0===i?"ROOT_QUERY":i,a=e.variables,s=e.returnPartialData,c=void 0===s||s,u=e.canonizeResults,l=void 0===u?this.config.canonizeResults:u,f=this.config.cache.policies;a=(0,r.pi)((0,r.pi)({},le(ce(n))),a);var p,h=z(o),d=new Ot,y=this.executeSelectionSet({selectionSet:ue(n).selectionSet,objectOrReference:h,enclosingRef:h,context:{store:t,query:n,policies:f,variables:a,varString:jt(a),canonizeResults:l,fragmentMap:W(se(n)),merge:function(e,t){return d.merge(e,t)}}});if(y.missing&&(p=[new vr(Rr(y.missing),y.missing,n,a)],!c))throw p[0];return{result:y.result,complete:!p,missing:p}},e.prototype.isFresh=function(e,t,n,r){if(xr(r.store)&&this.knownResults.get(e)===n){var i=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,n=e.selectionSet,r=e.objectOrReference,i=e.enclosingRef,o=e.context;if(K(r)&&!o.policies.rootTypenamesById[r.__ref]&&!o.store.has(r.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(r.__ref," object")};var a,s=o.variables,c=o.policies,u=o.store.getFieldValue(r,"__typename"),l={};function f(e,t){var n;return e.missing&&(a=o.merge(a,((n={})[t]=e.missing,n))),e.result}this.config.addTypename&&"string"==typeof u&&!c.rootIdsByTypename[u]&&(l={__typename:u});var p=new Set(n.selections);p.forEach((function(e){var n,h;if(vt(e,s))if(ne(e)){var d=c.readField({fieldName:e.name.value,field:e,variables:o.variables,from:r},o),y=ee(e);void 0===d?zt.added(e)||(a=o.merge(a,((n={})[y]="Can't find field '".concat(e.name.value,"' on ").concat(K(r)?r.__ref+" object":"object "+JSON.stringify(r,null,2)),n))):Pt(d)?d=f(t.executeSubSelectedArray({field:e,array:d,enclosingRef:i,context:o}),y):e.selectionSet?null!=d&&(d=f(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:d,enclosingRef:K(d)?d:i,context:o}),y)):o.canonizeResults&&(d=t.canon.pass(d)),void 0!==d&&(l=o.merge(l,((h={})[y]=d,h)))}else{var v=G(e,o.fragmentMap);v&&c.fragmentMatches(v,u)&&v.selectionSet.selections.forEach(p.add,p)}}));var h={result:l,missing:a},d=o.canonizeResults?this.canon.admit(h):mr(h);return d.result&&this.knownResults.set(d.result,n),d},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,o=e.enclosingRef,a=e.context;function s(e,n){var r;return e.missing&&(t=a.merge(t,((r={})[n]=e.missing,r))),e.result}return r.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map((function(e,t){return null===e?null:Pt(e)?s(n.executeSubSelectedArray({field:r,array:e,enclosingRef:o,context:a}),t):r.selectionSet?s(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:K(e)?e:o,context:a}),t):(__DEV__&&function(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach((function(n){U(n)&&(__DEV__?c(!K(n),"Missing selection set for object of type ".concat(function(e,t){return K(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,n)," returned for query field ").concat(t.name.value)):c(!K(n),5),Object.values(n).forEach(r.add,r))}))}}(a.store,r,e),e)})),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function Rr(e){try{JSON.stringify(e,(function(e,t){if("string"==typeof t)throw t;return t}))}catch(e){return e}}var Ar=Object.create(null);function Cr(e){var t=JSON.stringify(e);return Ar[t]||(Ar[t]=Object.create(null))}function Pr(e){var t=Cr(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,n){var r=function(e,t){return n.readField(t,e)},i=n.keyObject=jr(e,(function(e){var i=Qr(n.storeObject,e,r);return void 0===i&&t!==n.storeObject&&kt.call(t,e[0])&&(i=Qr(t,e,Mr)),__DEV__?c(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):c(void 0!==i,2),i}));return"".concat(n.typename,":").concat(JSON.stringify(i))})}function Fr(e){var t=Cr(e);return t.keyArgsFn||(t.keyArgsFn=function(t,n){var r=n.field,i=n.variables,o=n.fieldName,a=jr(e,(function(e){var n=e[0],o=n.charAt(0);if("@"!==o)if("$"!==o){if(t)return Qr(t,e)}else{var a=n.slice(1);if(i&&kt.call(i,a)){var s=e.slice(0);return s[0]=a,Qr(i,s)}}else if(r&&nn(r.directives)){var c=n.slice(1),u=r.directives.find((function(e){return e.name.value===c})),l=u&&X(u,i);return l&&Qr(l,e.slice(1))}})),s=JSON.stringify(a);return(t||"{}"!==s)&&(o+=":"+s),o})}function jr(e,t){var n=new Ot;return qr(e).reduce((function(e,r){var i,o=t(r);if(void 0!==o){for(var a=r.length-1;a>=0;--a)(i={})[r[a]]=o,o=i;e=n.merge(e,o)}return e}),Object.create(null))}function qr(e){var t=Cr(e);if(!t.paths){var n=t.paths=[],r=[];e.forEach((function(t,i){Pt(t)?(qr(t).forEach((function(e){return n.push(r.concat(e))})),r.length=0):(r.push(t),Pt(e[i+1])||(n.push(r.slice(0)),r.length=0))}))}return t.paths}function Mr(e,t){return e[t]}function Qr(e,t,n){return n=n||Mr,Lr(t.reduce((function e(t,r){return Pt(t)?t.map((function(t){return e(t,r)})):t&&n(t,r)}),e))}function Lr(e){return U(e)?Pt(e)?e.map(Lr):jr(Object.keys(e).sort(),(function(t){return Qr(e,t)})):e}function Vr(e){return void 0!==e.args?e.args:e.field?X(e.field,e.variables):null}$.setStringify(jt);var Ur=function(){},Br=function(e,t){return t.fieldName},Wr=function(e,t,n){return(0,n.mergeObjects)(e,t)},Gr=function(e,t){return t},zr=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,r.pi)({dataIdFromObject:St},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var n,i=this,o=t&&(t.typename||(null===(n=t.storeObject)||void 0===n?void 0:n.__typename))||e.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a,s=t&&t.storeObject||e,c=(0,r.pi)((0,r.pi)({},t),{typename:o,storeObject:s,readField:t&&t.readField||function(){var e=Yr(arguments,s);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),u=o&&this.getTypePolicy(o),l=u&&u.keyFn||this.config.dataIdFromObject;l;){var f=l(e,c);if(!Pt(f)){a=f;break}l=Pr(f)}return a=a?String(a):void 0,c.keyObject?[a,c.keyObject]:[a]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(n){var i=e[n],o=i.queryType,a=i.mutationType,s=i.subscriptionType,c=(0,r._T)(i,["queryType","mutationType","subscriptionType"]);o&&t.setRootTypename("Query",n),a&&t.setRootTypename("Mutation",n),s&&t.setRootTypename("Subscription",n),kt.call(t.toBeAdded,n)?t.toBeAdded[n].push(c):t.toBeAdded[n]=[c]}))},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"==typeof t?t:!0===t?Wr:!1===t?Gr:e.merge}a(r,t.merge),r.keyFn=!1===i?Ur:Pt(i)?Pr(i):"function"==typeof i?i:r.keyFn,o&&Object.keys(o).forEach((function(t){var r=n.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)r.read=i;else{var s=i.keyArgs,c=i.read,u=i.merge;r.keyFn=!1===s?Br:Pt(s)?Fr(s):"function"==typeof s?s:r.keyFn,"function"==typeof c&&(r.read=c),a(r,u)}r.read&&r.merge&&(r.keyFn=r.keyFn||Br)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?c(!r||r===e,"Cannot change root ".concat(e," __typename more than once")):c(!r||r===e,3),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(n){t.getSupertypeSet(n,!0),e[n].forEach((function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(xt);r&&r[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!kt.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var i=this.supertypeMap.get(e);i&&i.size&&i.forEach((function(e){var i=t.getTypePolicy(e),o=i.fields,a=(0,r._T)(i,["fields"]);Object.assign(n,a),Object.assign(n.fields,o)}))}var o=this.toBeAdded[e];return o&&o.length&&o.splice(0).forEach((function(n){t.updateTypePolicy(e,n)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var a=this.getSupertypeSet(t,!0),s=[a],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&s.indexOf(t)<0&&s.push(t)},l=!(!n||!this.fuzzySubtypes.size),f=!1,p=0;p<s.length;++p){var h=s[p];if(h.has(o))return a.has(o)||(f&&__DEV__&&c.warn("Inferring subtype ".concat(t," of supertype ").concat(o)),a.add(o)),!0;h.forEach(u),l&&p===s.length-1&&Nt(e.selectionSet,n,r)&&(l=!1,f=!0,this.fuzzySubtypes.forEach((function(e,n){var r=t.match(e);r&&r[0]===t&&u(n)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var n=this.getFieldPolicy(e,t,!1);return!(!n||!n.keyFn)},e.prototype.getStoreFieldName=function(e){var t,n=e.typename,r=e.fieldName,i=this.getFieldPolicy(n,r,!1),o=i&&i.keyFn;if(o&&n)for(var a={typename:n,fieldName:r,field:e.field||null,variables:e.variables},s=Vr(e);o;){var c=o(s,a);if(!Pt(c)){t=c||r;break}o=Fr(c)}return void 0===t&&(t=e.field?function(e,t){var n=null;e.directives&&(n={},e.directives.forEach((function(e){n[e.name.value]={},e.arguments&&e.arguments.forEach((function(r){var i=r.name,o=r.value;return Y(n[e.name.value],i,o,t)}))})));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach((function(e){var n=e.name,i=e.value;return Y(r,n,i,t)}))),$(e.name.value,r,n)}(e.field,e.variables):$(r,Vr(e))),!1===t?r:r===It(t)?t:r+":"+t},e.prototype.readField=function(e,t){var n=e.from;if(n&&(e.field||e.fieldName)){if(void 0===e.typename){var r=t.store.getFieldValue(n,"__typename");r&&(e.typename=r)}var i=this.getStoreFieldName(e),o=It(i),a=t.store.getFieldValue(n,i),s=this.getFieldPolicy(e.typename,o,!1),c=s&&s.read;if(c){var u=Kr(this,n,e,t,t.store.getStorage(K(n)?n.__ref:n,i));return Hn.withValue(this.cache,c,[a,u])}return a}},e.prototype.getReadFunction=function(e,t){var n=this.getFieldPolicy(e,t,!1);return n&&n.read},e.prototype.getMergeFunction=function(e,t,n){var r=this.getFieldPolicy(e,t,!1),i=r&&r.merge;return!i&&n&&(i=(r=this.getTypePolicy(n))&&r.merge),i},e.prototype.runMergeFunction=function(e,t,n,r,i){var o=n.field,a=n.typename,s=n.merge;return s===Wr?Jr(r.store)(e,t):s===Gr?t:(r.overwrite&&(e=void 0),s(e,t,Kr(this,void 0,{typename:a,fieldName:o.name.value,field:o,variables:r.variables},r,i||Object.create(null))))},e}();function Kr(e,t,n,r,i){var o=e.getStoreFieldName(n),a=It(o),s=n.variables||r.variables,c=r.store,u=c.toReference,l=c.canRead;return{args:Vr(n),field:n.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:K,toReference:u,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(Yr(arguments,t,r),r)},mergeObjects:Jr(r.store)}}function Yr(e,t,n){var i,o,a,s=e[0],u=e[1],l=e.length;return"string"==typeof s?i={fieldName:s,from:l>1?u:t}:(i=(0,r.pi)({},s),kt.call(i,"from")||(i.from=t)),__DEV__&&void 0===i.from&&__DEV__&&c.warn("Undefined 'from' passed to readField with arguments ".concat((o=Array.from(e),a=Ht("stringifyForDisplay"),JSON.stringify(o,(function(e,t){return void 0===t?a:t})).split(JSON.stringify(a)).join("<undefined>")))),void 0===i.variables&&(i.variables=n),i}function Jr(e){return function(t,n){if(Pt(t)||Pt(n))throw __DEV__?new s("Cannot automatically merge arrays"):new s(4);if(U(t)&&U(n)){var i=e.getFieldValue(t,"__typename"),o=e.getFieldValue(n,"__typename");if(i&&o&&i!==o)return n;if(K(t)&&Rt(n))return e.merge(t.__ref,n),t;if(Rt(t)&&K(n))return e.merge(t,n.__ref),n;if(Rt(t)&&Rt(n))return(0,r.pi)((0,r.pi)({},t),n)}return n}}function $r(e,t,n){var i="".concat(t).concat(n),o=e.flavors.get(i);return o||e.flavors.set(i,o=e.clientOnly===t&&e.deferred===n?e:(0,r.pi)((0,r.pi)({},e),{clientOnly:t,deferred:n})),o}var Hr=function(){function e(e,t){this.cache=e,this.reader=t}return e.prototype.writeToStore=function(e,t){var n=this,i=t.query,o=t.result,a=t.dataId,u=t.variables,l=t.overwrite,f=oe(i),p=new Ot;u=(0,r.pi)((0,r.pi)({},le(f)),u);var h={store:e,written:Object.create(null),merge:function(e,t){return p.merge(e,t)},variables:u,varString:jt(u),fragmentMap:W(se(i)),overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map},d=this.processSelectionSet({result:o||Object.create(null),dataId:a,selectionSet:f.selectionSet,mergeTree:{map:new Map},context:h});if(!K(d))throw __DEV__?new s("Could not identify object ".concat(JSON.stringify(o))):new s(6);return h.incomingById.forEach((function(t,r){var i=t.storeObject,o=t.mergeTree,a=t.fieldNodeSet,s=z(r);if(o&&o.map.size){var u=n.applyMerges(o,s,i,h);if(K(u))return;i=u}if(__DEV__&&!h.overwrite){var l=Object.create(null);a.forEach((function(e){e.selectionSet&&(l[e.name.value]=!0)})),Object.keys(i).forEach((function(e){(function(e){return!0===l[It(e)]})(e)&&!function(e){var t=o&&o.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"==typeof t&&t},o=i(e);if(o){var a=i(t);if(a&&!K(o)&&!nt(o,a)&&!Object.keys(o).every((function(e){return void 0!==r.getFieldValue(a,e)}))){var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),u=It(n),l="".concat(s,".").concat(u);if(!ri.has(l)){ri.add(l);var f=[];Pt(o)||Pt(a)||[o,a].forEach((function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||f.includes(t)||f.push(t)})),__DEV__&&c.warn("Cache data may be lost when replacing the ".concat(u," field of a ").concat(s," object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(f.length?"either ensure all objects of type "+f.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(l," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(o).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(a).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}}}}(s,i,e,h.store)}))}e.merge(r,i)})),e.retain(d.__ref),d},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,i=e.result,o=e.selectionSet,a=e.context,s=e.mergeTree,u=this.cache.policies,l=Object.create(null),f=n&&u.rootTypenamesById[n]||te(i,o,a.fragmentMap)||n&&a.store.get(n,"__typename");"string"==typeof f&&(l.__typename=f);var p=function(){var e=Yr(arguments,l,a.variables);if(K(e.from)){var t=a.incomingById.get(e.from.__ref);if(t){var n=u.readField((0,r.pi)((0,r.pi)({},e),{from:t.storeObject}),a);if(void 0!==n)return n}}return u.readField(e,a)},h=new Set;this.flattenFields(o,i,a,f).forEach((function(e,n){var r,o=ee(n),a=i[o];if(h.add(n),void 0!==a){var d=u.getStoreFieldName({typename:f,fieldName:n.name.value,field:n,variables:e.variables}),y=Xr(s,d),v=t.processFieldValue(a,n,n.selectionSet?$r(e,!1,!1):e,y),m=void 0;n.selectionSet&&(K(v)||Rt(v))&&(m=p("__typename",v));var b=u.getMergeFunction(f,n.name.value,m);b?y.info={field:n,typename:f,merge:b}:ni(s,d),l=e.merge(l,((r={})[d]=v,r))}else!__DEV__||e.clientOnly||e.deferred||zt.added(n)||u.getReadFunction(f,n.name.value)||__DEV__&&c.error("Missing field '".concat(ee(n),"' while writing result ").concat(JSON.stringify(i,null,2)).substring(0,1e3))}));try{var d=u.identify(i,{typename:f,selectionSet:o,fragmentMap:a.fragmentMap,storeObject:l,readField:p}),y=d[0],v=d[1];n=n||y,v&&(l=a.merge(l,v))}catch(e){if(!n)throw e}if("string"==typeof n){var m=z(n),b=a.written[n]||(a.written[n]=[]);if(b.indexOf(o)>=0)return m;if(b.push(o),this.reader&&this.reader.isFresh(i,m,o,a))return m;var g=a.incomingById.get(n);return g?(g.storeObject=a.merge(g.storeObject,l),g.mergeTree=ei(g.mergeTree,s),h.forEach((function(e){return g.fieldNodeSet.add(e)}))):a.incomingById.set(n,{storeObject:l,mergeTree:ti(s)?void 0:s,fieldNodeSet:h}),m}return l},e.prototype.processFieldValue=function(e,t,n,r){var i=this;return t.selectionSet&&null!==e?Pt(e)?e.map((function(e,o){var a=i.processFieldValue(e,t,n,Xr(r,o));return ni(r,o),a})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?un(e):e},e.prototype.flattenFields=function(e,t,n,r){void 0===r&&(r=te(t,e,n.fragmentMap));var i=new Map,o=this.cache.policies,a=new pt(!1);return function e(s,c){var u=a.lookup(s,c.clientOnly,c.deferred);u.visited||(u.visited=!0,s.selections.forEach((function(a){if(vt(a,n.variables)){var s=c.clientOnly,u=c.deferred;if(s&&u||!nn(a.directives)||a.directives.forEach((function(e){var t=e.name.value;if("client"===t&&(s=!0),"defer"===t){var r=X(e,n.variables);r&&!1===r.if||(u=!0)}})),ne(a)){var l=i.get(a);l&&(s=s&&l.clientOnly,u=u&&l.deferred),i.set(a,$r(n,s,u))}else{var f=G(a,n.fragmentMap);f&&o.fragmentMatches(f,r,t,n.variables)&&e(f.selectionSet,$r(n,s,u))}}})))}(e,n),i},e.prototype.applyMerges=function(e,t,n,i,o){var a,s=this;if(e.map.size&&!K(n)){var u,l=Pt(n)||!K(t)&&!Rt(t)?void 0:t,f=n;l&&!o&&(o=[K(l)?l.__ref:l]);var p=function(e,t){return Pt(e)?"number"==typeof t?e[t]:void 0:i.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var n=p(l,t),r=p(f,t);if(void 0!==r){o&&o.push(t);var a=s.applyMerges(e,n,r,i,o);a!==r&&(u=u||new Map).set(t,a),o&&c(o.pop()===t)}})),u&&(n=Pt(f)?f.slice(0):(0,r.pi)({},f),u.forEach((function(e,t){n[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,i,o&&(a=i.store).getStorage.apply(a,o)):n},e}(),Zr=[];function Xr(e,t){var n=e.map;return n.has(t)||n.set(t,Zr.pop()||{map:new Map}),n.get(t)}function ei(e,t){if(e===t||!t||ti(t))return e;if(!e||ti(e))return t;var n=e.info&&t.info?(0,r.pi)((0,r.pi)({},e.info),t.info):e.info||t.info,i=e.map.size&&t.map.size,o={info:n,map:i?new Map:e.map.size?e.map:t.map};if(i){var a=new Set(t.map.keys());e.map.forEach((function(e,n){o.map.set(n,ei(e,t.map.get(n))),a.delete(n)})),a.forEach((function(n){o.map.set(n,ei(t.map.get(n),e.map.get(n)))}))}return o}function ti(e){return!e||!(e.info||e.map.size)}function ni(e,t){var n=e.map,r=n.get(t);r&&ti(r)&&(Zr.push(r),n.delete(t))}var ri=new Set,ii=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=tr,n.txCount=0,n.config=function(e){return me(Tt,e)}(t),n.addTypename=!!n.config.addTypename,n.policies=new zr({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return(0,r.ZT)(t,e),t.prototype.init=function(){var e=this.data=new wr.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader;this.storeWriter=new Hr(this,this.storeReader=new Nr({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:Dt(this.config),canon:e?void 0:n&&n.canon})),this.maybeBroadcastWatch=$n((function(e,n){return t.broadcastWatch(e,n)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(xr(n)){var r=e.optimistic,i=e.rootId,o=e.variables;return n.makeCacheKey(e.query,e.callback,jt({optimistic:r,rootId:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,n=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,r.pi)((0,r.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(e){if(e instanceof vr)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(kt.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,r.pi)((0,r.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||function(e){Xn(e).vars.forEach((function(t){return t.attachCache(e)}))}(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&er(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){jt.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(K(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){__DEV__&&c.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(kt.call(e,"id"))return!1;e=(0,r.pi)((0,r.pi)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),jt.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),er(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,n=this,i=e.update,o=e.optimistic,a=void 0===o||o,s=e.removeOptimistic,c=e.onWatchUpdated,u=function(e){var r=n,o=r.data,a=r.optimisticData;++n.txCount,e&&(n.data=n.optimisticData=e);try{return t=i(n)}finally{--n.txCount,n.data=o,n.optimisticData=a}},l=new Set;return c&&!this.txCount&&this.broadcastWatches((0,r.pi)((0,r.pi)({},e),{onWatchUpdated:function(e){return l.add(e),!1}})),"string"==typeof a?this.optimisticData=this.optimisticData.addLayer(a,u):!1===a?u(this.data):u(),"string"==typeof s&&(this.optimisticData=this.optimisticData.removeLayer(s)),c&&l.size?(this.broadcastWatches((0,r.pi)((0,r.pi)({},e),{onWatchUpdated:function(e,t){var n=c.call(this,e,t);return!1!==n&&l.delete(e),n}})),l.size&&l.forEach((function(e){return n.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=zt(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(n){return t.maybeBroadcastWatch(n,e)}))},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,r,n))||n&&nt(n.result,r.result)||e.callback(e.lastDiff=r,n)},t}(yr),oi=ye.empty,ai=ye.from,si=ye.split,ci=ye.concat;function ui(e){var t=!1;return new Promise((function(n,r){e.subscribe({next:function(e){t?__DEV__&&c.warn("Promise Wrapper does not support multiple results from Observable"):(t=!0,n(e))},error:r})}))}function li(e){return new V((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}var fi=n(642);p(m?"log":"silent");var pi=n(294),hi=yt?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function di(){var e=pi.createContext[hi];return e||(Object.defineProperty(pi.createContext,hi,{value:e=pi.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}var yi,vi=function(e){var t=e.client,n=e.children,r=di();return pi.createElement(r.Consumer,null,(function(e){return void 0===e&&(e={}),t&&e.client!==t&&(e=Object.assign({},e,{client:t})),__DEV__?c(e.client,'ApolloProvider was not passed a client instance. Make sure you pass in your client via the "client" prop.'):c(e.client,26),pi.createElement(r.Provider,{value:e},n)}))},mi=function(e){var t=di();return pi.createElement(t.Consumer,null,(function(t){return __DEV__?c(t&&t.client,'Could not find "client" in the context of ApolloConsumer. Wrap the root component in an <ApolloProvider>.'):c(t&&t.client,25),e.children(t.client)}))};function bi(e){var t=(0,pi.useContext)(di()),n=e||t.client;return __DEV__?c(!!n,'Could not find "client" in the context or passed in as an option. Wrap the root component in an <ApolloProvider>, or pass an ApolloClient instance in via options.'):c(!!n,29),n}!function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(yi||(yi={}));var gi=new Map;function _i(e){var t;switch(e){case yi.Query:t="Query";break;case yi.Mutation:t="Mutation";break;case yi.Subscription:t="Subscription"}return t}function wi(e){var t,n,r=gi.get(e);if(r)return r;__DEV__?c(!!e&&!!e.kind,"Argument of ".concat(e," passed to parser was not a valid GraphQL ")+"DocumentNode. You may need to use 'graphql-tag' or another method to convert your operation into a document"):c(!!e&&!!e.kind,30);var i=e.definitions.filter((function(e){return"FragmentDefinition"===e.kind})),o=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"query"===e.operation})),a=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation})),s=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"subscription"===e.operation}));__DEV__?c(!i.length||o.length||a.length||s.length,"Passing only a fragment to 'graphql' is not yet supported. You must include a query, subscription or mutation as well"):c(!i.length||o.length||a.length||s.length,31),__DEV__?c(o.length+a.length+s.length<=1,"react-apollo only supports a query, subscription, or a mutation per HOC. "+"".concat(e," had ").concat(o.length," queries, ").concat(s.length," ")+"subscriptions and ".concat(a.length," mutations. ")+"You can use 'compose' to join multiple operation types to a component"):c(o.length+a.length+s.length<=1,32),n=o.length?yi.Query:yi.Mutation,o.length||a.length||(n=yi.Subscription);var u=o.length?o:a.length?a:s;__DEV__?c(1===u.length,"react-apollo only supports one definition per HOC. ".concat(e," had ")+"".concat(u.length," definitions. ")+"You can use 'compose' to join multiple operation types to a component"):c(1===u.length,33);var l=u[0];t=l.variableDefinitions||[];var f={name:l.name&&"Name"===l.name.kind?l.name.value:"data",type:n,variables:t};return gi.set(e,f),f}function Ei(e,t){var n=wi(e),r=_i(t),i=_i(n.type);__DEV__?c(n.type===t,"Running a ".concat(r," requires a graphql ")+"".concat(r,", but a ").concat(i," was used instead.")):c(n.type===t,34)}function Oi(e,t){var n,i=(0,pi.useContext)(di()),o=bi(null==t?void 0:t.client),a=o.defaultOptions.watchQuery;Ei(e,yi.Query);var s,c=(0,pi.useState)((function(){var n=ki(e,t,a),r=null;return i.renderPromises&&(r=i.renderPromises.getSSRObservable(n)),r||(r=o.watchQuery(n),i.renderPromises&&i.renderPromises.registerSSRObservable(r,n)),i.renderPromises&&!1!==(null==t?void 0:t.ssr)&&!(null==t?void 0:t.skip)&&r.getCurrentResult().loading&&i.renderPromises.addQueryPromise({getOptions:function(){return ki(e,t,a)},fetchData:function(){return new Promise((function(e){var t=r.subscribe({next:function(n){n.loading||(e(),t.unsubscribe())},error:function(){e(),t.unsubscribe()},complete:function(){e()}})}))}},(function(){return null})),r})),u=c[0],l=c[1],f=(0,pi.useState)((function(){var e,n,r=u.getCurrentResult();return!r.loading&&t&&(r.error?null===(e=t.onError)||void 0===e||e.call(t,r.error):r.data&&(null===(n=t.onCompleted)||void 0===n||n.call(t,r.data))),r})),p=f[0],h=f[1],d=(0,pi.useRef)({client:o,query:e,options:t,result:p,previousData:void 0,watchQueryOptions:ki(e,t,a)});(0,pi.useEffect)((function(){var n,r,i,s=ki(e,t,a);if(d.current.client===o&&nt(d.current.query,e))nt(d.current.watchQueryOptions,s)||(u.setOptions(s).catch((function(){})),i=u.getCurrentResult(),d.current.watchQueryOptions=s);else{var c=o.watchQuery(s);l(c),i=c.getCurrentResult()}if(i){var f=d.current.result;f.data&&(d.current.previousData=f.data),h(d.current.result=i),!i.loading&&t&&(i.error?null===(n=t.onError)||void 0===n||n.call(t,i.error):i.data&&(null===(r=t.onCompleted)||void 0===r||r.call(t,i.data)))}Object.assign(d.current,{client:o,query:e})}),[u,o,e,t]),(0,pi.useEffect)((function(){if(!i.renderPromises){var e=u.subscribe(t,(function n(r){var i,o,a=u.last;e.unsubscribe();try{u.resetLastResults(),e=u.subscribe(t,n)}finally{u.last=a}if(!r.hasOwnProperty("graphQLErrors"))throw r;var s=d.current.result;(s&&s.loading||!nt(r,s.error))&&(h(d.current.result={data:s.data,error:r,loading:!1,networkStatus:on.error}),null===(o=null===(i=d.current.options)||void 0===i?void 0:i.onError)||void 0===o||o.call(i,r))}));return function(){return e.unsubscribe()}}function t(){var e,t,n=d.current.result,r=u.getCurrentResult();n&&n.loading===r.loading&&n.networkStatus===r.networkStatus&&nt(n.data,r.data)||(n.data&&(d.current.previousData=n.data),h(d.current.result=r),r.loading||null===(t=null===(e=d.current.options)||void 0===e?void 0:e.onCompleted)||void 0===t||t.call(e,r.data))}}),[u,i.renderPromises,o.disableNetworkFetches]),s=(n=p).partial,p=(0,r._T)(n,["partial"]),!s||!(null==t?void 0:t.partialRefetch)||p.loading||p.data&&0!==Object.keys(p.data).length||"cache-only"===u.options.fetchPolicy||(p=(0,r.pi)((0,r.pi)({},p),{loading:!0,networkStatus:on.refetch}),u.refetch()),i.renderPromises&&!1!==(null==t?void 0:t.ssr)&&!(null==t?void 0:t.skip)&&p.loading&&u.setOptions(ki(e,t,a)).catch((function(){})),Object.assign(d.current,{options:t}),(i.renderPromises||o.disableNetworkFetches)&&!1===(null==t?void 0:t.ssr)?p=d.current.result={loading:!0,data:void 0,error:void 0,networkStatus:on.loading}:((null==t?void 0:t.skip)||"standby"===(null==t?void 0:t.fetchPolicy))&&(p={loading:!1,data:void 0,error:void 0,networkStatus:on.ready}),p.errors&&p.errors.length&&(p=(0,r.pi)((0,r.pi)({},p),{error:p.error||new an({graphQLErrors:p.errors})}));var y=(0,pi.useMemo)((function(){return{refetch:u.refetch.bind(u),fetchMore:u.fetchMore.bind(u),updateQuery:u.updateQuery.bind(u),startPolling:u.startPolling.bind(u),stopPolling:u.stopPolling.bind(u),subscribeToMore:u.subscribeToMore.bind(u)}}),[u]);return(0,r.pi)((0,r.pi)((0,r.pi)({},y),{variables:ki(e,t,a).variables,client:o,called:!0,previousData:d.current.previousData}),p)}function ki(e,t,n){var i;void 0===t&&(t={});var o=t.skip,a=(t.ssr,t.onCompleted,t.onError,t.displayName,(0,r._T)(t,["skip","ssr","onCompleted","onError","displayName"])),s=(0,r.pi)({query:e},a);return n&&(s=pr(n,s)),o?s.fetchPolicy="standby":(!(null===(i=s.context)||void 0===i?void 0:i.renderPromises)||"network-only"!==s.fetchPolicy&&"cache-and-network"!==s.fetchPolicy)&&s.fetchPolicy||(s.fetchPolicy="cache-first"),s.variables||(s.variables={}),s}var Si=["refetch","fetchMore","updateQuery","startPolling","subscribeToMore"];function Ti(e,t){var n=(0,pi.useState)({called:!1}),i=n[0],o=n[1],a=Oi(e,(0,r.pi)((0,r.pi)((0,r.pi)({},t),i.options),{fetchPolicy:i.called?null==t?void 0:t.fetchPolicy:"standby",skip:void 0}));i.called||(a=(0,r.pi)((0,r.pi)({},a),{loading:!1,data:void 0,error:void 0,called:!1}));var s=(0,pi.useMemo)((function(){for(var e={},t=function(t){var n=a[t];e[t]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o((function(e){return(0,r.pi)((0,r.pi)({},e),{called:!0})})),n.apply(void 0,e)}},n=0,i=Si;n<i.length;n++)t(i[n]);return e}),[]);return a.error=a.error||void 0,Object.assign(a,s),[(0,pi.useCallback)((function(e){o({called:!0,options:e});var t=a.refetch(null==e?void 0:e.variables).then((function(e){var t=(0,r.pi)((0,r.pi)({},a),{data:e.data,error:e.error,called:!0,loading:!1});return Object.assign(t,s),t}));return t.catch((function(){})),t}),[]),a]}function Di(e,t){var n=bi(null==t?void 0:t.client);Ei(e,yi.Mutation);var i=(0,pi.useState)({called:!1,loading:!1,client:n}),o=i[0],a=i[1],s=(0,pi.useRef)({result:o,mutationId:0,isMounted:!0,client:n,mutation:e,options:t});Object.assign(s.current,{client:n,options:t,mutation:e});var c=(0,pi.useCallback)((function(e){void 0===e&&(e={});var t=s.current,n=t.client,i=t.options,o=t.mutation,c=(0,r.pi)((0,r.pi)({},i),{mutation:o});s.current.result.loading||c.ignoreResults||a(s.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:n});var u=++s.current.mutationId,l=pr(c,e);return n.mutate(l).then((function(t){var r,i,o=t.data,f=t.errors,p=f&&f.length>0?new an({graphQLErrors:f}):void 0;if(u===s.current.mutationId&&!l.ignoreResults){var h={called:!0,loading:!1,data:o,error:p,client:n};s.current.isMounted&&!nt(s.current.result,h)&&a(s.current.result=h)}return null===(r=c.onCompleted)||void 0===r||r.call(c,t.data),null===(i=e.onCompleted)||void 0===i||i.call(e,t.data),t})).catch((function(t){var r,i;if(u===s.current.mutationId&&s.current.isMounted){var o={loading:!1,error:t,data:void 0,called:!0,client:n};nt(s.current.result,o)||a(s.current.result=o)}if(c.onError||l.onError)return null===(r=c.onError)||void 0===r||r.call(c,t),null===(i=e.onError)||void 0===i||i.call(e,t),{data:void 0,errors:t};throw t}))}),[]),u=(0,pi.useCallback)((function(){a({called:!1,loading:!1,client:n})}),[]);return(0,pi.useEffect)((function(){return function(){s.current.isMounted=!1}}),[]),[c,(0,r.pi)({reset:u},o)]}function xi(e,t){var n=bi(null==t?void 0:t.client);Ei(e,yi.Subscription);var r=(0,pi.useState)({loading:!(null==t?void 0:t.skip),error:void 0,data:void 0,variables:null==t?void 0:t.variables}),i=r[0],o=r[1],a=(0,pi.useState)((function(){return(null==t?void 0:t.skip)?null:n.subscribe({query:e,variables:null==t?void 0:t.variables,fetchPolicy:null==t?void 0:t.fetchPolicy,context:null==t?void 0:t.context})})),s=a[0],c=a[1],u=(0,pi.useRef)({client:n,subscription:e,options:t});return(0,pi.useEffect)((function(){var r,i,a,s,l=null==t?void 0:t.shouldResubscribe;"function"==typeof l&&(l=!!l(t)),(null==t?void 0:t.skip)?!(null==t?void 0:t.skip)!=!(null===(r=u.current.options)||void 0===r?void 0:r.skip)&&(o({loading:!1,data:void 0,error:void 0,variables:null==t?void 0:t.variables}),c(null)):!1===l||n===u.current.client&&e===u.current.subscription&&(null==t?void 0:t.fetchPolicy)===(null===(i=u.current.options)||void 0===i?void 0:i.fetchPolicy)&&!(null==t?void 0:t.skip)==!(null===(a=u.current.options)||void 0===a?void 0:a.skip)&&nt(null==t?void 0:t.variables,null===(s=u.current.options)||void 0===s?void 0:s.variables)||(o({loading:!0,data:void 0,error:void 0,variables:null==t?void 0:t.variables}),c(n.subscribe({query:e,variables:null==t?void 0:t.variables,fetchPolicy:null==t?void 0:t.fetchPolicy,context:null==t?void 0:t.context}))),Object.assign(u.current,{client:n,subscription:e,options:t})}),[n,e,t]),(0,pi.useEffect)((function(){if(s){var e=s.subscribe({next:function(e){var r,i,a={loading:!1,data:e.data,error:void 0,variables:null==t?void 0:t.variables};o(a),null===(i=null===(r=u.current.options)||void 0===r?void 0:r.onSubscriptionData)||void 0===i||i.call(r,{client:n,subscriptionData:a})},error:function(e){o({loading:!1,data:void 0,error:e,variables:null==t?void 0:t.variables})},complete:function(){var e,t;null===(t=null===(e=u.current.options)||void 0===e?void 0:e.onSubscriptionComplete)||void 0===t||t.call(e)}});return function(){e.unsubscribe()}}}),[s]),i}function Ii(e){var t=e(),n=(0,pi.useState)(t)[1];return(0,pi.useEffect)((function(){var r=e();if(t===r)return e.onNextChange(n);n(r)}),[t]),t}},821:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(695);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},i(e)}function o(e){return a(e,[])}function a(e,t){switch(i(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 n=[].concat(t,[e]),i=function(e){var t=e[String(r.Z)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==i){var o=i.call(e);if(o!==e)return"string"==typeof o?o:a(o,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],o=0;o<n;++o)i.push(a(e[o],t));return 1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map((function(n){return n+": "+a(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},695:(e,t,n)=>{n.d(t,{Z:()=>r});const r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0},217:(e,t,n)=>{n.d(t,{Ye:()=>o,WU:()=>a,UG:()=>s});var r=n(695);function i(e){var t=e.prototype.toJSON;"function"==typeof t||function(e,t){if(!Boolean(0))throw new Error("Unexpected invariant triggered.")}(),e.prototype.inspect=t,r.Z&&(e.prototype[r.Z]=t)}var o=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();i(o);var a=function(){function e(e,t,n,r,i,o,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function s(e){return null!=e&&"string"==typeof e.kind}i(a)},392:(e,t,n)=>{function r(e){var t=e.split(/\r\n|[\n\r]/g),n=function(e){for(var t,n=!0,r=!0,i=0,o=null,a=0;a<e.length;++a)switch(e.charCodeAt(a)){case 13:10===e.charCodeAt(a+1)&&++a;case 10:n=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(null===o||i<o)&&(o=i),r=!1}return null!==(t=o)&&void 0!==t?t:0}(e);if(0!==n)for(var r=1;r<t.length;r++)t[r]=t[r].slice(n);for(var o=0;o<t.length&&i(t[o]);)++o;for(var a=t.length;a>o&&i(t[a-1]);)--a;return t.slice(o,a).join("\n")}function i(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a="\\"===e[e.length-1],s=!r||o||a||n,c="";return!s||r&&i||(c+="\n"+t),c+=t?e.replace(/\n/g,"\n"+t):e,s&&(c+="\n"),'"""'+c.replace(/"""/g,'\\"""')+'"""'}n.d(t,{W7:()=>r,LZ:()=>o})},143:(e,t,n)=>{n.d(t,{H:()=>s,T:()=>c});var r=n(763),i=n(821);function o(e,t){if(!Boolean(e))throw new Error(t)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||o(0,"Body must be a string. Received: ".concat((0,i.Z)(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||o(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||o(0,"column in locationOffset is 1-indexed and must be positive.")}var t,n;return t=e,(n=[{key:r.YF,get:function(){return"Source"}}])&&a(t.prototype,n),e}();function c(e){return e instanceof s}},763:(e,t,n)=>{n.d(t,{YF:()=>r}),"function"==typeof Symbol&&null!=Symbol.iterator&&Symbol.iterator,"function"==typeof Symbol&&null!=Symbol.asyncIterator&&Symbol.asyncIterator;var r="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag"},36:e=>{e.exports=JSON.parse('{"schema":"https://1d-coordinates.rcsb.org/graphql","documents":"src/RcsbGraphQL/Queries/Borrego/*.graphql","interfaceOutputFile":"src/RcsbGraphQL/Types/Borrego/GqlTypes.ts"}')},518:e=>{e.exports=JSON.parse('{"schema":"https://data.rcsb.org/graphql","documents":"src/RcsbGraphQL/Queries/Yosemite/*.graphql","interfaceOutputFile":"src/RcsbGraphQL/Types/Yosemite/GqlTypes.ts","pluginFile":[{"pluginFile":"src/RcsbGraphQL/Plugins/fullpath_schema_keys.js","outputFile":"src/RcsbGraphQL/Types/Yosemite/CorePaths.ts"},{"pluginFile":"src/RcsbGraphQL/Plugins/enumerate_schema_keys.js","outputFile":"src/RcsbGraphQL/Types/Yosemite/CoreConstants.ts"}]}')}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{const e=n(471);self.onmessage=function(t){const n=t.data;(new e.RcsbClient).requestAlignment(n).then((e=>{postMessage(e)}))}})()})();
|
|
3
3
|
//# sourceMappingURL=worker.js.map
|