@saasquatch/vanilla-components 1.2.4-5 → 1.2.4-8
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/dist/cjs/{WidgetHost-71b013eb.js → WidgetHost-f349e877.js} +157 -0
- package/dist/cjs/{en-a49a5ef5.js → en-3a7cb52e.js} +2 -2
- package/dist/cjs/{index-deb40352.js → index-09a04159.js} +54 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/sqh-close-button.cjs.entry.js +2 -2
- package/dist/cjs/{sqh-copy-button_12.cjs.entry.js → sqh-copy-button_14.cjs.entry.js} +1172 -22
- package/dist/cjs/sqh-referral-code.cjs.entry.js +2 -2
- package/dist/cjs/sqh-rewards-actions.cjs.entry.js +1 -1
- package/dist/cjs/widget-components.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/copy-button/copy-button.js +3 -3
- package/dist/collection/components/copy-link-button/copy-link-button.js +4 -1
- package/dist/collection/components/cta-component/cta-component.css +6 -0
- package/dist/collection/components/cta-component/cta-component.js +396 -0
- package/dist/collection/components/global-container/global-container.js +1 -1
- package/dist/collection/components/image-component/image-component.js +4 -1
- package/dist/collection/components/partner-stat-component/partner-stat-component.js +4 -1
- package/dist/collection/components/progress-indicator/progress-indicator.css +73 -0
- package/dist/collection/components/progress-indicator/progress-indicator.js +493 -0
- package/dist/collection/components/referral-list/referral-list.js +5 -2
- package/dist/collection/components/share-button-container/share-button-container.js +31 -44
- package/dist/collection/components/stat-component/stat-component.js +13 -7
- package/dist/collection/components/stats-container/stats-container.js +7 -5
- package/dist/collection/components/text-component/text-component.js +40 -16
- package/dist/collection/services/WidgetHost.js +157 -0
- package/dist/esm/{WidgetHost-9c337319.js → WidgetHost-c033b6ac.js} +157 -0
- package/dist/esm/{en-be593af0.js → en-a652ab83.js} +1 -1
- package/dist/esm/{index-8ea8b6d8.js → index-342d7c26.js} +54 -3
- package/dist/esm/loader.mjs +3 -3
- package/dist/esm/sqh-close-button.entry.js +2 -2
- package/dist/esm/{sqh-copy-button_12.entry.js → sqh-copy-button_14.entry.js} +1171 -23
- package/dist/esm/sqh-referral-code.entry.js +2 -2
- package/dist/esm/sqh-rewards-actions.entry.js +1 -1
- package/dist/esm/widget-components.mjs +3 -3
- package/dist/esm-es5/{WidgetHost-9c337319.js → WidgetHost-c033b6ac.js} +96 -4
- package/dist/esm-es5/{en-be593af0.js → en-a652ab83.js} +1 -1
- package/dist/esm-es5/{index-8ea8b6d8.js → index-342d7c26.js} +53 -3
- package/dist/esm-es5/loader.mjs +3 -3
- package/dist/esm-es5/sqh-close-button.entry.js +2 -2
- package/dist/esm-es5/{sqh-copy-button_12.entry.js → sqh-copy-button_14.entry.js} +1059 -34
- package/dist/esm-es5/sqh-referral-code.entry.js +2 -2
- package/dist/esm-es5/sqh-rewards-actions.entry.js +1 -1
- package/dist/esm-es5/widget-components.mjs +3 -3
- package/dist/types/components/copy-button/copy-button.d.ts +1 -3
- package/dist/types/components/copy-link-button/copy-link-button.d.ts +1 -2
- package/dist/types/components/cta-component/cta-component.d.ts +86 -0
- package/dist/types/components/global-container/global-container.d.ts +0 -2
- package/dist/types/components/image-component/image-component.d.ts +1 -2
- package/dist/types/components/partner-stat-component/partner-stat-component.d.ts +1 -2
- package/dist/types/components/progress-indicator/progress-indicator.d.ts +42 -0
- package/dist/types/components/referral-list/referral-list.d.ts +2 -3
- package/dist/types/components/share-button-container/share-button-container.d.ts +1 -56
- package/dist/types/components/stat-component/stat-component.d.ts +6 -10
- package/dist/types/components/stats-container/stats-container.d.ts +3 -4
- package/dist/types/components/text-component/text-component.d.ts +13 -20
- package/dist/types/components.d.ts +256 -120
- package/dist/types/saasquatch.d.ts +3 -1
- package/dist/types/services/WidgetHost.d.ts +5 -0
- package/dist/widget-components/p-0839fd2c.system.entry.js +10 -0
- package/dist/widget-components/{p-44a6559d.js → p-17d80384.js} +1 -1
- package/dist/widget-components/{p-54ea7a00.entry.js → p-3ba562d0.entry.js} +1 -1
- package/dist/widget-components/{p-366f1663.entry.js → p-4293e873.entry.js} +1 -1
- package/dist/widget-components/{p-8e232564.system.js → p-54e83dfb.system.js} +2 -2
- package/dist/widget-components/{p-e2b4739f.system.entry.js → p-665b8d42.system.entry.js} +1 -1
- package/dist/widget-components/{p-edd43dbc.js → p-6e753d23.js} +68 -3
- package/dist/widget-components/p-a952fcf2.entry.js +233 -0
- package/dist/widget-components/{p-a846f503.system.js → p-aaf44379.system.js} +1 -1
- package/dist/widget-components/{p-b17efca4.system.entry.js → p-abf8a511.system.entry.js} +1 -1
- package/dist/widget-components/p-ad5121cf.system.js +1 -0
- package/dist/widget-components/p-d9e9c55c.system.entry.js +1 -0
- package/dist/widget-components/{p-58be1132.system.js → p-e82def83.system.js} +1 -1
- package/dist/widget-components/{p-9746ae26.entry.js → p-fb528be6.entry.js} +1 -1
- package/dist/widget-components/p-fbf0c7fe.js +1 -0
- package/dist/widget-components/widget-components.esm.js +1 -1
- package/dist/widget-components/widget-components.js +1 -1
- package/docs/raisins.json +1 -1
- package/package.json +4 -3
- package/dist/widget-components/p-485eaf44.js +0 -1
- package/dist/widget-components/p-c8bc8c77.system.entry.js +0 -1
- package/dist/widget-components/p-d416634a.entry.js +0 -148
- package/dist/widget-components/p-d97c955d.system.entry.js +0 -8
- package/dist/widget-components/p-e61a8100.system.js +0 -1
|
@@ -12,7 +12,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)};function r(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var i=function(){return(i=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t}).apply(this,arguments)};function u(t,n,e,r){return new(e||(e=Promise))((function(i,u){function o(t){try{s(r.next(t))}catch(t){u(t)}}function a(t){try{s(r.throw(t))}catch(t){u(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(o,a)}s((r=r.apply(t,n||[])).next())}))}function o(t,n){var e,r,i,u,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return u={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(u){return function(a){return function(u){if(e)throw new TypeError("Generator is already executing.");for(;o;)try{if(e=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=n.call(t,o)}catch(t){u=[6,t],r=0}finally{e=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}}function a(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var r=Array(t),i=0;for(n=0;n<e;n++)for(var u=arguments[n],o=0,a=u.length;o<a;o++,i++)r[i]=u[o];return r}var s=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;n.default=e}));n(s);var c=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){return function t(n,e){switch(i(n)){case"string":return JSON.stringify(n);case"function":return n.name?"[function ".concat(n.name,"]"):"[function]";case"object":return null===n?"null":function(n,e){if(-1!==e.indexOf(n))return"[Circular]";var i=[].concat(e,[n]),u=function(t){var n=t[String(r.default)];return"function"==typeof n?n:"function"==typeof t.inspect?t.inspect:void 0}(n);if(void 0!==u){var o=u.call(n);if(o!==n)return"string"==typeof o?o:t(o,i)}else if(Array.isArray(n))return function(n,e){if(0===n.length)return"[]";if(e.length>2)return"[Array]";for(var r=Math.min(10,n.length),i=n.length-r,u=[],o=0;o<r;++o)u.push(t(n[o],e));return 1===i?u.push("... 1 more item"):i>1&&u.push("... ".concat(i," more items")),"["+u.join(", ")+"]"}(n,i);return function(n,e){var r=Object.keys(n);return 0===r.length?"{}":e.length>2?"["+function(t){var n=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if("Object"===n&&"function"==typeof t.constructor){var e=t.constructor.name;if("string"==typeof e&&""!==e)return e}return n}(n)+"]":"{ "+r.map((function(r){return r+": "+t(n[r],e)})).join(", ")+" }"}(n,i)}(n,e);default:return String(n)}}(t,[])};var e,r=(e=s)&&e.__esModule?e:{default:e};function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}}));n(c);var f=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.visit=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,s=void 0,c=Array.isArray(t),f=[t],h=-1,l=[],d=void 0,v=void 0,m=void 0,p=[],y=[],I=t;do{var g=++h===f.length,b=g&&0!==l.length;if(g){if(v=0===y.length?void 0:p[p.length-1],d=m,m=y.pop(),b){if(c)d=d.slice();else{for(var w={},E=0,O=Object.keys(d);E<O.length;E++){var S=O[E];w[S]=d[S]}d=w}for(var N=0,T=0;T<l.length;T++){var _=l[T][0],k=l[T][1];c&&(_-=N),c&&null===k?(d.splice(_,1),N++):d[_]=k}}h=s.index,f=s.keys,l=s.edits,c=s.inArray,s=s.prev}else{if(v=m?c?h:f[h]:void 0,null==(d=m?m[v]:I))continue;m&&p.push(v)}var D=void 0;if(!Array.isArray(d)){if(!o(d))throw new Error("Invalid AST Node: "+(0,r.default)(d));var A=a(n,d.kind,g);if(A){if((D=A.call(n,d,v,m,p,y))===u)break;if(!1===D){if(!g){p.pop();continue}}else if(void 0!==D&&(l.push([v,D]),!g)){if(!o(D)){p.pop();continue}d=D}}}void 0===D&&b&&l.push([v,d]),g?p.pop():(s={inArray:c,index:h,keys:f,edits:l,prev:s},f=(c=Array.isArray(d))?d:e[d.kind]||[],h=-1,l=[],m&&y.push(m),m=d)}while(void 0!==s);return 0!==l.length&&(I=l[l.length-1][1]),I},n.visitInParallel=function(t){var n=new Array(t.length);return{enter:function(e){for(var r=0;r<t.length;r++)if(!n[r]){var i=a(t[r],e.kind,!1);if(i){var o=i.apply(t[r],arguments);if(!1===o)n[r]=e;else if(o===u)n[r]=u;else if(void 0!==o)return o}}},leave:function(e){for(var r=0;r<t.length;r++)if(n[r])n[r]===e&&(n[r]=null);else{var i=a(t[r],e.kind,!0);if(i){var o=i.apply(t[r],arguments);if(o===u)n[r]=u;else if(void 0!==o&&!1!==o)return o}}}}},n.visitWithTypeInfo=function(t,n){return{enter:function(e){t.enter(e);var r=a(n,e.kind,!1);if(r){var i=r.apply(n,arguments);return void 0!==i&&(t.leave(e),o(i)&&t.enter(i)),i}},leave:function(e){var r,i=a(n,e.kind,!0);return i&&(r=i.apply(n,arguments)),t.leave(e),r}}},n.getVisitFn=a,n.BREAK=n.QueryDocumentKeys=void 0;var e,r=(e=c)&&e.__esModule?e:{default:e},i={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:["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","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","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};n.QueryDocumentKeys=i;var u=Object.freeze({});function o(t){return Boolean(t&&"string"==typeof t.kind)}function a(t,n,e){var r=t[n];if(r){if(!e&&"function"==typeof r)return r;var i=e?r.leave:r.enter;if("function"==typeof i)return i}else{var u=e?t.leave:t.enter;if(u){if("function"==typeof u)return u;var o=u[n];if("function"==typeof o)return o}}}n.BREAK=u}));n(f);var h=f.visit,l=f.BREAK,d=Object.setPrototypeOf,v=void 0===d?function(t,n){return t.__proto__=n,t}:d,m=function(t){function n(e){void 0===e&&(e="Invariant Violation");var r=t.call(this,"number"==typeof e?"Invariant Violation: "+e+" (see https://github.com/apollographql/invariant-packages)":e)||this;return r.framesToPop=1,r.name="Invariant Violation",v(r,n.prototype),r}return r(n,t),n}(Error);function p(t,n){if(!t)throw new m(n)}function y(t){return function(){return console[t].apply(console,arguments)}}!function(t){t.warn=y("warn"),t.error=y("error")}(p||(p={}));var I={env:{}};if("object"==typeof process)I=process;else try{Function("stub","process = stub")(I)}catch(t){}var g=Object.prototype,b=g.toString,w=g.hasOwnProperty,E=new Map;function O(t,n){try{return function t(n,e){if(n===e)return!0;var r=b.call(n);if(r!==b.call(e))return!1;switch(r){case"[object Array]":if(n.length!==e.length)return!1;case"[object Object]":if(S(n,e))return!0;var i=Object.keys(n),u=Object.keys(e),o=i.length;if(o!==u.length)return!1;for(var a=0;a<o;++a)if(!w.call(e,i[a]))return!1;for(a=0;a<o;++a){var s=i[a];if(!t(n[s],e[s]))return!1}return!0;case"[object Error]":return n.name===e.name&&n.message===e.message;case"[object Number]":if(n!=n)return e!=e;case"[object Boolean]":case"[object Date]":return+n==+e;case"[object RegExp]":case"[object String]":return n==""+e;case"[object Map]":case"[object Set]":if(n.size!==e.size)return!1;if(S(n,e))return!0;for(var c=n.entries(),f="[object Map]"===r;;){var h=c.next();if(h.done)break;var l=h.value,d=l[0],v=l[1];if(!e.has(d))return!1;if(f&&!t(v,e.get(d)))return!1}return!0}return!1}(t,n)}finally{E.clear()}}function S(t,n){var e=E.get(t);if(e){if(e.has(n))return!0}else E.set(t,e=new Set);return e.add(n),!1}function N(t,n,e,r){if(function(t){return"IntValue"===t.kind}(e)||function(t){return"FloatValue"===t.kind}(e))t[n.value]=Number(e.value);else if(function(t){return"BooleanValue"===t.kind}(e)||function(t){return"StringValue"===t.kind}(e))t[n.value]=e.value;else if(function(t){return"ObjectValue"===t.kind}(e)){var i={};e.fields.map((function(t){return N(i,t.name,t.value,r)})),t[n.value]=i}else if(function(t){return"Variable"===t.kind}(e))t[n.value]=(r||{})[e.name.value];else if(function(t){return"ListValue"===t.kind}(e))t[n.value]=e.values.map((function(t){var e={};return N(e,n,t,r),e[n.value]}));else if(function(t){return"EnumValue"===t.kind}(e))t[n.value]=e.value;else{if(!function(t){return"NullValue"===t.kind}(e))throw new m(17);t[n.value]=null}}var T=["connection","include","skip","client","rest","export"];function _(t,n,e){if(e&&e.connection&&e.connection.key){if(e.connection.filter&&e.connection.filter.length>0){var r=e.connection.filter?e.connection.filter:[];r.sort();var i=n,u={};return r.forEach((function(t){u[t]=i[t]})),e.connection.key+"("+JSON.stringify(u)+")"}return e.connection.key}var o=t;if(n){var a=function(t,n){n||(n={}),"function"==typeof n&&(n={cmp:n});var e,r="boolean"==typeof n.cycles&&n.cycles,i=n.cmp&&(e=n.cmp,function(t){return function(n,r){return e({key:n,value:t[n]},{key:r,value:t[r]})}}),u=[];return function t(n){if(n&&n.toJSON&&"function"==typeof n.toJSON&&(n=n.toJSON()),void 0!==n){if("number"==typeof n)return isFinite(n)?""+n:"null";if("object"!=typeof n)return JSON.stringify(n);var e,o;if(Array.isArray(n)){for(o="[",e=0;e<n.length;e++)e&&(o+=","),o+=t(n[e])||"null";return o+"]"}if(null===n)return"null";if(-1!==u.indexOf(n)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var a=u.push(n)-1,s=Object.keys(n).sort(i&&i(n));for(o="",e=0;e<s.length;e++){var c=s[e],f=t(n[c]);f&&(o&&(o+=","),o+=JSON.stringify(c)+":"+f)}return u.splice(a,1),"{"+o+"}"}}(t)}(n);o+="("+a+")"}return e&&Object.keys(e).forEach((function(t){-1===T.indexOf(t)&&(e[t]&&Object.keys(e[t]).length?o+="@"+t+"("+JSON.stringify(e[t])+")":o+="@"+t)})),o}function k(t,n){if(t.arguments&&t.arguments.length){var e={};return t.arguments.forEach((function(t){return N(e,t.name,t.value,n)})),e}return null}function D(t){return t.alias?t.alias.value:t.name.value}function A(t){return"Field"===t.kind}function C(t){return"InlineFragment"===t.kind}function R(t){return t&&"id"===t.type&&"boolean"==typeof t.generated}function j(t,n){return void 0===n&&(n=!1),i({type:"id",generated:n},"string"==typeof t?{id:t,typename:void 0}:t)}function M(t,n){if(t.directives&&t.directives.length){var e={};return t.directives.forEach((function(t){e[t.name.value]=k(t,n)})),e}return null}function $(t,n){return void 0===n&&(n={}),(e=t.directives,e?e.filter(V).map((function(t){var n=t.arguments;p(n&&1===n.length,14);var e=n[0];p(e.name&&"if"===e.name.value,15);var r=e.value;return p(r&&("Variable"===r.kind||"BooleanValue"===r.kind),16),{directive:t,ifArgument:e}})):[]).every((function(t){var e=t.directive,r=t.ifArgument,i=!1;return"Variable"===r.value.kind?p(void 0!==(i=n[r.value.name.value]),13):i=r.value.value,"skip"===e.name.value?!i:i}));var e}function x(t,n){return function(t){var n=[];return h(t,{Directive:function(t){n.push(t.name.value)}}),n}(n).some((function(n){return t.indexOf(n)>-1}))}function F(t){return t&&x(["client"],t)&&x(["export"],t)}function V(t){var n=t.name.value;return"skip"===n||"include"===n}function q(t,n){var e=n,r=[];return t.definitions.forEach((function(t){if("OperationDefinition"===t.kind)throw new m(11);"FragmentDefinition"===t.kind&&r.push(t)})),void 0===e&&(p(1===r.length,12),e=r[0].name.value),i(i({},t),{definitions:a([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:e}}]}}],t.definitions)})}function L(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return n.forEach((function(n){null!=n&&Object.keys(n).forEach((function(e){t[e]=n[e]}))})),t}function P(t){return p(t&&"Document"===t.kind,2),p(t.definitions.filter((function(t){return"FragmentDefinition"!==t.kind})).map((function(t){if("OperationDefinition"!==t.kind)throw new m(3);return t})).length<=1,4),t}function U(t){return P(t),t.definitions.filter((function(t){return"OperationDefinition"===t.kind}))[0]}function B(t){return t.definitions.filter((function(t){return"OperationDefinition"===t.kind&&t.name})).map((function(t){return t.name.value}))[0]||null}function G(t){return t.definitions.filter((function(t){return"FragmentDefinition"===t.kind}))}function Q(t){var n;P(t);for(var e=0,r=t.definitions;e<r.length;e++){var i=r[e];if("OperationDefinition"===i.kind){var u=i.operation;if("query"===u||"mutation"===u||"subscription"===u)return i}"FragmentDefinition"!==i.kind||n||(n=i)}if(n)return n;throw new m(10)}function J(t){void 0===t&&(t=[]);var n={};return t.forEach((function(t){n[t.name.value]=t})),n}function Y(t){if(t&&t.variableDefinitions&&t.variableDefinitions.length){var n=t.variableDefinitions.filter((function(t){return t.defaultValue})).map((function(t){var n={};return N(n,t.variable.name,t.defaultValue),n}));return L.apply(void 0,a([{}],n))}return{}}function K(t,n,e){var r=0;return t.forEach((function(e,i){n.call(this,e,i,t)&&(t[r++]=e)}),e),t.length=r,t}var W={kind:"Field",name:{kind:"Name",value:"__typename"}};function X(t){return function t(n,e){return n.selectionSet.selections.every((function(n){return"FragmentSpread"===n.kind&&t(e[n.name.value],e)}))}(U(t)||function(t){p("Document"===t.kind,7),p(t.definitions.length<=1,8);var n=t.definitions[0];return p("FragmentDefinition"===n.kind,9),n}(t),J(G(t)))?null:t}function H(t){return function(n){return t.some((function(t){return t.name&&t.name===n.name.value||t.test&&t.test(n)}))}}function z(t,n){var e=Object.create(null),r=[],u=Object.create(null),o=[],a=X(h(n,{Variable:{enter:function(t,n,r){"VariableDefinition"!==r.kind&&(e[t.name.value]=!0)}},Field:{enter:function(n){if(t&&n.directives&&t.some((function(t){return t.remove}))&&n.directives&&n.directives.some(H(t)))return n.arguments&&n.arguments.forEach((function(t){"Variable"===t.value.kind&&r.push({name:t.value.name.value})})),n.selectionSet&&function t(n){var e=[];return n.selections.forEach((function(n){(A(n)||C(n))&&n.selectionSet?t(n.selectionSet).forEach((function(t){return e.push(t)})):"FragmentSpread"===n.kind&&e.push(n)})),e}(n.selectionSet).forEach((function(t){o.push({name:t.name.value})})),null}},FragmentSpread:{enter:function(t){u[t.name.value]=!0}},Directive:{enter:function(n){if(H(t)(n))return null}}}));return a&&K(r,(function(t){return!e[t.name]})).length&&(a=function(t,n){var e=function(t){return function(n){return t.some((function(t){return n.value&&"Variable"===n.value.kind&&n.value.name&&(t.name===n.value.name.value||t.test&&t.test(n))}))}}(t);return X(h(n,{OperationDefinition:{enter:function(n){return i(i({},n),{variableDefinitions:n.variableDefinitions.filter((function(n){return!t.some((function(t){return t.name===n.variable.name.value}))}))})}},Field:{enter:function(n){if(t.some((function(t){return t.remove}))){var r=0;if(n.arguments.forEach((function(t){e(t)&&(r+=1)})),1===r)return null}}},Argument:{enter:function(t){if(e(t))return null}}}))}(r,a)),a&&K(o,(function(t){return!u[t.name]})).length&&(a=function(t,n){function e(n){if(t.some((function(t){return t.name===n.name.value})))return null}return X(h(n,{FragmentSpread:{enter:e},FragmentDefinition:{enter:e}}))}(o,a)),a}var Z={test:function(t){var n="connection"===t.name.value;return n&&(!t.arguments||t.arguments.some((function(t){return"key"===t.name.value}))),n}};function tt(t){return"query"===Q(t).operation?t:h(t,{OperationDefinition:{enter:function(t){return i(i({},t),{operation:"query"})}}})}var nt="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),et=Object.prototype.toString;function rt(t){try{return t()}catch(t){console.error&&console.error(t)}}function it(t){return t.errors&&t.errors.length}var ut=Object.prototype.hasOwnProperty;function ot(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return at(t)}function at(t){var n=t[0]||{},e=t.length;if(e>1){var r=[];n=ft(n,r);for(var i=1;i<e;++i)n=ct(n,t[i],r)}return n}function st(t){return null!==t&&"object"==typeof t}function ct(t,n,e){return st(n)&&st(t)?(Object.isExtensible&&!Object.isExtensible(t)&&(t=ft(t,e)),Object.keys(n).forEach((function(r){var i=n[r];if(ut.call(t,r)){var u=t[r];i!==u&&(t[r]=ct(ft(u,e),i,e))}else t[r]=i})),t):n}function ft(t,n){return null!==t&&"object"==typeof t&&n.indexOf(t)<0&&(t=Array.isArray(t)?t.slice(0):i({__proto__:Object.getPrototypeOf(t)},t),n.push(t)),t}var ht=t((function(t,n){function e(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function r(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,n,e){return n&&r(t.prototype,n),e&&r(t,e),t}Object.defineProperty(n,"__esModule",{value:!0}),n.Observable=void 0;var u=function(){return"function"==typeof Symbol},o=function(t){return u()&&Boolean(Symbol[t])},a=function(t){return o(t)?Symbol[t]:"@@"+t};u()&&!o("observable")&&(Symbol.observable=Symbol("observable"));var s=a("iterator"),c=a("observable"),f=a("species");function h(t,n){var e=t[n];if(null!=e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}}function l(t){var n=t.constructor;return void 0!==n&&null===(n=n[f])&&(n=void 0),void 0!==n?n:E}function d(t){return t instanceof E}function v(t){v.log?v.log(t):setTimeout((function(){throw t}))}function m(t){Promise.resolve().then((function(){try{t()}catch(t){v(t)}}))}function p(t){var n=t._cleanup;if(void 0!==n&&(t._cleanup=void 0,n))try{if("function"==typeof n)n();else{var e=h(n,"unsubscribe");e&&e.call(n)}}catch(t){v(t)}}function y(t){t._observer=void 0,t._queue=void 0,t._state="closed"}function I(t,n,e){t._state="running";var r=t._observer;try{var i=h(r,n);switch(n){case"next":i&&i.call(r,e);break;case"error":if(y(t),!i)throw e;i.call(r,e);break;case"complete":y(t),i&&i.call(r)}}catch(t){v(t)}"closed"===t._state?p(t):"running"===t._state&&(t._state="ready")}function g(t,n,e){if("closed"!==t._state){if("buffering"!==t._state)return"ready"!==t._state?(t._state="buffering",t._queue=[{type:n,value:e}],void m((function(){return function(t){var n=t._queue;if(n){t._queue=void 0,t._state="ready";for(var e=0;e<n.length&&(I(t,n[e].type,n[e].value),"closed"!==t._state);++e);}}(t)}))):void I(t,n,e);t._queue.push({type:n,value:e})}}var b=function(){function t(n,r){e(this,t),this._cleanup=void 0,this._observer=n,this._queue=void 0,this._state="initializing";var i=new w(this);try{this._cleanup=r.call(void 0,i)}catch(t){i.error(t)}"initializing"===this._state&&(this._state="ready")}return i(t,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(y(this),p(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),t}(),w=function(){function t(n){e(this,t),this._subscription=n}return i(t,[{key:"next",value:function(t){g(this._subscription,"next",t)}},{key:"error",value:function(t){g(this._subscription,"error",t)}},{key:"complete",value:function(){g(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),t}(),E=function(){function t(n){if(e(this,t),!(this instanceof t))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof n)throw new TypeError("Observable initializer must be a function");this._subscriber=n}return i(t,[{key:"subscribe",value:function(t){return"object"==typeof t&&null!==t||(t={next:t,error:arguments[1],complete:arguments[2]}),new b(t,this._subscriber)}},{key:"forEach",value:function(t){var n=this;return new Promise((function(e,r){if("function"==typeof t)var i=n.subscribe({next:function(n){try{t(n,u)}catch(t){r(t),i.unsubscribe()}},error:r,complete:e});else r(new TypeError(t+" is not a function"));function u(){i.unsubscribe(),e()}}))}},{key:"map",value:function(t){var n=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");return new(l(this))((function(e){return n.subscribe({next:function(n){try{n=t(n)}catch(t){return e.error(t)}e.next(n)},error:function(t){e.error(t)},complete:function(){e.complete()}})}))}},{key:"filter",value:function(t){var n=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");return new(l(this))((function(e){return n.subscribe({next:function(n){try{if(!t(n))return}catch(t){return e.error(t)}e.next(n)},error:function(t){e.error(t)},complete:function(){e.complete()}})}))}},{key:"reduce",value:function(t){var n=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");var e=l(this),r=arguments.length>1,i=!1,u=arguments[1],o=u;return new e((function(e){return n.subscribe({next:function(n){var u=!i;if(i=!0,!u||r)try{o=t(o,n)}catch(t){return e.error(t)}else o=n},error:function(t){e.error(t)},complete:function(){if(!i&&!r)return e.error(new TypeError("Cannot reduce an empty sequence"));e.next(o),e.complete()}})}))}},{key:"concat",value:function(){for(var t=this,n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];var i=l(this);return new i((function(n){var r,u=0;return function t(o){r=o.subscribe({next:function(t){n.next(t)},error:function(t){n.error(t)},complete:function(){u===e.length?(r=void 0,n.complete()):t(i.from(e[u++]))}})}(t),function(){r&&(r.unsubscribe(),r=void 0)}}))}},{key:"flatMap",value:function(t){var n=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");var e=l(this);return new e((function(r){var i=[],u=n.subscribe({next:function(n){if(t)try{n=t(n)}catch(t){return r.error(t)}var u=e.from(n).subscribe({next:function(t){r.next(t)},error:function(t){r.error(t)},complete:function(){var t=i.indexOf(u);t>=0&&i.splice(t,1),o()}});i.push(u)},error:function(t){r.error(t)},complete:function(){o()}});function o(){u.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(t){return t.unsubscribe()})),u.unsubscribe()}}))}},{key:c,value:function(){return this}}],[{key:"from",value:function(n){var e="function"==typeof this?this:t;if(null==n)throw new TypeError(n+" is not an object");var r=h(n,c);if(r){var i=r.call(n);if(Object(i)!==i)throw new TypeError(i+" is not an object");return d(i)&&i.constructor===e?i:new e((function(t){return i.subscribe(t)}))}if(o("iterator")&&(r=h(n,s)))return new e((function(t){m((function(){if(!t.closed){var e=!0,i=!1,u=void 0;try{for(var o,a=r.call(n)[Symbol.iterator]();!(e=(o=a.next()).done);e=!0)if(t.next(o.value),t.closed)return}catch(t){i=!0,u=t}finally{try{e||null==a.return||a.return()}finally{if(i)throw u}}t.complete()}}))}));if(Array.isArray(n))return new e((function(t){m((function(){if(!t.closed){for(var e=0;e<n.length;++e)if(t.next(n[e]),t.closed)return;t.complete()}}))}));throw new TypeError(n+" is not observable")}},{key:"of",value:function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];var i="function"==typeof this?this:t;return new i((function(t){m((function(){if(!t.closed){for(var n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}}))}))}},{key:f,get:function(){return this}}]),t}();n.Observable=E,u()&&Object.defineProperty(E,Symbol("extensions"),{value:{symbol:c,hostReportError:v},configurable:!0})}));n(ht);var lt,dt=ht.Observable;function vt(t){return t.request.length<=1}function mt(t){return new dt((function(n){n.error(t)}))}function pt(t,n){return n?n(t):dt.of()}function yt(t){return"function"==typeof t?new Et(t):t}function It(){return new Et((function(){return dt.of()}))}function gt(t){return 0===t.length?It():t.map(yt).reduce((function(t,n){return t.concat(n)}))}function bt(t,n,e){var r=yt(n),i=yt(e||new Et(pt));return vt(r)&&vt(i)?new Et((function(n){return t(n)?r.request(n)||dt.of():i.request(n)||dt.of()})):new Et((function(n,e){return t(n)?r.request(n,e)||dt.of():i.request(n,e)||dt.of()}))}r((function(t,n){var e=lt.call(this,t)||this;return e.link=n,e}),lt=Error);var wt=function(t,n){var e=yt(t);if(vt(e))return e;var r=yt(n);return vt(r)?new Et((function(t){return e.request(t,(function(t){return r.request(t)||dt.of()}))||dt.of()})):new Et((function(t,n){return e.request(t,(function(t){return r.request(t,n)||dt.of()}))||dt.of()}))},Et=function(){function t(t){t&&(this.request=t)}return t.prototype.split=function(n,e,r){return this.concat(bt(n,e,r||new t(pt)))},t.prototype.concat=function(t){return wt(this,t)},t.prototype.request=function(){throw new m(1)},t.empty=It,t.from=gt,t.split=bt,t.execute=Ot,t}();function Ot(t,n){return t.request(function(t,n){var e=i({},t);return Object.defineProperty(n,"setContext",{enumerable:!1,value:function(t){e=i({},e,"function"==typeof t?t(e):t)}}),Object.defineProperty(n,"getContext",{enumerable:!1,value:function(){return i({},e)}}),Object.defineProperty(n,"toKey",{enumerable:!1,value:function(){return function(t){return JSON.stringify([t.operationName,t.query,t.variables])}(n)}}),n}(n.context,function(t){var n={variables:t.variables||{},extensions:t.extensions||{},operationName:t.operationName,query:t.query};return n.operationName||(n.operationName="string"!=typeof n.query?B(n.query):""),n}(function(t){for(var n=["query","operationName","variables","extensions","context"],e=0,r=Object.keys(t);e<r.length;e++)if(n.indexOf(r[e])<0)throw new m(2);return t}(n))))||dt.of()}var St,Nt=function(){var t,n=("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()).Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}();function Tt(t){return t<7}!function(t){t[t.loading=1]="loading",t[t.setVariables=2]="setVariables",t[t.fetchMore=3]="fetchMore",t[t.refetch=4]="refetch",t[t.poll=6]="poll",t[t.ready=7]="ready",t[t.error=8]="error"}(St||(St={}));var _t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r(n,t),n.prototype[Nt]=function(){return this},n.prototype["@@observable"]=function(){return this},n}(dt);function kt(t){return Array.isArray(t)&&t.length>0}var Dt,At=function(t){function n(e){var r,i,u=e.graphQLErrors,o=e.networkError,a=e.errorMessage,s=e.extraInfo,c=t.call(this,a)||this;return c.graphQLErrors=u||[],c.networkError=o||null,c.message=a||(i="",kt((r=c).graphQLErrors)&&r.graphQLErrors.forEach((function(t){i+="GraphQL error: "+(t?t.message:"Error message not found.")+"\n"})),r.networkError&&(i+="Network error: "+r.networkError.message+"\n"),i=i.replace(/\n$/,"")),c.extraInfo=s,c.__proto__=n.prototype,c}return r(n,t),n}(Error);!function(t){t[t.normal=1]="normal",t[t.refetch=2]="refetch",t[t.poll=3]="poll"}(Dt||(Dt={}));var Ct=function(t){function n(n){var e=n.queryManager,r=n.options,i=n.shouldSubscribe,u=void 0===i||i,o=t.call(this,(function(t){return o.onSubscribe(t)}))||this;o.observers=new Set,o.subscriptions=new Set,o.isTornDown=!1,o.options=r,o.variables=r.variables||{},o.queryId=e.generateQueryId(),o.shouldSubscribe=u;var a=U(r.query);return o.queryName=a&&a.name&&a.name.value,o.queryManager=e,o}return r(n,t),n.prototype.result=function(){var t=this;return new Promise((function(n,e){var r={next:function(e){n(e),t.observers.delete(r),t.observers.size||t.queryManager.removeQuery(t.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:e},i=t.subscribe(r)}))},n.prototype.currentResult=function(){var t=this.getCurrentResult();return void 0===t.data&&(t.data={}),t},n.prototype.getCurrentResult=function(){if(this.isTornDown){var t=this.lastResult;return{data:!this.lastError&&t&&t.data||void 0,error:this.lastError,loading:!1,networkStatus:St.error}}var n,e,r,u=this.queryManager.getCurrentQueryResult(this),o=u.data,a=u.partial,s=this.queryManager.queryStore.get(this.queryId),c=this.options.fetchPolicy,f="network-only"===c||"no-cache"===c;if(s){var h=s.networkStatus;if(void 0===(r=this.options.errorPolicy)&&(r="none"),(e=s)&&(e.networkError||"none"===r&&kt(e.graphQLErrors)))return{data:void 0,loading:!1,networkStatus:h,error:new At({graphQLErrors:s.graphQLErrors,networkError:s.networkError})};s.variables&&(this.options.variables=i(i({},this.options.variables),s.variables),this.variables=this.options.variables),n={data:o,loading:Tt(h),networkStatus:h},s.graphQLErrors&&"all"===this.options.errorPolicy&&(n.errors=s.graphQLErrors)}else{var l=f||a&&"cache-only"!==c;n={data:o,loading:l,networkStatus:l?St.loading:St.ready}}return a||this.updateLastResult(i(i({},n),{stale:!1})),i(i({},n),{partial:a})},n.prototype.isDifferentFromLastResult=function(t){var n=this.lastResultSnapshot;return!(n&&t&&n.networkStatus===t.networkStatus&&n.stale===t.stale&&O(n.data,t.data))},n.prototype.getLastResult=function(){return this.lastResult},n.prototype.getLastError=function(){return this.lastError},n.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},n.prototype.resetQueryStoreErrors=function(){var t=this.queryManager.queryStore.get(this.queryId);t&&(t.networkError=null,t.graphQLErrors=[])},n.prototype.refetch=function(t){var n=this.options.fetchPolicy;return"cache-only"===n?Promise.reject(new m(1)):("no-cache"!==n&&"cache-and-network"!==n&&(n="network-only"),O(this.variables,t)||(this.variables=i(i({},this.variables),t)),O(this.options.variables,this.variables)||(this.options.variables=i(i({},this.options.variables),this.variables)),this.queryManager.fetchQuery(this.queryId,i(i({},this.options),{fetchPolicy:n}),Dt.refetch))},n.prototype.fetchMore=function(t){var n=this;p(t.updateQuery,2);var e=i(i({},t.query?t:i(i(i({},this.options),t),{variables:i(i({},this.variables),t.variables)})),{fetchPolicy:"network-only"}),r=this.queryManager.generateQueryId();return this.queryManager.fetchQuery(r,e,Dt.normal,this.queryId).then((function(i){return n.updateQuery((function(n){return t.updateQuery(n,{fetchMoreResult:i.data,variables:e.variables})})),n.queryManager.stopQuery(r),i}),(function(t){throw n.queryManager.stopQuery(r),t}))},n.prototype.subscribeToMore=function(t){var n=this,e=this.queryManager.startGraphQLSubscription({query:t.document,variables:t.variables}).subscribe({next:function(e){var r=t.updateQuery;r&&n.updateQuery((function(t,n){return r(t,{subscriptionData:e,variables:n.variables})}))},error:function(n){t.onError&&t.onError(n)}});return this.subscriptions.add(e),function(){n.subscriptions.delete(e)&&e.unsubscribe()}},n.prototype.setOptions=function(t){var n=this.options.fetchPolicy;this.options=i(i({},this.options),t),t.pollInterval?this.startPolling(t.pollInterval):0===t.pollInterval&&this.stopPolling();var e=t.fetchPolicy;return this.setVariables(this.options.variables,n!==e&&("cache-only"===n||"standby"===n||"network-only"===e),t.fetchResults)},n.prototype.setVariables=function(t,n,e){return void 0===n&&(n=!1),void 0===e&&(e=!0),this.isTornDown=!1,t=t||this.variables,!n&&O(t,this.variables)?this.observers.size&&e?this.result():Promise.resolve():(this.variables=this.options.variables=t,this.observers.size?this.queryManager.fetchQuery(this.queryId,this.options):Promise.resolve())},n.prototype.updateQuery=function(t){var n=this.queryManager,e=n.getQueryWithPreviousResult(this.queryId),r=e.previousResult,i=e.variables,u=e.document,o=rt((function(){return t(r,{variables:i})}));o&&(n.dataStore.markUpdateQueryResult(u,i,o),n.broadcastQueries())},n.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},n.prototype.startPolling=function(t){Mt(this),this.options.pollInterval=t,this.queryManager.startPollingQuery(this.options,this.queryId)},n.prototype.updateLastResult=function(t){var n=this.lastResult;return this.lastResult=t,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?t:function t(n,e){switch(et.call(n)){case"[object Array]":if(e.has(n))return e.get(n);var r=n.slice(0);return e.set(n,r),r.forEach((function(n,i){r[i]=t(n,e)})),r;case"[object Object]":if(e.has(n))return e.get(n);var i=Object.create(Object.getPrototypeOf(n));return e.set(n,i),Object.keys(n).forEach((function(r){i[r]=t(n[r],e)})),i;default:return n}}(t,new Map),n},n.prototype.onSubscribe=function(t){var n=this;try{var e=t._subscription._observer;e&&!e.error&&(e.error=Rt)}catch(t){}var r=!this.observers.size;return this.observers.add(t),t.next&&this.lastResult&&t.next(this.lastResult),t.error&&this.lastError&&t.error(this.lastError),r&&this.setUpQuery(),function(){n.observers.delete(t)&&!n.observers.size&&n.tearDownQuery()}},n.prototype.setUpQuery=function(){var t=this,n=this.queryManager,e=this.queryId;this.shouldSubscribe&&n.addObservableQuery(e,this),this.options.pollInterval&&(Mt(this),n.startPollingQuery(this.options,e));var r=function(n){t.updateLastResult(i(i({},t.lastResult),{errors:n.graphQLErrors,networkStatus:St.error,loading:!1})),jt(t.observers,"error",t.lastError=n)};n.observeQuery(e,this.options,{next:function(e){if(t.lastError||t.isDifferentFromLastResult(e)){var r=t.updateLastResult(e),i=t.options,u=i.query,o=i.variables,a=i.fetchPolicy;n.transform(u).hasClientExports?n.getLocalState().addExportedVariables(u,o).then((function(i){var o=t.variables;t.variables=t.options.variables=i,!e.loading&&r&&"cache-only"!==a&&n.transform(u).serverQuery&&!O(o,i)?t.refetch():jt(t.observers,"next",e)})):jt(t.observers,"next",e)}},error:r}).catch(r)},n.prototype.tearDownQuery=function(){var t=this.queryManager;this.isTornDown=!0,t.stopPollingQuery(this.queryId),this.subscriptions.forEach((function(t){return t.unsubscribe()})),this.subscriptions.clear(),t.removeObservableQuery(this.queryId),t.stopQuery(this.queryId),this.observers.clear()},n}(_t);function Rt(){}function jt(t,n,e){var r=[];t.forEach((function(t){return t[n]&&r.push(t)})),r.forEach((function(t){return t[n](e)}))}function Mt(t){var n=t.options.fetchPolicy;p("cache-first"!==n&&"cache-only"!==n,3)}var $t=function(){function t(){this.store={}}return t.prototype.getStore=function(){return this.store},t.prototype.get=function(t){return this.store[t]},t.prototype.initMutation=function(t,n,e){this.store[t]={mutation:n,variables:e||{},loading:!0,error:null}},t.prototype.markMutationError=function(t,n){var e=this.store[t];e&&(e.loading=!1,e.error=n)},t.prototype.markMutationResult=function(t){var n=this.store[t];n&&(n.loading=!1,n.error=null)},t.prototype.reset=function(){this.store={}},t}(),xt=function(){function t(){this.store={}}return t.prototype.getStore=function(){return this.store},t.prototype.get=function(t){return this.store[t]},t.prototype.initQuery=function(t){var n=this.store[t.queryId];p(!n||n.document===t.document||O(n.document,t.document),19);var e=!1,r=null;t.storePreviousVariables&&n&&n.networkStatus!==St.loading&&(O(n.variables,t.variables)||(e=!0,r=n.variables));var i=[];n&&n.graphQLErrors&&(i=n.graphQLErrors),this.store[t.queryId]={document:t.document,variables:t.variables,previousVariables:r,networkError:null,graphQLErrors:i,networkStatus:e?St.setVariables:t.isPoll?St.poll:t.isRefetch?St.refetch:St.loading,metadata:t.metadata},"string"==typeof t.fetchMoreForQueryId&&this.store[t.fetchMoreForQueryId]&&(this.store[t.fetchMoreForQueryId].networkStatus=St.fetchMore)},t.prototype.markQueryResult=function(t,n,e){this.store&&this.store[t]&&(this.store[t].networkError=null,this.store[t].graphQLErrors=kt(n.errors)?n.errors:[],this.store[t].previousVariables=null,this.store[t].networkStatus=St.ready,"string"==typeof e&&this.store[e]&&(this.store[e].networkStatus=St.ready))},t.prototype.markQueryError=function(t,n,e){this.store&&this.store[t]&&(this.store[t].networkError=n,this.store[t].networkStatus=St.error,"string"==typeof e&&this.markQueryResultClient(e,!0))},t.prototype.markQueryResultClient=function(t,n){var e=this.store&&this.store[t];e&&(e.networkError=null,e.previousVariables=null,n&&(e.networkStatus=St.ready))},t.prototype.stopQuery=function(t){delete this.store[t]},t.prototype.reset=function(t){var n=this;Object.keys(this.store).forEach((function(e){t.indexOf(e)<0?n.stopQuery(e):n.store[e].networkStatus=St.loading}))},t}(),Ft=function(){function t(t){var n=t.client,e=t.resolvers,r=t.fragmentMatcher;this.cache=t.cache,n&&(this.client=n),e&&this.addResolvers(e),r&&this.setFragmentMatcher(r)}return t.prototype.addResolvers=function(t){var n=this;this.resolvers=this.resolvers||{},Array.isArray(t)?t.forEach((function(t){n.resolvers=ot(n.resolvers,t)})):this.resolvers=ot(this.resolvers,t)},t.prototype.setResolvers=function(t){this.resolvers={},this.addResolvers(t)},t.prototype.getResolvers=function(){return this.resolvers||{}},t.prototype.runResolvers=function(t){var n=t.document,e=t.remoteResult,r=t.context,a=t.variables,s=t.onlyRunForcedResolvers,c=void 0!==s&&s;return u(this,void 0,void 0,(function(){return o(this,(function(){return n?[2,this.resolveDocument(n,e.data,r,a,this.fragmentMatcher,c).then((function(t){return i(i({},e),{data:t.result})}))]:[2,e]}))}))},t.prototype.setFragmentMatcher=function(t){this.fragmentMatcher=t},t.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},t.prototype.clientQuery=function(t){return x(["client"],t)&&this.resolvers?t:null},t.prototype.serverQuery=function(t){return this.resolvers?function(t){P(t);var n=z([{test:function(t){return"client"===t.name.value},remove:!0}],t);return n&&(n=h(n,{FragmentDefinition:{enter:function(t){if(t.selectionSet&&t.selectionSet.selections.every((function(t){return A(t)&&"__typename"===t.name.value})))return null}}})),n}(t):t},t.prototype.prepareContext=function(t){void 0===t&&(t={});var n=this.cache;return i(i({},t),{cache:n,getCacheKey:function(t){if(n.config)return n.config.dataIdFromObject(t);p(!1,6)}})},t.prototype.addExportedVariables=function(t,n,e){return void 0===n&&(n={}),void 0===e&&(e={}),u(this,void 0,void 0,(function(){return o(this,(function(){return t?[2,this.resolveDocument(t,this.buildRootValueFromCache(t,n)||{},this.prepareContext(e),n).then((function(t){return i(i({},n),t.exportedVariables)}))]:[2,i({},n)]}))}))},t.prototype.shouldForceResolvers=function(t){var n=!1;return h(t,{Directive:{enter:function(t){if("client"===t.name.value&&t.arguments&&(n=t.arguments.some((function(t){return"always"===t.name.value&&"BooleanValue"===t.value.kind&&!0===t.value.value}))))return l}}}),n},t.prototype.buildRootValueFromCache=function(t,n){return this.cache.diff({query:tt(t),variables:n,returnPartialData:!0,optimistic:!1}).result},t.prototype.resolveDocument=function(t,n,e,r,a,s){return void 0===e&&(e={}),void 0===r&&(r={}),void 0===a&&(a=function(){return!0}),void 0===s&&(s=!1),u(this,void 0,void 0,(function(){var u,c,f,h,l,d,v,m,p;return o(this,(function(){var o;return u=Q(t),c=G(t),f=J(c),l=(h=u.operation)?(o=h).charAt(0).toUpperCase()+o.slice(1):"Query",v=(d=this).cache,m=d.client,p={fragmentMap:f,context:i(i({},e),{cache:v,client:m}),variables:r,fragmentMatcher:a,defaultOperationType:l,exportedVariables:{},onlyRunForcedResolvers:s},[2,this.resolveSelectionSet(u.selectionSet,n,p).then((function(t){return{result:t,exportedVariables:p.exportedVariables}}))]}))}))},t.prototype.resolveSelectionSet=function(t,n,e){return u(this,void 0,void 0,(function(){var r,i,a,s,c=this;return o(this,(function(){return r=e.fragmentMap,i=e.context,a=e.variables,s=[n],[2,Promise.all(t.selections.map((function(t){return u(c,void 0,void 0,(function(){var u;return o(this,(function(){return $(t,a)?A(t)?[2,this.resolveField(t,n,e).then((function(n){var e;void 0!==n&&s.push(((e={})[D(t)]=n,e))}))]:(C(t)?u=t:p(u=r[t.name.value],7),u&&u.typeCondition&&e.fragmentMatcher(n,u.typeCondition.name.value,i)?[2,this.resolveSelectionSet(u.selectionSet,n,e).then((function(t){s.push(t)}))]:[2]):[2]}))}))}))).then((function(){return at(s)}))]}))}))},t.prototype.resolveField=function(t,n,e){return u(this,void 0,void 0,(function(){var r,i,u,a,s,c,f,h,l,d=this;return o(this,(function(){return r=e.variables,i=t.name.value,u=D(t),a=i!==u,s=n[u]||n[i],c=Promise.resolve(s),e.onlyRunForcedResolvers&&!this.shouldForceResolvers(t)||(f=n.__typename||e.defaultOperationType,(h=this.resolvers&&this.resolvers[f])&&(l=h[a?i:u])&&(c=Promise.resolve(l(n,k(t,r),e.context,{field:t,fragmentMap:e.fragmentMap})))),[2,c.then((function(n){return void 0===n&&(n=s),t.directives&&t.directives.forEach((function(t){"export"===t.name.value&&t.arguments&&t.arguments.forEach((function(t){"as"===t.name.value&&"StringValue"===t.value.kind&&(e.exportedVariables[t.value.value]=n)}))})),t.selectionSet?null==n?n:Array.isArray(n)?d.resolveSubSelectedArray(t,n,e):t.selectionSet?d.resolveSelectionSet(t.selectionSet,n,e):void 0:n}))]}))}))},t.prototype.resolveSubSelectedArray=function(t,n,e){var r=this;return Promise.all(n.map((function(n){return null===n?null:Array.isArray(n)?r.resolveSubSelectedArray(t,n,e):t.selectionSet?r.resolveSelectionSet(t.selectionSet,n,e):void 0})))},t}();function Vt(t){var n=new Set,e=null;return new _t((function(r){return n.add(r),e=e||t.subscribe({next:function(t){n.forEach((function(n){return n.next&&n.next(t)}))},error:function(t){n.forEach((function(n){return n.error&&n.error(t)}))},complete:function(){n.forEach((function(t){return t.complete&&t.complete()}))}}),function(){n.delete(r)&&!n.size&&e&&(e.unsubscribe(),e=null)}}))}var qt=Object.prototype.hasOwnProperty,Lt=function(){function t(t){var n=t.link,e=t.queryDeduplication,r=void 0!==e&&e,i=t.store,u=t.onBroadcast,o=void 0===u?function(){}:u,a=t.ssrMode,s=void 0!==a&&a,c=t.clientAwareness,f=void 0===c?{}:c,h=t.localState,l=t.assumeImmutableResults;this.mutationStore=new $t,this.queryStore=new xt,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.transformCache=new(nt?WeakMap:Map),this.inFlightLinkObservables=new Map,this.pollingInfoByQueryId=new Map,this.link=n,this.queryDeduplication=r,this.dataStore=i,this.onBroadcast=o,this.clientAwareness=f,this.localState=h||new Ft({cache:i.getCache()}),this.ssrMode=s,this.assumeImmutableResults=!!l}return t.prototype.stop=function(){var t=this;this.queries.forEach((function(n,e){t.stopQueryNoBroadcast(e)})),this.fetchQueryRejectFns.forEach((function(t){t(new m(8))}))},t.prototype.mutate=function(t){var n=t.mutation,e=t.variables,r=t.optimisticResponse,a=t.updateQueries,s=t.refetchQueries,c=void 0===s?[]:s,f=t.awaitRefetchQueries,h=void 0!==f&&f,l=t.update,d=t.errorPolicy,v=void 0===d?"none":d,m=t.fetchPolicy,y=t.context,I=void 0===y?{}:y;return u(this,void 0,void 0,(function(){var t,u,s,f=this;return o(this,(function(o){switch(o.label){case 0:return p(n,9),p(!m||"no-cache"===m,10),t=this.generateQueryId(),n=this.transform(n).document,this.setQuery(t,(function(){return{document:n}})),e=this.getVariables(n,e),this.transform(n).hasClientExports?[4,this.localState.addExportedVariables(n,e,I)]:[3,2];case 1:e=o.sent(),o.label=2;case 2:return u=function(){var t={};return a&&f.queries.forEach((function(n,e){var r=n.observableQuery;if(r){var i=r.queryName;i&&qt.call(a,i)&&(t[e]={updater:a[i],query:f.queryStore.get(e)})}})),t},this.mutationStore.initMutation(t,n,e),this.dataStore.markMutationInit({mutationId:t,document:n,variables:e,updateQueries:u(),update:l,optimisticResponse:r}),this.broadcastQueries(),s=this,[2,new Promise((function(o,a){var f,d;s.getObservableFromLink(n,i(i({},I),{optimisticResponse:r}),e,!1).subscribe({next:function(r){it(r)&&"none"===v?d=new At({graphQLErrors:r.errors}):(s.mutationStore.markMutationResult(t),"no-cache"!==m&&s.dataStore.markMutationResult({mutationId:t,result:r,document:n,variables:e,updateQueries:u(),update:l}),f=r)},error:function(n){s.mutationStore.markMutationError(t,n),s.dataStore.markMutationComplete({mutationId:t,optimisticResponse:r}),s.broadcastQueries(),s.setQuery(t,(function(){return{document:null}})),a(new At({networkError:n}))},complete:function(){if(d&&s.mutationStore.markMutationError(t,d),s.dataStore.markMutationComplete({mutationId:t,optimisticResponse:r}),s.broadcastQueries(),d)a(d);else{"function"==typeof c&&(c=c(f));var n=[];kt(c)&&c.forEach((function(t){if("string"==typeof t)s.queries.forEach((function(e){var r=e.observableQuery;r&&r.queryName===t&&n.push(r.refetch())}));else{var e={query:t.query,variables:t.variables,fetchPolicy:"network-only"};t.context&&(e.context=t.context),n.push(s.query(e))}})),Promise.all(h?n:[]).then((function(){s.setQuery(t,(function(){return{document:null}})),"ignore"===v&&f&&it(f)&&delete f.errors,o(f)}))}}})}))]}}))}))},t.prototype.fetchQuery=function(t,n,e,r){return u(this,void 0,void 0,(function(){var u,a,s,c,f,h,l,d,v,m,p,y,I,g,b,w,E=this;return o(this,(function(o){switch(o.label){case 0:return a=void 0===(u=n.metadata)?null:u,c=void 0===(s=n.fetchPolicy)?"cache-first":s,h=void 0===(f=n.context)?{}:f,l=this.transform(n.query).document,d=this.getVariables(l,n.variables),this.transform(l).hasClientExports?[4,this.localState.addExportedVariables(l,d,h)]:[3,2];case 1:d=o.sent(),o.label=2;case 2:if(n=i(i({},n),{variables:d}),p=m="network-only"===c||"no-cache"===c,m||(y=this.dataStore.getCache().diff({query:l,variables:d,returnPartialData:!0,optimistic:!1}),p=!y.complete||"cache-and-network"===c,v=y.result),I=p&&"cache-only"!==c&&"standby"!==c,x(["live"],l)&&(I=!0),g=this.idCounter++,b="no-cache"!==c?this.updateQueryWatch(t,l,n):void 0,this.setQuery(t,(function(){return{document:l,lastRequestId:g,invalidated:!0,cancel:b}})),this.invalidate(r),this.queryStore.initQuery({queryId:t,document:l,storePreviousVariables:I,variables:d,isPoll:e===Dt.poll,isRefetch:e===Dt.refetch,metadata:a,fetchMoreForQueryId:r}),this.broadcastQueries(),I){if(w=this.fetchRequest({requestId:g,queryId:t,document:l,options:n,fetchMoreForQueryId:r}).catch((function(n){throw n.hasOwnProperty("graphQLErrors")?n:(g>=E.getQuery(t).lastRequestId&&(E.queryStore.markQueryError(t,n,r),E.invalidate(t),E.invalidate(r),E.broadcastQueries()),new At({networkError:n}))})),"cache-and-network"!==c)return[2,w];w.catch((function(){}))}return this.queryStore.markQueryResultClient(t,!I),this.invalidate(t),this.invalidate(r),this.transform(l).hasForcedResolvers?[2,this.localState.runResolvers({document:l,remoteResult:{data:v},context:h,variables:d,onlyRunForcedResolvers:!0}).then((function(e){return E.markQueryResult(t,e,n,r),E.broadcastQueries(),e}))]:(this.broadcastQueries(),[2,{data:v}])}}))}))},t.prototype.markQueryResult=function(t,n,e,r){var i=e.variables,u=e.errorPolicy;"no-cache"===e.fetchPolicy?this.setQuery(t,(function(){return{newData:{result:n.data,complete:!0}}})):this.dataStore.markQueryResult(n,this.getQuery(t).document,i,r,"ignore"===u||"all"===u)},t.prototype.queryListenerForObserver=function(t,n,e){var r=this;function i(t,n){if(e[t])try{e[t](n)}catch(t){}}return function(e,u){if(r.invalidate(t,!1),e){var o=r.getQuery(t),a=o.observableQuery,s=o.document,c=a?a.options.fetchPolicy:n.fetchPolicy;if("standby"!==c){var f=Tt(e.networkStatus),h=a&&a.getLastResult();if(!f||n.returnPartialData||!u&&e.previousVariables||h&&h.networkStatus!==e.networkStatus&&n.notifyOnNetworkStatusChange||"cache-only"===c||"cache-and-network"===c){var l=kt(e.graphQLErrors),d=a&&a.options.errorPolicy||n.errorPolicy||"none";if("none"===d&&l||e.networkError)return i("error",new At({graphQLErrors:e.graphQLErrors,networkError:e.networkError}));try{var v=void 0,m=void 0;if(u)"no-cache"!==c&&"network-only"!==c&&r.setQuery(t,(function(){return{newData:null}})),v=u.result,m=!u.complete;else{var p=a&&a.getLastError();if(h&&h.data&&("none"===d||(p&&p.graphQLErrors)===e.graphQLErrors))v=h.data,m=!1;else{var y=r.dataStore.getCache().diff({query:s,variables:e.previousVariables||e.variables,returnPartialData:!0,optimistic:!0});v=y.result,m=!y.complete}}var I=m&&!(n.returnPartialData||"cache-only"===c),g={data:I?h&&h.data:v,loading:f,networkStatus:e.networkStatus,stale:I};"all"===d&&l&&(g.errors=e.graphQLErrors),i("next",g)}catch(t){i("error",new At({networkError:t}))}}}}}},t.prototype.transform=function(t){var n,e=this.transformCache;if(!e.has(t)){var r=this.dataStore.getCache(),i=r.transformDocument(t),u=(n=r.transformForLink(i),z([Z],P(n))),o=this.localState.clientQuery(i),a=this.localState.serverQuery(u),s={document:i,hasClientExports:F(i),hasForcedResolvers:this.localState.shouldForceResolvers(i),clientQuery:o,serverQuery:a,defaultVars:Y(U(i))},c=function(t){t&&!e.has(t)&&e.set(t,s)};c(t),c(i),c(o),c(a)}return e.get(t)},t.prototype.getVariables=function(t,n){return i(i({},this.transform(t).defaultVars),n)},t.prototype.watchQuery=function(t,n){void 0===n&&(n=!0),p("standby"!==t.fetchPolicy,11),t.variables=this.getVariables(t.query,t.variables),void 0===t.notifyOnNetworkStatusChange&&(t.notifyOnNetworkStatusChange=!1);var e=i({},t);return new Ct({queryManager:this,options:e,shouldSubscribe:n})},t.prototype.query=function(t){var n=this;return p(t.query,12),p("Document"===t.query.kind,13),p(!t.returnPartialData,14),p(!t.pollInterval,15),new Promise((function(e,r){var i=n.watchQuery(t,!1);n.fetchQueryRejectFns.set("query:"+i.queryId,r),i.result().then(e,r).then((function(){return n.fetchQueryRejectFns.delete("query:"+i.queryId)}))}))},t.prototype.generateQueryId=function(){return String(this.idCounter++)},t.prototype.stopQueryInStore=function(t){this.stopQueryInStoreNoBroadcast(t),this.broadcastQueries()},t.prototype.stopQueryInStoreNoBroadcast=function(t){this.stopPollingQuery(t),this.queryStore.stopQuery(t),this.invalidate(t)},t.prototype.addQueryListener=function(t,n){this.setQuery(t,(function(t){return t.listeners.add(n),{invalidated:!1}}))},t.prototype.updateQueryWatch=function(t,n,e){var r=this,i=this.getQuery(t).cancel;return i&&i(),this.dataStore.getCache().watch({query:n,variables:e.variables,optimistic:!0,previousResult:function(){var n=null,e=r.getQuery(t).observableQuery;if(e){var i=e.getLastResult();i&&(n=i.data)}return n},callback:function(n){r.setQuery(t,(function(){return{invalidated:!0,newData:n}}))}})},t.prototype.addObservableQuery=function(t,n){this.setQuery(t,(function(){return{observableQuery:n}}))},t.prototype.removeObservableQuery=function(t){var n=this.getQuery(t).cancel;this.setQuery(t,(function(){return{observableQuery:null}})),n&&n()},t.prototype.clearStore=function(){this.fetchQueryRejectFns.forEach((function(t){t(new m(16))}));var t=[];return this.queries.forEach((function(n,e){n.observableQuery&&t.push(e)})),this.queryStore.reset(t),this.mutationStore.reset(),this.dataStore.reset()},t.prototype.resetStore=function(){var t=this;return this.clearStore().then((function(){return t.reFetchObservableQueries()}))},t.prototype.reFetchObservableQueries=function(t){var n=this;void 0===t&&(t=!1);var e=[];return this.queries.forEach((function(r,i){var u=r.observableQuery;if(u){var o=u.options.fetchPolicy;u.resetLastResults(),"cache-only"===o||!t&&"standby"===o||e.push(u.refetch()),n.setQuery(i,(function(){return{newData:null}})),n.invalidate(i)}})),this.broadcastQueries(),Promise.all(e)},t.prototype.observeQuery=function(t,n,e){return this.addQueryListener(t,this.queryListenerForObserver(t,n,e)),this.fetchQuery(t,n)},t.prototype.startQuery=function(t,n,e){return this.addQueryListener(t,e),this.fetchQuery(t,n).catch((function(){})),t},t.prototype.startGraphQLSubscription=function(t){var n=this,e=t.query,r=t.fetchPolicy,i=t.variables;e=this.transform(e).document,i=this.getVariables(e,i);var u=function(t){return n.getObservableFromLink(e,{},t,!1).map((function(i){if(r&&"no-cache"===r||(n.dataStore.markSubscriptionResult(i,e,t),n.broadcastQueries()),it(i))throw new At({graphQLErrors:i.errors});return i}))};if(this.transform(e).hasClientExports){var o=this.localState.addExportedVariables(e,i).then(u);return new _t((function(t){var n=null;return o.then((function(e){return n=e.subscribe(t)}),t.error),function(){return n&&n.unsubscribe()}}))}return u(i)},t.prototype.stopQuery=function(t){this.stopQueryNoBroadcast(t),this.broadcastQueries()},t.prototype.stopQueryNoBroadcast=function(t){this.stopQueryInStoreNoBroadcast(t),this.removeQuery(t)},t.prototype.removeQuery=function(t){this.fetchQueryRejectFns.delete("query:"+t),this.fetchQueryRejectFns.delete("fetchRequest:"+t),this.getQuery(t).subscriptions.forEach((function(t){return t.unsubscribe()})),this.queries.delete(t)},t.prototype.getCurrentQueryResult=function(t,n){void 0===n&&(n=!0);var e=t.options,r=e.variables,i=e.query,u=e.fetchPolicy,o=e.returnPartialData,a=t.getLastResult(),s=this.getQuery(t.queryId).newData;if(s&&s.complete)return{data:s.result,partial:!1};if("no-cache"===u||"network-only"===u)return{data:void 0,partial:!1};var c=this.dataStore.getCache().diff({query:i,variables:r,previousResult:a?a.data:void 0,returnPartialData:!0,optimistic:n}),f=c.complete;return{data:f||o?c.result:void 0,partial:!f}},t.prototype.getQueryWithPreviousResult=function(t){var n;if("string"==typeof t){var e=this.getQuery(t).observableQuery;p(e,17),n=e}else n=t;var r=n.options,i=r.variables,u=r.query;return{previousResult:this.getCurrentQueryResult(n,!1).data,variables:i,document:u}},t.prototype.broadcastQueries=function(){var t=this;this.onBroadcast(),this.queries.forEach((function(n,e){n.invalidated&&n.listeners.forEach((function(r){r&&r(t.queryStore.get(e),n.newData)}))}))},t.prototype.getLocalState=function(){return this.localState},t.prototype.getObservableFromLink=function(t,n,e,r){var u,o=this;void 0===r&&(r=this.queryDeduplication);var a=this.transform(t).serverQuery;if(a){var s=this.inFlightLinkObservables,c=this.link,f={query:a,variables:e,operationName:B(a)||void 0,context:this.prepareContext(i(i({},n),{forceFetch:!r}))};if(n=f.context,r){var h=s.get(a)||new Map;s.set(a,h);var l=JSON.stringify(e);if(!(u=h.get(l))){h.set(l,u=Vt(Ot(c,f)));var d=function(){h.delete(l),h.size||s.delete(a),v.unsubscribe()},v=u.subscribe({next:d,error:d,complete:d})}}else u=Vt(Ot(c,f))}else u=_t.of({data:{}}),n=this.prepareContext(n);var m=this.transform(t).clientQuery;return m&&(u=function(t){return new _t((function(r){var i=r.next,u=r.error,a=r.complete,s=0,c=!1,f={next:function(t){++s,new Promise((function(r){r(function(t){return o.localState.runResolvers({document:m,remoteResult:t,context:n,variables:e})}(t))})).then((function(t){--s,i&&i.call(r,t),c&&f.complete()}),(function(t){--s,u&&u.call(r,t)}))},error:function(t){u&&u.call(r,t)},complete:function(){c=!0,s||a&&a.call(r)}},h=t.subscribe(f);return function(){return h.unsubscribe()}}))}(u)),u},t.prototype.fetchRequest=function(t){var n,e,r=this,i=t.requestId,u=t.queryId,o=t.document,a=t.options,s=t.fetchMoreForQueryId,c=a.variables,f=a.errorPolicy,h=void 0===f?"none":f,l=a.fetchPolicy;return new Promise((function(t,f){var d=r.getObservableFromLink(o,a.context,c),v="fetchRequest:"+u;r.fetchQueryRejectFns.set(v,f);var m=function(){r.fetchQueryRejectFns.delete(v),r.setQuery(u,(function(t){t.subscriptions.delete(p)}))},p=d.map((function(t){if(i>=r.getQuery(u).lastRequestId&&(r.markQueryResult(u,t,a,s),r.queryStore.markQueryResult(u,t,s),r.invalidate(u),r.invalidate(s),r.broadcastQueries()),"none"===h&&kt(t.errors))return f(new At({graphQLErrors:t.errors}));if("all"===h&&(e=t.errors),s||"no-cache"===l)n=t.data;else{var d=r.dataStore.getCache().diff({variables:c,query:o,optimistic:!1,returnPartialData:!0});(d.complete||a.returnPartialData)&&(n=d.result)}})).subscribe({error:function(t){m(),f(t)},complete:function(){m(),t({data:n,errors:e,loading:!1,networkStatus:St.ready,stale:!1})}});r.setQuery(u,(function(t){t.subscriptions.add(p)}))}))},t.prototype.getQuery=function(t){return this.queries.get(t)||{listeners:new Set,invalidated:!1,document:null,newData:null,lastRequestId:1,observableQuery:null,subscriptions:new Set}},t.prototype.setQuery=function(t,n){var e=this.getQuery(t),r=i(i({},e),n(e));this.queries.set(t,r)},t.prototype.invalidate=function(t,n){void 0===n&&(n=!0),t&&this.setQuery(t,(function(){return{invalidated:n}}))},t.prototype.prepareContext=function(t){void 0===t&&(t={});var n=this.localState.prepareContext(t);return i(i({},n),{clientAwareness:this.clientAwareness})},t.prototype.checkInFlight=function(t){var n=this.queryStore.get(t);return n&&n.networkStatus!==St.ready&&n.networkStatus!==St.error},t.prototype.startPollingQuery=function(t,n,e){var r=this,u=t.pollInterval;if(p(u,18),!this.ssrMode){var o=this.pollingInfoByQueryId.get(n);o||this.pollingInfoByQueryId.set(n,o={}),o.interval=u,o.options=i(i({},t),{fetchPolicy:"network-only"});var a=function(){var t=r.pollingInfoByQueryId.get(n);t&&(r.checkInFlight(n)?s():r.fetchQuery(n,t.options,Dt.poll).then(s,s))},s=function(){var t=r.pollingInfoByQueryId.get(n);t&&(clearTimeout(t.timeout),t.timeout=setTimeout(a,t.interval))};e&&this.addQueryListener(n,e),s()}return n},t.prototype.stopPollingQuery=function(t){this.pollingInfoByQueryId.delete(t)},t}(),Pt=function(){function t(t){this.cache=t}return t.prototype.getCache=function(){return this.cache},t.prototype.markQueryResult=function(t,n,e,r,i){void 0===i&&(i=!1);var u=!it(t);i&&it(t)&&t.data&&(u=!0),!r&&u&&this.cache.write({result:t.data,dataId:"ROOT_QUERY",query:n,variables:e})},t.prototype.markSubscriptionResult=function(t,n,e){it(t)||this.cache.write({result:t.data,dataId:"ROOT_SUBSCRIPTION",query:n,variables:e})},t.prototype.markMutationInit=function(t){var n,e=this;t.optimisticResponse&&(n="function"==typeof t.optimisticResponse?t.optimisticResponse(t.variables):t.optimisticResponse,this.cache.recordOptimisticTransaction((function(r){var i=e.cache;e.cache=r;try{e.markMutationResult({mutationId:t.mutationId,result:{data:n},document:t.document,variables:t.variables,updateQueries:t.updateQueries,update:t.update})}finally{e.cache=i}}),t.mutationId))},t.prototype.markMutationResult=function(t){var n=this;if(!it(t.result)){var e=[{result:t.result.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}],r=t.updateQueries;r&&Object.keys(r).forEach((function(i){var u=r[i],o=u.query,a=u.updater,s=n.cache.diff({query:o.document,variables:o.variables,returnPartialData:!0,optimistic:!1}),c=s.result;if(s.complete){var f=rt((function(){return a(c,{mutationResult:t.result,queryName:B(o.document)||void 0,queryVariables:o.variables})}));f&&e.push({result:f,dataId:"ROOT_QUERY",query:o.document,variables:o.variables})}})),this.cache.performTransaction((function(n){e.forEach((function(t){return n.write(t)}));var r=t.update;r&&rt((function(){return r(n,t.result)}))}))}},t.prototype.markMutationComplete=function(t){t.optimisticResponse&&this.cache.removeOptimistic(t.mutationId)},t.prototype.markUpdateQueryResult=function(t,n,e){this.cache.write({result:e,dataId:"ROOT_QUERY",variables:n,query:t})},t.prototype.reset=function(){return this.cache.reset()},t}(),Ut=function(){function t(t){var n=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var e=t.cache,r=t.ssrMode,i=void 0!==r&&r,u=t.ssrForceFetchDelay,o=void 0===u?0:u,a=t.connectToDevTools,s=t.queryDeduplication,c=void 0===s||s,f=t.defaultOptions,h=t.assumeImmutableResults,l=void 0!==h&&h,d=t.resolvers,v=t.typeDefs,p=t.fragmentMatcher,y=t.name,I=t.version,g=t.link;if(!g&&d&&(g=Et.empty()),!g||!e)throw new m(4);this.link=g,this.cache=e,this.store=new Pt(e),this.disableNetworkFetches=i||o>0,this.queryDeduplication=c,this.defaultOptions=f||{},this.typeDefs=v,o&&setTimeout((function(){return n.disableNetworkFetches=!1}),o),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),void 0!==a&&a&&"undefined"!=typeof window&&(window.__APOLLO_CLIENT__=this),this.version="2.6.10",this.localState=new Ft({cache:e,client:this,resolvers:d,fragmentMatcher:p}),this.queryManager=new Lt({link:this.link,store:this.store,queryDeduplication:c,ssrMode:i,clientAwareness:{name:y,version:I},localState:this.localState,assumeImmutableResults:l,onBroadcast:function(){n.devToolsHookCb&&n.devToolsHookCb({action:{},state:{queries:n.queryManager.queryStore.getStore(),mutations:n.queryManager.mutationStore.getStore()},dataWithOptimisticResults:n.cache.extract(!0)})}})}return t.prototype.stop=function(){this.queryManager.stop()},t.prototype.watchQuery=function(t){return this.defaultOptions.watchQuery&&(t=i(i({},this.defaultOptions.watchQuery),t)),!this.disableNetworkFetches||"network-only"!==t.fetchPolicy&&"cache-and-network"!==t.fetchPolicy||(t=i(i({},t),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(t)},t.prototype.query=function(t){return this.defaultOptions.query&&(t=i(i({},this.defaultOptions.query),t)),p("cache-and-network"!==t.fetchPolicy,5),this.disableNetworkFetches&&"network-only"===t.fetchPolicy&&(t=i(i({},t),{fetchPolicy:"cache-first"})),this.queryManager.query(t)},t.prototype.mutate=function(t){return this.defaultOptions.mutate&&(t=i(i({},this.defaultOptions.mutate),t)),this.queryManager.mutate(t)},t.prototype.subscribe=function(t){return this.queryManager.startGraphQLSubscription(t)},t.prototype.readQuery=function(t,n){return void 0===n&&(n=!1),this.cache.readQuery(t,n)},t.prototype.readFragment=function(t,n){return void 0===n&&(n=!1),this.cache.readFragment(t,n)},t.prototype.writeQuery=function(t){var n=this.cache.writeQuery(t);return this.queryManager.broadcastQueries(),n},t.prototype.writeFragment=function(t){var n=this.cache.writeFragment(t);return this.queryManager.broadcastQueries(),n},t.prototype.writeData=function(t){var n=this.cache.writeData(t);return this.queryManager.broadcastQueries(),n},t.prototype.__actionHookForDevTools=function(t){this.devToolsHookCb=t},t.prototype.__requestRaw=function(t){return Ot(this.link,t)},t.prototype.initQueryManager=function(){return this.queryManager},t.prototype.resetStore=function(){var t=this;return Promise.resolve().then((function(){return t.queryManager.clearStore()})).then((function(){return Promise.all(t.resetStoreCallbacks.map((function(t){return t()})))})).then((function(){return t.reFetchObservableQueries()}))},t.prototype.clearStore=function(){var t=this;return Promise.resolve().then((function(){return t.queryManager.clearStore()})).then((function(){return Promise.all(t.clearStoreCallbacks.map((function(t){return t()})))}))},t.prototype.onResetStore=function(t){var n=this;return this.resetStoreCallbacks.push(t),function(){n.resetStoreCallbacks=n.resetStoreCallbacks.filter((function(n){return n!==t}))}},t.prototype.onClearStore=function(t){var n=this;return this.clearStoreCallbacks.push(t),function(){n.clearStoreCallbacks=n.clearStoreCallbacks.filter((function(n){return n!==t}))}},t.prototype.reFetchObservableQueries=function(t){return this.queryManager.reFetchObservableQueries(t)},t.prototype.extract=function(t){return this.cache.extract(t)},t.prototype.restore=function(t){return this.cache.restore(t)},t.prototype.addResolvers=function(t){this.localState.addResolvers(t)},t.prototype.setResolvers=function(t){this.localState.setResolvers(t)},t.prototype.getResolvers=function(){return this.localState.getResolvers()},t.prototype.setLocalStateFragmentMatcher=function(t){this.localState.setFragmentMatcher(t)},t}(),Bt=t((function(t,n){function e(t){for(var n=null,e=1;e<t.length;e++){var i=t[e],u=r(i);if(u!==i.length&&(null===n||u<n)&&0===(n=u))break}return null===n?0:n}function r(t){for(var n=0;n<t.length&&(" "===t[n]||"\t"===t[n]);)n++;return n}function i(t){return r(t)===t.length}Object.defineProperty(n,"__esModule",{value:!0}),n.dedentBlockStringValue=function(t){var n=t.split(/\r\n|[\n\r]/g),r=e(n);if(0!==r)for(var u=1;u<n.length;u++)n[u]=n[u].slice(r);for(;n.length>0&&i(n[0]);)n.shift();for(;n.length>0&&i(n[n.length-1]);)n.pop();return n.join("\n")},n.getBlockStringIndentation=e,n.printBlockString=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===t.indexOf("\n"),i=" "===t[0]||"\t"===t[0],u='"'===t[t.length-1],o=!r||u||e,a="";return!o||r&&i||(a+="\n"+n),a+=n?t.replace(/\n/g,"\n"+n):t,o&&(a+="\n"),'"""'+a.replace(/"""/g,'\\"""')+'"""'}}));n(Bt);var Gt=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.print=function(t){return(0,f.visit)(t,{leave:e})};var e={Name:function(t){return t.value},Variable:function(t){return"$"+t.name},Document:function(t){return i(t.definitions,"\n\n")+"\n"},OperationDefinition:function(t){var n=t.operation,e=t.name,r=o("(",i(t.variableDefinitions,", "),")"),u=i(t.directives," "),a=t.selectionSet;return e||u||r||"query"!==n?i([n,i([e,r]),u,a]," "):a},VariableDefinition:function(t){var n=t.directives;return t.variable+": "+t.type+o(" = ",t.defaultValue)+o(" ",i(n," "))},SelectionSet:function(t){return u(t.selections)},Field:function(t){var n=t.name,e=t.arguments,r=t.directives,u=t.selectionSet;return i([o("",t.alias,": ")+n+o("(",i(e,", "),")"),i(r," "),u]," ")},Argument:function(t){return t.name+": "+t.value},FragmentSpread:function(t){return"..."+t.name+o(" ",i(t.directives," "))},InlineFragment:function(t){var n=t.directives,e=t.selectionSet;return i(["...",o("on ",t.typeCondition),i(n," "),e]," ")},FragmentDefinition:function(t){var n=t.typeCondition,e=t.variableDefinitions,r=t.directives,u=t.selectionSet;return"fragment ".concat(t.name).concat(o("(",i(e,", "),")")," ")+"on ".concat(n," ").concat(o("",i(r," ")," "))+u},IntValue:function(t){return t.value},FloatValue:function(t){return t.value},StringValue:function(t,n){var e=t.value;return t.block?(0,Bt.printBlockString)(e,"description"===n?"":" "):JSON.stringify(e)},BooleanValue:function(t){return t.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(t){return t.value},ListValue:function(t){return"["+i(t.values,", ")+"]"},ObjectValue:function(t){return"{"+i(t.fields,", ")+"}"},ObjectField:function(t){return t.name+": "+t.value},Directive:function(t){return"@"+t.name+o("(",i(t.arguments,", "),")")},NamedType:function(t){return t.name},ListType:function(t){return"["+t.type+"]"},NonNullType:function(t){return t.type+"!"},SchemaDefinition:function(t){var n=t.operationTypes;return i(["schema",i(t.directives," "),u(n)]," ")},OperationTypeDefinition:function(t){return t.operation+": "+t.type},ScalarTypeDefinition:r((function(t){return i(["scalar",t.name,i(t.directives," ")]," ")})),ObjectTypeDefinition:r((function(t){var n=t.directives,e=t.fields;return i(["type",t.name,o("implements ",i(t.interfaces," & ")),i(n," "),u(e)]," ")})),FieldDefinition:r((function(t){var n=t.arguments,e=t.type,r=t.directives;return t.name+(c(n)?o("(\n",a(i(n,"\n")),"\n)"):o("(",i(n,", "),")"))+": "+e+o(" ",i(r," "))})),InputValueDefinition:r((function(t){var n=t.directives;return i([t.name+": "+t.type,o("= ",t.defaultValue),i(n," ")]," ")})),InterfaceTypeDefinition:r((function(t){var n=t.fields;return i(["interface",t.name,i(t.directives," "),u(n)]," ")})),UnionTypeDefinition:r((function(t){var n=t.types;return i(["union",t.name,i(t.directives," "),n&&0!==n.length?"= "+i(n," | "):""]," ")})),EnumTypeDefinition:r((function(t){var n=t.values;return i(["enum",t.name,i(t.directives," "),u(n)]," ")})),EnumValueDefinition:r((function(t){return i([t.name,i(t.directives," ")]," ")})),InputObjectTypeDefinition:r((function(t){var n=t.fields;return i(["input",t.name,i(t.directives," "),u(n)]," ")})),DirectiveDefinition:r((function(t){var n=t.arguments,e=t.repeatable,r=t.locations;return"directive @"+t.name+(c(n)?o("(\n",a(i(n,"\n")),"\n)"):o("(",i(n,", "),")"))+(e?" repeatable":"")+" on "+i(r," | ")})),SchemaExtension:function(t){var n=t.operationTypes;return i(["extend schema",i(t.directives," "),u(n)]," ")},ScalarTypeExtension:function(t){return i(["extend scalar",t.name,i(t.directives," ")]," ")},ObjectTypeExtension:function(t){var n=t.directives,e=t.fields;return i(["extend type",t.name,o("implements ",i(t.interfaces," & ")),i(n," "),u(e)]," ")},InterfaceTypeExtension:function(t){var n=t.fields;return i(["extend interface",t.name,i(t.directives," "),u(n)]," ")},UnionTypeExtension:function(t){var n=t.types;return i(["extend union",t.name,i(t.directives," "),n&&0!==n.length?"= "+i(n," | "):""]," ")},EnumTypeExtension:function(t){var n=t.values;return i(["extend enum",t.name,i(t.directives," "),u(n)]," ")},InputObjectTypeExtension:function(t){var n=t.fields;return i(["extend input",t.name,i(t.directives," "),u(n)]," ")}};function r(t){return function(n){return i([n.description,t(n)],"\n")}}function i(t,n){return t?t.filter((function(t){return t})).join(n||""):""}function u(t){return t&&0!==t.length?"{\n"+a(i(t,"\n"))+"\n}":""}function o(t,n,e){return n?t+n+(e||""):""}function a(t){return t&&" "+t.replace(/\n/g,"\n ")}function s(t){return-1!==t.indexOf("\n")}function c(t){return t&&t.some(s)}}));n(Gt);var Qt=Gt.print,Jt={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},Yt=function(t,n,e){var r=new Error(e);throw r.name="ServerError",r.response=t,r.statusCode=t.status,r.result=n,r},Kt=function(t){var n;try{n=JSON.stringify(t)}catch(t){var e=new m(2);throw e.parseError=t,e}return n},Wt=function(t){function n(n){return t.call(this,function(t){void 0===t&&(t={});var n=t.uri,e=void 0===n?"/graphql":n,r=t.fetch,u=t.includeExtensions,o=t.useGETForQueries,a=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]])}return e}(t,["uri","fetch","includeExtensions","useGETForQueries"]);!function(t){if(!t&&"undefined"==typeof fetch)throw new m(1)}(r),r||(r=fetch);var s={http:{includeExtensions:u},options:a.fetchOptions,credentials:a.credentials,headers:a.headers};return new Et((function(t){var n=function(t,n){return t.getContext().uri||("function"==typeof n?n(t):n||"/graphql")}(t,e),u=t.getContext(),a={};if(u.clientAwareness){var c=u.clientAwareness,f=c.name,h=c.version;f&&(a["apollographql-client-name"]=f),h&&(a["apollographql-client-version"]=h)}var l,d=i({},a,u.headers),v=function(t,n){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var u=i({},n.options,{headers:n.headers,credentials:n.credentials}),o=n.http;e.forEach((function(t){u=i({},u,t.options,{headers:i({},u.headers,t.headers)}),t.credentials&&(u.credentials=t.credentials),o=i({},o,t.http)}));var a=t.operationName,s=t.extensions,c=t.variables,f=t.query,h={operationName:a,variables:c};return o.includeExtensions&&(h.extensions=s),o.includeQuery&&(h.query=Qt(f)),{options:u,body:h}}(t,Jt,s,{http:u.http,options:u.fetchOptions,credentials:u.credentials,headers:d}),m=v.options,p=v.body;if(!m.signal){var y=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var t=new AbortController;return{controller:t,signal:t.signal}}();(l=y.controller)&&(m.signal=y.signal)}if(o&&!t.query.definitions.some((function(t){return"OperationDefinition"===t.kind&&"mutation"===t.operation}))&&(m.method="GET"),"GET"===m.method){var I=function(t,n){var e=[],r=function(t,n){e.push(t+"="+encodeURIComponent(n))};if("query"in n&&r("query",n.query),n.operationName&&r("operationName",n.operationName),n.variables){var i=void 0;try{i=Kt(n.variables)}catch(t){return{parseError:t}}r("variables",i)}if(n.extensions){var u=void 0;try{u=Kt(n.extensions)}catch(t){return{parseError:t}}r("extensions",u)}var o="",a=t,s=t.indexOf("#");-1!==s&&(o=t.substr(s),a=t.substr(0,s));var c=-1===a.indexOf("?")?"?":"&";return{newURI:a+c+e.join("&")+o}}(n,p),g=I.newURI,b=I.parseError;if(b)return mt(b);n=g}else try{m.body=Kt(p)}catch(b){return mt(b)}return new dt((function(e){var i;return r(n,m).then((function(n){return t.setContext({response:n}),n})).then((i=t,function(t){return t.text().then((function(n){try{return JSON.parse(n)}catch(r){var e=r;return e.name="ServerParseError",e.response=t,e.statusCode=t.status,e.bodyText=n,Promise.reject(e)}})).then((function(n){return t.status>=300&&Yt(t,n,"Response not successful: Received status code "+t.status),Array.isArray(n)||n.hasOwnProperty("data")||n.hasOwnProperty("errors")||Yt(t,n,"Server response was missing for query '"+(Array.isArray(i)?i.map((function(t){return t.operationName})):i.operationName)+"'."),n}))})).then((function(t){return e.next(t),e.complete(),t})).catch((function(t){"AbortError"!==t.name&&(t.result&&t.result.errors&&t.result.data&&e.next(t.result),e.error(t))})),function(){l&&l.abort()}}))}))}(n).request)||this}return r(n,t),n}(Et);function Xt(t){return{kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:Ht(t)}]}}function Ht(t){if("number"==typeof t||"boolean"==typeof t||"string"==typeof t||null==t)return null;if(Array.isArray(t))return Ht(t[0]);var n=[];return Object.keys(t).forEach((function(e){var r=Ht(t[e]);n.push({kind:"Field",name:{kind:"Name",value:e},selectionSet:r||void 0})})),{kind:"SelectionSet",selections:n}}var zt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:null,variableDefinitions:null,directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:null,name:{kind:"Name",value:"__typename"},arguments:[],directives:[],selectionSet:null}]}}]},Zt=function(){function t(){}return t.prototype.transformDocument=function(t){return t},t.prototype.transformForLink=function(t){return t},t.prototype.readQuery=function(t,n){return void 0===n&&(n=!1),this.read({query:t.query,variables:t.variables,optimistic:n})},t.prototype.readFragment=function(t,n){return void 0===n&&(n=!1),this.read({query:q(t.fragment,t.fragmentName),variables:t.variables,rootId:t.id,optimistic:n})},t.prototype.writeQuery=function(t){this.write({dataId:"ROOT_QUERY",result:t.data,query:t.query,variables:t.variables})},t.prototype.writeFragment=function(t){this.write({dataId:t.id,result:t.data,variables:t.variables,query:q(t.fragment,t.fragmentName)})},t.prototype.writeData=function(t){var n,e,r=t.id,i=t.data;if(void 0!==r){var u=null;try{u=this.read({rootId:r,optimistic:!1,query:zt})}catch(t){}var o=u&&u.__typename||"__ClientData",a=Object.assign({__typename:o},i);this.writeFragment({id:r,fragment:(n=a,e=o,{kind:"Document",definitions:[{kind:"FragmentDefinition",typeCondition:{kind:"NamedType",name:{kind:"Name",value:e||"__FakeType"}},name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:Ht(n)}]}),data:a})}else this.writeQuery({query:Xt(i),data:i})},t}(),tn=null,nn={},en=1,rn=Array,un=rn["@wry/context:Slot"]||function(){var t=function(){function t(){this.id=["slot",en++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return t.prototype.hasValue=function(){for(var t=tn;t;t=t.parent)if(this.id in t.slots){var n=t.slots[this.id];if(n===nn)break;return t!==tn&&(tn.slots[this.id]=n),!0}return tn&&(tn.slots[this.id]=nn),!1},t.prototype.getValue=function(){if(this.hasValue())return tn.slots[this.id]},t.prototype.withValue=function(t,n,e,r){var i,u=((i={__proto__:null})[this.id]=t,i),o=tn;tn={parent:o,slots:u};try{return n.apply(r,e)}finally{tn=o}},t.bind=function(t){var n=tn;return function(){var e=tn;try{return tn=n,t.apply(this,arguments)}finally{tn=e}}},t.noContext=function(t,n,e){if(!tn)return t.apply(e,n);var r=tn;try{return tn=null,t.apply(e,n)}finally{tn=r}},t}();try{Object.defineProperty(rn,"@wry/context:Slot",{value:rn["@wry/context:Slot"]=t,enumerable:!1,writable:!1,configurable:!1})}finally{return t}}();function on(){}var an=function(){function t(t,n){void 0===t&&(t=1/0),void 0===n&&(n=on),this.max=t,this.dispose=n,this.map=new Map,this.newest=null,this.oldest=null}return t.prototype.has=function(t){return this.map.has(t)},t.prototype.get=function(t){var n=this.getEntry(t);return n&&n.value},t.prototype.getEntry=function(t){var n=this.map.get(t);if(n&&n!==this.newest){var e=n.older,r=n.newer;r&&(r.older=e),e&&(e.newer=r),n.older=this.newest,n.older.newer=n,n.newer=null,this.newest=n,n===this.oldest&&(this.oldest=r)}return n},t.prototype.set=function(t,n){var e=this.getEntry(t);return e?e.value=n:(e={key:t,value:n,newer:null,older:this.newest},this.newest&&(this.newest.newer=e),this.newest=e,this.oldest=this.oldest||e,this.map.set(t,e),e.value)},t.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},t.prototype.delete=function(t){var n=this.map.get(t);return!!n&&(n===this.newest&&(this.newest=n.older),n===this.oldest&&(this.oldest=n.newer),n.newer&&(n.newer.older=n.older),n.older&&(n.older.newer=n.newer),this.map.delete(t),this.dispose(n.value,t),!0)},t}(),sn=new un,cn=[],fn=[];function hn(t,n){if(!t)throw new Error(n||"assertion failure")}function ln(t){switch(t.length){case 0:throw new Error("unknown value");case 1:return t[0];case 2:throw t[1]}}var dn=function(){function t(n,e){this.fn=n,this.args=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],++t.count}return t.prototype.recompute=function(){if(hn(!this.recomputing,"already recomputing"),function(t){var n=sn.getValue();if(n)return t.parents.add(n),n.childValues.has(t)||n.childValues.set(t,[]),mn(t)?In(n,t):gn(n,t),n}(this)||!wn(this))return mn(this)?(n=En(t=this),sn.withValue(t,vn,[t]),function(t){if("function"==typeof t.subscribe)try{Sn(t),t.unsubscribe=t.subscribe.apply(null,t.args)}catch(n){return t.setDirty(),!1}return!0}(t)&&function(t){t.dirty=!1,mn(t)||yn(t)}(t),n.forEach(wn),ln(t.value)):ln(this.value);var t,n},t.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,pn(this),Sn(this))},t.prototype.dispose=function(){var t=this;En(this).forEach(wn),Sn(this),this.parents.forEach((function(n){n.setDirty(),On(n,t)}))},t.count=0,t}();function vn(t){t.recomputing=!0,t.value.length=0;try{t.value[0]=t.fn.apply(null,t.args)}catch(n){t.value[1]=n}t.recomputing=!1}function mn(t){return t.dirty||!(!t.dirtyChildren||!t.dirtyChildren.size)}function pn(t){t.parents.forEach((function(n){return In(n,t)}))}function yn(t){t.parents.forEach((function(n){return gn(n,t)}))}function In(t,n){if(hn(t.childValues.has(n)),hn(mn(n)),t.dirtyChildren){if(t.dirtyChildren.has(n))return}else t.dirtyChildren=fn.pop()||new Set;t.dirtyChildren.add(n),pn(t)}function gn(t,n){hn(t.childValues.has(n)),hn(!mn(n));var e,r,i,u=t.childValues.get(n);0===u.length?t.childValues.set(n,n.value.slice(0)):(r=n.value,(i=(e=u).length)>0&&i===r.length&&e[i-1]===r[i-1]||t.setDirty()),bn(t,n),mn(t)||yn(t)}function bn(t,n){var e=t.dirtyChildren;e&&(e.delete(n),0===e.size&&(fn.length<100&&fn.push(e),t.dirtyChildren=null))}function wn(t){return 0===t.parents.size&&"function"==typeof t.reportOrphan&&!0===t.reportOrphan()}function En(t){var n=cn;return t.childValues.size>0&&(n=[],t.childValues.forEach((function(e,r){On(t,r),n.push(r)}))),hn(null===t.dirtyChildren),n}function On(t,n){n.parents.delete(t),t.childValues.delete(n),bn(t,n)}function Sn(t){var n=t.unsubscribe;"function"==typeof n&&(t.unsubscribe=void 0,n())}var Nn=function(){function t(t){this.weakness=t}return t.prototype.lookup=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this.lookupArray(t)},t.prototype.lookupArray=function(t){var n=this;return t.forEach((function(t){return n=n.getChildTrie(t)})),n.data||(n.data=Object.create(null))},t.prototype.getChildTrie=function(n){var e=this.weakness&&function(t){switch(typeof t){case"object":if(null===t)break;case"function":return!0}return!1}(n)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),r=e.get(n);return r||e.set(n,r=new t(this.weakness)),r},t}(),Tn=new Nn("function"==typeof WeakMap);function _n(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Tn.lookupArray(t)}var kn=new Set;function Dn(t,n){void 0===n&&(n=Object.create(null));var e=new an(n.max||Math.pow(2,16),(function(t){return t.dispose()})),r=!!n.disposable,i=n.makeCacheKey||_n;function u(){if(!r||sn.hasValue()){var u=i.apply(null,arguments);if(void 0===u)return t.apply(null,arguments);var o=Array.prototype.slice.call(arguments),a=e.get(u);a?a.args=o:(a=new dn(t,o),e.set(u,a),a.subscribe=n.subscribe,r&&(a.reportOrphan=function(){return e.delete(u)}));var s=a.recompute();return e.set(u,a),kn.add(e),sn.hasValue()||(kn.forEach((function(t){return t.clean()})),kn.clear()),r?void 0:s}}return u.dirty=function(){var t=i.apply(null,arguments),n=void 0!==t&&e.get(t);n&&n.setDirty()},u}var An=function(){function t(){}return t.prototype.ensureReady=function(){return Promise.resolve()},t.prototype.canBypassInit=function(){return!0},t.prototype.match=function(t,n,e){var r=e.store.get(t.id),i="ROOT_QUERY"===t.id;if(!r)return i;var u=r.__typename,o=void 0===u?i&&"Query":u;return o&&o===n||"heuristic"},t}(),Cn=Object.prototype.hasOwnProperty,Rn=function(){function t(t){var n=this;void 0===t&&(t=Object.create(null)),this.data=t,this.depend=Dn((function(t){return n.data[t]}),{disposable:!0,makeCacheKey:function(t){return t}})}return t.prototype.toObject=function(){return this.data},t.prototype.get=function(t){return this.depend(t),this.data[t]},t.prototype.set=function(t,n){n!==this.data[t]&&(this.data[t]=n,this.depend.dirty(t))},t.prototype.delete=function(t){Cn.call(this.data,t)&&(delete this.data[t],this.depend.dirty(t))},t.prototype.clear=function(){this.replace(null)},t.prototype.replace=function(t){var n=this;t?(Object.keys(t).forEach((function(e){n.set(e,t[e])})),Object.keys(this.data).forEach((function(e){Cn.call(t,e)||n.delete(e)}))):Object.keys(this.data).forEach((function(t){n.delete(t)}))},t}();function jn(t){return new Rn(t)}var Mn=function(){function t(t){var n=this,e=void 0===t?{}:t,r=e.cacheKeyRoot,i=void 0===r?new Nn(nt):r,u=e.freezeResults,o=this.executeStoreQuery,a=this.executeSelectionSet,s=this.executeSubSelectedArray;this.freezeResults=void 0!==u&&u,this.executeStoreQuery=Dn((function(t){return o.call(n,t)}),{makeCacheKey:function(t){var n=t.rootValue,e=t.contextValue;if(e.store instanceof Rn)return i.lookup(e.store,t.query,t.fragmentMatcher,JSON.stringify(t.variableValues),n.id)}}),this.executeSelectionSet=Dn((function(t){return a.call(n,t)}),{makeCacheKey:function(t){var n=t.rootValue,e=t.execContext;if(e.contextValue.store instanceof Rn)return i.lookup(e.contextValue.store,t.selectionSet,e.fragmentMatcher,JSON.stringify(e.variableValues),n.id)}}),this.executeSubSelectedArray=Dn((function(t){return s.call(n,t)}),{makeCacheKey:function(t){var n=t.execContext;if(n.contextValue.store instanceof Rn)return i.lookup(n.contextValue.store,t.field,t.array,JSON.stringify(n.variableValues))}})}return t.prototype.readQueryFromStore=function(t){return this.diffQueryAgainstStore(i(i({},t),{returnPartialData:!1})).result},t.prototype.diffQueryAgainstStore=function(t){var n,e=t.store,r=t.query,i=t.variables,u=t.previousResult,o=t.returnPartialData,a=void 0===o||o,s=t.rootId,c=void 0===s?"ROOT_QUERY":s,f=t.fragmentMatcherFunction,h=t.config;i=L({},Y((p((n=U(r))&&"query"===n.operation,6),n)),i);var l=this.executeStoreQuery({query:r,rootValue:{type:"id",id:c,generated:!0,typename:"Query"},contextValue:{store:e,dataIdFromObject:h&&h.dataIdFromObject,cacheRedirects:h&&h.cacheRedirects||{}},variableValues:i,fragmentMatcher:f}),d=l.missing&&l.missing.length>0;return d&&!a&&l.missing.forEach((function(t){if(!t.tolerable)throw new m(8)})),u&&O(u,l.result)&&(l.result=u),{result:l.result,complete:!d}},t.prototype.executeStoreQuery=function(t){var n=t.query,e=t.rootValue,r=t.contextValue,i=t.variableValues,u=t.fragmentMatcher,o=void 0===u?xn:u,a=Q(n),s=J(G(n));return this.executeSelectionSet({selectionSet:a.selectionSet,rootValue:e,execContext:{query:n,fragmentMap:s,contextValue:r,variableValues:i,fragmentMatcher:o}})},t.prototype.executeSelectionSet=function(t){var n=this,e=t.selectionSet,r=t.rootValue,u=t.execContext,o=u.fragmentMap,a=u.contextValue,s=u.variableValues,c={result:null},f=[],h=a.store.get(r.id),l=h&&h.__typename||"ROOT_QUERY"===r.id&&"Query"||void 0;function d(t){var n;return t.missing&&(c.missing=c.missing||[],(n=c.missing).push.apply(n,t.missing)),t.result}return e.selections.forEach((function(t){var e;if($(t,s))if(A(t)){var c=d(n.executeField(h,l,t,u));void 0!==c&&f.push(((e={})[D(t)]=c,e))}else{var v=void 0;if(C(t))v=t;else if(!(v=o[t.name.value]))throw new m(9);var p=v.typeCondition&&v.typeCondition.name.value,y=!p||u.fragmentMatcher(r,p,a);if(y){var I=n.executeSelectionSet({selectionSet:v.selectionSet,rootValue:r,execContext:u});"heuristic"===y&&I.missing&&(I=i(i({},I),{missing:I.missing.map((function(t){return i(i({},t),{tolerable:!0})}))})),f.push(d(I))}}})),c.result=at(f),c},t.prototype.executeField=function(t,n,e,r){var i=r.variableValues,u=r.contextValue,o=function(t,n,e,r,i,u){var o=u.directives,a=e;(r||o)&&(a=_(a,r,o));var s,c=void 0;if(t&&void 0===(c=t[a])&&i.cacheRedirects&&"string"==typeof n){var f=i.cacheRedirects[n];if(f){var h=f[e];h&&(c=h(t,r,{getCacheKey:function(t){var n=i.dataIdFromObject(t);return n&&j({id:n,typename:t.__typename})}}))}}return void 0===c?{result:c,missing:[{object:t,fieldName:a,tolerable:!1}]}:(null!=(s=c)&&"object"==typeof s&&"json"===s.type&&(c=c.json),{result:c})}(t,n,e.name.value,k(e,i),u,{resultKey:D(e),directives:M(e,i)});return Array.isArray(o.result)?this.combineExecResults(o,this.executeSubSelectedArray({field:e,array:o.result,execContext:r})):e.selectionSet?null==o.result?o:this.combineExecResults(o,this.executeSelectionSet({selectionSet:e.selectionSet,rootValue:o.result,execContext:r})):($n(e,o.result),o)},t.prototype.combineExecResults=function(){for(var t,n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return n.forEach((function(n){n.missing&&(t=t||[]).push.apply(t,n.missing)})),{result:n.pop().result,missing:t}},t.prototype.executeSubSelectedArray=function(t){var n,e=this,r=t.field,i=t.array,u=t.execContext;function o(t){return t.missing&&(n=n||[]).push.apply(n,t.missing),t.result}return{result:i=i.map((function(t){return null===t?null:Array.isArray(t)?o(e.executeSubSelectedArray({field:r,array:t,execContext:u})):r.selectionSet?o(e.executeSelectionSet({selectionSet:r.selectionSet,rootValue:t,execContext:u})):($n(r,t),t)})),missing:n}},t}();function $n(t,n){if(!t.selectionSet&&R(n))throw new m(10)}function xn(){return!0}var Fn=function(){function t(t){void 0===t&&(t=Object.create(null)),this.data=t}return t.prototype.toObject=function(){return this.data},t.prototype.get=function(t){return this.data[t]},t.prototype.set=function(t,n){this.data[t]=n},t.prototype.delete=function(t){this.data[t]=void 0},t.prototype.clear=function(){this.data=Object.create(null)},t.prototype.replace=function(t){this.data=t||Object.create(null)},t}(),Vn=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="WriteError",n}return r(n,t),n}(Error),qn=function(){function t(){}return t.prototype.writeQueryToStore=function(t){var n=t.query,e=t.result,r=t.store,i=void 0===r?jn():r;return this.writeResultToStore({dataId:"ROOT_QUERY",result:e,document:n,store:i,variables:t.variables,dataIdFromObject:t.dataIdFromObject,fragmentMatcherFunction:t.fragmentMatcherFunction})},t.prototype.writeResultToStore=function(t){var n=t.dataId,e=t.result,r=t.document,i=t.store,u=void 0===i?jn():i,o=t.variables,a=t.dataIdFromObject,s=t.fragmentMatcherFunction,c=U(r);try{return this.writeSelectionSetToStore({result:e,dataId:n,selectionSet:c.selectionSet,context:{store:u,processedData:{},variables:L({},Y(c),o),dataIdFromObject:a,fragmentMap:J(G(r)),fragmentMatcherFunction:s}})}catch(t){throw function(t,n){var e=new Vn("Error writing result to store for query:\n "+JSON.stringify(n));return e.message+="\n"+t.message,e.stack=t.stack,e}(t,r)}},t.prototype.writeSelectionSetToStore=function(t){var n=this,e=t.result,r=t.dataId,i=t.context,u=i.variables,o=i.store,a=i.fragmentMap;return t.selectionSet.selections.forEach((function(t){var o;if($(t,u))if(A(t)){var s=D(t),c=e[s];void 0!==c?n.writeFieldToStore({dataId:r,value:c,field:t,context:i}):t.directives&&t.directives.length&&(t.directives.some((function(t){return t.name&&"defer"===t.name.value})),t.directives.some((function(t){return t.name&&"client"===t.name.value})))}else{var f=void 0;C(t)?f=t:p(f=(a||{})[t.name.value],3);var h=!0;if(i.fragmentMatcherFunction&&f.typeCondition){var l=r||"self",d=j({id:l,typename:void 0}),v={store:new Fn((o={},o[l]=e,o)),cacheRedirects:{}};h=!!i.fragmentMatcherFunction(d,f.typeCondition.name.value,v)}h&&n.writeSelectionSetToStore({result:e,selectionSet:f.selectionSet,dataId:r,context:i})}})),o},t.prototype.writeFieldToStore=function(t){var n,e,r,u=t.field,o=t.value,a=t.dataId,s=t.context,c=s.dataIdFromObject,f=s.store,h=function(t,n){var e=null;t.directives&&(e={},t.directives.forEach((function(t){e[t.name.value]={},t.arguments&&t.arguments.forEach((function(r){return N(e[t.name.value],r.name,r.value,n)}))})));var r=null;return t.arguments&&t.arguments.length&&(r={},t.arguments.forEach((function(t){return N(r,t.name,t.value,n)}))),_(t.name.value,r,e)}(u,s.variables);if(u.selectionSet&&null!==o)if(Array.isArray(o))e=this.processArrayValue(o,a+"."+h,u.selectionSet,s);else{var l=a+"."+h,d=!0;if(Ln(l)||(l="$"+l),c){var v=c(o);p(!v||!Ln(v),4),(v||"number"==typeof v&&0===v)&&(l=v,d=!1)}Pn(l,u,s.processedData)||this.writeSelectionSetToStore({dataId:l,result:o,selectionSet:u.selectionSet,context:s});var m=o.__typename;e=j({id:l,typename:m},d);var y=(r=f.get(a))&&r[h];if(y!==e&&R(y)){var I=void 0!==y.typename,g=void 0!==m,b=I&&g&&y.typename!==m;p(!d||y.generated||b,5),p(!I||g,6),y.generated&&(b?d||f.delete(y.id):function t(n,e,r){if(n===e)return!1;var u=r.get(n),o=r.get(e),a=!1;Object.keys(u).forEach((function(n){var e=u[n],i=o[n];R(e)&&Ln(e.id)&&R(i)&&!O(e,i)&&t(e.id,i.id,r)&&(a=!0)})),r.delete(n);var s=i(i({},u),o);return O(s,o)?a:(r.set(e,s),!0)}(y.id,e.id,f))}}else e=null!=o&&"object"==typeof o?{type:"json",json:o}:o;(r=f.get(a))&&O(e,r[h])||f.set(a,i(i({},r),((n={})[h]=e,n)))},t.prototype.processArrayValue=function(t,n,e,r){var i=this;return t.map((function(t,u){if(null===t)return null;var o=n+"."+u;if(Array.isArray(t))return i.processArrayValue(t,o,e,r);var a=!0;if(r.dataIdFromObject){var s=r.dataIdFromObject(t);s&&(o=s,a=!1)}return Pn(o,e,r.processedData)||i.writeSelectionSetToStore({dataId:o,result:t,selectionSet:e,context:r}),j({id:o,typename:t.__typename},a)}))},t}();function Ln(t){return"$"===t[0]}function Pn(t,n,e){if(!e)return!1;if(e[t]){if(e[t].indexOf(n)>=0)return!0;e[t].push(n)}else e[t]=[n];return!1}var Un={fragmentMatcher:new An,dataIdFromObject:function(t){if(t.__typename){if(void 0!==t.id)return t.__typename+":"+t.id;if(void 0!==t._id)return t.__typename+":"+t._id}return null},addTypename:!0,resultCaching:!0,freezeResults:!1},Bn=Object.prototype.hasOwnProperty,Gn=function(t){function n(n,e,r){var i=t.call(this,Object.create(null))||this;return i.optimisticId=n,i.parent=e,i.transaction=r,i}return r(n,t),n.prototype.toObject=function(){return i(i({},this.parent.toObject()),this.data)},n.prototype.get=function(t){return Bn.call(this.data,t)?this.data[t]:this.parent.get(t)},n}(Fn),Qn=function(t){function n(n){void 0===n&&(n={});var e=t.call(this)||this;e.watches=new Set,e.typenameDocumentCache=new Map,e.cacheKeyRoot=new Nn(nt),e.silenceBroadcast=!1,e.config=i(i({},Un),n),e.config.customResolvers&&(e.config.cacheRedirects=e.config.customResolvers),e.config.cacheResolvers&&(e.config.cacheRedirects=e.config.cacheResolvers),e.addTypename=!!e.config.addTypename,e.data=e.config.resultCaching?new Rn:new Fn,e.optimisticData=e.data,e.storeWriter=new qn,e.storeReader=new Mn({cacheKeyRoot:e.cacheKeyRoot,freezeResults:n.freezeResults});var r=e,u=r.maybeBroadcastWatch;return e.maybeBroadcastWatch=Dn((function(t){return u.call(e,t)}),{makeCacheKey:function(t){if(!t.optimistic&&!t.previousResult)return r.data instanceof Rn?r.cacheKeyRoot.lookup(t.query,JSON.stringify(t.variables)):void 0}}),e}return r(n,t),n.prototype.restore=function(t){return t&&this.data.replace(t),this},n.prototype.extract=function(t){return void 0===t&&(t=!1),(t?this.optimisticData:this.data).toObject()},n.prototype.read=function(t){if("string"==typeof t.rootId&&void 0===this.data.get(t.rootId))return null;var n=this.config.fragmentMatcher,e=n&&n.match;return this.storeReader.readQueryFromStore({store:t.optimistic?this.optimisticData:this.data,query:this.transformDocument(t.query),variables:t.variables,rootId:t.rootId,fragmentMatcherFunction:e,previousResult:t.previousResult,config:this.config})||null},n.prototype.write=function(t){var n=this.config.fragmentMatcher,e=n&&n.match;this.storeWriter.writeResultToStore({dataId:t.dataId,result:t.result,variables:t.variables,document:this.transformDocument(t.query),store:this.data,dataIdFromObject:this.config.dataIdFromObject,fragmentMatcherFunction:e}),this.broadcastWatches()},n.prototype.diff=function(t){var n=this.config.fragmentMatcher,e=n&&n.match;return this.storeReader.diffQueryAgainstStore({store:t.optimistic?this.optimisticData:this.data,query:this.transformDocument(t.query),variables:t.variables,returnPartialData:t.returnPartialData,previousResult:t.previousResult,fragmentMatcherFunction:e,config:this.config})},n.prototype.watch=function(t){var n=this;return this.watches.add(t),function(){n.watches.delete(t)}},n.prototype.evict=function(){throw new m(7)},n.prototype.reset=function(){return this.data.clear(),this.broadcastWatches(),Promise.resolve()},n.prototype.removeOptimistic=function(t){for(var n=[],e=0,r=this.optimisticData;r instanceof Gn;)r.optimisticId===t?++e:n.push(r),r=r.parent;if(e>0){for(this.optimisticData=r;n.length>0;){var i=n.pop();this.performTransaction(i.transaction,i.optimisticId)}this.broadcastWatches()}},n.prototype.performTransaction=function(t,n){var e=this.data,r=this.silenceBroadcast;this.silenceBroadcast=!0,"string"==typeof n&&(this.data=this.optimisticData=new Gn(n,this.optimisticData,t));try{t(this)}finally{this.silenceBroadcast=r,this.data=e}this.broadcastWatches()},n.prototype.recordOptimisticTransaction=function(t,n){return this.performTransaction(t,n)},n.prototype.transformDocument=function(t){if(this.addTypename){var n=this.typenameDocumentCache.get(t);return n||(n=h(P(t),{SelectionSet:{enter:function(t,n,e){if(!e||"OperationDefinition"!==e.kind){var r=t.selections;if(r&&!r.some((function(t){return A(t)&&("__typename"===t.name.value||0===t.name.value.lastIndexOf("__",0))}))){var u=e;if(!(A(u)&&u.directives&&u.directives.some((function(t){return"export"===t.name.value}))))return i(i({},t),{selections:a(r,[W])})}}}}}),this.typenameDocumentCache.set(t,n),this.typenameDocumentCache.set(n,n)),n}return t},n.prototype.broadcastWatches=function(){var t=this;this.silenceBroadcast||this.watches.forEach((function(n){return t.maybeBroadcastWatch(n)}))},n.prototype.maybeBroadcastWatch=function(t){t.callback(this.diff({query:t.query,variables:t.variables,previousResult:t.previousResult&&t.previousResult(),optimistic:t.optimistic}))},n}(Zt),Jn=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if(!Boolean(t))throw new Error(n)}}));n(Jn);var Yn=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.prototype.toString;t.prototype.toJSON=n,t.prototype.inspect=n,r.default&&(t.prototype[r.default]=n)};var e,r=(e=s)&&e.__esModule?e:{default:e}}));n(Yn);var Kn=t((function(t,n){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){return"object"==e(t)&&null!==t}}));n(Kn);var Wn=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getLocation=function(t,n){for(var e,r=/\r\n|[\n\r]/g,i=1,u=n+1;(e=r.exec(t.body))&&e.index<n;)i+=1,u=n+1-(e.index+e[0].length);return{line:i,column:u}}}));n(Wn);var Xn=t((function(t,n){function e(t,n){var e=t.locationOffset.column-1,u=i(e)+t.body,o=n.line-1,a=n.line+(t.locationOffset.line-1),s=n.column+(1===n.line?e:0),c="".concat(t.name,":").concat(a,":").concat(s,"\n"),f=u.split(/\r\n|[\n\r]/g),h=f[o];if(h.length>120){for(var l=Math.floor(s/80),d=s%80,v=[],m=0;m<h.length;m+=80)v.push(h.slice(m,m+80));return c+r([["".concat(a),v[0]]].concat(v.slice(1,l+1).map((function(t){return["",t]})),[[" ",i(d-1)+"^"],["",v[l+1]]]))}return c+r([["".concat(a-1),f[o-1]],["".concat(a),h],["",i(s-1)+"^"],["".concat(a+1),f[o+1]]])}function r(t){var n=t.filter((function(t){return void 0!==t[1]})),e=Math.max.apply(Math,n.map((function(t){return t[0].length})));return n.map((function(t){var n,r=t[1];return i(e-(n=t[0]).length)+n+(r?" | "+r:" |")})).join("\n")}function i(t){return Array(t+1).join(" ")}Object.defineProperty(n,"__esModule",{value:!0}),n.printLocation=function(t){return e(t.source,(0,Wn.getLocation)(t.source,t.start))},n.printSourceLocation=e}));n(Xn);var Hn=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.GraphQLError=i,n.printError=u;var e,r=(e=Kn)&&e.__esModule?e:{default:e};function i(t,n,e,u,o,a,s){var c=Array.isArray(n)?0!==n.length?n:void 0:n?[n]:void 0,f=e;if(!f&&c){var h=c[0];f=h&&h.loc&&h.loc.source}var l,d=u;!d&&c&&(d=c.reduce((function(t,n){return n.loc&&t.push(n.loc.start),t}),[])),d&&0===d.length&&(d=void 0),u&&e?l=u.map((function(t){return(0,Wn.getLocation)(e,t)})):c&&(l=c.reduce((function(t,n){return n.loc&&t.push((0,Wn.getLocation)(n.loc.source,n.loc.start)),t}),[]));var v=s;if(null==v&&null!=a){var m=a.extensions;(0,r.default)(m)&&(v=m)}Object.defineProperties(this,{message:{value:t,enumerable:!0,writable:!0},locations:{value:l||void 0,enumerable:Boolean(l)},path:{value:o||void 0,enumerable:Boolean(o)},nodes:{value:c||void 0},source:{value:f||void 0},positions:{value:d||void 0},originalError:{value:a},extensions:{value:v||void 0,enumerable:Boolean(v)}}),a&&a.stack?Object.defineProperty(this,"stack",{value:a.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,i):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}function u(t){var n=t.message;if(t.nodes)for(var e=0,r=t.nodes;e<r.length;e++){var i=r[e];i.loc&&(n+="\n\n"+(0,Xn.printLocation)(i.loc))}else if(t.source&&t.locations)for(var u=0,o=t.locations;u<o.length;u++)n+="\n\n"+(0,Xn.printSourceLocation)(t.source,o[u]);return n}i.prototype=Object.create(Error.prototype,{constructor:{value:i},name:{value:"GraphQLError"},toString:{value:function(){return u(this)}}})}));n(Hn);var zn=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.syntaxError=function(t,n,e){return new Hn.GraphQLError("Syntax Error: ".concat(e),void 0,t,[n])}}));n(zn);var Zn=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Kind=void 0;var e=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"});n.Kind=e}));n(Zn);var te=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){"function"==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t.prototype,Symbol.toStringTag,{get:function(){return this.constructor.name}})}}));n(te);var ne=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Source=void 0;var e=i(Jn),r=i(te);function i(t){return t&&t.__esModule?t:{default:t}}var u=function(t,n,r){this.body=t,this.name=n||"GraphQL request",this.locationOffset=r||{line:1,column:1},this.locationOffset.line>0||(0,e.default)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||(0,e.default)(0,"column in locationOffset is 1-indexed and must be positive")};n.Source=u,(0,r.default)(u)}));n(ne);var ee=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.TokenKind=void 0;var e=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"});n.TokenKind=e}));n(ee);var re=t((function(t,n){var e;function r(){return this.lastToken=this.token,this.token=this.lookahead()}function i(){var t=this.token;if(t.kind!==ee.TokenKind.EOF)do{t=t.next||(t.next=a(this,t))}while(t.kind===ee.TokenKind.COMMENT);return t}function u(t,n,e,r,i,u,o){this.kind=t,this.start=n,this.end=e,this.line=r,this.column=i,this.value=o,this.prev=u,this.next=null}function o(t){return isNaN(t)?ee.TokenKind.EOF:t<127?JSON.stringify(String.fromCharCode(t)):'"\\u'.concat(("00"+t.toString(16).toUpperCase()).slice(-4),'"')}function a(t,n){var e=t.source,r=e.body,i=r.length,a=function(t,n,e){for(var r=t.length,i=n;i<r;){var u=t.charCodeAt(i);if(9===u||32===u||44===u||65279===u)++i;else if(10===u)++i,++e.line,e.lineStart=i;else{if(13!==u)break;10===t.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i}}return i}(r,n.end,t),f=t.line,h=1+a-t.lineStart;if(a>=i)return new u(ee.TokenKind.EOF,i,i,f,h,n);var l=r.charCodeAt(a);switch(l){case 33:return new u(ee.TokenKind.BANG,a,a+1,f,h,n);case 35:return function(t,n,e,r,i){var o,a=t.body,s=n;do{o=a.charCodeAt(++s)}while(!isNaN(o)&&(o>31||9===o));return new u(ee.TokenKind.COMMENT,n,s,e,r,i,a.slice(n+1,s))}(e,a,f,h,n);case 36:return new u(ee.TokenKind.DOLLAR,a,a+1,f,h,n);case 38:return new u(ee.TokenKind.AMP,a,a+1,f,h,n);case 40:return new u(ee.TokenKind.PAREN_L,a,a+1,f,h,n);case 41:return new u(ee.TokenKind.PAREN_R,a,a+1,f,h,n);case 46:if(46===r.charCodeAt(a+1)&&46===r.charCodeAt(a+2))return new u(ee.TokenKind.SPREAD,a,a+3,f,h,n);break;case 58:return new u(ee.TokenKind.COLON,a,a+1,f,h,n);case 61:return new u(ee.TokenKind.EQUALS,a,a+1,f,h,n);case 64:return new u(ee.TokenKind.AT,a,a+1,f,h,n);case 91:return new u(ee.TokenKind.BRACKET_L,a,a+1,f,h,n);case 93:return new u(ee.TokenKind.BRACKET_R,a,a+1,f,h,n);case 123:return new u(ee.TokenKind.BRACE_L,a,a+1,f,h,n);case 124:return new u(ee.TokenKind.PIPE,a,a+1,f,h,n);case 125:return new u(ee.TokenKind.BRACE_R,a,a+1,f,h,n);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 function(t,n,e,r,i){for(var o=t.body,a=o.length,s=n+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 u(ee.TokenKind.NAME,n,s,e,r,i,o.slice(n,s))}(e,a,f,h,n);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(t,n,e,r,i,a){var c=t.body,f=e,h=n,l=!1;if(45===f&&(f=c.charCodeAt(++h)),48===f){if((f=c.charCodeAt(++h))>=48&&f<=57)throw(0,zn.syntaxError)(t,h,"Invalid number, unexpected digit after 0: ".concat(o(f),"."))}else h=s(t,h,f),f=c.charCodeAt(h);if(46===f&&(l=!0,f=c.charCodeAt(++h),h=s(t,h,f),f=c.charCodeAt(h)),69!==f&&101!==f||(l=!0,43!==(f=c.charCodeAt(++h))&&45!==f||(f=c.charCodeAt(++h)),h=s(t,h,f),f=c.charCodeAt(h)),46===f||69===f||101===f)throw(0,zn.syntaxError)(t,h,"Invalid number, expected digit but got: ".concat(o(f),"."));return new u(l?ee.TokenKind.FLOAT:ee.TokenKind.INT,n,h,r,i,a,c.slice(n,h))}(e,a,l,f,h,n);case 34:return 34===r.charCodeAt(a+1)&&34===r.charCodeAt(a+2)?function(t,n,e,r,i,a){for(var s=t.body,c=n+3,f=c,h=0,l="";c<s.length&&!isNaN(h=s.charCodeAt(c));){if(34===h&&34===s.charCodeAt(c+1)&&34===s.charCodeAt(c+2))return l+=s.slice(f,c),new u(ee.TokenKind.BLOCK_STRING,n,c+3,e,r,i,(0,Bt.dedentBlockStringValue)(l));if(h<32&&9!==h&&10!==h&&13!==h)throw(0,zn.syntaxError)(t,c,"Invalid character within String: ".concat(o(h),"."));10===h?(++c,++a.line,a.lineStart=c):13===h?(10===s.charCodeAt(c+1)?c+=2:++c,++a.line,a.lineStart=c):92===h&&34===s.charCodeAt(c+1)&&34===s.charCodeAt(c+2)&&34===s.charCodeAt(c+3)?(l+=s.slice(f,c)+'"""',f=c+=4):++c}throw(0,zn.syntaxError)(t,c,"Unterminated string.")}(e,a,f,h,n,t):function(t,n,e,r,i){for(var a,s,f,h,l=t.body,d=n+1,v=d,m=0,p="";d<l.length&&!isNaN(m=l.charCodeAt(d))&&10!==m&&13!==m;){if(34===m)return p+=l.slice(v,d),new u(ee.TokenKind.STRING,n,d+1,e,r,i,p);if(m<32&&9!==m)throw(0,zn.syntaxError)(t,d,"Invalid character within String: ".concat(o(m),"."));if(++d,92===m){switch(p+=l.slice(v,d-1),m=l.charCodeAt(d)){case 34:p+='"';break;case 47:p+="/";break;case 92:p+="\\";break;case 98:p+="\b";break;case 102:p+="\f";break;case 110:p+="\n";break;case 114:p+="\r";break;case 116:p+="\t";break;case 117:var y=(a=l.charCodeAt(d+1),s=l.charCodeAt(d+2),f=l.charCodeAt(d+3),h=l.charCodeAt(d+4),c(a)<<12|c(s)<<8|c(f)<<4|c(h));if(y<0){var I=l.slice(d+1,d+5);throw(0,zn.syntaxError)(t,d,"Invalid character escape sequence: \\u".concat(I,"."))}p+=String.fromCharCode(y),d+=4;break;default:throw(0,zn.syntaxError)(t,d,"Invalid character escape sequence: \\".concat(String.fromCharCode(m),"."))}v=++d}}throw(0,zn.syntaxError)(t,d,"Unterminated string.")}(e,a,f,h,n)}throw(0,zn.syntaxError)(e,a,function(t){return t<32&&9!==t&&10!==t&&13!==t?"Cannot contain the invalid character ".concat(o(t),"."):39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(o(t),".")}(l))}function s(t,n,e){var r=t.body,i=n,u=e;if(u>=48&&u<=57){do{u=r.charCodeAt(++i)}while(u>=48&&u<=57);return i}throw(0,zn.syntaxError)(t,i,"Invalid number, expected digit but got: ".concat(o(u),"."))}function c(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}Object.defineProperty(n,"__esModule",{value:!0}),n.createLexer=function(t,n){var e=new u(ee.TokenKind.SOF,0,0,0,0,null);return{source:t,options:n,lastToken:e,token:e,line:1,lineStart:0,advance:r,lookahead:i}},n.isPunctuatorToken=function(t){var n=t.kind;return n===ee.TokenKind.BANG||n===ee.TokenKind.DOLLAR||n===ee.TokenKind.AMP||n===ee.TokenKind.PAREN_L||n===ee.TokenKind.PAREN_R||n===ee.TokenKind.SPREAD||n===ee.TokenKind.COLON||n===ee.TokenKind.EQUALS||n===ee.TokenKind.AT||n===ee.TokenKind.BRACKET_L||n===ee.TokenKind.BRACKET_R||n===ee.TokenKind.BRACE_L||n===ee.TokenKind.PIPE||n===ee.TokenKind.BRACE_R},(0,((e=Yn)&&e.__esModule?e:{default:e}).default)(u,(function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}))}));n(re);var ie=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectiveLocation=void 0;var e=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.DirectiveLocation=e}));n(ie);var ue=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.parse=function(t,n){return new o(t,n).parseDocument()},n.parseValue=function(t,n){var e=new o(t,n);e.expectToken(ee.TokenKind.SOF);var r=e.parseValueLiteral(!1);return e.expectToken(ee.TokenKind.EOF),r},n.parseType=function(t,n){var e=new o(t,n);e.expectToken(ee.TokenKind.SOF);var r=e.parseTypeReference();return e.expectToken(ee.TokenKind.EOF),r};var e=u(c),r=u(Jn),i=u(Yn);function u(t){return t&&t.__esModule?t:{default:t}}var o=function(){function t(t,n){var i="string"==typeof t?new ne.Source(t):t;i instanceof ne.Source||(0,r.default)(0,"Must provide Source. Received: ".concat((0,e.default)(i))),this._lexer=(0,re.createLexer)(i),this._options=n||{}}var n=t.prototype;return n.parseName=function(){var t=this.expectToken(ee.TokenKind.NAME);return{kind:Zn.Kind.NAME,value:t.value,loc:this.loc(t)}},n.parseDocument=function(){var t=this._lexer.token;return{kind:Zn.Kind.DOCUMENT,definitions:this.many(ee.TokenKind.SOF,this.parseDefinition,ee.TokenKind.EOF),loc:this.loc(t)}},n.parseDefinition=function(){if(this.peek(ee.TokenKind.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(ee.TokenKind.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},n.parseOperationDefinition=function(){var t=this._lexer.token;if(this.peek(ee.TokenKind.BRACE_L))return{kind:Zn.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(t)};var n,e=this.parseOperationType();return this.peek(ee.TokenKind.NAME)&&(n=this.parseName()),{kind:Zn.Kind.OPERATION_DEFINITION,operation:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},n.parseOperationType=function(){var t=this.expectToken(ee.TokenKind.NAME);switch(t.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(t)},n.parseVariableDefinitions=function(){return this.optionalMany(ee.TokenKind.PAREN_L,this.parseVariableDefinition,ee.TokenKind.PAREN_R)},n.parseVariableDefinition=function(){var t=this._lexer.token;return{kind:Zn.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(ee.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(ee.TokenKind.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(t)}},n.parseVariable=function(){var t=this._lexer.token;return this.expectToken(ee.TokenKind.DOLLAR),{kind:Zn.Kind.VARIABLE,name:this.parseName(),loc:this.loc(t)}},n.parseSelectionSet=function(){var t=this._lexer.token;return{kind:Zn.Kind.SELECTION_SET,selections:this.many(ee.TokenKind.BRACE_L,this.parseSelection,ee.TokenKind.BRACE_R),loc:this.loc(t)}},n.parseSelection=function(){return this.peek(ee.TokenKind.SPREAD)?this.parseFragment():this.parseField()},n.parseField=function(){var t,n,e=this._lexer.token,r=this.parseName();return this.expectOptionalToken(ee.TokenKind.COLON)?(t=r,n=this.parseName()):n=r,{kind:Zn.Kind.FIELD,alias:t,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(ee.TokenKind.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(e)}},n.parseArguments=function(t){return this.optionalMany(ee.TokenKind.PAREN_L,t?this.parseConstArgument:this.parseArgument,ee.TokenKind.PAREN_R)},n.parseArgument=function(){var t=this._lexer.token,n=this.parseName();return this.expectToken(ee.TokenKind.COLON),{kind:Zn.Kind.ARGUMENT,name:n,value:this.parseValueLiteral(!1),loc:this.loc(t)}},n.parseConstArgument=function(){var t=this._lexer.token;return{kind:Zn.Kind.ARGUMENT,name:this.parseName(),value:(this.expectToken(ee.TokenKind.COLON),this.parseValueLiteral(!0)),loc:this.loc(t)}},n.parseFragment=function(){var t=this._lexer.token;this.expectToken(ee.TokenKind.SPREAD);var n=this.expectOptionalKeyword("on");return!n&&this.peek(ee.TokenKind.NAME)?{kind:Zn.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(t)}:{kind:Zn.Kind.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},n.parseFragmentDefinition=function(){var t=this._lexer.token;return this.expectKeyword("fragment"),this._options.experimentalFragmentVariables?{kind:Zn.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:Zn.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},n.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},n.parseValueLiteral=function(t){var n=this._lexer.token;switch(n.kind){case ee.TokenKind.BRACKET_L:return this.parseList(t);case ee.TokenKind.BRACE_L:return this.parseObject(t);case ee.TokenKind.INT:return this._lexer.advance(),{kind:Zn.Kind.INT,value:n.value,loc:this.loc(n)};case ee.TokenKind.FLOAT:return this._lexer.advance(),{kind:Zn.Kind.FLOAT,value:n.value,loc:this.loc(n)};case ee.TokenKind.STRING:case ee.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case ee.TokenKind.NAME:return"true"===n.value||"false"===n.value?(this._lexer.advance(),{kind:Zn.Kind.BOOLEAN,value:"true"===n.value,loc:this.loc(n)}):"null"===n.value?(this._lexer.advance(),{kind:Zn.Kind.NULL,loc:this.loc(n)}):(this._lexer.advance(),{kind:Zn.Kind.ENUM,value:n.value,loc:this.loc(n)});case ee.TokenKind.DOLLAR:if(!t)return this.parseVariable()}throw this.unexpected()},n.parseStringLiteral=function(){var t=this._lexer.token;return this._lexer.advance(),{kind:Zn.Kind.STRING,value:t.value,block:t.kind===ee.TokenKind.BLOCK_STRING,loc:this.loc(t)}},n.parseList=function(t){var n=this,e=this._lexer.token;return{kind:Zn.Kind.LIST,values:this.any(ee.TokenKind.BRACKET_L,(function(){return n.parseValueLiteral(t)}),ee.TokenKind.BRACKET_R),loc:this.loc(e)}},n.parseObject=function(t){var n=this,e=this._lexer.token;return{kind:Zn.Kind.OBJECT,fields:this.any(ee.TokenKind.BRACE_L,(function(){return n.parseObjectField(t)}),ee.TokenKind.BRACE_R),loc:this.loc(e)}},n.parseObjectField=function(t){var n=this._lexer.token,e=this.parseName();return this.expectToken(ee.TokenKind.COLON),{kind:Zn.Kind.OBJECT_FIELD,name:e,value:this.parseValueLiteral(t),loc:this.loc(n)}},n.parseDirectives=function(t){for(var n=[];this.peek(ee.TokenKind.AT);)n.push(this.parseDirective(t));return n},n.parseDirective=function(t){var n=this._lexer.token;return this.expectToken(ee.TokenKind.AT),{kind:Zn.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t),loc:this.loc(n)}},n.parseTypeReference=function(){var t,n=this._lexer.token;return this.expectOptionalToken(ee.TokenKind.BRACKET_L)?(t=this.parseTypeReference(),this.expectToken(ee.TokenKind.BRACKET_R),t={kind:Zn.Kind.LIST_TYPE,type:t,loc:this.loc(n)}):t=this.parseNamedType(),this.expectOptionalToken(ee.TokenKind.BANG)?{kind:Zn.Kind.NON_NULL_TYPE,type:t,loc:this.loc(n)}:t},n.parseNamedType=function(){var t=this._lexer.token;return{kind:Zn.Kind.NAMED_TYPE,name:this.parseName(),loc:this.loc(t)}},n.parseTypeSystemDefinition=function(){var t=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(t.kind===ee.TokenKind.NAME)switch(t.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(t)},n.peekDescription=function(){return this.peek(ee.TokenKind.STRING)||this.peek(ee.TokenKind.BLOCK_STRING)},n.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},n.parseSchemaDefinition=function(){var t=this._lexer.token;this.expectKeyword("schema");var n=this.parseDirectives(!0),e=this.many(ee.TokenKind.BRACE_L,this.parseOperationTypeDefinition,ee.TokenKind.BRACE_R);return{kind:Zn.Kind.SCHEMA_DEFINITION,directives:n,operationTypes:e,loc:this.loc(t)}},n.parseOperationTypeDefinition=function(){var t=this._lexer.token,n=this.parseOperationType();this.expectToken(ee.TokenKind.COLON);var e=this.parseNamedType();return{kind:Zn.Kind.OPERATION_TYPE_DEFINITION,operation:n,type:e,loc:this.loc(t)}},n.parseScalarTypeDefinition=function(){var t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");var e=this.parseName(),r=this.parseDirectives(!0);return{kind:Zn.Kind.SCALAR_TYPE_DEFINITION,description:n,name:e,directives:r,loc:this.loc(t)}},n.parseObjectTypeDefinition=function(){var t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");var e=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),u=this.parseFieldsDefinition();return{kind:Zn.Kind.OBJECT_TYPE_DEFINITION,description:n,name:e,interfaces:r,directives:i,fields:u,loc:this.loc(t)}},n.parseImplementsInterfaces=function(){var t=[];if(this.expectOptionalKeyword("implements")){this.expectOptionalToken(ee.TokenKind.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(ee.TokenKind.AMP)||this._options.allowLegacySDLImplementsInterfaces&&this.peek(ee.TokenKind.NAME))}return t},n.parseFieldsDefinition=function(){return this._options.allowLegacySDLEmptyFields&&this.peek(ee.TokenKind.BRACE_L)&&this._lexer.lookahead().kind===ee.TokenKind.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(ee.TokenKind.BRACE_L,this.parseFieldDefinition,ee.TokenKind.BRACE_R)},n.parseFieldDefinition=function(){var t=this._lexer.token,n=this.parseDescription(),e=this.parseName(),r=this.parseArgumentDefs();this.expectToken(ee.TokenKind.COLON);var i=this.parseTypeReference(),u=this.parseDirectives(!0);return{kind:Zn.Kind.FIELD_DEFINITION,description:n,name:e,arguments:r,type:i,directives:u,loc:this.loc(t)}},n.parseArgumentDefs=function(){return this.optionalMany(ee.TokenKind.PAREN_L,this.parseInputValueDef,ee.TokenKind.PAREN_R)},n.parseInputValueDef=function(){var t=this._lexer.token,n=this.parseDescription(),e=this.parseName();this.expectToken(ee.TokenKind.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(ee.TokenKind.EQUALS)&&(r=this.parseValueLiteral(!0));var u=this.parseDirectives(!0);return{kind:Zn.Kind.INPUT_VALUE_DEFINITION,description:n,name:e,type:i,defaultValue:r,directives:u,loc:this.loc(t)}},n.parseInterfaceTypeDefinition=function(){var t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");var e=this.parseName(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();return{kind:Zn.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:e,directives:r,fields:i,loc:this.loc(t)}},n.parseUnionTypeDefinition=function(){var t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");var e=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:Zn.Kind.UNION_TYPE_DEFINITION,description:n,name:e,directives:r,types:i,loc:this.loc(t)}},n.parseUnionMemberTypes=function(){var t=[];if(this.expectOptionalToken(ee.TokenKind.EQUALS)){this.expectOptionalToken(ee.TokenKind.PIPE);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(ee.TokenKind.PIPE))}return t},n.parseEnumTypeDefinition=function(){var t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");var e=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:Zn.Kind.ENUM_TYPE_DEFINITION,description:n,name:e,directives:r,values:i,loc:this.loc(t)}},n.parseEnumValuesDefinition=function(){return this.optionalMany(ee.TokenKind.BRACE_L,this.parseEnumValueDefinition,ee.TokenKind.BRACE_R)},n.parseEnumValueDefinition=function(){var t=this._lexer.token,n=this.parseDescription(),e=this.parseName(),r=this.parseDirectives(!0);return{kind:Zn.Kind.ENUM_VALUE_DEFINITION,description:n,name:e,directives:r,loc:this.loc(t)}},n.parseInputObjectTypeDefinition=function(){var t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");var e=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:Zn.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:e,directives:r,fields:i,loc:this.loc(t)}},n.parseInputFieldsDefinition=function(){return this.optionalMany(ee.TokenKind.BRACE_L,this.parseInputValueDef,ee.TokenKind.BRACE_R)},n.parseTypeSystemExtension=function(){var t=this._lexer.lookahead();if(t.kind===ee.TokenKind.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)},n.parseSchemaExtension=function(){var t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var n=this.parseDirectives(!0),e=this.optionalMany(ee.TokenKind.BRACE_L,this.parseOperationTypeDefinition,ee.TokenKind.BRACE_R);if(0===n.length&&0===e.length)throw this.unexpected();return{kind:Zn.Kind.SCHEMA_EXTENSION,directives:n,operationTypes:e,loc:this.loc(t)}},n.parseScalarTypeExtension=function(){var t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var n=this.parseName(),e=this.parseDirectives(!0);if(0===e.length)throw this.unexpected();return{kind:Zn.Kind.SCALAR_TYPE_EXTENSION,name:n,directives:e,loc:this.loc(t)}},n.parseObjectTypeExtension=function(){var t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var n=this.parseName(),e=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===e.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:Zn.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:e,directives:r,fields:i,loc:this.loc(t)}},n.parseInterfaceTypeExtension=function(){var t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var n=this.parseName(),e=this.parseDirectives(!0),r=this.parseFieldsDefinition();if(0===e.length&&0===r.length)throw this.unexpected();return{kind:Zn.Kind.INTERFACE_TYPE_EXTENSION,name:n,directives:e,fields:r,loc:this.loc(t)}},n.parseUnionTypeExtension=function(){var t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var n=this.parseName(),e=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===e.length&&0===r.length)throw this.unexpected();return{kind:Zn.Kind.UNION_TYPE_EXTENSION,name:n,directives:e,types:r,loc:this.loc(t)}},n.parseEnumTypeExtension=function(){var t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var n=this.parseName(),e=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===e.length&&0===r.length)throw this.unexpected();return{kind:Zn.Kind.ENUM_TYPE_EXTENSION,name:n,directives:e,values:r,loc:this.loc(t)}},n.parseInputObjectTypeExtension=function(){var t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var n=this.parseName(),e=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===e.length&&0===r.length)throw this.unexpected();return{kind:Zn.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:e,fields:r,loc:this.loc(t)}},n.parseDirectiveDefinition=function(){var t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(ee.TokenKind.AT);var e=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var u=this.parseDirectiveLocations();return{kind:Zn.Kind.DIRECTIVE_DEFINITION,description:n,name:e,arguments:r,repeatable:i,locations:u,loc:this.loc(t)}},n.parseDirectiveLocations=function(){this.expectOptionalToken(ee.TokenKind.PIPE);var t=[];do{t.push(this.parseDirectiveLocation())}while(this.expectOptionalToken(ee.TokenKind.PIPE));return t},n.parseDirectiveLocation=function(){var t=this._lexer.token,n=this.parseName();if(void 0!==ie.DirectiveLocation[n.value])return n;throw this.unexpected(t)},n.loc=function(t){if(!this._options.noLocation)return new a(t,this._lexer.lastToken,this._lexer.source)},n.peek=function(t){return this._lexer.token.kind===t},n.expectToken=function(t){var n=this._lexer.token;if(n.kind===t)return this._lexer.advance(),n;throw(0,zn.syntaxError)(this._lexer.source,n.start,"Expected ".concat(t,", found ").concat(s(n)))},n.expectOptionalToken=function(t){var n=this._lexer.token;if(n.kind===t)return this._lexer.advance(),n},n.expectKeyword=function(t){var n=this._lexer.token;if(n.kind!==ee.TokenKind.NAME||n.value!==t)throw(0,zn.syntaxError)(this._lexer.source,n.start,'Expected "'.concat(t,'", found ').concat(s(n)));this._lexer.advance()},n.expectOptionalKeyword=function(t){var n=this._lexer.token;return n.kind===ee.TokenKind.NAME&&n.value===t&&(this._lexer.advance(),!0)},n.unexpected=function(t){var n=t||this._lexer.token;return(0,zn.syntaxError)(this._lexer.source,n.start,"Unexpected ".concat(s(n)))},n.any=function(t,n,e){this.expectToken(t);for(var r=[];!this.expectOptionalToken(e);)r.push(n.call(this));return r},n.optionalMany=function(t,n,e){if(this.expectOptionalToken(t)){var r=[];do{r.push(n.call(this))}while(!this.expectOptionalToken(e));return r}return[]},n.many=function(t,n,e){this.expectToken(t);var r=[];do{r.push(n.call(this))}while(!this.expectOptionalToken(e));return r},t}();function a(t,n,e){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=e}function s(t){var n=t.value;return n?"".concat(t.kind,' "').concat(n,'"'):t.kind}(0,i.default)(a,(function(){return{start:this.start,end:this.end}}))}));n(ue);var oe=ue.parse;function ae(t){return t.replace(/[\s,]+/g," ").trim()}var se={},ce={},fe=!0,he=!1;function le(t){var n=ae(t);if(se[n])return se[n];var e=oe(t,{experimentalFragmentVariables:he});if(!e||"Document"!==e.kind)throw new Error("Not a valid GraphQL document.");return e=function t(n,e){var r=Object.prototype.toString.call(n);if("[object Array]"===r)return n.map((function(n){return t(n,e)}));if("[object Object]"!==r)throw new Error("Unexpected input.");e&&n.loc&&delete n.loc,n.loc&&(delete n.loc.startToken,delete n.loc.endToken);var i,u,o,a=Object.keys(n);for(i in a)a.hasOwnProperty(i)&&(u=n[a[i]],"[object Object]"!==(o=Object.prototype.toString.call(u))&&"[object Array]"!==o||(n[a[i]]=t(u,!0)));return n}(e=function(t){for(var n,e={},r=[],i=0;i<t.definitions.length;i++){var u=t.definitions[i];if("FragmentDefinition"===u.kind){var o=u.name.value,a=ae((n=u.loc).source.body.substring(n.start,n.end));ce.hasOwnProperty(o)&&!ce[o][a]?(fe&&console.warn("Warning: fragment with name "+o+" 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"),ce[o][a]=!0):ce.hasOwnProperty(o)||(ce[o]={},ce[o][a]=!0),e[a]||(e[a]=!0,r.push(u))}else r.push(u)}return t.definitions=r,t}(e),!1),se[n]=e,e}function de(){for(var t=Array.prototype.slice.call(arguments),n=t[0],e="string"==typeof n?n:n[0],r=1;r<t.length;r++)e+=t[r]&&t[r].kind&&"Document"===t[r].kind?t[r].loc.source.body:t[r],e+=n[r];return le(e)}de.default=de,de.resetCaches=function(){se={},ce={}},de.disableFragmentWarnings=function(){fe=!1},de.enableExperimentalFragmentVariables=function(){he=!0},de.disableExperimentalFragmentVariables=function(){he=!1};var ve=de;function me(){return window.widgetIdent}window.widgetIdent||(window.widgetIdent={env:"demo"});const pe=new Date,ye={shareLink:"http://ssqt.co",fueltankCode:"12AS3F",referralcode:"RIDDIKULUS",locale:"en_US",messageLink:{EMAIL:"http://short.staging.referralsaasquatch.com/mJjFXu",FACEBOOK:"http://short.staging.referralsaasquatch.com/mwjFXu",TWITTER:"http://short.staging.referralsaasquatch.com/mwjFXu",SMS:"http://short.staging.referralsaasquatch.com/mwjFXu",WHATSAPP:"http://short.staging.referralsaasquatch.com/mwjFXu",LINKEDIN:"http://short.staging.referralsaasquatch.com/mwjFXu",PINTEREST:"http://short.staging.referralsaasquatch.com/mwjFXu",FBMESSENGER:"http://short.staging.referralsaasquatch.com/mwjFXu"},referrals:{totalCount:9,data:[{dateReferralStarted:pe.setDate(pe.getDate()-2),referredUser:{firstName:"Remus",lastName:"Lupin"},rewards:[{prettyValue:"$20.00",dateExpires:pe.setDate(pe.getDate()+4),statuses:["EXPIRED"],meta:{message:"Applied to Invoice #1234"}},{prettyValue:"$10.00",statuses:["AVAILABLE"]},{prettyValue:"$5.00",statuses:["AVAILABLE"]}]},{dateReferralStarted:pe.setDate(pe.getDate()-1),referredUser:{firstName:"Gellert",lastName:"Grindelwald"},rewards:[]},{dateReferralStarted:pe.setDate(pe.getDate()-1),referredUser:{firstName:"",lastName:""},rewards:[{prettyValue:"$20.00",dateExpires:pe.setDate(pe.getDate()-2),statuses:["EXPIRED"]}]},{dateReferralStarted:pe.setDate(pe.getDate()-5),referredUser:{firstName:"Lavender",lastName:"Brown"},rewards:[{prettyValue:"$20.00",statuses:["CANCELLED"]}]},{dateReferralStarted:pe.setDate(pe.getDate()-4),referredUser:{firstName:"Blaise",lastName:"Zabini"},rewards:[{prettyValue:"$20.00",statuses:["AVAILABLE"]},{prettyValue:"$10.00",statuses:["AVAILABLE"]}]},{dateReferralStarted:pe.setDate(pe.getDate()-10),referredUser:{firstName:"Argus",lastName:"Filch"},rewards:[]},{dateReferralStarted:pe.setDate(pe.getDate()-15),referredUser:{firstName:"Ron",lastName:"Weasley"},rewards:[{prettyValue:"$20.00",statuses:["AVAILABLE"]}]},{dateReferralStarted:pe.setDate(pe.getDate()-2),referredUser:{firstName:"Hermione",lastName:"Granger"},rewards:[{prettyValue:"$20.00",statuses:["AVAILABLE"]},{prettyValue:"$10.00",statuses:["AVAILABLE"]},{prettyValue:"$5.00",statuses:["AVAILABLE"]},{prettyValue:"5%",statuses:["AVAILABLE"]},{prettyValue:"5%",statuses:["AVAILABLE"]},{prettyValue:"5%",statuses:["AVAILABLE"]}]},{dateConverted:1606943971468,dateReferralStarted:1606943971468,referredUser:{imageUrl:"",firstName:"Seamus",lastName:"Finnigan"},rewards:[]}]},referredByReferral:{dateReferralStarted:pe.setDate(pe.getDate()-2),referrerUser:{firstName:"Rubeus",lastName:"Hagrid",referralCode:"RUBEUSHAGRID12"},rewards:[{fuelTankCode:"CODE1234",prettyValue:"$10.00",statuses:["AVAILABLE"]}]},referralsMonth:{totalCount:6},referralsWeek:{totalCount:3},rewardsCount:{totalCount:14},rewardsMonth:{totalCount:7},rewardsWeek:{totalCount:4},rewardBalancesGlobal:[{type:"CREDIT",unit:"CENTS",value:17e3,prettyValue:"$170.00",totalAssignedCredit:"17000",totalRedeemedCredit:"1500",prettyAssignedCredit:"$1000.00",prettyRedeemedCredit:"$15.00"},{type:"PCT_DISCOUNT",unit:"%",value:15,prettyValue:"15%"},{type:"CREDIT",unit:"CASH/CAD",count:3,totalPendingCredit:2e4,totalAssignedCredit:3e4,totalRedeemedCredit:1e4,totalExpiredCredit:0,totalCancelledCredit:0,prettyPendingCredit:"$200.00",prettyAssignedCredit:"$300.00",prettyRedeemedCredit:"$100.00",value:3e4,prettyValue:"$300.00"},{type:"CREDIT",unit:"CASH/USD",count:6,totalPendingCredit:25e3,totalAssignedCredit:4e4,totalRedeemedCredit:1e4,totalExpiredCredit:15e3,totalCancelledCredit:1e4,prettyPendingCredit:"USD250.00",prettyAssignedCredit:"USD400.00",prettyRedeemedCredit:"USD150.00",value:4e4,prettyValue:"USD400.00"}],rewardBalances:[{type:"CREDIT",unit:"CENTS",value:17e3,prettyValue:"$170.00",totalAssignedCredit:"17000",totalRedeemedCredit:"1500",prettyAssignedCredit:"$170.00",prettyRedeemedCredit:"$15.00"},{type:"PCT_DISCOUNT",unit:"%",value:15,prettyValue:"15%"},{type:"CREDIT",unit:"CASH/CAD",count:3,totalPendingCredit:2e4,totalAssignedCredit:3e4,totalRedeemedCredit:1e4,totalExpiredCredit:0,totalCancelledCredit:0,prettyPendingCredit:"$200.00",prettyAssignedCredit:"$300.00",prettyRedeemedCredit:"$100.00",value:3e4,prettyValue:"$300.00"},{type:"CREDIT",unit:"CASH/USD",count:6,totalPendingCredit:25e3,totalAssignedCredit:4e4,totalRedeemedCredit:1e4,totalExpiredCredit:15e3,totalCancelledCredit:1e4,prettyPendingCredit:"USD250.00",prettyAssignedCredit:"USD400.00",prettyRedeemedCredit:"USD150.00",value:4e4,prettyValue:"USD400.00"}],rewardBalanceDetails:[{prettyAvailableValue:"$5.00"},{prettyAvailableValue:"18%"}]},Ie=window.frameElement?window.frameElement.squatchJsApi:{},ge=()=>{const{tenantAlias:t,appDomain:n,token:e}=me();return new Ut({link:new Wt({uri:n+"/api/v1/"+t+"/graphql",headers:{Authorization:"Bearer "+e}}),cache:new Qn})},be={version:"Welcome to widget-host",analytics:{shareEvent(t){const n=me();if("demo"===n.env||!n)return Promise.resolve({});const{userId:e,accountId:r,programId:i="classic",engagementMedium:u}=n,o={eventMeta:{id:e,accountId:r,programId:i,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:u,shareMedium:t}}};return ge().mutate({mutation:ve`
|
|
15
|
+
***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)};function r(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var i=function(){return(i=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t}).apply(this,arguments)};function u(t,n,e,r){return new(e||(e=Promise))((function(i,u){function o(t){try{s(r.next(t))}catch(t){u(t)}}function a(t){try{s(r.throw(t))}catch(t){u(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(o,a)}s((r=r.apply(t,n||[])).next())}))}function o(t,n){var e,r,i,u,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return u={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(u){return function(a){return function(u){if(e)throw new TypeError("Generator is already executing.");for(;o;)try{if(e=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=n.call(t,o)}catch(t){u=[6,t],r=0}finally{e=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}}function a(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var r=Array(t),i=0;for(n=0;n<e;n++)for(var u=arguments[n],o=0,a=u.length;o<a;o++,i++)r[i]=u[o];return r}var s=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;n.default=e}));n(s);var c=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){return function t(n,e){switch(i(n)){case"string":return JSON.stringify(n);case"function":return n.name?"[function ".concat(n.name,"]"):"[function]";case"object":return null===n?"null":function(n,e){if(-1!==e.indexOf(n))return"[Circular]";var i=[].concat(e,[n]),u=function(t){var n=t[String(r.default)];return"function"==typeof n?n:"function"==typeof t.inspect?t.inspect:void 0}(n);if(void 0!==u){var o=u.call(n);if(o!==n)return"string"==typeof o?o:t(o,i)}else if(Array.isArray(n))return function(n,e){if(0===n.length)return"[]";if(e.length>2)return"[Array]";for(var r=Math.min(10,n.length),i=n.length-r,u=[],o=0;o<r;++o)u.push(t(n[o],e));return 1===i?u.push("... 1 more item"):i>1&&u.push("... ".concat(i," more items")),"["+u.join(", ")+"]"}(n,i);return function(n,e){var r=Object.keys(n);return 0===r.length?"{}":e.length>2?"["+function(t){var n=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if("Object"===n&&"function"==typeof t.constructor){var e=t.constructor.name;if("string"==typeof e&&""!==e)return e}return n}(n)+"]":"{ "+r.map((function(r){return r+": "+t(n[r],e)})).join(", ")+" }"}(n,i)}(n,e);default:return String(n)}}(t,[])};var e,r=(e=s)&&e.__esModule?e:{default:e};function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}}));n(c);var f=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.visit=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,s=void 0,c=Array.isArray(t),f=[t],h=-1,l=[],d=void 0,v=void 0,m=void 0,p=[],y=[],I=t;do{var g=++h===f.length,b=g&&0!==l.length;if(g){if(v=0===y.length?void 0:p[p.length-1],d=m,m=y.pop(),b){if(c)d=d.slice();else{for(var w={},E=0,O=Object.keys(d);E<O.length;E++){var S=O[E];w[S]=d[S]}d=w}for(var N=0,T=0;T<l.length;T++){var D=l[T][0],_=l[T][1];c&&(D-=N),c&&null===_?(d.splice(D,1),N++):d[D]=_}}h=s.index,f=s.keys,l=s.edits,c=s.inArray,s=s.prev}else{if(v=m?c?h:f[h]:void 0,null==(d=m?m[v]:I))continue;m&&p.push(v)}var k=void 0;if(!Array.isArray(d)){if(!o(d))throw new Error("Invalid AST Node: "+(0,r.default)(d));var A=a(n,d.kind,g);if(A){if((k=A.call(n,d,v,m,p,y))===u)break;if(!1===k){if(!g){p.pop();continue}}else if(void 0!==k&&(l.push([v,k]),!g)){if(!o(k)){p.pop();continue}d=k}}}void 0===k&&b&&l.push([v,d]),g?p.pop():(s={inArray:c,index:h,keys:f,edits:l,prev:s},f=(c=Array.isArray(d))?d:e[d.kind]||[],h=-1,l=[],m&&y.push(m),m=d)}while(void 0!==s);return 0!==l.length&&(I=l[l.length-1][1]),I},n.visitInParallel=function(t){var n=new Array(t.length);return{enter:function(e){for(var r=0;r<t.length;r++)if(!n[r]){var i=a(t[r],e.kind,!1);if(i){var o=i.apply(t[r],arguments);if(!1===o)n[r]=e;else if(o===u)n[r]=u;else if(void 0!==o)return o}}},leave:function(e){for(var r=0;r<t.length;r++)if(n[r])n[r]===e&&(n[r]=null);else{var i=a(t[r],e.kind,!0);if(i){var o=i.apply(t[r],arguments);if(o===u)n[r]=u;else if(void 0!==o&&!1!==o)return o}}}}},n.visitWithTypeInfo=function(t,n){return{enter:function(e){t.enter(e);var r=a(n,e.kind,!1);if(r){var i=r.apply(n,arguments);return void 0!==i&&(t.leave(e),o(i)&&t.enter(i)),i}},leave:function(e){var r,i=a(n,e.kind,!0);return i&&(r=i.apply(n,arguments)),t.leave(e),r}}},n.getVisitFn=a,n.BREAK=n.QueryDocumentKeys=void 0;var e,r=(e=c)&&e.__esModule?e:{default:e},i={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:["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","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","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};n.QueryDocumentKeys=i;var u=Object.freeze({});function o(t){return Boolean(t&&"string"==typeof t.kind)}function a(t,n,e){var r=t[n];if(r){if(!e&&"function"==typeof r)return r;var i=e?r.leave:r.enter;if("function"==typeof i)return i}else{var u=e?t.leave:t.enter;if(u){if("function"==typeof u)return u;var o=u[n];if("function"==typeof o)return o}}}n.BREAK=u}));n(f);var h=f.visit,l=f.BREAK,d=Object.setPrototypeOf,v=void 0===d?function(t,n){return t.__proto__=n,t}:d,m=function(t){function n(e){void 0===e&&(e="Invariant Violation");var r=t.call(this,"number"==typeof e?"Invariant Violation: "+e+" (see https://github.com/apollographql/invariant-packages)":e)||this;return r.framesToPop=1,r.name="Invariant Violation",v(r,n.prototype),r}return r(n,t),n}(Error);function p(t,n){if(!t)throw new m(n)}function y(t){return function(){return console[t].apply(console,arguments)}}!function(t){t.warn=y("warn"),t.error=y("error")}(p||(p={}));var I={env:{}};if("object"==typeof process)I=process;else try{Function("stub","process = stub")(I)}catch(t){}var g=Object.prototype,b=g.toString,w=g.hasOwnProperty,E=new Map;function O(t,n){try{return function t(n,e){if(n===e)return!0;var r=b.call(n);if(r!==b.call(e))return!1;switch(r){case"[object Array]":if(n.length!==e.length)return!1;case"[object Object]":if(S(n,e))return!0;var i=Object.keys(n),u=Object.keys(e),o=i.length;if(o!==u.length)return!1;for(var a=0;a<o;++a)if(!w.call(e,i[a]))return!1;for(a=0;a<o;++a){var s=i[a];if(!t(n[s],e[s]))return!1}return!0;case"[object Error]":return n.name===e.name&&n.message===e.message;case"[object Number]":if(n!=n)return e!=e;case"[object Boolean]":case"[object Date]":return+n==+e;case"[object RegExp]":case"[object String]":return n==""+e;case"[object Map]":case"[object Set]":if(n.size!==e.size)return!1;if(S(n,e))return!0;for(var c=n.entries(),f="[object Map]"===r;;){var h=c.next();if(h.done)break;var l=h.value,d=l[0],v=l[1];if(!e.has(d))return!1;if(f&&!t(v,e.get(d)))return!1}return!0}return!1}(t,n)}finally{E.clear()}}function S(t,n){var e=E.get(t);if(e){if(e.has(n))return!0}else E.set(t,e=new Set);return e.add(n),!1}function N(t,n,e,r){if(function(t){return"IntValue"===t.kind}(e)||function(t){return"FloatValue"===t.kind}(e))t[n.value]=Number(e.value);else if(function(t){return"BooleanValue"===t.kind}(e)||function(t){return"StringValue"===t.kind}(e))t[n.value]=e.value;else if(function(t){return"ObjectValue"===t.kind}(e)){var i={};e.fields.map((function(t){return N(i,t.name,t.value,r)})),t[n.value]=i}else if(function(t){return"Variable"===t.kind}(e))t[n.value]=(r||{})[e.name.value];else if(function(t){return"ListValue"===t.kind}(e))t[n.value]=e.values.map((function(t){var e={};return N(e,n,t,r),e[n.value]}));else if(function(t){return"EnumValue"===t.kind}(e))t[n.value]=e.value;else{if(!function(t){return"NullValue"===t.kind}(e))throw new m(17);t[n.value]=null}}var T=["connection","include","skip","client","rest","export"];function D(t,n,e){if(e&&e.connection&&e.connection.key){if(e.connection.filter&&e.connection.filter.length>0){var r=e.connection.filter?e.connection.filter:[];r.sort();var i=n,u={};return r.forEach((function(t){u[t]=i[t]})),e.connection.key+"("+JSON.stringify(u)+")"}return e.connection.key}var o=t;if(n){var a=function(t,n){n||(n={}),"function"==typeof n&&(n={cmp:n});var e,r="boolean"==typeof n.cycles&&n.cycles,i=n.cmp&&(e=n.cmp,function(t){return function(n,r){return e({key:n,value:t[n]},{key:r,value:t[r]})}}),u=[];return function t(n){if(n&&n.toJSON&&"function"==typeof n.toJSON&&(n=n.toJSON()),void 0!==n){if("number"==typeof n)return isFinite(n)?""+n:"null";if("object"!=typeof n)return JSON.stringify(n);var e,o;if(Array.isArray(n)){for(o="[",e=0;e<n.length;e++)e&&(o+=","),o+=t(n[e])||"null";return o+"]"}if(null===n)return"null";if(-1!==u.indexOf(n)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var a=u.push(n)-1,s=Object.keys(n).sort(i&&i(n));for(o="",e=0;e<s.length;e++){var c=s[e],f=t(n[c]);f&&(o&&(o+=","),o+=JSON.stringify(c)+":"+f)}return u.splice(a,1),"{"+o+"}"}}(t)}(n);o+="("+a+")"}return e&&Object.keys(e).forEach((function(t){-1===T.indexOf(t)&&(e[t]&&Object.keys(e[t]).length?o+="@"+t+"("+JSON.stringify(e[t])+")":o+="@"+t)})),o}function _(t,n){if(t.arguments&&t.arguments.length){var e={};return t.arguments.forEach((function(t){return N(e,t.name,t.value,n)})),e}return null}function k(t){return t.alias?t.alias.value:t.name.value}function A(t){return"Field"===t.kind}function C(t){return"InlineFragment"===t.kind}function R(t){return t&&"id"===t.type&&"boolean"==typeof t.generated}function $(t,n){return void 0===n&&(n=!1),i({type:"id",generated:n},"string"==typeof t?{id:t,typename:void 0}:t)}function j(t,n){if(t.directives&&t.directives.length){var e={};return t.directives.forEach((function(t){e[t.name.value]=_(t,n)})),e}return null}function M(t,n){return void 0===n&&(n={}),(e=t.directives,e?e.filter(V).map((function(t){var n=t.arguments;p(n&&1===n.length,14);var e=n[0];p(e.name&&"if"===e.name.value,15);var r=e.value;return p(r&&("Variable"===r.kind||"BooleanValue"===r.kind),16),{directive:t,ifArgument:e}})):[]).every((function(t){var e=t.directive,r=t.ifArgument,i=!1;return"Variable"===r.value.kind?p(void 0!==(i=n[r.value.name.value]),13):i=r.value.value,"skip"===e.name.value?!i:i}));var e}function x(t,n){return function(t){var n=[];return h(t,{Directive:function(t){n.push(t.name.value)}}),n}(n).some((function(n){return t.indexOf(n)>-1}))}function F(t){return t&&x(["client"],t)&&x(["export"],t)}function V(t){var n=t.name.value;return"skip"===n||"include"===n}function q(t,n){var e=n,r=[];return t.definitions.forEach((function(t){if("OperationDefinition"===t.kind)throw new m(11);"FragmentDefinition"===t.kind&&r.push(t)})),void 0===e&&(p(1===r.length,12),e=r[0].name.value),i(i({},t),{definitions:a([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:e}}]}}],t.definitions)})}function P(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return n.forEach((function(n){null!=n&&Object.keys(n).forEach((function(e){t[e]=n[e]}))})),t}function L(t){return p(t&&"Document"===t.kind,2),p(t.definitions.filter((function(t){return"FragmentDefinition"!==t.kind})).map((function(t){if("OperationDefinition"!==t.kind)throw new m(3);return t})).length<=1,4),t}function U(t){return L(t),t.definitions.filter((function(t){return"OperationDefinition"===t.kind}))[0]}function B(t){return t.definitions.filter((function(t){return"OperationDefinition"===t.kind&&t.name})).map((function(t){return t.name.value}))[0]||null}function G(t){return t.definitions.filter((function(t){return"FragmentDefinition"===t.kind}))}function Q(t){var n;L(t);for(var e=0,r=t.definitions;e<r.length;e++){var i=r[e];if("OperationDefinition"===i.kind){var u=i.operation;if("query"===u||"mutation"===u||"subscription"===u)return i}"FragmentDefinition"!==i.kind||n||(n=i)}if(n)return n;throw new m(10)}function J(t){void 0===t&&(t=[]);var n={};return t.forEach((function(t){n[t.name.value]=t})),n}function Y(t){if(t&&t.variableDefinitions&&t.variableDefinitions.length){var n=t.variableDefinitions.filter((function(t){return t.defaultValue})).map((function(t){var n={};return N(n,t.variable.name,t.defaultValue),n}));return P.apply(void 0,a([{}],n))}return{}}function K(t,n,e){var r=0;return t.forEach((function(e,i){n.call(this,e,i,t)&&(t[r++]=e)}),e),t.length=r,t}var W={kind:"Field",name:{kind:"Name",value:"__typename"}};function X(t){return function t(n,e){return n.selectionSet.selections.every((function(n){return"FragmentSpread"===n.kind&&t(e[n.name.value],e)}))}(U(t)||function(t){p("Document"===t.kind,7),p(t.definitions.length<=1,8);var n=t.definitions[0];return p("FragmentDefinition"===n.kind,9),n}(t),J(G(t)))?null:t}function H(t){return function(n){return t.some((function(t){return t.name&&t.name===n.name.value||t.test&&t.test(n)}))}}function z(t,n){var e=Object.create(null),r=[],u=Object.create(null),o=[],a=X(h(n,{Variable:{enter:function(t,n,r){"VariableDefinition"!==r.kind&&(e[t.name.value]=!0)}},Field:{enter:function(n){if(t&&n.directives&&t.some((function(t){return t.remove}))&&n.directives&&n.directives.some(H(t)))return n.arguments&&n.arguments.forEach((function(t){"Variable"===t.value.kind&&r.push({name:t.value.name.value})})),n.selectionSet&&function t(n){var e=[];return n.selections.forEach((function(n){(A(n)||C(n))&&n.selectionSet?t(n.selectionSet).forEach((function(t){return e.push(t)})):"FragmentSpread"===n.kind&&e.push(n)})),e}(n.selectionSet).forEach((function(t){o.push({name:t.name.value})})),null}},FragmentSpread:{enter:function(t){u[t.name.value]=!0}},Directive:{enter:function(n){if(H(t)(n))return null}}}));return a&&K(r,(function(t){return!e[t.name]})).length&&(a=function(t,n){var e=function(t){return function(n){return t.some((function(t){return n.value&&"Variable"===n.value.kind&&n.value.name&&(t.name===n.value.name.value||t.test&&t.test(n))}))}}(t);return X(h(n,{OperationDefinition:{enter:function(n){return i(i({},n),{variableDefinitions:n.variableDefinitions.filter((function(n){return!t.some((function(t){return t.name===n.variable.name.value}))}))})}},Field:{enter:function(n){if(t.some((function(t){return t.remove}))){var r=0;if(n.arguments.forEach((function(t){e(t)&&(r+=1)})),1===r)return null}}},Argument:{enter:function(t){if(e(t))return null}}}))}(r,a)),a&&K(o,(function(t){return!u[t.name]})).length&&(a=function(t,n){function e(n){if(t.some((function(t){return t.name===n.name.value})))return null}return X(h(n,{FragmentSpread:{enter:e},FragmentDefinition:{enter:e}}))}(o,a)),a}var Z={test:function(t){var n="connection"===t.name.value;return n&&(!t.arguments||t.arguments.some((function(t){return"key"===t.name.value}))),n}};function tt(t){return"query"===Q(t).operation?t:h(t,{OperationDefinition:{enter:function(t){return i(i({},t),{operation:"query"})}}})}var nt="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),et=Object.prototype.toString;function rt(t){try{return t()}catch(t){console.error&&console.error(t)}}function it(t){return t.errors&&t.errors.length}var ut=Object.prototype.hasOwnProperty;function ot(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return at(t)}function at(t){var n=t[0]||{},e=t.length;if(e>1){var r=[];n=ft(n,r);for(var i=1;i<e;++i)n=ct(n,t[i],r)}return n}function st(t){return null!==t&&"object"==typeof t}function ct(t,n,e){return st(n)&&st(t)?(Object.isExtensible&&!Object.isExtensible(t)&&(t=ft(t,e)),Object.keys(n).forEach((function(r){var i=n[r];if(ut.call(t,r)){var u=t[r];i!==u&&(t[r]=ct(ft(u,e),i,e))}else t[r]=i})),t):n}function ft(t,n){return null!==t&&"object"==typeof t&&n.indexOf(t)<0&&(t=Array.isArray(t)?t.slice(0):i({__proto__:Object.getPrototypeOf(t)},t),n.push(t)),t}var ht=t((function(t,n){function e(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function r(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,n,e){return n&&r(t.prototype,n),e&&r(t,e),t}Object.defineProperty(n,"__esModule",{value:!0}),n.Observable=void 0;var u=function(){return"function"==typeof Symbol},o=function(t){return u()&&Boolean(Symbol[t])},a=function(t){return o(t)?Symbol[t]:"@@"+t};u()&&!o("observable")&&(Symbol.observable=Symbol("observable"));var s=a("iterator"),c=a("observable"),f=a("species");function h(t,n){var e=t[n];if(null!=e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}}function l(t){var n=t.constructor;return void 0!==n&&null===(n=n[f])&&(n=void 0),void 0!==n?n:E}function d(t){return t instanceof E}function v(t){v.log?v.log(t):setTimeout((function(){throw t}))}function m(t){Promise.resolve().then((function(){try{t()}catch(t){v(t)}}))}function p(t){var n=t._cleanup;if(void 0!==n&&(t._cleanup=void 0,n))try{if("function"==typeof n)n();else{var e=h(n,"unsubscribe");e&&e.call(n)}}catch(t){v(t)}}function y(t){t._observer=void 0,t._queue=void 0,t._state="closed"}function I(t,n,e){t._state="running";var r=t._observer;try{var i=h(r,n);switch(n){case"next":i&&i.call(r,e);break;case"error":if(y(t),!i)throw e;i.call(r,e);break;case"complete":y(t),i&&i.call(r)}}catch(t){v(t)}"closed"===t._state?p(t):"running"===t._state&&(t._state="ready")}function g(t,n,e){if("closed"!==t._state){if("buffering"!==t._state)return"ready"!==t._state?(t._state="buffering",t._queue=[{type:n,value:e}],void m((function(){return function(t){var n=t._queue;if(n){t._queue=void 0,t._state="ready";for(var e=0;e<n.length&&(I(t,n[e].type,n[e].value),"closed"!==t._state);++e);}}(t)}))):void I(t,n,e);t._queue.push({type:n,value:e})}}var b=function(){function t(n,r){e(this,t),this._cleanup=void 0,this._observer=n,this._queue=void 0,this._state="initializing";var i=new w(this);try{this._cleanup=r.call(void 0,i)}catch(t){i.error(t)}"initializing"===this._state&&(this._state="ready")}return i(t,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(y(this),p(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),t}(),w=function(){function t(n){e(this,t),this._subscription=n}return i(t,[{key:"next",value:function(t){g(this._subscription,"next",t)}},{key:"error",value:function(t){g(this._subscription,"error",t)}},{key:"complete",value:function(){g(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),t}(),E=function(){function t(n){if(e(this,t),!(this instanceof t))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof n)throw new TypeError("Observable initializer must be a function");this._subscriber=n}return i(t,[{key:"subscribe",value:function(t){return"object"==typeof t&&null!==t||(t={next:t,error:arguments[1],complete:arguments[2]}),new b(t,this._subscriber)}},{key:"forEach",value:function(t){var n=this;return new Promise((function(e,r){if("function"==typeof t)var i=n.subscribe({next:function(n){try{t(n,u)}catch(t){r(t),i.unsubscribe()}},error:r,complete:e});else r(new TypeError(t+" is not a function"));function u(){i.unsubscribe(),e()}}))}},{key:"map",value:function(t){var n=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");return new(l(this))((function(e){return n.subscribe({next:function(n){try{n=t(n)}catch(t){return e.error(t)}e.next(n)},error:function(t){e.error(t)},complete:function(){e.complete()}})}))}},{key:"filter",value:function(t){var n=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");return new(l(this))((function(e){return n.subscribe({next:function(n){try{if(!t(n))return}catch(t){return e.error(t)}e.next(n)},error:function(t){e.error(t)},complete:function(){e.complete()}})}))}},{key:"reduce",value:function(t){var n=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");var e=l(this),r=arguments.length>1,i=!1,u=arguments[1],o=u;return new e((function(e){return n.subscribe({next:function(n){var u=!i;if(i=!0,!u||r)try{o=t(o,n)}catch(t){return e.error(t)}else o=n},error:function(t){e.error(t)},complete:function(){if(!i&&!r)return e.error(new TypeError("Cannot reduce an empty sequence"));e.next(o),e.complete()}})}))}},{key:"concat",value:function(){for(var t=this,n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];var i=l(this);return new i((function(n){var r,u=0;return function t(o){r=o.subscribe({next:function(t){n.next(t)},error:function(t){n.error(t)},complete:function(){u===e.length?(r=void 0,n.complete()):t(i.from(e[u++]))}})}(t),function(){r&&(r.unsubscribe(),r=void 0)}}))}},{key:"flatMap",value:function(t){var n=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");var e=l(this);return new e((function(r){var i=[],u=n.subscribe({next:function(n){if(t)try{n=t(n)}catch(t){return r.error(t)}var u=e.from(n).subscribe({next:function(t){r.next(t)},error:function(t){r.error(t)},complete:function(){var t=i.indexOf(u);t>=0&&i.splice(t,1),o()}});i.push(u)},error:function(t){r.error(t)},complete:function(){o()}});function o(){u.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(t){return t.unsubscribe()})),u.unsubscribe()}}))}},{key:c,value:function(){return this}}],[{key:"from",value:function(n){var e="function"==typeof this?this:t;if(null==n)throw new TypeError(n+" is not an object");var r=h(n,c);if(r){var i=r.call(n);if(Object(i)!==i)throw new TypeError(i+" is not an object");return d(i)&&i.constructor===e?i:new e((function(t){return i.subscribe(t)}))}if(o("iterator")&&(r=h(n,s)))return new e((function(t){m((function(){if(!t.closed){var e=!0,i=!1,u=void 0;try{for(var o,a=r.call(n)[Symbol.iterator]();!(e=(o=a.next()).done);e=!0)if(t.next(o.value),t.closed)return}catch(t){i=!0,u=t}finally{try{e||null==a.return||a.return()}finally{if(i)throw u}}t.complete()}}))}));if(Array.isArray(n))return new e((function(t){m((function(){if(!t.closed){for(var e=0;e<n.length;++e)if(t.next(n[e]),t.closed)return;t.complete()}}))}));throw new TypeError(n+" is not observable")}},{key:"of",value:function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];var i="function"==typeof this?this:t;return new i((function(t){m((function(){if(!t.closed){for(var n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}}))}))}},{key:f,get:function(){return this}}]),t}();n.Observable=E,u()&&Object.defineProperty(E,Symbol("extensions"),{value:{symbol:c,hostReportError:v},configurable:!0})}));n(ht);var lt,dt=ht.Observable;function vt(t){return t.request.length<=1}function mt(t){return new dt((function(n){n.error(t)}))}function pt(t,n){return n?n(t):dt.of()}function yt(t){return"function"==typeof t?new Et(t):t}function It(){return new Et((function(){return dt.of()}))}function gt(t){return 0===t.length?It():t.map(yt).reduce((function(t,n){return t.concat(n)}))}function bt(t,n,e){var r=yt(n),i=yt(e||new Et(pt));return vt(r)&&vt(i)?new Et((function(n){return t(n)?r.request(n)||dt.of():i.request(n)||dt.of()})):new Et((function(n,e){return t(n)?r.request(n,e)||dt.of():i.request(n,e)||dt.of()}))}r((function(t,n){var e=lt.call(this,t)||this;return e.link=n,e}),lt=Error);var wt=function(t,n){var e=yt(t);if(vt(e))return e;var r=yt(n);return vt(r)?new Et((function(t){return e.request(t,(function(t){return r.request(t)||dt.of()}))||dt.of()})):new Et((function(t,n){return e.request(t,(function(t){return r.request(t,n)||dt.of()}))||dt.of()}))},Et=function(){function t(t){t&&(this.request=t)}return t.prototype.split=function(n,e,r){return this.concat(bt(n,e,r||new t(pt)))},t.prototype.concat=function(t){return wt(this,t)},t.prototype.request=function(){throw new m(1)},t.empty=It,t.from=gt,t.split=bt,t.execute=Ot,t}();function Ot(t,n){return t.request(function(t,n){var e=i({},t);return Object.defineProperty(n,"setContext",{enumerable:!1,value:function(t){e=i({},e,"function"==typeof t?t(e):t)}}),Object.defineProperty(n,"getContext",{enumerable:!1,value:function(){return i({},e)}}),Object.defineProperty(n,"toKey",{enumerable:!1,value:function(){return function(t){return JSON.stringify([t.operationName,t.query,t.variables])}(n)}}),n}(n.context,function(t){var n={variables:t.variables||{},extensions:t.extensions||{},operationName:t.operationName,query:t.query};return n.operationName||(n.operationName="string"!=typeof n.query?B(n.query):""),n}(function(t){for(var n=["query","operationName","variables","extensions","context"],e=0,r=Object.keys(t);e<r.length;e++)if(n.indexOf(r[e])<0)throw new m(2);return t}(n))))||dt.of()}var St,Nt=function(){var t,n=("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()).Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}();function Tt(t){return t<7}!function(t){t[t.loading=1]="loading",t[t.setVariables=2]="setVariables",t[t.fetchMore=3]="fetchMore",t[t.refetch=4]="refetch",t[t.poll=6]="poll",t[t.ready=7]="ready",t[t.error=8]="error"}(St||(St={}));var Dt=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r(n,t),n.prototype[Nt]=function(){return this},n.prototype["@@observable"]=function(){return this},n}(dt);function _t(t){return Array.isArray(t)&&t.length>0}var kt,At=function(t){function n(e){var r,i,u=e.graphQLErrors,o=e.networkError,a=e.errorMessage,s=e.extraInfo,c=t.call(this,a)||this;return c.graphQLErrors=u||[],c.networkError=o||null,c.message=a||(i="",_t((r=c).graphQLErrors)&&r.graphQLErrors.forEach((function(t){i+="GraphQL error: "+(t?t.message:"Error message not found.")+"\n"})),r.networkError&&(i+="Network error: "+r.networkError.message+"\n"),i=i.replace(/\n$/,"")),c.extraInfo=s,c.__proto__=n.prototype,c}return r(n,t),n}(Error);!function(t){t[t.normal=1]="normal",t[t.refetch=2]="refetch",t[t.poll=3]="poll"}(kt||(kt={}));var Ct=function(t){function n(n){var e=n.queryManager,r=n.options,i=n.shouldSubscribe,u=void 0===i||i,o=t.call(this,(function(t){return o.onSubscribe(t)}))||this;o.observers=new Set,o.subscriptions=new Set,o.isTornDown=!1,o.options=r,o.variables=r.variables||{},o.queryId=e.generateQueryId(),o.shouldSubscribe=u;var a=U(r.query);return o.queryName=a&&a.name&&a.name.value,o.queryManager=e,o}return r(n,t),n.prototype.result=function(){var t=this;return new Promise((function(n,e){var r={next:function(e){n(e),t.observers.delete(r),t.observers.size||t.queryManager.removeQuery(t.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:e},i=t.subscribe(r)}))},n.prototype.currentResult=function(){var t=this.getCurrentResult();return void 0===t.data&&(t.data={}),t},n.prototype.getCurrentResult=function(){if(this.isTornDown){var t=this.lastResult;return{data:!this.lastError&&t&&t.data||void 0,error:this.lastError,loading:!1,networkStatus:St.error}}var n,e,r,u=this.queryManager.getCurrentQueryResult(this),o=u.data,a=u.partial,s=this.queryManager.queryStore.get(this.queryId),c=this.options.fetchPolicy,f="network-only"===c||"no-cache"===c;if(s){var h=s.networkStatus;if(void 0===(r=this.options.errorPolicy)&&(r="none"),(e=s)&&(e.networkError||"none"===r&&_t(e.graphQLErrors)))return{data:void 0,loading:!1,networkStatus:h,error:new At({graphQLErrors:s.graphQLErrors,networkError:s.networkError})};s.variables&&(this.options.variables=i(i({},this.options.variables),s.variables),this.variables=this.options.variables),n={data:o,loading:Tt(h),networkStatus:h},s.graphQLErrors&&"all"===this.options.errorPolicy&&(n.errors=s.graphQLErrors)}else{var l=f||a&&"cache-only"!==c;n={data:o,loading:l,networkStatus:l?St.loading:St.ready}}return a||this.updateLastResult(i(i({},n),{stale:!1})),i(i({},n),{partial:a})},n.prototype.isDifferentFromLastResult=function(t){var n=this.lastResultSnapshot;return!(n&&t&&n.networkStatus===t.networkStatus&&n.stale===t.stale&&O(n.data,t.data))},n.prototype.getLastResult=function(){return this.lastResult},n.prototype.getLastError=function(){return this.lastError},n.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},n.prototype.resetQueryStoreErrors=function(){var t=this.queryManager.queryStore.get(this.queryId);t&&(t.networkError=null,t.graphQLErrors=[])},n.prototype.refetch=function(t){var n=this.options.fetchPolicy;return"cache-only"===n?Promise.reject(new m(1)):("no-cache"!==n&&"cache-and-network"!==n&&(n="network-only"),O(this.variables,t)||(this.variables=i(i({},this.variables),t)),O(this.options.variables,this.variables)||(this.options.variables=i(i({},this.options.variables),this.variables)),this.queryManager.fetchQuery(this.queryId,i(i({},this.options),{fetchPolicy:n}),kt.refetch))},n.prototype.fetchMore=function(t){var n=this;p(t.updateQuery,2);var e=i(i({},t.query?t:i(i(i({},this.options),t),{variables:i(i({},this.variables),t.variables)})),{fetchPolicy:"network-only"}),r=this.queryManager.generateQueryId();return this.queryManager.fetchQuery(r,e,kt.normal,this.queryId).then((function(i){return n.updateQuery((function(n){return t.updateQuery(n,{fetchMoreResult:i.data,variables:e.variables})})),n.queryManager.stopQuery(r),i}),(function(t){throw n.queryManager.stopQuery(r),t}))},n.prototype.subscribeToMore=function(t){var n=this,e=this.queryManager.startGraphQLSubscription({query:t.document,variables:t.variables}).subscribe({next:function(e){var r=t.updateQuery;r&&n.updateQuery((function(t,n){return r(t,{subscriptionData:e,variables:n.variables})}))},error:function(n){t.onError&&t.onError(n)}});return this.subscriptions.add(e),function(){n.subscriptions.delete(e)&&e.unsubscribe()}},n.prototype.setOptions=function(t){var n=this.options.fetchPolicy;this.options=i(i({},this.options),t),t.pollInterval?this.startPolling(t.pollInterval):0===t.pollInterval&&this.stopPolling();var e=t.fetchPolicy;return this.setVariables(this.options.variables,n!==e&&("cache-only"===n||"standby"===n||"network-only"===e),t.fetchResults)},n.prototype.setVariables=function(t,n,e){return void 0===n&&(n=!1),void 0===e&&(e=!0),this.isTornDown=!1,t=t||this.variables,!n&&O(t,this.variables)?this.observers.size&&e?this.result():Promise.resolve():(this.variables=this.options.variables=t,this.observers.size?this.queryManager.fetchQuery(this.queryId,this.options):Promise.resolve())},n.prototype.updateQuery=function(t){var n=this.queryManager,e=n.getQueryWithPreviousResult(this.queryId),r=e.previousResult,i=e.variables,u=e.document,o=rt((function(){return t(r,{variables:i})}));o&&(n.dataStore.markUpdateQueryResult(u,i,o),n.broadcastQueries())},n.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},n.prototype.startPolling=function(t){jt(this),this.options.pollInterval=t,this.queryManager.startPollingQuery(this.options,this.queryId)},n.prototype.updateLastResult=function(t){var n=this.lastResult;return this.lastResult=t,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?t:function t(n,e){switch(et.call(n)){case"[object Array]":if(e.has(n))return e.get(n);var r=n.slice(0);return e.set(n,r),r.forEach((function(n,i){r[i]=t(n,e)})),r;case"[object Object]":if(e.has(n))return e.get(n);var i=Object.create(Object.getPrototypeOf(n));return e.set(n,i),Object.keys(n).forEach((function(r){i[r]=t(n[r],e)})),i;default:return n}}(t,new Map),n},n.prototype.onSubscribe=function(t){var n=this;try{var e=t._subscription._observer;e&&!e.error&&(e.error=Rt)}catch(t){}var r=!this.observers.size;return this.observers.add(t),t.next&&this.lastResult&&t.next(this.lastResult),t.error&&this.lastError&&t.error(this.lastError),r&&this.setUpQuery(),function(){n.observers.delete(t)&&!n.observers.size&&n.tearDownQuery()}},n.prototype.setUpQuery=function(){var t=this,n=this.queryManager,e=this.queryId;this.shouldSubscribe&&n.addObservableQuery(e,this),this.options.pollInterval&&(jt(this),n.startPollingQuery(this.options,e));var r=function(n){t.updateLastResult(i(i({},t.lastResult),{errors:n.graphQLErrors,networkStatus:St.error,loading:!1})),$t(t.observers,"error",t.lastError=n)};n.observeQuery(e,this.options,{next:function(e){if(t.lastError||t.isDifferentFromLastResult(e)){var r=t.updateLastResult(e),i=t.options,u=i.query,o=i.variables,a=i.fetchPolicy;n.transform(u).hasClientExports?n.getLocalState().addExportedVariables(u,o).then((function(i){var o=t.variables;t.variables=t.options.variables=i,!e.loading&&r&&"cache-only"!==a&&n.transform(u).serverQuery&&!O(o,i)?t.refetch():$t(t.observers,"next",e)})):$t(t.observers,"next",e)}},error:r}).catch(r)},n.prototype.tearDownQuery=function(){var t=this.queryManager;this.isTornDown=!0,t.stopPollingQuery(this.queryId),this.subscriptions.forEach((function(t){return t.unsubscribe()})),this.subscriptions.clear(),t.removeObservableQuery(this.queryId),t.stopQuery(this.queryId),this.observers.clear()},n}(Dt);function Rt(){}function $t(t,n,e){var r=[];t.forEach((function(t){return t[n]&&r.push(t)})),r.forEach((function(t){return t[n](e)}))}function jt(t){var n=t.options.fetchPolicy;p("cache-first"!==n&&"cache-only"!==n,3)}var Mt=function(){function t(){this.store={}}return t.prototype.getStore=function(){return this.store},t.prototype.get=function(t){return this.store[t]},t.prototype.initMutation=function(t,n,e){this.store[t]={mutation:n,variables:e||{},loading:!0,error:null}},t.prototype.markMutationError=function(t,n){var e=this.store[t];e&&(e.loading=!1,e.error=n)},t.prototype.markMutationResult=function(t){var n=this.store[t];n&&(n.loading=!1,n.error=null)},t.prototype.reset=function(){this.store={}},t}(),xt=function(){function t(){this.store={}}return t.prototype.getStore=function(){return this.store},t.prototype.get=function(t){return this.store[t]},t.prototype.initQuery=function(t){var n=this.store[t.queryId];p(!n||n.document===t.document||O(n.document,t.document),19);var e=!1,r=null;t.storePreviousVariables&&n&&n.networkStatus!==St.loading&&(O(n.variables,t.variables)||(e=!0,r=n.variables));var i=[];n&&n.graphQLErrors&&(i=n.graphQLErrors),this.store[t.queryId]={document:t.document,variables:t.variables,previousVariables:r,networkError:null,graphQLErrors:i,networkStatus:e?St.setVariables:t.isPoll?St.poll:t.isRefetch?St.refetch:St.loading,metadata:t.metadata},"string"==typeof t.fetchMoreForQueryId&&this.store[t.fetchMoreForQueryId]&&(this.store[t.fetchMoreForQueryId].networkStatus=St.fetchMore)},t.prototype.markQueryResult=function(t,n,e){this.store&&this.store[t]&&(this.store[t].networkError=null,this.store[t].graphQLErrors=_t(n.errors)?n.errors:[],this.store[t].previousVariables=null,this.store[t].networkStatus=St.ready,"string"==typeof e&&this.store[e]&&(this.store[e].networkStatus=St.ready))},t.prototype.markQueryError=function(t,n,e){this.store&&this.store[t]&&(this.store[t].networkError=n,this.store[t].networkStatus=St.error,"string"==typeof e&&this.markQueryResultClient(e,!0))},t.prototype.markQueryResultClient=function(t,n){var e=this.store&&this.store[t];e&&(e.networkError=null,e.previousVariables=null,n&&(e.networkStatus=St.ready))},t.prototype.stopQuery=function(t){delete this.store[t]},t.prototype.reset=function(t){var n=this;Object.keys(this.store).forEach((function(e){t.indexOf(e)<0?n.stopQuery(e):n.store[e].networkStatus=St.loading}))},t}(),Ft=function(){function t(t){var n=t.client,e=t.resolvers,r=t.fragmentMatcher;this.cache=t.cache,n&&(this.client=n),e&&this.addResolvers(e),r&&this.setFragmentMatcher(r)}return t.prototype.addResolvers=function(t){var n=this;this.resolvers=this.resolvers||{},Array.isArray(t)?t.forEach((function(t){n.resolvers=ot(n.resolvers,t)})):this.resolvers=ot(this.resolvers,t)},t.prototype.setResolvers=function(t){this.resolvers={},this.addResolvers(t)},t.prototype.getResolvers=function(){return this.resolvers||{}},t.prototype.runResolvers=function(t){var n=t.document,e=t.remoteResult,r=t.context,a=t.variables,s=t.onlyRunForcedResolvers,c=void 0!==s&&s;return u(this,void 0,void 0,(function(){return o(this,(function(){return n?[2,this.resolveDocument(n,e.data,r,a,this.fragmentMatcher,c).then((function(t){return i(i({},e),{data:t.result})}))]:[2,e]}))}))},t.prototype.setFragmentMatcher=function(t){this.fragmentMatcher=t},t.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},t.prototype.clientQuery=function(t){return x(["client"],t)&&this.resolvers?t:null},t.prototype.serverQuery=function(t){return this.resolvers?function(t){L(t);var n=z([{test:function(t){return"client"===t.name.value},remove:!0}],t);return n&&(n=h(n,{FragmentDefinition:{enter:function(t){if(t.selectionSet&&t.selectionSet.selections.every((function(t){return A(t)&&"__typename"===t.name.value})))return null}}})),n}(t):t},t.prototype.prepareContext=function(t){void 0===t&&(t={});var n=this.cache;return i(i({},t),{cache:n,getCacheKey:function(t){if(n.config)return n.config.dataIdFromObject(t);p(!1,6)}})},t.prototype.addExportedVariables=function(t,n,e){return void 0===n&&(n={}),void 0===e&&(e={}),u(this,void 0,void 0,(function(){return o(this,(function(){return t?[2,this.resolveDocument(t,this.buildRootValueFromCache(t,n)||{},this.prepareContext(e),n).then((function(t){return i(i({},n),t.exportedVariables)}))]:[2,i({},n)]}))}))},t.prototype.shouldForceResolvers=function(t){var n=!1;return h(t,{Directive:{enter:function(t){if("client"===t.name.value&&t.arguments&&(n=t.arguments.some((function(t){return"always"===t.name.value&&"BooleanValue"===t.value.kind&&!0===t.value.value}))))return l}}}),n},t.prototype.buildRootValueFromCache=function(t,n){return this.cache.diff({query:tt(t),variables:n,returnPartialData:!0,optimistic:!1}).result},t.prototype.resolveDocument=function(t,n,e,r,a,s){return void 0===e&&(e={}),void 0===r&&(r={}),void 0===a&&(a=function(){return!0}),void 0===s&&(s=!1),u(this,void 0,void 0,(function(){var u,c,f,h,l,d,v,m,p;return o(this,(function(){var o;return u=Q(t),c=G(t),f=J(c),l=(h=u.operation)?(o=h).charAt(0).toUpperCase()+o.slice(1):"Query",v=(d=this).cache,m=d.client,p={fragmentMap:f,context:i(i({},e),{cache:v,client:m}),variables:r,fragmentMatcher:a,defaultOperationType:l,exportedVariables:{},onlyRunForcedResolvers:s},[2,this.resolveSelectionSet(u.selectionSet,n,p).then((function(t){return{result:t,exportedVariables:p.exportedVariables}}))]}))}))},t.prototype.resolveSelectionSet=function(t,n,e){return u(this,void 0,void 0,(function(){var r,i,a,s,c=this;return o(this,(function(){return r=e.fragmentMap,i=e.context,a=e.variables,s=[n],[2,Promise.all(t.selections.map((function(t){return u(c,void 0,void 0,(function(){var u;return o(this,(function(){return M(t,a)?A(t)?[2,this.resolveField(t,n,e).then((function(n){var e;void 0!==n&&s.push(((e={})[k(t)]=n,e))}))]:(C(t)?u=t:p(u=r[t.name.value],7),u&&u.typeCondition&&e.fragmentMatcher(n,u.typeCondition.name.value,i)?[2,this.resolveSelectionSet(u.selectionSet,n,e).then((function(t){s.push(t)}))]:[2]):[2]}))}))}))).then((function(){return at(s)}))]}))}))},t.prototype.resolveField=function(t,n,e){return u(this,void 0,void 0,(function(){var r,i,u,a,s,c,f,h,l,d=this;return o(this,(function(){return r=e.variables,i=t.name.value,u=k(t),a=i!==u,s=n[u]||n[i],c=Promise.resolve(s),e.onlyRunForcedResolvers&&!this.shouldForceResolvers(t)||(f=n.__typename||e.defaultOperationType,(h=this.resolvers&&this.resolvers[f])&&(l=h[a?i:u])&&(c=Promise.resolve(l(n,_(t,r),e.context,{field:t,fragmentMap:e.fragmentMap})))),[2,c.then((function(n){return void 0===n&&(n=s),t.directives&&t.directives.forEach((function(t){"export"===t.name.value&&t.arguments&&t.arguments.forEach((function(t){"as"===t.name.value&&"StringValue"===t.value.kind&&(e.exportedVariables[t.value.value]=n)}))})),t.selectionSet?null==n?n:Array.isArray(n)?d.resolveSubSelectedArray(t,n,e):t.selectionSet?d.resolveSelectionSet(t.selectionSet,n,e):void 0:n}))]}))}))},t.prototype.resolveSubSelectedArray=function(t,n,e){var r=this;return Promise.all(n.map((function(n){return null===n?null:Array.isArray(n)?r.resolveSubSelectedArray(t,n,e):t.selectionSet?r.resolveSelectionSet(t.selectionSet,n,e):void 0})))},t}();function Vt(t){var n=new Set,e=null;return new Dt((function(r){return n.add(r),e=e||t.subscribe({next:function(t){n.forEach((function(n){return n.next&&n.next(t)}))},error:function(t){n.forEach((function(n){return n.error&&n.error(t)}))},complete:function(){n.forEach((function(t){return t.complete&&t.complete()}))}}),function(){n.delete(r)&&!n.size&&e&&(e.unsubscribe(),e=null)}}))}var qt=Object.prototype.hasOwnProperty,Pt=function(){function t(t){var n=t.link,e=t.queryDeduplication,r=void 0!==e&&e,i=t.store,u=t.onBroadcast,o=void 0===u?function(){}:u,a=t.ssrMode,s=void 0!==a&&a,c=t.clientAwareness,f=void 0===c?{}:c,h=t.localState,l=t.assumeImmutableResults;this.mutationStore=new Mt,this.queryStore=new xt,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.transformCache=new(nt?WeakMap:Map),this.inFlightLinkObservables=new Map,this.pollingInfoByQueryId=new Map,this.link=n,this.queryDeduplication=r,this.dataStore=i,this.onBroadcast=o,this.clientAwareness=f,this.localState=h||new Ft({cache:i.getCache()}),this.ssrMode=s,this.assumeImmutableResults=!!l}return t.prototype.stop=function(){var t=this;this.queries.forEach((function(n,e){t.stopQueryNoBroadcast(e)})),this.fetchQueryRejectFns.forEach((function(t){t(new m(8))}))},t.prototype.mutate=function(t){var n=t.mutation,e=t.variables,r=t.optimisticResponse,a=t.updateQueries,s=t.refetchQueries,c=void 0===s?[]:s,f=t.awaitRefetchQueries,h=void 0!==f&&f,l=t.update,d=t.errorPolicy,v=void 0===d?"none":d,m=t.fetchPolicy,y=t.context,I=void 0===y?{}:y;return u(this,void 0,void 0,(function(){var t,u,s,f=this;return o(this,(function(o){switch(o.label){case 0:return p(n,9),p(!m||"no-cache"===m,10),t=this.generateQueryId(),n=this.transform(n).document,this.setQuery(t,(function(){return{document:n}})),e=this.getVariables(n,e),this.transform(n).hasClientExports?[4,this.localState.addExportedVariables(n,e,I)]:[3,2];case 1:e=o.sent(),o.label=2;case 2:return u=function(){var t={};return a&&f.queries.forEach((function(n,e){var r=n.observableQuery;if(r){var i=r.queryName;i&&qt.call(a,i)&&(t[e]={updater:a[i],query:f.queryStore.get(e)})}})),t},this.mutationStore.initMutation(t,n,e),this.dataStore.markMutationInit({mutationId:t,document:n,variables:e,updateQueries:u(),update:l,optimisticResponse:r}),this.broadcastQueries(),s=this,[2,new Promise((function(o,a){var f,d;s.getObservableFromLink(n,i(i({},I),{optimisticResponse:r}),e,!1).subscribe({next:function(r){it(r)&&"none"===v?d=new At({graphQLErrors:r.errors}):(s.mutationStore.markMutationResult(t),"no-cache"!==m&&s.dataStore.markMutationResult({mutationId:t,result:r,document:n,variables:e,updateQueries:u(),update:l}),f=r)},error:function(n){s.mutationStore.markMutationError(t,n),s.dataStore.markMutationComplete({mutationId:t,optimisticResponse:r}),s.broadcastQueries(),s.setQuery(t,(function(){return{document:null}})),a(new At({networkError:n}))},complete:function(){if(d&&s.mutationStore.markMutationError(t,d),s.dataStore.markMutationComplete({mutationId:t,optimisticResponse:r}),s.broadcastQueries(),d)a(d);else{"function"==typeof c&&(c=c(f));var n=[];_t(c)&&c.forEach((function(t){if("string"==typeof t)s.queries.forEach((function(e){var r=e.observableQuery;r&&r.queryName===t&&n.push(r.refetch())}));else{var e={query:t.query,variables:t.variables,fetchPolicy:"network-only"};t.context&&(e.context=t.context),n.push(s.query(e))}})),Promise.all(h?n:[]).then((function(){s.setQuery(t,(function(){return{document:null}})),"ignore"===v&&f&&it(f)&&delete f.errors,o(f)}))}}})}))]}}))}))},t.prototype.fetchQuery=function(t,n,e,r){return u(this,void 0,void 0,(function(){var u,a,s,c,f,h,l,d,v,m,p,y,I,g,b,w,E=this;return o(this,(function(o){switch(o.label){case 0:return a=void 0===(u=n.metadata)?null:u,c=void 0===(s=n.fetchPolicy)?"cache-first":s,h=void 0===(f=n.context)?{}:f,l=this.transform(n.query).document,d=this.getVariables(l,n.variables),this.transform(l).hasClientExports?[4,this.localState.addExportedVariables(l,d,h)]:[3,2];case 1:d=o.sent(),o.label=2;case 2:if(n=i(i({},n),{variables:d}),p=m="network-only"===c||"no-cache"===c,m||(y=this.dataStore.getCache().diff({query:l,variables:d,returnPartialData:!0,optimistic:!1}),p=!y.complete||"cache-and-network"===c,v=y.result),I=p&&"cache-only"!==c&&"standby"!==c,x(["live"],l)&&(I=!0),g=this.idCounter++,b="no-cache"!==c?this.updateQueryWatch(t,l,n):void 0,this.setQuery(t,(function(){return{document:l,lastRequestId:g,invalidated:!0,cancel:b}})),this.invalidate(r),this.queryStore.initQuery({queryId:t,document:l,storePreviousVariables:I,variables:d,isPoll:e===kt.poll,isRefetch:e===kt.refetch,metadata:a,fetchMoreForQueryId:r}),this.broadcastQueries(),I){if(w=this.fetchRequest({requestId:g,queryId:t,document:l,options:n,fetchMoreForQueryId:r}).catch((function(n){throw n.hasOwnProperty("graphQLErrors")?n:(g>=E.getQuery(t).lastRequestId&&(E.queryStore.markQueryError(t,n,r),E.invalidate(t),E.invalidate(r),E.broadcastQueries()),new At({networkError:n}))})),"cache-and-network"!==c)return[2,w];w.catch((function(){}))}return this.queryStore.markQueryResultClient(t,!I),this.invalidate(t),this.invalidate(r),this.transform(l).hasForcedResolvers?[2,this.localState.runResolvers({document:l,remoteResult:{data:v},context:h,variables:d,onlyRunForcedResolvers:!0}).then((function(e){return E.markQueryResult(t,e,n,r),E.broadcastQueries(),e}))]:(this.broadcastQueries(),[2,{data:v}])}}))}))},t.prototype.markQueryResult=function(t,n,e,r){var i=e.variables,u=e.errorPolicy;"no-cache"===e.fetchPolicy?this.setQuery(t,(function(){return{newData:{result:n.data,complete:!0}}})):this.dataStore.markQueryResult(n,this.getQuery(t).document,i,r,"ignore"===u||"all"===u)},t.prototype.queryListenerForObserver=function(t,n,e){var r=this;function i(t,n){if(e[t])try{e[t](n)}catch(t){}}return function(e,u){if(r.invalidate(t,!1),e){var o=r.getQuery(t),a=o.observableQuery,s=o.document,c=a?a.options.fetchPolicy:n.fetchPolicy;if("standby"!==c){var f=Tt(e.networkStatus),h=a&&a.getLastResult();if(!f||n.returnPartialData||!u&&e.previousVariables||h&&h.networkStatus!==e.networkStatus&&n.notifyOnNetworkStatusChange||"cache-only"===c||"cache-and-network"===c){var l=_t(e.graphQLErrors),d=a&&a.options.errorPolicy||n.errorPolicy||"none";if("none"===d&&l||e.networkError)return i("error",new At({graphQLErrors:e.graphQLErrors,networkError:e.networkError}));try{var v=void 0,m=void 0;if(u)"no-cache"!==c&&"network-only"!==c&&r.setQuery(t,(function(){return{newData:null}})),v=u.result,m=!u.complete;else{var p=a&&a.getLastError();if(h&&h.data&&("none"===d||(p&&p.graphQLErrors)===e.graphQLErrors))v=h.data,m=!1;else{var y=r.dataStore.getCache().diff({query:s,variables:e.previousVariables||e.variables,returnPartialData:!0,optimistic:!0});v=y.result,m=!y.complete}}var I=m&&!(n.returnPartialData||"cache-only"===c),g={data:I?h&&h.data:v,loading:f,networkStatus:e.networkStatus,stale:I};"all"===d&&l&&(g.errors=e.graphQLErrors),i("next",g)}catch(t){i("error",new At({networkError:t}))}}}}}},t.prototype.transform=function(t){var n,e=this.transformCache;if(!e.has(t)){var r=this.dataStore.getCache(),i=r.transformDocument(t),u=(n=r.transformForLink(i),z([Z],L(n))),o=this.localState.clientQuery(i),a=this.localState.serverQuery(u),s={document:i,hasClientExports:F(i),hasForcedResolvers:this.localState.shouldForceResolvers(i),clientQuery:o,serverQuery:a,defaultVars:Y(U(i))},c=function(t){t&&!e.has(t)&&e.set(t,s)};c(t),c(i),c(o),c(a)}return e.get(t)},t.prototype.getVariables=function(t,n){return i(i({},this.transform(t).defaultVars),n)},t.prototype.watchQuery=function(t,n){void 0===n&&(n=!0),p("standby"!==t.fetchPolicy,11),t.variables=this.getVariables(t.query,t.variables),void 0===t.notifyOnNetworkStatusChange&&(t.notifyOnNetworkStatusChange=!1);var e=i({},t);return new Ct({queryManager:this,options:e,shouldSubscribe:n})},t.prototype.query=function(t){var n=this;return p(t.query,12),p("Document"===t.query.kind,13),p(!t.returnPartialData,14),p(!t.pollInterval,15),new Promise((function(e,r){var i=n.watchQuery(t,!1);n.fetchQueryRejectFns.set("query:"+i.queryId,r),i.result().then(e,r).then((function(){return n.fetchQueryRejectFns.delete("query:"+i.queryId)}))}))},t.prototype.generateQueryId=function(){return String(this.idCounter++)},t.prototype.stopQueryInStore=function(t){this.stopQueryInStoreNoBroadcast(t),this.broadcastQueries()},t.prototype.stopQueryInStoreNoBroadcast=function(t){this.stopPollingQuery(t),this.queryStore.stopQuery(t),this.invalidate(t)},t.prototype.addQueryListener=function(t,n){this.setQuery(t,(function(t){return t.listeners.add(n),{invalidated:!1}}))},t.prototype.updateQueryWatch=function(t,n,e){var r=this,i=this.getQuery(t).cancel;return i&&i(),this.dataStore.getCache().watch({query:n,variables:e.variables,optimistic:!0,previousResult:function(){var n=null,e=r.getQuery(t).observableQuery;if(e){var i=e.getLastResult();i&&(n=i.data)}return n},callback:function(n){r.setQuery(t,(function(){return{invalidated:!0,newData:n}}))}})},t.prototype.addObservableQuery=function(t,n){this.setQuery(t,(function(){return{observableQuery:n}}))},t.prototype.removeObservableQuery=function(t){var n=this.getQuery(t).cancel;this.setQuery(t,(function(){return{observableQuery:null}})),n&&n()},t.prototype.clearStore=function(){this.fetchQueryRejectFns.forEach((function(t){t(new m(16))}));var t=[];return this.queries.forEach((function(n,e){n.observableQuery&&t.push(e)})),this.queryStore.reset(t),this.mutationStore.reset(),this.dataStore.reset()},t.prototype.resetStore=function(){var t=this;return this.clearStore().then((function(){return t.reFetchObservableQueries()}))},t.prototype.reFetchObservableQueries=function(t){var n=this;void 0===t&&(t=!1);var e=[];return this.queries.forEach((function(r,i){var u=r.observableQuery;if(u){var o=u.options.fetchPolicy;u.resetLastResults(),"cache-only"===o||!t&&"standby"===o||e.push(u.refetch()),n.setQuery(i,(function(){return{newData:null}})),n.invalidate(i)}})),this.broadcastQueries(),Promise.all(e)},t.prototype.observeQuery=function(t,n,e){return this.addQueryListener(t,this.queryListenerForObserver(t,n,e)),this.fetchQuery(t,n)},t.prototype.startQuery=function(t,n,e){return this.addQueryListener(t,e),this.fetchQuery(t,n).catch((function(){})),t},t.prototype.startGraphQLSubscription=function(t){var n=this,e=t.query,r=t.fetchPolicy,i=t.variables;e=this.transform(e).document,i=this.getVariables(e,i);var u=function(t){return n.getObservableFromLink(e,{},t,!1).map((function(i){if(r&&"no-cache"===r||(n.dataStore.markSubscriptionResult(i,e,t),n.broadcastQueries()),it(i))throw new At({graphQLErrors:i.errors});return i}))};if(this.transform(e).hasClientExports){var o=this.localState.addExportedVariables(e,i).then(u);return new Dt((function(t){var n=null;return o.then((function(e){return n=e.subscribe(t)}),t.error),function(){return n&&n.unsubscribe()}}))}return u(i)},t.prototype.stopQuery=function(t){this.stopQueryNoBroadcast(t),this.broadcastQueries()},t.prototype.stopQueryNoBroadcast=function(t){this.stopQueryInStoreNoBroadcast(t),this.removeQuery(t)},t.prototype.removeQuery=function(t){this.fetchQueryRejectFns.delete("query:"+t),this.fetchQueryRejectFns.delete("fetchRequest:"+t),this.getQuery(t).subscriptions.forEach((function(t){return t.unsubscribe()})),this.queries.delete(t)},t.prototype.getCurrentQueryResult=function(t,n){void 0===n&&(n=!0);var e=t.options,r=e.variables,i=e.query,u=e.fetchPolicy,o=e.returnPartialData,a=t.getLastResult(),s=this.getQuery(t.queryId).newData;if(s&&s.complete)return{data:s.result,partial:!1};if("no-cache"===u||"network-only"===u)return{data:void 0,partial:!1};var c=this.dataStore.getCache().diff({query:i,variables:r,previousResult:a?a.data:void 0,returnPartialData:!0,optimistic:n}),f=c.complete;return{data:f||o?c.result:void 0,partial:!f}},t.prototype.getQueryWithPreviousResult=function(t){var n;if("string"==typeof t){var e=this.getQuery(t).observableQuery;p(e,17),n=e}else n=t;var r=n.options,i=r.variables,u=r.query;return{previousResult:this.getCurrentQueryResult(n,!1).data,variables:i,document:u}},t.prototype.broadcastQueries=function(){var t=this;this.onBroadcast(),this.queries.forEach((function(n,e){n.invalidated&&n.listeners.forEach((function(r){r&&r(t.queryStore.get(e),n.newData)}))}))},t.prototype.getLocalState=function(){return this.localState},t.prototype.getObservableFromLink=function(t,n,e,r){var u,o=this;void 0===r&&(r=this.queryDeduplication);var a=this.transform(t).serverQuery;if(a){var s=this.inFlightLinkObservables,c=this.link,f={query:a,variables:e,operationName:B(a)||void 0,context:this.prepareContext(i(i({},n),{forceFetch:!r}))};if(n=f.context,r){var h=s.get(a)||new Map;s.set(a,h);var l=JSON.stringify(e);if(!(u=h.get(l))){h.set(l,u=Vt(Ot(c,f)));var d=function(){h.delete(l),h.size||s.delete(a),v.unsubscribe()},v=u.subscribe({next:d,error:d,complete:d})}}else u=Vt(Ot(c,f))}else u=Dt.of({data:{}}),n=this.prepareContext(n);var m=this.transform(t).clientQuery;return m&&(u=function(t){return new Dt((function(r){var i=r.next,u=r.error,a=r.complete,s=0,c=!1,f={next:function(t){++s,new Promise((function(r){r(function(t){return o.localState.runResolvers({document:m,remoteResult:t,context:n,variables:e})}(t))})).then((function(t){--s,i&&i.call(r,t),c&&f.complete()}),(function(t){--s,u&&u.call(r,t)}))},error:function(t){u&&u.call(r,t)},complete:function(){c=!0,s||a&&a.call(r)}},h=t.subscribe(f);return function(){return h.unsubscribe()}}))}(u)),u},t.prototype.fetchRequest=function(t){var n,e,r=this,i=t.requestId,u=t.queryId,o=t.document,a=t.options,s=t.fetchMoreForQueryId,c=a.variables,f=a.errorPolicy,h=void 0===f?"none":f,l=a.fetchPolicy;return new Promise((function(t,f){var d=r.getObservableFromLink(o,a.context,c),v="fetchRequest:"+u;r.fetchQueryRejectFns.set(v,f);var m=function(){r.fetchQueryRejectFns.delete(v),r.setQuery(u,(function(t){t.subscriptions.delete(p)}))},p=d.map((function(t){if(i>=r.getQuery(u).lastRequestId&&(r.markQueryResult(u,t,a,s),r.queryStore.markQueryResult(u,t,s),r.invalidate(u),r.invalidate(s),r.broadcastQueries()),"none"===h&&_t(t.errors))return f(new At({graphQLErrors:t.errors}));if("all"===h&&(e=t.errors),s||"no-cache"===l)n=t.data;else{var d=r.dataStore.getCache().diff({variables:c,query:o,optimistic:!1,returnPartialData:!0});(d.complete||a.returnPartialData)&&(n=d.result)}})).subscribe({error:function(t){m(),f(t)},complete:function(){m(),t({data:n,errors:e,loading:!1,networkStatus:St.ready,stale:!1})}});r.setQuery(u,(function(t){t.subscriptions.add(p)}))}))},t.prototype.getQuery=function(t){return this.queries.get(t)||{listeners:new Set,invalidated:!1,document:null,newData:null,lastRequestId:1,observableQuery:null,subscriptions:new Set}},t.prototype.setQuery=function(t,n){var e=this.getQuery(t),r=i(i({},e),n(e));this.queries.set(t,r)},t.prototype.invalidate=function(t,n){void 0===n&&(n=!0),t&&this.setQuery(t,(function(){return{invalidated:n}}))},t.prototype.prepareContext=function(t){void 0===t&&(t={});var n=this.localState.prepareContext(t);return i(i({},n),{clientAwareness:this.clientAwareness})},t.prototype.checkInFlight=function(t){var n=this.queryStore.get(t);return n&&n.networkStatus!==St.ready&&n.networkStatus!==St.error},t.prototype.startPollingQuery=function(t,n,e){var r=this,u=t.pollInterval;if(p(u,18),!this.ssrMode){var o=this.pollingInfoByQueryId.get(n);o||this.pollingInfoByQueryId.set(n,o={}),o.interval=u,o.options=i(i({},t),{fetchPolicy:"network-only"});var a=function(){var t=r.pollingInfoByQueryId.get(n);t&&(r.checkInFlight(n)?s():r.fetchQuery(n,t.options,kt.poll).then(s,s))},s=function(){var t=r.pollingInfoByQueryId.get(n);t&&(clearTimeout(t.timeout),t.timeout=setTimeout(a,t.interval))};e&&this.addQueryListener(n,e),s()}return n},t.prototype.stopPollingQuery=function(t){this.pollingInfoByQueryId.delete(t)},t}(),Lt=function(){function t(t){this.cache=t}return t.prototype.getCache=function(){return this.cache},t.prototype.markQueryResult=function(t,n,e,r,i){void 0===i&&(i=!1);var u=!it(t);i&&it(t)&&t.data&&(u=!0),!r&&u&&this.cache.write({result:t.data,dataId:"ROOT_QUERY",query:n,variables:e})},t.prototype.markSubscriptionResult=function(t,n,e){it(t)||this.cache.write({result:t.data,dataId:"ROOT_SUBSCRIPTION",query:n,variables:e})},t.prototype.markMutationInit=function(t){var n,e=this;t.optimisticResponse&&(n="function"==typeof t.optimisticResponse?t.optimisticResponse(t.variables):t.optimisticResponse,this.cache.recordOptimisticTransaction((function(r){var i=e.cache;e.cache=r;try{e.markMutationResult({mutationId:t.mutationId,result:{data:n},document:t.document,variables:t.variables,updateQueries:t.updateQueries,update:t.update})}finally{e.cache=i}}),t.mutationId))},t.prototype.markMutationResult=function(t){var n=this;if(!it(t.result)){var e=[{result:t.result.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}],r=t.updateQueries;r&&Object.keys(r).forEach((function(i){var u=r[i],o=u.query,a=u.updater,s=n.cache.diff({query:o.document,variables:o.variables,returnPartialData:!0,optimistic:!1}),c=s.result;if(s.complete){var f=rt((function(){return a(c,{mutationResult:t.result,queryName:B(o.document)||void 0,queryVariables:o.variables})}));f&&e.push({result:f,dataId:"ROOT_QUERY",query:o.document,variables:o.variables})}})),this.cache.performTransaction((function(n){e.forEach((function(t){return n.write(t)}));var r=t.update;r&&rt((function(){return r(n,t.result)}))}))}},t.prototype.markMutationComplete=function(t){t.optimisticResponse&&this.cache.removeOptimistic(t.mutationId)},t.prototype.markUpdateQueryResult=function(t,n,e){this.cache.write({result:e,dataId:"ROOT_QUERY",variables:n,query:t})},t.prototype.reset=function(){return this.cache.reset()},t}(),Ut=function(){function t(t){var n=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var e=t.cache,r=t.ssrMode,i=void 0!==r&&r,u=t.ssrForceFetchDelay,o=void 0===u?0:u,a=t.connectToDevTools,s=t.queryDeduplication,c=void 0===s||s,f=t.defaultOptions,h=t.assumeImmutableResults,l=void 0!==h&&h,d=t.resolvers,v=t.typeDefs,p=t.fragmentMatcher,y=t.name,I=t.version,g=t.link;if(!g&&d&&(g=Et.empty()),!g||!e)throw new m(4);this.link=g,this.cache=e,this.store=new Lt(e),this.disableNetworkFetches=i||o>0,this.queryDeduplication=c,this.defaultOptions=f||{},this.typeDefs=v,o&&setTimeout((function(){return n.disableNetworkFetches=!1}),o),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),void 0!==a&&a&&"undefined"!=typeof window&&(window.__APOLLO_CLIENT__=this),this.version="2.6.10",this.localState=new Ft({cache:e,client:this,resolvers:d,fragmentMatcher:p}),this.queryManager=new Pt({link:this.link,store:this.store,queryDeduplication:c,ssrMode:i,clientAwareness:{name:y,version:I},localState:this.localState,assumeImmutableResults:l,onBroadcast:function(){n.devToolsHookCb&&n.devToolsHookCb({action:{},state:{queries:n.queryManager.queryStore.getStore(),mutations:n.queryManager.mutationStore.getStore()},dataWithOptimisticResults:n.cache.extract(!0)})}})}return t.prototype.stop=function(){this.queryManager.stop()},t.prototype.watchQuery=function(t){return this.defaultOptions.watchQuery&&(t=i(i({},this.defaultOptions.watchQuery),t)),!this.disableNetworkFetches||"network-only"!==t.fetchPolicy&&"cache-and-network"!==t.fetchPolicy||(t=i(i({},t),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(t)},t.prototype.query=function(t){return this.defaultOptions.query&&(t=i(i({},this.defaultOptions.query),t)),p("cache-and-network"!==t.fetchPolicy,5),this.disableNetworkFetches&&"network-only"===t.fetchPolicy&&(t=i(i({},t),{fetchPolicy:"cache-first"})),this.queryManager.query(t)},t.prototype.mutate=function(t){return this.defaultOptions.mutate&&(t=i(i({},this.defaultOptions.mutate),t)),this.queryManager.mutate(t)},t.prototype.subscribe=function(t){return this.queryManager.startGraphQLSubscription(t)},t.prototype.readQuery=function(t,n){return void 0===n&&(n=!1),this.cache.readQuery(t,n)},t.prototype.readFragment=function(t,n){return void 0===n&&(n=!1),this.cache.readFragment(t,n)},t.prototype.writeQuery=function(t){var n=this.cache.writeQuery(t);return this.queryManager.broadcastQueries(),n},t.prototype.writeFragment=function(t){var n=this.cache.writeFragment(t);return this.queryManager.broadcastQueries(),n},t.prototype.writeData=function(t){var n=this.cache.writeData(t);return this.queryManager.broadcastQueries(),n},t.prototype.__actionHookForDevTools=function(t){this.devToolsHookCb=t},t.prototype.__requestRaw=function(t){return Ot(this.link,t)},t.prototype.initQueryManager=function(){return this.queryManager},t.prototype.resetStore=function(){var t=this;return Promise.resolve().then((function(){return t.queryManager.clearStore()})).then((function(){return Promise.all(t.resetStoreCallbacks.map((function(t){return t()})))})).then((function(){return t.reFetchObservableQueries()}))},t.prototype.clearStore=function(){var t=this;return Promise.resolve().then((function(){return t.queryManager.clearStore()})).then((function(){return Promise.all(t.clearStoreCallbacks.map((function(t){return t()})))}))},t.prototype.onResetStore=function(t){var n=this;return this.resetStoreCallbacks.push(t),function(){n.resetStoreCallbacks=n.resetStoreCallbacks.filter((function(n){return n!==t}))}},t.prototype.onClearStore=function(t){var n=this;return this.clearStoreCallbacks.push(t),function(){n.clearStoreCallbacks=n.clearStoreCallbacks.filter((function(n){return n!==t}))}},t.prototype.reFetchObservableQueries=function(t){return this.queryManager.reFetchObservableQueries(t)},t.prototype.extract=function(t){return this.cache.extract(t)},t.prototype.restore=function(t){return this.cache.restore(t)},t.prototype.addResolvers=function(t){this.localState.addResolvers(t)},t.prototype.setResolvers=function(t){this.localState.setResolvers(t)},t.prototype.getResolvers=function(){return this.localState.getResolvers()},t.prototype.setLocalStateFragmentMatcher=function(t){this.localState.setFragmentMatcher(t)},t}(),Bt=t((function(t,n){function e(t){for(var n=null,e=1;e<t.length;e++){var i=t[e],u=r(i);if(u!==i.length&&(null===n||u<n)&&0===(n=u))break}return null===n?0:n}function r(t){for(var n=0;n<t.length&&(" "===t[n]||"\t"===t[n]);)n++;return n}function i(t){return r(t)===t.length}Object.defineProperty(n,"__esModule",{value:!0}),n.dedentBlockStringValue=function(t){var n=t.split(/\r\n|[\n\r]/g),r=e(n);if(0!==r)for(var u=1;u<n.length;u++)n[u]=n[u].slice(r);for(;n.length>0&&i(n[0]);)n.shift();for(;n.length>0&&i(n[n.length-1]);)n.pop();return n.join("\n")},n.getBlockStringIndentation=e,n.printBlockString=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===t.indexOf("\n"),i=" "===t[0]||"\t"===t[0],u='"'===t[t.length-1],o=!r||u||e,a="";return!o||r&&i||(a+="\n"+n),a+=n?t.replace(/\n/g,"\n"+n):t,o&&(a+="\n"),'"""'+a.replace(/"""/g,'\\"""')+'"""'}}));n(Bt);var Gt=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.print=function(t){return(0,f.visit)(t,{leave:e})};var e={Name:function(t){return t.value},Variable:function(t){return"$"+t.name},Document:function(t){return i(t.definitions,"\n\n")+"\n"},OperationDefinition:function(t){var n=t.operation,e=t.name,r=o("(",i(t.variableDefinitions,", "),")"),u=i(t.directives," "),a=t.selectionSet;return e||u||r||"query"!==n?i([n,i([e,r]),u,a]," "):a},VariableDefinition:function(t){var n=t.directives;return t.variable+": "+t.type+o(" = ",t.defaultValue)+o(" ",i(n," "))},SelectionSet:function(t){return u(t.selections)},Field:function(t){var n=t.name,e=t.arguments,r=t.directives,u=t.selectionSet;return i([o("",t.alias,": ")+n+o("(",i(e,", "),")"),i(r," "),u]," ")},Argument:function(t){return t.name+": "+t.value},FragmentSpread:function(t){return"..."+t.name+o(" ",i(t.directives," "))},InlineFragment:function(t){var n=t.directives,e=t.selectionSet;return i(["...",o("on ",t.typeCondition),i(n," "),e]," ")},FragmentDefinition:function(t){var n=t.typeCondition,e=t.variableDefinitions,r=t.directives,u=t.selectionSet;return"fragment ".concat(t.name).concat(o("(",i(e,", "),")")," ")+"on ".concat(n," ").concat(o("",i(r," ")," "))+u},IntValue:function(t){return t.value},FloatValue:function(t){return t.value},StringValue:function(t,n){var e=t.value;return t.block?(0,Bt.printBlockString)(e,"description"===n?"":" "):JSON.stringify(e)},BooleanValue:function(t){return t.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(t){return t.value},ListValue:function(t){return"["+i(t.values,", ")+"]"},ObjectValue:function(t){return"{"+i(t.fields,", ")+"}"},ObjectField:function(t){return t.name+": "+t.value},Directive:function(t){return"@"+t.name+o("(",i(t.arguments,", "),")")},NamedType:function(t){return t.name},ListType:function(t){return"["+t.type+"]"},NonNullType:function(t){return t.type+"!"},SchemaDefinition:function(t){var n=t.operationTypes;return i(["schema",i(t.directives," "),u(n)]," ")},OperationTypeDefinition:function(t){return t.operation+": "+t.type},ScalarTypeDefinition:r((function(t){return i(["scalar",t.name,i(t.directives," ")]," ")})),ObjectTypeDefinition:r((function(t){var n=t.directives,e=t.fields;return i(["type",t.name,o("implements ",i(t.interfaces," & ")),i(n," "),u(e)]," ")})),FieldDefinition:r((function(t){var n=t.arguments,e=t.type,r=t.directives;return t.name+(c(n)?o("(\n",a(i(n,"\n")),"\n)"):o("(",i(n,", "),")"))+": "+e+o(" ",i(r," "))})),InputValueDefinition:r((function(t){var n=t.directives;return i([t.name+": "+t.type,o("= ",t.defaultValue),i(n," ")]," ")})),InterfaceTypeDefinition:r((function(t){var n=t.fields;return i(["interface",t.name,i(t.directives," "),u(n)]," ")})),UnionTypeDefinition:r((function(t){var n=t.types;return i(["union",t.name,i(t.directives," "),n&&0!==n.length?"= "+i(n," | "):""]," ")})),EnumTypeDefinition:r((function(t){var n=t.values;return i(["enum",t.name,i(t.directives," "),u(n)]," ")})),EnumValueDefinition:r((function(t){return i([t.name,i(t.directives," ")]," ")})),InputObjectTypeDefinition:r((function(t){var n=t.fields;return i(["input",t.name,i(t.directives," "),u(n)]," ")})),DirectiveDefinition:r((function(t){var n=t.arguments,e=t.repeatable,r=t.locations;return"directive @"+t.name+(c(n)?o("(\n",a(i(n,"\n")),"\n)"):o("(",i(n,", "),")"))+(e?" repeatable":"")+" on "+i(r," | ")})),SchemaExtension:function(t){var n=t.operationTypes;return i(["extend schema",i(t.directives," "),u(n)]," ")},ScalarTypeExtension:function(t){return i(["extend scalar",t.name,i(t.directives," ")]," ")},ObjectTypeExtension:function(t){var n=t.directives,e=t.fields;return i(["extend type",t.name,o("implements ",i(t.interfaces," & ")),i(n," "),u(e)]," ")},InterfaceTypeExtension:function(t){var n=t.fields;return i(["extend interface",t.name,i(t.directives," "),u(n)]," ")},UnionTypeExtension:function(t){var n=t.types;return i(["extend union",t.name,i(t.directives," "),n&&0!==n.length?"= "+i(n," | "):""]," ")},EnumTypeExtension:function(t){var n=t.values;return i(["extend enum",t.name,i(t.directives," "),u(n)]," ")},InputObjectTypeExtension:function(t){var n=t.fields;return i(["extend input",t.name,i(t.directives," "),u(n)]," ")}};function r(t){return function(n){return i([n.description,t(n)],"\n")}}function i(t,n){return t?t.filter((function(t){return t})).join(n||""):""}function u(t){return t&&0!==t.length?"{\n"+a(i(t,"\n"))+"\n}":""}function o(t,n,e){return n?t+n+(e||""):""}function a(t){return t&&" "+t.replace(/\n/g,"\n ")}function s(t){return-1!==t.indexOf("\n")}function c(t){return t&&t.some(s)}}));n(Gt);var Qt=Gt.print,Jt={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},Yt=function(t,n,e){var r=new Error(e);throw r.name="ServerError",r.response=t,r.statusCode=t.status,r.result=n,r},Kt=function(t){var n;try{n=JSON.stringify(t)}catch(t){var e=new m(2);throw e.parseError=t,e}return n},Wt=function(t){function n(n){return t.call(this,function(t){void 0===t&&(t={});var n=t.uri,e=void 0===n?"/graphql":n,r=t.fetch,u=t.includeExtensions,o=t.useGETForQueries,a=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]])}return e}(t,["uri","fetch","includeExtensions","useGETForQueries"]);!function(t){if(!t&&"undefined"==typeof fetch)throw new m(1)}(r),r||(r=fetch);var s={http:{includeExtensions:u},options:a.fetchOptions,credentials:a.credentials,headers:a.headers};return new Et((function(t){var n=function(t,n){return t.getContext().uri||("function"==typeof n?n(t):n||"/graphql")}(t,e),u=t.getContext(),a={};if(u.clientAwareness){var c=u.clientAwareness,f=c.name,h=c.version;f&&(a["apollographql-client-name"]=f),h&&(a["apollographql-client-version"]=h)}var l,d=i({},a,u.headers),v=function(t,n){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var u=i({},n.options,{headers:n.headers,credentials:n.credentials}),o=n.http;e.forEach((function(t){u=i({},u,t.options,{headers:i({},u.headers,t.headers)}),t.credentials&&(u.credentials=t.credentials),o=i({},o,t.http)}));var a=t.operationName,s=t.extensions,c=t.variables,f=t.query,h={operationName:a,variables:c};return o.includeExtensions&&(h.extensions=s),o.includeQuery&&(h.query=Qt(f)),{options:u,body:h}}(t,Jt,s,{http:u.http,options:u.fetchOptions,credentials:u.credentials,headers:d}),m=v.options,p=v.body;if(!m.signal){var y=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var t=new AbortController;return{controller:t,signal:t.signal}}();(l=y.controller)&&(m.signal=y.signal)}if(o&&!t.query.definitions.some((function(t){return"OperationDefinition"===t.kind&&"mutation"===t.operation}))&&(m.method="GET"),"GET"===m.method){var I=function(t,n){var e=[],r=function(t,n){e.push(t+"="+encodeURIComponent(n))};if("query"in n&&r("query",n.query),n.operationName&&r("operationName",n.operationName),n.variables){var i=void 0;try{i=Kt(n.variables)}catch(t){return{parseError:t}}r("variables",i)}if(n.extensions){var u=void 0;try{u=Kt(n.extensions)}catch(t){return{parseError:t}}r("extensions",u)}var o="",a=t,s=t.indexOf("#");-1!==s&&(o=t.substr(s),a=t.substr(0,s));var c=-1===a.indexOf("?")?"?":"&";return{newURI:a+c+e.join("&")+o}}(n,p),g=I.newURI,b=I.parseError;if(b)return mt(b);n=g}else try{m.body=Kt(p)}catch(b){return mt(b)}return new dt((function(e){var i;return r(n,m).then((function(n){return t.setContext({response:n}),n})).then((i=t,function(t){return t.text().then((function(n){try{return JSON.parse(n)}catch(r){var e=r;return e.name="ServerParseError",e.response=t,e.statusCode=t.status,e.bodyText=n,Promise.reject(e)}})).then((function(n){return t.status>=300&&Yt(t,n,"Response not successful: Received status code "+t.status),Array.isArray(n)||n.hasOwnProperty("data")||n.hasOwnProperty("errors")||Yt(t,n,"Server response was missing for query '"+(Array.isArray(i)?i.map((function(t){return t.operationName})):i.operationName)+"'."),n}))})).then((function(t){return e.next(t),e.complete(),t})).catch((function(t){"AbortError"!==t.name&&(t.result&&t.result.errors&&t.result.data&&e.next(t.result),e.error(t))})),function(){l&&l.abort()}}))}))}(n).request)||this}return r(n,t),n}(Et);function Xt(t){return{kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:Ht(t)}]}}function Ht(t){if("number"==typeof t||"boolean"==typeof t||"string"==typeof t||null==t)return null;if(Array.isArray(t))return Ht(t[0]);var n=[];return Object.keys(t).forEach((function(e){var r=Ht(t[e]);n.push({kind:"Field",name:{kind:"Name",value:e},selectionSet:r||void 0})})),{kind:"SelectionSet",selections:n}}var zt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:null,variableDefinitions:null,directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:null,name:{kind:"Name",value:"__typename"},arguments:[],directives:[],selectionSet:null}]}}]},Zt=function(){function t(){}return t.prototype.transformDocument=function(t){return t},t.prototype.transformForLink=function(t){return t},t.prototype.readQuery=function(t,n){return void 0===n&&(n=!1),this.read({query:t.query,variables:t.variables,optimistic:n})},t.prototype.readFragment=function(t,n){return void 0===n&&(n=!1),this.read({query:q(t.fragment,t.fragmentName),variables:t.variables,rootId:t.id,optimistic:n})},t.prototype.writeQuery=function(t){this.write({dataId:"ROOT_QUERY",result:t.data,query:t.query,variables:t.variables})},t.prototype.writeFragment=function(t){this.write({dataId:t.id,result:t.data,variables:t.variables,query:q(t.fragment,t.fragmentName)})},t.prototype.writeData=function(t){var n,e,r=t.id,i=t.data;if(void 0!==r){var u=null;try{u=this.read({rootId:r,optimistic:!1,query:zt})}catch(t){}var o=u&&u.__typename||"__ClientData",a=Object.assign({__typename:o},i);this.writeFragment({id:r,fragment:(n=a,e=o,{kind:"Document",definitions:[{kind:"FragmentDefinition",typeCondition:{kind:"NamedType",name:{kind:"Name",value:e||"__FakeType"}},name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:Ht(n)}]}),data:a})}else this.writeQuery({query:Xt(i),data:i})},t}(),tn=null,nn={},en=1,rn=Array,un=rn["@wry/context:Slot"]||function(){var t=function(){function t(){this.id=["slot",en++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return t.prototype.hasValue=function(){for(var t=tn;t;t=t.parent)if(this.id in t.slots){var n=t.slots[this.id];if(n===nn)break;return t!==tn&&(tn.slots[this.id]=n),!0}return tn&&(tn.slots[this.id]=nn),!1},t.prototype.getValue=function(){if(this.hasValue())return tn.slots[this.id]},t.prototype.withValue=function(t,n,e,r){var i,u=((i={__proto__:null})[this.id]=t,i),o=tn;tn={parent:o,slots:u};try{return n.apply(r,e)}finally{tn=o}},t.bind=function(t){var n=tn;return function(){var e=tn;try{return tn=n,t.apply(this,arguments)}finally{tn=e}}},t.noContext=function(t,n,e){if(!tn)return t.apply(e,n);var r=tn;try{return tn=null,t.apply(e,n)}finally{tn=r}},t}();try{Object.defineProperty(rn,"@wry/context:Slot",{value:rn["@wry/context:Slot"]=t,enumerable:!1,writable:!1,configurable:!1})}finally{return t}}();function on(){}var an=function(){function t(t,n){void 0===t&&(t=1/0),void 0===n&&(n=on),this.max=t,this.dispose=n,this.map=new Map,this.newest=null,this.oldest=null}return t.prototype.has=function(t){return this.map.has(t)},t.prototype.get=function(t){var n=this.getEntry(t);return n&&n.value},t.prototype.getEntry=function(t){var n=this.map.get(t);if(n&&n!==this.newest){var e=n.older,r=n.newer;r&&(r.older=e),e&&(e.newer=r),n.older=this.newest,n.older.newer=n,n.newer=null,this.newest=n,n===this.oldest&&(this.oldest=r)}return n},t.prototype.set=function(t,n){var e=this.getEntry(t);return e?e.value=n:(e={key:t,value:n,newer:null,older:this.newest},this.newest&&(this.newest.newer=e),this.newest=e,this.oldest=this.oldest||e,this.map.set(t,e),e.value)},t.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},t.prototype.delete=function(t){var n=this.map.get(t);return!!n&&(n===this.newest&&(this.newest=n.older),n===this.oldest&&(this.oldest=n.newer),n.newer&&(n.newer.older=n.older),n.older&&(n.older.newer=n.newer),this.map.delete(t),this.dispose(n.value,t),!0)},t}(),sn=new un,cn=[],fn=[];function hn(t,n){if(!t)throw new Error(n||"assertion failure")}function ln(t){switch(t.length){case 0:throw new Error("unknown value");case 1:return t[0];case 2:throw t[1]}}var dn=function(){function t(n,e){this.fn=n,this.args=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],++t.count}return t.prototype.recompute=function(){if(hn(!this.recomputing,"already recomputing"),function(t){var n=sn.getValue();if(n)return t.parents.add(n),n.childValues.has(t)||n.childValues.set(t,[]),mn(t)?In(n,t):gn(n,t),n}(this)||!wn(this))return mn(this)?(n=En(t=this),sn.withValue(t,vn,[t]),function(t){if("function"==typeof t.subscribe)try{Sn(t),t.unsubscribe=t.subscribe.apply(null,t.args)}catch(n){return t.setDirty(),!1}return!0}(t)&&function(t){t.dirty=!1,mn(t)||yn(t)}(t),n.forEach(wn),ln(t.value)):ln(this.value);var t,n},t.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,pn(this),Sn(this))},t.prototype.dispose=function(){var t=this;En(this).forEach(wn),Sn(this),this.parents.forEach((function(n){n.setDirty(),On(n,t)}))},t.count=0,t}();function vn(t){t.recomputing=!0,t.value.length=0;try{t.value[0]=t.fn.apply(null,t.args)}catch(n){t.value[1]=n}t.recomputing=!1}function mn(t){return t.dirty||!(!t.dirtyChildren||!t.dirtyChildren.size)}function pn(t){t.parents.forEach((function(n){return In(n,t)}))}function yn(t){t.parents.forEach((function(n){return gn(n,t)}))}function In(t,n){if(hn(t.childValues.has(n)),hn(mn(n)),t.dirtyChildren){if(t.dirtyChildren.has(n))return}else t.dirtyChildren=fn.pop()||new Set;t.dirtyChildren.add(n),pn(t)}function gn(t,n){hn(t.childValues.has(n)),hn(!mn(n));var e,r,i,u=t.childValues.get(n);0===u.length?t.childValues.set(n,n.value.slice(0)):(r=n.value,(i=(e=u).length)>0&&i===r.length&&e[i-1]===r[i-1]||t.setDirty()),bn(t,n),mn(t)||yn(t)}function bn(t,n){var e=t.dirtyChildren;e&&(e.delete(n),0===e.size&&(fn.length<100&&fn.push(e),t.dirtyChildren=null))}function wn(t){return 0===t.parents.size&&"function"==typeof t.reportOrphan&&!0===t.reportOrphan()}function En(t){var n=cn;return t.childValues.size>0&&(n=[],t.childValues.forEach((function(e,r){On(t,r),n.push(r)}))),hn(null===t.dirtyChildren),n}function On(t,n){n.parents.delete(t),t.childValues.delete(n),bn(t,n)}function Sn(t){var n=t.unsubscribe;"function"==typeof n&&(t.unsubscribe=void 0,n())}var Nn=function(){function t(t){this.weakness=t}return t.prototype.lookup=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this.lookupArray(t)},t.prototype.lookupArray=function(t){var n=this;return t.forEach((function(t){return n=n.getChildTrie(t)})),n.data||(n.data=Object.create(null))},t.prototype.getChildTrie=function(n){var e=this.weakness&&function(t){switch(typeof t){case"object":if(null===t)break;case"function":return!0}return!1}(n)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),r=e.get(n);return r||e.set(n,r=new t(this.weakness)),r},t}(),Tn=new Nn("function"==typeof WeakMap);function Dn(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Tn.lookupArray(t)}var _n=new Set;function kn(t,n){void 0===n&&(n=Object.create(null));var e=new an(n.max||Math.pow(2,16),(function(t){return t.dispose()})),r=!!n.disposable,i=n.makeCacheKey||Dn;function u(){if(!r||sn.hasValue()){var u=i.apply(null,arguments);if(void 0===u)return t.apply(null,arguments);var o=Array.prototype.slice.call(arguments),a=e.get(u);a?a.args=o:(a=new dn(t,o),e.set(u,a),a.subscribe=n.subscribe,r&&(a.reportOrphan=function(){return e.delete(u)}));var s=a.recompute();return e.set(u,a),_n.add(e),sn.hasValue()||(_n.forEach((function(t){return t.clean()})),_n.clear()),r?void 0:s}}return u.dirty=function(){var t=i.apply(null,arguments),n=void 0!==t&&e.get(t);n&&n.setDirty()},u}var An=function(){function t(){}return t.prototype.ensureReady=function(){return Promise.resolve()},t.prototype.canBypassInit=function(){return!0},t.prototype.match=function(t,n,e){var r=e.store.get(t.id),i="ROOT_QUERY"===t.id;if(!r)return i;var u=r.__typename,o=void 0===u?i&&"Query":u;return o&&o===n||"heuristic"},t}(),Cn=Object.prototype.hasOwnProperty,Rn=function(){function t(t){var n=this;void 0===t&&(t=Object.create(null)),this.data=t,this.depend=kn((function(t){return n.data[t]}),{disposable:!0,makeCacheKey:function(t){return t}})}return t.prototype.toObject=function(){return this.data},t.prototype.get=function(t){return this.depend(t),this.data[t]},t.prototype.set=function(t,n){n!==this.data[t]&&(this.data[t]=n,this.depend.dirty(t))},t.prototype.delete=function(t){Cn.call(this.data,t)&&(delete this.data[t],this.depend.dirty(t))},t.prototype.clear=function(){this.replace(null)},t.prototype.replace=function(t){var n=this;t?(Object.keys(t).forEach((function(e){n.set(e,t[e])})),Object.keys(this.data).forEach((function(e){Cn.call(t,e)||n.delete(e)}))):Object.keys(this.data).forEach((function(t){n.delete(t)}))},t}();function $n(t){return new Rn(t)}var jn=function(){function t(t){var n=this,e=void 0===t?{}:t,r=e.cacheKeyRoot,i=void 0===r?new Nn(nt):r,u=e.freezeResults,o=this.executeStoreQuery,a=this.executeSelectionSet,s=this.executeSubSelectedArray;this.freezeResults=void 0!==u&&u,this.executeStoreQuery=kn((function(t){return o.call(n,t)}),{makeCacheKey:function(t){var n=t.rootValue,e=t.contextValue;if(e.store instanceof Rn)return i.lookup(e.store,t.query,t.fragmentMatcher,JSON.stringify(t.variableValues),n.id)}}),this.executeSelectionSet=kn((function(t){return a.call(n,t)}),{makeCacheKey:function(t){var n=t.rootValue,e=t.execContext;if(e.contextValue.store instanceof Rn)return i.lookup(e.contextValue.store,t.selectionSet,e.fragmentMatcher,JSON.stringify(e.variableValues),n.id)}}),this.executeSubSelectedArray=kn((function(t){return s.call(n,t)}),{makeCacheKey:function(t){var n=t.execContext;if(n.contextValue.store instanceof Rn)return i.lookup(n.contextValue.store,t.field,t.array,JSON.stringify(n.variableValues))}})}return t.prototype.readQueryFromStore=function(t){return this.diffQueryAgainstStore(i(i({},t),{returnPartialData:!1})).result},t.prototype.diffQueryAgainstStore=function(t){var n,e=t.store,r=t.query,i=t.variables,u=t.previousResult,o=t.returnPartialData,a=void 0===o||o,s=t.rootId,c=void 0===s?"ROOT_QUERY":s,f=t.fragmentMatcherFunction,h=t.config;i=P({},Y((p((n=U(r))&&"query"===n.operation,6),n)),i);var l=this.executeStoreQuery({query:r,rootValue:{type:"id",id:c,generated:!0,typename:"Query"},contextValue:{store:e,dataIdFromObject:h&&h.dataIdFromObject,cacheRedirects:h&&h.cacheRedirects||{}},variableValues:i,fragmentMatcher:f}),d=l.missing&&l.missing.length>0;return d&&!a&&l.missing.forEach((function(t){if(!t.tolerable)throw new m(8)})),u&&O(u,l.result)&&(l.result=u),{result:l.result,complete:!d}},t.prototype.executeStoreQuery=function(t){var n=t.query,e=t.rootValue,r=t.contextValue,i=t.variableValues,u=t.fragmentMatcher,o=void 0===u?xn:u,a=Q(n),s=J(G(n));return this.executeSelectionSet({selectionSet:a.selectionSet,rootValue:e,execContext:{query:n,fragmentMap:s,contextValue:r,variableValues:i,fragmentMatcher:o}})},t.prototype.executeSelectionSet=function(t){var n=this,e=t.selectionSet,r=t.rootValue,u=t.execContext,o=u.fragmentMap,a=u.contextValue,s=u.variableValues,c={result:null},f=[],h=a.store.get(r.id),l=h&&h.__typename||"ROOT_QUERY"===r.id&&"Query"||void 0;function d(t){var n;return t.missing&&(c.missing=c.missing||[],(n=c.missing).push.apply(n,t.missing)),t.result}return e.selections.forEach((function(t){var e;if(M(t,s))if(A(t)){var c=d(n.executeField(h,l,t,u));void 0!==c&&f.push(((e={})[k(t)]=c,e))}else{var v=void 0;if(C(t))v=t;else if(!(v=o[t.name.value]))throw new m(9);var p=v.typeCondition&&v.typeCondition.name.value,y=!p||u.fragmentMatcher(r,p,a);if(y){var I=n.executeSelectionSet({selectionSet:v.selectionSet,rootValue:r,execContext:u});"heuristic"===y&&I.missing&&(I=i(i({},I),{missing:I.missing.map((function(t){return i(i({},t),{tolerable:!0})}))})),f.push(d(I))}}})),c.result=at(f),c},t.prototype.executeField=function(t,n,e,r){var i=r.variableValues,u=r.contextValue,o=function(t,n,e,r,i,u){var o=u.directives,a=e;(r||o)&&(a=D(a,r,o));var s,c=void 0;if(t&&void 0===(c=t[a])&&i.cacheRedirects&&"string"==typeof n){var f=i.cacheRedirects[n];if(f){var h=f[e];h&&(c=h(t,r,{getCacheKey:function(t){var n=i.dataIdFromObject(t);return n&&$({id:n,typename:t.__typename})}}))}}return void 0===c?{result:c,missing:[{object:t,fieldName:a,tolerable:!1}]}:(null!=(s=c)&&"object"==typeof s&&"json"===s.type&&(c=c.json),{result:c})}(t,n,e.name.value,_(e,i),u,{resultKey:k(e),directives:j(e,i)});return Array.isArray(o.result)?this.combineExecResults(o,this.executeSubSelectedArray({field:e,array:o.result,execContext:r})):e.selectionSet?null==o.result?o:this.combineExecResults(o,this.executeSelectionSet({selectionSet:e.selectionSet,rootValue:o.result,execContext:r})):(Mn(e,o.result),o)},t.prototype.combineExecResults=function(){for(var t,n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return n.forEach((function(n){n.missing&&(t=t||[]).push.apply(t,n.missing)})),{result:n.pop().result,missing:t}},t.prototype.executeSubSelectedArray=function(t){var n,e=this,r=t.field,i=t.array,u=t.execContext;function o(t){return t.missing&&(n=n||[]).push.apply(n,t.missing),t.result}return{result:i=i.map((function(t){return null===t?null:Array.isArray(t)?o(e.executeSubSelectedArray({field:r,array:t,execContext:u})):r.selectionSet?o(e.executeSelectionSet({selectionSet:r.selectionSet,rootValue:t,execContext:u})):(Mn(r,t),t)})),missing:n}},t}();function Mn(t,n){if(!t.selectionSet&&R(n))throw new m(10)}function xn(){return!0}var Fn=function(){function t(t){void 0===t&&(t=Object.create(null)),this.data=t}return t.prototype.toObject=function(){return this.data},t.prototype.get=function(t){return this.data[t]},t.prototype.set=function(t,n){this.data[t]=n},t.prototype.delete=function(t){this.data[t]=void 0},t.prototype.clear=function(){this.data=Object.create(null)},t.prototype.replace=function(t){this.data=t||Object.create(null)},t}(),Vn=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="WriteError",n}return r(n,t),n}(Error),qn=function(){function t(){}return t.prototype.writeQueryToStore=function(t){var n=t.query,e=t.result,r=t.store,i=void 0===r?$n():r;return this.writeResultToStore({dataId:"ROOT_QUERY",result:e,document:n,store:i,variables:t.variables,dataIdFromObject:t.dataIdFromObject,fragmentMatcherFunction:t.fragmentMatcherFunction})},t.prototype.writeResultToStore=function(t){var n=t.dataId,e=t.result,r=t.document,i=t.store,u=void 0===i?$n():i,o=t.variables,a=t.dataIdFromObject,s=t.fragmentMatcherFunction,c=U(r);try{return this.writeSelectionSetToStore({result:e,dataId:n,selectionSet:c.selectionSet,context:{store:u,processedData:{},variables:P({},Y(c),o),dataIdFromObject:a,fragmentMap:J(G(r)),fragmentMatcherFunction:s}})}catch(t){throw function(t,n){var e=new Vn("Error writing result to store for query:\n "+JSON.stringify(n));return e.message+="\n"+t.message,e.stack=t.stack,e}(t,r)}},t.prototype.writeSelectionSetToStore=function(t){var n=this,e=t.result,r=t.dataId,i=t.context,u=i.variables,o=i.store,a=i.fragmentMap;return t.selectionSet.selections.forEach((function(t){var o;if(M(t,u))if(A(t)){var s=k(t),c=e[s];void 0!==c?n.writeFieldToStore({dataId:r,value:c,field:t,context:i}):t.directives&&t.directives.length&&(t.directives.some((function(t){return t.name&&"defer"===t.name.value})),t.directives.some((function(t){return t.name&&"client"===t.name.value})))}else{var f=void 0;C(t)?f=t:p(f=(a||{})[t.name.value],3);var h=!0;if(i.fragmentMatcherFunction&&f.typeCondition){var l=r||"self",d=$({id:l,typename:void 0}),v={store:new Fn((o={},o[l]=e,o)),cacheRedirects:{}};h=!!i.fragmentMatcherFunction(d,f.typeCondition.name.value,v)}h&&n.writeSelectionSetToStore({result:e,selectionSet:f.selectionSet,dataId:r,context:i})}})),o},t.prototype.writeFieldToStore=function(t){var n,e,r,u=t.field,o=t.value,a=t.dataId,s=t.context,c=s.dataIdFromObject,f=s.store,h=function(t,n){var e=null;t.directives&&(e={},t.directives.forEach((function(t){e[t.name.value]={},t.arguments&&t.arguments.forEach((function(r){return N(e[t.name.value],r.name,r.value,n)}))})));var r=null;return t.arguments&&t.arguments.length&&(r={},t.arguments.forEach((function(t){return N(r,t.name,t.value,n)}))),D(t.name.value,r,e)}(u,s.variables);if(u.selectionSet&&null!==o)if(Array.isArray(o))e=this.processArrayValue(o,a+"."+h,u.selectionSet,s);else{var l=a+"."+h,d=!0;if(Pn(l)||(l="$"+l),c){var v=c(o);p(!v||!Pn(v),4),(v||"number"==typeof v&&0===v)&&(l=v,d=!1)}Ln(l,u,s.processedData)||this.writeSelectionSetToStore({dataId:l,result:o,selectionSet:u.selectionSet,context:s});var m=o.__typename;e=$({id:l,typename:m},d);var y=(r=f.get(a))&&r[h];if(y!==e&&R(y)){var I=void 0!==y.typename,g=void 0!==m,b=I&&g&&y.typename!==m;p(!d||y.generated||b,5),p(!I||g,6),y.generated&&(b?d||f.delete(y.id):function t(n,e,r){if(n===e)return!1;var u=r.get(n),o=r.get(e),a=!1;Object.keys(u).forEach((function(n){var e=u[n],i=o[n];R(e)&&Pn(e.id)&&R(i)&&!O(e,i)&&t(e.id,i.id,r)&&(a=!0)})),r.delete(n);var s=i(i({},u),o);return O(s,o)?a:(r.set(e,s),!0)}(y.id,e.id,f))}}else e=null!=o&&"object"==typeof o?{type:"json",json:o}:o;(r=f.get(a))&&O(e,r[h])||f.set(a,i(i({},r),((n={})[h]=e,n)))},t.prototype.processArrayValue=function(t,n,e,r){var i=this;return t.map((function(t,u){if(null===t)return null;var o=n+"."+u;if(Array.isArray(t))return i.processArrayValue(t,o,e,r);var a=!0;if(r.dataIdFromObject){var s=r.dataIdFromObject(t);s&&(o=s,a=!1)}return Ln(o,e,r.processedData)||i.writeSelectionSetToStore({dataId:o,result:t,selectionSet:e,context:r}),$({id:o,typename:t.__typename},a)}))},t}();function Pn(t){return"$"===t[0]}function Ln(t,n,e){if(!e)return!1;if(e[t]){if(e[t].indexOf(n)>=0)return!0;e[t].push(n)}else e[t]=[n];return!1}var Un={fragmentMatcher:new An,dataIdFromObject:function(t){if(t.__typename){if(void 0!==t.id)return t.__typename+":"+t.id;if(void 0!==t._id)return t.__typename+":"+t._id}return null},addTypename:!0,resultCaching:!0,freezeResults:!1},Bn=Object.prototype.hasOwnProperty,Gn=function(t){function n(n,e,r){var i=t.call(this,Object.create(null))||this;return i.optimisticId=n,i.parent=e,i.transaction=r,i}return r(n,t),n.prototype.toObject=function(){return i(i({},this.parent.toObject()),this.data)},n.prototype.get=function(t){return Bn.call(this.data,t)?this.data[t]:this.parent.get(t)},n}(Fn),Qn=function(t){function n(n){void 0===n&&(n={});var e=t.call(this)||this;e.watches=new Set,e.typenameDocumentCache=new Map,e.cacheKeyRoot=new Nn(nt),e.silenceBroadcast=!1,e.config=i(i({},Un),n),e.config.customResolvers&&(e.config.cacheRedirects=e.config.customResolvers),e.config.cacheResolvers&&(e.config.cacheRedirects=e.config.cacheResolvers),e.addTypename=!!e.config.addTypename,e.data=e.config.resultCaching?new Rn:new Fn,e.optimisticData=e.data,e.storeWriter=new qn,e.storeReader=new jn({cacheKeyRoot:e.cacheKeyRoot,freezeResults:n.freezeResults});var r=e,u=r.maybeBroadcastWatch;return e.maybeBroadcastWatch=kn((function(t){return u.call(e,t)}),{makeCacheKey:function(t){if(!t.optimistic&&!t.previousResult)return r.data instanceof Rn?r.cacheKeyRoot.lookup(t.query,JSON.stringify(t.variables)):void 0}}),e}return r(n,t),n.prototype.restore=function(t){return t&&this.data.replace(t),this},n.prototype.extract=function(t){return void 0===t&&(t=!1),(t?this.optimisticData:this.data).toObject()},n.prototype.read=function(t){if("string"==typeof t.rootId&&void 0===this.data.get(t.rootId))return null;var n=this.config.fragmentMatcher,e=n&&n.match;return this.storeReader.readQueryFromStore({store:t.optimistic?this.optimisticData:this.data,query:this.transformDocument(t.query),variables:t.variables,rootId:t.rootId,fragmentMatcherFunction:e,previousResult:t.previousResult,config:this.config})||null},n.prototype.write=function(t){var n=this.config.fragmentMatcher,e=n&&n.match;this.storeWriter.writeResultToStore({dataId:t.dataId,result:t.result,variables:t.variables,document:this.transformDocument(t.query),store:this.data,dataIdFromObject:this.config.dataIdFromObject,fragmentMatcherFunction:e}),this.broadcastWatches()},n.prototype.diff=function(t){var n=this.config.fragmentMatcher,e=n&&n.match;return this.storeReader.diffQueryAgainstStore({store:t.optimistic?this.optimisticData:this.data,query:this.transformDocument(t.query),variables:t.variables,returnPartialData:t.returnPartialData,previousResult:t.previousResult,fragmentMatcherFunction:e,config:this.config})},n.prototype.watch=function(t){var n=this;return this.watches.add(t),function(){n.watches.delete(t)}},n.prototype.evict=function(){throw new m(7)},n.prototype.reset=function(){return this.data.clear(),this.broadcastWatches(),Promise.resolve()},n.prototype.removeOptimistic=function(t){for(var n=[],e=0,r=this.optimisticData;r instanceof Gn;)r.optimisticId===t?++e:n.push(r),r=r.parent;if(e>0){for(this.optimisticData=r;n.length>0;){var i=n.pop();this.performTransaction(i.transaction,i.optimisticId)}this.broadcastWatches()}},n.prototype.performTransaction=function(t,n){var e=this.data,r=this.silenceBroadcast;this.silenceBroadcast=!0,"string"==typeof n&&(this.data=this.optimisticData=new Gn(n,this.optimisticData,t));try{t(this)}finally{this.silenceBroadcast=r,this.data=e}this.broadcastWatches()},n.prototype.recordOptimisticTransaction=function(t,n){return this.performTransaction(t,n)},n.prototype.transformDocument=function(t){if(this.addTypename){var n=this.typenameDocumentCache.get(t);return n||(n=h(L(t),{SelectionSet:{enter:function(t,n,e){if(!e||"OperationDefinition"!==e.kind){var r=t.selections;if(r&&!r.some((function(t){return A(t)&&("__typename"===t.name.value||0===t.name.value.lastIndexOf("__",0))}))){var u=e;if(!(A(u)&&u.directives&&u.directives.some((function(t){return"export"===t.name.value}))))return i(i({},t),{selections:a(r,[W])})}}}}}),this.typenameDocumentCache.set(t,n),this.typenameDocumentCache.set(n,n)),n}return t},n.prototype.broadcastWatches=function(){var t=this;this.silenceBroadcast||this.watches.forEach((function(n){return t.maybeBroadcastWatch(n)}))},n.prototype.maybeBroadcastWatch=function(t){t.callback(this.diff({query:t.query,variables:t.variables,previousResult:t.previousResult&&t.previousResult(),optimistic:t.optimistic}))},n}(Zt),Jn=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){if(!Boolean(t))throw new Error(n)}}));n(Jn);var Yn=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.prototype.toString;t.prototype.toJSON=n,t.prototype.inspect=n,r.default&&(t.prototype[r.default]=n)};var e,r=(e=s)&&e.__esModule?e:{default:e}}));n(Yn);var Kn=t((function(t,n){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){return"object"==e(t)&&null!==t}}));n(Kn);var Wn=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getLocation=function(t,n){for(var e,r=/\r\n|[\n\r]/g,i=1,u=n+1;(e=r.exec(t.body))&&e.index<n;)i+=1,u=n+1-(e.index+e[0].length);return{line:i,column:u}}}));n(Wn);var Xn=t((function(t,n){function e(t,n){var e=t.locationOffset.column-1,u=i(e)+t.body,o=n.line-1,a=n.line+(t.locationOffset.line-1),s=n.column+(1===n.line?e:0),c="".concat(t.name,":").concat(a,":").concat(s,"\n"),f=u.split(/\r\n|[\n\r]/g),h=f[o];if(h.length>120){for(var l=Math.floor(s/80),d=s%80,v=[],m=0;m<h.length;m+=80)v.push(h.slice(m,m+80));return c+r([["".concat(a),v[0]]].concat(v.slice(1,l+1).map((function(t){return["",t]})),[[" ",i(d-1)+"^"],["",v[l+1]]]))}return c+r([["".concat(a-1),f[o-1]],["".concat(a),h],["",i(s-1)+"^"],["".concat(a+1),f[o+1]]])}function r(t){var n=t.filter((function(t){return void 0!==t[1]})),e=Math.max.apply(Math,n.map((function(t){return t[0].length})));return n.map((function(t){var n,r=t[1];return i(e-(n=t[0]).length)+n+(r?" | "+r:" |")})).join("\n")}function i(t){return Array(t+1).join(" ")}Object.defineProperty(n,"__esModule",{value:!0}),n.printLocation=function(t){return e(t.source,(0,Wn.getLocation)(t.source,t.start))},n.printSourceLocation=e}));n(Xn);var Hn=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.GraphQLError=i,n.printError=u;var e,r=(e=Kn)&&e.__esModule?e:{default:e};function i(t,n,e,u,o,a,s){var c=Array.isArray(n)?0!==n.length?n:void 0:n?[n]:void 0,f=e;if(!f&&c){var h=c[0];f=h&&h.loc&&h.loc.source}var l,d=u;!d&&c&&(d=c.reduce((function(t,n){return n.loc&&t.push(n.loc.start),t}),[])),d&&0===d.length&&(d=void 0),u&&e?l=u.map((function(t){return(0,Wn.getLocation)(e,t)})):c&&(l=c.reduce((function(t,n){return n.loc&&t.push((0,Wn.getLocation)(n.loc.source,n.loc.start)),t}),[]));var v=s;if(null==v&&null!=a){var m=a.extensions;(0,r.default)(m)&&(v=m)}Object.defineProperties(this,{message:{value:t,enumerable:!0,writable:!0},locations:{value:l||void 0,enumerable:Boolean(l)},path:{value:o||void 0,enumerable:Boolean(o)},nodes:{value:c||void 0},source:{value:f||void 0},positions:{value:d||void 0},originalError:{value:a},extensions:{value:v||void 0,enumerable:Boolean(v)}}),a&&a.stack?Object.defineProperty(this,"stack",{value:a.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,i):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}function u(t){var n=t.message;if(t.nodes)for(var e=0,r=t.nodes;e<r.length;e++){var i=r[e];i.loc&&(n+="\n\n"+(0,Xn.printLocation)(i.loc))}else if(t.source&&t.locations)for(var u=0,o=t.locations;u<o.length;u++)n+="\n\n"+(0,Xn.printSourceLocation)(t.source,o[u]);return n}i.prototype=Object.create(Error.prototype,{constructor:{value:i},name:{value:"GraphQLError"},toString:{value:function(){return u(this)}}})}));n(Hn);var zn=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.syntaxError=function(t,n,e){return new Hn.GraphQLError("Syntax Error: ".concat(e),void 0,t,[n])}}));n(zn);var Zn=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Kind=void 0;var e=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"});n.Kind=e}));n(Zn);var te=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){"function"==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t.prototype,Symbol.toStringTag,{get:function(){return this.constructor.name}})}}));n(te);var ne=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Source=void 0;var e=i(Jn),r=i(te);function i(t){return t&&t.__esModule?t:{default:t}}var u=function(t,n,r){this.body=t,this.name=n||"GraphQL request",this.locationOffset=r||{line:1,column:1},this.locationOffset.line>0||(0,e.default)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||(0,e.default)(0,"column in locationOffset is 1-indexed and must be positive")};n.Source=u,(0,r.default)(u)}));n(ne);var ee=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.TokenKind=void 0;var e=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"});n.TokenKind=e}));n(ee);var re=t((function(t,n){var e;function r(){return this.lastToken=this.token,this.token=this.lookahead()}function i(){var t=this.token;if(t.kind!==ee.TokenKind.EOF)do{t=t.next||(t.next=a(this,t))}while(t.kind===ee.TokenKind.COMMENT);return t}function u(t,n,e,r,i,u,o){this.kind=t,this.start=n,this.end=e,this.line=r,this.column=i,this.value=o,this.prev=u,this.next=null}function o(t){return isNaN(t)?ee.TokenKind.EOF:t<127?JSON.stringify(String.fromCharCode(t)):'"\\u'.concat(("00"+t.toString(16).toUpperCase()).slice(-4),'"')}function a(t,n){var e=t.source,r=e.body,i=r.length,a=function(t,n,e){for(var r=t.length,i=n;i<r;){var u=t.charCodeAt(i);if(9===u||32===u||44===u||65279===u)++i;else if(10===u)++i,++e.line,e.lineStart=i;else{if(13!==u)break;10===t.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i}}return i}(r,n.end,t),f=t.line,h=1+a-t.lineStart;if(a>=i)return new u(ee.TokenKind.EOF,i,i,f,h,n);var l=r.charCodeAt(a);switch(l){case 33:return new u(ee.TokenKind.BANG,a,a+1,f,h,n);case 35:return function(t,n,e,r,i){var o,a=t.body,s=n;do{o=a.charCodeAt(++s)}while(!isNaN(o)&&(o>31||9===o));return new u(ee.TokenKind.COMMENT,n,s,e,r,i,a.slice(n+1,s))}(e,a,f,h,n);case 36:return new u(ee.TokenKind.DOLLAR,a,a+1,f,h,n);case 38:return new u(ee.TokenKind.AMP,a,a+1,f,h,n);case 40:return new u(ee.TokenKind.PAREN_L,a,a+1,f,h,n);case 41:return new u(ee.TokenKind.PAREN_R,a,a+1,f,h,n);case 46:if(46===r.charCodeAt(a+1)&&46===r.charCodeAt(a+2))return new u(ee.TokenKind.SPREAD,a,a+3,f,h,n);break;case 58:return new u(ee.TokenKind.COLON,a,a+1,f,h,n);case 61:return new u(ee.TokenKind.EQUALS,a,a+1,f,h,n);case 64:return new u(ee.TokenKind.AT,a,a+1,f,h,n);case 91:return new u(ee.TokenKind.BRACKET_L,a,a+1,f,h,n);case 93:return new u(ee.TokenKind.BRACKET_R,a,a+1,f,h,n);case 123:return new u(ee.TokenKind.BRACE_L,a,a+1,f,h,n);case 124:return new u(ee.TokenKind.PIPE,a,a+1,f,h,n);case 125:return new u(ee.TokenKind.BRACE_R,a,a+1,f,h,n);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 function(t,n,e,r,i){for(var o=t.body,a=o.length,s=n+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 u(ee.TokenKind.NAME,n,s,e,r,i,o.slice(n,s))}(e,a,f,h,n);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(t,n,e,r,i,a){var c=t.body,f=e,h=n,l=!1;if(45===f&&(f=c.charCodeAt(++h)),48===f){if((f=c.charCodeAt(++h))>=48&&f<=57)throw(0,zn.syntaxError)(t,h,"Invalid number, unexpected digit after 0: ".concat(o(f),"."))}else h=s(t,h,f),f=c.charCodeAt(h);if(46===f&&(l=!0,f=c.charCodeAt(++h),h=s(t,h,f),f=c.charCodeAt(h)),69!==f&&101!==f||(l=!0,43!==(f=c.charCodeAt(++h))&&45!==f||(f=c.charCodeAt(++h)),h=s(t,h,f),f=c.charCodeAt(h)),46===f||69===f||101===f)throw(0,zn.syntaxError)(t,h,"Invalid number, expected digit but got: ".concat(o(f),"."));return new u(l?ee.TokenKind.FLOAT:ee.TokenKind.INT,n,h,r,i,a,c.slice(n,h))}(e,a,l,f,h,n);case 34:return 34===r.charCodeAt(a+1)&&34===r.charCodeAt(a+2)?function(t,n,e,r,i,a){for(var s=t.body,c=n+3,f=c,h=0,l="";c<s.length&&!isNaN(h=s.charCodeAt(c));){if(34===h&&34===s.charCodeAt(c+1)&&34===s.charCodeAt(c+2))return l+=s.slice(f,c),new u(ee.TokenKind.BLOCK_STRING,n,c+3,e,r,i,(0,Bt.dedentBlockStringValue)(l));if(h<32&&9!==h&&10!==h&&13!==h)throw(0,zn.syntaxError)(t,c,"Invalid character within String: ".concat(o(h),"."));10===h?(++c,++a.line,a.lineStart=c):13===h?(10===s.charCodeAt(c+1)?c+=2:++c,++a.line,a.lineStart=c):92===h&&34===s.charCodeAt(c+1)&&34===s.charCodeAt(c+2)&&34===s.charCodeAt(c+3)?(l+=s.slice(f,c)+'"""',f=c+=4):++c}throw(0,zn.syntaxError)(t,c,"Unterminated string.")}(e,a,f,h,n,t):function(t,n,e,r,i){for(var a,s,f,h,l=t.body,d=n+1,v=d,m=0,p="";d<l.length&&!isNaN(m=l.charCodeAt(d))&&10!==m&&13!==m;){if(34===m)return p+=l.slice(v,d),new u(ee.TokenKind.STRING,n,d+1,e,r,i,p);if(m<32&&9!==m)throw(0,zn.syntaxError)(t,d,"Invalid character within String: ".concat(o(m),"."));if(++d,92===m){switch(p+=l.slice(v,d-1),m=l.charCodeAt(d)){case 34:p+='"';break;case 47:p+="/";break;case 92:p+="\\";break;case 98:p+="\b";break;case 102:p+="\f";break;case 110:p+="\n";break;case 114:p+="\r";break;case 116:p+="\t";break;case 117:var y=(a=l.charCodeAt(d+1),s=l.charCodeAt(d+2),f=l.charCodeAt(d+3),h=l.charCodeAt(d+4),c(a)<<12|c(s)<<8|c(f)<<4|c(h));if(y<0){var I=l.slice(d+1,d+5);throw(0,zn.syntaxError)(t,d,"Invalid character escape sequence: \\u".concat(I,"."))}p+=String.fromCharCode(y),d+=4;break;default:throw(0,zn.syntaxError)(t,d,"Invalid character escape sequence: \\".concat(String.fromCharCode(m),"."))}v=++d}}throw(0,zn.syntaxError)(t,d,"Unterminated string.")}(e,a,f,h,n)}throw(0,zn.syntaxError)(e,a,function(t){return t<32&&9!==t&&10!==t&&13!==t?"Cannot contain the invalid character ".concat(o(t),"."):39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(o(t),".")}(l))}function s(t,n,e){var r=t.body,i=n,u=e;if(u>=48&&u<=57){do{u=r.charCodeAt(++i)}while(u>=48&&u<=57);return i}throw(0,zn.syntaxError)(t,i,"Invalid number, expected digit but got: ".concat(o(u),"."))}function c(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}Object.defineProperty(n,"__esModule",{value:!0}),n.createLexer=function(t,n){var e=new u(ee.TokenKind.SOF,0,0,0,0,null);return{source:t,options:n,lastToken:e,token:e,line:1,lineStart:0,advance:r,lookahead:i}},n.isPunctuatorToken=function(t){var n=t.kind;return n===ee.TokenKind.BANG||n===ee.TokenKind.DOLLAR||n===ee.TokenKind.AMP||n===ee.TokenKind.PAREN_L||n===ee.TokenKind.PAREN_R||n===ee.TokenKind.SPREAD||n===ee.TokenKind.COLON||n===ee.TokenKind.EQUALS||n===ee.TokenKind.AT||n===ee.TokenKind.BRACKET_L||n===ee.TokenKind.BRACKET_R||n===ee.TokenKind.BRACE_L||n===ee.TokenKind.PIPE||n===ee.TokenKind.BRACE_R},(0,((e=Yn)&&e.__esModule?e:{default:e}).default)(u,(function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}))}));n(re);var ie=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectiveLocation=void 0;var e=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.DirectiveLocation=e}));n(ie);var ue=t((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.parse=function(t,n){return new o(t,n).parseDocument()},n.parseValue=function(t,n){var e=new o(t,n);e.expectToken(ee.TokenKind.SOF);var r=e.parseValueLiteral(!1);return e.expectToken(ee.TokenKind.EOF),r},n.parseType=function(t,n){var e=new o(t,n);e.expectToken(ee.TokenKind.SOF);var r=e.parseTypeReference();return e.expectToken(ee.TokenKind.EOF),r};var e=u(c),r=u(Jn),i=u(Yn);function u(t){return t&&t.__esModule?t:{default:t}}var o=function(){function t(t,n){var i="string"==typeof t?new ne.Source(t):t;i instanceof ne.Source||(0,r.default)(0,"Must provide Source. Received: ".concat((0,e.default)(i))),this._lexer=(0,re.createLexer)(i),this._options=n||{}}var n=t.prototype;return n.parseName=function(){var t=this.expectToken(ee.TokenKind.NAME);return{kind:Zn.Kind.NAME,value:t.value,loc:this.loc(t)}},n.parseDocument=function(){var t=this._lexer.token;return{kind:Zn.Kind.DOCUMENT,definitions:this.many(ee.TokenKind.SOF,this.parseDefinition,ee.TokenKind.EOF),loc:this.loc(t)}},n.parseDefinition=function(){if(this.peek(ee.TokenKind.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(ee.TokenKind.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},n.parseOperationDefinition=function(){var t=this._lexer.token;if(this.peek(ee.TokenKind.BRACE_L))return{kind:Zn.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(t)};var n,e=this.parseOperationType();return this.peek(ee.TokenKind.NAME)&&(n=this.parseName()),{kind:Zn.Kind.OPERATION_DEFINITION,operation:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},n.parseOperationType=function(){var t=this.expectToken(ee.TokenKind.NAME);switch(t.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(t)},n.parseVariableDefinitions=function(){return this.optionalMany(ee.TokenKind.PAREN_L,this.parseVariableDefinition,ee.TokenKind.PAREN_R)},n.parseVariableDefinition=function(){var t=this._lexer.token;return{kind:Zn.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(ee.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(ee.TokenKind.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(t)}},n.parseVariable=function(){var t=this._lexer.token;return this.expectToken(ee.TokenKind.DOLLAR),{kind:Zn.Kind.VARIABLE,name:this.parseName(),loc:this.loc(t)}},n.parseSelectionSet=function(){var t=this._lexer.token;return{kind:Zn.Kind.SELECTION_SET,selections:this.many(ee.TokenKind.BRACE_L,this.parseSelection,ee.TokenKind.BRACE_R),loc:this.loc(t)}},n.parseSelection=function(){return this.peek(ee.TokenKind.SPREAD)?this.parseFragment():this.parseField()},n.parseField=function(){var t,n,e=this._lexer.token,r=this.parseName();return this.expectOptionalToken(ee.TokenKind.COLON)?(t=r,n=this.parseName()):n=r,{kind:Zn.Kind.FIELD,alias:t,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(ee.TokenKind.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(e)}},n.parseArguments=function(t){return this.optionalMany(ee.TokenKind.PAREN_L,t?this.parseConstArgument:this.parseArgument,ee.TokenKind.PAREN_R)},n.parseArgument=function(){var t=this._lexer.token,n=this.parseName();return this.expectToken(ee.TokenKind.COLON),{kind:Zn.Kind.ARGUMENT,name:n,value:this.parseValueLiteral(!1),loc:this.loc(t)}},n.parseConstArgument=function(){var t=this._lexer.token;return{kind:Zn.Kind.ARGUMENT,name:this.parseName(),value:(this.expectToken(ee.TokenKind.COLON),this.parseValueLiteral(!0)),loc:this.loc(t)}},n.parseFragment=function(){var t=this._lexer.token;this.expectToken(ee.TokenKind.SPREAD);var n=this.expectOptionalKeyword("on");return!n&&this.peek(ee.TokenKind.NAME)?{kind:Zn.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(t)}:{kind:Zn.Kind.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},n.parseFragmentDefinition=function(){var t=this._lexer.token;return this.expectKeyword("fragment"),this._options.experimentalFragmentVariables?{kind:Zn.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:Zn.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},n.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},n.parseValueLiteral=function(t){var n=this._lexer.token;switch(n.kind){case ee.TokenKind.BRACKET_L:return this.parseList(t);case ee.TokenKind.BRACE_L:return this.parseObject(t);case ee.TokenKind.INT:return this._lexer.advance(),{kind:Zn.Kind.INT,value:n.value,loc:this.loc(n)};case ee.TokenKind.FLOAT:return this._lexer.advance(),{kind:Zn.Kind.FLOAT,value:n.value,loc:this.loc(n)};case ee.TokenKind.STRING:case ee.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case ee.TokenKind.NAME:return"true"===n.value||"false"===n.value?(this._lexer.advance(),{kind:Zn.Kind.BOOLEAN,value:"true"===n.value,loc:this.loc(n)}):"null"===n.value?(this._lexer.advance(),{kind:Zn.Kind.NULL,loc:this.loc(n)}):(this._lexer.advance(),{kind:Zn.Kind.ENUM,value:n.value,loc:this.loc(n)});case ee.TokenKind.DOLLAR:if(!t)return this.parseVariable()}throw this.unexpected()},n.parseStringLiteral=function(){var t=this._lexer.token;return this._lexer.advance(),{kind:Zn.Kind.STRING,value:t.value,block:t.kind===ee.TokenKind.BLOCK_STRING,loc:this.loc(t)}},n.parseList=function(t){var n=this,e=this._lexer.token;return{kind:Zn.Kind.LIST,values:this.any(ee.TokenKind.BRACKET_L,(function(){return n.parseValueLiteral(t)}),ee.TokenKind.BRACKET_R),loc:this.loc(e)}},n.parseObject=function(t){var n=this,e=this._lexer.token;return{kind:Zn.Kind.OBJECT,fields:this.any(ee.TokenKind.BRACE_L,(function(){return n.parseObjectField(t)}),ee.TokenKind.BRACE_R),loc:this.loc(e)}},n.parseObjectField=function(t){var n=this._lexer.token,e=this.parseName();return this.expectToken(ee.TokenKind.COLON),{kind:Zn.Kind.OBJECT_FIELD,name:e,value:this.parseValueLiteral(t),loc:this.loc(n)}},n.parseDirectives=function(t){for(var n=[];this.peek(ee.TokenKind.AT);)n.push(this.parseDirective(t));return n},n.parseDirective=function(t){var n=this._lexer.token;return this.expectToken(ee.TokenKind.AT),{kind:Zn.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t),loc:this.loc(n)}},n.parseTypeReference=function(){var t,n=this._lexer.token;return this.expectOptionalToken(ee.TokenKind.BRACKET_L)?(t=this.parseTypeReference(),this.expectToken(ee.TokenKind.BRACKET_R),t={kind:Zn.Kind.LIST_TYPE,type:t,loc:this.loc(n)}):t=this.parseNamedType(),this.expectOptionalToken(ee.TokenKind.BANG)?{kind:Zn.Kind.NON_NULL_TYPE,type:t,loc:this.loc(n)}:t},n.parseNamedType=function(){var t=this._lexer.token;return{kind:Zn.Kind.NAMED_TYPE,name:this.parseName(),loc:this.loc(t)}},n.parseTypeSystemDefinition=function(){var t=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(t.kind===ee.TokenKind.NAME)switch(t.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(t)},n.peekDescription=function(){return this.peek(ee.TokenKind.STRING)||this.peek(ee.TokenKind.BLOCK_STRING)},n.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},n.parseSchemaDefinition=function(){var t=this._lexer.token;this.expectKeyword("schema");var n=this.parseDirectives(!0),e=this.many(ee.TokenKind.BRACE_L,this.parseOperationTypeDefinition,ee.TokenKind.BRACE_R);return{kind:Zn.Kind.SCHEMA_DEFINITION,directives:n,operationTypes:e,loc:this.loc(t)}},n.parseOperationTypeDefinition=function(){var t=this._lexer.token,n=this.parseOperationType();this.expectToken(ee.TokenKind.COLON);var e=this.parseNamedType();return{kind:Zn.Kind.OPERATION_TYPE_DEFINITION,operation:n,type:e,loc:this.loc(t)}},n.parseScalarTypeDefinition=function(){var t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");var e=this.parseName(),r=this.parseDirectives(!0);return{kind:Zn.Kind.SCALAR_TYPE_DEFINITION,description:n,name:e,directives:r,loc:this.loc(t)}},n.parseObjectTypeDefinition=function(){var t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");var e=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),u=this.parseFieldsDefinition();return{kind:Zn.Kind.OBJECT_TYPE_DEFINITION,description:n,name:e,interfaces:r,directives:i,fields:u,loc:this.loc(t)}},n.parseImplementsInterfaces=function(){var t=[];if(this.expectOptionalKeyword("implements")){this.expectOptionalToken(ee.TokenKind.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(ee.TokenKind.AMP)||this._options.allowLegacySDLImplementsInterfaces&&this.peek(ee.TokenKind.NAME))}return t},n.parseFieldsDefinition=function(){return this._options.allowLegacySDLEmptyFields&&this.peek(ee.TokenKind.BRACE_L)&&this._lexer.lookahead().kind===ee.TokenKind.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(ee.TokenKind.BRACE_L,this.parseFieldDefinition,ee.TokenKind.BRACE_R)},n.parseFieldDefinition=function(){var t=this._lexer.token,n=this.parseDescription(),e=this.parseName(),r=this.parseArgumentDefs();this.expectToken(ee.TokenKind.COLON);var i=this.parseTypeReference(),u=this.parseDirectives(!0);return{kind:Zn.Kind.FIELD_DEFINITION,description:n,name:e,arguments:r,type:i,directives:u,loc:this.loc(t)}},n.parseArgumentDefs=function(){return this.optionalMany(ee.TokenKind.PAREN_L,this.parseInputValueDef,ee.TokenKind.PAREN_R)},n.parseInputValueDef=function(){var t=this._lexer.token,n=this.parseDescription(),e=this.parseName();this.expectToken(ee.TokenKind.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(ee.TokenKind.EQUALS)&&(r=this.parseValueLiteral(!0));var u=this.parseDirectives(!0);return{kind:Zn.Kind.INPUT_VALUE_DEFINITION,description:n,name:e,type:i,defaultValue:r,directives:u,loc:this.loc(t)}},n.parseInterfaceTypeDefinition=function(){var t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");var e=this.parseName(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();return{kind:Zn.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:e,directives:r,fields:i,loc:this.loc(t)}},n.parseUnionTypeDefinition=function(){var t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");var e=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:Zn.Kind.UNION_TYPE_DEFINITION,description:n,name:e,directives:r,types:i,loc:this.loc(t)}},n.parseUnionMemberTypes=function(){var t=[];if(this.expectOptionalToken(ee.TokenKind.EQUALS)){this.expectOptionalToken(ee.TokenKind.PIPE);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(ee.TokenKind.PIPE))}return t},n.parseEnumTypeDefinition=function(){var t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");var e=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:Zn.Kind.ENUM_TYPE_DEFINITION,description:n,name:e,directives:r,values:i,loc:this.loc(t)}},n.parseEnumValuesDefinition=function(){return this.optionalMany(ee.TokenKind.BRACE_L,this.parseEnumValueDefinition,ee.TokenKind.BRACE_R)},n.parseEnumValueDefinition=function(){var t=this._lexer.token,n=this.parseDescription(),e=this.parseName(),r=this.parseDirectives(!0);return{kind:Zn.Kind.ENUM_VALUE_DEFINITION,description:n,name:e,directives:r,loc:this.loc(t)}},n.parseInputObjectTypeDefinition=function(){var t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");var e=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:Zn.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:e,directives:r,fields:i,loc:this.loc(t)}},n.parseInputFieldsDefinition=function(){return this.optionalMany(ee.TokenKind.BRACE_L,this.parseInputValueDef,ee.TokenKind.BRACE_R)},n.parseTypeSystemExtension=function(){var t=this._lexer.lookahead();if(t.kind===ee.TokenKind.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)},n.parseSchemaExtension=function(){var t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var n=this.parseDirectives(!0),e=this.optionalMany(ee.TokenKind.BRACE_L,this.parseOperationTypeDefinition,ee.TokenKind.BRACE_R);if(0===n.length&&0===e.length)throw this.unexpected();return{kind:Zn.Kind.SCHEMA_EXTENSION,directives:n,operationTypes:e,loc:this.loc(t)}},n.parseScalarTypeExtension=function(){var t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var n=this.parseName(),e=this.parseDirectives(!0);if(0===e.length)throw this.unexpected();return{kind:Zn.Kind.SCALAR_TYPE_EXTENSION,name:n,directives:e,loc:this.loc(t)}},n.parseObjectTypeExtension=function(){var t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var n=this.parseName(),e=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===e.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:Zn.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:e,directives:r,fields:i,loc:this.loc(t)}},n.parseInterfaceTypeExtension=function(){var t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var n=this.parseName(),e=this.parseDirectives(!0),r=this.parseFieldsDefinition();if(0===e.length&&0===r.length)throw this.unexpected();return{kind:Zn.Kind.INTERFACE_TYPE_EXTENSION,name:n,directives:e,fields:r,loc:this.loc(t)}},n.parseUnionTypeExtension=function(){var t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var n=this.parseName(),e=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===e.length&&0===r.length)throw this.unexpected();return{kind:Zn.Kind.UNION_TYPE_EXTENSION,name:n,directives:e,types:r,loc:this.loc(t)}},n.parseEnumTypeExtension=function(){var t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var n=this.parseName(),e=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===e.length&&0===r.length)throw this.unexpected();return{kind:Zn.Kind.ENUM_TYPE_EXTENSION,name:n,directives:e,values:r,loc:this.loc(t)}},n.parseInputObjectTypeExtension=function(){var t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var n=this.parseName(),e=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===e.length&&0===r.length)throw this.unexpected();return{kind:Zn.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:e,fields:r,loc:this.loc(t)}},n.parseDirectiveDefinition=function(){var t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(ee.TokenKind.AT);var e=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var u=this.parseDirectiveLocations();return{kind:Zn.Kind.DIRECTIVE_DEFINITION,description:n,name:e,arguments:r,repeatable:i,locations:u,loc:this.loc(t)}},n.parseDirectiveLocations=function(){this.expectOptionalToken(ee.TokenKind.PIPE);var t=[];do{t.push(this.parseDirectiveLocation())}while(this.expectOptionalToken(ee.TokenKind.PIPE));return t},n.parseDirectiveLocation=function(){var t=this._lexer.token,n=this.parseName();if(void 0!==ie.DirectiveLocation[n.value])return n;throw this.unexpected(t)},n.loc=function(t){if(!this._options.noLocation)return new a(t,this._lexer.lastToken,this._lexer.source)},n.peek=function(t){return this._lexer.token.kind===t},n.expectToken=function(t){var n=this._lexer.token;if(n.kind===t)return this._lexer.advance(),n;throw(0,zn.syntaxError)(this._lexer.source,n.start,"Expected ".concat(t,", found ").concat(s(n)))},n.expectOptionalToken=function(t){var n=this._lexer.token;if(n.kind===t)return this._lexer.advance(),n},n.expectKeyword=function(t){var n=this._lexer.token;if(n.kind!==ee.TokenKind.NAME||n.value!==t)throw(0,zn.syntaxError)(this._lexer.source,n.start,'Expected "'.concat(t,'", found ').concat(s(n)));this._lexer.advance()},n.expectOptionalKeyword=function(t){var n=this._lexer.token;return n.kind===ee.TokenKind.NAME&&n.value===t&&(this._lexer.advance(),!0)},n.unexpected=function(t){var n=t||this._lexer.token;return(0,zn.syntaxError)(this._lexer.source,n.start,"Unexpected ".concat(s(n)))},n.any=function(t,n,e){this.expectToken(t);for(var r=[];!this.expectOptionalToken(e);)r.push(n.call(this));return r},n.optionalMany=function(t,n,e){if(this.expectOptionalToken(t)){var r=[];do{r.push(n.call(this))}while(!this.expectOptionalToken(e));return r}return[]},n.many=function(t,n,e){this.expectToken(t);var r=[];do{r.push(n.call(this))}while(!this.expectOptionalToken(e));return r},t}();function a(t,n,e){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=e}function s(t){var n=t.value;return n?"".concat(t.kind,' "').concat(n,'"'):t.kind}(0,i.default)(a,(function(){return{start:this.start,end:this.end}}))}));n(ue);var oe=ue.parse;function ae(t){return t.replace(/[\s,]+/g," ").trim()}var se={},ce={},fe=!0,he=!1;function le(t){var n=ae(t);if(se[n])return se[n];var e=oe(t,{experimentalFragmentVariables:he});if(!e||"Document"!==e.kind)throw new Error("Not a valid GraphQL document.");return e=function t(n,e){var r=Object.prototype.toString.call(n);if("[object Array]"===r)return n.map((function(n){return t(n,e)}));if("[object Object]"!==r)throw new Error("Unexpected input.");e&&n.loc&&delete n.loc,n.loc&&(delete n.loc.startToken,delete n.loc.endToken);var i,u,o,a=Object.keys(n);for(i in a)a.hasOwnProperty(i)&&(u=n[a[i]],"[object Object]"!==(o=Object.prototype.toString.call(u))&&"[object Array]"!==o||(n[a[i]]=t(u,!0)));return n}(e=function(t){for(var n,e={},r=[],i=0;i<t.definitions.length;i++){var u=t.definitions[i];if("FragmentDefinition"===u.kind){var o=u.name.value,a=ae((n=u.loc).source.body.substring(n.start,n.end));ce.hasOwnProperty(o)&&!ce[o][a]?(fe&&console.warn("Warning: fragment with name "+o+" 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"),ce[o][a]=!0):ce.hasOwnProperty(o)||(ce[o]={},ce[o][a]=!0),e[a]||(e[a]=!0,r.push(u))}else r.push(u)}return t.definitions=r,t}(e),!1),se[n]=e,e}function de(){for(var t=Array.prototype.slice.call(arguments),n=t[0],e="string"==typeof n?n:n[0],r=1;r<t.length;r++)e+=t[r]&&t[r].kind&&"Document"===t[r].kind?t[r].loc.source.body:t[r],e+=n[r];return le(e)}de.default=de,de.resetCaches=function(){se={},ce={}},de.disableFragmentWarnings=function(){fe=!1},de.enableExperimentalFragmentVariables=function(){he=!0},de.disableExperimentalFragmentVariables=function(){he=!1};var ve=de;function me(){return window.widgetIdent}window.widgetIdent||(window.widgetIdent={env:"demo"});const pe=new Date,ye={shareLink:"http://ssqt.co",fueltankCode:"12AS3F",referralcode:"RIDDIKULUS",locale:"en_US",messageLink:{EMAIL:"http://short.staging.referralsaasquatch.com/mJjFXu",FACEBOOK:"http://short.staging.referralsaasquatch.com/mwjFXu",TWITTER:"http://short.staging.referralsaasquatch.com/mwjFXu",SMS:"http://short.staging.referralsaasquatch.com/mwjFXu",WHATSAPP:"http://short.staging.referralsaasquatch.com/mwjFXu",LINKEDIN:"http://short.staging.referralsaasquatch.com/mwjFXu",PINTEREST:"http://short.staging.referralsaasquatch.com/mwjFXu",FBMESSENGER:"http://short.staging.referralsaasquatch.com/mwjFXu"},referrals:{totalCount:9,data:[{dateReferralStarted:pe.setDate(pe.getDate()-2),referredUser:{firstName:"Remus",lastName:"Lupin"},rewards:[{prettyValue:"$20.00",dateExpires:pe.setDate(pe.getDate()+4),statuses:["EXPIRED"],meta:{message:"Applied to Invoice #1234"}},{prettyValue:"$10.00",statuses:["AVAILABLE"]},{prettyValue:"$5.00",statuses:["AVAILABLE"]}]},{dateReferralStarted:pe.setDate(pe.getDate()-1),referredUser:{firstName:"Gellert",lastName:"Grindelwald"},rewards:[]},{dateReferralStarted:pe.setDate(pe.getDate()-1),referredUser:{firstName:"",lastName:""},rewards:[{prettyValue:"$20.00",dateExpires:pe.setDate(pe.getDate()-2),statuses:["EXPIRED"]}]},{dateReferralStarted:pe.setDate(pe.getDate()-5),referredUser:{firstName:"Lavender",lastName:"Brown"},rewards:[{prettyValue:"$20.00",statuses:["CANCELLED"]}]},{dateReferralStarted:pe.setDate(pe.getDate()-4),referredUser:{firstName:"Blaise",lastName:"Zabini"},rewards:[{prettyValue:"$20.00",statuses:["AVAILABLE"]},{prettyValue:"$10.00",statuses:["AVAILABLE"]}]},{dateReferralStarted:pe.setDate(pe.getDate()-10),referredUser:{firstName:"Argus",lastName:"Filch"},rewards:[]},{dateReferralStarted:pe.setDate(pe.getDate()-15),referredUser:{firstName:"Ron",lastName:"Weasley"},rewards:[{prettyValue:"$20.00",statuses:["AVAILABLE"]}]},{dateReferralStarted:pe.setDate(pe.getDate()-2),referredUser:{firstName:"Hermione",lastName:"Granger"},rewards:[{prettyValue:"$20.00",statuses:["AVAILABLE"]},{prettyValue:"$10.00",statuses:["AVAILABLE"]},{prettyValue:"$5.00",statuses:["AVAILABLE"]},{prettyValue:"5%",statuses:["AVAILABLE"]},{prettyValue:"5%",statuses:["AVAILABLE"]},{prettyValue:"5%",statuses:["AVAILABLE"]}]},{dateConverted:1606943971468,dateReferralStarted:1606943971468,referredUser:{imageUrl:"",firstName:"Seamus",lastName:"Finnigan"},rewards:[]}]},referredByReferral:{dateReferralStarted:pe.setDate(pe.getDate()-2),referrerUser:{firstName:"Rubeus",lastName:"Hagrid",referralCode:"RUBEUSHAGRID12"},rewards:[{fuelTankCode:"CODE1234",prettyValue:"$10.00",statuses:["AVAILABLE"]}]},referralsMonth:{totalCount:6},referralsWeek:{totalCount:3},rewardsCount:{totalCount:14},rewardsMonth:{totalCount:7},rewardsWeek:{totalCount:4},rewardBalancesGlobal:[{type:"CREDIT",unit:"CENTS",value:17e3,prettyValue:"$170.00",totalAssignedCredit:"17000",totalRedeemedCredit:"1500",prettyAssignedCredit:"$1000.00",prettyRedeemedCredit:"$15.00"},{type:"PCT_DISCOUNT",unit:"%",value:15,prettyValue:"15%"},{type:"CREDIT",unit:"CASH/CAD",count:3,totalPendingCredit:2e4,totalAssignedCredit:3e4,totalRedeemedCredit:1e4,totalExpiredCredit:0,totalCancelledCredit:0,prettyPendingCredit:"$200.00",prettyAssignedCredit:"$300.00",prettyRedeemedCredit:"$100.00",value:3e4,prettyValue:"$300.00"},{type:"CREDIT",unit:"CASH/USD",count:6,totalPendingCredit:25e3,totalAssignedCredit:4e4,totalRedeemedCredit:1e4,totalExpiredCredit:15e3,totalCancelledCredit:1e4,prettyPendingCredit:"USD250.00",prettyAssignedCredit:"USD400.00",prettyRedeemedCredit:"USD150.00",value:4e4,prettyValue:"USD400.00"}],rewardBalances:[{type:"CREDIT",unit:"CENTS",value:17e3,prettyValue:"$170.00",totalAssignedCredit:"17000",totalRedeemedCredit:"1500",prettyAssignedCredit:"$170.00",prettyRedeemedCredit:"$15.00"},{type:"PCT_DISCOUNT",unit:"%",value:15,prettyValue:"15%"},{type:"CREDIT",unit:"CASH/CAD",count:3,totalPendingCredit:2e4,totalAssignedCredit:3e4,totalRedeemedCredit:1e4,totalExpiredCredit:0,totalCancelledCredit:0,prettyPendingCredit:"$200.00",prettyAssignedCredit:"$300.00",prettyRedeemedCredit:"$100.00",value:3e4,prettyValue:"$300.00"},{type:"CREDIT",unit:"CASH/USD",count:6,totalPendingCredit:25e3,totalAssignedCredit:4e4,totalRedeemedCredit:1e4,totalExpiredCredit:15e3,totalCancelledCredit:1e4,prettyPendingCredit:"USD250.00",prettyAssignedCredit:"USD400.00",prettyRedeemedCredit:"USD150.00",value:4e4,prettyValue:"USD400.00"}],rewardBalanceDetails:[{prettyAvailableValue:"$5.00"},{prettyAvailableValue:"18%"}]},Ie=window.frameElement?window.frameElement.squatchJsApi:{},ge=()=>{const{tenantAlias:t,appDomain:n,token:e}=me();return new Ut({link:new Wt({uri:n+"/api/v1/"+t+"/graphql",headers:{Authorization:"Bearer "+e}}),cache:new Qn})},be={version:"Welcome to widget-host",analytics:{shareEvent(t){const n=me();if("demo"===n.env||!n)return Promise.resolve({});const{userId:e,accountId:r,programId:i="classic",engagementMedium:u}=n,o={eventMeta:{id:e,accountId:r,programId:i,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:u,shareMedium:t}}};return ge().mutate({mutation:ve`
|
|
16
16
|
mutation ($eventMeta: UserAnalyticsEvent!) {
|
|
17
17
|
createUserAnalyticsEvent(eventMeta: $eventMeta)
|
|
18
18
|
}
|
|
@@ -148,7 +148,51 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
148
148
|
rewardBalancesGlobal: rewardBalances
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
`,variables:i}).then(t=>t.data.user)},
|
|
151
|
+
`,variables:i}).then(t=>t.data.user)},getBalanceDetails(){const t=me();if("demo"===t.env||!t){const{rewardBalanceDetails:t}=ye;return Promise.resolve({rewardBalanceDetails:t})}const{userId:n,accountId:e,programId:r=null,locale:i}=t,u={userId:n,accountId:e,programId:r,locale:i};return this.getClient().query({query:ve`
|
|
152
|
+
query(
|
|
153
|
+
$userId: String!,
|
|
154
|
+
$accountId: String!,
|
|
155
|
+
$programId: ID,
|
|
156
|
+
$locale: String!
|
|
157
|
+
) {
|
|
158
|
+
user(id: $userId, accountId: $accountId) {
|
|
159
|
+
rewardBalanceDetails(programId: $programId) {
|
|
160
|
+
prettyAvailableValue
|
|
161
|
+
unit
|
|
162
|
+
... on CreditRewardBalance {
|
|
163
|
+
prettyAssignedCredit
|
|
164
|
+
prettyRedeemedCredit
|
|
165
|
+
rewardUnit {
|
|
166
|
+
currency {
|
|
167
|
+
displayName(locale: $locale)
|
|
168
|
+
symbol(locale: $locale)
|
|
169
|
+
currencyCode
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
`,variables:u}).then(t=>t.data.user)},getRewardExpiries(){const t=me();if("demo"===t.env||!t){const{rewardBalanceDetails:t}=ye;return Promise.resolve({rewardBalanceDetails:t})}const{userId:n,accountId:e,programId:r=null,locale:i}=t,u={userId:n,accountId:e,programId:r,locale:i};return this.getClient().query({query:ve`
|
|
177
|
+
query(
|
|
178
|
+
$userId: String!,
|
|
179
|
+
$accountId: String!,
|
|
180
|
+
$programId: ID,
|
|
181
|
+
$locale: String!
|
|
182
|
+
) {
|
|
183
|
+
user(id: $userId, accountId: $accountId) {
|
|
184
|
+
rewards(programId_eq: $programId) {
|
|
185
|
+
data {
|
|
186
|
+
dateCreated
|
|
187
|
+
dateScheduledFor
|
|
188
|
+
dateExpires
|
|
189
|
+
prettyValue
|
|
190
|
+
unit
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
`,variables:u}).then(t=>t.data.user)},async getReferralCode(){const t=me();if("demo"===t.env||!t)return ye.referralcode;const{userId:n,accountId:e,programId:r}=t,i={userId:n,accountId:e,programId:r};return this.getClient().query({query:ve`
|
|
152
196
|
query ($userId: String!, $accountId: String!, $programId: ID!) {
|
|
153
197
|
user(id: $userId, accountId: $accountId) {
|
|
154
198
|
referralCode(programId: $programId)
|
|
@@ -195,4 +239,25 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
195
239
|
${t[8]}:messageLink(programId: $programId, engagementMedium: $engagementMedium, shareMedium: ${t[8]})
|
|
196
240
|
}
|
|
197
241
|
}
|
|
198
|
-
`,variables:o}).then(t=>t.data.user)}},
|
|
242
|
+
`,variables:o}).then(t=>t.data.user)},getUserProgress(){const t=me();if("demo"===t.env||!t)return Promise.resolve({customFields:{demo_totalValue:16},rewardBalanceDetails:[{prettyAvailableValue:"$10.00"}],rewards:{count:1}});const{userId:n,accountId:e,programId:r}=t,i={userId:n,accountId:e,programId:r};return this.getClient().query({query:ve`
|
|
243
|
+
query($userId: String!, $accountId: String!, $programId: ID) {
|
|
244
|
+
user(id: $userId, accountId: $accountId){
|
|
245
|
+
customFields
|
|
246
|
+
locale
|
|
247
|
+
rewardBalanceDetails(programId: $programId) {
|
|
248
|
+
prettyAvailableValue(formatType:UNIT_FORMATTED)
|
|
249
|
+
}
|
|
250
|
+
rewards(limit:1000,offset:0, filter:{programId_eq: $programId}){
|
|
251
|
+
count
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
`,variables:i}).then(t=>t.data.user)},getProgramRules(){const t=me();if("demo"===t.env||!t)return Promise.resolve({id:"demo",name:"Demo Program",rules:{programWindow:"",rewardRules:{rewardRulesType:1,rewardGoal:24,isRecurring:1,defaultCurrency:"CAD"}}});const{programId:n}=t,e={programId:n};return this.getClient().query({query:ve`
|
|
256
|
+
query($programId: ID!) {
|
|
257
|
+
program(id:$programId){
|
|
258
|
+
id
|
|
259
|
+
name
|
|
260
|
+
rules
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
`,variables:e}).then(t=>t.data.program)}},ui:Ie};export{be as A,me as w}
|