-
Notifications
You must be signed in to change notification settings - Fork 0
/
freeton_wallet_platform.js
2 lines (2 loc) · 334 KB
/
freeton_wallet_platform.js
1
2
/*! For license information please see freeton_wallet_platform.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["Free TON Wallet Web Platform Binding"]=t():e["Free TON Wallet Web Platform Binding"]=t()}(self,(function(){return(()=>{var e={7757:(e,t,r)=>{e.exports=r(5666)},2152:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});var n=Object.prototype,i=n.toString,o=n.hasOwnProperty,a=new Map;function s(e,t){try{return u(e,t)}finally{a.clear()}}function u(e,t){if(e===t)return!0;var r=i.call(e);if(r!==i.call(t))return!1;switch(r){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(c(e,t))return!0;var n=Object.keys(e),a=Object.keys(t),s=n.length;if(s!==a.length)return!1;for(var l=0;l<s;++l)if(!o.call(t,n[l]))return!1;for(l=0;l<s;++l){var f=n[l];if(!u(e[f],t[f]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==""+t;case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(c(e,t))return!0;for(var p=e.entries(),h="[object Map]"===r;;){var d=p.next();if(d.done)break;var y=d.value,v=y[0],m=y[1];if(!t.has(v))return!1;if(h&&!u(m,t.get(v)))return!1}return!0}return!1}function c(e,t){var r=a.get(e);if(r){if(r.has(t))return!0}else a.set(e,r=new Set);return r.add(t),!1}},2017:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HeuristicFragmentMatcher:()=>U,InMemoryCache:()=>le,IntrospectionFragmentMatcher:()=>V,ObjectCache:()=>X,StoreReader:()=>z,StoreWriter:()=>re,WriteError:()=>ee,assertIdValue:()=>$,defaultDataIdFromObject:()=>se,defaultNormalizedCacheFactory:()=>Z,enhanceErrorWithDocument:()=>te});var n=r(655),i=r(1045);function o(e){return{kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:a(e)}]}}function a(e){if("number"==typeof e||"boolean"==typeof e||"string"==typeof e||null==e)return null;if(Array.isArray(e))return a(e[0]);var t=[];return Object.keys(e).forEach((function(r){var n={kind:"Field",name:{kind:"Name",value:r},selectionSet:a(e[r])||void 0};t.push(n)})),{kind:"SelectionSet",selections:t}}var s,u={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}]}}]},c=function(){function e(){}return e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.read({query:e.query,variables:e.variables,optimistic:t})},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.read({query:(0,i.getFragmentQueryDocument)(e.fragment,e.fragmentName),variables:e.variables,rootId:e.id,optimistic:t})},e.prototype.writeQuery=function(e){this.write({dataId:"ROOT_QUERY",result:e.data,query:e.query,variables:e.variables})},e.prototype.writeFragment=function(e){this.write({dataId:e.id,result:e.data,variables:e.variables,query:(0,i.getFragmentQueryDocument)(e.fragment,e.fragmentName)})},e.prototype.writeData=function(e){var t,r,n=e.id,i=e.data;if(void 0!==n){var s=null;try{s=this.read({rootId:n,optimistic:!1,query:u})}catch(e){}var c=s&&s.__typename||"__ClientData",l=Object.assign({__typename:c},i);this.writeFragment({id:n,fragment:(t=l,r=c,{kind:"Document",definitions:[{kind:"FragmentDefinition",typeCondition:{kind:"NamedType",name:{kind:"Name",value:r||"__FakeType"}},name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:a(t)}]}),data:l})}else this.writeQuery({query:o(i),data:i})},e}();s||(s={});var l=r(2152),f=null,p={},h=1,d="@wry/context:Slot",y=Array,v=y[d]||function(){var e=function(){function e(){this.id=["slot",h++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=f;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===p)break;return e!==f&&(f.slots[this.id]=t),!0}return f&&(f.slots[this.id]=p),!1},e.prototype.getValue=function(){if(this.hasValue())return f.slots[this.id]},e.prototype.withValue=function(e,t,r,n){var i,o=((i={__proto__:null})[this.id]=e,i),a=f;f={parent:a,slots:o};try{return t.apply(n,r)}finally{f=a}},e.bind=function(e){var t=f;return function(){var r=f;try{return f=t,e.apply(this,arguments)}finally{f=r}}},e.noContext=function(e,t,r){if(!f)return e.apply(r,t);var n=f;try{return f=null,e.apply(r,t)}finally{f=n}},e}();try{Object.defineProperty(y,d,{value:y[d]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();function m(){}v.bind,v.noContext;var g=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=m),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getEntry(e);return t&&t.value},e.prototype.getEntry=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var r=t.older,n=t.newer;n&&(n.older=r),r&&(r.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},e.prototype.set=function(e,t){var r=this.getEntry(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),b=new v,w=[],k=[];function _(e,t){if(!e)throw new Error(t||"assertion failure")}function E(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var O=function(){function e(t,r){this.fn=t,this.args=r,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],++e.count}return e.prototype.recompute=function(){if(_(!this.recomputing,"already recomputing"),function(e){var t=b.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),T(e)?N(t,e):C(t,e),t}(this)||!A(this))return T(this)?(t=D(e=this),b.withValue(e,x,[e]),function(e){if("function"==typeof e.subscribe)try{P(e),e.unsubscribe=e.subscribe.apply(null,e.args)}catch(t){return e.setDirty(),!1}return!0}(e)&&function(e){e.dirty=!1,T(e)||I(e)}(e),t.forEach(A),E(e.value)):E(this.value);var e,t},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,S(this),P(this))},e.prototype.dispose=function(){var e=this;D(this).forEach(A),P(this),this.parents.forEach((function(t){t.setDirty(),M(t,e)}))},e.count=0,e}();function x(e){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,e.args)}catch(t){e.value[1]=t}e.recomputing=!1}function T(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function S(e){e.parents.forEach((function(t){return N(t,e)}))}function I(e){e.parents.forEach((function(t){return C(t,e)}))}function N(e,t){if(_(e.childValues.has(t)),_(T(t)),e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=k.pop()||new Set;e.dirtyChildren.add(t),S(e)}function C(e,t){_(e.childValues.has(t)),_(!T(t));var r,n,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(r=o,n=t.value,(i=r.length)>0&&i===n.length&&r[i-1]===n[i-1]||e.setDirty()),R(e,t),T(e)||I(e)}function R(e,t){var r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(k.length<100&&k.push(r),e.dirtyChildren=null))}function A(e){return 0===e.parents.size&&"function"==typeof e.reportOrphan&&!0===e.reportOrphan()}function D(e){var t=w;return e.childValues.size>0&&(t=[],e.childValues.forEach((function(r,n){M(e,n),t.push(n)}))),_(null===e.dirtyChildren),t}function M(e,t){t.parents.delete(e),e.childValues.delete(t),R(e,t)}function P(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var j=function(){function e(e){this.weakness=e}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return e.forEach((function(e){return t=t.getChildTrie(e)})),t.data||(t.data=Object.create(null))},e.prototype.getChildTrie=function(t){var r=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness)),n},e}(),L=new j("function"==typeof WeakMap);function F(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return L.lookupArray(e)}var q=new Set;function B(e,t){void 0===t&&(t=Object.create(null));var r=new g(t.max||Math.pow(2,16),(function(e){return e.dispose()})),n=!!t.disposable,i=t.makeCacheKey||F;function o(){if(!n||b.hasValue()){var o=i.apply(null,arguments);if(void 0===o)return e.apply(null,arguments);var a=Array.prototype.slice.call(arguments),s=r.get(o);s?s.args=a:(s=new O(e,a),r.set(o,s),s.subscribe=t.subscribe,n&&(s.reportOrphan=function(){return r.delete(o)}));var u=s.recompute();return r.set(o,s),q.add(r),b.hasValue()||(q.forEach((function(e){return e.clean()})),q.clear()),n?void 0:u}}return o.dirty=function(){var e=i.apply(null,arguments),t=void 0!==e&&r.get(e);t&&t.setDirty()},o}var Q=r(7591),K=!1;var U=function(){function e(){}return e.prototype.ensureReady=function(){return Promise.resolve()},e.prototype.canBypassInit=function(){return!0},e.prototype.match=function(e,t,r){var n=r.store.get(e.id),o="ROOT_QUERY"===e.id;if(!n)return o;var a=n.__typename,s=void 0===a?o&&"Query":a;return s&&s===t||(!K,(0,i.isTest)()||(K=!0),"heuristic")},e}(),V=function(){function e(e){e&&e.introspectionQueryResultData?(this.possibleTypesMap=this.parseIntrospectionResult(e.introspectionQueryResultData),this.isReady=!0):this.isReady=!1,this.match=this.match.bind(this)}return e.prototype.match=function(e,t,r){(0,Q.kG)(this.isReady,1);var n=r.store.get(e.id),i="ROOT_QUERY"===e.id;if(!n)return i;var o=n.__typename,a=void 0===o?i&&"Query":o;if((0,Q.kG)(a,2),a===t)return!0;var s=this.possibleTypesMap[t];return!!(a&&s&&s.indexOf(a)>-1)},e.prototype.parseIntrospectionResult=function(e){var t={};return e.__schema.types.forEach((function(e){"UNION"!==e.kind&&"INTERFACE"!==e.kind||(t[e.name]=e.possibleTypes.map((function(e){return e.name})))})),t},e}(),G=Object.prototype.hasOwnProperty,W=function(){function e(e){var t=this;void 0===e&&(e=Object.create(null)),this.data=e,this.depend=B((function(e){return t.data[e]}),{disposable:!0,makeCacheKey:function(e){return e}})}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.depend(e),this.data[e]},e.prototype.set=function(e,t){t!==this.data[e]&&(this.data[e]=t,this.depend.dirty(e))},e.prototype.delete=function(e){G.call(this.data,e)&&(delete this.data[e],this.depend.dirty(e))},e.prototype.clear=function(){this.replace(null)},e.prototype.replace=function(e){var t=this;e?(Object.keys(e).forEach((function(r){t.set(r,e[r])})),Object.keys(this.data).forEach((function(r){G.call(e,r)||t.delete(r)}))):Object.keys(this.data).forEach((function(e){t.delete(e)}))},e}();function J(e){return new W(e)}var z=function(){function e(e){var t=this,r=void 0===e?{}:e,n=r.cacheKeyRoot,o=void 0===n?new j(i.canUseWeakMap):n,a=r.freezeResults,s=void 0!==a&&a,u=this,c=u.executeStoreQuery,l=u.executeSelectionSet,f=u.executeSubSelectedArray;this.freezeResults=s,this.executeStoreQuery=B((function(e){return c.call(t,e)}),{makeCacheKey:function(e){var t=e.query,r=e.rootValue,n=e.contextValue,i=e.variableValues,a=e.fragmentMatcher;if(n.store instanceof W)return o.lookup(n.store,t,a,JSON.stringify(i),r.id)}}),this.executeSelectionSet=B((function(e){return l.call(t,e)}),{makeCacheKey:function(e){var t=e.selectionSet,r=e.rootValue,n=e.execContext;if(n.contextValue.store instanceof W)return o.lookup(n.contextValue.store,t,n.fragmentMatcher,JSON.stringify(n.variableValues),r.id)}}),this.executeSubSelectedArray=B((function(e){return f.call(t,e)}),{makeCacheKey:function(e){var t=e.field,r=e.array,n=e.execContext;if(n.contextValue.store instanceof W)return o.lookup(n.contextValue.store,t,r,JSON.stringify(n.variableValues))}})}return e.prototype.readQueryFromStore=function(e){return this.diffQueryAgainstStore((0,n.pi)((0,n.pi)({},e),{returnPartialData:!1})).result},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,r=e.query,n=e.variables,o=e.previousResult,a=e.returnPartialData,s=void 0===a||a,u=e.rootId,c=void 0===u?"ROOT_QUERY":u,f=e.fragmentMatcherFunction,p=e.config,h=(0,i.getQueryDefinition)(r);n=(0,i.assign)({},(0,i.getDefaultValues)(h),n);var d={store:t,dataIdFromObject:p&&p.dataIdFromObject,cacheRedirects:p&&p.cacheRedirects||{}},y=this.executeStoreQuery({query:r,rootValue:{type:"id",id:c,generated:!0,typename:"Query"},contextValue:d,variableValues:n,fragmentMatcher:f}),v=y.missing&&y.missing.length>0;return v&&!s&&y.missing.forEach((function(e){if(!e.tolerable)throw new Q.ej(8)})),o&&(0,l.D)(o,y.result)&&(y.result=o),{result:y.result,complete:!v}},e.prototype.executeStoreQuery=function(e){var t=e.query,r=e.rootValue,n=e.contextValue,o=e.variableValues,a=e.fragmentMatcher,s=void 0===a?H:a,u=(0,i.getMainDefinition)(t),c=(0,i.getFragmentDefinitions)(t),l={query:t,fragmentMap:(0,i.createFragmentMap)(c),contextValue:n,variableValues:o,fragmentMatcher:s};return this.executeSelectionSet({selectionSet:u.selectionSet,rootValue:r,execContext:l})},e.prototype.executeSelectionSet=function(e){var t=this,r=e.selectionSet,o=e.rootValue,a=e.execContext,s=a.fragmentMap,u=a.contextValue,c=a.variableValues,l={result:null},f=[],p=u.store.get(o.id),h=p&&p.__typename||"ROOT_QUERY"===o.id&&"Query"||void 0;function d(e){var t;return e.missing&&(l.missing=l.missing||[],(t=l.missing).push.apply(t,e.missing)),e.result}return r.selections.forEach((function(e){var r;if((0,i.shouldInclude)(e,c))if((0,i.isField)(e)){var l=d(t.executeField(p,h,e,a));void 0!==l&&f.push(((r={})[(0,i.resultKeyNameFromField)(e)]=l,r))}else{var y=void 0;if((0,i.isInlineFragment)(e))y=e;else if(!(y=s[e.name.value]))throw new Q.ej(9);var v=y.typeCondition&&y.typeCondition.name.value,m=!v||a.fragmentMatcher(o,v,u);if(m){var g=t.executeSelectionSet({selectionSet:y.selectionSet,rootValue:o,execContext:a});"heuristic"===m&&g.missing&&(g=(0,n.pi)((0,n.pi)({},g),{missing:g.missing.map((function(e){return(0,n.pi)((0,n.pi)({},e),{tolerable:!0})}))})),f.push(d(g))}}})),l.result=(0,i.mergeDeepArray)(f),this.freezeResults,l},e.prototype.executeField=function(e,t,r,n){var o=n.variableValues,a=n.contextValue,s=function(e,t,r,n,o,a){var s=a.directives,u=r;(n||s)&&(u=(0,i.getStoreKeyName)(u,n,s));var c=void 0;if(e&&void 0===(c=e[u])&&o.cacheRedirects&&"string"==typeof t){var l=o.cacheRedirects[t];if(l){var f=l[r];f&&(c=f(e,n,{getCacheKey:function(e){var t=o.dataIdFromObject(e);return t&&(0,i.toIdValue)({id:t,typename:e.__typename})}}))}}return void 0===c?{result:c,missing:[{object:e,fieldName:u,tolerable:!1}]}:((0,i.isJsonValue)(c)&&(c=c.json),{result:c})}(e,t,r.name.value,(0,i.argumentsObjectFromField)(r,o),a,{resultKey:(0,i.resultKeyNameFromField)(r),directives:(0,i.getDirectiveInfoFromField)(r,o)});return Array.isArray(s.result)?this.combineExecResults(s,this.executeSubSelectedArray({field:r,array:s.result,execContext:n})):r.selectionSet?null==s.result?s:this.combineExecResults(s,this.executeSelectionSet({selectionSet:r.selectionSet,rootValue:s.result,execContext:n})):(Y(r,s.result),this.freezeResults,s)},e.prototype.combineExecResults=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return t.forEach((function(t){t.missing&&(e=e||[]).push.apply(e,t.missing)})),{result:t.pop().result,missing:e}},e.prototype.executeSubSelectedArray=function(e){var t,r=this,n=e.field,i=e.array,o=e.execContext;function a(e){return e.missing&&(t=t||[]).push.apply(t,e.missing),e.result}return i=i.map((function(e){return null===e?null:Array.isArray(e)?a(r.executeSubSelectedArray({field:n,array:e,execContext:o})):n.selectionSet?a(r.executeSelectionSet({selectionSet:n.selectionSet,rootValue:e,execContext:o})):(Y(n,e),e)})),this.freezeResults,{result:i,missing:t}},e}();function Y(e,t){if(!e.selectionSet&&(0,i.isIdValue)(t))throw new Q.ej(10)}function H(){return!0}function $(e){(0,Q.kG)((0,i.isIdValue)(e),11)}var X=function(){function e(e){void 0===e&&(e=Object.create(null)),this.data=e}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){this.data[e]=t},e.prototype.delete=function(e){this.data[e]=void 0},e.prototype.clear=function(){this.data=Object.create(null)},e.prototype.replace=function(e){this.data=e||Object.create(null)},e}();function Z(e){return new X(e)}var ee=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="WriteError",t}return(0,n.ZT)(t,e),t}(Error);function te(e,t){var r=new ee("Error writing result to store for query:\n "+JSON.stringify(t));return r.message+="\n"+e.message,r.stack=e.stack,r}var re=function(){function e(){}return e.prototype.writeQueryToStore=function(e){var t=e.query,r=e.result,n=e.store,i=void 0===n?J():n,o=e.variables,a=e.dataIdFromObject,s=e.fragmentMatcherFunction;return this.writeResultToStore({dataId:"ROOT_QUERY",result:r,document:t,store:i,variables:o,dataIdFromObject:a,fragmentMatcherFunction:s})},e.prototype.writeResultToStore=function(e){var t=e.dataId,r=e.result,n=e.document,o=e.store,a=void 0===o?J():o,s=e.variables,u=e.dataIdFromObject,c=e.fragmentMatcherFunction,l=(0,i.getOperationDefinition)(n);try{return this.writeSelectionSetToStore({result:r,dataId:t,selectionSet:l.selectionSet,context:{store:a,processedData:{},variables:(0,i.assign)({},(0,i.getDefaultValues)(l),s),dataIdFromObject:u,fragmentMap:(0,i.createFragmentMap)((0,i.getFragmentDefinitions)(n)),fragmentMatcherFunction:c}})}catch(e){throw te(e,n)}},e.prototype.writeSelectionSetToStore=function(e){var t=this,r=e.result,n=e.dataId,o=e.selectionSet,a=e.context,s=a.variables,u=a.store,c=a.fragmentMap;return o.selections.forEach((function(e){var o;if((0,i.shouldInclude)(e,s))if((0,i.isField)(e)){var u=(0,i.resultKeyNameFromField)(e),l=r[u];if(void 0!==l)t.writeFieldToStore({dataId:n,value:l,field:e,context:a});else{var f=!1,p=!1;e.directives&&e.directives.length&&(f=e.directives.some((function(e){return e.name&&"defer"===e.name.value})),p=e.directives.some((function(e){return e.name&&"client"===e.name.value}))),!f&&!p&&a.fragmentMatcherFunction}}else{var h=void 0;(0,i.isInlineFragment)(e)?h=e:(h=(c||{})[e.name.value],(0,Q.kG)(h,3));var d=!0;if(a.fragmentMatcherFunction&&h.typeCondition){var y=n||"self",v=(0,i.toIdValue)({id:y,typename:void 0}),m={store:new X((o={},o[y]=r,o)),cacheRedirects:{}},g=a.fragmentMatcherFunction(v,h.typeCondition.name.value,m);(0,i.isProduction)(),d=!!g}d&&t.writeSelectionSetToStore({result:r,selectionSet:h.selectionSet,dataId:n,context:a})}})),u},e.prototype.writeFieldToStore=function(e){var t,r,o,a=e.field,s=e.value,u=e.dataId,c=e.context,f=c.variables,p=c.dataIdFromObject,h=c.store,d=(0,i.storeKeyNameFromField)(a,f);if(a.selectionSet&&null!==s)if(Array.isArray(s)){var y=u+"."+d;r=this.processArrayValue(s,y,a.selectionSet,c)}else{var v=u+"."+d,m=!0;if(ne(v)||(v="$"+v),p){var g=p(s);(0,Q.kG)(!g||!ne(g),4),(g||"number"==typeof g&&0===g)&&(v=g,m=!1)}oe(v,a,c.processedData)||this.writeSelectionSetToStore({dataId:v,result:s,selectionSet:a.selectionSet,context:c});var b=s.__typename;r=(0,i.toIdValue)({id:v,typename:b},m);var w=(o=h.get(u))&&o[d];if(w!==r&&(0,i.isIdValue)(w)){var k=void 0!==w.typename,_=void 0!==b,E=k&&_&&w.typename!==b;(0,Q.kG)(!m||w.generated||E,5),(0,Q.kG)(!k||_,6),w.generated&&(E?m||h.delete(w.id):ie(w.id,r.id,h))}}else r=null!=s&&"object"==typeof s?{type:"json",json:s}:s;(o=h.get(u))&&(0,l.D)(r,o[d])||h.set(u,(0,n.pi)((0,n.pi)({},o),((t={})[d]=r,t)))},e.prototype.processArrayValue=function(e,t,r,n){var o=this;return e.map((function(e,a){if(null===e)return null;var s=t+"."+a;if(Array.isArray(e))return o.processArrayValue(e,s,r,n);var u=!0;if(n.dataIdFromObject){var c=n.dataIdFromObject(e);c&&(s=c,u=!1)}return oe(s,r,n.processedData)||o.writeSelectionSetToStore({dataId:s,result:e,selectionSet:r,context:n}),(0,i.toIdValue)({id:s,typename:e.__typename},u)}))},e}();function ne(e){return"$"===e[0]}function ie(e,t,r){if(e===t)return!1;var o=r.get(e),a=r.get(t),s=!1;Object.keys(o).forEach((function(e){var t=o[e],n=a[e];(0,i.isIdValue)(t)&&ne(t.id)&&(0,i.isIdValue)(n)&&!(0,l.D)(t,n)&&ie(t.id,n.id,r)&&(s=!0)})),r.delete(e);var u=(0,n.pi)((0,n.pi)({},o),a);return(0,l.D)(u,a)?s:(r.set(t,u),!0)}function oe(e,t,r){if(!r)return!1;if(r[e]){if(r[e].indexOf(t)>=0)return!0;r[e].push(t)}else r[e]=[t];return!1}var ae={fragmentMatcher:new U,dataIdFromObject:se,addTypename:!0,resultCaching:!0,freezeResults:!1};function se(e){if(e.__typename){if(void 0!==e.id)return e.__typename+":"+e.id;if(void 0!==e._id)return e.__typename+":"+e._id}return null}var ue=Object.prototype.hasOwnProperty,ce=function(e){function t(t,r,n){var i=e.call(this,Object.create(null))||this;return i.optimisticId=t,i.parent=r,i.transaction=n,i}return(0,n.ZT)(t,e),t.prototype.toObject=function(){return(0,n.pi)((0,n.pi)({},this.parent.toObject()),this.data)},t.prototype.get=function(e){return ue.call(this.data,e)?this.data[e]:this.parent.get(e)},t}(X),le=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;r.watches=new Set,r.typenameDocumentCache=new Map,r.cacheKeyRoot=new j(i.canUseWeakMap),r.silenceBroadcast=!1,r.config=(0,n.pi)((0,n.pi)({},ae),t),r.config.customResolvers&&(r.config.cacheRedirects=r.config.customResolvers),r.config.cacheResolvers&&(r.config.cacheRedirects=r.config.cacheResolvers),r.addTypename=!!r.config.addTypename,r.data=r.config.resultCaching?new W:new X,r.optimisticData=r.data,r.storeWriter=new re,r.storeReader=new z({cacheKeyRoot:r.cacheKeyRoot,freezeResults:t.freezeResults});var o=r,a=o.maybeBroadcastWatch;return r.maybeBroadcastWatch=B((function(e){return a.call(r,e)}),{makeCacheKey:function(e){if(!e.optimistic&&!e.previousResult)return o.data instanceof W?o.cacheKeyRoot.lookup(e.query,JSON.stringify(e.variables)):void 0}}),r}return(0,n.ZT)(t,e),t.prototype.restore=function(e){return e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).toObject()},t.prototype.read=function(e){if("string"==typeof e.rootId&&void 0===this.data.get(e.rootId))return null;var t=this.config.fragmentMatcher,r=t&&t.match;return this.storeReader.readQueryFromStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,rootId:e.rootId,fragmentMatcherFunction:r,previousResult:e.previousResult,config:this.config})||null},t.prototype.write=function(e){var t=this.config.fragmentMatcher,r=t&&t.match;this.storeWriter.writeResultToStore({dataId:e.dataId,result:e.result,variables:e.variables,document:this.transformDocument(e.query),store:this.data,dataIdFromObject:this.config.dataIdFromObject,fragmentMatcherFunction:r}),this.broadcastWatches()},t.prototype.diff=function(e){var t=this.config.fragmentMatcher,r=t&&t.match;return this.storeReader.diffQueryAgainstStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,returnPartialData:e.returnPartialData,previousResult:e.previousResult,fragmentMatcherFunction:r,config:this.config})},t.prototype.watch=function(e){var t=this;return this.watches.add(e),function(){t.watches.delete(e)}},t.prototype.evict=function(e){throw new Q.ej(7)},t.prototype.reset=function(){return this.data.clear(),this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){for(var t=[],r=0,n=this.optimisticData;n instanceof ce;)n.optimisticId===e?++r:t.push(n),n=n.parent;if(r>0){for(this.optimisticData=n;t.length>0;){var i=t.pop();this.performTransaction(i.transaction,i.optimisticId)}this.broadcastWatches()}},t.prototype.performTransaction=function(e,t){var r=this.data,n=this.silenceBroadcast;this.silenceBroadcast=!0,"string"==typeof t&&(this.data=this.optimisticData=new ce(t,this.optimisticData,e));try{e(this)}finally{this.silenceBroadcast=n,this.data=r}this.broadcastWatches()},t.prototype.recordOptimisticTransaction=function(e,t){return this.performTransaction(e,t)},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=(0,i.addTypenameToDocument)(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(){var e=this;this.silenceBroadcast||this.watches.forEach((function(t){return e.maybeBroadcastWatch(t)}))},t.prototype.maybeBroadcastWatch=function(e){e.callback(this.diff({query:e.query,variables:e.variables,previousResult:e.previousResult&&e.previousResult(),optimistic:e.optimistic}))},t}(c)},1462:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>C,ApolloClient:()=>N,ApolloError:()=>m,FetchType:()=>v,NetworkStatus:()=>n,ObservableQuery:()=>g,isApolloError:()=>y});var n,i=r(655),o=r(1045),a=r(2152),s=r(9904),u=r(1803),c=r(7121),l=r(7591),f=r(285);function p(e){return e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(n||(n={}));var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ZT)(t,e),t.prototype[c.default]=function(){return this},t.prototype["@@observable"]=function(){return this},t}(s.Z);function d(e){return Array.isArray(e)&&e.length>0}function y(e){return e.hasOwnProperty("graphQLErrors")}var v,m=function(e){function t(r){var n,i,o=r.graphQLErrors,a=r.networkError,s=r.errorMessage,u=r.extraInfo,c=e.call(this,s)||this;return c.graphQLErrors=o||[],c.networkError=a||null,c.message=s||(i="",d((n=c).graphQLErrors)&&n.graphQLErrors.forEach((function(e){var t=e?e.message:"Error message not found.";i+="GraphQL error: "+t+"\n"})),n.networkError&&(i+="Network error: "+n.networkError.message+"\n"),i=i.replace(/\n$/,"")),c.extraInfo=u,c.__proto__=t.prototype,c}return(0,i.ZT)(t,e),t}(Error);!function(e){e[e.normal=1]="normal",e[e.refetch=2]="refetch",e[e.poll=3]="poll"}(v||(v={}));var g=function(e){function t(t){var r=t.queryManager,n=t.options,i=t.shouldSubscribe,a=void 0===i||i,s=e.call(this,(function(e){return s.onSubscribe(e)}))||this;s.observers=new Set,s.subscriptions=new Set,s.isTornDown=!1,s.options=n,s.variables=n.variables||{},s.queryId=r.generateQueryId(),s.shouldSubscribe=a;var u=(0,o.getOperationDefinition)(n.query);return s.queryName=u&&u.name&&u.name.value,s.queryManager=r,s}return(0,i.ZT)(t,e),t.prototype.result=function(){var e=this;return new Promise((function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:r},i=e.subscribe(n)}))},t.prototype.currentResult=function(){var e=this.getCurrentResult();return void 0===e.data&&(e.data={}),e},t.prototype.getCurrentResult=function(){if(this.isTornDown){var e=this.lastResult;return{data:!this.lastError&&e&&e.data||void 0,error:this.lastError,loading:!1,networkStatus:n.error}}var t,r,o,a=this.queryManager.getCurrentQueryResult(this),s=a.data,u=a.partial,c=this.queryManager.queryStore.get(this.queryId),l=this.options.fetchPolicy,f="network-only"===l||"no-cache"===l;if(c){var h=c.networkStatus;if(r=c,void 0===(o=this.options.errorPolicy)&&(o="none"),r&&(r.networkError||"none"===o&&d(r.graphQLErrors)))return{data:void 0,loading:!1,networkStatus:h,error:new m({graphQLErrors:c.graphQLErrors,networkError:c.networkError})};c.variables&&(this.options.variables=(0,i.pi)((0,i.pi)({},this.options.variables),c.variables),this.variables=this.options.variables),t={data:s,loading:p(h),networkStatus:h},c.graphQLErrors&&"all"===this.options.errorPolicy&&(t.errors=c.graphQLErrors)}else{var y=f||u&&"cache-only"!==l;t={data:s,loading:y,networkStatus:y?n.loading:n.ready}}return u||this.updateLastResult((0,i.pi)((0,i.pi)({},t),{stale:!1})),(0,i.pi)((0,i.pi)({},t),{partial:u})},t.prototype.isDifferentFromLastResult=function(e){var t=this.lastResultSnapshot;return!(t&&e&&t.networkStatus===e.networkStatus&&t.stale===e.stale&&(0,a.D)(t.data,e.data))},t.prototype.getLastResult=function(){return this.lastResult},t.prototype.getLastError=function(){return this.lastError},t.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){var e=this.queryManager.queryStore.get(this.queryId);e&&(e.networkError=null,e.graphQLErrors=[])},t.prototype.refetch=function(e){var t=this.options.fetchPolicy;return"cache-only"===t?Promise.reject(new l.ej(1)):("no-cache"!==t&&"cache-and-network"!==t&&(t="network-only"),(0,a.D)(this.variables,e)||(this.variables=(0,i.pi)((0,i.pi)({},this.variables),e)),(0,a.D)(this.options.variables,this.variables)||(this.options.variables=(0,i.pi)((0,i.pi)({},this.options.variables),this.variables)),this.queryManager.fetchQuery(this.queryId,(0,i.pi)((0,i.pi)({},this.options),{fetchPolicy:t}),v.refetch))},t.prototype.fetchMore=function(e){var t=this;(0,l.kG)(e.updateQuery,2);var r=(0,i.pi)((0,i.pi)({},e.query?e:(0,i.pi)((0,i.pi)((0,i.pi)({},this.options),e),{variables:(0,i.pi)((0,i.pi)({},this.variables),e.variables)})),{fetchPolicy:"network-only"}),n=this.queryManager.generateQueryId();return this.queryManager.fetchQuery(n,r,v.normal,this.queryId).then((function(i){return t.updateQuery((function(t){return e.updateQuery(t,{fetchMoreResult:i.data,variables:r.variables})})),t.queryManager.stopQuery(n),i}),(function(e){throw t.queryManager.stopQuery(n),e}))},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery((function(e,t){var i=t.variables;return n(e,{subscriptionData:r,variables:i})}))},error:function(t){e.onError&&e.onError(t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){var t=this.options.fetchPolicy;this.options=(0,i.pi)((0,i.pi)({},this.options),e),e.pollInterval?this.startPolling(e.pollInterval):0===e.pollInterval&&this.stopPolling();var r=e.fetchPolicy;return this.setVariables(this.options.variables,t!==r&&("cache-only"===t||"standby"===t||"network-only"===r),e.fetchResults)},t.prototype.setVariables=function(e,t,r){return void 0===t&&(t=!1),void 0===r&&(r=!0),this.isTornDown=!1,e=e||this.variables,!t&&(0,a.D)(e,this.variables)?this.observers.size&&r?this.result():Promise.resolve():(this.variables=this.options.variables=e,this.observers.size?this.queryManager.fetchQuery(this.queryId,this.options):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,r=t.getQueryWithPreviousResult(this.queryId),n=r.previousResult,i=r.variables,a=r.document,s=(0,o.tryFunctionOrLogError)((function(){return e(n,{variables:i})}));s&&(t.dataStore.markUpdateQueryResult(a,i,s),t.broadcastQueries())},t.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},t.prototype.startPolling=function(e){k(this),this.options.pollInterval=e,this.queryManager.startPollingQuery(this.options,this.queryId)},t.prototype.updateLastResult=function(e){var t=this.lastResult;return this.lastResult=e,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?e:(0,o.cloneDeep)(e),t},t.prototype.onSubscribe=function(e){var t=this;try{var r=e._subscription._observer;r&&!r.error&&(r.error=b)}catch(e){}var n=!this.observers.size;return this.observers.add(e),e.next&&this.lastResult&&e.next(this.lastResult),e.error&&this.lastError&&e.error(this.lastError),n&&this.setUpQuery(),function(){t.observers.delete(e)&&!t.observers.size&&t.tearDownQuery()}},t.prototype.setUpQuery=function(){var e=this,t=this.queryManager,r=this.queryId;this.shouldSubscribe&&t.addObservableQuery(r,this),this.options.pollInterval&&(k(this),t.startPollingQuery(this.options,r));var o=function(t){e.updateLastResult((0,i.pi)((0,i.pi)({},e.lastResult),{errors:t.graphQLErrors,networkStatus:n.error,loading:!1})),w(e.observers,"error",e.lastError=t)};t.observeQuery(r,this.options,{next:function(r){if(e.lastError||e.isDifferentFromLastResult(r)){var n=e.updateLastResult(r),i=e.options,o=i.query,s=i.variables,u=i.fetchPolicy;t.transform(o).hasClientExports?t.getLocalState().addExportedVariables(o,s).then((function(i){var s=e.variables;e.variables=e.options.variables=i,!r.loading&&n&&"cache-only"!==u&&t.transform(o).serverQuery&&!(0,a.D)(s,i)?e.refetch():w(e.observers,"next",r)})):w(e.observers,"next",r)}},error:o}).catch(o)},t.prototype.tearDownQuery=function(){var e=this.queryManager;this.isTornDown=!0,e.stopPollingQuery(this.queryId),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),e.removeObservableQuery(this.queryId),e.stopQuery(this.queryId),this.observers.clear()},t}(h);function b(e){}function w(e,t,r){var n=[];e.forEach((function(e){return e[t]&&n.push(e)})),n.forEach((function(e){return e[t](r)}))}function k(e){var t=e.options.fetchPolicy;(0,l.kG)("cache-first"!==t&&"cache-only"!==t,3)}var _=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initMutation=function(e,t,r){this.store[e]={mutation:t,variables:r||{},loading:!0,error:null}},e.prototype.markMutationError=function(e,t){var r=this.store[e];r&&(r.loading=!1,r.error=t)},e.prototype.markMutationResult=function(e){var t=this.store[e];t&&(t.loading=!1,t.error=null)},e.prototype.reset=function(){this.store={}},e}(),E=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initQuery=function(e){var t=this.store[e.queryId];(0,l.kG)(!t||t.document===e.document||(0,a.D)(t.document,e.document),19);var r,i=!1,o=null;e.storePreviousVariables&&t&&t.networkStatus!==n.loading&&((0,a.D)(t.variables,e.variables)||(i=!0,o=t.variables)),r=i?n.setVariables:e.isPoll?n.poll:e.isRefetch?n.refetch:n.loading;var s=[];t&&t.graphQLErrors&&(s=t.graphQLErrors),this.store[e.queryId]={document:e.document,variables:e.variables,previousVariables:o,networkError:null,graphQLErrors:s,networkStatus:r,metadata:e.metadata},"string"==typeof e.fetchMoreForQueryId&&this.store[e.fetchMoreForQueryId]&&(this.store[e.fetchMoreForQueryId].networkStatus=n.fetchMore)},e.prototype.markQueryResult=function(e,t,r){this.store&&this.store[e]&&(this.store[e].networkError=null,this.store[e].graphQLErrors=d(t.errors)?t.errors:[],this.store[e].previousVariables=null,this.store[e].networkStatus=n.ready,"string"==typeof r&&this.store[r]&&(this.store[r].networkStatus=n.ready))},e.prototype.markQueryError=function(e,t,r){this.store&&this.store[e]&&(this.store[e].networkError=t,this.store[e].networkStatus=n.error,"string"==typeof r&&this.markQueryResultClient(r,!0))},e.prototype.markQueryResultClient=function(e,t){var r=this.store&&this.store[e];r&&(r.networkError=null,r.previousVariables=null,t&&(r.networkStatus=n.ready))},e.prototype.stopQuery=function(e){delete this.store[e]},e.prototype.reset=function(e){var t=this;Object.keys(this.store).forEach((function(r){e.indexOf(r)<0?t.stopQuery(r):t.store[r].networkStatus=n.loading}))},e}(),O=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=(0,o.mergeDeep)(t.resolvers,e)})):this.resolvers=(0,o.mergeDeep)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,n=e.context,o=e.variables,a=e.onlyRunForcedResolvers,s=void 0!==a&&a;return(0,i.mG)(this,void 0,void 0,(function(){return(0,i.Jh)(this,(function(e){return t?[2,this.resolveDocument(t,r.data,n,o,this.fragmentMatcher,s).then((function(e){return(0,i.pi)((0,i.pi)({},r),{data:e.result})}))]:[2,r]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return(0,o.hasDirectives)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return this.resolvers?(0,o.removeClientSetsFromDocument)(e):e},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.cache;return(0,i.pi)((0,i.pi)({},e),{cache:t,getCacheKey:function(e){if(t.config)return t.config.dataIdFromObject(e);(0,l.kG)(!1,6)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,i.mG)(this,void 0,void 0,(function(){return(0,i.Jh)(this,(function(n){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then((function(e){return(0,i.pi)((0,i.pi)({},t),e.exportedVariables)}))]:[2,(0,i.pi)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return(0,f.visit)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return f.BREAK}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:(0,o.buildQueryFromSelectionSet)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,n,a,s){return void 0===r&&(r={}),void 0===n&&(n={}),void 0===a&&(a=function(){return!0}),void 0===s&&(s=!1),(0,i.mG)(this,void 0,void 0,(function(){var u,c,l,f,p,h,d,y,v;return(0,i.Jh)(this,(function(m){var g;return u=(0,o.getMainDefinition)(e),c=(0,o.getFragmentDefinitions)(e),l=(0,o.createFragmentMap)(c),f=u.operation,p=f?(g=f).charAt(0).toUpperCase()+g.slice(1):"Query",d=(h=this).cache,y=h.client,v={fragmentMap:l,context:(0,i.pi)((0,i.pi)({},r),{cache:d,client:y}),variables:n,fragmentMatcher:a,defaultOperationType:p,exportedVariables:{},onlyRunForcedResolvers:s},[2,this.resolveSelectionSet(u.selectionSet,t,v).then((function(e){return{result:e,exportedVariables:v.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,r){return(0,i.mG)(this,void 0,void 0,(function(){var n,a,s,u,c,f=this;return(0,i.Jh)(this,(function(p){return n=r.fragmentMap,a=r.context,s=r.variables,u=[t],c=function(e){return(0,i.mG)(f,void 0,void 0,(function(){var c,f;return(0,i.Jh)(this,(function(i){return(0,o.shouldInclude)(e,s)?(0,o.isField)(e)?[2,this.resolveField(e,t,r).then((function(t){var r;void 0!==t&&u.push(((r={})[(0,o.resultKeyNameFromField)(e)]=t,r))}))]:((0,o.isInlineFragment)(e)?c=e:(c=n[e.name.value],(0,l.kG)(c,7)),c&&c.typeCondition&&(f=c.typeCondition.name.value,r.fragmentMatcher(t,f,a))?[2,this.resolveSelectionSet(c.selectionSet,t,r).then((function(e){u.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(c)).then((function(){return(0,o.mergeDeepArray)(u)}))]}))}))},e.prototype.resolveField=function(e,t,r){return(0,i.mG)(this,void 0,void 0,(function(){var n,a,s,u,c,l,f,p,h,d=this;return(0,i.Jh)(this,(function(i){return n=r.variables,a=e.name.value,s=(0,o.resultKeyNameFromField)(e),u=a!==s,c=t[s]||t[a],l=Promise.resolve(c),r.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(f=t.__typename||r.defaultOperationType,(p=this.resolvers&&this.resolvers[f])&&(h=p[u?a:s])&&(l=Promise.resolve(h(t,(0,o.argumentsObjectFromField)(e,n),r.context,{field:e,fragmentMap:r.fragmentMap})))),[2,l.then((function(t){return void 0===t&&(t=c),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(r.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?d.resolveSubSelectedArray(e,t,r):e.selectionSet?d.resolveSelectionSet(e.selectionSet,t,r):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,r){var n=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?n.resolveSubSelectedArray(e,t,r):e.selectionSet?n.resolveSelectionSet(e.selectionSet,t,r):void 0})))},e}();function x(e){var t=new Set,r=null;return new h((function(n){return t.add(n),r=r||e.subscribe({next:function(e){t.forEach((function(t){return t.next&&t.next(e)}))},error:function(e){t.forEach((function(t){return t.error&&t.error(e)}))},complete:function(){t.forEach((function(e){return e.complete&&e.complete()}))}}),function(){t.delete(n)&&!t.size&&r&&(r.unsubscribe(),r=null)}}))}var T=Object.prototype.hasOwnProperty,S=function(){function e(e){var t=e.link,r=e.queryDeduplication,n=void 0!==r&&r,i=e.store,a=e.onBroadcast,s=void 0===a?function(){}:a,u=e.ssrMode,c=void 0!==u&&u,l=e.clientAwareness,f=void 0===l?{}:l,p=e.localState,h=e.assumeImmutableResults;this.mutationStore=new _,this.queryStore=new E,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.transformCache=new(o.canUseWeakMap?WeakMap:Map),this.inFlightLinkObservables=new Map,this.pollingInfoByQueryId=new Map,this.link=t,this.queryDeduplication=n,this.dataStore=i,this.onBroadcast=s,this.clientAwareness=f,this.localState=p||new O({cache:i.getCache()}),this.ssrMode=c,this.assumeImmutableResults=!!h}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.fetchQueryRejectFns.forEach((function(e){e(new l.ej(8))}))},e.prototype.mutate=function(e){var t=e.mutation,r=e.variables,n=e.optimisticResponse,a=e.updateQueries,s=e.refetchQueries,u=void 0===s?[]:s,c=e.awaitRefetchQueries,f=void 0!==c&&c,p=e.update,h=e.errorPolicy,y=void 0===h?"none":h,v=e.fetchPolicy,g=e.context,b=void 0===g?{}:g;return(0,i.mG)(this,void 0,void 0,(function(){var e,s,c,h=this;return(0,i.Jh)(this,(function(g){switch(g.label){case 0:return(0,l.kG)(t,9),(0,l.kG)(!v||"no-cache"===v,10),e=this.generateQueryId(),t=this.transform(t).document,this.setQuery(e,(function(){return{document:t}})),r=this.getVariables(t,r),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,r,b)]:[3,2];case 1:r=g.sent(),g.label=2;case 2:return s=function(){var e={};return a&&h.queries.forEach((function(t,r){var n=t.observableQuery;if(n){var i=n.queryName;i&&T.call(a,i)&&(e[r]={updater:a[i],query:h.queryStore.get(r)})}})),e},this.mutationStore.initMutation(e,t,r),this.dataStore.markMutationInit({mutationId:e,document:t,variables:r,updateQueries:s(),update:p,optimisticResponse:n}),this.broadcastQueries(),c=this,[2,new Promise((function(a,l){var h,g;c.getObservableFromLink(t,(0,i.pi)((0,i.pi)({},b),{optimisticResponse:n}),r,!1).subscribe({next:function(n){(0,o.graphQLResultHasError)(n)&&"none"===y?g=new m({graphQLErrors:n.errors}):(c.mutationStore.markMutationResult(e),"no-cache"!==v&&c.dataStore.markMutationResult({mutationId:e,result:n,document:t,variables:r,updateQueries:s(),update:p}),h=n)},error:function(t){c.mutationStore.markMutationError(e,t),c.dataStore.markMutationComplete({mutationId:e,optimisticResponse:n}),c.broadcastQueries(),c.setQuery(e,(function(){return{document:null}})),l(new m({networkError:t}))},complete:function(){if(g&&c.mutationStore.markMutationError(e,g),c.dataStore.markMutationComplete({mutationId:e,optimisticResponse:n}),c.broadcastQueries(),g)l(g);else{"function"==typeof u&&(u=u(h));var t=[];d(u)&&u.forEach((function(e){if("string"==typeof e)c.queries.forEach((function(r){var n=r.observableQuery;n&&n.queryName===e&&t.push(n.refetch())}));else{var r={query:e.query,variables:e.variables,fetchPolicy:"network-only"};e.context&&(r.context=e.context),t.push(c.query(r))}})),Promise.all(f?t:[]).then((function(){c.setQuery(e,(function(){return{document:null}})),"ignore"===y&&h&&(0,o.graphQLResultHasError)(h)&&delete h.errors,a(h)}))}}})}))]}}))}))},e.prototype.fetchQuery=function(e,t,r,n){return(0,i.mG)(this,void 0,void 0,(function(){var a,s,u,c,l,f,p,h,d,g,b,w,k,_,E,O,x,T,S=this;return(0,i.Jh)(this,(function(I){switch(I.label){case 0:return a=t.metadata,s=void 0===a?null:a,u=t.fetchPolicy,c=void 0===u?"cache-first":u,l=t.context,f=void 0===l?{}:l,p=this.transform(t.query).document,h=this.getVariables(p,t.variables),this.transform(p).hasClientExports?[4,this.localState.addExportedVariables(p,h,f)]:[3,2];case 1:h=I.sent(),I.label=2;case 2:if(t=(0,i.pi)((0,i.pi)({},t),{variables:h}),b=g="network-only"===c||"no-cache"===c,g||(w=this.dataStore.getCache().diff({query:p,variables:h,returnPartialData:!0,optimistic:!1}),k=w.complete,_=w.result,b=!k||"cache-and-network"===c,d=_),E=b&&"cache-only"!==c&&"standby"!==c,(0,o.hasDirectives)(["live"],p)&&(E=!0),O=this.idCounter++,x="no-cache"!==c?this.updateQueryWatch(e,p,t):void 0,this.setQuery(e,(function(){return{document:p,lastRequestId:O,invalidated:!0,cancel:x}})),this.invalidate(n),this.queryStore.initQuery({queryId:e,document:p,storePreviousVariables:E,variables:h,isPoll:r===v.poll,isRefetch:r===v.refetch,metadata:s,fetchMoreForQueryId:n}),this.broadcastQueries(),E){if(T=this.fetchRequest({requestId:O,queryId:e,document:p,options:t,fetchMoreForQueryId:n}).catch((function(t){throw y(t)?t:(O>=S.getQuery(e).lastRequestId&&(S.queryStore.markQueryError(e,t,n),S.invalidate(e),S.invalidate(n),S.broadcastQueries()),new m({networkError:t}))})),"cache-and-network"!==c)return[2,T];T.catch((function(){}))}return this.queryStore.markQueryResultClient(e,!E),this.invalidate(e),this.invalidate(n),this.transform(p).hasForcedResolvers?[2,this.localState.runResolvers({document:p,remoteResult:{data:d},context:f,variables:h,onlyRunForcedResolvers:!0}).then((function(r){return S.markQueryResult(e,r,t,n),S.broadcastQueries(),r}))]:(this.broadcastQueries(),[2,{data:d}])}}))}))},e.prototype.markQueryResult=function(e,t,r,n){var i=r.fetchPolicy,o=r.variables,a=r.errorPolicy;"no-cache"===i?this.setQuery(e,(function(){return{newData:{result:t.data,complete:!0}}})):this.dataStore.markQueryResult(t,this.getQuery(e).document,o,n,"ignore"===a||"all"===a)},e.prototype.queryListenerForObserver=function(e,t,r){var n=this;function i(e,t){if(r[e])try{r[e](t)}catch(e){}}return function(r,o){if(n.invalidate(e,!1),r){var a=n.getQuery(e),s=a.observableQuery,u=a.document,c=s?s.options.fetchPolicy:t.fetchPolicy;if("standby"!==c){var l=p(r.networkStatus),f=s&&s.getLastResult(),h=!(!f||f.networkStatus===r.networkStatus),y=t.returnPartialData||!o&&r.previousVariables||h&&t.notifyOnNetworkStatusChange||"cache-only"===c||"cache-and-network"===c;if(!l||y){var v=d(r.graphQLErrors),g=s&&s.options.errorPolicy||t.errorPolicy||"none";if("none"===g&&v||r.networkError)return i("error",new m({graphQLErrors:r.graphQLErrors,networkError:r.networkError}));try{var b=void 0,w=void 0;if(o)"no-cache"!==c&&"network-only"!==c&&n.setQuery(e,(function(){return{newData:null}})),b=o.result,w=!o.complete;else{var k=s&&s.getLastError(),_="none"!==g&&(k&&k.graphQLErrors)!==r.graphQLErrors;if(f&&f.data&&!_)b=f.data,w=!1;else{var E=n.dataStore.getCache().diff({query:u,variables:r.previousVariables||r.variables,returnPartialData:!0,optimistic:!0});b=E.result,w=!E.complete}}var O=w&&!(t.returnPartialData||"cache-only"===c),x={data:O?f&&f.data:b,loading:l,networkStatus:r.networkStatus,stale:O};"all"===g&&v&&(x.errors=r.graphQLErrors),i("next",x)}catch(e){i("error",new m({networkError:e}))}}}}}},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.dataStore.getCache(),n=r.transformDocument(e),i=(0,o.removeConnectionDirectiveFromDocument)(r.transformForLink(n)),a=this.localState.clientQuery(n),s=this.localState.serverQuery(i),u={document:n,hasClientExports:(0,o.hasClientExports)(n),hasForcedResolvers:this.localState.shouldForceResolvers(n),clientQuery:a,serverQuery:s,defaultVars:(0,o.getDefaultValues)((0,o.getOperationDefinition)(n))},c=function(e){e&&!t.has(e)&&t.set(e,u)};c(e),c(n),c(a),c(s)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,i.pi)((0,i.pi)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e,t){void 0===t&&(t=!0),(0,l.kG)("standby"!==e.fetchPolicy,11),e.variables=this.getVariables(e.query,e.variables),void 0===e.notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var r=(0,i.pi)({},e);return new g({queryManager:this,options:r,shouldSubscribe:t})},e.prototype.query=function(e){var t=this;return(0,l.kG)(e.query,12),(0,l.kG)("Document"===e.query.kind,13),(0,l.kG)(!e.returnPartialData,14),(0,l.kG)(!e.pollInterval,15),new Promise((function(r,n){var i=t.watchQuery(e,!1);t.fetchQueryRejectFns.set("query:"+i.queryId,n),i.result().then(r,n).then((function(){return t.fetchQueryRejectFns.delete("query:"+i.queryId)}))}))},e.prototype.generateQueryId=function(){return String(this.idCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){this.stopPollingQuery(e),this.queryStore.stopQuery(e),this.invalidate(e)},e.prototype.addQueryListener=function(e,t){this.setQuery(e,(function(e){return e.listeners.add(t),{invalidated:!1}}))},e.prototype.updateQueryWatch=function(e,t,r){var n=this,i=this.getQuery(e).cancel;return i&&i(),this.dataStore.getCache().watch({query:t,variables:r.variables,optimistic:!0,previousResult:function(){var t=null,r=n.getQuery(e).observableQuery;if(r){var i=r.getLastResult();i&&(t=i.data)}return t},callback:function(t){n.setQuery(e,(function(){return{invalidated:!0,newData:t}}))}})},e.prototype.addObservableQuery=function(e,t){this.setQuery(e,(function(){return{observableQuery:t}}))},e.prototype.removeObservableQuery=function(e){var t=this.getQuery(e).cancel;this.setQuery(e,(function(){return{observableQuery:null}})),t&&t()},e.prototype.clearStore=function(){this.fetchQueryRejectFns.forEach((function(e){e(new l.ej(16))}));var e=[];return this.queries.forEach((function(t,r){t.observableQuery&&e.push(r)})),this.queryStore.reset(e),this.mutationStore.reset(),this.dataStore.reset()},e.prototype.resetStore=function(){var e=this;return this.clearStore().then((function(){return e.reFetchObservableQueries()}))},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.queries.forEach((function(n,i){var o=n.observableQuery;if(o){var a=o.options.fetchPolicy;o.resetLastResults(),"cache-only"===a||!e&&"standby"===a||r.push(o.refetch()),t.setQuery(i,(function(){return{newData:null}})),t.invalidate(i)}})),this.broadcastQueries(),Promise.all(r)},e.prototype.observeQuery=function(e,t,r){return this.addQueryListener(e,this.queryListenerForObserver(e,t,r)),this.fetchQuery(e,t)},e.prototype.startQuery=function(e,t,r){return this.addQueryListener(e,r),this.fetchQuery(e,t).catch((function(){})),e},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.variables;r=this.transform(r).document,i=this.getVariables(r,i);var a=function(e){return t.getObservableFromLink(r,{},e,!1).map((function(i){if(n&&"no-cache"===n||(t.dataStore.markSubscriptionResult(i,r,e),t.broadcastQueries()),(0,o.graphQLResultHasError)(i))throw new m({graphQLErrors:i.errors});return i}))};if(this.transform(r).hasClientExports){var s=this.localState.addExportedVariables(r,i).then(a);return new h((function(e){var t=null;return s.then((function(r){return t=r.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return a(i)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchQueryRejectFns.delete("query:"+e),this.fetchQueryRejectFns.delete("fetchRequest:"+e),this.getQuery(e).subscriptions.forEach((function(e){return e.unsubscribe()})),this.queries.delete(e)},e.prototype.getCurrentQueryResult=function(e,t){void 0===t&&(t=!0);var r=e.options,n=r.variables,i=r.query,o=r.fetchPolicy,a=r.returnPartialData,s=e.getLastResult(),u=this.getQuery(e.queryId).newData;if(u&&u.complete)return{data:u.result,partial:!1};if("no-cache"===o||"network-only"===o)return{data:void 0,partial:!1};var c=this.dataStore.getCache().diff({query:i,variables:n,previousResult:s?s.data:void 0,returnPartialData:!0,optimistic:t}),l=c.result,f=c.complete;return{data:f||a?l:void 0,partial:!f}},e.prototype.getQueryWithPreviousResult=function(e){var t;if("string"==typeof e){var r=this.getQuery(e).observableQuery;(0,l.kG)(r,17),t=r}else t=e;var n=t.options,i=n.variables,o=n.query;return{previousResult:this.getCurrentQueryResult(t,!1).data,variables:i,document:o}},e.prototype.broadcastQueries=function(){var e=this;this.onBroadcast(),this.queries.forEach((function(t,r){t.invalidated&&t.listeners.forEach((function(n){n&&n(e.queryStore.get(r),t.newData)}))}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,n){var a,s=this;void 0===n&&(n=this.queryDeduplication);var c=this.transform(e).serverQuery;if(c){var l=this.inFlightLinkObservables,f=this.link,p={query:c,variables:r,operationName:(0,o.getOperationName)(c)||void 0,context:this.prepareContext((0,i.pi)((0,i.pi)({},t),{forceFetch:!n}))};if(t=p.context,n){var d=l.get(c)||new Map;l.set(c,d);var y=JSON.stringify(r);if(!(a=d.get(y))){d.set(y,a=x((0,u.execute)(f,p)));var v=function(){d.delete(y),d.size||l.delete(c),m.unsubscribe()},m=a.subscribe({next:v,error:v,complete:v})}}else a=x((0,u.execute)(f,p))}else a=h.of({data:{}}),t=this.prepareContext(t);var g=this.transform(e).clientQuery;return g&&(a=function(e,n){return new h((function(n){var i=n.next,o=n.error,a=n.complete,u=0,c=!1,l={next:function(e){++u,new Promise((function(n){var i;n((i=e,s.localState.runResolvers({document:g,remoteResult:i,context:t,variables:r})))})).then((function(e){--u,i&&i.call(n,e),c&&l.complete()}),(function(e){--u,o&&o.call(n,e)}))},error:function(e){o&&o.call(n,e)},complete:function(){c=!0,u||a&&a.call(n)}},f=e.subscribe(l);return function(){return f.unsubscribe()}}))}(a)),a},e.prototype.fetchRequest=function(e){var t,r,i=this,o=e.requestId,a=e.queryId,s=e.document,u=e.options,c=e.fetchMoreForQueryId,l=u.variables,f=u.errorPolicy,p=void 0===f?"none":f,h=u.fetchPolicy;return new Promise((function(e,f){var y=i.getObservableFromLink(s,u.context,l),v="fetchRequest:"+a;i.fetchQueryRejectFns.set(v,f);var g=function(){i.fetchQueryRejectFns.delete(v),i.setQuery(a,(function(e){e.subscriptions.delete(b)}))},b=y.map((function(e){if(o>=i.getQuery(a).lastRequestId&&(i.markQueryResult(a,e,u,c),i.queryStore.markQueryResult(a,e,c),i.invalidate(a),i.invalidate(c),i.broadcastQueries()),"none"===p&&d(e.errors))return f(new m({graphQLErrors:e.errors}));if("all"===p&&(r=e.errors),c||"no-cache"===h)t=e.data;else{var n=i.dataStore.getCache().diff({variables:l,query:s,optimistic:!1,returnPartialData:!0}),y=n.result;(n.complete||u.returnPartialData)&&(t=y)}})).subscribe({error:function(e){g(),f(e)},complete:function(){g(),e({data:t,errors:r,loading:!1,networkStatus:n.ready,stale:!1})}});i.setQuery(a,(function(e){e.subscriptions.add(b)}))}))},e.prototype.getQuery=function(e){return this.queries.get(e)||{listeners:new Set,invalidated:!1,document:null,newData:null,lastRequestId:1,observableQuery:null,subscriptions:new Set}},e.prototype.setQuery=function(e,t){var r=this.getQuery(e),n=(0,i.pi)((0,i.pi)({},r),t(r));this.queries.set(e,n)},e.prototype.invalidate=function(e,t){void 0===t&&(t=!0),e&&this.setQuery(e,(function(){return{invalidated:t}}))},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,i.pi)((0,i.pi)({},t),{clientAwareness:this.clientAwareness})},e.prototype.checkInFlight=function(e){var t=this.queryStore.get(e);return t&&t.networkStatus!==n.ready&&t.networkStatus!==n.error},e.prototype.startPollingQuery=function(e,t,r){var n=this,o=e.pollInterval;if((0,l.kG)(o,18),!this.ssrMode){var a=this.pollingInfoByQueryId.get(t);a||this.pollingInfoByQueryId.set(t,a={}),a.interval=o,a.options=(0,i.pi)((0,i.pi)({},e),{fetchPolicy:"network-only"});var s=function(){var e=n.pollingInfoByQueryId.get(t);e&&(n.checkInFlight(t)?u():n.fetchQuery(t,e.options,v.poll).then(u,u))},u=function(){var e=n.pollingInfoByQueryId.get(t);e&&(clearTimeout(e.timeout),e.timeout=setTimeout(s,e.interval))};r&&this.addQueryListener(t,r),u()}return t},e.prototype.stopPollingQuery=function(e){this.pollingInfoByQueryId.delete(e)},e}(),I=function(){function e(e){this.cache=e}return e.prototype.getCache=function(){return this.cache},e.prototype.markQueryResult=function(e,t,r,n,i){void 0===i&&(i=!1);var a=!(0,o.graphQLResultHasError)(e);i&&(0,o.graphQLResultHasError)(e)&&e.data&&(a=!0),!n&&a&&this.cache.write({result:e.data,dataId:"ROOT_QUERY",query:t,variables:r})},e.prototype.markSubscriptionResult=function(e,t,r){(0,o.graphQLResultHasError)(e)||this.cache.write({result:e.data,dataId:"ROOT_SUBSCRIPTION",query:t,variables:r})},e.prototype.markMutationInit=function(e){var t,r=this;e.optimisticResponse&&(t="function"==typeof e.optimisticResponse?e.optimisticResponse(e.variables):e.optimisticResponse,this.cache.recordOptimisticTransaction((function(n){var i=r.cache;r.cache=n;try{r.markMutationResult({mutationId:e.mutationId,result:{data:t},document:e.document,variables:e.variables,updateQueries:e.updateQueries,update:e.update})}finally{r.cache=i}}),e.mutationId))},e.prototype.markMutationResult=function(e){var t=this;if(!(0,o.graphQLResultHasError)(e.result)){var r=[{result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}],n=e.updateQueries;n&&Object.keys(n).forEach((function(i){var a=n[i],s=a.query,u=a.updater,c=t.cache.diff({query:s.document,variables:s.variables,returnPartialData:!0,optimistic:!1}),l=c.result;if(c.complete){var f=(0,o.tryFunctionOrLogError)((function(){return u(l,{mutationResult:e.result,queryName:(0,o.getOperationName)(s.document)||void 0,queryVariables:s.variables})}));f&&r.push({result:f,dataId:"ROOT_QUERY",query:s.document,variables:s.variables})}})),this.cache.performTransaction((function(t){r.forEach((function(e){return t.write(e)}));var n=e.update;n&&(0,o.tryFunctionOrLogError)((function(){return n(t,e.result)}))}))}},e.prototype.markMutationComplete=function(e){var t=e.mutationId;e.optimisticResponse&&this.cache.removeOptimistic(t)},e.prototype.markUpdateQueryResult=function(e,t,r){this.cache.write({result:r,dataId:"ROOT_QUERY",variables:t,query:e})},e.prototype.reset=function(){return this.cache.reset()},e}(),N=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.cache,n=e.ssrMode,i=void 0!==n&&n,o=e.ssrForceFetchDelay,a=void 0===o?0:o,s=e.connectToDevTools,c=e.queryDeduplication,f=void 0===c||c,p=e.defaultOptions,h=e.assumeImmutableResults,d=void 0!==h&&h,y=e.resolvers,v=e.typeDefs,m=e.fragmentMatcher,g=e.name,b=e.version,w=e.link;if(!w&&y&&(w=u.ApolloLink.empty()),!w||!r)throw new l.ej(4);this.link=w,this.cache=r,this.store=new I(r),this.disableNetworkFetches=i||a>0,this.queryDeduplication=f,this.defaultOptions=p||{},this.typeDefs=v,a&&setTimeout((function(){return t.disableNetworkFetches=!1}),a),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!==s&&s&&"undefined"!=typeof window&&(window.__APOLLO_CLIENT__=this),this.version="2.6.10",this.localState=new O({cache:r,client:this,resolvers:y,fragmentMatcher:m}),this.queryManager=new S({link:this.link,store:this.store,queryDeduplication:f,ssrMode:i,clientAwareness:{name:g,version:b},localState:this.localState,assumeImmutableResults:d,onBroadcast:function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.queryStore.getStore(),mutations:t.queryManager.mutationStore.getStore()},dataWithOptimisticResults:t.cache.extract(!0)})}})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=(0,i.pi)((0,i.pi)({},this.defaultOptions.watchQuery),e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,i.pi)((0,i.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=(0,i.pi)((0,i.pi)({},this.defaultOptions.query),e)),(0,l.kG)("cache-and-network"!==e.fetchPolicy,5),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,i.pi)((0,i.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=(0,i.pi)((0,i.pi)({},this.defaultOptions.mutate),e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeData=function(e){var t=this.cache.writeData(e);return this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return(0,u.execute)(this.link,e)},e.prototype.initQueryManager=function(){return this.queryManager},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e}();const C=N},2088:(e,t,r)=>{"use strict";r.r(t),r.d(t,{setContext:()=>a});var n=r(655),i=r(1803),o=r(9904);function a(e){return new i.ApolloLink((function(t,r){var i=(0,n._T)(t,[]);return new o.Z((function(n){var o;return Promise.resolve(i).then((function(r){return e(r,t.getContext())})).then(t.setContext).then((function(){o=r(t).subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)})})).catch(n.error.bind(n)),function(){o&&o.unsubscribe()}}))}))}},678:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HttpLink:()=>p,createHttpLink:()=>f});var n=r(655),i=r(1803),o=r(9904),a=r(3033),s=r(7591),u={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},c=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n},l=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=new s.ej(2);throw n.parseError=e,n}return r},f=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,f=e.fetch,p=e.includeExtensions,h=e.useGETForQueries,d=(0,n._T)(e,["uri","fetch","includeExtensions","useGETForQueries"]);!function(e){if(!e&&"undefined"==typeof fetch)throw new s.ej(1)}(f),f||(f=fetch);var y={http:{includeExtensions:p},options:d.fetchOptions,credentials:d.credentials,headers:d.headers};return new i.ApolloLink((function(e){var t=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")}(e,r),s=e.getContext(),p={};if(s.clientAwareness){var d=s.clientAwareness,v=d.name,m=d.version;v&&(p["apollographql-client-name"]=v),m&&(p["apollographql-client-version"]=m)}var g,b=(0,n.pi)({},p,s.headers),w={http:s.http,options:s.fetchOptions,credentials:s.credentials,headers:b},k=function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o=(0,n.pi)({},t.options,{headers:t.headers,credentials:t.credentials}),s=t.http;r.forEach((function(e){o=(0,n.pi)({},o,e.options,{headers:(0,n.pi)({},o.headers,e.headers)}),e.credentials&&(o.credentials=e.credentials),s=(0,n.pi)({},s,e.http)}));var u=e.operationName,c=e.extensions,l=e.variables,f=e.query,p={operationName:u,variables:l};return s.includeExtensions&&(p.extensions=c),s.includeQuery&&(p.query=(0,a.print)(f)),{options:o,body:p}}(e,u,y,w),_=k.options,E=k.body;if(!_.signal){var O=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}}(),x=O.controller,T=O.signal;(g=x)&&(_.signal=T)}if(h&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(_.method="GET"),"GET"===_.method){var S=function(e,t){var r=[],n=function(e,t){r.push(e+"="+encodeURIComponent(t))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=l(t.variables)}catch(e){return{parseError:e}}n("variables",i)}if(t.extensions){var o=void 0;try{o=l(t.extensions)}catch(e){return{parseError:e}}n("extensions",o)}var a="",s=e,u=e.indexOf("#");-1!==u&&(a=e.substr(u),s=e.substr(0,u));var c=-1===s.indexOf("?")?"?":"&";return{newURI:s+c+r.join("&")+a}}(t,E),I=S.newURI,N=S.parseError;if(N)return(0,i.fromError)(N);t=I}else try{_.body=l(E)}catch(N){return(0,i.fromError)(N)}return new o.Z((function(r){var n;return f(t,_).then((function(t){return e.setContext({response:t}),t})).then((n=e,function(e){return e.text().then((function(t){try{return JSON.parse(t)}catch(n){var r=n;return r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,Promise.reject(r)}})).then((function(t){return e.status>=300&&c(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||t.hasOwnProperty("data")||t.hasOwnProperty("errors")||c(e,t,"Server response was missing for query '"+(Array.isArray(n)?n.map((function(e){return e.operationName})):n.operationName)+"'."),t}))})).then((function(e){return r.next(e),r.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&r.next(e.result),r.error(e))})),function(){g&&g.abort()}}))}))},p=function(e){function t(t){return e.call(this,f(t).request)||this}return(0,n.ZT)(t,e),t}(i.ApolloLink)},6260:(e,t,r)=>{"use strict";r.r(t),r.d(t,{WebSocketLink:()=>a});var n=r(655),i=r(1803),o=r(5313),a=function(e){function t(t){var r=e.call(this)||this;return t instanceof o.SubscriptionClient?r.subscriptionClient=t:r.subscriptionClient=new o.SubscriptionClient(t.uri,t.options,t.webSocketImpl),r}return(0,n.ZT)(t,e),t.prototype.request=function(e){return this.subscriptionClient.request(e)},t}(i.ApolloLink)},1803:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Observable:()=>i.Z,getOperationName:()=>s.getOperationName,ApolloLink:()=>w,concat:()=>b,createOperation:()=>h,empty:()=>v,execute:()=>k,from:()=>m,fromError:()=>p,fromPromise:()=>f,makePromise:()=>l,split:()=>g,toPromise:()=>c});var n,i=r(9904),o=r(7591),a=r(655),s=r(1045);function u(e){return e.request.length<=1}function c(e){var t=!1;return new Promise((function(r,n){e.subscribe({next:function(e){t||(t=!0,r(e))},error:n})}))}n=Error,(0,a.ZT)((function(e,t){var r=n.call(this,e)||this;return r.link=t,r}),n);var l=c;function f(e){return new i.Z((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}function p(e){return new i.Z((function(t){t.error(e)}))}function h(e,t){var r=(0,a.pi)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){r="function"==typeof e?(0,a.pi)({},r,e(r)):(0,a.pi)({},r,e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return(0,a.pi)({},r)}}),Object.defineProperty(t,"toKey",{enumerable:!1,value:function(){return function(e){var t=e.query,r=e.variables,n=e.operationName;return JSON.stringify([n,t,r])}(t)}}),t}function d(e,t){return t?t(e):i.Z.of()}function y(e){return"function"==typeof e?new w(e):e}function v(){return new w((function(){return i.Z.of()}))}function m(e){return 0===e.length?v():e.map(y).reduce((function(e,t){return e.concat(t)}))}function g(e,t,r){var n=y(t),o=y(r||new w(d));return u(n)&&u(o)?new w((function(t){return e(t)?n.request(t)||i.Z.of():o.request(t)||i.Z.of()})):new w((function(t,r){return e(t)?n.request(t,r)||i.Z.of():o.request(t,r)||i.Z.of()}))}var b=function(e,t){var r=y(e);if(u(r))return r;var n=y(t);return u(n)?new w((function(e){return r.request(e,(function(e){return n.request(e)||i.Z.of()}))||i.Z.of()})):new w((function(e,t){return r.request(e,(function(e){return n.request(e,t)||i.Z.of()}))||i.Z.of()}))},w=function(){function e(e){e&&(this.request=e)}return e.prototype.split=function(t,r,n){return this.concat(g(t,r,n||new e(d)))},e.prototype.concat=function(e){return b(this,e)},e.prototype.request=function(e,t){throw new o.ej(1)},e.empty=v,e.from=m,e.split=g,e.execute=k,e}();function k(e,t){return e.request(h(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?(0,s.getOperationName)(t.query):""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw new o.ej(2)}return e}(t))))||i.Z.of()}},1045:(e,t,r)=>{"use strict";r.r(t),r.d(t,{isEqual:()=>u.D,addTypenameToDocument:()=>$,argumentsObjectFromField:()=>y,assign:()=>A,buildQueryFromSelectionSet:()=>ae,canUseWeakMap:()=>ue,checkDocument:()=>M,cloneDeep:()=>le,createFragmentMap:()=>K,getDefaultValues:()=>U,getDirectiveInfoFromField:()=>O,getDirectiveNames:()=>T,getDirectivesFromDocument:()=>re,getEnv:()=>pe,getFragmentDefinition:()=>B,getFragmentDefinitions:()=>F,getFragmentQueryDocument:()=>R,getInclusionDirectives:()=>C,getMainDefinition:()=>Q,getMutationDefinition:()=>D,getOperationDefinition:()=>P,getOperationDefinitionOrDie:()=>j,getOperationName:()=>L,getQueryDefinition:()=>q,getStoreKeyName:()=>d,graphQLResultHasError:()=>ge,hasClientExports:()=>I,hasDirectives:()=>S,isDevelopment:()=>ye,isEnv:()=>he,isField:()=>m,isIdValue:()=>b,isInlineFragment:()=>g,isJsonValue:()=>k,isNumberValue:()=>l,isProduction:()=>de,isScalarValue:()=>c,isTest:()=>ve,maybeDeepFreeze:()=>we,mergeDeep:()=>_e,mergeDeepArray:()=>Ee,removeArgumentsFromDocument:()=>ne,removeClientSetsFromDocument:()=>se,removeConnectionDirectiveFromDocument:()=>Z,removeDirectivesFromDocument:()=>H,removeFragmentSpreadFromDocument:()=>ie,resultKeyNameFromField:()=>v,shouldInclude:()=>x,storeKeyNameFromField:()=>p,stripSymbols:()=>Ne,toIdValue:()=>w,tryFunctionOrLogError:()=>me,valueFromNode:()=>E,valueToObjectRepresentation:()=>f,variablesInOperation:()=>V,warnOnceInDevelopment:()=>Ie});var n=r(285),i=r(7591),o=r(655),a=r(5035),s=r.n(a),u=r(2152);function c(e){return["StringValue","BooleanValue","EnumValue"].indexOf(e.kind)>-1}function l(e){return["IntValue","FloatValue"].indexOf(e.kind)>-1}function f(e,t,r,n){if(function(e){return"IntValue"===e.kind}(r)||function(e){return"FloatValue"===e.kind}(r))e[t.value]=Number(r.value);else if(function(e){return"BooleanValue"===e.kind}(r)||function(e){return"StringValue"===e.kind}(r))e[t.value]=r.value;else if(function(e){return"ObjectValue"===e.kind}(r)){var o={};r.fields.map((function(e){return f(o,e.name,e.value,n)})),e[t.value]=o}else if(function(e){return"Variable"===e.kind}(r)){var a=(n||{})[r.name.value];e[t.value]=a}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return f(r,t,e,n),r[t.value]}));else if(function(e){return"EnumValue"===e.kind}(r))e[t.value]=r.value;else{if(!function(e){return"NullValue"===e.kind}(r))throw new i.ej(17);e[t.value]=null}}function p(e,t){var r=null;e.directives&&(r={},e.directives.forEach((function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach((function(n){var i=n.name,o=n.value;return f(r[e.name.value],i,o,t)}))})));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach((function(e){var r=e.name,i=e.value;return f(n,r,i,t)}))),d(e.name.value,n,r)}var h=["connection","include","skip","client","rest","export"];function d(e,t,r){if(r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i=t,o={};return n.forEach((function(e){o[e]=i[e]})),r.connection.key+"("+JSON.stringify(o)+")"}return r.connection.key}var a=e;if(t){var u=s()(t);a+="("+u+")"}return r&&Object.keys(r).forEach((function(e){-1===h.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?a+="@"+e+"("+JSON.stringify(r[e])+")":a+="@"+e)})),a}function y(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach((function(e){var n=e.name,i=e.value;return f(r,n,i,t)})),r}return null}function v(e){return e.alias?e.alias.value:e.name.value}function m(e){return"Field"===e.kind}function g(e){return"InlineFragment"===e.kind}function b(e){return e&&"id"===e.type&&"boolean"==typeof e.generated}function w(e,t){return void 0===t&&(t=!1),(0,o.pi)({type:"id",generated:t},"string"==typeof e?{id:e,typename:void 0}:e)}function k(e){return null!=e&&"object"==typeof e&&"json"===e.type}function _(e){throw new i.ej(18)}function E(e,t){switch(void 0===t&&(t=_),e.kind){case"Variable":return t(e);case"NullValue":return null;case"IntValue":return parseInt(e.value,10);case"FloatValue":return parseFloat(e.value);case"ListValue":return e.values.map((function(e){return E(e,t)}));case"ObjectValue":for(var r={},n=0,i=e.fields;n<i.length;n++){var o=i[n];r[o.name.value]=E(o.value,t)}return r;default:return e.value}}function O(e,t){if(e.directives&&e.directives.length){var r={};return e.directives.forEach((function(e){r[e.name.value]=y(e,t)})),r}return null}function x(e,t){return void 0===t&&(t={}),C(e.directives).every((function(e){var r=e.directive,n=e.ifArgument,o=!1;return"Variable"===n.value.kind?(o=t[n.value.name.value],(0,i.kG)(void 0!==o,13)):o=n.value.value,"skip"===r.name.value?!o:o}))}function T(e){var t=[];return(0,n.visit)(e,{Directive:function(e){t.push(e.name.value)}}),t}function S(e,t){return T(t).some((function(t){return e.indexOf(t)>-1}))}function I(e){return e&&S(["client"],e)&&S(["export"],e)}function N(e){var t=e.name.value;return"skip"===t||"include"===t}function C(e){return e?e.filter(N).map((function(e){var t=e.arguments;e.name.value,(0,i.kG)(t&&1===t.length,14);var r=t[0];(0,i.kG)(r.name&&"if"===r.name.value,15);var n=r.value;return(0,i.kG)(n&&("Variable"===n.kind||"BooleanValue"===n.kind),16),{directive:e,ifArgument:r}})):[]}function R(e,t){var r=t,n=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw new i.ej(11);"FragmentDefinition"===e.kind&&n.push(e)})),void 0===r&&((0,i.kG)(1===n.length,12),r=n[0].name.value),(0,o.pi)((0,o.pi)({},e),{definitions:(0,o.pr)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions)})}function A(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.forEach((function(t){null!=t&&Object.keys(t).forEach((function(r){e[r]=t[r]}))})),e}function D(e){M(e);var t=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))[0];return(0,i.kG)(t,1),t}function M(e){(0,i.kG)(e&&"Document"===e.kind,2);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw new i.ej(3);return e}));return(0,i.kG)(t.length<=1,4),e}function P(e){return M(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function j(e){var t=P(e);return(0,i.kG)(t,5),t}function L(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function F(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function q(e){var t=P(e);return(0,i.kG)(t&&"query"===t.operation,6),t}function B(e){(0,i.kG)("Document"===e.kind,7),(0,i.kG)(e.definitions.length<=1,8);var t=e.definitions[0];return(0,i.kG)("FragmentDefinition"===t.kind,9),t}function Q(e){var t;M(e);for(var r=0,n=e.definitions;r<n.length;r++){var o=n[r];if("OperationDefinition"===o.kind){var a=o.operation;if("query"===a||"mutation"===a||"subscription"===a)return o}"FragmentDefinition"!==o.kind||t||(t=o)}if(t)return t;throw new i.ej(10)}function K(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function U(e){if(e&&e.variableDefinitions&&e.variableDefinitions.length){var t=e.variableDefinitions.filter((function(e){return e.defaultValue})).map((function(e){var t=e.variable,r=e.defaultValue,n={};return f(n,t.name,r),n}));return A.apply(void 0,(0,o.pr)([{}],t))}return{}}function V(e){var t=new Set;if(e.variableDefinitions)for(var r=0,n=e.variableDefinitions;r<n.length;r++){var i=n[r];t.add(i.variable.name.value)}return t}function G(e,t,r){var n=0;return e.forEach((function(r,i){t.call(this,r,i,e)&&(e[n++]=r)}),r),e.length=n,e}var W={kind:"Field",name:{kind:"Name",value:"__typename"}};function J(e,t){return e.selectionSet.selections.every((function(e){return"FragmentSpread"===e.kind&&J(t[e.name.value],t)}))}function z(e){return J(P(e)||B(e),K(F(e)))?null:e}function Y(e){return function(t){return e.some((function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)}))}}function H(e,t){var r=Object.create(null),i=[],o=Object.create(null),a=[],s=z((0,n.visit)(t,{Variable:{enter:function(e,t,n){"VariableDefinition"!==n.kind&&(r[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&e.some((function(e){return e.remove}))&&t.directives&&t.directives.some(Y(e)))return t.arguments&&t.arguments.forEach((function(e){"Variable"===e.value.kind&&i.push({name:e.value.name.value})})),t.selectionSet&&oe(t.selectionSet).forEach((function(e){a.push({name:e.name.value})})),null}},FragmentSpread:{enter:function(e){o[e.name.value]=!0}},Directive:{enter:function(t){if(Y(e)(t))return null}}}));return s&&G(i,(function(e){return!r[e.name]})).length&&(s=ne(i,s)),s&&G(a,(function(e){return!o[e.name]})).length&&(s=ie(a,s)),s}function $(e){return(0,n.visit)(M(e),{SelectionSet:{enter:function(e,t,r){if(!r||"OperationDefinition"!==r.kind){var n=e.selections;if(n&&!n.some((function(e){return m(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var i=r;if(!(m(i)&&i.directives&&i.directives.some((function(e){return"export"===e.name.value}))))return(0,o.pi)((0,o.pi)({},e),{selections:(0,o.pr)(n,[W])})}}}}})}var X={test:function(e){var t="connection"===e.name.value;return t&&(!e.arguments||e.arguments.some((function(e){return"key"===e.name.value}))),t}};function Z(e){return H([X],M(e))}function ee(e,t,r){return void 0===r&&(r=!0),t&&t.selections&&t.selections.some((function(t){return te(e,t,r)}))}function te(e,t,r){return void 0===r&&(r=!0),!m(t)||!!t.directives&&(t.directives.some(Y(e))||r&&ee(e,t.selectionSet,r))}function re(e,t){var r;return M(t),z((0,n.visit)(t,{SelectionSet:{enter:function(t,n,i,a){var s=a.join("-");if(!r||s===r||!s.startsWith(r)){if(t.selections){var u=t.selections.filter((function(t){return te(e,t)}));return ee(e,t,!1)&&(r=s),(0,o.pi)((0,o.pi)({},t),{selections:u})}return null}}}}))}function ne(e,t){var r=function(e){return function(t){return e.some((function(e){return t.value&&"Variable"===t.value.kind&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))}))}}(e);return z((0,n.visit)(t,{OperationDefinition:{enter:function(t){return(0,o.pi)((0,o.pi)({},t),{variableDefinitions:t.variableDefinitions.filter((function(t){return!e.some((function(e){return e.name===t.variable.name.value}))}))})}},Field:{enter:function(t){if(e.some((function(e){return e.remove}))){var n=0;if(t.arguments.forEach((function(e){r(e)&&(n+=1)})),1===n)return null}}},Argument:{enter:function(e){if(r(e))return null}}}))}function ie(e,t){function r(t){if(e.some((function(e){return e.name===t.name.value})))return null}return z((0,n.visit)(t,{FragmentSpread:{enter:r},FragmentDefinition:{enter:r}}))}function oe(e){var t=[];return e.selections.forEach((function(e){(m(e)||g(e))&&e.selectionSet?oe(e.selectionSet).forEach((function(e){return t.push(e)})):"FragmentSpread"===e.kind&&t.push(e)})),t}function ae(e){return"query"===Q(e).operation?e:(0,n.visit)(e,{OperationDefinition:{enter:function(e){return(0,o.pi)((0,o.pi)({},e),{operation:"query"})}}})}function se(e){M(e);var t=H([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=(0,n.visit)(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return m(e)&&"__typename"===e.name.value})))return null}}})),t}var ue="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),ce=Object.prototype.toString;function le(e){return fe(e,new Map)}function fe(e,t){switch(ce.call(e)){case"[object Array]":if(t.has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach((function(e,n){r[n]=fe(e,t)})),r;case"[object Object]":if(t.has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach((function(r){n[r]=fe(e[r],t)})),n;default:return e}}function pe(){return"undefined"!=typeof process?"production":"development"}function he(e){return pe()===e}function de(){return!0===he("production")}function ye(){return!0===he("development")}function ve(){return!0===he("test")}function me(e){try{return e()}catch(e){console.error&&console.error(e)}}function ge(e){return e.errors&&e.errors.length}function be(e){return Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){null===e[t]||"object"!=typeof e[t]&&"function"!=typeof e[t]||Object.isFrozen(e[t])||be(e[t])})),e}function we(e){return!ye()&&!ve()||"function"==typeof Symbol&&"string"==typeof Symbol("")?e:be(e)}var ke=Object.prototype.hasOwnProperty;function _e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ee(e)}function Ee(e){var t=e[0]||{},r=e.length;if(r>1){var n=[];t=Te(t,n);for(var i=1;i<r;++i)t=xe(t,e[i],n)}return t}function Oe(e){return null!==e&&"object"==typeof e}function xe(e,t,r){return Oe(t)&&Oe(e)?(Object.isExtensible&&!Object.isExtensible(e)&&(e=Te(e,r)),Object.keys(t).forEach((function(n){var i=t[n];if(ke.call(e,n)){var o=e[n];i!==o&&(e[n]=xe(Te(o,r),i,r))}else e[n]=i})),e):t}function Te(e,t){return null!==e&&"object"==typeof e&&t.indexOf(e)<0&&(e=Array.isArray(e)?e.slice(0):(0,o.pi)({__proto__:Object.getPrototypeOf(e)},e),t.push(e)),e}var Se=Object.create({});function Ie(e,t){void 0===t&&(t="warn"),de()||Se[e]||(ve()||(Se[e]=!0),"error"===t?console.error(e):console.warn(e))}function Ne(e){return JSON.parse(JSON.stringify(e))}},3010:e=>{function t(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=t,t.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-r:e+r}return 0|Math.min(e,this.max)},t.prototype.reset=function(){this.attempts=0},t.prototype.setMin=function(e){this.ms=e},t.prototype.setMax=function(e){this.max=e},t.prototype.setJitter=function(e){this.jitter=e}},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=u(e),a=o[0],s=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),l=0,f=s>0?a-4:a;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;s<u;s+=a)o.push(c(e,s,s+a>u?u:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(e,t,r)=>{"use strict";const n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|d(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||H(e.length)?s(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),s(e<0?0:0|d(e))}function p(e){const t=e.length<0?0:0|d(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function d(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(e).length;default:if(i)return n?-1:W(e).length;t=(""+t).toLowerCase(),i=!0}}function v(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),H(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(e,o+n)!==c(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(H(n))return a;e[r+a]=n}return a}function k(e,t,r,n){return z(W(t,e.length-r),e,r,n)}function _(e,t,r,n){return z(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return z(J(t),e,r,n)}function O(e,t,r,n){return z(function(e,t){let r,n,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=S));return r}(n)}t.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(Y(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):v.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(Y(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<s;++e)if(c[e]!==l[e]){o=c[e],a=l[e];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return k(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function N(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function C(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=$[e[n]];return i}function R(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function A(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function M(e,t,r,n,i){K(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function P(e,t,r,n,i){K(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function j(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=X((function(e){U(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=X((function(e){U(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||A(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||A(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=X((function(e){U(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=X((function(e){U(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||A(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||A(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||A(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||A(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=X((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=X((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);D(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);D(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=X((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=X((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};const q={};function B(e,t,r){q[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function Q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function K(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new q.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){U(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||V(t,e.length-(r+1))}(n,i,o)}function U(e,t){if("number"!=typeof e)throw new q.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,r){if(Math.floor(e)!==e)throw U(e,r),new q.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new q.ERR_BUFFER_OUT_OF_BOUNDS;throw new q.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),B("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Q(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function W(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function J(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function H(e){return e!=e}const $=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},6729:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||e,a),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i<o;i++)a[i]=n[i].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,i,o,a){var s=r?r+e:e;if(!this._events[s])return!1;var u,c,l=this._events[s],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,i),!0;case 5:return l.fn.call(l.context,t,n,i,o),!0;case 6:return l.fn.call(l.context,t,n,i,o,a),!0}for(c=1,u=new Array(f-1);c<f;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var p,h=l.length;for(c=0;c<h;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,n);break;case 4:l[c].fn.call(l[c].context,t,n,i);break;default:if(!u)for(p=1,u=new Array(f-1);p<f;p++)u[p-1]=arguments[p];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||n&&s.context!==n||a(this,o);else{for(var u=0,c=[],l=s.length;u<l;u++)(s[u].fn!==t||i&&!s[u].once||n&&s[u].context!==n)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s},5035:e=>{"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,n="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(r=t.cmp,function(e){return function(t,n){var i={key:t,value:e[t]},o={key:n,value:e[n]};return r(i,o)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var r,a;if(Array.isArray(t)){for(a="[",r=0;r<t.length;r++)r&&(a+=","),a+=e(t[r])||"null";return a+"]"}if(null===t)return"null";if(-1!==o.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=o.push(t)-1,u=Object.keys(t).sort(i&&i(t));for(a="",r=0;r<u.length;r++){var c=u[r],l=e(t[c]);l&&(a&&(a+=","),a+=JSON.stringify(c)+":"+l)}return o.splice(s,1),"{"+a+"}"}}(e)}},4119:(e,t,r)=>{var n=r(8370).parse;function i(e){return e.replace(/[\s,]+/g," ").trim()}var o={},a={},s=!0;function u(e,t){var r=Object.prototype.toString.call(e);if("[object Array]"===r)return e.map((function(e){return u(e,t)}));if("[object Object]"!==r)throw new Error("Unexpected input.");t&&e.loc&&delete e.loc,e.loc&&(delete e.loc.startToken,delete e.loc.endToken);var n,i,o,a=Object.keys(e);for(n in a)a.hasOwnProperty(n)&&(i=e[a[n]],"[object Object]"!==(o=Object.prototype.toString.call(i))&&"[object Array]"!==o||(e[a[n]]=u(i,!0)));return e}var c=!1;function l(e){var t=i(e);if(o[t])return o[t];var r=n(e,{experimentalFragmentVariables:c});if(!r||"Document"!==r.kind)throw new Error("Not a valid GraphQL document.");return r=u(r=function(e){for(var t,r={},n=[],o=0;o<e.definitions.length;o++){var u=e.definitions[o];if("FragmentDefinition"===u.kind){var c=u.name.value,l=i((t=u.loc).source.body.substring(t.start,t.end));a.hasOwnProperty(c)&&!a[c][l]?(s&&console.warn("Warning: fragment with name "+c+" 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"),a[c][l]=!0):a.hasOwnProperty(c)||(a[c]={},a[c][l]=!0),r[l]||(r[l]=!0,n.push(u))}else n.push(u)}return e.definitions=n,e}(r),!1),o[t]=r,r}function f(){for(var e=Array.prototype.slice.call(arguments),t=e[0],r="string"==typeof t?t:t[0],n=1;n<e.length;n++)e[n]&&e[n].kind&&"Document"===e[n].kind?r+=e[n].loc.source.body:r+=e[n],r+=t[n];return l(r)}f.default=f,f.resetCaches=function(){o={},a={}},f.disableFragmentWarnings=function(){s=!1},f.enableExperimentalFragmentVariables=function(){c=!0},f.disableExperimentalFragmentVariables=function(){c=!1},e.exports=f},5822:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printError=g,t.GraphQLError=void 0;var n,i=(n=r(5690))&&n.__esModule?n:{default:n},o=r(3098),a=r(9016),s=r(8038);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){var t="function"==typeof Map?new Map:void 0;return(p=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return h(e,arguments,v(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),y(n,e)})(e)}function h(e,t,r){return(h=d()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&y(i,r.prototype),i}).apply(null,arguments)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(p,e);var t,r,n,s,u=(t=p,r=d(),function(){var e,n=v(t);if(r){var i=v(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return l(this,e)});function p(e,t,r,n,o,s,c){var h,d,y,v,m;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),m=u.call(this,e);var g,b=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,w=r;!w&&b&&(w=null===(g=b[0].loc)||void 0===g?void 0:g.source);var k,_=n;!_&&b&&(_=b.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),_&&0===_.length&&(_=void 0),n&&r?k=n.map((function(e){return(0,a.getLocation)(r,e)})):b&&(k=b.reduce((function(e,t){return t.loc&&e.push((0,a.getLocation)(t.loc.source,t.loc.start)),e}),[]));var E=c;if(null==E&&null!=s){var O=s.extensions;(0,i.default)(O)&&(E=O)}return Object.defineProperties(f(m),{name:{value:"GraphQLError"},message:{value:e,enumerable:!0,writable:!0},locations:{value:null!==(h=k)&&void 0!==h?h:void 0,enumerable:null!=k},path:{value:null!=o?o:void 0,enumerable:null!=o},nodes:{value:null!=b?b:void 0},source:{value:null!==(d=w)&&void 0!==d?d:void 0},positions:{value:null!==(y=_)&&void 0!==y?y:void 0},originalError:{value:s},extensions:{value:null!==(v=E)&&void 0!==v?v:void 0,enumerable:null!=E}}),(null==s?void 0:s.stack)?(Object.defineProperty(f(m),"stack",{value:s.stack,writable:!0,configurable:!0}),l(m)):(Error.captureStackTrace?Error.captureStackTrace(f(m),p):Object.defineProperty(f(m),"stack",{value:Error().stack,writable:!0,configurable:!0}),m)}return n=p,(s=[{key:"toString",value:function(){return g(this)}},{key:o.SYMBOL_TO_STRING_TAG,get:function(){return"Object"}}])&&c(n.prototype,s),p}(p(Error));function g(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r<n.length;r++){var i=n[r];i.loc&&(t+="\n\n"+(0,s.printLocation)(i.loc))}else if(e.source&&e.locations)for(var o=0,a=e.locations;o<a.length;o++){var u=a[o];t+="\n\n"+(0,s.printSourceLocation)(e.source,u)}return t}t.GraphQLError=m},338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.syntaxError=function(e,t,r){return new n.GraphQLError("Syntax Error: ".concat(r),void 0,e,[t])};var n=r(5822)},972:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prototype.toJSON;"function"==typeof t||(0,n.default)(0),e.prototype.inspect=t,i.default&&(e.prototype[i.default]=t)};var n=o(r(7706)),i=o(r(8554));function o(e){return e&&e.__esModule?e:{default:e}}},7242:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(t)}},8002:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a(e,[])};var n,i=(n=r(8554))&&n.__esModule?n:{default:n};function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){switch(o(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var r=[].concat(t,[e]),n=function(e){var t=e[String(i.default)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==n){var o=n.call(e);if(o!==e)return"string"==typeof o?o:a(o,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var r=Math.min(10,e.length),n=e.length-r,i=[],o=0;o<r;++o)i.push(a(e[o],t));return 1===n?i.push("... 1 more item"):n>1&&i.push("... ".concat(n," more items")),"["+i.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);return 0===r.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]":"{ "+r.map((function(r){return r+": "+a(e[r],t)})).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}},7706:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}},5690:(e,t)=>{"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"object"==r(e)&&null!==e}},8554:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=r},1807:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=function(e){return null!=e&&"string"==typeof e.kind},t.Token=t.Location=void 0;var n,i=(n=r(972))&&n.__esModule?n:{default:n},o=function(){function e(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();t.Location=o,(0,i.default)(o);var a=function(){function e(e,t,r,n,i,o,a){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=a,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();t.Token=a,(0,i.default)(a)},849:(e,t)=>{"use strict";function r(e){for(var t=null,r=1;r<e.length;r++){var i=e[r],o=n(i);if(o!==i.length&&(null===t||o<t)&&0===(t=o))break}return null===t?0:t}function n(e){for(var t=0;t<e.length&&(" "===e[t]||"\t"===e[t]);)t++;return t}function i(e){return n(e)===e.length}Object.defineProperty(t,"__esModule",{value:!0}),t.dedentBlockStringValue=function(e){var t=e.split(/\r\n|[\n\r]/g),n=r(t);if(0!==n)for(var o=1;o<t.length;o++)t[o]=t[o].slice(n);for(;t.length>0&&i(t[0]);)t.shift();for(;t.length>0&&i(t[t.length-1]);)t.pop();return t.join("\n")},t.getBlockStringIndentation=r,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a="\\"===e[e.length-1],s=!n||o||a||r,u="";return!s||n&&i||(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,s&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}},8333:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveLocation=void 0;var r=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"});t.DirectiveLocation=r},2828:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Kind=void 0;var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});t.Kind=r},4274:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPunctuatorTokenKind=function(e){return e===o.TokenKind.BANG||e===o.TokenKind.DOLLAR||e===o.TokenKind.AMP||e===o.TokenKind.PAREN_L||e===o.TokenKind.PAREN_R||e===o.TokenKind.SPREAD||e===o.TokenKind.COLON||e===o.TokenKind.EQUALS||e===o.TokenKind.AT||e===o.TokenKind.BRACKET_L||e===o.TokenKind.BRACKET_R||e===o.TokenKind.BRACE_L||e===o.TokenKind.PIPE||e===o.TokenKind.BRACE_R},t.Lexer=void 0;var n=r(338),i=r(1807),o=r(3175),a=r(849),s=function(){function e(e){var t=new i.Token(o.TokenKind.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==o.TokenKind.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=c(this,e)}while(e.kind===o.TokenKind.COMMENT);return e},e}();function u(e){return isNaN(e)?o.TokenKind.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function c(e,t){var r=e.source,s=r.body,c=s.length,p=function(e,t,r){for(var n=e.length,i=t;i<n;){var o=e.charCodeAt(i);if(9===o||32===o||44===o||65279===o)++i;else if(10===o)++i,++r.line,r.lineStart=i;else{if(13!==o)break;10===e.charCodeAt(i+1)?i+=2:++i,++r.line,r.lineStart=i}}return i}(s,t.end,e),h=e.line,d=1+p-e.lineStart;if(p>=c)return new i.Token(o.TokenKind.EOF,c,c,h,d,t);var y=s.charCodeAt(p);switch(y){case 33:return new i.Token(o.TokenKind.BANG,p,p+1,h,d,t);case 35:return function(e,t,r,n,a){var s,u=e.body,c=t;do{s=u.charCodeAt(++c)}while(!isNaN(s)&&(s>31||9===s));return new i.Token(o.TokenKind.COMMENT,t,c,r,n,a,u.slice(t+1,c))}(r,p,h,d,t);case 36:return new i.Token(o.TokenKind.DOLLAR,p,p+1,h,d,t);case 38:return new i.Token(o.TokenKind.AMP,p,p+1,h,d,t);case 40:return new i.Token(o.TokenKind.PAREN_L,p,p+1,h,d,t);case 41:return new i.Token(o.TokenKind.PAREN_R,p,p+1,h,d,t);case 46:if(46===s.charCodeAt(p+1)&&46===s.charCodeAt(p+2))return new i.Token(o.TokenKind.SPREAD,p,p+3,h,d,t);break;case 58:return new i.Token(o.TokenKind.COLON,p,p+1,h,d,t);case 61:return new i.Token(o.TokenKind.EQUALS,p,p+1,h,d,t);case 64:return new i.Token(o.TokenKind.AT,p,p+1,h,d,t);case 91:return new i.Token(o.TokenKind.BRACKET_L,p,p+1,h,d,t);case 93:return new i.Token(o.TokenKind.BRACKET_R,p,p+1,h,d,t);case 123:return new i.Token(o.TokenKind.BRACE_L,p,p+1,h,d,t);case 124:return new i.Token(o.TokenKind.PIPE,p,p+1,h,d,t);case 125:return new i.Token(o.TokenKind.BRACE_R,p,p+1,h,d,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return function(e,t,r,n,a){for(var s=e.body,u=s.length,c=t+1,l=0;c!==u&&!isNaN(l=s.charCodeAt(c))&&(95===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++c;return new i.Token(o.TokenKind.NAME,t,c,r,n,a,s.slice(t,c))}(r,p,h,d,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(e,t,r,a,s,c){var f=e.body,p=r,h=t,d=!1;if(45===p&&(p=f.charCodeAt(++h)),48===p){if((p=f.charCodeAt(++h))>=48&&p<=57)throw(0,n.syntaxError)(e,h,"Invalid number, unexpected digit after 0: ".concat(u(p),"."))}else h=l(e,h,p),p=f.charCodeAt(h);if(46===p&&(d=!0,p=f.charCodeAt(++h),h=l(e,h,p),p=f.charCodeAt(h)),69!==p&&101!==p||(d=!0,43!==(p=f.charCodeAt(++h))&&45!==p||(p=f.charCodeAt(++h)),h=l(e,h,p),p=f.charCodeAt(h)),46===p||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(p))throw(0,n.syntaxError)(e,h,"Invalid number, expected digit but got: ".concat(u(p),"."));return new i.Token(d?o.TokenKind.FLOAT:o.TokenKind.INT,t,h,a,s,c,f.slice(t,h))}(r,p,y,h,d,t);case 34:return 34===s.charCodeAt(p+1)&&34===s.charCodeAt(p+2)?function(e,t,r,s,c,l){for(var f=e.body,p=t+3,h=p,d=0,y="";p<f.length&&!isNaN(d=f.charCodeAt(p));){if(34===d&&34===f.charCodeAt(p+1)&&34===f.charCodeAt(p+2))return y+=f.slice(h,p),new i.Token(o.TokenKind.BLOCK_STRING,t,p+3,r,s,c,(0,a.dedentBlockStringValue)(y));if(d<32&&9!==d&&10!==d&&13!==d)throw(0,n.syntaxError)(e,p,"Invalid character within String: ".concat(u(d),"."));10===d?(++p,++l.line,l.lineStart=p):13===d?(10===f.charCodeAt(p+1)?p+=2:++p,++l.line,l.lineStart=p):92===d&&34===f.charCodeAt(p+1)&&34===f.charCodeAt(p+2)&&34===f.charCodeAt(p+3)?(y+=f.slice(h,p)+'"""',h=p+=4):++p}throw(0,n.syntaxError)(e,p,"Unterminated string.")}(r,p,h,d,t,e):function(e,t,r,a,s){for(var c,l,p,h,d=e.body,y=t+1,v=y,m=0,g="";y<d.length&&!isNaN(m=d.charCodeAt(y))&&10!==m&&13!==m;){if(34===m)return g+=d.slice(v,y),new i.Token(o.TokenKind.STRING,t,y+1,r,a,s,g);if(m<32&&9!==m)throw(0,n.syntaxError)(e,y,"Invalid character within String: ".concat(u(m),"."));if(++y,92===m){switch(g+=d.slice(v,y-1),m=d.charCodeAt(y)){case 34:g+='"';break;case 47:g+="/";break;case 92:g+="\\";break;case 98:g+="\b";break;case 102:g+="\f";break;case 110:g+="\n";break;case 114:g+="\r";break;case 116:g+="\t";break;case 117:var b=(c=d.charCodeAt(y+1),l=d.charCodeAt(y+2),p=d.charCodeAt(y+3),h=d.charCodeAt(y+4),f(c)<<12|f(l)<<8|f(p)<<4|f(h));if(b<0){var w=d.slice(y+1,y+5);throw(0,n.syntaxError)(e,y,"Invalid character escape sequence: \\u".concat(w,"."))}g+=String.fromCharCode(b),y+=4;break;default:throw(0,n.syntaxError)(e,y,"Invalid character escape sequence: \\".concat(String.fromCharCode(m),"."))}v=++y}}throw(0,n.syntaxError)(e,y,"Unterminated string.")}(r,p,h,d,t)}throw(0,n.syntaxError)(r,p,function(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(u(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(u(e),".")}(y))}function l(e,t,r){var i=e.body,o=t,a=r;if(a>=48&&a<=57){do{a=i.charCodeAt(++o)}while(a>=48&&a<=57);return o}throw(0,n.syntaxError)(e,o,"Invalid number, expected digit but got: ".concat(u(a),"."))}function f(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}t.Lexer=s},9016:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLocation=function(e,t){for(var r,n=/\r\n|[\n\r]/g,i=1,o=t+1;(r=n.exec(e.body))&&r.index<t;)i+=1,o=t+1-(r.index+r[0].length);return{line:i,column:o}}},8370:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e,t){return new h(e,t).parseDocument()},t.parseValue=function(e,t){var r=new h(e,t);r.expectToken(c.TokenKind.SOF);var n=r.parseValueLiteral(!1);return r.expectToken(c.TokenKind.EOF),n},t.parseType=function(e,t){var r=new h(e,t);r.expectToken(c.TokenKind.SOF);var n=r.parseTypeReference();return r.expectToken(c.TokenKind.EOF),n};var n=p(r(8002)),i=p(r(7242)),o=r(338),a=r(2828),s=r(1807),u=r(2412),c=r(3175),l=r(8333),f=r(4274);function p(e){return e&&e.__esModule?e:{default:e}}var h=function(){function e(e,t){var r="string"==typeof e?new u.Source(e):e;r instanceof u.Source||(0,i.default)(0,"Must provide Source. Received: ".concat((0,n.default)(r),".")),this._lexer=new f.Lexer(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(c.TokenKind.NAME);return{kind:a.Kind.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:a.Kind.DOCUMENT,definitions:this.many(c.TokenKind.SOF,this.parseDefinition,c.TokenKind.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(c.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(c.TokenKind.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(c.TokenKind.BRACE_L))return{kind:a.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(c.TokenKind.NAME)&&(t=this.parseName()),{kind:a.Kind.OPERATION_DEFINITION,operation:r,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(c.TokenKind.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(c.TokenKind.PAREN_L,this.parseVariableDefinition,c.TokenKind.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:a.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(c.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(c.TokenKind.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(c.TokenKind.DOLLAR),{kind:a.Kind.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:a.Kind.SELECTION_SET,selections:this.many(c.TokenKind.BRACE_L,this.parseSelection,c.TokenKind.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(c.TokenKind.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(c.TokenKind.COLON)?(e=n,t=this.parseName()):t=n,{kind:a.Kind.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(c.TokenKind.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(c.TokenKind.PAREN_L,t,c.TokenKind.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(c.TokenKind.COLON),{kind:a.Kind.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:a.Kind.ARGUMENT,name:this.parseName(),value:(this.expectToken(c.TokenKind.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(c.TokenKind.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(c.TokenKind.NAME)?{kind:a.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:a.Kind.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:a.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:a.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case c.TokenKind.BRACKET_L:return this.parseList(e);case c.TokenKind.BRACE_L:return this.parseObject(e);case c.TokenKind.INT:return this._lexer.advance(),{kind:a.Kind.INT,value:t.value,loc:this.loc(t)};case c.TokenKind.FLOAT:return this._lexer.advance(),{kind:a.Kind.FLOAT,value:t.value,loc:this.loc(t)};case c.TokenKind.STRING:case c.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case c.TokenKind.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:a.Kind.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:a.Kind.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:a.Kind.NULL,loc:this.loc(t)};default:return{kind:a.Kind.ENUM,value:t.value,loc:this.loc(t)}}case c.TokenKind.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:a.Kind.STRING,value:e.value,block:e.kind===c.TokenKind.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:a.Kind.LIST,values:this.any(c.TokenKind.BRACKET_L,(function(){return t.parseValueLiteral(e)}),c.TokenKind.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:a.Kind.OBJECT,fields:this.any(c.TokenKind.BRACE_L,(function(){return t.parseObjectField(e)}),c.TokenKind.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(c.TokenKind.COLON),{kind:a.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(c.TokenKind.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(c.TokenKind.AT),{kind:a.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(c.TokenKind.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(c.TokenKind.BRACKET_R),e={kind:a.Kind.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(c.TokenKind.BANG)?{kind:a.Kind.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:a.Kind.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===c.TokenKind.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(c.TokenKind.STRING)||this.peek(c.TokenKind.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var r=this.parseDirectives(!0),n=this.many(c.TokenKind.BRACE_L,this.parseOperationTypeDefinition,c.TokenKind.BRACE_R);return{kind:a.Kind.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(c.TokenKind.COLON);var r=this.parseNamedType();return{kind:a.Kind.OPERATION_TYPE_DEFINITION,operation:t,type:r,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var r=this.parseName(),n=this.parseDirectives(!0);return{kind:a.Kind.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:a.Kind.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e=[];if(this.expectOptionalKeyword("implements")){this.expectOptionalToken(c.TokenKind.AMP);do{var t;e.push(this.parseNamedType())}while(this.expectOptionalToken(c.TokenKind.AMP)||!0===(null===(t=this._options)||void 0===t?void 0:t.allowLegacySDLImplementsInterfaces)&&this.peek(c.TokenKind.NAME))}return e},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(c.TokenKind.BRACE_L)&&this._lexer.lookahead().kind===c.TokenKind.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(c.TokenKind.BRACE_L,this.parseFieldDefinition,c.TokenKind.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(c.TokenKind.COLON);var i=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:a.Kind.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:o,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(c.TokenKind.PAREN_L,this.parseInputValueDef,c.TokenKind.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(c.TokenKind.COLON);var n,i=this.parseTypeReference();this.expectOptionalToken(c.TokenKind.EQUALS)&&(n=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:a.Kind.INPUT_VALUE_DEFINITION,description:t,name:r,type:i,defaultValue:n,directives:o,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:a.Kind.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:a.Kind.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){var e=[];if(this.expectOptionalToken(c.TokenKind.EQUALS)){this.expectOptionalToken(c.TokenKind.PIPE);do{e.push(this.parseNamedType())}while(this.expectOptionalToken(c.TokenKind.PIPE))}return e},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:a.Kind.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(c.TokenKind.BRACE_L,this.parseEnumValueDefinition,c.TokenKind.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:a.Kind.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:a.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(c.TokenKind.BRACE_L,this.parseInputValueDef,c.TokenKind.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===c.TokenKind.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),r=this.optionalMany(c.TokenKind.BRACE_L,this.parseOperationTypeDefinition,c.TokenKind.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:a.Kind.SCHEMA_EXTENSION,directives:t,operationTypes:r,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),r=this.parseDirectives(!0);if(0===r.length)throw this.unexpected();return{kind:a.Kind.SCALAR_TYPE_EXTENSION,name:t,directives:r,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:a.Kind.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:a.Kind.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:a.Kind.UNION_TYPE_EXTENSION,name:t,directives:r,types:n,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:a.Kind.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:a.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(c.TokenKind.AT);var r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:a.Kind.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:o,loc:this.loc(e)}},t.parseDirectiveLocations=function(){this.expectOptionalToken(c.TokenKind.PIPE);var e=[];do{e.push(this.parseDirectiveLocation())}while(this.expectOptionalToken(c.TokenKind.PIPE));return e},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==l.DirectiveLocation[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new s.Location(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw(0,o.syntaxError)(this._lexer.source,t.start,"Expected ".concat(y(e),", found ").concat(d(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==c.TokenKind.NAME||t.value!==e)throw(0,o.syntaxError)(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(d(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===c.TokenKind.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return(0,o.syntaxError)(this._lexer.source,t.start,"Unexpected ".concat(d(t),"."))},t.any=function(e,t,r){this.expectToken(e);for(var n=[];!this.expectOptionalToken(r);)n.push(t.call(this));return n},t.optionalMany=function(e,t,r){if(this.expectOptionalToken(e)){var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}return[]},t.many=function(e,t,r){this.expectToken(e);var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n},e}();function d(e){var t=e.value;return y(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function y(e){return(0,f.isPunctuatorTokenKind)(e)?'"'.concat(e,'"'):e}},8038:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printLocation=function(e){return i(e.source,(0,n.getLocation)(e.source,e.start))},t.printSourceLocation=i;var n=r(9016);function i(e,t){var r=e.locationOffset.column-1,n=a(r)+e.body,i=t.line-1,s=e.locationOffset.line-1,u=t.line+s,c=1===t.line?r:0,l=t.column+c,f="".concat(e.name,":").concat(u,":").concat(l,"\n"),p=n.split(/\r\n|[\n\r]/g),h=p[i];if(h.length>120){for(var d=Math.floor(l/80),y=l%80,v=[],m=0;m<h.length;m+=80)v.push(h.slice(m,m+80));return f+o([["".concat(u),v[0]]].concat(v.slice(1,d+1).map((function(e){return["",e]})),[[" ",a(y-1)+"^"],["",v[d+1]]]))}return f+o([["".concat(u-1),p[i-1]],["".concat(u),h],["",a(l-1)+"^"],["".concat(u+1),p[i+1]]])}function o(e){var t=e.filter((function(e){return e[0],void 0!==e[1]})),r=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,n=e[0],i=e[1];return a(r-(t=n).length)+t+(i?" | "+i:" |")})).join("\n")}function a(e){return Array(e+1).join(" ")}},3033:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.print=function(e){return(0,n.visit)(e,{leave:o})};var n=r(285),i=r(849),o={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return s(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,r=e.name,n=c("(",s(e.variableDefinitions,", "),")"),i=s(e.directives," "),o=e.selectionSet;return r||i||n||"query"!==t?s([t,s([r,n]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,r=e.type,n=e.defaultValue,i=e.directives;return t+": "+r+c(" = ",n)+c(" ",s(i," "))},SelectionSet:function(e){return u(e.selections)},Field:function(e){var t=e.alias,r=e.name,n=e.arguments,i=e.directives,o=e.selectionSet;return s([c("",t,": ")+r+c("(",s(n,", "),")"),s(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+c(" ",s(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,r=e.directives,n=e.selectionSet;return s(["...",c("on ",t),s(r," "),n]," ")},FragmentDefinition:function(e){var t=e.name,r=e.typeCondition,n=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(c("(",s(n,", "),")")," ")+"on ".concat(r," ").concat(c("",s(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var r=e.value;return e.block?(0,i.printBlockString)(r,"description"===t?"":" "):JSON.stringify(r)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+s(e.values,", ")+"]"},ObjectValue:function(e){return"{"+s(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+c("(",s(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:a((function(e){var t=e.directives,r=e.operationTypes;return s(["schema",s(t," "),u(r)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:a((function(e){return s(["scalar",e.name,s(e.directives," ")]," ")})),ObjectTypeDefinition:a((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["type",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")})),FieldDefinition:a((function(e){var t=e.name,r=e.arguments,n=e.type,i=e.directives;return t+(p(r)?c("(\n",l(s(r,"\n")),"\n)"):c("(",s(r,", "),")"))+": "+n+c(" ",s(i," "))})),InputValueDefinition:a((function(e){var t=e.name,r=e.type,n=e.defaultValue,i=e.directives;return s([t+": "+r,c("= ",n),s(i," ")]," ")})),InterfaceTypeDefinition:a((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["interface",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")})),UnionTypeDefinition:a((function(e){var t=e.name,r=e.directives,n=e.types;return s(["union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")})),EnumTypeDefinition:a((function(e){var t=e.name,r=e.directives,n=e.values;return s(["enum",t,s(r," "),u(n)]," ")})),EnumValueDefinition:a((function(e){return s([e.name,s(e.directives," ")]," ")})),InputObjectTypeDefinition:a((function(e){var t=e.name,r=e.directives,n=e.fields;return s(["input",t,s(r," "),u(n)]," ")})),DirectiveDefinition:a((function(e){var t=e.name,r=e.arguments,n=e.repeatable,i=e.locations;return"directive @"+t+(p(r)?c("(\n",l(s(r,"\n")),"\n)"):c("(",s(r,", "),")"))+(n?" repeatable":"")+" on "+s(i," | ")})),SchemaExtension:function(e){var t=e.directives,r=e.operationTypes;return s(["extend schema",s(t," "),u(r)]," ")},ScalarTypeExtension:function(e){return s(["extend scalar",e.name,s(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend type",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend interface",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")},UnionTypeExtension:function(e){var t=e.name,r=e.directives,n=e.types;return s(["extend union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,r=e.directives,n=e.values;return s(["extend enum",t,s(r," "),u(n)]," ")},InputObjectTypeExtension:function(e){var t=e.name,r=e.directives,n=e.fields;return s(["extend input",t,s(r," "),u(n)]," ")}};function a(e){return function(t){return s([t.description,e(t)],"\n")}}function s(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(r))&&void 0!==t?t:""}function u(e){return e&&0!==e.length?"{\n"+l(s(e,"\n"))+"\n}":""}function c(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t?e+t+r:""}function l(e){return e&&" "+e.replace(/\n/g,"\n ")}function f(e){return-1!==e.indexOf("\n")}function p(e){return e&&e.some(f)}},2412:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Source=void 0;var n,i=r(3098),o=(n=r(7242))&&n.__esModule?n:{default:n};function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||(0,o.default)(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,o.default)(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r;return t=e,(r=[{key:i.SYMBOL_TO_STRING_TAG,get:function(){return"Source"}}])&&a(t.prototype,r),e}();t.Source=s},3175:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenKind=void 0;var r=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"});t.TokenKind=r},285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,n=void 0,c=Array.isArray(e),l=[e],f=-1,p=[],h=void 0,d=void 0,y=void 0,v=[],m=[],g=e;do{var b=++f===l.length,w=b&&0!==p.length;if(b){if(d=0===m.length?void 0:v[v.length-1],h=y,y=m.pop(),w){if(c)h=h.slice();else{for(var k={},_=0,E=Object.keys(h);_<E.length;_++){var O=E[_];k[O]=h[O]}h=k}for(var x=0,T=0;T<p.length;T++){var S=p[T][0],I=p[T][1];c&&(S-=x),c&&null===I?(h.splice(S,1),x++):h[S]=I}}f=n.index,l=n.keys,p=n.edits,c=n.inArray,n=n.prev}else{if(d=y?c?f:l[f]:void 0,null==(h=y?y[d]:g))continue;y&&v.push(d)}var N,C=void 0;if(!Array.isArray(h)){if(!(0,o.isNode)(h))throw new Error("Invalid AST Node: ".concat((0,i.default)(h),"."));var R=u(t,h.kind,b);if(R){if((C=R.call(t,h,d,y,v,m))===s)break;if(!1===C){if(!b){v.pop();continue}}else if(void 0!==C&&(p.push([d,C]),!b)){if(!(0,o.isNode)(C)){v.pop();continue}h=C}}}void 0===C&&w&&p.push([d,h]),b?v.pop():(n={inArray:c,index:f,keys:l,edits:p,prev:n},l=(c=Array.isArray(h))?h:null!==(N=r[h.kind])&&void 0!==N?N:[],f=-1,p=[],y&&m.push(y),y=h)}while(void 0!==n);return 0!==p.length&&(g=p[p.length-1][1]),g},t.visitInParallel=function(e){var t=new Array(e.length);return{enter:function(r){for(var n=0;n<e.length;n++)if(null==t[n]){var i=u(e[n],r.kind,!1);if(i){var o=i.apply(e[n],arguments);if(!1===o)t[n]=r;else if(o===s)t[n]=s;else if(void 0!==o)return o}}},leave:function(r){for(var n=0;n<e.length;n++)if(null==t[n]){var i=u(e[n],r.kind,!0);if(i){var o=i.apply(e[n],arguments);if(o===s)t[n]=s;else if(void 0!==o&&!1!==o)return o}}else t[n]===r&&(t[n]=null)}}},t.getVisitFn=u,t.BREAK=t.QueryDocumentKeys=void 0;var n,i=(n=r(8002))&&n.__esModule?n:{default:n},o=r(1807),a={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};t.QueryDocumentKeys=a;var s=Object.freeze({});function u(e,t,r){var n=e[t];if(n){if(!r&&"function"==typeof n)return n;var i=r?n.leave:n.enter;if("function"==typeof i)return i}else{var o=r?e.leave:e.enter;if(o){if("function"==typeof o)return o;var a=o[t];if("function"==typeof a)return a}}}t.BREAK=s},3098:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SYMBOL_TO_STRING_TAG=t.SYMBOL_ASYNC_ITERATOR=t.SYMBOL_ITERATOR=void 0;var r="function"==typeof Symbol?Symbol.iterator:"@@iterator";t.SYMBOL_ITERATOR=r;var n="function"==typeof Symbol?Symbol.asyncIterator:"@@asyncIterator";t.SYMBOL_ASYNC_ITERATOR=n;var i="function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag";t.SYMBOL_TO_STRING_TAG=i},9535:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getOperationAST=function(e,t){for(var r=null,i=0,o=e.definitions;i<o.length;i++){var a,s=o[i];if(s.kind===n.Kind.OPERATION_DEFINITION)if(null==t){if(r)return null;r=s}else if((null===(a=s.name)||void 0===a?void 0:a.value)===t)return s}return r};var n=r(2828)},645:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,p=r?-1:1,h=e[t+f];for(f+=p,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=p,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,d=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+h]=255&a,h+=d,a/=256,c-=8);e[r+h-d]|=128*y}},1188:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){this.buffer=e}},7202:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FORMAT_BINARY="binary",t.FORMAT_TEXT_MAP="text_map",t.FORMAT_HTTP_HEADERS="http_headers",t.REFERENCE_CHILD_OF="child_of",t.REFERENCE_FOLLOWS_FROM="follows_from"},7546:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SPAN_KIND="span.kind",t.SPAN_KIND_RPC_CLIENT="client",t.SPAN_KIND_RPC_SERVER="server",t.SPAN_KIND_MESSAGING_PRODUCER="producer",t.SPAN_KIND_MESSAGING_CONSUMER="consumer",t.ERROR="error",t.COMPONENT="component",t.SAMPLING_PRIORITY="sampling.priority",t.PEER_SERVICE="peer.service",t.PEER_HOSTNAME="peer.hostname",t.PEER_ADDRESS="peer.address",t.PEER_HOST_IPV4="peer.ipv4",t.PEER_HOST_IPV6="peer.ipv6",t.PEER_PORT="peer.port",t.HTTP_URL="http.url",t.HTTP_METHOD="http.method",t.HTTP_STATUS_CODE="http.status_code",t.MESSAGE_BUS_DESTINATION="message_bus.destination",t.DB_INSTANCE="db.instance",t.DB_STATEMENT="db.statement",t.DB_TYPE="db.type",t.DB_USER="db.user"},2929:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7202),i=r(8963),o=r(9081);t.childOf=function(e){return e instanceof o.default&&(e=e.context()),new i.default(n.REFERENCE_CHILD_OF,e)},t.followsFrom=function(e){return e instanceof o.default&&(e=e.context()),new i.default(n.REFERENCE_FOLLOWS_FROM,e)}},3032:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(8266),a=new o.default,s=null,u=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.startSpan=function(){var e=s||a;return e.startSpan.apply(e,arguments)},t.prototype.inject=function(){var e=s||a;return e.inject.apply(e,arguments)},t.prototype.extract=function(){var e=s||a;return e.extract.apply(e,arguments)},t}(o.default));t.initGlobalTracer=function(e){s=e},t.globalTracer=function(){return u}},4725:(e,t,r)=>{"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0});var i=r(1188);t.BinaryCarrier=i.default;var o=r(7546);t.Tags=o;var a=r(2980),s=r(8963);t.Reference=s.default;var u=r(9081);t.Span=u.default;var c=r(3402);t.SpanContext=c.default;var l=r(8266);t.Tracer=l.Tracer;var f=r(1292);t.MockTracer=f.MockTracer,n(r(3032)),n(r(7202)),n(r(2929)),a.initialize()},1292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4002);t.MockContext=n.default;var i=r(1857);t.MockSpan=i.default;var o=r(6817);t.MockTracer=o.default},4002:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var r=e.call(this)||this;return r._span=t,r}return i(t,e),t.prototype.span=function(){return this._span},t}(r(4725).SpanContext);t.MockContext=o,t.default=o},2901:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){var t=this;this.spans=e,this.spansByUUID={},this.spansByTag={},this.debugSpans=[],this.unfinishedSpans=[],e.forEach((function(e){0===e._finishMs&&t.unfinishedSpans.push(e),t.spansByUUID[e.uuid()]=e,t.debugSpans.push(e.debug());var r=e.tags();Object.keys(r).forEach((function(n){var i=r[n];t.spansByTag[n]=t.spansByTag[n]||{},t.spansByTag[n][i]=t.spansByTag[n][i]||[],t.spansByTag[n][i].push(e)}))}))}return e.prototype.firstSpanWithTagValue=function(e,t){var r=this.spansByTag[e];if(!r)return null;var n=r[t];return n?n[0]:null},e}();t.MockReport=r,t.default=r},1857:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(4725),a=r(4002),s=function(e){function t(t){var r=e.call(this)||this;return r._mockTracer=t,r._uuid=r._generateUUID(),r._startMs=Date.now(),r._finishMs=0,r._operationName="",r._tags={},r._logs=[],r}return i(t,e),t.prototype._context=function(){return new a.default(this)},t.prototype._setOperationName=function(e){this._operationName=e},t.prototype._addTags=function(e){for(var t=0,r=Object.keys(e);t<r.length;t++){var n=r[t];this._tags[n]=e[n]}},t.prototype._log=function(e,t){this._logs.push({fields:e,timestamp:t})},t.prototype._finish=function(e){this._finishMs=e||Date.now()},t.prototype.uuid=function(){return this._uuid},t.prototype.operationName=function(){return this._operationName},t.prototype.durationMs=function(){return this._finishMs-this._startMs},t.prototype.tags=function(){return this._tags},t.prototype.tracer=function(){return this._mockTracer},t.prototype._generateUUID=function(){return""+("00000000"+Math.abs(4294967295*Math.random()|0).toString(16)).substr(-8)+("00000000"+Math.abs(4294967295*Math.random()|0).toString(16)).substr(-8)},t.prototype.addReference=function(e){},t.prototype.debug=function(){var e={uuid:this._uuid,operation:this._operationName,millis:[this._finishMs-this._startMs,this._startMs,this._finishMs]};return Object.keys(this._tags).length&&(e.tags=this._tags),e},t}(o.Span);t.MockSpan=s,t.default=s},6817:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(4725),a=r(2901),s=r(1857),u=function(e){function t(){var t=e.call(this)||this;return t._spans=[],t}return i(t,e),t.prototype._startSpan=function(e,t){var r=this._allocSpan();if(r.setOperationName(e),this._spans.push(r),t.references)for(var n=0,i=t.references;n<i.length;n++){var o=i[n];r.addReference(o)}return r._startStack=(new Error).stack,r},t.prototype._inject=function(e,t,r){throw new Error("NOT YET IMPLEMENTED")},t.prototype._extract=function(e,t){throw new Error("NOT YET IMPLEMENTED")},t.prototype._allocSpan=function(){return new s.default(this)},t.prototype.clear=function(){this._spans=[]},t.prototype.report=function(){return new a.default(this._spans)},t}(o.Tracer);t.MockTracer=u,t.default=u},2980:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9081),i=r(3402),o=r(8266);t.tracer=null,t.spanContext=null,t.span=null,t.initialize=function(){t.tracer=new o.default,t.span=new n.default,t.spanContext=new i.default}},8963:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9081),i=function(){function e(e,t){this._type=e,this._referencedContext=t instanceof n.default?t.context():t}return e.prototype.type=function(){return this._type},e.prototype.referencedContext=function(){return this._referencedContext},e}();t.default=i},9081:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2980),i=function(){function e(){}return e.prototype.context=function(){return this._context()},e.prototype.tracer=function(){return this._tracer()},e.prototype.setOperationName=function(e){return this._setOperationName(e),this},e.prototype.setBaggageItem=function(e,t){return this._setBaggageItem(e,t),this},e.prototype.getBaggageItem=function(e){return this._getBaggageItem(e)},e.prototype.setTag=function(e,t){var r;return this._addTags(((r={})[e]=t,r)),this},e.prototype.addTags=function(e){return this._addTags(e),this},e.prototype.log=function(e,t){return this._log(e,t),this},e.prototype.logEvent=function(e,t){return this._log({event:e,payload:t})},e.prototype.finish=function(e){this._finish(e)},e.prototype._context=function(){return n.spanContext},e.prototype._tracer=function(){return n.tracer},e.prototype._setOperationName=function(e){},e.prototype._setBaggageItem=function(e,t){},e.prototype._getBaggageItem=function(e){},e.prototype._addTags=function(e){},e.prototype._log=function(e,t){},e.prototype._finish=function(e){},e}();t.Span=i,t.default=i},3402:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.prototype.toTraceId=function(){return""},e.prototype.toSpanId=function(){return""},e}();t.SpanContext=r,t.default=r},8266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2929),i=r(2980),o=r(9081),a=function(){function e(){}return e.prototype.startSpan=function(e,t){if(void 0===t&&(t={}),t.childOf){var r=n.childOf(t.childOf);t.references?t.references.push(r):t.references=[r],delete t.childOf}return this._startSpan(e,t)},e.prototype.inject=function(e,t,r){return e instanceof o.default&&(e=e.context()),this._inject(e,t,r)},e.prototype.extract=function(e,t){return this._extract(e,t)},e.prototype._startSpan=function(e,t){return i.span},e.prototype._inject=function(e,t,r){},e.prototype._extract=function(e,t){return i.spanContext},e}();t.Tracer=a,t.default=a},5666:e=>{var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),a=new I(n||[]);return o._invoke=function(e,t,r){var n=f;return function(i,o){if(n===h)throw new Error("Generator is already running");if(n===d){if("throw"===i)throw o;return C()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=l(e,t,r);if("normal"===u.type){if(n=r.done?d:p,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(e,r,a),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f="suspendedStart",p="suspendedYield",h="executing",d="completed",y={};function v(){}function m(){}function g(){}var b={};b[o]=function(){return this};var w=Object.getPrototypeOf,k=w&&w(w(N([])));k&&k!==r&&n.call(k,o)&&(b=k);var _=g.prototype=v.prototype=Object.create(b);function E(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(i,o,a,s){var u=l(e[i],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var i;this._invoke=function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}}function x(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var i=l(n,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var o=i.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function N(e){if(e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:C}}function C(){return{value:t,done:!0}}return m.prototype=_.constructor=g,g.constructor=m,m.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,s,"GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},E(O.prototype),O.prototype[a]=function(){return this},e.AsyncIterator=O,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new O(c(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(_),u(_,s,"Generator"),_[o]=function(){return this},_.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=N,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},5313:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},a=this&&this.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n};Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionClient=void 0;var s=void 0!==r.g?r.g:"undefined"!=typeof window?window:{},u=s.WebSocket||s.MozWebSocket,c=r(3010),l=r(6729),f=r(9277),p=r(5905),h=r(3033),d=r(9535),y=r(7121),v=r(2892),m=r(2639),g=r(4957),b=function(){function e(e,t,r,n){var i=t||{},o=i.connectionCallback,a=void 0===o?void 0:o,s=i.connectionParams,f=void 0===s?{}:s,p=i.minTimeout,h=void 0===p?m.MIN_WS_TIMEOUT:p,d=i.timeout,y=void 0===d?m.WS_TIMEOUT:d,g=i.reconnect,b=void 0!==g&&g,w=i.reconnectionAttempts,k=void 0===w?1/0:w,_=i.lazy,E=void 0!==_&&_,O=i.inactivityTimeout,x=void 0===O?0:O,T=i.wsOptionArguments,S=void 0===T?[]:T;if(this.wsImpl=r||u,!this.wsImpl)throw new Error("Unable to find native implementation, or alternative implementation for WebSocket!");this.wsProtocols=n||v.GRAPHQL_WS,this.connectionCallback=a,this.url=e,this.operations={},this.nextOperationId=0,this.minWsTimeout=h,this.wsTimeout=y,this.unsentMessagesQueue=[],this.reconnect=b,this.reconnecting=!1,this.reconnectionAttempts=k,this.lazy=!!E,this.inactivityTimeout=x,this.closedByUser=!1,this.backoff=new c({jitter:.5}),this.eventEmitter=new l.EventEmitter,this.middlewares=[],this.client=null,this.maxConnectTimeGenerator=this.createMaxConnectTimeGenerator(),this.connectionParams=this.getConnectionParams(f),this.wsOptionArguments=S,this.lazy||this.connect()}return Object.defineProperty(e.prototype,"status",{get:function(){return null===this.client?this.wsImpl.CLOSED:this.client.readyState},enumerable:!1,configurable:!0}),e.prototype.close=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0),this.clearInactivityTimeout(),null!==this.client&&(this.closedByUser=t,e&&(this.clearCheckConnectionInterval(),this.clearMaxConnectTimeout(),this.clearTryReconnectTimeout(),this.unsubscribeAll(),this.sendMessage(void 0,g.default.GQL_CONNECTION_TERMINATE,null)),this.client.close(),this.client.onopen=null,this.client.onclose=null,this.client.onerror=null,this.client.onmessage=null,this.client=null,this.eventEmitter.emit("disconnected"),e||this.tryReconnect())},e.prototype.request=function(e){var t,r,n=this.getObserver.bind(this),i=this.executeOperation.bind(this),o=this.unsubscribe.bind(this);return this.clearInactivityTimeout(),(t={})[y.default]=function(){return this},t.subscribe=function(t,a,s){var u=n(t,a,s);return r=i(e,(function(e,t){null===e&&null===t?u.complete&&u.complete():e?u.error&&u.error(e[0]):u.next&&u.next(t)})),{unsubscribe:function(){r&&(o(r),r=null)}}},t},e.prototype.on=function(e,t,r){var n=this.eventEmitter.on(e,t,r);return function(){n.off(e,t,r)}},e.prototype.onConnected=function(e,t){return this.on("connected",e,t)},e.prototype.onConnecting=function(e,t){return this.on("connecting",e,t)},e.prototype.onDisconnected=function(e,t){return this.on("disconnected",e,t)},e.prototype.onReconnected=function(e,t){return this.on("reconnected",e,t)},e.prototype.onReconnecting=function(e,t){return this.on("reconnecting",e,t)},e.prototype.onError=function(e,t){return this.on("error",e,t)},e.prototype.unsubscribeAll=function(){var e=this;Object.keys(this.operations).forEach((function(t){e.unsubscribe(t)}))},e.prototype.applyMiddlewares=function(e){var t=this;return new Promise((function(r,n){var i,o,s;i=a(t.middlewares),o=t,(s=function(t){if(t)n(t);else if(i.length>0){var a=i.shift();a&&a.applyMiddleware.apply(o,[e,s])}else r(e)})()}))},e.prototype.use=function(e){var t=this;return e.map((function(e){if("function"!=typeof e.applyMiddleware)throw new Error("Middleware must implement the applyMiddleware function.");t.middlewares.push(e)})),this},e.prototype.getConnectionParams=function(e){return function(){return new Promise((function(t,r){if("function"==typeof e)try{return t(e.call(null))}catch(e){return r(e)}t(e)}))}},e.prototype.executeOperation=function(e,t){var r=this;null===this.client&&this.connect();var n=this.generateOperationId();return this.operations[n]={options:e,handler:t},this.applyMiddlewares(e).then((function(e){r.checkOperationOptions(e,t),r.operations[n]&&(r.operations[n]={options:e,handler:t},r.sendMessage(n,g.default.GQL_START,e))})).catch((function(e){r.unsubscribe(n),t(r.formatErrors(e))})),n},e.prototype.getObserver=function(e,t,r){return"function"==typeof e?{next:function(t){return e(t)},error:function(e){return t&&t(e)},complete:function(){return r&&r()}}:e},e.prototype.createMaxConnectTimeGenerator=function(){var e=this.minWsTimeout,t=this.wsTimeout;return new c({min:e,max:t,factor:1.2})},e.prototype.clearCheckConnectionInterval=function(){this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnectionIntervalId=null)},e.prototype.clearMaxConnectTimeout=function(){this.maxConnectTimeoutId&&(clearTimeout(this.maxConnectTimeoutId),this.maxConnectTimeoutId=null)},e.prototype.clearTryReconnectTimeout=function(){this.tryReconnectTimeoutId&&(clearTimeout(this.tryReconnectTimeoutId),this.tryReconnectTimeoutId=null)},e.prototype.clearInactivityTimeout=function(){this.inactivityTimeoutId&&(clearTimeout(this.inactivityTimeoutId),this.inactivityTimeoutId=null)},e.prototype.setInactivityTimeout=function(){var e=this;this.inactivityTimeout>0&&0===Object.keys(this.operations).length&&(this.inactivityTimeoutId=setTimeout((function(){0===Object.keys(e.operations).length&&e.close()}),this.inactivityTimeout))},e.prototype.checkOperationOptions=function(e,t){var r=e.query,n=e.variables,i=e.operationName;if(!r)throw new Error("Must provide a query.");if(!t)throw new Error("Must provide an handler.");if(!f.default(r)&&!d.getOperationAST(r,i)||i&&!f.default(i)||n&&!p.default(n))throw new Error("Incorrect option types. query must be a string or a document,`operationName` must be a string, and `variables` must be an object.")},e.prototype.buildMessage=function(e,t,r){return{id:e,type:t,payload:r&&r.query?n(n({},r),{query:"string"==typeof r.query?r.query:h.print(r.query)}):r}},e.prototype.formatErrors=function(e){return Array.isArray(e)?e:e&&e.errors?this.formatErrors(e.errors):e&&e.message?[e]:[{name:"FormatedError",message:"Unknown error",originalError:e}]},e.prototype.sendMessage=function(e,t,r){this.sendMessageRaw(this.buildMessage(e,t,r))},e.prototype.sendMessageRaw=function(e){switch(this.status){case this.wsImpl.OPEN:var t=JSON.stringify(e);try{JSON.parse(t)}catch(t){this.eventEmitter.emit("error",new Error("Message must be JSON-serializable. Got: "+e))}this.client.send(t);break;case this.wsImpl.CONNECTING:this.unsentMessagesQueue.push(e);break;default:this.reconnecting||this.eventEmitter.emit("error",new Error("A message was not sent because socket is not connected, is closing or is already closed. Message was: "+JSON.stringify(e)))}},e.prototype.generateOperationId=function(){return String(++this.nextOperationId)},e.prototype.tryReconnect=function(){var e=this;if(this.reconnect&&!(this.backoff.attempts>=this.reconnectionAttempts)){this.reconnecting||(Object.keys(this.operations).forEach((function(t){e.unsentMessagesQueue.push(e.buildMessage(t,g.default.GQL_START,e.operations[t].options))})),this.reconnecting=!0),this.clearTryReconnectTimeout();var t=this.backoff.duration();this.tryReconnectTimeoutId=setTimeout((function(){e.connect()}),t)}},e.prototype.flushUnsentMessagesQueue=function(){var e=this;this.unsentMessagesQueue.forEach((function(t){e.sendMessageRaw(t)})),this.unsentMessagesQueue=[]},e.prototype.checkConnection=function(){this.wasKeepAliveReceived?this.wasKeepAliveReceived=!1:this.reconnecting||this.close(!1,!0)},e.prototype.checkMaxConnectTimeout=function(){var e=this;this.clearMaxConnectTimeout(),this.maxConnectTimeoutId=setTimeout((function(){e.status!==e.wsImpl.OPEN&&(e.reconnecting=!0,e.close(!1,!0))}),this.maxConnectTimeGenerator.duration())},e.prototype.connect=function(){var e,t=this;this.client=new((e=this.wsImpl).bind.apply(e,a([void 0,this.url,this.wsProtocols],this.wsOptionArguments))),this.checkMaxConnectTimeout(),this.client.onopen=function(){return i(t,void 0,void 0,(function(){var e,t;return o(this,(function(r){switch(r.label){case 0:if(this.status!==this.wsImpl.OPEN)return[3,4];this.clearMaxConnectTimeout(),this.closedByUser=!1,this.eventEmitter.emit(this.reconnecting?"reconnecting":"connecting"),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.connectionParams()];case 2:return e=r.sent(),this.sendMessage(void 0,g.default.GQL_CONNECTION_INIT,e),this.flushUnsentMessagesQueue(),[3,4];case 3:return t=r.sent(),this.sendMessage(void 0,g.default.GQL_CONNECTION_ERROR,t),this.flushUnsentMessagesQueue(),[3,4];case 4:return[2]}}))}))},this.client.onclose=function(){t.closedByUser||t.close(!1,!1)},this.client.onerror=function(e){t.eventEmitter.emit("error",e)},this.client.onmessage=function(e){var r=e.data;t.processReceivedData(r)}},e.prototype.processReceivedData=function(e){var t,r;try{r=(t=JSON.parse(e)).id}catch(t){throw new Error("Message must be JSON-parseable. Got: "+e)}if(-1===[g.default.GQL_DATA,g.default.GQL_COMPLETE,g.default.GQL_ERROR].indexOf(t.type)||this.operations[r])switch(t.type){case g.default.GQL_CONNECTION_ERROR:this.connectionCallback&&this.connectionCallback(t.payload);break;case g.default.GQL_CONNECTION_ACK:this.eventEmitter.emit(this.reconnecting?"reconnected":"connected",t.payload),this.reconnecting=!1,this.backoff.reset(),this.maxConnectTimeGenerator.reset(),this.connectionCallback&&this.connectionCallback();break;case g.default.GQL_COMPLETE:var i=this.operations[r].handler;delete this.operations[r],i.call(this,null,null);break;case g.default.GQL_ERROR:this.operations[r].handler(this.formatErrors(t.payload),null),delete this.operations[r];break;case g.default.GQL_DATA:var o=t.payload.errors?n(n({},t.payload),{errors:this.formatErrors(t.payload.errors)}):t.payload;this.operations[r].handler(null,o);break;case g.default.GQL_CONNECTION_KEEP_ALIVE:var a=void 0===this.wasKeepAliveReceived;this.wasKeepAliveReceived=!0,a&&this.checkConnection(),this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnection()),this.checkConnectionIntervalId=setInterval(this.checkConnection.bind(this),this.wsTimeout);break;default:throw new Error("Invalid message type!")}else this.unsubscribe(r)},e.prototype.unsubscribe=function(e){this.operations[e]&&(delete this.operations[e],this.setInactivityTimeout(),this.sendMessage(e,g.default.GQL_STOP,void 0))},e}();t.SubscriptionClient=b},2639:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WS_TIMEOUT=t.MIN_WS_TIMEOUT=void 0,t.MIN_WS_TIMEOUT=1e3,t.WS_TIMEOUT=3e4},4957:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){throw new Error("Static Class")}return e.GQL_CONNECTION_INIT="connection_init",e.GQL_CONNECTION_ACK="connection_ack",e.GQL_CONNECTION_ERROR="connection_error",e.GQL_CONNECTION_KEEP_ALIVE="ka",e.GQL_CONNECTION_TERMINATE="connection_terminate",e.GQL_START="start",e.GQL_DATA="data",e.GQL_ERROR="error",e.GQL_COMPLETE="complete",e.GQL_STOP="stop",e.SUBSCRIPTION_START="subscription_start",e.SUBSCRIPTION_DATA="subscription_data",e.SUBSCRIPTION_SUCCESS="subscription_success",e.SUBSCRIPTION_FAIL="subscription_fail",e.SUBSCRIPTION_END="subscription_end",e.INIT="init",e.INIT_SUCCESS="init_success",e.INIT_FAIL="init_fail",e.KEEP_ALIVE="keepalive",e}();t.default=r},2892:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GRAPHQL_SUBSCRIPTIONS=t.GRAPHQL_WS=void 0,t.GRAPHQL_WS="graphql-ws",t.GRAPHQL_SUBSCRIPTIONS="graphql-subscriptions"},5905:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return null!==e&&"object"==typeof e}},9277:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"==typeof e}},7121:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n}),e=r.hmd(e);const n=function(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r.g?r.g:e)},314:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TONClient=void 0;var n=c(r(7757)),i=r(4725),o=c(r(1194)),a=c(r(7932)),s=c(r(9973)),u=c(r(9583));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function h(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){y(o,n,i,a,s,"next",e)}function s(e){y(o,n,i,a,s,"throw",e)}a(void 0)}))}}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(4580);var w=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),b(this,"config",void 0),b(this,"crypto",void 0),b(this,"contracts",void 0),b(this,"queries",void 0),b(this,"_queries",void 0),b(this,"_context",void 0),b(this,"_coreBridge",void 0),b(this,"modules",void 0),this.modules=new Map,this.config=this.getModule(o.default),this.crypto=this.getModule(s.default),this.contracts=this.getModule(a.default),this._queries=this.getModule(u.default),this.queries=this._queries,this._context=0,this._coreBridge=null}var t,r,c,l,y,m,w,k,_,E,O,x;return g(e,null,[{key:"setLibrary",value:function(t){e.clientPlatform=t}}]),g(e,[{key:"setup",value:(x=v(n.default.mark((function e(){var t,r,i,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getCoreBridge();case 2:n=this.modules.values(),t=function(e){if(Array.isArray(e))return d(e)}(n)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(n)||h(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=p(t),e.prev=4,r.s();case 6:if((i=r.n()).done){e.next=12;break}return o=i.value,e.next=10,o.setup();case 10:e.next=6;break;case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),r.e(e.t0);case 17:return e.prev=17,r.f(),e.finish(17);case 20:case"end":return e.stop()}var n}),e,this,[[4,14,17,20]])}))),function(){return x.apply(this,arguments)})},{key:"close",value:(O=v(n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.queries.close();case 2:if(r=e.coreLibrary,!(this._context>0&&null!=r)){t.next=9;break}return i=this._context,this._coreBridge=null,this._context=0,t.next=9,new Promise((function(e){return r.coreDestroyContext(i,e)}));case 9:case"end":return t.stop()}}),t,this)}))),function(){return O.apply(this,arguments)})},{key:"completeErrorData",value:(E=v(n.default.mark((function e(t){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=f,e.t1=f({},t),e.t2={},e.next=5,this.config.getVersion();case 5:return e.t3=e.sent,e.t4=this.config.getConfigServer(),e.t5=this._queries.getQueryUrl(),e.t6={core_version:e.t3,config_server:e.t4,query_url:e.t5},e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t6));case 10:case"end":return e.stop()}}),e,this)}))),function(e){return E.apply(this,arguments)})},{key:"tryCreateLibrary",value:(_=v(n.default.mark((function t(){var r;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=(r=e.clientPlatform)){t.next=3;break}return t.abrupt("return",null);case 3:return t.next=5,r.createLibrary();case 5:return e.coreLibrary=t.sent,t.abrupt("return",e.coreLibrary);case 7:case"end":return t.stop()}}),t)}))),function(){return _.apply(this,arguments)})},{key:"tryCreateCoreBridge",value:(k=v(n.default.mark((function t(){var r,i=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t0=e.coreLibrary,t.t0){t.next=5;break}return t.next=4,this.tryCreateLibrary();case 4:t.t0=t.sent;case 5:if(r=t.t0){t.next=8;break}return t.abrupt("return");case 8:if(!r.coreCreateContext){t.next=15;break}return t.next=11,new Promise((function(e){return r.coreCreateContext(e)}));case 11:this._context=t.sent,this._coreBridge={request:function(t,r,n){e.coreLibrary&&e.coreLibrary.coreRequest(i._context,t,r,n)}},t.next=16;break;case 15:this._coreBridge=r;case 16:case"end":return t.stop()}}),t,this)}))),function(){return k.apply(this,arguments)})},{key:"getCoreBridge",value:(w=v(n.default.mark((function e(){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._coreBridge){e.next=3;break}return e.next=3,this.tryCreateCoreBridge();case 3:return e.abrupt("return",this._coreBridge);case 4:case"end":return e.stop()}}),e,this)}))),function(){return w.apply(this,arguments)})},{key:"getModule",value:function(e){var t=e.moduleName,r=this.modules.get(t);if(r)return r;var n=new e(this);return this.modules.set(t,n),n}},{key:"serverTimeDelta",value:function(){return this._queries.serverTimeDelta()}},{key:"serverNow",value:function(){return this._queries.serverNow()}},{key:"getManagementAccessKey",value:(m=v(n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._queries.query("query{getManagementAccessKey}");case 2:return t=e.sent,e.abrupt("return",t.data.getManagementAccessKey);case 4:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"_resolveSignedManagementAccessKey",value:(y=v(n.default.mark((function e(t){var r,i;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.signedManagementAccessKey){e.next=2;break}return e.abrupt("return",t.signedManagementAccessKey);case 2:if(!(r=t.accountKeys)){e.next=8;break}return e.next=6,this.getManagementAccessKey();case 6:return i=e.sent,e.abrupt("return",this.crypto.naclSign({text:i},"".concat(r.secret).concat(r.public),"Hex"));case 8:return e.abrupt("return","");case 9:case"end":return e.stop()}}),e,this)}))),function(e){return y.apply(this,arguments)})},{key:"registerAccessKeys",value:(l=v(n.default.mark((function e(t){var r,i;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._resolveSignedManagementAccessKey(t);case 2:return r=e.sent,e.next=5,this._queries.mutation("mutation registerAccessKeys($account: String, $keys: [AccessKey], $signedManagementAccessKey: String) {\n registerAccessKeys(account: $account, keys: $keys, signedManagementAccessKey: $signedManagementAccessKey)\n }",{account:t.account,keys:t.keys,signedManagementAccessKey:r});case 5:return i=e.sent,e.abrupt("return",i.data.registerAccessKeys);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"revokeAccessKeys",value:(c=v(n.default.mark((function e(t){var r,i;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._resolveSignedManagementAccessKey(t);case 2:return r=e.sent,e.next=5,this._queries.mutation("mutation revokeAccessKeys($account: String, $keys: [String], $signedManagementAccessKey: String) {\n revokeAccessKeys(account: $account, keys: $keys, signedManagementAccessKey: $signedManagementAccessKey)\n }",{account:t.account,keys:t.keys,signedManagementAccessKey:r});case 5:return i=e.sent,e.abrupt("return",i.data.revokeAccessKeys);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"startRootSpan",value:function(e,t,r){var n=this.config.tracer,o=null;if(n._startInternalSpan)try{var a=n.extract(i.FORMAT_TEXT_MAP,{"uber-trace-id":"".concat(e,":").concat(t,":0:1")});a&&(o=this.config.tracer._startInternalSpan(a,r,Date.now(),void 0,{},[],!1,!1))}catch(e){}return o||n.startSpan(r)}},{key:"trace",value:(r=v(n.default.mark((function e(t,r,o){var a,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.config.tracer.startSpan(t,{childOf:o}),e.prev=1,a.setTag(i.Tags.SPAN_KIND,"client"),e.next=5,r(a);case 5:return void 0!==(s=e.sent)&&a.setTag("result",s),a.finish(),e.abrupt("return",s);case 11:throw e.prev=11,e.t0=e.catch(1),a.log({event:"failed",payload:e.t0}),a.finish(),e.t0;case 16:case"end":return e.stop()}}),e,this,[[1,11]])}))),function(e,t,n){return r.apply(this,arguments)})}],[{key:"create",value:(t=v(n.default.mark((function t(r){var i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(i=new e).config.setData(r),t.next=4,i.setup();case 4:return t.abrupt("return",i);case 5:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})}]),e}();t.TONClient=w,b(w,"clientPlatform",null),b(w,"coreLibrary",null)},5351:(e,t)=>{"use strict";function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.TONClientError=t.TONContractExitCode=t.TONErrorCode=t.TONErrorSource=t.emptyTONErrorData=void 0;var a={core_version:"",config_server:"",query_url:""};t.emptyTONErrorData=a;var s={CLIENT:"client",NODE:"node"};t.TONErrorSource=s;var u={CLIENT_IS_NOT_SETUP:1e3,SEND_NODE_REQUEST_FAILED:1001,MESSAGE_ALREADY_EXPIRED:1001,RUN_LOCAL_ACCOUNT_DOES_NOT_EXISTS:1002,WAIT_FOR_TIMEOUT:1003,INTERNAL_ERROR:1004,QUERY_FAILED:1005,MESSAGE_EXPIRED:1006,SERVER_DOESNT_SUPPORT_AGGREGATIONS:1007,INVALID_CONS:1008,ADDRESS_REQUIRED_FOR_RUN_LOCAL:1009,NETWORK_SILENT:1010,TRANSACTION_LAG:1011,TRANSACTION_WAIT_TIMEOUT:1012,CLOCK_OUT_OF_SYNC:1013,ACCOUNT_MISSING:1014,ACCOUNT_CODE_MISSING:1015,ACCOUNT_BALANCE_TOO_LOW:1016,ACCOUNT_FROZEN_OR_DELETED:1017,SIGNING_SOURCE_IS_NOT_SPECIFIED:2021,INVALID_CRYPTO_BOX_PARAMS:2030,CONTRACT_EXECUTION_FAILED:3025,QUERY_FORCIBLY_ABORTED:4005};t.TONErrorCode=u,t.TONContractExitCode={REPLAY_PROTECTION:52,MESSAGE_EXPIRED:57,NO_GAS:13};var c=function(){function e(t,r,n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,"message",void 0),o(this,"source",void 0),o(this,"code",void 0),o(this,"data",void 0),this.code=t,this.message=r,this.data=n,this.source=i||s.CLIENT}var t,r;return t=e,r=[{key:"isClientError",value:function(e,t){return e.source===s.CLIENT&&e.code===t}},{key:"isNodeError",value:function(e,t){return e.source===s.NODE&&e.code===t}},{key:"isContractError",value:function(e,t){return e.source===s.NODE&&e.code===u.CONTRACT_EXECUTION_FAILED&&e.data&&e.data.exit_code===t}},{key:"isOriginalContractError",value:function(t,r){var n;return e.isContractError(t,r)&&!(null===(n=t.data)||void 0===n?void 0:n.original_error)}},{key:"isResolvedContractErrorAfterExpire",value:function(t,r){return e.isContractError(t,r)&&t.data&&t.data.original_error&&e.isMessageExpired(t.data.original_error)}},{key:"isMessageExpired",value:function(t){return e.isClientError(t,u.MESSAGE_EXPIRED)}},{key:"isWaitForTimeout",value:function(t){return e.isClientError(t,u.WAIT_FOR_TIMEOUT)}},{key:"internalError",value:function(t,r){return new e(u.INTERNAL_ERROR,"Internal error: ".concat(t),r)}},{key:"invalidCons",value:function(t){return new e(u.INVALID_CONS,"Invalid CONS structure. Each CONS item must contains of two elements.",t)}},{key:"sendNodeRequestFailed",value:function(t,r){return new e(u.SEND_NODE_REQUEST_FAILED,"Send node request failed: ".concat(t),r)}},{key:"runLocalAccountDoesNotExists",value:function(t,r,n){return new e(u.RUN_LOCAL_ACCOUNT_DOES_NOT_EXISTS,"[".concat(t,"] run local failed: account [").concat(r,"] does not exists"),n)}},{key:"waitForTimeout",value:function(t){return new e(u.WAIT_FOR_TIMEOUT,"Wait for operation rejected on timeout",t)}},{key:"queryFailed",value:function(t,r){return new e(u.QUERY_FAILED,"Query failed: ".concat(t.map((function(e){return e.message||e.toString()})).join("\n")),r)}},{key:"formatTime",value:function(e){return e?"".concat(new Date(1e3*e).toISOString()," (").concat(e,")"):null}},{key:"messageExpired",value:function(t){return new e(u.MESSAGE_EXPIRED,"Message expired",n(n({},t),{},{sending_time:e.formatTime(t.sending_time),expiration_time:e.formatTime(t.expire),block_time:e.formatTime(t.block_time)}),s.CLIENT)}},{key:"serverDoesntSupportAggregations",value:function(t){return new e(u.SERVER_DOESNT_SUPPORT_AGGREGATIONS,"Server doesn't support aggregations",t)}},{key:"addressRequiredForRunLocal",value:function(t){return new e(u.ADDRESS_REQUIRED_FOR_RUN_LOCAL,"Address required for run local. You haven't specified contract code or data so address is required to load missing parts from network.",t)}},{key:"networkSilent",value:function(t){return new e(u.NETWORK_SILENT,"Network silent: no blocks produced during timeout.",n(n({},t),{},{sending_time:e.formatTime(t.sending_time),expiration_time:e.formatTime(t.expire)}))}},{key:"transactionWaitTimeout",value:function(t){return new e(u.TRANSACTION_WAIT_TIMEOUT,"Transaction did not produced during specified timeout",n(n({},t),{},{sending_time:e.formatTime(t.sending_time)}))}},{key:"clockOutOfSync",value:function(t){return new e(u.CLOCK_OUT_OF_SYNC,"You local clock is out of sync with the server time. It is a critical condition for sending messages to the blockchain. Please sync you clock with the internet time.",t)}},{key:"accountMissing",value:function(t,r){return new e(u.ACCOUNT_MISSING,"Account with address [".concat(t,"] doesn't exists. ")+"You have to prepaid this account to have a positive balance on them and then deploy a contract code for this account.See SDK documentation for detailed instructions.",r)}},{key:"accountCodeMissing",value:function(t,r,n){return new e(u.ACCOUNT_CODE_MISSING,"Account with address [".concat(t,"] exists but haven't a contract code yet. ")+"You have to ensure that an account has an enough balance for deploying a contract code and then deploy a contract code for this account. "+"Current account balance is [".concat(r,"]. ")+"See SDK documentation for detailed instructions.",n)}},{key:"accountBalanceTooLow",value:function(t,r,n){return new e(u.ACCOUNT_BALANCE_TOO_LOW,"Account with address [".concat(t,"] has too low balance [").concat(r,"]. ")+"You have to send some value to account balance from other contract (e.g. Wallet contract). See SDK documentation for detailed instructions.",n)}},{key:"noBlocks",value:function(t,r){var n=-1===t?"masterchain":"workchain ".concat(t);return new e(u.NETWORK_SILENT,'"No blocks for '.concat(n,' found".'),r)}},{key:"invalidBlockchain",value:function(t,r){return new e(u.NETWORK_SILENT,t,r)}},{key:"queryForciblyAborted",value:function(t){return new e(u.QUERY_FORCIBLY_ABORTED,"GraphQL query was forcibly aborted on timeout.",t)}},{key:"signingSourceIsNotSpecified",value:function(){return new e("You must provide signing keys or signing box to sign you message.",u.SIGNING_SOURCE_IS_NOT_SPECIFIED)}},{key:"invalidCryptoBoxParams",value:function(t){return new e("You must provide a valid encrypted seed phrase to create a core crypto box. "+"Provided phrase is: ".concat(JSON.stringify(t),"."),u.INVALID_CRYPTO_BOX_PARAMS)}},{key:"clientIsNotSetup",value:function(){return new e(u.CLIENT_IS_NOT_SETUP,"TON Client Library isn't set up properly",a)}}],null&&i(t.prototype,null),r&&i(t,r),e}();t.TONClientError=c,o(c,"source",s),o(c,"code",u)},4580:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TONModule=void 0;var n,i=(n=r(7757))&&n.__esModule?n:{default:n},o=(r(4725),r(5351));function a(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,u,"next",e)}function u(e){a(o,n,i,s,u,"throw",e)}s(void 0)}))}}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"context",void 0),this.context=t}var t,r,n,a,l;return t=e,(r=[{key:"setup",value:(l=s(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(){return l.apply(this,arguments)})},{key:"completeErrorData",value:(a=s(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.context.completeErrorData(t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"requestCore",value:(n=s(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.context.getCoreBridge();case 2:if(n=e.sent){e.next=5;break}throw o.TONClientError.clientIsNotSetup();case 5:return e.abrupt("return",new Promise((function(e,i){n.request(t,void 0!==r&&JSON.stringify(r)||"",(function(t,r){r?i(JSON.parse(r)):e(t?JSON.parse(t):{})}))})));case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})}])&&u(t.prototype,r),e}();t.TONModule=l,c(l,"moduleName",void 0)},1194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.URLParts=void 0;var n,i=(n=r(7757))&&n.__esModule?n:{default:n},o=r(4580),a=(r(4725),r(2980));function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){u(o,n,i,a,s,"next",e)}function s(e){u(o,n,i,a,s,"throw",e)}a(void 0)}))}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function v(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),e}function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var g=function(){function e(t,r,n,i){d(this,e),m(this,"protocol",void 0),m(this,"host",void 0),m(this,"path",void 0),m(this,"query",void 0),this.protocol=t,this.host=r,this.path=n,this.query=i}return v(e,[{key:"fixProtocol",value:function(e){return this.protocol=e(this.protocol),this}},{key:"fixHost",value:function(e){return this.host=e(this.host),this}},{key:"fixPath",value:function(e){return this.path=e(this.path),this}},{key:"fixQuery",value:function(e){return this.query=e(this.query),this}}],[{key:"parse",value:function(t){var r=t.indexOf("://"),n=r>=0?r+3:0,i=t.indexOf("?",n),o=i>=0?i+1:t.length,a=i>=0?i:t.length,s=t.indexOf("/",n),u=s>=0?s<a?s:a:i>=0?i:t.length;return new e(t.substring(0,n),t.substring(n,u),t.substring(u,a),t.substring(o))}},{key:"resolveUrl",value:function(t,r){var n=e.parse(t);return e.parse(r).fixProtocol((function(e){return e||n.protocol})).fixHost((function(e){return e||n.host})).toString()}}]),v(e,[{key:"toString",value:function(){for(var e=this.path;e.indexOf("//")>=0;)e=e.replace("//","/");return""===e||e.startsWith("/")||(e="/".concat(e)),"".concat(this.protocol).concat(this.host).concat(e).concat(""!==this.query?"?":"").concat(this.query)}}]),e}();t.URLParts=g;var b="http://localhost";function w(e,t){return null==e?t:e}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(u,e);var t,r,n,o,s=(n=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(n);if(o){var r=h(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return f(this,e)});function u(e){var t;return d(this,u),m(p(t=s.call(this,e)),"data",void 0),m(p(t),"tracer",void 0),m(p(t),"_logVerbose",void 0),m(p(t),"_errLogVerbose",void 0),m(p(t),"_profileStart",void 0),m(p(t),"_profilePrev",void 0),t.data={servers:[b]},t}return v(u,[{key:"setData",value:function(e){this.data=e||this.data,0===this.data.servers.length&&this.data.servers.push(b),this.tracer=e.tracer||a.tracer}},{key:"getConfigServer",value:function(){var e,t;return(null===(e=this.data)||void 0===e||null===(t=e.servers)||void 0===t?void 0:t[0])||""}},{key:"outOfSyncThreshold",value:function(){return w(this.data.outOfSyncThreshold,15e3)}},{key:"messageRetriesCount",value:function(){return w(this.data.messageRetriesCount,10)}},{key:"messageProcessingTimeout",value:function(){var e=this.data.messageProcessingTimeout;return 0===e?0:e||4e4}},{key:"waitForTimeout",value:function(){return w(this.data.waitForTimeout,4e4)}},{key:"networkTimeout",value:function(){return w(this.data.networkTimeout,0)}},{key:"isNetworkTimeoutExpiredSince",value:function(e){var t=this.networkTimeout();return 0!==t&&Date.now()>e+t}},{key:"log",value:function(){for(var e=0!==(this._profileStart||0),t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(e){var i,o=Date.now()/1e3,a="".concat(String(o.toFixed(3))," ").concat(String((o-this._profileStart).toFixed(3))," ").concat(String((o-this._profilePrev).toFixed(3)));this._logVerbose?(i=console).log.apply(i,["[".concat(a,"]\n")].concat(r)):console.log("[".concat(a,"]\n"),r[0]),this._profilePrev=o}else if(this._logVerbose){var s;(s=console).log.apply(s,["[".concat(Date.now()/1e3,"]")].concat(r))}}},{key:"startProfile",value:function(){this._profileStart=Date.now()/1e3,this._profilePrev=this._profileStart}},{key:"stopProfile",value:function(){this._profileStart=this._profilePrev=0}},{key:"getVersion",value:(r=c(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("version"));case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"setup",value:(t=c(i.default.mark((function e(){var t;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.data){e.next=5;break}return delete(t=Object.assign({},this.data)).tracer,e.next=5,this.requestCore("setup",t);case 5:this._logVerbose=this.data.log_verbose||!1,this._logVerbose&&this.startProfile(),this._errLogVerbose=this.data.err_log_verbose||!0;case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),u}(o.TONModule);t.default=k,k.moduleName="TONConfigModule"},7932:(e,t,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.removeProps=I,t.default=t.QBounceType=t.QSkipReason=t.QComputeType=t.QAccountStatusChange=t.QAccountStatus=t.QTransactionProcessingStatus=t.QTransactionType=t.QAccountType=t.QSplitType=t.QBlockProcessingStatus=t.QMessageProcessingStatus=t.QMessageType=t.QOutMsgType=t.QInMsgType=t.TONClientStorageStatus=t.TONClientComputeSkippedStatus=t.TONClientTransactionPhase=t.TONAddressStringVariant=void 0;var i=h(r(7757)),o=r(4725),a=r(5351),s=r(4580),u=h(r(1194)),c=p(r(9973)),l=p(r(9583));function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!==x(e)&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function h(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){return!t||"object"!==x(t)&&"function"!=typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function k(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){w(o,n,i,a,s,"next",e)}function s(e){w(o,n,i,a,s,"throw",e)}a(void 0)}))}}function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function E(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.TONAddressStringVariant={AccountId:"AccountId",Hex:"Hex",Base64:"Base64"},t.TONClientTransactionPhase={storage:"storage",computeSkipped:"computeSkipped",computeVm:"computeVm",action:"action",unknown:"unknown"},t.TONClientComputeSkippedStatus={noState:0,badState:1,noGas:2},t.TONClientStorageStatus={unchanged:0,frozen:1,deleted:2},t.QInMsgType={external:0,ihr:1,immediately:2,final:3,transit:4,discardedFinal:5,discardedTransit:6},t.QOutMsgType={external:0,immediately:1,outMsgNew:2,transit:3,dequeueImmediately:4,dequeue:5,transitRequired:6,none:-1},t.QMessageType={internal:0,extIn:1,extOut:2},t.QMessageProcessingStatus={unknown:0,queued:1,processing:2,preliminary:3,proposed:4,finalized:5,refused:6,transiting:7},t.QBlockProcessingStatus={unknown:0,proposed:1,finalized:2,refused:3},t.QSplitType={none:0,split:2,merge:3};var T={uninit:0,active:1,frozen:2};function S(e){e.__typename&&delete e.__typename,Object.values(e).forEach((function(e){e&&"object"===x(e)&&S(e)}))}function I(e,t){var r=e;return t.forEach((function(e){var t=e.indexOf(".");if(t<0)e in r&&delete(r=E({},r))[e];else{var n=e.substr(0,t),i=r[n];if(i){var o=I(i,[e.substr(t+1)]);o!==i&&(r=E(E({},r),{},O({},n,o)))}}})),r}function N(e,t,r,n){var i=function(e,t,r,n){if(!t)return null;var i=t.substr(0,16),a=t.substr(16,16),s=null;try{s=e.extract(o.FORMAT_TEXT_MAP,{"uber-trace-id":"".concat(i,":").concat(a,":0:1")})}catch(e){}return s?e.startSpan(r,{childOf:s,tags:n}):null}(e,t,r,n);i&&i.finish()}function C(e,t){return R.apply(this,arguments)}function R(){return(R=k(i.default.mark((function e(t,r){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=7;break}return e.t0=t,e.next=4,t.getPublicKey();case 4:return e.t1=e.sent,e.t2={secret:"",public:e.t1},e.abrupt("return",{box:e.t0,keys:e.t2});case 7:if(!r||!r.secret){e.next=9;break}return e.abrupt("return",{box:null,keys:r});case 9:return e.abrupt("return",null);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.QAccountType=T,t.QTransactionType={ordinary:0,storage:1,tick:2,tock:3,splitPrepare:4,splitInstall:5,mergePrepare:6,mergeInstall:7},t.QTransactionProcessingStatus={unknown:0,preliminary:1,proposed:2,finalized:3,refused:4},t.QAccountStatus={uninit:0,active:1,frozen:2,nonExist:3},t.QAccountStatusChange={unchanged:0,frozen:1,deleted:2},t.QComputeType={skipped:0,vm:1},t.QSkipReason={noState:0,badState:1,noGas:2},t.QBounceType={negFunds:0,noFunds:1,ok:2};var A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(Se,e);var t,r,o,s,f,p,h,w,_,x,R,A,P,j,L,F,q,B,Q,K,U,V,G,W,J,z,Y,H,$,X,Z,ee,te,re,ne,ie,oe,ae,se,ue,ce,le,fe,pe,he,de,ye,ve,me,ge,be,we,ke,_e,Ee,Oe,xe,Te=(Oe=Se,xe=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(Oe);if(xe){var r=b(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return m(this,e)});function Se(){var e;d(this,Se);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return O(g(e=Te.call.apply(Te,[this].concat(r))),"config",void 0),O(g(e),"crypto",void 0),O(g(e),"queries",void 0),O(g(e),"bigBalance","0x10000000000000"),e}return t=Se,(r=[{key:"setup",value:(Ee=k(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.config=this.context.getModule(u.default),this.queries=this.context.getModule(l.default),this.crypto=this.context.getModule(c.default);case 3:case"end":return e.stop()}}),e,this)}))),function(){return Ee.apply(this,arguments)})},{key:"load",value:(_e=k(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.queries.accounts.query({filter:{id:{eq:t.address}},result:"balance",parentSpan:r});case 2:if(!((n=e.sent)&&n.length>0)){e.next=5;break}return e.abrupt("return",{id:t.address,balanceGrams:n[0].balance});case 5:return e.abrupt("return",{id:null,balanceGrams:null});case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return _e.apply(this,arguments)})},{key:"deploy",value:(ke=k(i.default.mark((function e(t,r){var n=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.context.trace("contracts.deploy",function(){var e=k(i.default.mark((function e(r){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.setTag("params",I(t,["keyPair.secret"])),e.abrupt("return",n.internalDeployJs(t,r));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return ke.apply(this,arguments)})},{key:"run",value:(we=k(i.default.mark((function e(t,r){var n=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.context.trace("contracts.run",function(){var e=k(i.default.mark((function e(r){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.setTag("params",I(t,["keyPair.secret"])),e.abrupt("return",n.internalRunJs(t,r));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return we.apply(this,arguments)})},{key:"runLocal",value:(be=k(i.default.mark((function e(t,r){var n=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.context.trace("contracts.runLocal",function(){var e=k(i.default.mark((function e(r){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.setTag("params",I(t,["keyPair.secret"])),e.abrupt("return",n.internalRunLocalJs(t,r));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return be.apply(this,arguments)})},{key:"runMessageLocal",value:(ge=k(i.default.mark((function e(t,r){var n=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.context.trace("runMessageLocal",function(){var e=k(i.default.mark((function e(r){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.setTag("params",I(t,["keyPair.secret"])),e.abrupt("return",n.internalRunMessageLocalJs(t,r));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return ge.apply(this,arguments)})},{key:"runGet",value:(me=k(i.default.mark((function e(t){var r,n,o,s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t,t.bocBase64||t.codeBase64&&t.dataBase64){e.next=26;break}if(n=t.address){e.next=10;break}return e.t0=a.TONClientError,e.next=8,this.completeErrorData();case 8:throw e.t1=e.sent,e.t0.addressRequiredForRunLocal.call(e.t0,e.t1);case 10:return e.next=12,this.getAccount(n,!1,{timeout:this.config.waitForTimeout()});case 12:if((o=e.sent).code_hash){e.next=21;break}return e.t2=a.TONClientError,e.t3=n,e.t4=o.balance,e.next=19,this.completeErrorData();case 19:throw e.t5=e.sent,e.t2.accountCodeMissing.call(e.t2,e.t3,e.t4,e.t5);case 21:s={},o.boc&&(s.bocBase64=o.boc),o.last_paid&&(s.last_paid=o.last_paid),o.balance&&(s.balance=o.balance),r=E(E({},s),t);case 26:return e.abrupt("return",this.requestCore("tvm.get",r));case 27:case"end":return e.stop()}}),e,this)}))),function(e){return me.apply(this,arguments)})},{key:"arrayFromCONS",value:function(e){for(var t=[],r=e;r;){if(2===!r.length)throw a.TONClientError.invalidCons(a.emptyTONErrorData);t.push(r[0]),r=r[1]}return t}},{key:"createDeployMessage",value:(ve=k(i.default.mark((function e(t,r){var n,o,a;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.config.log("createDeployMessage",t),e.next=3,C(t.signingBox,t.keyPair);case 3:if(!(n=e.sent)){e.next=20;break}return e.next=7,this.createUnsignedDeployMessage(E(E({},t),{},{keyPair:n.keys}));case 7:return o=e.sent,e.t0=this,e.t1=E,e.t2=E,e.t3={},e.next=14,this.internalSign(o.signParams,n);case 14:return e.t4=e.sent,e.t5=(0,e.t2)(e.t3,e.t4),e.t6={},e.t7={unsignedMessage:o},e.t8=(0,e.t1)(e.t5,e.t6,e.t7),e.abrupt("return",e.t0.createSignedDeployMessage.call(e.t0,e.t8));case 20:return e.next=22,this.requestCore("contracts.deploy.message",{abi:t.package.abi,constructorHeader:t.constructorHeader,constructorParams:t.constructorParams,initParams:t.initParams,imageBase64:t.package.imageBase64,keyPair:t.keyPair,workchainId:t.workchainId});case 22:return a=e.sent,e.abrupt("return",{address:a.address,message:a});case 24:case"end":return e.stop()}}),e,this)}))),function(e,t){return ve.apply(this,arguments)})},{key:"createRunMessage",value:(ye=k(i.default.mark((function e(t,r){var n,o,a;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.config.log("createRunMessage",t),e.next=3,C(t.signingBox,t.keyPair);case 3:if(!(n=e.sent)){e.next=20;break}return e.next=7,this.createUnsignedRunMessage(t);case 7:return o=e.sent,e.t0=this,e.t1=E,e.t2=E,e.t3={},e.next=14,this.internalSign(o.signParams,n);case 14:return e.t4=e.sent,e.t5=(0,e.t2)(e.t3,e.t4),e.t6={},e.t7={unsignedMessage:o},e.t8=(0,e.t1)(e.t5,e.t6,e.t7),e.abrupt("return",e.t0.createSignedRunMessage.call(e.t0,e.t8));case 20:return e.next=22,this.requestCore("contracts.run.message",{address:t.address,abi:t.abi,functionName:t.functionName,header:t.header,tryIndex:r,input:t.input,keyPair:t.keyPair});case 22:return a=e.sent,e.abrupt("return",{address:t.address,abi:t.abi,functionName:t.functionName,message:a});case 24:case"end":return e.stop()}}),e,this)}))),function(e,t){return ye.apply(this,arguments)})},{key:"createUnsignedDeployMessage",value:(de=k(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.requestCore("contracts.deploy.encode_unsigned_message",{abi:t.package.abi,constructorHeader:t.constructorHeader,tryIndex:r,constructorParams:t.constructorParams,initParams:t.initParams,imageBase64:t.package.imageBase64,publicKeyHex:t.keyPair.public,workchainId:t.workchainId});case 2:return n=e.sent,e.abrupt("return",{address:n.addressHex,signParams:E(E({},n.encoded),{},{abi:t.package.abi})});case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return de.apply(this,arguments)})},{key:"createUnsignedRunMessage",value:(he=k(i.default.mark((function e(t,r){var n,o,a,s,u;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.header,!(t.abi.header||[]).includes("pubkey")||(null===(n=o)||void 0===n?void 0:n.pubkey)){e.next=15;break}return e.next=4,C(t.signingBox,t.keyPair);case 4:if(e.t1=a=e.sent,e.t0=null===e.t1,e.t0){e.next=8;break}e.t0=void 0===a;case 8:if(!e.t0){e.next=12;break}e.t2=void 0,e.next=13;break;case 12:e.t2=a.keys;case 13:(s=e.t2)&&(o=E(E({},o),{},{pubkey:s.public}));case 15:return e.next=17,this.requestCore("contracts.run.encode_unsigned_message",{address:t.address,abi:t.abi,functionName:t.functionName,header:o,tryIndex:r,input:t.input});case 17:return u=e.sent,e.abrupt("return",{address:t.address,functionName:t.functionName,signParams:E(E({},u),{},{abi:t.abi})});case 19:case"end":return e.stop()}}),e,this)}))),function(e,t){return he.apply(this,arguments)})},{key:"createSignedMessage",value:(pe=k(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("contracts.encode_message_with_sign",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return pe.apply(this,arguments)})},{key:"createSignedDeployMessage",value:(fe=k(i.default.mark((function e(t){var r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.createSignedMessage({abi:t.unsignedMessage.signParams.abi,unsignedBytesBase64:t.unsignedMessage.signParams.unsignedBytesBase64,signBytesBase64:t.signBytesBase64,publicKeyHex:t.publicKeyHex});case 2:return(r=e.sent).expire=t.unsignedMessage.signParams.expire,e.abrupt("return",{address:t.unsignedMessage.address,message:r});case 5:case"end":return e.stop()}}),e,this)}))),function(e){return fe.apply(this,arguments)})},{key:"createSignedRunMessage",value:(le=k(i.default.mark((function e(t){var r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.createSignedMessage({abi:t.unsignedMessage.signParams.abi,unsignedBytesBase64:t.unsignedMessage.signParams.unsignedBytesBase64,signBytesBase64:t.signBytesBase64,publicKeyHex:t.publicKeyHex});case 2:return(r=e.sent).expire=t.unsignedMessage.signParams.expire,e.abrupt("return",{address:t.unsignedMessage.address,abi:t.unsignedMessage.signParams.abi,functionName:t.unsignedMessage.functionName,message:r});case 5:case"end":return e.stop()}}),e,this)}))),function(e){return le.apply(this,arguments)})},{key:"getCodeFromImage",value:(ce=k(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("contracts.image.code",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return ce.apply(this,arguments)})},{key:"getDeployData",value:(ue=k(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("contracts.deploy.data",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return ue.apply(this,arguments)})},{key:"createRunBody",value:(se=k(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("contracts.run.body",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return se.apply(this,arguments)})},{key:"getFunctionId",value:(ae=k(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("contracts.function.id",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return ae.apply(this,arguments)})},{key:"getBocHash",value:(oe=k(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("contracts.boc.hash",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return oe.apply(this,arguments)})},{key:"parseMessage",value:(ie=k(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("contracts.parse.message",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return ie.apply(this,arguments)})},{key:"decodeRunOutput",value:(ne=k(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("contracts.run.output",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return ne.apply(this,arguments)})},{key:"decodeInputMessageBody",value:(re=k(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("contracts.run.unknown.input",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return re.apply(this,arguments)})},{key:"decodeOutputMessageBody",value:(te=k(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("contracts.run.unknown.output",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return te.apply(this,arguments)})},{key:"ensureMessageId",value:(ee=k(i.default.mark((function e(t){var r=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t.messageId,e.t0){e.next=5;break}return e.next=4,k(i.default.mark((function e(){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.getBocHash({bocBase64:t.messageBodyBase64});case 2:return n=e.sent.hash,t.messageId=n,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})))();case 4:e.t0=e.sent;case 5:return e.abrupt("return",e.t0);case 6:case"end":return e.stop()}}),e)}))),function(e){return ee.apply(this,arguments)})},{key:"sendMessage",value:(Z=k(i.default.mark((function e(t,r){var o,s,u,c,l;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((o=t.expire)&&Date.now()>1e3*o)){e.next=7;break}return e.t0=a.TONClientError,e.next=5,this.completeErrorData({address:t.address,message_id:t.messageId});case 5:throw e.t1=e.sent,e.t0.sendNodeRequestFailed.call(e.t0,"Message already expired",e.t1);case 7:return e.t2=Math,e.next=10,this.queries.serverTimeDelta(r);case 10:if(e.t3=e.sent,!(e.t2.abs.call(e.t2,e.t3)>this.config.outOfSyncThreshold())){e.next=19;break}return this.queries.dropServerTimeDelta(),e.t4=a.TONClientError,e.next=17,this.completeErrorData();case 17:throw e.t5=e.sent,e.t4.clockOutOfSync.call(e.t4,e.t5);case 19:return e.next=21,this.findLastShardBlock(t.address);case 21:return s=e.sent,e.next=24,this.ensureMessageId(t);case 24:return u=e.sent,c=n.from(u,"hex").toString("base64"),(l=this.context.startRootSpan(u.substr(0,16),u.substr(16,16),"messageProcessing")).addTags({messageId:u,messageSize:Math.ceil(3*t.messageBodyBase64.length/4),address:t.address,expire:t.expire}),e.next=30,this.queries.postRequests([{id:c,body:t.messageBodyBase64}],r);case 30:return l.finish(),this.config.log("sendMessage. Request posted",u),e.abrupt("return",{lastBlockId:s,sendingTime:Math.round(Date.now()/1e3)});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return Z.apply(this,arguments)})},{key:"processMessage",value:(X=k(i.default.mark((function e(t,r,n,o,a,s,u){var c,l,f;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sendMessage(t,n);case 2:return c=e.sent,e.next=5,this.waitForTransaction({message:t,messageProcessingState:c,parentSpan:n,abi:s,functionName:u});case 5:return l=e.sent,f=l.transaction,e.abrupt("return",f);case 8:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n,i,o,a){return X.apply(this,arguments)})},{key:"findLastBlock",value:($=k(i.default.mark((function e(t,r,n){var o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.queries.blocks.query({filter:E({workchain_id:{eq:t}},n||{}),result:r,orderBy:[{path:"seq_no",direction:"DESC"}],limit:1});case 2:return o=e.sent,e.abrupt("return",o.length>0?o[0]:null);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return $.apply(this,arguments)})},{key:"findMatchingShard",value:(H=k(i.default.mark((function e(t,r){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("contracts.find.shard",{shards:t,address:r}));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return H.apply(this,arguments)})},{key:"findLastShardBlock",value:(Y=k(i.default.mark((function e(t){var r,n,o,s,u,c,l,f,p;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.split(":"),s=o.length>1?Number.parseInt(o[0],10):0,e.next=4,this.findLastBlock(-1,"id master { shard_hashes { workchain_id shard descr { root_hash } } }");case 4:if(u=e.sent,-1!==s){e.next=14;break}if(u){e.next=13;break}return e.t0=a.TONClientError,e.t1=-1,e.next=11,this.completeErrorData({address:t});case 11:throw e.t2=e.sent,e.t0.noBlocks.call(e.t0,e.t1,e.t2);case 13:return e.abrupt("return",u.id);case 14:if(u){e.next=42;break}return e.next=17,this.findLastBlock(s,"after_merge shard");case 17:if(c=e.sent){e.next=25;break}return e.t3=a.TONClientError,e.t4=s,e.next=23,this.completeErrorData({address:t});case 23:throw e.t5=e.sent,e.t3.noBlocks.call(e.t3,e.t4,e.t5);case 25:if(!c.after_merge&&"8000000000000000"===c.shard){e.next=32;break}return e.t6=a.TONClientError,e.t7=-1,e.next=30,this.completeErrorData({address:t});case 30:throw e.t8=e.sent,e.t6.noBlocks.call(e.t6,e.t7,e.t8);case 32:return e.next=34,this.findLastBlock(s,"id",{shard:{eq:"8000000000000000"}});case 34:if(c=e.sent){e.next=41;break}return e.t9=a.TONClientError,e.next=39,this.completeErrorData({address:t});case 39:throw e.t10=e.sent,e.t9.invalidBlockchain.call(e.t9,"No starting Node SE block found",e.t10);case 41:return e.abrupt("return",c.id);case 42:if((l=null==u||null===(r=u.master)||void 0===r?void 0:r.shard_hashes)&&0!==l.length){e.next=49;break}return e.t11=a.TONClientError,e.next=47,this.completeErrorData({address:t});case 47:throw e.t12=e.sent,e.t11.invalidBlockchain.call(e.t11,"No `shard_hashes` field in masterchain block",e.t12);case 49:return e.next=51,this.findMatchingShard(l,t);case 51:if(f=e.sent,p=null==f||null===(n=f.descr)||void 0===n?void 0:n.root_hash){e.next=59;break}return e.t13=a.TONClientError,e.next=57,this.completeErrorData({address:t});case 57:throw e.t14=e.sent,e.t13.invalidBlockchain.call(e.t13,"No `root_hash` field in shard descr",e.t14);case 59:return e.abrupt("return",p);case 60:case"end":return e.stop()}}),e,this)}))),function(e){return Y.apply(this,arguments)})},{key:"checkShardMatch",value:(z=k(i.default.mark((function e(t,r){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.findMatchingShard([{workchain_id:t.workchain_id||0,shard:t.shard||""}],r);case 2:return e.abrupt("return",!!e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"waitNextBlock",value:(J=k(i.default.mark((function e(t,r,n){var o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.queries.blocks.waitFor({filter:{prev_ref:{root_hash:{eq:t}},OR:{prev_alt_ref:{root_hash:{eq:t}}}},result:D,timeout:n});case 2:if(o=e.sent,e.t0=null==o?void 0:o.after_split,!e.t0){e.next=8;break}return e.next=7,this.checkShardMatch(o,r);case 7:e.t0=!e.sent;case 8:if(!e.t0){e.next=10;break}return e.abrupt("return",this.queries.blocks.waitFor({filter:{id:{ne:o.id},prev_ref:{root_hash:{eq:t}}},result:D,timeout:n}));case 10:return e.abrupt("return",o);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return J.apply(this,arguments)})},{key:"waitForTransaction",value:(W=k(i.default.mark((function e(t){var r,n,o,s,u,c,f,p,h,d,y,v,m,g,b,w,k,_,O;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Date.now(),n=t.message.expire||0,e.next=4,this.ensureMessageId(t.message);case 4:o=e.sent,s=t.message.address,u=E({},t.messageProcessingState),c=null,e.prev=8,f=[],p=n||Math.round((Date.now()+this.config.messageProcessingTimeout())/1e3),h=!1!==t.infiniteWait,d=this.config.messageProcessingTimeout();case 13:if(c){e.next=73;break}return y=Date.now(),v=Math.max(p,y)-y+d,m=null,e.prev=17,g=Date.now(),e.next=21,this.waitNextBlock(u.lastBlockId,s,v);case 21:m=e.sent,b=Date.now(),f.push("Block [".concat(m.id||"","] ")+"has been received: ".concat(b-g," ms, ")+"client time: ".concat(Math.round(b/1e3),", ")+"gen_utime: ".concat(m.gen_utime||0)),e.next=39;break;case 26:if(e.prev=26,e.t0=e.catch(17),this.config.log("Block waiting failed: ",e.t0),h){e.next=38;break}if(w=e.t0,e.t0.code!==a.TONErrorCode.WAIT_FOR_TIMEOUT){e.next=37;break}return e.t1=a.TONClientError,e.next=35,this.completeErrorData({address:s,message_id:o,block_id:u.lastBlockId,timeout:v,message_processing_state:u,expire:n,sending_time:u.sendingTime});case 35:e.t2=e.sent,w=e.t1.networkSilent.call(e.t1,e.t2);case 37:throw w;case 38:this.config.log("Retry waiting.");case 39:if(!m){e.next=71;break}if(u.lastBlockId=m.id||"",!(k=(m.in_msg_descr||[]).find((function(e){return e.msg_id===o})))){e.next=58;break}if(_=k.transaction_id){e.next=50;break}return e.t3=a.TONClientError,e.next=48,this.completeErrorData({address:s,message_id:o});case 48:throw e.t4=e.sent,e.t3.invalidBlockchain.call(e.t3,"No field `transaction_id` in block",e.t4);case 50:return O=Date.now(),e.next=53,this.queries.transactions.waitFor({filter:{id:{eq:_}},result:M,timeout:l.MAX_TIMEOUT});case 53:c=e.sent,N(this.config.tracer,o,"transactionReceived",{transactionId:_}),f.push("Transaction [".concat(_,"] has been received: ").concat(Date.now()-O," ms")),e.next=71;break;case 58:if(!((m.gen_utime||0)>p)){e.next=71;break}if(!n){e.next=66;break}return N(this.config.tracer,o,"messageExpired",{}),e.t5=a.TONClientError,e.next=64,this.completeErrorData({address:s,message_id:o,sending_time:u.sendingTime,expire:p,block_time:m.gen_utime,block_id:u.lastBlockId});case 64:throw e.t6=e.sent,e.t5.messageExpired.call(e.t5,e.t6);case 66:return e.t7=a.TONClientError,e.next=69,this.completeErrorData({address:s,message_id:o,sending_time:u.sendingTime,timeout:v,message_processing_state:u});case 69:throw e.t8=e.sent,e.t7.transactionWaitTimeout.call(e.t7,e.t8);case 71:e.next=13;break;case 73:f.splice(0,0,"Transaction waiting time: ".concat(Date.now()-r," ms")),this.config.log(f.join("\n")),e.next=87;break;case 77:if(e.prev=77,e.t9=e.catch(8),this.config.log("[waitForTransaction]","FAILED",e.t9),e.t9.code!==a.TONErrorCode.MESSAGE_EXPIRED&&e.t9.code!==a.TONErrorCode.TRANSACTION_WAIT_TIMEOUT){e.next=86;break}return e.next=83,this.resolveDetailedError(e.t9,t.message.messageBodyBase64,u.sendingTime,s);case 83:throw e.sent;case 86:throw e.t9;case 87:return e.abrupt("return",this.processTransaction(s,c,t.abi,t.functionName));case 88:case"end":return e.stop()}}),e,this,[[8,77],[17,26]])}))),function(e){return W.apply(this,arguments)})},{key:"processTransaction",value:(G=k(i.default.mark((function e(t,r,n,o){var s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.requestCore("contracts.process.transaction",{transaction:r,abi:n,functionName:o,address:t});case 3:return s=e.sent,e.abrupt("return",E({transaction:r},s));case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,this.queries.accounts.query({filter:{id:{eq:t}},result:"acc_type balance",timeout:1e3});case 11:if(0!==e.sent.length){e.next=19;break}return e.t1=a.TONClientError,e.t2=t,e.next=17,this.completeErrorData({original_error:e.t0,address:t,function_name:o});case 17:throw e.t3=e.sent,e.t1.accountMissing.call(e.t1,e.t2,e.t3);case 19:throw e.t0;case 20:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(e,t,r,n){return G.apply(this,arguments)})},{key:"resolveDetailedError",value:(V=k(i.default.mark((function e(t,r,n,o){var s,u;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.queries.accounts.query({filter:{id:{eq:o}},result:"id acc_type balance balance_other { currency value } boc code_hash data_hash last_paid",timeout:1e3});case 2:if(0!==(s=e.sent).length){e.next=10;break}return e.t0=a.TONClientError,e.t1=o,e.next=8,this.completeErrorData({address:o,original_error:t});case 8:return e.t2=e.sent,e.abrupt("return",e.t0.accountMissing.call(e.t0,e.t1,e.t2));case 10:return S(u=s[0]),e.prev=12,e.next=15,this.requestCore("contracts.resolve.error",{address:o,account:u,messageBase64:r,time:n,mainError:t});case 15:e.next=20;break;case 17:return e.prev=17,e.t3=e.catch(12),e.abrupt("return",e.t3);case 20:return e.abrupt("return",t);case 21:case"end":return e.stop()}}),e,this,[[12,17]])}))),function(e,t,r,n){return V.apply(this,arguments)})},{key:"isDeployed",value:(U=k(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.queries.accounts.query({filter:{id:{eq:t},acc_type:{eq:T.active}},result:"id",parentSpan:r});case 2:return n=e.sent,e.abrupt("return",n.length>0);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return U.apply(this,arguments)})},{key:"processDeployMessage",value:(K=k(i.default.mark((function e(t,r,n){var o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.config.log("processDeployMessage",t),e.next=3,this.isDeployed(t.address,r);case 3:if(!e.sent){e.next=5;break}return e.abrupt("return",{address:t.address,alreadyDeployed:!0});case 5:return e.next=7,this.sendMessage(t.message,r);case 7:return o=e.sent,e.abrupt("return",this.waitForDeployTransaction(t,o,r));case 9:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return K.apply(this,arguments)})},{key:"waitForDeployTransaction",value:(Q=k(i.default.mark((function e(t,r,n,o){var a,s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.message,e.next=3,this.waitForTransaction({message:a,messageProcessingState:r,parentSpan:n,infiniteWait:o});case 3:return s=e.sent,e.abrupt("return",E(E({},s),{},{address:a.address,alreadyDeployed:!1}));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return Q.apply(this,arguments)})},{key:"processRunMessage",value:(B=k(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.config.log("processRunMessage",t),e.next=3,this.sendMessage(t.message,r);case 3:return n=e.sent,e.abrupt("return",this.waitForRunTransaction(t,n,r));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return B.apply(this,arguments)})},{key:"waitForRunTransaction",value:(q=k(i.default.mark((function e(t,r,n,o){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.waitForTransaction({message:t.message,messageProcessingState:r,parentSpan:n,infiniteWait:o,abi:t.abi,functionName:t.functionName}));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return q.apply(this,arguments)})},{key:"processRunMessageLocal",value:(F=k(i.default.mark((function e(t,r,n){var o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.config.log("processRunMessageLocal",t),e.next=3,this.getAccount(t.address,!0,r,n);case 3:return o=e.sent,e.abrupt("return",this.requestCore("contracts.run.local.msg",{address:t.address,account:o,abi:t.abi,functionName:t.functionName,messageBase64:t.message.messageBodyBase64}));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return F.apply(this,arguments)})},{key:"calcRunFees",value:(L=k(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.config.log("calcRunFees",t),e.next=3,this.getAccount(t.address,!0,t.waitParams,r);case 3:return n=e.sent,t.emulateBalance&&(n.balance=this.bigBalance),e.abrupt("return",this.requestCore("contracts.run.fee",{address:t.address,account:n,abi:t.abi,functionName:t.functionName,input:t.input,keyPair:t.keyPair}));case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return L.apply(this,arguments)})},{key:"calcDeployFees",value:(j=k(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.config.log("calcDeployFees",t),e.next=3,this.createDeployMessage(t);case 3:return n=e.sent,e.abrupt("return",this.calcMsgProcessFees({address:n.address,message:n.message,emulateBalance:t.emulateBalance,newAccount:t.newAccount},r));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"calcMsgProcessFees",value:(P=k(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.config.log("calcMsgProcessFees",t),n={balance:this.bigBalance,id:t.address,last_paid:Math.floor(Date.now()/1e3)},t.newAccount){e.next=6;break}return e.next=5,this.getAccount(t.address,!1,t.waitParams,r);case 5:n=e.sent;case 6:return t.emulateBalance&&(n.balance=this.bigBalance),e.abrupt("return",this.requestCore("contracts.run.fee.msg",{address:t.address,account:n,messageBase64:t.message.messageBodyBase64}));case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"convertAddress",value:(A=k(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("contracts.address.convert",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return A.apply(this,arguments)})},{key:"internalDeployNative",value:(R=k(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("contracts.deploy",{abi:t.package.abi,constructorHeader:t.constructorHeader,constructorParams:t.constructorParams,initParams:t.initParams,imageBase64:t.package.imageBase64,keyPair:t.keyPair}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return R.apply(this,arguments)})},{key:"internalRunNative",value:(x=k(i.default.mark((function e(t){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("contracts.run",{address:t.address,abi:t.abi,functionName:t.functionName,header:t.header,input:t.input,keyPair:t.keyPair}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return x.apply(this,arguments)})},{key:"retryCall",value:(_=k(i.default.mark((function e(t){var r,n,o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=this.config.messageRetriesCount(),n=0;case 2:if(!(n<=r)){e.next=19;break}return n>0&&this.config.log("Retry #".concat(n)),e.prev=4,e.next=7,t(n);case 7:return e.abrupt("return",e.sent);case 10:if(e.prev=10,e.t0=e.catch(4),o=function(t){return a.TONClientError.isOriginalContractError(e.t0,t)||a.TONClientError.isResolvedContractErrorAfterExpire(e.t0,t)},(e.t0.code===a.TONErrorCode.MESSAGE_EXPIRED||o(a.TONContractExitCode.REPLAY_PROTECTION)||o(a.TONContractExitCode.MESSAGE_EXPIRED))&&n!==r){e.next=16;break}throw e.t0;case 16:n+=1,e.next=2;break;case 19:return e.t1=a.TONClientError,e.next=22,this.completeErrorData();case 22:throw e.t2=e.sent,e.t1.internalError.call(e.t1,"All retry attempts failed",e.t2);case 24:case"end":return e.stop()}}),e,this,[[4,10]])}))),function(e){return _.apply(this,arguments)})},{key:"internalDeployJs",value:(w=k(i.default.mark((function e(t,r){var n=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.config.log("Deploy start"),e.abrupt("return",this.retryCall(function(){var e=k(i.default.mark((function e(o){var a,s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.createDeployMessage(t,o);case 2:return a=e.sent,e.next=5,n.isDeployed(a.address,r);case 5:if(!e.sent){e.next=7;break}return e.abrupt("return",{address:a.address,alreadyDeployed:!0});case 7:return e.next=9,n.sendMessage(a.message,r);case 9:return s=e.sent,e.abrupt("return",n.waitForDeployTransaction(a,s,r));case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"internalRunJs",value:(h=k(i.default.mark((function e(t,r){var n=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.config.log("Run start"),e.abrupt("return",this.retryCall(function(){var e=k(i.default.mark((function e(o){var a,s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.createRunMessage(t,o);case 2:return a=e.sent,e.next=5,n.sendMessage(a.message,r);case 5:return s=e.sent,e.abrupt("return",n.waitForRunTransaction(a,s,r));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getAccount",value:(p=k(i.default.mark((function e(t,r,n,o){var s,u,c;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={id:{eq:t}},n&&n.transactionLt&&(s.last_trans_lt={ge:n.transactionLt}),r&&(s.acc_type={eq:T.active}),this.config.log("getAccount. Filter",s),e.next=6,this.queries.accounts.query(E(E({filter:s,result:"id acc_type boc code_hash data_hash balance balance_other { currency value } last_paid"},n&&n.timeout?{timeout:n.timeout}:{}),{},{parentSpan:o}));case 6:if(0!==(u=e.sent).length){e.next=14;break}return e.t0=a.TONClientError,e.t1=t,e.next=12,this.completeErrorData({address:t});case 12:throw e.t2=e.sent,e.t0.accountMissing.call(e.t0,e.t1,e.t2);case 14:return S(c=u[0]),this.config.log("getAccount. Account received",c),e.abrupt("return",c);case 18:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return p.apply(this,arguments)})},{key:"internalRunLocalJs",value:(f=k(i.default.mark((function e(t,r){var n,o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.address){e.next=7;break}return e.t0=a.TONClientError,e.next=5,this.completeErrorData({address:n,function_name:t.functionName});case 5:e.t1=e.sent,e.t0.addressRequiredForRunLocal.call(e.t0,e.t1);case 7:if(e.t2=t.account,e.t2){e.next=12;break}return e.next=11,this.getAccount(n,!1,t.waitParams,r);case 11:e.t2=e.sent;case 12:if((o=e.t2).code_hash){e.next=21;break}return e.t3=a.TONClientError,e.t4=n,e.t5=o.balance,e.next=19,this.completeErrorData({address:n,function_name:t.functionName});case 19:throw e.t6=e.sent,e.t3.accountCodeMissing.call(e.t3,e.t4,e.t5,e.t6);case 21:return e.abrupt("return",this.requestCore("contracts.run.local",{address:n,account:o,abi:t.abi,functionName:t.functionName,input:t.input,keyPair:t.keyPair,fullRun:t.fullRun}));case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"internalRunMessageLocalJs",value:(s=k(i.default.mark((function e(t,r){var n,o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.address){e.next=7;break}return e.t0=a.TONClientError,e.next=5,this.completeErrorData({address:n,function_name:t.functionName});case 5:throw e.t1=e.sent,e.t0.addressRequiredForRunLocal.call(e.t0,e.t1);case 7:if(e.t2=t.account,e.t2){e.next=12;break}return e.next=11,this.getAccount(n,!1,t.waitParams,r);case 11:e.t2=e.sent;case 12:if((o=e.t2).code_hash){e.next=21;break}return e.t3=a.TONClientError,e.t4=n,e.t5=o.balance,e.next=19,this.completeErrorData({address:n,function_name:t.functionName});case 19:throw e.t6=e.sent,e.t3.accountCodeMissing.call(e.t3,e.t4,e.t5,e.t6);case 21:return e.abrupt("return",this.requestCore("contracts.run.local.msg",{address:n,account:o,abi:t.abi,functionName:t.functionName,messageBase64:t.messageBodyBase64,fullRun:t.fullRun}));case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"internalSign",value:(o=k(i.default.mark((function e(t,r){var n,o,s,u;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n={base64:t.bytesToSignBase64},!(o=r.box)){e.next=10;break}return e.next=5,o.sign(n,c.TONOutputEncoding.Base64);case 5:return e.t0=e.sent,e.next=8,o.getPublicKey();case 8:return e.t1=e.sent,e.abrupt("return",{signBytesBase64:e.t0,publicKeyHex:e.t1});case 10:if(!(s=r.keys)){e.next=20;break}return e.next=14,this.crypto.naclSignKeypairFromSecretKey(s.secret);case 14:return u=e.sent,e.next=17,this.crypto.naclSignDetached(n,u.secret,c.TONOutputEncoding.Base64);case 17:return e.t2=e.sent,e.t3=u.public,e.abrupt("return",{signBytesBase64:e.t2,publicKeyHex:e.t3});case 20:throw a.TONClientError.signingSourceIsNotSpecified();case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})}])&&y(t.prototype,r),Se}(s.TONModule);t.default=A,A.moduleName="TONContractsModule";var D="\n id\n gen_utime\n after_split\n workchain_id\n shard\n in_msg_descr {\n msg_id\n transaction_id\n }\n",M="\n id\n aborted\n compute {\n skipped_reason\n exit_code\n success\n gas_fees\n }\n storage {\n status_change\n storage_fees_collected\n }\n action {\n success\n valid\n no_funds\n result_code\n total_fwd_fees\n total_action_fees\n }\n in_msg\n now\n out_msgs\n out_messages {\n id\n body\n msg_type\n value\n }\n status\n total_fees\n"},9973:(e,t,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TONMnemonicDictionary=t.TONOutputEncoding=void 0;var i,o=(i=r(7757))&&i.__esModule?i:{default:i},a=r(5351),s=r(4580),u=r(5390);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)}))}}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m={Text:"Text",Hex:"Hex",HexUppercase:"HexUppercase",Base64:"Base64"};function g(e){return e.text?{base64:n.from(e.text,"utf8").toString("base64")}:e}t.TONOutputEncoding=m,t.TONMnemonicDictionary={TON:0,ENGLISH:1,CHINESE_SIMPLIFIED:2,CHINESE_TRADITIONAL:3,FRENCH:4,ITALIAN:5,JAPANESE:6,KOREAN:7,SPANISH:8};var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(W,e);var t,r,n,i,s,c,l,b,w,k,_,E,O,x,T,S,I,N,C,R,A,D,M,P,j,L,F,q,B,Q,K,U,V,G=(U=W,V=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=v(U);if(V){var r=v(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return d(this,e)});function W(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,W),function(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(y(t=G.call(this,e)),"cryptoBoxes",void 0),t.cryptoBoxes=new Map,t}return t=W,(r=[{key:"getCryptoBox",value:function(e){var t=e.encryptedSeedPhrase.text||e.encryptedSeedPhrase.base64||e.encryptedSeedPhrase.hex||"";if(!t)throw a.TONClientError.invalidCryptoBoxParams(e.encryptedSeedPhrase);var r=this.cryptoBoxes.get(t);return r||(r=new u.CoreCryptoBox(this,e),this.cryptoBoxes.set(t,r)),Promise.resolve(r)}},{key:"factorize",value:(K=f(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.math.factorize",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return K.apply(this,arguments)})},{key:"modularPower",value:(Q=f(o.default.mark((function e(t,r,n){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.math.modularPower",{base:t,exponent:r,modulus:n}));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return Q.apply(this,arguments)})},{key:"randomGenerateBytes",value:(B=f(o.default.mark((function e(t){var r,n=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:m.Hex,e.abrupt("return",this.requestCore("crypto.random.generateBytes",{length:t,outputEncoding:r}));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return B.apply(this,arguments)})},{key:"ed25519Keypair",value:(q=f(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.ed25519.keypair"));case 1:case"end":return e.stop()}}),e,this)}))),function(){return q.apply(this,arguments)})},{key:"publicKeyToString",value:(F=f(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.ton_public_key_string",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return F.apply(this,arguments)})},{key:"sha512",value:(L=f(o.default.mark((function e(t){var r,n=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:m.Hex,e.abrupt("return",this.requestCore("crypto.sha512",{message:g(t),outputEncoding:r}));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return L.apply(this,arguments)})},{key:"sha256",value:(j=f(o.default.mark((function e(t){var r,n=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:m.Hex,e.abrupt("return",this.requestCore("crypto.sha256",{message:g(t),outputEncoding:r}));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return j.apply(this,arguments)})},{key:"scrypt",value:(P=f(o.default.mark((function e(t){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=Object.assign({},t)).password=g(t.password),r.salt=g(t.salt),e.abrupt("return",this.requestCore("crypto.scrypt",r));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return P.apply(this,arguments)})},{key:"naclBoxKeypair",value:(M=f(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.nacl.box.keypair"));case 1:case"end":return e.stop()}}),e,this)}))),function(){return M.apply(this,arguments)})},{key:"naclBoxKeypairFromSecretKey",value:(D=f(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.nacl.box.keypair.fromSecretKey",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return D.apply(this,arguments)})},{key:"naclSignKeypair",value:(A=f(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.nacl.sign.keypair"));case 1:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"naclSignKeypairFromSecretKey",value:(R=f(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.nacl.sign.keypair.fromSecretKey",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return R.apply(this,arguments)})},{key:"naclBox",value:(C=f(o.default.mark((function e(t){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=Object.assign({},t)).message=g(t.message),e.abrupt("return",this.requestCore("crypto.nacl.box",r));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return C.apply(this,arguments)})},{key:"naclBoxOpen",value:(N=f(o.default.mark((function e(t){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=Object.assign({},t)).message=g(t.message),e.abrupt("return",this.requestCore("crypto.nacl.box.open",r));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return N.apply(this,arguments)})},{key:"naclSecretBox",value:(I=f(o.default.mark((function e(t){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=Object.assign({},t)).message=g(t.message),e.abrupt("return",this.requestCore("crypto.nacl.secret.box",r));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return I.apply(this,arguments)})},{key:"naclSecretBoxOpen",value:(S=f(o.default.mark((function e(t){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=Object.assign({},t)).message=g(t.message),e.abrupt("return",this.requestCore("crypto.nacl.secret.box.open",r));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return S.apply(this,arguments)})},{key:"naclSign",value:(T=f(o.default.mark((function e(t,r){var n,i=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>2&&void 0!==i[2]?i[2]:m.Hex,e.abrupt("return",this.requestCore("crypto.nacl.sign",{message:g(t),key:r,outputEncoding:n}));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"naclSignOpen",value:(x=f(o.default.mark((function e(t,r){var n,i=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>2&&void 0!==i[2]?i[2]:m.Hex,e.abrupt("return",this.requestCore("crypto.nacl.sign.open",{message:g(t),key:r,outputEncoding:n}));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"naclSignDetached",value:(O=f(o.default.mark((function e(t,r){var n,i=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>2&&void 0!==i[2]?i[2]:m.Hex,e.abrupt("return",this.requestCore("crypto.nacl.sign.detached",{message:g(t),key:r,outputEncoding:n}));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"mnemonicWords",value:(E=f(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.mnemonic.words",t||{}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return E.apply(this,arguments)})},{key:"mnemonicFromRandom",value:(_=f(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.mnemonic.from.random",t||{}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return _.apply(this,arguments)})},{key:"mnemonicFromEntropy",value:(k=f(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.mnemonic.from.entropy",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return k.apply(this,arguments)})},{key:"mnemonicIsValid",value:(w=f(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.mnemonic.verify",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return w.apply(this,arguments)})},{key:"mnemonicDeriveSignKeys",value:(b=f(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.mnemonic.derive.sign.keys",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return b.apply(this,arguments)})},{key:"hdkeyXPrvFromMnemonic",value:(l=f(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.hdkey.xprv.from.mnemonic",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"hdkeyXPrvDerive",value:(c=f(o.default.mark((function e(t,r,n,i){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.hdkey.xprv.derive",{serialized:t,index:r,hardened:n,compliant:i}));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return c.apply(this,arguments)})},{key:"hdkeyXPrvDerivePath",value:(s=f(o.default.mark((function e(t,r,n){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.hdkey.xprv.derive.path",{serialized:t,path:r,compliant:n}));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return s.apply(this,arguments)})},{key:"hdkeyXPrvSecret",value:(i=f(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.hdkey.xprv.secret",{serialized:t}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"hdkeyXPrvPublic",value:(n=f(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestCore("crypto.hdkey.xprv.public",{serialized:t}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"chacha20",value:function(e){return this.requestCore("crypto.chacha20",e)}}])&&p(t.prototype,r),W}(s.TONModule);t.default=b,b.moduleName="TONCryptoModule"},9583:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MAX_TIMEOUT=void 0;var n=b(r(7757)),i=r(2017),o=r(1462),a=r(1803),s=r(678),u=r(6260),c=r(1045),l=b(r(4119)),f=r(5313),p=r(2088),h=r(4725),d=r(314),y=r(5351),v=r(4580),m=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==w(e)&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}(r(1194));function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function b(e){return e&&e.__esModule?e:{default:e}}function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return _(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function E(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function O(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){E(o,n,i,a,s,"next",e)}function s(e){E(o,n,i,a,s,"throw",e)}a(void 0)}))}}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?S(e):t}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){M(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function R(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function D(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),e}function M(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var P=2147483647;function j(e,t,r){return 1===e.length&&t in e[0]?e[0]:r()}t.MAX_TIMEOUT=P;var L=function(){function e(){R(this,e),M(this,"listeners",void 0),M(this,"onComplete",void 0),this.listeners=[],this.onComplete=null}return D(e,[{key:"listen",value:function(){var e={resolve:function(){},reject:function(){}};return this.listeners.push(e),new Promise((function(t,r){e.resolve=t,e.reject=r}))}},{key:"resolve",value:function(e){this.complete((function(t){return t.resolve(e)}))}},{key:"reject",value:function(e){this.complete((function(t){return t.reject(e)}))}},{key:"complete",value:function(e){var t=this.listeners;this.listeners=[],this.onComplete&&this.onComplete(),t.forEach((function(t){return e(t)}))}}]),e}();function F(e){var t=function(e){for(var t="".concat(e||"").split(".").map((function(e){return Number(e)})).slice(0,3);t.length<3;)t.push(0);return 1e6*t[0]+1e3*t[1]+t[2]}(e||"0.24.4");return{version:t,supportsOperationId:t>24004,supportsAggregations:t>=25e3,supportsTime:t>=26003,timeDelta:null}}function q(e){return function(t,n){return new Promise((function(i,o){var a=n.queryTimeout,s=n;if(a){var u=r.g.AbortController?new r.g.AbortController:null;u&&(s=C(C({},n),{},{signal:u.signal})),setTimeout((function(){o(y.TONClientError.queryForciblyAborted(y.emptyTONErrorData)),u&&u.abort()}),a)}e(t,s).then(i,o)}))}}var B=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&x(e,t)}(Z,e);var t,r,v,g,b,_,E,N,C,A,j,B,K,U,V,G,W,J,z,Y,H,$,X=(H=Z,$=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=I(H);if($){var r=I(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return T(this,e)});function Z(e){var t;R(this,Z),M(S(t=X.call(this,e)),"transactions",void 0),M(S(t),"messages",void 0),M(S(t),"blocks",void 0),M(S(t),"accounts",void 0),M(S(t),"blocks_signatures",void 0),M(S(t),"config",void 0),M(S(t),"graphqlClientCreation",void 0),M(S(t),"graphqlClient",void 0),M(S(t),"graphqlClientConfig",void 0),M(S(t),"wsLink",void 0),M(S(t),"httpLink",void 0),M(S(t),"overrideWsUrl",void 0),M(S(t),"operationIdPrefix",void 0),M(S(t),"operationIdSuffix",void 0),M(S(t),"serverInfo",void 0),M(S(t),"activeQueriesRejects",void 0),t.graphqlClient=null,t.graphqlClientCreation=null,t.graphqlClientConfig=null,t.wsLink=null,t.httpLink=null,t.overrideWsUrl=null,t.operationIdPrefix=(Date.now()%6e4).toString(16);for(var r=0;r<10;r+=1){var n=Math.round(256*Math.random()).toString(16);t.operationIdPrefix="".concat(t.operationIdPrefix).concat(n)}return t.operationIdSuffix=1,t.serverInfo=F(),t.activeQueriesRejects=[],t}return D(Z,[{key:"registerQueryReject",value:function(e){this.activeQueriesRejects.push(e)}},{key:"unregisterQueryReject",value:function(e){var t=this.activeQueriesRejects.indexOf(e);t>=0&&this.activeQueriesRejects.splice(t,1)}},{key:"rejectActiveQueries",value:function(){var e=this.activeQueriesRejects;this.activeQueriesRejects=[];var t=y.TONClientError.queryForciblyAborted({});e.forEach((function(e){try{e(t)}catch(e){}}))}},{key:"setup",value:(Y=O(n.default.mark((function e(){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.config=this.context.getModule(m.default),this.transactions=new Q(this,"transactions","Transaction"),this.messages=new Q(this,"messages","Message"),this.blocks=new Q(this,"blocks","Block"),this.accounts=new Q(this,"accounts","Account"),this.blocks_signatures=new Q(this,"blocks_signatures","BlockSignatures");case 6:case"end":return e.stop()}}),e,this)}))),function(){return Y.apply(this,arguments)})},{key:"getQueryUrl",value:function(){var e;return(null===(e=this.graphqlClientConfig)||void 0===e?void 0:e.httpUrl)||""}},{key:"detectRedirect",value:(z=O(n.default.mark((function e(t,r){var i,o,a,s,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(r);case 2:return i=e.sent,e.prev=3,e.next=6,i.text();case 6:o=e.sent,a=JSON.parse(o),this.serverInfo=F(a.data.info.version),e.next=13;break;case 11:e.prev=11,e.t0=e.catch(3);case 13:if(!0!==i.redirected){e.next=15;break}return e.abrupt("return",i.url);case 15:if(!1!==i.redirected){e.next=17;break}return e.abrupt("return","");case 17:return s=m.URLParts.parse(r).fixQuery((function(){return""})).toString().toLowerCase(),u=m.URLParts.parse(i.url).fixQuery((function(){return""})).toString().toLowerCase(),e.abrupt("return",u!==s?i.url:"");case 20:case"end":return e.stop()}}),e,this,[[3,11]])}))),function(e,t){return z.apply(this,arguments)})},{key:"getClientConfig",value:(J=O(n.default.mark((function e(){var t,r,i,o,a,s,u,c,l,f;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=function(e){var t=m.URLParts.parse(e).fixProtocol((function(e){return"http://"===e?e:"https://"})).fixPath((function(e){return"".concat(e,"/graphql")}));return{httpUrl:t.toString(),wsUrl:t.fixProtocol((function(e){return"http://"===e?"ws://":"wss://"})).toString(),fetch:r.fetch,WebSocket:r.WebSocket}},t=this.config,r=d.TONClient.clientPlatform){e.next=5;break}throw Error("TON Client does not configured");case 5:i=r.fetch,a=k(t.data.servers),e.prev=7,a.s();case 9:if((s=a.n()).done){e.next=25;break}return u=s.value,c=o(u),e.prev=12,e.next=15,this.detectRedirect(i,"".concat(c.httpUrl,"?query=%7Binfo%7Bversion%7D%7D"));case 15:return""!==(l=e.sent)&&(f=m.URLParts.parse(l).fixQuery((function(e){return""})),c.httpUrl=f.toString(),c.wsUrl=f.fixProtocol((function(e){return"http://"===e?"ws://":"wss://"})).toString()),e.abrupt("return",c);case 20:e.prev=20,e.t0=e.catch(12),t._errLogVerbose&&console.log('[getClientConfig] for server "'.concat(u,'" failed'),{message:e.t0.message||e.t0.toString(),data:{http_url:c.httpUrl,ws_url:c.wsUrl}});case 23:e.next=9;break;case 25:e.next=30;break;case 27:e.prev=27,e.t1=e.catch(7),a.e(e.t1);case 30:return e.prev=30,a.f(),e.finish(30);case 33:return e.abrupt("return",o(t.data.servers[0]));case 34:case"end":return e.stop()}}),e,this,[[7,27,30,33],[12,20]])}))),function(){return J.apply(this,arguments)})},{key:"getServerInfo",value:(W=O(n.default.mark((function e(t){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.graphqlClientRequired(t);case 2:return e.abrupt("return",this.serverInfo);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return W.apply(this,arguments)})},{key:"serverTimeDelta",value:(G=O(n.default.mark((function e(t){var r,i,o,a,s,u,c;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getServerInfo(t);case 2:if(r=e.sent,!(i=this.graphqlClientConfig)||!r.supportsTime||null!==r.timeDelta){e.next=21;break}return e.prev=5,o=Date.now(),e.next=9,i.fetch("".concat(i.httpUrl,"?query=%7Binfo%7Btime%7D%7D"));case 9:return a=e.sent,s=Date.now(),e.next=13,a.json();case 13:u=e.sent,c=u.data.info.time,r.timeDelta=Math.round(c-(o+(s-o)/2)),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(5),config._errLogVerbose&&console.log(">>>",e.t0);case 21:return e.abrupt("return",r.timeDelta||0);case 22:case"end":return e.stop()}}),e,this,[[5,18]])}))),function(e){return G.apply(this,arguments)})},{key:"serverNow",value:(V=O(n.default.mark((function e(t){var r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.serverTimeDelta(t);case 2:return r=e.sent,e.abrupt("return",Date.now()+r);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return V.apply(this,arguments)})},{key:"dropServerTimeDelta",value:function(){this.serverInfo&&(this.serverInfo.timeDelta=null)}},{key:"generateOperationId",value:function(){return this.operationIdSuffix+=1,"".concat(this.operationIdPrefix).concat(this.operationIdSuffix.toString(16))}},{key:"finishOperations",value:(U=O(n.default.mark((function e(t){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==t.length){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getServerInfo();case 4:if(e.sent.supportsOperationId){e.next=6;break}return e.abrupt("return");case 6:return e.next=8,this.graphqlMutation("mutation finishOperations($operationIds: [String]) {\n finishOperations(operationIds: $operationIds)\n }",{operationIds:t});case 8:case"end":return e.stop()}}),e,this)}))),function(e){return U.apply(this,arguments)})},{key:"getAccountsCount",value:(K=O(n.default.mark((function e(t){var r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.query("query{getAccountsCount}",void 0,t);case 2:return r=e.sent,e.abrupt("return",r.data.getAccountsCount);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return K.apply(this,arguments)})},{key:"getTransactionsCount",value:(B=O(n.default.mark((function e(t){var r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.query("query{getTransactionsCount}",void 0,t);case 2:return r=e.sent,e.abrupt("return",r.data.getTransactionsCount);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return B.apply(this,arguments)})},{key:"getAccountsTotalBalance",value:(j=O(n.default.mark((function e(t){var r;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.query("query{getAccountsTotalBalance}",void 0,t);case 2:return r=e.sent,e.abrupt("return",r.data.getAccountsTotalBalance);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return j.apply(this,arguments)})},{key:"postRequests",value:(A=O(n.default.mark((function e(t,r){var i=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.context.trace("queries.postRequests",function(){var e=O(n.default.mark((function e(r){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i.graphqlMutation("mutation postRequests($requests: [Request]) {\n postRequests(requests: $requests)\n }",{requests:t},r));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"mutation",value:(C=O(n.default.mark((function e(t){var r,i,o=this,a=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},i=a.length>2?a[2]:void 0,e.abrupt("return",this.context.trace("queries.mutation",function(){var e=O(n.default.mark((function e(i){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.setTag("params",{mutation:t,variables:r}),e.abrupt("return",o.graphqlMutation(t,r,i));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),i));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return C.apply(this,arguments)})},{key:"query",value:(N=O(n.default.mark((function e(t){var r,i,o,a=this,s=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=s.length>1&&void 0!==s[1]?s[1]:{},i=s.length>2?s[2]:void 0,o=s.length>3?s[3]:void 0,e.abrupt("return",this.context.trace("queries.query",function(){var e=O(n.default.mark((function e(i){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.setTag("params",{query:t,variables:r}),e.abrupt("return",a.graphqlQuery(t,r,i,o));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),i));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return N.apply(this,arguments)})},{key:"graphqlMutation",value:(E=O(n.default.mark((function e(t){var r,i,o,a=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},i=a.length>2?a[2]:void 0,o=(0,l.default)([t]),e.abrupt("return",this.graphQl((function(e){return e.mutate({mutation:o,variables:r,context:{traceSpan:i}})})));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return E.apply(this,arguments)})},{key:"graphqlQuery",value:(_=O(n.default.mark((function e(t){var r,i,o,a,s,u,c,f,p,h,d=this,y=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=y.length>1&&void 0!==y[1]?y[1]:{},i=y.length>2?y[2]:void 0,o=y.length>3?y[3]:void 0,a=(0,l.default)([t]),s=100,u=Date.now(),c=5e3,f=o||this.config.waitForTimeout();case 8:return e.prev=9,e.delegateYield(n.default.mark((function e(){var t,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.graphqlClientRequired(i);case 2:return t=e.sent,o={traceSpan:i,fetchOptions:{queryTimeout:Math.min(f+c,P)}},e.next=6,new Promise((function(e,i){O(n.default.mark((function s(){var u,c,l;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=!0,c=function(t){u&&(u=!1,e(t))},l=function(e){u&&(u=!1,i(e))},d.registerQueryReject(l),n.prev=4,n.t0=c,n.next=8,t.query({query:a,variables:r,context:o});case 8:n.t1=n.sent,(0,n.t0)(n.t1),n.next=15;break;case 12:n.prev=12,n.t2=n.catch(4),l(n.t2);case 15:return n.prev=15,d.unregisterQueryReject(l),n.finish(15);case 18:case"end":return n.stop()}}),s,null,[[4,12,15,18]])})))()}));case 6:return e.t0=e.sent,e.abrupt("return",{v:e.t0});case 8:case"end":return e.stop()}}),e)}))(),"t0",11);case 11:if("object"!==w(p=e.t0)){e.next=14;break}return e.abrupt("return",p.v);case 14:e.next=26;break;case 16:return e.prev=16,e.t1=e.catch(9),e.next=20,this.resolveGraphQLError(e.t1);case 20:if(h=e.sent,!Z.isNetworkError(h)||this.config.isNetworkTimeoutExpiredSince(u)){e.next=25;break}return e.delegateYield(n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d.config.log(h),t=s,e.next=4,new Promise((function(e){return setTimeout(e,t)}));case 4:s<3200&&(s*=2),c<d.config.waitForTimeout()&&(c+=5e3);case 6:case"end":return e.stop()}}),e)}))(),"t2",23);case 23:e.next=26;break;case 25:throw h;case 26:e.next=8;break;case 28:case"end":return e.stop()}}),e,this,[[9,16]])}))),function(e){return _.apply(this,arguments)})},{key:"resolveGraphQLError",value:(b=O(n.default.mark((function e(t){var r,i,o,a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t.graphQLErrors&&t.graphQLErrors[0])){e.next=8;break}return i=new Error(r.message),o=r.extensions&&r.extensions.exception||{},i.number=o.code||0,i.code=o.code||0,i.source=o.source||"client",e.abrupt("return",i);case 8:if(!(a=t&&t.networkError&&t.networkError.result&&t.networkError.result.errors)){e.next=16;break}return e.t0=y.TONClientError,e.t1=a,e.next=14,this.completeErrorData();case 14:return e.t2=e.sent,e.abrupt("return",e.t0.queryFailed.call(e.t0,e.t1,e.t2));case 16:return e.abrupt("return",t);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return b.apply(this,arguments)})},{key:"graphQl",value:(g=O(n.default.mark((function e(t,r){var i;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.graphqlClientRequired(r);case 2:return i=e.sent,e.prev=3,e.next=6,t(i);case 6:return e.abrupt("return",e.sent);case 9:return e.prev=9,e.t0=e.catch(3),e.next=13,this.resolveGraphQLError(e.t0);case 13:throw e.sent;case 14:case"end":return e.stop()}}),e,this,[[3,9]])}))),function(e,t){return g.apply(this,arguments)})},{key:"graphqlClientRequired",value:(v=O(n.default.mark((function e(t){var r,i=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.graphqlClient){e.next=2;break}return e.abrupt("return",this.graphqlClient);case 2:if(!this.graphqlClientCreation){e.next=7;break}return e.next=5,this.graphqlClientCreation.listen();case 5:e.next=21;break;case 7:return r=new L,this.graphqlClientCreation=r,e.prev=9,e.next=12,this.context.trace("setup client",(function(e){return i.createGraphqlClient(e)}),t);case 12:this.graphqlClientCreation=null,r.resolve(this.graphqlClient),e.next=21;break;case 16:throw e.prev=16,e.t0=e.catch(9),this.graphqlClientCreation=null,r.reject(e.t0),e.t0;case 21:return e.abrupt("return",this.graphqlClient);case 22:case"end":return e.stop()}}),e,this,[[9,16]])}))),function(e){return v.apply(this,arguments)})},{key:"createGraphqlClient",value:(r=O(n.default.mark((function e(t){var r,l,d,y,v,m,g,b,w,k=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=!this.config.data.useWebSocketForQueries,e.next=3,this.getClientConfig();case 3:return l=e.sent,d=this.config.tracer.inject(t,h.FORMAT_TEXT_MAP,{}),(y=new f.SubscriptionClient(l.wsUrl,{timeout:12e4,reconnect:!0,connectionParams:function(){return{accessKey:k.config.data&&k.config.data.accessKey,headers:d}}},l.WebSocket)).onReconnected((function(){k.config._errLogVerbose&&console.log("[TONClient.queries]","WebSocket Reconnected"),k.rejectActiveQueries()})),v={detectingRedirection:!1},y.onError((function(){k.config._errLogVerbose&&console.log("[TONClient.queries]","WebSocket Failed"),v.detectingRedirection||O(n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v.detectingRedirection=!0,e.prev=1,e.next=4,k.getClientConfig();case 4:((t=e.sent).httpUrl!==l.httpUrl||t.wsUrl!==l.wsUrl)&&(k.config._logVerbose&&console.log("[TONClient.queries]","Client config changed"),l=t,k.graphqlClientConfig=l,y.url=t.wsUrl,k.wsLink&&(k.wsLink.url=t.wsUrl),k.httpLink&&(k.httpLink.uri=t.httpUrl)),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),k.config._errLogVerbose&&console.log("[TONClient.queries] redirection detector failed",e.t0);case 12:v.detectingRedirection=!1;case 13:case"end":return e.stop()}}),e,null,[[1,9]])})))()})),y.maxConnectTimeGenerator.duration=function(){return y.maxConnectTimeGenerator.max},e.next=12,(0,p.setContext)((function(e,r){var n=r&&r.traceSpan||t;r.headers={},k.config.tracer.inject(n,h.FORMAT_TEXT_MAP,r.headers);var i=k.config.data&&k.config.data.accessKey;return i&&(r.headers.accessKey=i),{headers:r.headers}}));case 12:m=e.sent,g=function(e){return m.concat(e)},b=function(e){var t=e.query,r=(0,c.getMainDefinition)(t);return"OperationDefinition"===r.kind&&"subscription"===r.operation},this.wsLink=new u.WebSocketLink(y),this.httpLink=r?new s.HttpLink({uri:l.httpUrl,fetch:q(l.fetch)}):null,w=this.httpLink?(0,a.split)(b,g(this.wsLink),g(this.httpLink)):g(this.wsLink),this.graphqlClientConfig=l,this.graphqlClient=new o.ApolloClient({cache:new i.InMemoryCache({}),link:w,defaultOptions:{watchQuery:{fetchPolicy:"no-cache"},query:{fetchPolicy:"no-cache"}}});case 20:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"close",value:(t=O(n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.graphqlClient){e.next=6;break}return t=this.graphqlClient,this.graphqlClient=null,t.stop(),e.next=6,t.clearStore();case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"isNetworkError",value:function(e){if(e.code===y.TONErrorCode.QUERY_FORCIBLY_ABORTED)return!0;var t=e.networkError;return!!t&&("errno"in t||!("response"in t||"result"in t))}}]),Z}(v.TONModule);t.default=B;var Q=function(){function e(t,r,n){R(this,e),M(this,"module",void 0),M(this,"collectionName",void 0),M(this,"typeName",void 0),this.module=t,this.collectionName=r,this.typeName=n}var t,r,i;return D(e,[{key:"query",value:(i=O(n.default.mark((function e(){var t,r,i,o,a,s,u,c,l,f,p,h=this,d=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=d.length,r=new Array(t),i=0;i<t;i++)r[i]=d[i];return o=j(r,"filter",(function(){return{filter:r[0],result:r[1],orderBy:r[2],limit:r[3],timeout:r[4],parentSpan:r[5]}})),a=o.filter,s=o.result,u=o.orderBy,c=o.limit,l=o.timeout,f=o.operationId,p=o.parentSpan,e.abrupt("return",this.module.context.trace("".concat(this.collectionName,".query"),function(){var e=O(n.default.mark((function e(t){var r,i,o,p,d;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.setTag("params",{filter:a,result:s,orderBy:u,limit:c,timeout:l,operationId:f}),e.t0=f,!e.t0){e.next=6;break}return e.next=5,h.module.getServerInfo(t);case 5:e.t0=e.sent.supportsOperationId;case 6:return r=e.t0,i=h.collectionName,o=h.typeName,p="\n query ".concat(i,"(\n $filter: ").concat(o,"Filter,\n $orderBy: [QueryOrderBy], \n $limit: Int, \n $timeout: Float\n ").concat(r?", $operationId: String":"","\n ) {\n ").concat(i,"(\n filter: $filter, \n orderBy: $orderBy, \n limit: $limit, \n timeout: $timeout\n ").concat(r?", operationId: $operationId":"","\n ) { ").concat(s," }\n }"),d={filter:a,orderBy:u,limit:c},r&&(d.operationId=f),l&&(d.timeout=Math.min(P,l)),e.next=15,h.module.graphqlQuery(p,d,t,l);case 15:return e.t1=i,e.abrupt("return",e.sent.data[e.t1]);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),p));case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"aggregate",value:(r=O(n.default.mark((function e(t){var r=this;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.module.context.trace("".concat(this.collectionName,".aggregate"),function(){var e=O(n.default.mark((function e(i){var o,a,s,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.setTag("params",{filter:t.filter,fields:t.fields}),e.next=3,r.module.getServerInfo(i);case 3:if(e.sent.supportsAggregations){e.next=9;break}return e.t0=y.TONClientError,e.next=7,r.module.completeErrorData();case 7:throw e.t1=e.sent,e.t0.serverDoesntSupportAggregations.call(e.t0,e.t1);case 9:return o=r.typeName,a=r.typeName.endsWith("s")?"aggregate".concat(o):"aggregate".concat(o,"s"),s="\n query ".concat(a,"(\n $filter: ").concat(o,"Filter,\n $fields: [FieldAggregation] \n ) {\n ").concat(a,"(\n filter: $filter, \n fields: $fields \n )\n }"),u={filter:t.filter,fields:t.fields},e.next=15,r.module.graphqlQuery(s,u,i);case 15:return e.t2=a,e.abrupt("return",e.sent.data[e.t2]);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.parentSpan));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"subscribe",value:function(){for(var e=this,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var o=j(r,"filter",(function(){return{filter:r[0],result:r[1],onDocEvent:r[2],onError:r[3]}})),a=o.filter,s=o.result,u=o.onDocEvent,c=o.onError,f=this.module.config.tracer.startSpan("TONQueriesModule.js:subscribe ");f.setTag(h.Tags.SPAN_KIND,"client");var p="subscription ".concat(this.collectionName,"($filter: ").concat(this.typeName,"Filter) {\n ").concat(this.collectionName,"(filter: $filter) { ").concat(s," }\n }"),d=(0,l.default)([p]),y=null;return O(n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.module.graphqlClientRequired(f);case 3:r=t.sent,i=r.subscribe({query:d,variables:{filter:a}}),y=i.subscribe((function(t){u("insert/update",t.data[e.collectionName])})),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(0),f.log({event:"failed",payload:t.t0}),c?c(t.t0):config._errLogVerbose&&console.log("TON Client subscription error",t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,8]])})))(),{unsubscribe:function(){y&&(y.unsubscribe(),f.finish())}}}},{key:"waitFor",value:(t=O(n.default.mark((function e(){var t,r,i,o,a,s,u,c,l,f,p,h=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=h.length,r=new Array(t),i=0;i<t;i++)r[i]=h[i];return o=j(r,"filter",(function(){return{filter:r[0],result:r[1],timeout:r[2],parentSpan:r[3]}})),a=o.filter,s=o.result,u=o.timeout,c=o.parentSpan,l=o.operationId,f=u||this.module.config.waitForTimeout(),e.next=5,this.query({filter:a,result:s,timeout:f,parentSpan:c,operationId:l});case 5:if(!((p=e.sent).length>0)){e.next=8;break}return e.abrupt("return",p[0]);case 8:return e.t0=y.TONClientError,e.next=11,this.module.completeErrorData({collection:this.collectionName});case 11:throw e.t1=e.sent,e.t0.waitForTimeout.call(e.t0,e.t1);case 13:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}();B.moduleName="TONQueriesModule"},5390:(e,t,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.decodeMessage=function(e){return e.base64?n.from(e.base64,"base64"):e.hex?n.from(e.hex,"hex"):n.from(e.text||"","utf8")},t.encodeOutput=function(e,t){switch(t){case"Base64":return e.toString("base64");case"Hex":return e.toString("hex");case"HexUppercase":return e.toString("hex").toUpperCase();default:return e.toString("utf8")}},t.CoreCryptoBox=t.DEFAULT_HD_PATH=t.DEFAULT_MNEMONIC_WORD_COUNT=t.DEFAULT_MNEMONIC_DICTIONARY=void 0;var i,o=(i=r(7757))&&i.__esModule?i:{default:i};function a(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,u,"next",e)}function u(e){a(o,n,i,s,u,"throw",e)}s(void 0)}))}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),e}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=new Error("Not implemented"),h=function(){function e(t,r){u(this,e),f(this,"cryptoBox",void 0),f(this,"hdPath",void 0),f(this,"publicKey",void 0),this.cryptoBox=t,this.hdPath=r,this.publicKey=null}var t,r;return l(e,[{key:"getPublicKey",value:(r=s(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.publicKey){e.next=4;break}return e.next=3,this.cryptoBox.getSignKeys(this.hdPath);case 3:this.publicKey=e.sent.public;case 4:return e.abrupt("return",this.publicKey);case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"sign",value:(t=s(o.default.mark((function e(t,r){var n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.cryptoBox.getSignKeys(this.hdPath);case 2:return n=e.sent,e.abrupt("return",this.cryptoBox.crypto.naclSignDetached(t,"".concat(n.secret).concat(n.public),r));case 4:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();t.DEFAULT_MNEMONIC_DICTIONARY=1,t.DEFAULT_MNEMONIC_WORD_COUNT=12;var d="m/44'/396'/0'/0/0";t.DEFAULT_HD_PATH=d;var y=function(){function e(t,r){u(this,e),f(this,"crypto",void 0),f(this,"encryptedSeedPhrase",void 0),f(this,"seedPhraseEncryptionBox",void 0),f(this,"seedPhraseDictionary",void 0),f(this,"seedPhraseWordCount",void 0),f(this,"signingBoxes",void 0),f(this,"encryptionBoxes",void 0),this.crypto=t,this.encryptedSeedPhrase=r.encryptedSeedPhrase,this.seedPhraseEncryptionBox=r.seedPhraseEncryptionBox,this.seedPhraseDictionary=r.seedPhraseDictionary||1,this.seedPhraseWordCount=r.seedPhraseWordCount||12,this.signingBoxes=new Map,this.encryptionBoxes=new Map}var t,r;return l(e,[{key:"getSigningBox",value:(r=s(o.default.mark((function e(t){var r,n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null==t?void 0:t.hdPath,r=null==i?d:i||"m",(n=this.signingBoxes.get(r))||(n=new h(this,r),this.signingBoxes.set(r,n)),e.abrupt("return",n);case 4:case"end":return e.stop()}var i}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getEncryptionBox",value:function(e){throw p}},{key:"close",value:function(){return this.signingBoxes.clear(),this.encryptionBoxes.clear(),Promise.resolve()}},{key:"getSignKeys",value:(t=s(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=this.crypto,e.next=3,this.seedPhraseEncryptionBox.decrypt(this.encryptedSeedPhrase,"Text");case 3:return e.t1=e.sent,e.t2=t,e.t3=this.seedPhraseDictionary,e.t4=this.seedPhraseWordCount,e.t5={phrase:e.t1,path:e.t2,dictionary:e.t3,wordCount:e.t4},e.abrupt("return",e.t0.mnemonicDeriveSignKeys.call(e.t0,e.t5));case 9:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}();t.CoreCryptoBox=y},6007:(e,t,r)=>{const{TONClient:n}=r(314),{TONAddressStringVariant:i,TONClientTransactionPhase:o,TONClientComputeSkippedStatus:a,TONClientStorageStatus:s,QInMsgType:u,QOutMsgType:c,QMessageType:l,QMessageProcessingStatus:f,QBlockProcessingStatus:p,QSplitType:h,QAccountType:d,QTransactionType:y,QTransactionProcessingStatus:v,QAccountStatus:m,QAccountStatusChange:g,QComputeType:b,QSkipReason:w,QBounceType:k}=r(7932),{TONOutputEncoding:_,TONMnemonicDictionary:E}=r(9973);e.exports={TONClient:n,TONAddressStringVariant:i,TONClientTransactionPhase:o,TONClientComputeSkippedStatus:a,TONClientStorageStatus:s,QInMsgType:u,QOutMsgType:c,QMessageType:l,QMessageProcessingStatus:f,QBlockProcessingStatus:p,QSplitType:h,QAccountType:d,QTransactionType:y,QTransactionProcessingStatus:v,QAccountStatus:m,QAccountStatusChange:g,QComputeType:b,QSkipReason:w,QBounceType:k,TONOutputEncoding:_,TONMnemonicDictionary:E}},1899:(e,t,r)=>{"use strict";r.d(t,{Cd:()=>n.TONClient});var n=r(6007);const i={debugLog:null,binaryURL:"/tonclient.wasm"};function o(e){i.debugLog&&i.debugLog(e)}const a={fetch:window?window.fetch.bind(window):fetch,WebSocket,createLibrary:async()=>{const e=new Blob(["\n\nconst wasmWrapper = (function() {\nlet wasm = null;\nconst result = {\n setup: (newWasm) => {\n wasm = newWasm;\n },\n};\n\n\nconst heap = new Array(32).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 36) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nlet cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n\ncachedTextDecoder.decode();\n\nlet cachegetUint8Memory0 = null;\nfunction getUint8Memory0() {\n if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {\n cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachegetUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\n}\n/**\n* @returns {number}\n*/\nresult.core_create_context = function() {\n var ret = wasm.core_create_context();\n return ret >>> 0;\n}\n\n/**\n* @param {number} context\n*/\nresult.core_destroy_context = function(context) {\n wasm.core_destroy_context(context);\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nlet cachedTextEncoder = new TextEncoder('utf-8');\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length);\n getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len);\n\n const mem = getUint8Memory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3);\n const view = getUint8Memory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nlet cachegetInt32Memory0 = null;\nfunction getInt32Memory0() {\n if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {\n cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachegetInt32Memory0;\n}\n/**\n* @param {number} context\n* @param {string} method\n* @param {string} params_json\n* @returns {string}\n*/\nresult.core_json_request = function(context, method, params_json) {\n try {\n var ptr0 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len0 = WASM_VECTOR_LEN;\n var ptr1 = passStringToWasm0(params_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n wasm.core_json_request(8, context, ptr0, len0, ptr1, len1);\n var r0 = getInt32Memory0()[8 / 4 + 0];\n var r1 = getInt32Memory0()[8 / 4 + 1];\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_free(r0, r1);\n }\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nfunction handleError(f) {\n return function () {\n try {\n return f.apply(this, arguments);\n\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n };\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);\n}\n result.wbg = {};\n result.wbg.__wbg_new0_8d817915cd890bd8 = function() {\n var ret = new Date();\n return addHeapObject(ret);\n };\n result.wbg.__wbg_getTime_8e7a0578598e5039 = function(arg0) {\n var ret = getObject(arg0).getTime();\n return ret;\n };\n result.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n result.wbg.__wbg_static_accessor_MODULE_abf5ae284bffdf45 = function() {\n var ret = module;\n return addHeapObject(ret);\n };\n result.wbg.__wbg_self_1c83eb4471d9eb9b = handleError(function() {\n var ret = self.self;\n return addHeapObject(ret);\n });\n result.wbg.__wbg_require_5b2b5b594d809d9f = function(arg0, arg1, arg2) {\n var ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));\n return addHeapObject(ret);\n };\n result.wbg.__wbg_crypto_c12f14e810edcaa2 = function(arg0) {\n var ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n };\n result.wbg.__wbg_msCrypto_679be765111ba775 = function(arg0) {\n var ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n };\n result.wbg.__wbindgen_is_undefined = function(arg0) {\n var ret = getObject(arg0) === undefined;\n return ret;\n };\n result.wbg.__wbg_getRandomValues_05a60bf171bfc2be = function(arg0) {\n var ret = getObject(arg0).getRandomValues;\n return addHeapObject(ret);\n };\n result.wbg.__wbg_getRandomValues_3ac1b33c90b52596 = function(arg0, arg1, arg2) {\n getObject(arg0).getRandomValues(getArrayU8FromWasm0(arg1, arg2));\n };\n result.wbg.__wbg_randomFillSync_6f956029658662ec = function(arg0, arg1, arg2) {\n getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));\n };\n result.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n return result;\n})()\n\n\nself.onmessage = (e) => {\n const message = e.data;\n const setup = message.setup;\n if (setup) {\n (async () => {\n const instance = (await WebAssembly.instantiate(setup.wasmModule, {\n wbg: wasmWrapper.wbg\n })).exports;\n wasmWrapper.setup(instance);\n postMessage({\n setup: {}\n })\n })();\n return;\n }\n const request = message.request;\n if (request) {\n let result;\n try {\n if (request.method === 'context.create') {\n const context = wasmWrapper.core_create_context();\n result = JSON.stringify({result_json: JSON.stringify(context), error_json: ''});\n } else if (request.method === 'context.destroy') {\n wasmWrapper.core_destroy_context(request.context);\n result = JSON.stringify({result_json: '', error_json: ''});\n } else {\n result = wasmWrapper.core_json_request(request.context, request.method, request.params);\n }\n } catch (error) {\n result = JSON.stringify({\n result_json: '',\n error_json: JSON.stringify({\n code: 6,\n message: error.toString()\n })\n });\n }\n postMessage({\n response: {\n id: request.id,\n result,\n }\n });\n }\n};\n"],{type:"application/javascript"}),t=URL.createObjectURL(e),r=new Worker(t),n=new Map;let a=[],s=1;r.onerror=e=>{console.log(`Error from Web Worker: ${e.message}`)};const u=(e,t,i,o)=>{const u=s;s+=1;const c={id:u,context:e,method:t,params:i},l="setup"===t&&null!==a;n.set(u,{callback:l?()=>{}:o}),null!==a?a.push(c):r.postMessage({request:c}),l&&o("","")};let c=null;const l={coreCreateContext:e=>{u(0,"context.create","",(t=>{if(e){const r=JSON.parse(t);e(r)}}))},coreDestroyContext:(e,t)=>{u(e,"context.destroy","",(()=>{t&&t()}))},coreRequest:u,request:(e,t,r)=>{null===c?l.coreCreateContext((n=>{c=n,u(c,e,t,r)})):u(c,e,t,r)}};return r.onmessage=e=>{if(e.data.setup){for(const e of a)r.postMessage({request:e});return void(a=null)}const t=e.data.response;if(t){const e=n.get(t.id);if(!e)return;if(n.delete(t.id),e.callback){let{result:r}=t;r=65279===r.charCodeAt(0)?r.substr(1):r;const{result_json:n,error_json:i}=JSON.parse(r);e.callback(n,i)}}},(async()=>{const e=Date.now();let t;const n=fetch(i.binaryURL);WebAssembly.compileStreaming?(o("compileStreaming binary"),t=await WebAssembly.compileStreaming(n)):(o("compile binary"),t=await WebAssembly.compile(await(await n).arrayBuffer())),r.postMessage({setup:{wasmModule:t}}),o("compile time "+(Date.now()-e))})(),Promise.resolve(l)}};n.TONClient.setLibrary(a)},7591:(e,t,r)=>{"use strict";r.d(t,{ej:()=>s,kG:()=>u});var n=r(655),i="Invariant Violation",o=Object.setPrototypeOf,a=void 0===o?function(e,t){return e.__proto__=t,e}:o,s=function(e){function t(r){void 0===r&&(r=i);var n=e.call(this,"number"==typeof r?i+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=i,a(n,t.prototype),n}return(0,n.ZT)(t,e),t}(Error);function u(e,t){if(!e)throw new s(t)}function c(e){return function(){return console[e].apply(console,arguments)}}!function(e){e.warn=c("warn"),e.error=c("error")}(u||(u={}));var l={env:{}};if("object"==typeof process)l=process;else try{Function("stub","process = stub")(l)}catch(e){}},655:(e,t,r)=>{"use strict";r.d(t,{ZT:()=>i,pi:()=>o,_T:()=>a,mG:()=>s,Jh:()=>u,pr:()=>c});var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function s(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function u(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function c(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}},9904:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(9329);const i=r.n(n)()},9329:(e,t,r)=>{e.exports=r(516).Observable},516:(e,t)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}t.Observable=void 0;var o=function(){return"function"==typeof Symbol},a=function(e){return o()&&Boolean(Symbol[e])},s=function(e){return a(e)?Symbol[e]:"@@"+e};o()&&!a("observable")&&(Symbol.observable=Symbol("observable"));var u=s("iterator"),c=s("observable"),l=s("species");function f(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function p(e){var t=e.constructor;return void 0!==t&&null===(t=t[l])&&(t=void 0),void 0!==t?t:_}function h(e){return e instanceof _}function d(e){d.log?d.log(e):setTimeout((function(){throw e}))}function y(e){Promise.resolve().then((function(){try{e()}catch(e){d(e)}}))}function v(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var r=f(t,"unsubscribe");r&&r.call(t)}}catch(e){d(e)}}function m(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function g(e,t,r){e._state="running";var n=e._observer;try{var i=f(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(m(e),!i)throw r;i.call(n,r);break;case"complete":m(e),i&&i.call(n)}}catch(e){d(e)}"closed"===e._state?v(e):"running"===e._state&&(e._state="ready")}function b(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void y((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(g(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)}))):void g(e,t,r);e._queue.push({type:t,value:r})}}var w=function(){function e(t,n){r(this,e),this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var i=new k(this);try{this._cleanup=n.call(void 0,i)}catch(e){i.error(e)}"initializing"===this._state&&(this._state="ready")}return i(e,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(m(this),v(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),e}(),k=function(){function e(t){r(this,e),this._subscription=t}return i(e,[{key:"next",value:function(e){b(this._subscription,"next",e)}},{key:"error",value:function(e){b(this._subscription,"error",e)}},{key:"complete",value:function(){b(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),_=function(){function e(t){if(r(this,e),!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}return i(e,[{key:"subscribe",value:function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new w(e,this._subscriber)}},{key:"forEach",value:function(e){var t=this;return new Promise((function(r,n){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){n(e),i.unsubscribe()}},error:n,complete:r});else n(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),r()}}))}},{key:"map",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(p(this))((function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))}},{key:"filter",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(p(this))((function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))}},{key:"reduce",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=p(this),n=arguments.length>1,i=!1,o=arguments[1],a=o;return new r((function(r){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||n)try{a=e(a,t)}catch(e){return r.error(e)}else a=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(a),r.complete()}})}))}},{key:"concat",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=p(this);return new i((function(t){var n,o=0;return function e(a){n=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}}))}},{key:"flatMap",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=p(this);return new r((function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){n.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))}},{key:c,value:function(){return this}}],[{key:"from",value:function(t){var r="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var n=f(t,c);if(n){var i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return h(i)&&i.constructor===r?i:new r((function(e){return i.subscribe(e)}))}if(a("iterator")&&(n=f(t,u)))return new r((function(e){y((function(){if(!e.closed){var r=!0,i=!1,o=void 0;try{for(var a,s=n.call(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;if(e.next(u),e.closed)return}}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}e.complete()}}))}));if(Array.isArray(t))return new r((function(e){y((function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i="function"==typeof this?this:e;return new i((function(e){y((function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}}))}))}},{key:l,get:function(){return this}}]),e}();t.Observable=_,o()&&Object.defineProperty(_,Symbol("extensions"),{value:{symbol:c,hostReportError:d},configurable:!0})}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n);var e,t,i=function(){function e(){}return e.prototype.trace=function(e,t){},e.prototype.debug=function(e,t){},e.prototype.info=function(e,t){},e.prototype.warn=function(e,t){},e.prototype.error=function(e,t){},e}(),o=function(){function e(){}return e.prototype.trace=function(e,t){console.log("[DBG] "+e,t)},e.prototype.debug=function(e,t){console.log("[DBG] "+e,t)},e.prototype.info=function(e,t){console.log("[INF] "+e,t)},e.prototype.warn=function(e,t){console.warn("[WRN] "+e,t)},e.prototype.error=function(e,t){console.error("[ERR] "+e,t)},e}(),a=(e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),s=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},u=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},c=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},l=r(1899).Cd,f=(t=Error,a((function(e,r){void 0===r&&(r=void 0);var n=t.call(this,e)||this;return n.innerException=r,n}),t),function(){function e(e){this.__tonClientInitializer=null,void 0===e.logger?this._logger=new i:"string"==typeof e.logger?"console"===e.logger?this._logger=new o:this._logger=new i:this._logger=e.logger,this._server=Object.freeze(c([],e.servers)),this._logger.info("An instance of TONClientFacade was constructed.")}return e.prototype.init=function(){return s(this,void 0,void 0,(function(){var t=this;return u(this,(function(r){switch(r.label){case 0:return null===this.__tonClientInitializer&&(this._logger.trace("TON Client initializing for servers: "+this._server.join(", ")),this._logger.debug("TON Client initializing..."),this.__tonClientInitializer=e._createTONClient(this._server)),this.__tonClientInitializer instanceof Promise?[4,this.__tonClientInitializer.then((function(e){t.__tonClientInitializer=e,t._logger.info("TON Client was initialized successfully.")}))]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}}))}))},e.prototype.dispose=function(){return s(this,void 0,void 0,(function(){var e,t,r,n;return u(this,(function(i){switch(i.label){case 0:if(null===this.__tonClientInitializer)return[3,12];if(e=void 0,!(this.__tonClientInitializer instanceof Promise))return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.__tonClientInitializer];case 2:return e=i.sent(),[3,4];case 3:return t=i.sent(),console.error(t),this.__tonClientInitializer=null,[2];case 4:return[3,6];case 5:e=this.__tonClientInitializer,this.__tonClientInitializer=null,i.label=6;case 6:return i.trys.push([6,8,,9]),[4,e.close()];case 7:return i.sent(),[3,9];case 8:return r=i.sent(),console.error(r),[3,9];case 9:return i.trys.push([9,11,,12]),[4,e.queries.close()];case 10:return i.sent(),[3,12];case 11:return n=i.sent(),console.error(n),[3,12];case 12:return[2]}}))}))},e.prototype.calcDeployFees=function(e,t,r,n){return s(this,void 0,void 0,(function(){var i,o,a,s,c;return u(this,(function(u){switch(u.label){case 0:i=JSON.parse(r),o=Object.freeze({abi:i,imageBase64:n}),a=Object.freeze({owners:["0x"+e],reqConfirms:1}),s=Object.freeze({package:o,constructorParams:a,keyPair:Object.freeze({public:e,secret:t}),emulateBalance:!0,newaccount:!0}),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this._tonClient.contracts.calcDeployFees(s)];case 2:return[2,u.sent().fees];case 3:throw c=u.sent(),this._logger.error("Failure calcDeployFees.",c),c;case 4:return[2]}}))}))},e.prototype.createRunMessage=function(e,t,r,n,i,o){return s(this,void 0,void 0,(function(){var a,s,c,l,f;return u(this,(function(u){switch(u.label){case 0:a=JSON.parse(n),s=JSON.parse(o),c=Object.freeze({public:e,secret:t}),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this._tonClient.contracts.createRunMessage(Object.freeze({address:r,abi:a,functionName:i,input:s,keyPair:c}))];case 2:return l=u.sent(),[2,JSON.stringify(l)];case 3:throw f=u.sent(),this._logger.error("Failure createRunMessage.",f),f;case 4:return[2]}}))}))},e.prototype.deriveKeyPair=function(e){return s(this,void 0,void 0,(function(){var t,r,n;return u(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),t=JSON.parse(e),[4,this._tonClient.crypto.mnemonicDeriveSignKeys({dictionary:1,wordCount:t.seedMnemonicWords.length,phrase:t.seedMnemonicWords.join(" "),path:t.hdpath})];case 1:return r=i.sent(),[2,JSON.stringify(r)];case 2:throw n=i.sent(),this._logger.error("Failure deriveKeyPair.",n),n;case 3:return[2]}}))}))},e.prototype.deployContract=function(e,t,r,n){return s(this,void 0,void 0,(function(){var i,o,a,s,c,l,f;return u(this,(function(u){switch(u.label){case 0:i=JSON.parse(r),o=Object.freeze({abi:i,imageBase64:n}),a=Object.freeze({owners:["0x"+e],reqConfirms:1}),s=Object.freeze({package:o,constructorParams:a,keyPair:Object.freeze({public:e,secret:t})}),u.label=1;case 1:return u.trys.push([1,5,,6]),[4,this._tonClient.contracts.createDeployMessage(s)];case 2:return c=u.sent(),[4,this._tonClient.contracts.sendMessage(c.message)];case 3:return l=u.sent(),[4,this._tonClient.contracts.waitForDeployTransaction(c,l)];case 4:return u.sent(),[3,6];case 5:throw f=u.sent(),this._logger.error("Failure deployContract.",f),f;case 6:return[2]}}))}))},e.prototype.generateMnemonicPhraseSeed=function(e){return s(this,void 0,void 0,(function(){var t,r,n;return u(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this._tonClient.crypto.mnemonicFromRandom({dictionary:1,wordCount:e})];case 1:return t=i.sent(),r=t.split(" "),[2,JSON.stringify(r)];case 2:throw n=i.sent(),this._logger.error("Failure generateMnemonicPhraseSeed.",n),n;case 3:return[2]}}))}))},e.prototype.getDeployData=function(e,t,r){return s(this,void 0,void 0,(function(){var n,i,o;return u(this,(function(a){switch(a.label){case 0:n=JSON.parse(t),i={abi:n,imageBase64:r,publicKeyHex:e,workchainId:0},a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this._tonClient.contracts.getDeployData(i)];case 2:return[2,a.sent().address];case 3:throw o=a.sent(),this._logger.error("Failure getDeployData.",o),o;case 4:return[2]}}))}))},e.prototype.fetchAccountInformation=function(e){return s(this,void 0,void 0,(function(){var t,r,n,i,o;return u(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this._tonClient.queries.accounts.query({id:{in:e}},"id, balance(format: DEC), code_hash")];case 1:return t=a.sent(),Array.isArray(t)&&0!==t.length?(r=t[0].balance,n=t[0].code_hash,i={balance:r,codeHash:n},[2,Object.freeze(i)]):[2,null];case 2:throw o=a.sent(),this._logger.error("Failure fetchAccountInformation.",o),o;case 3:return[2]}}))}))},e.prototype.sendMessage=function(e){return s(this,void 0,void 0,(function(){var t,r,n;return u(this,(function(i){switch(i.label){case 0:t=JSON.parse(e),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._tonClient.contracts.sendMessage(t.message)];case 2:return r=i.sent(),[2,JSON.stringify(r)];case 3:throw n=i.sent(),this._logger.error("Failure sendMessage.",n),n;case 4:return[2]}}))}))},e.prototype.waitForRunTransaction=function(e,t){return s(this,void 0,void 0,(function(){var r,n,i;return u(this,(function(o){switch(o.label){case 0:r=JSON.parse(e),n=JSON.parse(t),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this._tonClient.contracts.waitForRunTransaction(r,n)];case 2:return[2,o.sent()];case 3:throw i=o.sent(),this._logger.error("Failure waitForRunTransaction.",i),i;case 4:return[2]}}))}))},Object.defineProperty(e.prototype,"_tonClient",{get:function(){if(null===this.__tonClientInitializer||this.__tonClientInitializer instanceof Promise)throw new Error("Invalid operation. Did you init()?.");return this.__tonClientInitializer},enumerable:!1,configurable:!0}),e._createTONClient=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,l.create({servers:c([],e)})];case 1:return[2,t.sent()]}}))}))},e}());window?void 0===window.freeton_wallet_platform?window.freeton_wallet_platform=Object.freeze({version:r.g.__VERSION__,TONClientFacade:f}):console.error("Failure. Cannot link freeton_wallet_platform twice. A freeton_wallet_platform "+window.freeton_wallet_platform.version+" already linked to global window object."):console.error("Failure. Cannot link freeton_wallet_platform due global window object is not exist.")})(),n})()}));