@dcl/explorer-website 0.1.0-7378979040.commit-0cf2023 → 0.1.0-7397946989.commit-041bddf

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/asset-manifest.json +45 -43
  2. package/index.html +1 -1
  3. package/package.json +3 -3
  4. package/static/css/2.cabf83a6.chunk.css +426 -0
  5. package/static/css/2.cabf83a6.chunk.css.map +1 -0
  6. package/static/css/main.4a2c0515.chunk.css +2 -0
  7. package/static/css/main.4a2c0515.chunk.css.map +1 -0
  8. package/static/js/2.9cf51646.chunk.js +15 -0
  9. package/static/js/{2.4b939f47.chunk.js.LICENSE.txt → 2.9cf51646.chunk.js.LICENSE.txt} +12 -10
  10. package/static/js/2.9cf51646.chunk.js.map +1 -0
  11. package/static/js/3.2366bca8.chunk.js +3 -0
  12. package/static/js/{3.b22ae47b.chunk.js.map → 3.2366bca8.chunk.js.map} +1 -1
  13. package/static/js/{4.76acd3df.chunk.js → 4.2238dbd3.chunk.js} +3 -3
  14. package/static/js/{4.76acd3df.chunk.js.map → 4.2238dbd3.chunk.js.map} +1 -1
  15. package/static/js/{5.c3f66183.chunk.js → 5.a0b2335a.chunk.js} +2 -2
  16. package/static/js/{5.c3f66183.chunk.js.map → 5.a0b2335a.chunk.js.map} +1 -1
  17. package/static/js/6.376edb7c.chunk.js +2 -0
  18. package/static/js/{6.847c4e67.chunk.js.map → 6.376edb7c.chunk.js.map} +1 -1
  19. package/static/js/main.44a7377c.chunk.js +2 -0
  20. package/static/js/main.44a7377c.chunk.js.map +1 -0
  21. package/static/js/runtime-main.7cf846ad.js +2 -0
  22. package/static/js/{runtime-main.d443990d.js.map → runtime-main.7cf846ad.js.map} +1 -1
  23. package/static/media/brand-icons.278156e4.woff2 +0 -0
  24. package/static/media/brand-icons.65a2fb6d.ttf +0 -0
  25. package/static/media/brand-icons.6729d297.svg +1008 -0
  26. package/static/media/brand-icons.cac87dc0.woff +0 -0
  27. package/static/media/brand-icons.d68fa3e6.eot +0 -0
  28. package/static/media/flags.99f63ae7.png +0 -0
  29. package/static/media/icons.38c6d8ba.woff2 +0 -0
  30. package/static/media/icons.425399f8.woff +0 -0
  31. package/static/media/icons.62d9dae4.svg +1518 -0
  32. package/static/media/icons.a01e3f2d.eot +0 -0
  33. package/static/media/icons.c656b8ca.ttf +0 -0
  34. package/static/media/outline-icons.53671035.ttf +0 -0
  35. package/static/media/outline-icons.687a4990.woff2 +0 -0
  36. package/static/media/outline-icons.752905fa.eot +0 -0
  37. package/static/media/outline-icons.9c4845b4.svg +366 -0
  38. package/static/media/outline-icons.ddae9b1b.woff +0 -0
  39. package/static/media/simple-logo.a0996199.svg +32 -0
  40. package/static/css/2.00a30b69.chunk.css +0 -65
  41. package/static/css/2.00a30b69.chunk.css.map +0 -1
  42. package/static/css/main.afc539b6.chunk.css +0 -2
  43. package/static/css/main.afc539b6.chunk.css.map +0 -1
  44. package/static/js/2.4b939f47.chunk.js +0 -9
  45. package/static/js/2.4b939f47.chunk.js.map +0 -1
  46. package/static/js/3.b22ae47b.chunk.js +0 -3
  47. package/static/js/6.847c4e67.chunk.js +0 -2
  48. package/static/js/main.f6a2f207.chunk.js +0 -2
  49. package/static/js/main.f6a2f207.chunk.js.map +0 -1
  50. package/static/js/runtime-main.d443990d.js +0 -2
  51. /package/static/js/{3.b22ae47b.chunk.js.LICENSE.txt → 3.2366bca8.chunk.js.LICENSE.txt} +0 -0
  52. /package/static/js/{4.76acd3df.chunk.js.LICENSE.txt → 4.2238dbd3.chunk.js.LICENSE.txt} +0 -0
@@ -1,3 +0,0 @@
1
- /*! For license information please see 3.b22ae47b.chunk.js.LICENSE.txt */
2
- (this["webpackJsonp@dcl/explorer-website"]=this["webpackJsonp@dcl/explorer-website"]||[]).push([[3],{1097:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletProvider=t.CoinbaseWalletSDK=void 0;const r=n(1196),i=n(1163);var o=n(1196);Object.defineProperty(t,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return o.CoinbaseWalletSDK}});var s=n(1163);Object.defineProperty(t,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return s.CoinbaseWalletProvider}}),t.default=r.CoinbaseWalletSDK,"undefined"!==typeof window&&(window.CoinbaseWalletSDK=r.CoinbaseWalletSDK,window.CoinbaseWalletProvider=i.CoinbaseWalletProvider,window.WalletLink=r.CoinbaseWalletSDK,window.WalletLinkProvider=i.CoinbaseWalletProvider)},1108:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(83),i=n(1137),o=n(1199),s=n(1111),a=n(1170),u=n(1136),c=n(1169),l=function(e){function t(n,r,i){var s=e.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=o.a;break;case 1:if(!n){s.destination=o.a;break}if("object"===typeof n){n instanceof t?(s.syncErrorThrowable=n.syncErrorThrowable,s.destination=n,n.add(s)):(s.syncErrorThrowable=!0,s.destination=new h(s,n));break}default:s.syncErrorThrowable=!0,s.destination=new h(s,n,r,i)}return s}return r.__extends(t,e),t.prototype[a.a]=function(){return this},t.create=function(e,n,r){var i=new t(e,n,r);return i.syncErrorThrowable=!1,i},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.a),h=function(e){function t(t,n,r,s){var a,u=e.call(this)||this;u._parentSubscriber=t;var c=u;return Object(i.a)(n)?a=n:n&&(a=n.next,r=n.error,s=n.complete,n!==o.a&&(c=Object.create(n),Object(i.a)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=a,u._error=r,u._complete=s,u}return r.__extends(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=u.a.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):Object(c.a)(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;Object(c.a)(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};u.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(n){if(this.unsubscribe(),u.a.useDeprecatedSynchronousErrorHandling)throw n;Object(c.a)(n)}},t.prototype.__tryOrSetError=function(e,t,n){if(!u.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(r){return u.a.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=r,e.syncErrorThrown=!0,!0):(Object(c.a)(r),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(l)},1109:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1173),i=n(1108),o=n(1170),s=n(1199);var a=n(1122),u=n(1148),c=n(1136),l=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,a=function(e,t,n){if(e){if(e instanceof i.a)return e;if(e[o.a])return e[o.a]()}return e||t||n?new i.a(e,t,n):new i.a(s.a)}(e,t,n);if(r?a.add(r.call(a,this.source)):a.add(this.source||c.a.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),c.a.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){c.a.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),Object(r.a)(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=h(t))((function(t,r){var i;i=n.subscribe((function(t){try{e(t)}catch(n){r(n),i&&i.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[a.a]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:Object(u.b)(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=h(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function h(e){if(e||(e=c.a.Promise||Promise),!e)throw new Error("no Promise impl found");return e}},1110:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return c}));var r=n(83),i=n(1108),o=n(1109),s=n(1161),a=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,n}return r.__extends(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(i.a),u=(i.a,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(i.a));i.a;function c(e,t){if(!t.closed){if(e instanceof o.a)return e.subscribe(t);var n;try{n=Object(s.a)(e)(t)}catch(r){t.error(r)}return n}}},1111:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1114),i=n(1172),o=n(1137),s=n(1171),a=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}var t;return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this,a=n._parentOrParents,c=n._ctorUnsubscribe,l=n._unsubscribe,h=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,a instanceof e)a.remove(this);else if(null!==a)for(var d=0;d<a.length;++d){a[d].remove(this)}if(Object(o.a)(l)){c&&(this._unsubscribe=void 0);try{l.call(this)}catch(b){t=b instanceof s.a?u(b.errors):[b]}}if(Object(r.a)(h)){d=-1;for(var f=h.length;++d<f;){var p=h[d];if(Object(i.a)(p))try{p.unsubscribe()}catch(b){t=t||[],b instanceof s.a?t=t.concat(u(b.errors)):t.push(b)}}}if(t)throw new s.a(t)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!==typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var i=n._parentOrParents;if(null===i)n._parentOrParents=this;else if(i instanceof e){if(i===this)return n;n._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return n;i.push(this)}var o=this._subscriptions;return null===o?this._subscriptions=[n]:o.push(n),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=((t=new e).closed=!0,t),e}();function u(e){return e.reduce((function(e,t){return e.concat(t instanceof s.a?t.errors:t)}),[])}},1112:function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return h}));var r=n(83),i=n(1109),o=n(1108),s=n(1111),a=n(1138),u=n(1200),c=n(1170),l=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return r.__extends(t,e),t}(o.a),h=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r.__extends(t,e),t.prototype[c.a]=function(){return new l(this)},t.prototype.lift=function(e){var t=new d(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new a.a;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].next(e)},t.prototype.error=function(e){if(this.closed)throw new a.a;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new a.a;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new a.a;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new a.a;return this.hasError?(e.error(this.thrownError),s.a.EMPTY):this.isStopped?(e.complete(),s.a.EMPTY):(this.observers.push(e),new u.a(this,e))},t.prototype.asObservable=function(){var e=new i.a;return e.source=this,e},t.create=function(e,t){return new d(e,t)},t}(i.a),d=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return r.__extends(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):s.a.EMPTY},t}(h)},1113:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(1146),i=new(n(1141).a)(r.a),o=i},1114:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){return Array.isArray||function(e){return e&&"number"===typeof e.length}}()},1115:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(83),i=n(1108);function o(e,t){return function(n){if("function"!==typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new s(e,t))}}var s=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.project,this.thisArg))},e}(),a=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return r.__extends(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(t)},t}(i.a)},1116:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(1109),i=new r.a((function(e){return e.complete()}));function o(e){return e?function(e){return new r.a((function(t){return e.schedule((function(){return t.complete()}))}))}(e):i}},1117:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1109),i=n(1161),o=n(1194);function s(e,t){return t?Object(o.a)(e,t):e instanceof r.a?e:new r.a(Object(i.a)(e))}},1119:function(e,t,n){"use strict";function r(e){return e&&"function"===typeof e.schedule}n.d(t,"a",(function(){return r}))},1120:function(e,t,n){"use strict";function r(e){return e}n.d(t,"a",(function(){return r}))},1121:function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createQrUrl=t.getFavicon=t.range=t.isBigNumber=t.ensureParsedJSONObject=t.ensureBN=t.ensureRegExpString=t.ensureIntNumber=t.ensureBuffer=t.ensureAddressString=t.ensureEvenLengthHexString=t.ensureHexString=t.isHexString=t.prepend0x=t.strip0x=t.has0xPrefix=t.hexStringFromIntNumber=t.intNumberFromHexString=t.bigIntStringFromBN=t.hexStringFromBuffer=t.hexStringToUint8Array=t.uint8ArrayToHex=t.randomBytesHex=void 0;const i=r(n(17)),o=n(1232),s=n(1185),a=/^[0-9]*$/,u=/^[a-f0-9]*$/;function c(e){return[...e].map((e=>e.toString(16).padStart(2,"0"))).join("")}function l(e){return e.startsWith("0x")||e.startsWith("0X")}function h(e){return l(e)?e.slice(2):e}function d(e){return l(e)?"0x"+e.slice(2):"0x"+e}function f(e){if("string"!==typeof e)return!1;const t=h(e).toLowerCase();return u.test(t)}function p(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"===typeof e){const n=h(e).toLowerCase();if(u.test(n))return(0,s.HexString)(t?"0x"+n:n)}throw new Error(`"${String(e)}" is not a hexadecimal string`)}function b(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=p(e,!1);return n.length%2===1&&(n=(0,s.HexString)("0"+n)),t?(0,s.HexString)("0x"+n):n}function g(e){if("number"===typeof e&&Number.isInteger(e))return(0,s.IntNumber)(e);if("string"===typeof e){if(a.test(e))return(0,s.IntNumber)(Number(e));if(f(e))return(0,s.IntNumber)(new i.default(b(e,!1),16).toNumber())}throw new Error(`Not an integer: ${String(e)}`)}function y(e){if(null==e||"function"!==typeof e.constructor)return!1;const{constructor:t}=e;return"function"===typeof t.config&&"number"===typeof t.EUCLID}t.randomBytesHex=function(e){return c(crypto.getRandomValues(new Uint8Array(e)))},t.uint8ArrayToHex=c,t.hexStringToUint8Array=function(e){return new Uint8Array(e.match(/.{1,2}/g).map((e=>parseInt(e,16))))},t.hexStringFromBuffer=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.toString("hex");return(0,s.HexString)(t?"0x"+n:n)},t.bigIntStringFromBN=function(e){return(0,s.BigIntString)(e.toString(10))},t.intNumberFromHexString=function(e){return(0,s.IntNumber)(new i.default(b(e,!1),16).toNumber())},t.hexStringFromIntNumber=function(e){return(0,s.HexString)("0x"+new i.default(e).toString(16))},t.has0xPrefix=l,t.strip0x=h,t.prepend0x=d,t.isHexString=f,t.ensureHexString=p,t.ensureEvenLengthHexString=b,t.ensureAddressString=function(e){if("string"===typeof e){const t=h(e).toLowerCase();if(f(t)&&40===t.length)return(0,s.AddressString)(d(t))}throw new Error(`Invalid Ethereum address: ${String(e)}`)},t.ensureBuffer=function(t){if(e.isBuffer(t))return t;if("string"===typeof t){if(f(t)){const n=b(t,!1);return e.from(n,"hex")}return e.from(t,"utf8")}throw new Error(`Not binary data: ${String(t)}`)},t.ensureIntNumber=g,t.ensureRegExpString=function(e){if(e instanceof RegExp)return(0,s.RegExpString)(e.toString());throw new Error(`Not a RegExp: ${String(e)}`)},t.ensureBN=function(e){if(null!==e&&(i.default.isBN(e)||y(e)))return new i.default(e.toString(10),10);if("number"===typeof e)return new i.default(g(e));if("string"===typeof e){if(a.test(e))return new i.default(e,10);if(f(e))return new i.default(b(e,!1),16)}throw new Error(`Not an integer: ${String(e)}`)},t.ensureParsedJSONObject=function(e){if("string"===typeof e)return JSON.parse(e);if("object"===typeof e)return e;throw new Error(`Not a JSON string or an object: ${String(e)}`)},t.isBigNumber=y,t.range=function(e,t){return Array.from({length:t-e},((t,n)=>e+n))},t.getFavicon=function(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:n}=document.location,r=e?e.getAttribute("href"):null;return!r||r.startsWith("javascript:")?null:r.startsWith("http://")||r.startsWith("https://")||r.startsWith("data:")?r:r.startsWith("//")?t+r:`${t}//${n}${r}`},t.createQrUrl=function(e,t,n,r){const i=r?"parent-id":"id";return`${n}/#/link?${(0,o.stringify)({[i]:e,secret:t,server:n,v:"1"})}`}}).call(this,n(304).Buffer)},1122:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){return"function"===typeof Symbol&&Symbol.observable||"@@observable"}()},1123:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(83),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.notifyNext=function(e,t,n,r,i){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(n(1108).a)},1124:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(83),i=n(1108);function o(e,t){return function(n){return n.lift(new s(e,t))}}var s=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.predicate,this.thisArg))},e}(),a=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return r.__extends(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}t&&this.destination.next(e)},t}(i.a)},1127:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(83),i=function(e){function t(t,n,r){var i=e.call(this)||this;return i.parent=t,i.outerValue=n,i.outerIndex=r,i.index=0,i}return r.__extends(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(n(1108).a),o=n(1161),s=n(1109);function a(e,t,n,r,a){if(void 0===a&&(a=new i(e,n,r)),!a.closed)return t instanceof s.a?t.subscribe(a):Object(o.a)(t)(a)}},1128:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}));var r,i=n(1116),o=n(1139),s=n(1152);r||(r={});var a=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}},e.prototype.accept=function(e,t,n){return e&&"function"===typeof e.next?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){switch(this.kind){case"N":return Object(o.a)(this.value);case"E":return Object(s.a)(this.error);case"C":return Object(i.b)()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return"undefined"!==typeof t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},1129:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},1130:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}()},1131:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return l}));var r=n(83),i=n(1115),o=n(1117),s=n(1110);function a(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"===typeof t?function(r){return r.pipe(a((function(n,r){return Object(o.a)(e(n,r)).pipe(Object(i.a)((function(e,i){return t(n,e,r,i)})))}),n))}:("number"===typeof t&&(n=t),function(t){return t.lift(new u(e,n))})}var u=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project,this.concurrent))},e}(),c=function(e){function t(t,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=e.call(this,t)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.__extends(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(r){return void this.destination.error(r)}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.a(this),n=this.destination;n.add(t);var r=Object(s.c)(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(s.b),l=a},1132:function(e,t,n){"use strict";var r={};function i(e,t,n){n||(n=Error);var i=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"===typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=e,r[e]=i}function o(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,s,a;if("string"===typeof t&&(i="not ",t.substr(!s||s<0?0:+s,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))a="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var u=function(e,t,n){return"number"!==typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(u," ").concat(r," ").concat(o(t,"type"))}return a+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},1133:function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var i=n(1209),o=n(1213);n(490)(c,i);for(var s=r(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||t.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,n(91))},1134:function(e,t,n){"use strict";n.r(t),n.d(t,"Component",(function(){return m})),n.d(t,"Fragment",(function(){return _})),n.d(t,"cloneElement",(function(){return F})),n.d(t,"createContext",(function(){return U})),n.d(t,"createElement",(function(){return b})),n.d(t,"createRef",(function(){return y})),n.d(t,"h",(function(){return b})),n.d(t,"hydrate",(function(){return H})),n.d(t,"isValidElement",(function(){return s})),n.d(t,"options",(function(){return i})),n.d(t,"render",(function(){return B})),n.d(t,"toChildArray",(function(){return C}));var r,i,o,s,a,u,c,l={},h=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function f(e,t){for(var n in t)e[n]=t[n];return e}function p(e){var t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n){var i,o,s,a={};for(s in t)"key"==s?i=t[s]:"ref"==s?o=t[s]:a[s]=t[s];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return g(e,a,i,o,null)}function g(e,t,n,r,s){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==s?++o:s};return null==s&&null!=i.vnode&&i.vnode(a),a}function y(){return{current:null}}function _(e){return e.children}function m(e,t){this.props=e,this.context=t}function v(e,t){if(null==t)return e.__?v(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?v(e):null}function w(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return w(e)}}function S(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!E.__r++||u!==i.debounceRendering)&&((u=i.debounceRendering)||setTimeout)(E)}function E(){for(var e;E.__r=a.length;)e=a.sort((function(e,t){return e.__v.__b-t.__v.__b})),a=[],e.some((function(e){var t,n,r,i,o,s;e.__d&&(o=(i=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=f({},i)).__v=i.__v+1,j(s,i,r,t.__n,void 0!==s.ownerSVGElement,null!=i.__h?[o]:null,n,null==o?v(i):o,i.__h),N(n,i),i.__e!=o&&w(i)))}))}function x(e,t,n,r,i,o,s,a,u,c){var d,f,p,b,y,m,w,S=r&&r.__k||h,E=S.length;for(n.__k=[],d=0;d<t.length;d++)if(null!=(b=n.__k[d]=null==(b=t[d])||"boolean"==typeof b?null:"string"==typeof b||"number"==typeof b||"bigint"==typeof b?g(null,b,null,null,b):Array.isArray(b)?g(_,{children:b},null,null,null):b.__b>0?g(b.type,b.props,b.key,b.ref?b.ref:null,b.__v):b)){if(b.__=n,b.__b=n.__b+1,null===(p=S[d])||p&&b.key==p.key&&b.type===p.type)S[d]=void 0;else for(f=0;f<E;f++){if((p=S[f])&&b.key==p.key&&b.type===p.type){S[f]=void 0;break}p=null}j(e,b,p=p||l,i,o,s,a,u,c),y=b.__e,(f=b.ref)&&p.ref!=f&&(w||(w=[]),p.ref&&w.push(p.ref,null,b),w.push(f,b.__c||y,b)),null!=y?(null==m&&(m=y),"function"==typeof b.type&&b.__k===p.__k?b.__d=u=k(b,u,e):u=R(e,b,p,S,y,u),"function"==typeof n.type&&(n.__d=u)):u&&p.__e==u&&u.parentNode!=e&&(u=v(p))}for(n.__e=m,d=E;d--;)null!=S[d]&&L(S[d],S[d]);if(w)for(d=0;d<w.length;d++)P(w[d],w[++d],w[++d])}function k(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?k(r,t,n):R(n,r,r,i,r.__e,t));return t}function C(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){C(e,t)})):t.push(e)),t}function R(e,t,n,r,i,o){var s,a,u;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,u=0;(a=a.nextSibling)&&u<r.length;u+=1)if(a==i)break e;e.insertBefore(i,o),s=o}return void 0!==s?s:i.nextSibling}function M(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||d.test(t)?n:n+"px"}function O(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||M(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||M(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?I:A,o):e.removeEventListener(t,o?I:A,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function A(e){this.l[e.type+!1](i.event?i.event(e):e)}function I(e){this.l[e.type+!0](i.event?i.event(e):e)}function j(e,t,n,r,o,s,a,u,c){var l,h,d,p,b,g,y,v,w,S,E,k,C,R,M,O=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(c=n.__h,u=t.__e=n.__e,t.__h=null,s=[u]),(l=i.__b)&&l(t);try{e:if("function"==typeof O){if(v=t.props,w=(l=O.contextType)&&r[l.__c],S=l?w?w.props.value:l.__:r,n.__c?y=(h=t.__c=n.__c).__=h.__E:("prototype"in O&&O.prototype.render?t.__c=h=new O(v,S):(t.__c=h=new m(v,S),h.constructor=O,h.render=D),w&&w.sub(h),h.props=v,h.state||(h.state={}),h.context=S,h.__n=r,d=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=O.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=f({},h.__s)),f(h.__s,O.getDerivedStateFromProps(v,h.__s))),p=h.props,b=h.state,d)null==O.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==O.getDerivedStateFromProps&&v!==p&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(v,S),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(v,h.__s,S)||t.__v===n.__v){for(h.props=v,h.state=h.__s,t.__v!==n.__v&&(h.__d=!1),h.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),E=0;E<h._sb.length;E++)h.__h.push(h._sb[E]);h._sb=[],h.__h.length&&a.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(v,h.__s,S),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(p,b,g)}))}if(h.context=S,h.props=v,h.__v=t,h.__P=e,k=i.__r,C=0,"prototype"in O&&O.prototype.render){for(h.state=h.__s,h.__d=!1,k&&k(t),l=h.render(h.props,h.state,h.context),R=0;R<h._sb.length;R++)h.__h.push(h._sb[R]);h._sb=[]}else do{h.__d=!1,k&&k(t),l=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++C<25);h.state=h.__s,null!=h.getChildContext&&(r=f(f({},r),h.getChildContext())),d||null==h.getSnapshotBeforeUpdate||(g=h.getSnapshotBeforeUpdate(p,b)),M=null!=l&&l.type===_&&null==l.key?l.props.children:l,x(e,Array.isArray(M)?M:[M],t,n,r,o,s,a,u,c),h.base=t.__e,t.__h=null,h.__h.length&&a.push(h),y&&(h.__E=h.__=null),h.__e=!1}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=T(n.__e,t,n,r,o,s,a,c);(l=i.diffed)&&l(t)}catch(e){t.__v=null,(c||null!=s)&&(t.__e=u,t.__h=!!c,s[s.indexOf(u)]=null),i.__e(e,t,n)}}function N(e,t){i.__c&&i.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){i.__e(e,t.__v)}}))}function T(e,t,n,i,o,s,a,u){var c,h,d,f=n.props,b=t.props,g=t.type,y=0;if("svg"===g&&(o=!0),null!=s)for(;y<s.length;y++)if((c=s[y])&&"setAttribute"in c==!!g&&(g?c.localName===g:3===c.nodeType)){e=c,s[y]=null;break}if(null==e){if(null===g)return document.createTextNode(b);e=o?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,b.is&&b),s=null,u=!1}if(null===g)f===b||u&&e.data===b||(e.data=b);else{if(s=s&&r.call(e.childNodes),h=(f=n.props||l).dangerouslySetInnerHTML,d=b.dangerouslySetInnerHTML,!u){if(null!=s)for(f={},y=0;y<e.attributes.length;y++)f[e.attributes[y].name]=e.attributes[y].value;(d||h)&&(d&&(h&&d.__html==h.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||O(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||O(e,o,t[o],n[o],r)}(e,b,f,o,u),d)t.__k=[];else if(y=t.props.children,x(e,Array.isArray(y)?y:[y],t,n,i,o&&"foreignObject"!==g,s,a,s?s[0]:n.__k&&v(n,0),u),null!=s)for(y=s.length;y--;)null!=s[y]&&p(s[y]);u||("value"in b&&void 0!==(y=b.value)&&(y!==e.value||"progress"===g&&!y||"option"===g&&y!==f.value)&&O(e,"value",y,f.value,!1),"checked"in b&&void 0!==(y=b.checked)&&y!==e.checked&&O(e,"checked",y,f.checked,!1))}return e}function P(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){i.__e(e,n)}}function L(e,t,n){var r,o;if(i.unmount&&i.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||P(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){i.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&L(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||p(e.__e),e.__=e.__e=e.__d=void 0}function D(e,t,n){return this.constructor(e,n)}function B(e,t,n){var o,s,a;i.__&&i.__(e,t),s=(o="function"==typeof n)?null:n&&n.__k||t.__k,a=[],j(t,e=(!o&&n||t).__k=b(_,null,[e]),s||l,l,void 0!==t.ownerSVGElement,!o&&n?[n]:s?null:t.firstChild?r.call(t.childNodes):null,a,!o&&n?n:s?s.__e:t.firstChild,o),N(a,e)}function H(e,t){B(e,t,H)}function F(e,t,n){var i,o,s,a=f({},e.props);for(s in t)"key"==s?i=t[s]:"ref"==s?o=t[s]:a[s]=t[s];return arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),g(e.type,a,i||e.key,o||e.ref,null)}function U(e,t){var n={__c:t="__cC"+c++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(S)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=h.slice,i={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},o=0,s=function(e){return null!=e&&void 0===e.constructor},m.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),S(this))},m.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),S(this))},m.prototype.render=_,a=[],E.__r=0,c=0},1135:function(e,t,n){"use strict";n.r(t),n.d(t,"Observable",(function(){return r.a})),n.d(t,"ConnectableObservable",(function(){return i.a})),n.d(t,"GroupedObservable",(function(){return o.a})),n.d(t,"observable",(function(){return s.a})),n.d(t,"Subject",(function(){return a.a})),n.d(t,"BehaviorSubject",(function(){return u.a})),n.d(t,"ReplaySubject",(function(){return c.a})),n.d(t,"AsyncSubject",(function(){return l.a})),n.d(t,"asap",(function(){return h.a})),n.d(t,"asapScheduler",(function(){return h.b})),n.d(t,"async",(function(){return d.a})),n.d(t,"asyncScheduler",(function(){return d.b})),n.d(t,"queue",(function(){return f.a})),n.d(t,"queueScheduler",(function(){return f.b})),n.d(t,"animationFrame",(function(){return v})),n.d(t,"animationFrameScheduler",(function(){return m})),n.d(t,"VirtualTimeScheduler",(function(){return w})),n.d(t,"VirtualAction",(function(){return S})),n.d(t,"Scheduler",(function(){return E.a})),n.d(t,"Subscription",(function(){return x.a})),n.d(t,"Subscriber",(function(){return k.a})),n.d(t,"Notification",(function(){return C.a})),n.d(t,"NotificationKind",(function(){return C.b})),n.d(t,"pipe",(function(){return R.a})),n.d(t,"noop",(function(){return M.a})),n.d(t,"identity",(function(){return O.a})),n.d(t,"isObservable",(function(){return A})),n.d(t,"ArgumentOutOfRangeError",(function(){return I.a})),n.d(t,"EmptyError",(function(){return j.a})),n.d(t,"ObjectUnsubscribedError",(function(){return N.a})),n.d(t,"UnsubscriptionError",(function(){return T.a})),n.d(t,"TimeoutError",(function(){return P.a})),n.d(t,"bindCallback",(function(){return F})),n.d(t,"bindNodeCallback",(function(){return z})),n.d(t,"combineLatest",(function(){return G.b})),n.d(t,"concat",(function(){return Y.a})),n.d(t,"defer",(function(){return $.a})),n.d(t,"empty",(function(){return K.b})),n.d(t,"forkJoin",(function(){return Z})),n.d(t,"from",(function(){return X.a})),n.d(t,"fromEvent",(function(){return ne})),n.d(t,"fromEventPattern",(function(){return ie})),n.d(t,"generate",(function(){return oe})),n.d(t,"iif",(function(){return ae})),n.d(t,"interval",(function(){return ce})),n.d(t,"merge",(function(){return he.a})),n.d(t,"never",(function(){return fe})),n.d(t,"of",(function(){return pe.a})),n.d(t,"onErrorResumeNext",(function(){return be})),n.d(t,"pairs",(function(){return ge})),n.d(t,"partition",(function(){return we})),n.d(t,"race",(function(){return Se.a})),n.d(t,"range",(function(){return Ee})),n.d(t,"throwError",(function(){return ke.a})),n.d(t,"timer",(function(){return Ce.a})),n.d(t,"using",(function(){return Re})),n.d(t,"zip",(function(){return Me.b})),n.d(t,"scheduled",(function(){return Oe.a})),n.d(t,"EMPTY",(function(){return K.a})),n.d(t,"NEVER",(function(){return de})),n.d(t,"config",(function(){return Ae.a}));var r=n(1109),i=n(1174),o=n(1150),s=n(1122),a=n(1112),u=n(1175),c=n(1151),l=n(1142),h=n(1160),d=n(1113),f=n(1162),p=n(83),b=n(1146),g=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return p.__extends(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame((function(){return t.flush(null)}))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(cancelAnimationFrame(n),t.scheduled=void 0)},t}(b.a),y=n(1141),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p.__extends(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,r=-1,i=n.length;e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while(++r<i&&(e=n.shift()));if(this.active=!1,t){for(;++r<i&&(e=n.shift());)e.unsubscribe();throw t}},t}(y.a),m=new _(g),v=m,w=function(e){function t(t,n){void 0===t&&(t=S),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=e.call(this,t,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return p.__extends(t,e),t.prototype.flush=function(){for(var e,t,n=this.actions,r=this.maxFrames;(t=n[0])&&t.delay<=r&&(n.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=n.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(y.a),S=function(e){function t(t,n,r){void 0===r&&(r=t.index+=1);var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.index=r,i.active=!0,i.index=t.index=r,i}return p.__extends(t,e),t.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return e.prototype.schedule.call(this,n,r);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(n,r)},t.prototype.requestAsyncId=function(e,n,r){void 0===r&&(r=0),this.delay=e.frame+r;var i=e.actions;return i.push(this),i.sort(t.sortActions),!0},t.prototype.recycleAsyncId=function(e,t,n){void 0===n&&(n=0)},t.prototype._execute=function(t,n){if(!0===this.active)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(b.a),E=n(1178),x=n(1111),k=n(1108),C=n(1128),R=n(1148),M=n(1153),O=n(1120);function A(e){return!!e&&(e instanceof r.a||"function"===typeof e.lift&&"function"===typeof e.subscribe)}var I=n(1129),j=n(1130),N=n(1138),T=n(1171),P=n(1179),L=n(1115),D=n(1173),B=n(1114),H=n(1119);function F(e,t,n){if(t){if(!Object(H.a)(t))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return F(e,n).apply(void 0,r).pipe(Object(L.a)((function(e){return Object(B.a)(e)?t.apply(void 0,e):t(e)})))};n=t}return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var o,s=this,a={context:s,subject:o,callbackFunc:e,scheduler:n};return new r.a((function(r){if(n){var i={args:t,subscriber:r,params:a};return n.schedule(U,0,i)}if(!o){o=new l.a;try{e.apply(s,t.concat([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o.next(e.length<=1?e[0]:e),o.complete()}]))}catch(u){Object(D.a)(o)?o.error(u):console.warn(u)}}return o.subscribe(r)}))}}function U(e){var t=this,n=e.args,r=e.subscriber,i=e.params,o=i.callbackFunc,s=i.context,a=i.scheduler,u=i.subject;if(!u){u=i.subject=new l.a;try{o.apply(s,n.concat([function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.length<=1?e[0]:e;t.add(a.schedule(W,0,{value:r,subject:u}))}]))}catch(c){u.error(c)}}this.add(u.subscribe(r))}function W(e){var t=e.value,n=e.subject;n.next(t),n.complete()}function z(e,t,n){if(t){if(!Object(H.a)(t))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return z(e,n).apply(void 0,r).pipe(Object(L.a)((function(e){return Object(B.a)(e)?t.apply(void 0,e):t(e)})))};n=t}return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var o={subject:void 0,args:t,callbackFunc:e,scheduler:n,context:this};return new r.a((function(r){var i=o.context,s=o.subject;if(n)return n.schedule(q,0,{params:o,subscriber:r,context:i});if(!s){s=o.subject=new l.a;try{e.apply(i,t.concat([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.shift();n?s.error(n):(s.next(e.length<=1?e[0]:e),s.complete())}]))}catch(a){Object(D.a)(s)?s.error(a):console.warn(a)}}return s.subscribe(r)}))}}function q(e){var t=this,n=e.params,r=e.subscriber,i=e.context,o=n.callbackFunc,s=n.args,a=n.scheduler,u=n.subject;if(!u){u=n.subject=new l.a;try{o.apply(i,s.concat([function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.shift();if(r)t.add(a.schedule(J,0,{err:r,subject:u}));else{var i=e.length<=1?e[0]:e;t.add(a.schedule(V,0,{value:i,subject:u}))}}]))}catch(c){this.add(a.schedule(J,0,{err:c,subject:u}))}}this.add(u.subscribe(r))}function V(e){var t=e.value,n=e.subject;n.next(t),n.complete()}function J(e){var t=e.err;e.subject.error(t)}var G=n(1154),Y=n(1144),$=n(1156),K=n(1116),Q=n(1172),X=n(1117);function Z(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){var n=e[0];if(Object(B.a)(n))return ee(n,null);if(Object(Q.a)(n)&&Object.getPrototypeOf(n)===Object.prototype){var r=Object.keys(n);return ee(r.map((function(e){return n[e]})),r)}}if("function"===typeof e[e.length-1]){var i=e.pop();return ee(e=1===e.length&&Object(B.a)(e[0])?e[0]:e,null).pipe(Object(L.a)((function(e){return i.apply(void 0,e)})))}return ee(e,null)}function ee(e,t){return new r.a((function(n){var r=e.length;if(0!==r)for(var i=new Array(r),o=0,s=0,a=function(a){var u=Object(X.a)(e[a]),c=!1;n.add(u.subscribe({next:function(e){c||(c=!0,s++),i[a]=e},error:function(e){return n.error(e)},complete:function(){++o!==r&&c||(s===r&&n.next(t?t.reduce((function(e,t,n){return e[t]=i[n],e}),{}):i),n.complete())}}))},u=0;u<r;u++)a(u);else n.complete()}))}var te=n(1137);function ne(e,t,n,i){return Object(te.a)(n)&&(i=n,n=void 0),i?ne(e,t,n).pipe(Object(L.a)((function(e){return Object(B.a)(e)?i.apply(void 0,e):i(e)}))):new r.a((function(r){re(e,t,(function(e){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(e)}),r,n)}))}function re(e,t,n,r,i){var o;if(function(e){return e&&"function"===typeof e.addEventListener&&"function"===typeof e.removeEventListener}(e)){var s=e;e.addEventListener(t,n,i),o=function(){return s.removeEventListener(t,n,i)}}else if(function(e){return e&&"function"===typeof e.on&&"function"===typeof e.off}(e)){var a=e;e.on(t,n),o=function(){return a.off(t,n)}}else if(function(e){return e&&"function"===typeof e.addListener&&"function"===typeof e.removeListener}(e)){var u=e;e.addListener(t,n),o=function(){return u.removeListener(t,n)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var c=0,l=e.length;c<l;c++)re(e[c],t,n,r,i)}r.add(o)}function ie(e,t,n){return n?ie(e,t).pipe(Object(L.a)((function(e){return Object(B.a)(e)?n.apply(void 0,e):n(e)}))):new r.a((function(n){var r,i=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.next(1===e.length?e[0]:e)};try{r=e(i)}catch(o){return void n.error(o)}if(Object(te.a)(t))return function(){return t(i,r)}}))}function oe(e,t,n,i,o){var s,a;if(1==arguments.length){var u=e;a=u.initialState,t=u.condition,n=u.iterate,s=u.resultSelector||O.a,o=u.scheduler}else void 0===i||Object(H.a)(i)?(a=e,s=O.a,o=i):(a=e,s=i);return new r.a((function(e){var r=a;if(o)return o.schedule(se,0,{subscriber:e,iterate:n,condition:t,resultSelector:s,state:r});for(;;){if(t){var i=void 0;try{i=t(r)}catch(c){return void e.error(c)}if(!i){e.complete();break}}var u=void 0;try{u=s(r)}catch(c){return void e.error(c)}if(e.next(u),e.closed)break;try{r=n(r)}catch(c){return void e.error(c)}}}))}function se(e){var t=e.subscriber,n=e.condition;if(!t.closed){if(e.needIterate)try{e.state=e.iterate(e.state)}catch(o){return void t.error(o)}else e.needIterate=!0;if(n){var r=void 0;try{r=n(e.state)}catch(o){return void t.error(o)}if(!r)return void t.complete();if(t.closed)return}var i;try{i=e.resultSelector(e.state)}catch(o){return void t.error(o)}if(!t.closed&&(t.next(i),!t.closed))return this.schedule(e)}}function ae(e,t,n){return void 0===t&&(t=K.a),void 0===n&&(n=K.a),Object($.a)((function(){return e()?t:n}))}var ue=n(1157);function ce(e,t){return void 0===e&&(e=0),void 0===t&&(t=d.a),(!Object(ue.a)(e)||e<0)&&(e=0),t&&"function"===typeof t.schedule||(t=d.a),new r.a((function(n){return n.add(t.schedule(le,e,{subscriber:n,counter:0,period:e})),n}))}function le(e){var t=e.subscriber,n=e.counter,r=e.period;t.next(n),this.schedule({subscriber:t,counter:n+1,period:r},r)}var he=n(1181),de=new r.a(M.a);function fe(){return de}var pe=n(1139);function be(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)return K.a;var n=e[0],i=e.slice(1);return 1===e.length&&Object(B.a)(n)?be.apply(void 0,n):new r.a((function(e){var t=function(){return e.add(be.apply(void 0,i).subscribe(e))};return Object(X.a)(n).subscribe({next:function(t){e.next(t)},error:t,complete:t})}))}function ge(e,t){return t?new r.a((function(n){var r=Object.keys(e),i=new x.a;return i.add(t.schedule(ye,0,{keys:r,index:0,subscriber:n,subscription:i,obj:e})),i})):new r.a((function(t){for(var n=Object.keys(e),r=0;r<n.length&&!t.closed;r++){var i=n[r];e.hasOwnProperty(i)&&t.next([i,e[i]])}t.complete()}))}function ye(e){var t=e.keys,n=e.index,r=e.subscriber,i=e.subscription,o=e.obj;if(!r.closed)if(n<t.length){var s=t[n];r.next([s,o[s]]),i.add(this.schedule({keys:t,index:n+1,subscriber:r,subscription:i,obj:o}))}else r.complete()}var _e=n(1204),me=n(1161),ve=n(1124);function we(e,t,n){return[Object(ve.a)(t,n)(new r.a(Object(me.a)(e))),Object(ve.a)(Object(_e.a)(t,n))(new r.a(Object(me.a)(e)))]}var Se=n(1182);function Ee(e,t,n){return void 0===e&&(e=0),new r.a((function(r){void 0===t&&(t=e,e=0);var i=0,o=e;if(n)return n.schedule(xe,0,{index:i,count:t,start:e,subscriber:r});for(;;){if(i++>=t){r.complete();break}if(r.next(o++),r.closed)break}}))}function xe(e){var t=e.start,n=e.index,r=e.count,i=e.subscriber;n>=r?i.complete():(i.next(t),i.closed||(e.index=n+1,e.start=t+1,this.schedule(e)))}var ke=n(1152),Ce=n(1183);function Re(e,t){return new r.a((function(n){var r,i;try{r=e()}catch(s){return void n.error(s)}try{i=t(r)}catch(s){return void n.error(s)}var o=(i?Object(X.a)(i):K.a).subscribe(n);return function(){o.unsubscribe(),r&&r.unsubscribe()}}))}var Me=n(1158),Oe=n(1194),Ae=n(1136)},1136:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack;r=e},get useDeprecatedSynchronousErrorHandling(){return r}}},1137:function(e,t,n){"use strict";function r(e){return"function"===typeof e}n.d(t,"a",(function(){return r}))},1138:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},1139:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1119),i=n(1140),o=n(1177);function s(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return Object(r.a)(n)?(e.pop(),Object(o.a)(e,n)):Object(i.a)(e)}},1140:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1109),i=n(1201),o=n(1177);function s(e,t){return t?Object(o.a)(e,t):new r.a(Object(i.a)(e))}},1141:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(83),i=n(1178),o=function(e){function t(n,r){void 0===r&&(r=i.a.now);var o=e.call(this,n,(function(){return t.delegate&&t.delegate!==o?t.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return r.__extends(t,e),t.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,i):e.prototype.schedule.call(this,n,r,i)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(i.a)},1142:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(83),i=n(1112),o=n(1111),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return r.__extends(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),o.a.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),o.a.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.a)},1143:function(e,t,n){"use strict";function r(){return"function"===typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(t,"a",(function(){return i}));var i=r()},1144:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1139),i=n(1180);function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Object(i.a)()(r.a.apply(void 0,e))}},1145:function(e,t){function n(e){return e.sort(((e,t)=>"latest"===e||"earliest"===t?1:"latest"===t||"earliest"===e?-1:r(e)-r(t)))}function r(e){return void 0===e||null===e?e:Number.parseInt(e,16)}function i(e){if(void 0===e||null===e)return e;let t=e.toString(16);return t.length%2&&(t="0"+t),"0x"+t}function o(){return Math.floor(16*Math.random()).toString(16)}e.exports={minBlockRef:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const i=n(t);return i[0]},maxBlockRef:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const i=n(t);return i[i.length-1]},sortBlockRefs:n,bnToHex:function(e){return"0x"+e.toString(16)},blockRefIsNumber:function(e){return e&&!["earliest","latest","pending"].includes(e)},hexToInt:r,incrementHexInt:function(e){if(void 0===e||null===e)return e;return i(r(e)+1)},intToHex:i,unsafeRandomBytes:function(e){let t="0x";for(let n=0;n<e;n++)t+=o(),t+=o();return t}}},1146:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(83),i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return r.__extends(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(i){n=!0,r=!!i&&i||new Error(i)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(function(e){function t(t,n){return e.call(this)||this}return r.__extends(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(1111).a))},1147:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(31);function i(e,t,n){try{Reflect.apply(e,t,n)}catch(r){setTimeout((()=>{throw r}))}}class o extends r.EventEmitter{emit(e){let t="error"===e;const n=this._events;if(void 0!==n)t=t&&void 0===n.error;else if(!t)return!1;for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];if(t){let e;if(o.length>0&&([e]=o),e instanceof Error)throw e;const t=new Error("Unhandled error."+(e?` (${e.message})`:""));throw t.context=e,t}const a=n[e];if(void 0===a)return!1;if("function"===typeof a)i(a,this,o);else{const e=a.length,t=function(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r+=1)n[r]=e[r];return n}(a);for(let n=0;n<e;n+=1)i(t[n],this,o)}return!0}}t.default=o},1148:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(1120);function i(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)}function o(e){return 0===e.length?r.a:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}},1149:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(83),i=n(1108);function o(){return function(e){return e.lift(new s(e))}}var s=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new a(e,n),i=t.subscribe(r);return r.closed||(r.connection=n.connect()),i},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return r.__extends(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},t}(i.a)},1150:function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d}));var r=n(83),i=n(1108),o=n(1111),s=n(1109),a=n(1112);function u(e,t,n,r){return function(i){return i.lift(new c(e,t,n,r))}}var c=function(){function e(e,t,n,r){this.keySelector=e,this.elementSelector=t,this.durationSelector=n,this.subjectSelector=r}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),l=function(e){function t(t,n,r,i,o){var s=e.call(this,t)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=i,s.subjectSelector=o,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return r.__extends(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(n){return void this.error(n)}this._group(e,t)},t.prototype._group=function(e,t){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(u){this.error(u)}else r=e;if(!i){i=this.subjectSelector?this.subjectSelector():new a.a,n.set(t,i);var o=new d(t,i,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new d(t,i))}catch(u){return void this.error(u)}this.add(s.subscribe(new h(t,i,this)))}}i.closed||i.next(r)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach((function(t,n){t.error(e)})),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach((function(e,t){e.complete()})),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(i.a),h=function(e){function t(t,n,r){var i=e.call(this,n)||this;return i.key=t,i.group=n,i.parent=r,i}return r.__extends(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.a),d=function(e){function t(t,n,r){var i=e.call(this)||this;return i.key=t,i.groupSubject=n,i.refCountSubscription=r,i}return r.__extends(t,e),t.prototype._subscribe=function(e){var t=new o.a,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&t.add(new f(n)),t.add(r.subscribe(e)),t},t}(s.a),f=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,t.count++,n}return r.__extends(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(o.a)},1151:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(83),i=n(1112),o=n(1162),s=n(1111),a=n(1176),u=n(1138),c=n(1200),l=function(e){function t(t,n,r){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=e.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=t<1?1:t,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return r.__extends(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var n=this._events;n.push(t),n.length>this._bufferSize&&n.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new h(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new u.a;if(this.isStopped||this.hasError?t=s.a.EMPTY:(this.observers.push(e),t=new c.a(this,e)),i&&e.add(e=new a.a(e,i)),n)for(var l=0;l<o&&!e.closed;l++)e.next(r[l]);else for(l=0;l<o&&!e.closed;l++)e.next(r[l].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||o.a).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(e-r[o].time<n);)o++;return i>t&&(o=Math.max(o,i-t)),o>0&&r.splice(0,o),r},t}(i.a),h=function(){return function(e,t){this.time=e,this.value=t}}()},1152:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1109);function i(e,t){return t?new r.a((function(n){return t.schedule(o,0,{error:e,subscriber:n})})):new r.a((function(t){return t.error(e)}))}function o(e){var t=e.error;e.subscriber.error(t)}},1153:function(e,t,n){"use strict";function r(){}n.d(t,"a",(function(){return r}))},1154:function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return h}));var r=n(83),i=n(1119),o=n(1114),s=n(1123),a=n(1127),u=n(1140),c={};function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=void 0,r=void 0;return Object(i.a)(e[e.length-1])&&(r=e.pop()),"function"===typeof e[e.length-1]&&(n=e.pop()),1===e.length&&Object(o.a)(e[0])&&(e=e[0]),Object(u.a)(e,r).lift(new h(n))}var h=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.resultSelector))},e}(),d=function(e){function t(t,n){var r=e.call(this,t)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return r.__extends(t,e),t.prototype._next=function(e){this.values.push(c),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var n=0;n<t;n++){var r=e[n];this.add(Object(a.a)(this,r,void 0,n))}}},t.prototype.notifyComplete=function(e){0===(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,n){var r=this.values,i=r[n],o=this.toRespond?i===c?--this.toRespond:this.toRespond:0;r[n]=t,0===o&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)},t}(s.a)},1155:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1131),i=n(1120);function o(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),Object(r.b)(i.a,e)}},1156:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1109),i=n(1117),o=n(1116);function s(e){return new r.a((function(t){var n;try{n=e()}catch(r){return void t.error(r)}return(n?Object(i.a)(n):Object(o.b)()).subscribe(t)}))}},1157:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1114);function i(e){return!Object(r.a)(e)&&e-parseFloat(e)+1>=0}},1158:function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));var r=n(83),i=n(1140),o=n(1114),s=n(1108),a=n(1143),u=n(1110);function c(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return"function"===typeof n&&e.pop(),Object(i.a)(e,void 0).lift(new l(n))}var l=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new h(e,this.resultSelector))},e}(),h=function(e){function t(t,n,r){void 0===r&&(r=Object.create(null));var i=e.call(this,t)||this;return i.resultSelector=n,i.iterators=[],i.active=0,i.resultSelector="function"===typeof n?n:void 0,i}return r.__extends(t,e),t.prototype._next=function(e){var t=this.iterators;Object(o.a)(e)?t.push(new f(e)):"function"===typeof e[a.a]?t.push(new d(e[a.a]())):t.push(new p(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0!==t){this.active=t;for(var n=0;n<t;n++){var r=e[n];if(r.stillUnsubscribed)this.destination.add(r.subscribe());else this.active--}}else this.destination.complete()},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,n=this.destination,r=0;r<t;r++){if("function"===typeof(s=e[r]).hasValue&&!s.hasValue())return}var i=!1,o=[];for(r=0;r<t;r++){var s,a=(s=e[r]).next();if(s.hasCompleted()&&(i=!0),a.done)return void n.complete();o.push(a.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),i&&n.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)},t}(s.a),d=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return Boolean(e&&e.done)},e}(),f=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[a.a]=function(){return this},e.prototype.next=function(e){var t=this.index++,n=this.array;return t<this.length?{value:n[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),p=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return r.__extends(t,e),t.prototype[a.a]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return Object(u.c)(this.observable,new u.a(this))},t}(u.b)},1159:function(e,t,n){"use strict";n.r(t),n.d(t,"audit",(function(){return o})),n.d(t,"auditTime",(function(){return l})),n.d(t,"buffer",(function(){return h})),n.d(t,"bufferCount",(function(){return b})),n.d(t,"bufferTime",(function(){return v})),n.d(t,"bufferToggle",(function(){return A})),n.d(t,"bufferWhen",(function(){return N})),n.d(t,"catchError",(function(){return L})),n.d(t,"combineAll",(function(){return F})),n.d(t,"combineLatest",(function(){return z})),n.d(t,"concat",(function(){return V})),n.d(t,"concatAll",(function(){return J.a})),n.d(t,"concatMap",(function(){return Y})),n.d(t,"concatMapTo",(function(){return $})),n.d(t,"count",(function(){return K})),n.d(t,"debounce",(function(){return Z})),n.d(t,"debounceTime",(function(){return ne})),n.d(t,"defaultIfEmpty",(function(){return se})),n.d(t,"delay",(function(){return he})),n.d(t,"delayWhen",(function(){return ge})),n.d(t,"dematerialize",(function(){return we})),n.d(t,"distinct",(function(){return xe})),n.d(t,"distinctUntilChanged",(function(){return Re})),n.d(t,"distinctUntilKeyChanged",(function(){return Ae})),n.d(t,"elementAt",(function(){return We})),n.d(t,"endWith",(function(){return qe})),n.d(t,"every",(function(){return Ve})),n.d(t,"exhaust",(function(){return Ye})),n.d(t,"exhaustMap",(function(){return Xe})),n.d(t,"expand",(function(){return tt})),n.d(t,"filter",(function(){return je.a})),n.d(t,"finalize",(function(){return it})),n.d(t,"find",(function(){return at})),n.d(t,"findIndex",(function(){return lt})),n.d(t,"first",(function(){return dt})),n.d(t,"groupBy",(function(){return ft.b})),n.d(t,"ignoreElements",(function(){return pt})),n.d(t,"isEmpty",(function(){return yt})),n.d(t,"last",(function(){return Et})),n.d(t,"map",(function(){return Qe.a})),n.d(t,"mapTo",(function(){return xt})),n.d(t,"materialize",(function(){return Rt})),n.d(t,"max",(function(){return Pt})),n.d(t,"merge",(function(){return Dt})),n.d(t,"mergeAll",(function(){return Bt.a})),n.d(t,"mergeMap",(function(){return G.b})),n.d(t,"flatMap",(function(){return G.a})),n.d(t,"mergeMapTo",(function(){return Ht})),n.d(t,"mergeScan",(function(){return Ft})),n.d(t,"min",(function(){return zt})),n.d(t,"multicast",(function(){return Vt})),n.d(t,"observeOn",(function(){return Gt.b})),n.d(t,"onErrorResumeNext",(function(){return Yt})),n.d(t,"pairwise",(function(){return Qt})),n.d(t,"partition",(function(){return tn})),n.d(t,"pluck",(function(){return nn})),n.d(t,"publish",(function(){return sn})),n.d(t,"publishBehavior",(function(){return un})),n.d(t,"publishLast",(function(){return ln})),n.d(t,"publishReplay",(function(){return dn})),n.d(t,"race",(function(){return pn})),n.d(t,"reduce",(function(){return Tt})),n.d(t,"repeat",(function(){return bn})),n.d(t,"repeatWhen",(function(){return _n})),n.d(t,"retry",(function(){return wn})),n.d(t,"retryWhen",(function(){return xn})),n.d(t,"refCount",(function(){return Rn.a})),n.d(t,"sample",(function(){return Mn})),n.d(t,"sampleTime",(function(){return In})),n.d(t,"scan",(function(){return At})),n.d(t,"sequenceEqual",(function(){return Pn})),n.d(t,"share",(function(){return Fn})),n.d(t,"shareReplay",(function(){return Un})),n.d(t,"single",(function(){return Wn})),n.d(t,"skip",(function(){return Vn})),n.d(t,"skipLast",(function(){return Yn})),n.d(t,"skipUntil",(function(){return Qn})),n.d(t,"skipWhile",(function(){return er})),n.d(t,"startWith",(function(){return rr})),n.d(t,"subscribeOn",(function(){return ar})),n.d(t,"switchAll",(function(){return dr})),n.d(t,"switchMap",(function(){return cr})),n.d(t,"switchMapTo",(function(){return fr})),n.d(t,"take",(function(){return He})),n.d(t,"takeLast",(function(){return vt})),n.d(t,"takeUntil",(function(){return pr})),n.d(t,"takeWhile",(function(){return yr})),n.d(t,"tap",(function(){return Sr})),n.d(t,"throttle",(function(){return Cr})),n.d(t,"throttleTime",(function(){return Or})),n.d(t,"throwIfEmpty",(function(){return Te})),n.d(t,"timeInterval",(function(){return Tr})),n.d(t,"timeout",(function(){return Ur})),n.d(t,"timeoutWith",(function(){return Dr})),n.d(t,"timestamp",(function(){return Wr})),n.d(t,"toArray",(function(){return Vr})),n.d(t,"window",(function(){return Jr})),n.d(t,"windowCount",(function(){return $r})),n.d(t,"windowTime",(function(){return Xr})),n.d(t,"windowToggle",(function(){return oi})),n.d(t,"windowWhen",(function(){return ui})),n.d(t,"withLatestFrom",(function(){return hi})),n.d(t,"zip",(function(){return bi})),n.d(t,"zipAll",(function(){return gi}));var r=n(83),i=n(1110);function o(e){return function(t){return t.lift(new s(e))}}var s=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.durationSelector))},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.__extends(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(r){return this.destination.error(r)}var n=Object(i.c)(t,new i.a(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},t.prototype.clearThrottle=function(){var e=this,t=e.value,n=e.hasValue,r=e.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),n&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(i.b),u=n(1113),c=n(1183);function l(e,t){return void 0===t&&(t=u.a),o((function(){return Object(c.a)(e,t)}))}function h(e){return function(t){return t.lift(new d(e))}}var d=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.closingNotifier))},e}(),f=function(e){function t(t,n){var r=e.call(this,t)||this;return r.buffer=[],r.add(Object(i.c)(n,new i.a(r))),r}return r.__extends(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(i.b),p=n(1108);function b(e,t){return void 0===t&&(t=null),function(n){return n.lift(new g(e,t))}}var g=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,this.subscriberClass=t&&e!==t?_:y}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),y=function(e){function t(t,n){var r=e.call(this,t)||this;return r.bufferSize=n,r.buffer=[],r}return r.__extends(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(p.a),_=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.bufferSize=n,i.startBufferEvery=r,i.buffers=[],i.count=0,i}return r.__extends(t,e),t.prototype._next=function(e){var t=this,n=t.bufferSize,r=t.startBufferEvery,i=t.buffers,o=t.count;this.count++,o%r===0&&i.push([]);for(var s=i.length;s--;){var a=i[s];a.push(e),a.length===n&&(i.splice(s,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,n=this.destination;t.length>0;){var r=t.shift();r.length>0&&n.next(r)}e.prototype._complete.call(this)},t}(p.a),m=n(1119);function v(e){var t=arguments.length,n=u.a;Object(m.a)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],t--);var r=null;t>=2&&(r=arguments[1]);var i=Number.POSITIVE_INFINITY;return t>=3&&(i=arguments[2]),function(t){return t.lift(new w(e,r,i,n))}}var w=function(){function e(e,t,n,r){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new E(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),S=function(){return function(){this.buffer=[]}}(),E=function(e){function t(t,n,r,i,o){var s=e.call(this,t)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=r,s.maxBufferSize=i,s.scheduler=o,s.contexts=[];var a=s.openContext();if(s.timespanOnly=null==r||r<0,s.timespanOnly){var u={subscriber:s,context:a,bufferTimeSpan:n};s.add(a.closeAction=o.schedule(x,n,u))}else{var c={subscriber:s,context:a},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:s,scheduler:o};s.add(a.closeAction=o.schedule(C,n,c)),s.add(o.schedule(k,r,l))}return s}return r.__extends(t,e),t.prototype._next=function(e){for(var t,n=this.contexts,r=n.length,i=0;i<r;i++){var o=n[i],s=o.buffer;s.push(e),s.length==this.maxBufferSize&&(t=o)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,n=this.destination;t.length>0;){var r=t.shift();n.next(r.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:e,bufferTimeSpan:n};this.add(e.closeAction=this.scheduler.schedule(x,n,r))}},t.prototype.openContext=function(){var e=new S;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(p.a);function x(e){var t=e.subscriber,n=e.context;n&&t.closeContext(n),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function k(e){var t=e.bufferCreationInterval,n=e.bufferTimeSpan,r=e.subscriber,i=e.scheduler,o=r.openContext();r.closed||(r.add(o.closeAction=i.schedule(C,n,{subscriber:r,context:o})),this.schedule(e,t))}function C(e){var t=e.subscriber,n=e.context;t.closeContext(n)}var R=n(1111),M=n(1127),O=n(1123);function A(e,t){return function(n){return n.lift(new I(e,t))}}var I=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new j(e,this.openings,this.closingSelector))},e}(),j=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.closingSelector=r,i.contexts=[],i.add(Object(M.a)(i,n)),i}return r.__extends(t,e),t.prototype._next=function(e){for(var t=this.contexts,n=t.length,r=0;r<n;r++)t[r].buffer.push(e)},t.prototype._error=function(t){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var n=t.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(n){this._error(n)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var n=e.buffer,r=e.subscription;this.destination.next(n),t.splice(t.indexOf(e),1),this.remove(r),r.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,n=new R.a,r={buffer:[],subscription:n};t.push(r);var i=Object(M.a)(this,e,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))},t}(O.a);function N(e){return function(t){return t.lift(new T(e))}}var T=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new P(e,this.closingSelector))},e}(),P=function(e){function t(t,n){var r=e.call(this,t)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return r.__extends(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e=this.closingSubscription;e&&(this.remove(e),e.unsubscribe());var t,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{t=(0,this.closingSelector)()}catch(r){return this.error(r)}e=new R.a,this.closingSubscription=e,this.add(e),this.subscribing=!0,e.add(Object(i.c)(t,new i.a(this))),this.subscribing=!1},t}(i.b);function L(e){return function(t){var n=new D(e),r=t.lift(n);return n.caught=r}}var D=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new B(e,this.selector,this.caught))},e}(),B=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.selector=n,i.caught=r,i}return r.__extends(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=void 0;try{n=this.selector(t,this.caught)}catch(s){return void e.prototype.error.call(this,s)}this._unsubscribeAndRecycle();var r=new i.a(this);this.add(r);var o=Object(i.c)(n,r);o!==r&&this.add(o)}},t}(i.b),H=n(1154);function F(e){return function(t){return t.lift(new H.a(e))}}var U=n(1114),W=n(1117);function z(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=null;return"function"===typeof e[e.length-1]&&(n=e.pop()),1===e.length&&Object(U.a)(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(Object(W.a)([t].concat(e)),new H.a(n))}}var q=n(1144);function V(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(q.a.apply(void 0,[t].concat(e)))}}var J=n(1180),G=n(1131);function Y(e,t){return Object(G.b)(e,t,1)}function $(e,t){return Y((function(){return e}),t)}function K(e){return function(t){return t.lift(new Q(e,t))}}var Q=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new X(e,this.predicate,this.source))},e}(),X=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.predicate=n,i.source=r,i.count=0,i.index=0,i}return r.__extends(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source)}catch(n){return void this.destination.error(n)}t&&this.count++},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},t}(p.a);function Z(e){return function(t){return t.lift(new ee(e))}}var ee=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new te(e,this.durationSelector))},e}(),te=function(e){function t(t,n){var r=e.call(this,t)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.__extends(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t)}catch(n){this.destination.error(n)}},t.prototype._complete=function(){this.emitValue(),this.destination.complete()},t.prototype._tryNext=function(e,t){var n=this.durationSubscription;this.value=e,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=Object(i.c)(t,new i.a(this)))&&!n.closed&&this.add(this.durationSubscription=n)},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,n=this.durationSubscription;n&&(this.durationSubscription=void 0,n.unsubscribe(),this.remove(n)),this.value=void 0,this.hasValue=!1,e.prototype._next.call(this,t)}},t}(i.b);function ne(e,t){return void 0===t&&(t=u.a),function(n){return n.lift(new re(e,t))}}var re=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new ie(e,this.dueTime,this.scheduler))},e}(),ie=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return r.__extends(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(oe,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(p.a);function oe(e){e.debouncedNext()}function se(e){return void 0===e&&(e=null),function(t){return t.lift(new ae(e))}}var ae=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new ue(e,this.defaultValue))},e}(),ue=function(e){function t(t,n){var r=e.call(this,t)||this;return r.defaultValue=n,r.isEmpty=!0,r}return r.__extends(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(p.a);function ce(e){return e instanceof Date&&!isNaN(+e)}var le=n(1128);function he(e,t){void 0===t&&(t=u.a);var n=ce(e)?+e-t.now():Math.abs(e);return function(e){return e.lift(new de(n,t))}}var de=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new fe(e,this.delay,this.scheduler))},e}(),fe=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.delay=n,i.scheduler=r,i.queue=[],i.active=!1,i.errored=!1,i}return r.__extends(t,e),t.dispatch=function(e){for(var t=e.source,n=t.queue,r=e.scheduler,i=e.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(e,o)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,n=new pe(t.now()+this.delay,e);this.queue.push(n),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(le.a.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(le.a.createComplete()),this.unsubscribe()},t}(p.a),pe=function(){return function(e,t){this.time=e,this.notification=t}}(),be=n(1109);function ge(e,t){return t?function(n){return new me(n,t).lift(new ye(e))}:function(t){return t.lift(new ye(e))}}var ye=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new _e(e,this.delayDurationSelector))},e}(),_e=function(e){function t(t,n){var r=e.call(this,t)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return r.__extends(t,e),t.prototype.notifyNext=function(e,t,n,r,i){this.destination.next(e),this.removeSubscription(i),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var n=this.delayDurationSelector(e,t);n&&this.tryDelay(n,e)}catch(r){this.destination.error(r)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return-1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var n=Object(M.a)(this,e,t);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(O.a),me=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subscriptionDelay=n,r}return r.__extends(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new ve(e,this.source))},t}(be.a),ve=function(e){function t(t,n){var r=e.call(this)||this;return r.parent=t,r.source=n,r.sourceSubscribed=!1,r}return r.__extends(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(p.a);function we(){return function(e){return e.lift(new Se)}}var Se=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new Ee(e))},e}(),Ee=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(p.a);function xe(e,t){return function(n){return n.lift(new ke(e,t))}}var ke=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new Ce(e,this.keySelector,this.flushes))},e}(),Ce=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.keySelector=n,o.values=new Set,r&&o.add(Object(i.c)(r,new i.a(o))),o}return r.__extends(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,n=this.destination;try{t=this.keySelector(e)}catch(r){return void n.error(r)}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var n=this.values;n.has(e)||(n.add(e),this.destination.next(t))},t}(i.b);function Re(e,t){return function(n){return n.lift(new Me(e,t))}}var Me=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new Oe(e,this.compare,this.keySelector))},e}(),Oe=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.keySelector=r,i.hasKey=!1,"function"===typeof n&&(i.compare=n),i}return r.__extends(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){var t;try{var n=this.keySelector;t=n?n(e):e}catch(i){return this.destination.error(i)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,t)}catch(i){return this.destination.error(i)}else this.hasKey=!0;r||(this.key=t,this.destination.next(e))},t}(p.a);function Ae(e,t){return Re((function(n,r){return t?t(n[e],r[e]):n[e]===r[e]}))}var Ie=n(1129),je=n(1124),Ne=n(1130);function Te(e){return void 0===e&&(e=De),function(t){return t.lift(new Pe(e))}}var Pe=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new Le(e,this.errorFactory))},e}(),Le=function(e){function t(t,n){var r=e.call(this,t)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.__extends(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(p.a);function De(){return new Ne.a}var Be=n(1116);function He(e){return function(t){return 0===e?Object(Be.b)():t.lift(new Fe(e))}}var Fe=function(){function e(e){if(this.total=e,this.total<0)throw new Ie.a}return e.prototype.call=function(e,t){return t.subscribe(new Ue(e,this.total))},e}(),Ue=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return r.__extends(t,e),t.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},t}(p.a);function We(e,t){if(e<0)throw new Ie.a;var n=arguments.length>=2;return function(r){return r.pipe(Object(je.a)((function(t,n){return n===e})),He(1),n?se(t):Te((function(){return new Ie.a})))}}var ze=n(1139);function qe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Object(q.a)(t,ze.a.apply(void 0,e))}}function Ve(e,t){return function(n){return n.lift(new Je(e,t,n))}}var Je=function(){function e(e,t,n){this.predicate=e,this.thisArg=t,this.source=n}return e.prototype.call=function(e,t){return t.subscribe(new Ge(e,this.predicate,this.thisArg,this.source))},e}(),Ge=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.predicate=n,o.thisArg=r,o.source=i,o.index=0,o.thisArg=r||o,o}return r.__extends(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(n){return void this.destination.error(n)}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(p.a);function Ye(){return function(e){return e.lift(new $e)}}var $e=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new Ke(e))},e}(),Ke=function(e){function t(t){var n=e.call(this,t)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return r.__extends(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(Object(i.c)(e,new i.a(this))))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(i.b),Qe=n(1115);function Xe(e,t){return t?function(n){return n.pipe(Xe((function(n,r){return Object(W.a)(e(n,r)).pipe(Object(Qe.a)((function(e,i){return t(n,e,r,i)})))})))}:function(t){return t.lift(new Ze(e))}}var Ze=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new et(e,this.project))},e}(),et=function(e){function t(t,n){var r=e.call(this,t)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return r.__extends(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(r){return void this.destination.error(r)}this.hasSubscription=!0,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new i.a(this),n=this.destination;n.add(t);var r=Object(i.c)(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(i.b);function tt(e,t,n){return void 0===t&&(t=Number.POSITIVE_INFINITY),t=(t||0)<1?Number.POSITIVE_INFINITY:t,function(r){return r.lift(new nt(e,t,n))}}var nt=function(){function e(e,t,n){this.project=e,this.concurrent=t,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new rt(e,this.project,this.concurrent,this.scheduler))},e}(),rt=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.project=n,o.concurrent=r,o.scheduler=i,o.index=0,o.active=0,o.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}return r.__extends(t,e),t.dispatch=function(e){var t=e.subscriber,n=e.result,r=e.value,i=e.index;t.subscribeToProjection(n,r,i)},t.prototype._next=function(e){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(e);try{var i=(0,this.project)(e,r);if(this.scheduler){var o={subscriber:this,result:i,value:e,index:r};this.destination.add(this.scheduler.schedule(t.dispatch,0,o))}else this.subscribeToProjection(i,e,r)}catch(s){n.error(s)}}else this.buffer.push(e)}},t.prototype.subscribeToProjection=function(e,t,n){this.active++,this.destination.add(Object(i.c)(e,new i.a(this)))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this._next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(i.b);function it(e){return function(t){return t.lift(new ot(e))}}var ot=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new st(e,this.callback))},e}(),st=function(e){function t(t,n){var r=e.call(this,t)||this;return r.add(new R.a(n)),r}return r.__extends(t,e),t}(p.a);function at(e,t){if("function"!==typeof e)throw new TypeError("predicate is not a function");return function(n){return n.lift(new ut(e,n,!1,t))}}var ut=function(){function e(e,t,n,r){this.predicate=e,this.source=t,this.yieldIndex=n,this.thisArg=r}return e.prototype.call=function(e,t){return t.subscribe(new ct(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}(),ct=function(e){function t(t,n,r,i,o){var s=e.call(this,t)||this;return s.predicate=n,s.source=r,s.yieldIndex=i,s.thisArg=o,s.index=0,s}return r.__extends(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,n=this.thisArg,r=this.index++;try{t.call(n||this,e,r,this.source)&&this.notifyComplete(this.yieldIndex?r:e)}catch(i){this.destination.error(i)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(p.a);function lt(e,t){return function(n){return n.lift(new ut(e,n,!0,t))}}var ht=n(1120);function dt(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?Object(je.a)((function(t,n){return e(t,n,r)})):ht.a,He(1),n?se(t):Te((function(){return new Ne.a})))}}var ft=n(1150);function pt(){return function(e){return e.lift(new bt)}}var bt=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new gt(e))},e}(),gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype._next=function(e){},t}(p.a);function yt(){return function(e){return e.lift(new _t)}}var _t=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new mt(e))},e}(),mt=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(p.a);function vt(e){return function(t){return 0===e?Object(Be.b)():t.lift(new wt(e))}}var wt=function(){function e(e){if(this.total=e,this.total<0)throw new Ie.a}return e.prototype.call=function(e,t){return t.subscribe(new St(e,this.total))},e}(),St=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.__extends(t,e),t.prototype._next=function(e){var t=this.ring,n=this.total,r=this.count++;t.length<n?t.push(e):t[r%n]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i<n;i++){var o=t++%n;e.next(r[o])}e.complete()},t}(p.a);function Et(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?Object(je.a)((function(t,n){return e(t,n,r)})):ht.a,vt(1),n?se(t):Te((function(){return new Ne.a})))}}function xt(e){return function(t){return t.lift(new kt(e))}}var kt=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new Ct(e,this.value))},e}(),Ct=function(e){function t(t,n){var r=e.call(this,t)||this;return r.value=n,r}return r.__extends(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(p.a);function Rt(){return function(e){return e.lift(new Mt)}}var Mt=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new Ot(e))},e}(),Ot=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.prototype._next=function(e){this.destination.next(le.a.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(le.a.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(le.a.createComplete()),e.complete()},t}(p.a);function At(e,t){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new It(e,t,n))}}var It=function(){function e(e,t,n){void 0===n&&(n=!1),this.accumulator=e,this.seed=t,this.hasSeed=n}return e.prototype.call=function(e,t){return t.subscribe(new jt(e,this.accumulator,this.seed,this.hasSeed))},e}(),jt=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return r.__extends(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.accumulator(this.seed,e,n)}catch(r){this.destination.error(r)}this.seed=t,this.destination.next(t)},t}(p.a),Nt=n(1148);function Tt(e,t){return arguments.length>=2?function(n){return Object(Nt.a)(At(e,t),vt(1),se(t))(n)}:function(t){return Object(Nt.a)(At((function(t,n,r){return e(t,n,r+1)})),vt(1))(t)}}function Pt(e){return Tt("function"===typeof e?function(t,n){return e(t,n)>0?t:n}:function(e,t){return e>t?e:t})}var Lt=n(1181);function Dt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(Lt.a.apply(void 0,[t].concat(e)))}}var Bt=n(1155);function Ht(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"===typeof t?Object(G.b)((function(){return e}),t,n):("number"===typeof t&&(n=t),Object(G.b)((function(){return e}),n))}function Ft(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new Ut(e,t,n))}}var Ut=function(){function e(e,t,n){this.accumulator=e,this.seed=t,this.concurrent=n}return e.prototype.call=function(e,t){return t.subscribe(new Wt(e,this.accumulator,this.seed,this.concurrent))},e}(),Wt=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.accumulator=n,o.acc=r,o.concurrent=i,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return r.__extends(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,e,t)}catch(i){return n.error(i)}this.active++,this._innerSub(r)}else this.buffer.push(e)},t.prototype._innerSub=function(e){var t=new i.a(this),n=this.destination;n.add(t);var r=Object(i.c)(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},t.prototype.notifyNext=function(e){var t=this.destination;this.acc=e,this.hasValue=!0,t.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(i.b);function zt(e){return Tt("function"===typeof e?function(t,n){return e(t,n)<0?t:n}:function(e,t){return e<t?e:t})}var qt=n(1174);function Vt(e,t){return function(n){var r;if(r="function"===typeof e?e:function(){return e},"function"===typeof t)return n.lift(new Jt(r,t));var i=Object.create(n,qt.b);return i.source=n,i.subjectFactory=r,i}}var Jt=function(){function e(e,t){this.subjectFactory=e,this.selector=t}return e.prototype.call=function(e,t){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(e);return i.add(t.subscribe(r)),i},e}(),Gt=n(1176);function Yt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&Object(U.a)(e[0])&&(e=e[0]),function(t){return t.lift(new $t(e))}}var $t=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new Kt(e,this.nextSources))},e}(),Kt=function(e){function t(t,n){var r=e.call(this,t)||this;return r.destination=t,r.nextSources=n,r}return r.__extends(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new i.a(this),n=this.destination;n.add(t);var r=Object(i.c)(e,t);r!==t&&n.add(r)}else this.destination.complete()},t}(i.b);function Qt(){return function(e){return e.lift(new Xt)}}var Xt=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new Zt(e))},e}(),Zt=function(e){function t(t){var n=e.call(this,t)||this;return n.hasPrev=!1,n}return r.__extends(t,e),t.prototype._next=function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t)},t}(p.a),en=n(1204);function tn(e,t){return function(n){return[Object(je.a)(e,t)(n),Object(je.a)(Object(en.a)(e,t))(n)]}}function nn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(t){return Object(Qe.a)(rn(e,n))(t)}}function rn(e,t){return function(n){for(var r=n,i=0;i<t;i++){var o=null!=r?r[e[i]]:void 0;if(void 0===o)return;r=o}return r}}var on=n(1112);function sn(e){return e?Vt((function(){return new on.a}),e):Vt(new on.a)}var an=n(1175);function un(e){return function(t){return Vt(new an.a(e))(t)}}var cn=n(1142);function ln(){return function(e){return Vt(new cn.a)(e)}}var hn=n(1151);function dn(e,t,n,r){n&&"function"!==typeof n&&(r=n);var i="function"===typeof n?n:void 0,o=new hn.a(e,t,r);return function(e){return Vt((function(){return o}),i)(e)}}var fn=n(1182);function pn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&Object(U.a)(e[0])&&(e=e[0]),t.lift.call(fn.a.apply(void 0,[t].concat(e)))}}function bn(e){return void 0===e&&(e=-1),function(t){return 0===e?Object(Be.b)():e<0?t.lift(new gn(-1,t)):t.lift(new gn(e-1,t))}}var gn=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new yn(e,this.count,this.source))},e}(),yn=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.count=n,i.source=r,i}return r.__extends(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,n=this.count;if(0===n)return e.prototype.complete.call(this);n>-1&&(this.count=n-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(p.a);function _n(e){return function(t){return t.lift(new mn(e))}}var mn=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new vn(e,this.notifier,t))},e}(),vn=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.notifier=n,i.source=r,i.sourceIsBeingSubscribedTo=!0,i}return r.__extends(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){var t;this.notifications=new on.a;try{t=(0,this.notifier)(this.notifications)}catch(n){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=Object(i.c)(t,new i.a(this))},t}(i.b);function wn(e){return void 0===e&&(e=-1),function(t){return t.lift(new Sn(e,t))}}var Sn=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new En(e,this.count,this.source))},e}(),En=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.count=n,i.source=r,i}return r.__extends(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return e.prototype.error.call(this,t);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},t}(p.a);function xn(e){return function(t){return t.lift(new kn(e,t))}}var kn=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new Cn(e,this.notifier,this.source))},e}(),Cn=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.notifier=n,i.source=r,i}return r.__extends(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{n=new on.a;try{r=(0,this.notifier)(n)}catch(s){return e.prototype.error.call(this,s)}o=Object(i.c)(r,new i.a(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(i.b),Rn=n(1149);function Mn(e){return function(t){return t.lift(new On(e))}}var On=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new An(e),r=t.subscribe(n);return r.add(Object(i.c)(this.notifier,new i.a(n))),r},e}(),An=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return r.__extends(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(i.b);function In(e,t){return void 0===t&&(t=u.a),function(n){return n.lift(new jn(e,t))}}var jn=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new Nn(e,this.period,this.scheduler))},e}(),Nn=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.period=n,i.scheduler=r,i.hasValue=!1,i.add(r.schedule(Tn,n,{subscriber:i,period:n})),i}return r.__extends(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(p.a);function Tn(e){var t=e.subscriber,n=e.period;t.notifyNext(),this.schedule(e,n)}function Pn(e,t){return function(n){return n.lift(new Ln(e,t))}}var Ln=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new Dn(e,this.compareTo,this.comparator))},e}(),Dn=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.compareTo=n,i.comparator=r,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(n.subscribe(new Bn(t,i))),i}return r.__extends(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this,t=e._a,n=e._b,r=e.comparator;t.length>0&&n.length>0;){var i=t.shift(),o=n.shift(),s=!1;try{s=r?r(i,o):i===o}catch(a){this.destination.error(a)}s||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(p.a),Bn=function(e){function t(t,n){var r=e.call(this,t)||this;return r.parent=n,r}return r.__extends(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(p.a);function Hn(){return new on.a}function Fn(){return function(e){return Object(Rn.a)()(Vt(Hn)(e))}}function Un(e,t,n){var r;return r=e&&"object"===typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:n},function(e){return e.lift(function(e){var t,n,r=e.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=e.windowTime,s=void 0===o?Number.POSITIVE_INFINITY:o,a=e.refCount,u=e.scheduler,c=0,l=!1,h=!1;return function(e){var r;c++,!t||l?(l=!1,t=new hn.a(i,s,u),r=t.subscribe(this),n=e.subscribe({next:function(e){t.next(e)},error:function(e){l=!0,t.error(e)},complete:function(){h=!0,n=void 0,t.complete()}}),h&&(n=void 0)):r=t.subscribe(this),this.add((function(){c--,r.unsubscribe(),r=void 0,n&&!h&&a&&0===c&&(n.unsubscribe(),n=void 0,t=void 0)}))}}(r))}}function Wn(e){return function(t){return t.lift(new zn(e,t))}}var zn=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new qn(e,this.predicate,this.source))},e}(),qn=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.predicate=n,i.source=r,i.seenValue=!1,i.index=0,i}return r.__extends(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(n){this.destination.error(n)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new Ne.a)},t}(p.a);function Vn(e){return function(t){return t.lift(new Jn(e))}}var Jn=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new Gn(e,this.total))},e}(),Gn=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return r.__extends(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(p.a);function Yn(e){return function(t){return t.lift(new $n(e))}}var $n=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new Ie.a}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new p.a(e)):t.subscribe(new Kn(e,this._skipCount))},e}(),Kn=function(e){function t(t,n){var r=e.call(this,t)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.__extends(t,e),t.prototype._next=function(e){var t=this._skipCount,n=this._count++;if(n<t)this._ring[n]=e;else{var r=n%t,i=this._ring,o=i[r];i[r]=e,this.destination.next(o)}},t}(p.a);function Qn(e){return function(t){return t.lift(new Xn(e))}}var Xn=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new Zn(e,this.notifier))},e}(),Zn=function(e){function t(t,n){var r=e.call(this,t)||this;r.hasValue=!1;var o=new i.a(r);r.add(o),r.innerSubscription=o;var s=Object(i.c)(n,o);return s!==o&&(r.add(s),r.innerSubscription=s),r}return r.__extends(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t)},t.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},t.prototype.notifyComplete=function(){},t}(i.b);function er(e){return function(t){return t.lift(new tr(e))}}var tr=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new nr(e,this.predicate))},e}(),nr=function(e){function t(t,n){var r=e.call(this,t)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return r.__extends(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=Boolean(t)}catch(n){this.destination.error(n)}},t}(p.a);function rr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return Object(m.a)(n)?(e.pop(),function(t){return Object(q.a)(e,t,n)}):function(t){return Object(q.a)(e,t)}}var ir=n(1160),or=n(1157),sr=function(e){function t(t,n,r){void 0===n&&(n=0),void 0===r&&(r=ir.a);var i=e.call(this)||this;return i.source=t,i.delayTime=n,i.scheduler=r,(!Object(or.a)(n)||n<0)&&(i.delayTime=0),r&&"function"===typeof r.schedule||(i.scheduler=ir.a),i}return r.__extends(t,e),t.create=function(e,n,r){return void 0===n&&(n=0),void 0===r&&(r=ir.a),new t(e,n,r)},t.dispatch=function(e){var t=e.source,n=e.subscriber;return this.add(t.subscribe(n))},t.prototype._subscribe=function(e){var n=this.delayTime,r=this.source;return this.scheduler.schedule(t.dispatch,n,{source:r,subscriber:e})},t}(be.a);function ar(e,t){return void 0===t&&(t=0),function(n){return n.lift(new ur(e,t))}}var ur=function(){function e(e,t){this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return new sr(t,this.delay,this.scheduler).subscribe(e)},e}();function cr(e,t){return"function"===typeof t?function(n){return n.pipe(cr((function(n,r){return Object(W.a)(e(n,r)).pipe(Object(Qe.a)((function(e,i){return t(n,e,r,i)})))})))}:function(t){return t.lift(new lr(e))}}var lr=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new hr(e,this.project))},e}(),hr=function(e){function t(t,n){var r=e.call(this,t)||this;return r.project=n,r.index=0,r}return r.__extends(t,e),t.prototype._next=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(r){return void this.destination.error(r)}this._innerSub(t)},t.prototype._innerSub=function(e){var t=this.innerSubscription;t&&t.unsubscribe();var n=new i.a(this),r=this.destination;r.add(n),this.innerSubscription=Object(i.c)(e,n),this.innerSubscription!==n&&r.add(this.innerSubscription)},t.prototype._complete=function(){var t=this.innerSubscription;t&&!t.closed||e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=void 0},t.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e){this.destination.next(e)},t}(i.b);function dr(){return cr(ht.a)}function fr(e,t){return t?cr((function(){return e}),t):cr((function(){return e}))}function pr(e){return function(t){return t.lift(new br(e))}}var br=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new gr(e),r=Object(i.c)(this.notifier,new i.a(n));return r&&!n.seenValue?(n.add(r),t.subscribe(n)):n},e}(),gr=function(e){function t(t){var n=e.call(this,t)||this;return n.seenValue=!1,n}return r.__extends(t,e),t.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},t.prototype.notifyComplete=function(){},t}(i.b);function yr(e,t){return void 0===t&&(t=!1),function(n){return n.lift(new _r(e,t))}}var _r=function(){function e(e,t){this.predicate=e,this.inclusive=t}return e.prototype.call=function(e,t){return t.subscribe(new mr(e,this.predicate,this.inclusive))},e}(),mr=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.predicate=n,i.inclusive=r,i.index=0,i}return r.__extends(t,e),t.prototype._next=function(e){var t,n=this.destination;try{t=this.predicate(e,this.index++)}catch(r){return void n.error(r)}this.nextOrComplete(e,t)},t.prototype.nextOrComplete=function(e,t){var n=this.destination;Boolean(t)?n.next(e):(this.inclusive&&n.next(e),n.complete())},t}(p.a),vr=n(1153),wr=n(1137);function Sr(e,t,n){return function(r){return r.lift(new Er(e,t,n))}}var Er=function(){function e(e,t,n){this.nextOrObserver=e,this.error=t,this.complete=n}return e.prototype.call=function(e,t){return t.subscribe(new xr(e,this.nextOrObserver,this.error,this.complete))},e}(),xr=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o._tapNext=vr.a,o._tapError=vr.a,o._tapComplete=vr.a,o._tapError=r||vr.a,o._tapComplete=i||vr.a,Object(wr.a)(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||vr.a,o._tapError=n.error||vr.a,o._tapComplete=n.complete||vr.a),o}return r.__extends(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()},t}(p.a),kr={leading:!0,trailing:!1};function Cr(e,t){return void 0===t&&(t=kr),function(n){return n.lift(new Rr(e,!!t.leading,!!t.trailing))}}var Rr=function(){function e(e,t,n){this.durationSelector=e,this.leading=t,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new Mr(e,this.durationSelector,this.leading,this.trailing))},e}(),Mr=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.destination=t,o.durationSelector=n,o._leading=r,o._trailing=i,o._hasValue=!1,o}return r.__extends(t,e),t.prototype._next=function(e){this._hasValue=!0,this._sendValue=e,this._throttled||(this._leading?this.send():this.throttle(e))},t.prototype.send=function(){var e=this._hasValue,t=this._sendValue;e&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=void 0},t.prototype.throttle=function(e){var t=this.tryDurationSelector(e);t&&this.add(this._throttled=Object(i.c)(t,new i.a(this)))},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e)}catch(t){return this.destination.error(t),null}},t.prototype.throttlingDone=function(){var e=this._throttled,t=this._trailing;e&&e.unsubscribe(),this._throttled=void 0,t&&this.send()},t.prototype.notifyNext=function(){this.throttlingDone()},t.prototype.notifyComplete=function(){this.throttlingDone()},t}(i.b);function Or(e,t,n){return void 0===t&&(t=u.a),void 0===n&&(n=kr),function(r){return r.lift(new Ar(e,t,n.leading,n.trailing))}}var Ar=function(){function e(e,t,n,r){this.duration=e,this.scheduler=t,this.leading=n,this.trailing=r}return e.prototype.call=function(e,t){return t.subscribe(new Ir(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),Ir=function(e){function t(t,n,r,i,o){var s=e.call(this,t)||this;return s.duration=n,s.scheduler=r,s.leading=i,s.trailing=o,s._hasTrailingValue=!1,s._trailingValue=null,s}return r.__extends(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(jr,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))},t.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(p.a);function jr(e){e.subscriber.clearThrottle()}var Nr=n(1156);function Tr(e){return void 0===e&&(e=u.a),function(t){return Object(Nr.a)((function(){return t.pipe(At((function(t,n){var r=t.current;return{value:n,current:e.now(),last:r}}),{current:e.now(),value:void 0,last:void 0}),Object(Qe.a)((function(e){var t=e.current,n=e.last,r=e.value;return new Pr(r,t-n)})))}))}}var Pr=function(){return function(e,t){this.value=e,this.interval=t}}(),Lr=n(1179);function Dr(e,t,n){return void 0===n&&(n=u.a),function(r){var i=ce(e),o=i?+e-n.now():Math.abs(e);return r.lift(new Br(o,i,t,n))}}var Br=function(){function e(e,t,n,r){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new Hr(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),Hr=function(e){function t(t,n,r,i,o){var s=e.call(this,t)||this;return s.absoluteTimeout=n,s.waitFor=r,s.withObservable=i,s.scheduler=o,s.scheduleTimeout(),s}return r.__extends(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(Object(i.c)(t,new i.a(e)))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},t}(i.b),Fr=n(1152);function Ur(e,t){return void 0===t&&(t=u.a),Dr(e,Object(Fr.a)(new Lr.a),t)}function Wr(e){return void 0===e&&(e=u.a),Object(Qe.a)((function(t){return new zr(t,e.now())}))}var zr=function(){return function(e,t){this.value=e,this.timestamp=t}}();function qr(e,t,n){return 0===n?[t]:(e.push(t),e)}function Vr(){return Tt(qr,[])}function Jr(e){return function(t){return t.lift(new Gr(e))}}var Gr=function(){function e(e){this.windowBoundaries=e}return e.prototype.call=function(e,t){var n=new Yr(e),r=t.subscribe(n);return r.closed||n.add(Object(i.c)(this.windowBoundaries,new i.a(n))),r},e}(),Yr=function(e){function t(t){var n=e.call(this,t)||this;return n.window=new on.a,t.next(n.window),n}return r.__extends(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,n=this.window=new on.a;t.next(n)},t}(i.b);function $r(e,t){return void 0===t&&(t=0),function(n){return n.lift(new Kr(e,t))}}var Kr=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t}return e.prototype.call=function(e,t){return t.subscribe(new Qr(e,this.windowSize,this.startWindowEvery))},e}(),Qr=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.destination=t,i.windowSize=n,i.startWindowEvery=r,i.windows=[new on.a],i.count=0,t.next(i.windows[0]),i}return r.__extends(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,o=i.length,s=0;s<o&&!this.closed;s++)i[s].next(e);var a=this.count-r+1;if(a>=0&&a%t===0&&!this.closed&&i.shift().complete(),++this.count%t===0&&!this.closed){var u=new on.a;i.push(u),n.next(u)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(p.a);function Xr(e){var t=u.a,n=null,r=Number.POSITIVE_INFINITY;return Object(m.a)(arguments[3])&&(t=arguments[3]),Object(m.a)(arguments[2])?t=arguments[2]:Object(or.a)(arguments[2])&&(r=Number(arguments[2])),Object(m.a)(arguments[1])?t=arguments[1]:Object(or.a)(arguments[1])&&(n=Number(arguments[1])),function(i){return i.lift(new Zr(e,n,r,t))}}var Zr=function(){function e(e,t,n,r){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new ti(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),ei=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return r.__extends(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(on.a),ti=function(e){function t(t,n,r,i,o){var s=e.call(this,t)||this;s.destination=t,s.windowTimeSpan=n,s.windowCreationInterval=r,s.maxWindowSize=i,s.scheduler=o,s.windows=[];var a=s.openWindow();if(null!==r&&r>=0){var u={subscriber:s,window:a,context:null},c={windowTimeSpan:n,windowCreationInterval:r,subscriber:s,scheduler:o};s.add(o.schedule(ii,n,u)),s.add(o.schedule(ri,r,c))}else{var l={subscriber:s,window:a,windowTimeSpan:n};s.add(o.schedule(ni,n,l))}return s}return r.__extends(t,e),t.prototype._next=function(e){for(var t=this.windows,n=t.length,r=0;r<n;r++){var i=t[r];i.closed||(i.next(e),i.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(i))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new ei;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(p.a);function ni(e){var t=e.subscriber,n=e.windowTimeSpan,r=e.window;r&&t.closeWindow(r),e.window=t.openWindow(),this.schedule(e,n)}function ri(e){var t=e.windowTimeSpan,n=e.subscriber,r=e.scheduler,i=e.windowCreationInterval,o=n.openWindow(),s=this,a={action:s,subscription:null},u={subscriber:n,window:o,context:a};a.subscription=r.schedule(ii,t,u),s.add(a.subscription),s.schedule(e,i)}function ii(e){var t=e.subscriber,n=e.window,r=e.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),t.closeWindow(n)}function oi(e,t){return function(n){return n.lift(new si(e,t))}}var si=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new ai(e,this.openings,this.closingSelector))},e}(),ai=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(i.openSubscription=Object(M.a)(i,n,n)),i}return r.__extends(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var n=t.length,r=0;r<n;r++)t[r].window.next(e)},t.prototype._error=function(t){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,i=-1;++i<r;){var o=n[i];o.window.error(t),o.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var n=t.length,r=-1;++r<n;){var i=t[r];i.window.complete(),i.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,n=-1;++n<t;){var r=e[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,n,r,i){if(e===this.openings){var o=void 0;try{o=(0,this.closingSelector)(t)}catch(l){return this.error(l)}var s=new on.a,a=new R.a,u={window:s,subscription:a};this.contexts.push(u);var c=Object(M.a)(this,o,u);c.closed?this.closeWindow(this.contexts.length-1):(c.context=u,a.add(c)),this.destination.next(s)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,n=t[e],r=n.window,i=n.subscription;t.splice(e,1),r.complete(),i.unsubscribe()}},t}(O.a);function ui(e){return function(t){return t.lift(new ci(e))}}var ci=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new li(e,this.closingSelector))},e}(),li=function(e){function t(t,n){var r=e.call(this,t)||this;return r.destination=t,r.closingSelector=n,r.openWindow(),r}return r.__extends(t,e),t.prototype.notifyNext=function(e,t,n,r,i){this.openWindow(i)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t=this.window;t&&t.complete();var n,r=this.window=new on.a;this.destination.next(r);try{n=(0,this.closingSelector)()}catch(i){return this.destination.error(i),void this.window.error(i)}this.add(this.closingNotification=Object(M.a)(this,n))},t}(O.a);function hi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n;"function"===typeof e[e.length-1]&&(n=e.pop());var r=e;return t.lift(new di(r,n))}}var di=function(){function e(e,t){this.observables=e,this.project=t}return e.prototype.call=function(e,t){return t.subscribe(new fi(e,this.observables,this.project))},e}(),fi=function(e){function t(t,n,r){var i=e.call(this,t)||this;i.observables=n,i.project=r,i.toRespond=[];var o=n.length;i.values=new Array(o);for(var s=0;s<o;s++)i.toRespond.push(s);for(s=0;s<o;s++){var a=n[s];i.add(Object(M.a)(i,a,void 0,s))}return i}return r.__extends(t,e),t.prototype.notifyNext=function(e,t,n){this.values[n]=t;var r=this.toRespond;if(r.length>0){var i=r.indexOf(n);-1!==i&&r.splice(i,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)},t}(O.a),pi=n(1158);function bi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(pi.b.apply(void 0,[t].concat(e)))}}function gi(e){return function(t){return t.lift(new pi.a(e))}}},1160:function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return f}));var r=n(83),i=1,o=function(){return Promise.resolve()}(),s={};function a(e){return e in s&&(delete s[e],!0)}var u=function(e){var t=i++;return s[t]=!0,o.then((function(){return a(t)&&e()})),t},c=function(e){a(e)},l=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return r.__extends(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||(t.scheduled=u(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(c(n),t.scheduled=void 0)},t}(n(1146).a),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,r=-1,i=n.length;e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while(++r<i&&(e=n.shift()));if(this.active=!1,t){for(;++r<i&&(e=n.shift());)e.unsubscribe();throw t}},t}(n(1141).a),d=new h(l),f=d},1161:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1201),i=n(1169),o=n(1143),s=n(1122),a=n(1202),u=n(1203),c=n(1172),l=function(e){if(e&&"function"===typeof e[s.a])return l=e,function(e){var t=l[s.a]();if("function"!==typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(Object(a.a)(e))return Object(r.a)(e);if(Object(u.a)(e))return n=e,function(e){return n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,i.a),e};if(e&&"function"===typeof e[o.a])return t=e,function(e){for(var n=t[o.a]();;){var r=void 0;try{r=n.next()}catch(i){return e.error(i),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"===typeof n.return&&e.add((function(){n.return&&n.return()})),e};var t,n,l,h=Object(c.a)(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+h+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},1162:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return a}));var r=n(83),i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return r.__extends(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):t.flush(this)},t}(n(1146).a),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(n(1141).a),s=new o(i),a=s},1163:function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletProvider=void 0;const i=r(n(1147)),o=r(n(17)),s=n(1164),a=n(1167),u=n(1168),c=n(1206),l=n(1121),h=r(n(1235)),d=n(1252),f=n(1253),p=n(1254),b="DefaultChainId",g="DefaultJsonRpcUrl",y="HasChainBeenSwitched",_="HasChainOverriddenFromRelay";class m extends i.default{constructor(e){var t,n;super(),this._filterPolyfill=new d.FilterPolyfill(this),this._subscriptionManager=new p.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this._send=this.send.bind(this),this._sendAsync=this.sendAsync.bind(this),this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._jsonRpcUrlFromOpts=e.jsonRpcUrl,this._overrideIsMetaMask=e.overrideIsMetaMask,this._relayProvider=e.relayProvider,this._storage=e.storage,this._relayEventManager=e.relayEventManager,this._eventListener=e.eventListener,this.isCoinbaseWallet=null===(t=e.overrideIsCoinbaseWallet)||void 0===t||t,this.isCoinbaseBrowser=null!==(n=e.overrideIsCoinbaseBrowser)&&void 0!==n&&n,this.qrUrl=e.qrUrl,this.supportsAddressSwitching=e.supportsAddressSwitching;const r=this.getChainId(),i=(0,l.prepend0x)(r.toString(16));this.emit("connect",{chainIdStr:i});const o=this._storage.getItem(c.LOCAL_STORAGE_ADDRESSES_KEY);if(o){const e=o.split(" ");""!==e[0]&&(this._addresses=e.map((e=>(0,l.ensureAddressString)(e))),this.emit("accountsChanged",e))}this._subscriptionManager.events.on("notification",(e=>{this.emit("message",{type:e.method,data:e.params})})),this._addresses.length>0&&this.initializeRelay(),window.addEventListener("message",(e=>{var t;if("walletLinkMessage"===e.data.type&&"defaultChainChanged"===e.data.data.action){const n=e.data.data.chainId,r=null!==(t=e.data.data.jsonRpcUrl)&&void 0!==t?t:this.jsonRpcUrl;this.updateProviderInfo(r,Number(n),!0)}}))}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,l.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var e;return null!==(e=this._storage.getItem(g))&&void 0!==e?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(g,e)}get isChainOverridden(){return"true"===this._storage.getItem(_)}set isChainOverridden(e){this._storage.setItem(_,e.toString())}setProviderInfo(e,t){this.isChainOverridden||this.updateProviderInfo(e,this.getChainId(),!1)}updateProviderInfo(e,t,n){if("true"===this._storage.getItem(y)&&n)return;n&&(this.isChainOverridden=!0),this.jsonRpcUrl=e;const r=this.getChainId();this._storage.setItem(b,t.toString(10));!((0,l.ensureIntNumber)(t)!==r)&&this.hasMadeFirstChainChangedEmission||(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,t,n,r,i,o){const s=await this.initializeRelay();return!!(await s.watchAsset(e,t,n,r,i,null===o||void 0===o?void 0:o.toString()).promise).result}async addEthereumChain(e,t,n,r,i,o){var s,a;if((0,l.ensureIntNumber)(e)===this.getChainId())return!1;const u=await this.initializeRelay(),c=u.inlineAddEthereumChain(e.toString());this._isAuthorized()||c||await u.requestEthereumAccounts().promise;const h=await u.addEthereumChain(e.toString(),t,i,n,r,o).promise;return!0===(null===(s=h.result)||void 0===s?void 0:s.isApproved)&&(this._storage.setItem(y,"true"),this.updateProviderInfo(t[0],e,!1)),!0===(null===(a=h.result)||void 0===a?void 0:a.isApproved)}async switchEthereumChain(e){if((0,l.ensureIntNumber)(e)===this.getChainId())return;const t=await this.initializeRelay(),n=await t.switchEthereumChain(e.toString(10)).promise;if(n.errorCode)throw s.ethErrors.provider.custom({code:n.errorCode});const r=n.result;r.isApproved&&r.rpcUrl.length>0&&(this._storage.setItem(y,"true"),this.updateProviderInfo(r.rpcUrl,e,!1))}setAppInfo(e,t){this.initializeRelay().then((n=>n.setAppInfo(e,t)))}async enable(){var e;return null===(e=this._eventListener)||void 0===e||e.onEvent(a.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?u.Session.hash(this._relay.session.id):null}),this._addresses.length>0?[...this._addresses]:await this._send(f.JSONRPCMethod.eth_requestAccounts)}async close(){(await this.initializeRelay()).resetAndReload()}send(e,t){if("string"===typeof e){const n={jsonrpc:"2.0",id:0,method:e,params:Array.isArray(t)?t:void 0!==t?[t]:[]};return this._sendRequestAsync(n).then((e=>e.result))}if("function"===typeof t){const n=e,r=t;return this._sendAsync(n,r)}if(Array.isArray(e)){return e.map((e=>this._sendRequest(e)))}const n=e;return this._sendRequest(n)}async sendAsync(e,t){if("function"!==typeof t)throw new Error("callback is required");if(Array.isArray(e)){const n=t;return void this._sendMultipleRequestsAsync(e).then((e=>n(null,e))).catch((e=>n(e,null)))}const n=t;return this._sendRequestAsync(e).then((e=>n(null,e))).catch((e=>n(e,null)))}async request(e){if(!e||"object"!==typeof e||Array.isArray(e))throw s.ethErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});const{method:t,params:n}=e;if("string"!==typeof t||0===t.length)throw s.ethErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(void 0!==n&&!Array.isArray(n)&&("object"!==typeof n||null===n))throw s.ethErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});const r=void 0===n?[]:n,i=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:t,params:r,jsonrpc:"2.0",id:i})).result}async scanQRCode(e){const t=await this.initializeRelay(),n=await t.scanQRCode((0,l.ensureRegExpString)(e)).promise;if("string"!==typeof n.result)throw new Error("result was not a string");return n.result}async genericRequest(e,t){const n=await this.initializeRelay(),r=await n.genericRequest(e,t).promise;if("string"!==typeof r.result)throw new Error("result was not a string");return r.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(e){const t={jsonrpc:"2.0",id:e.id},{method:n}=e;if(t.result=this._handleSynchronousMethods(e),void 0===t.result)throw new Error(`Coinbase Wallet does not support calling ${n} synchronously without a callback. Please provide a callback parameter to call ${n} asynchronously.`);return t}_setAddresses(e){if(!Array.isArray(e))throw new Error("addresses is not an array");const t=e.map((e=>(0,l.ensureAddressString)(e)));JSON.stringify(t)!==JSON.stringify(this._addresses)&&(this._addresses.length>0&&!1===this.supportsAddressSwitching||(this._addresses=t,this.emit("accountsChanged",this._addresses),this._storage.setItem(c.LOCAL_STORAGE_ADDRESSES_KEY,t.join(" "))))}_sendRequestAsync(e){return new Promise(((t,n)=>{try{const r=this._handleSynchronousMethods(e);if(void 0!==r)return t({jsonrpc:"2.0",id:e.id,result:r});const i=this._handleAsynchronousFilterMethods(e);if(void 0!==i)return void i.then((n=>t(Object.assign(Object.assign({},n),{id:e.id})))).catch((e=>n(e)));const o=this._handleSubscriptionMethods(e);if(void 0!==o)return void o.then((n=>t({jsonrpc:"2.0",id:e.id,result:n.result}))).catch((e=>n(e)))}catch(r){return n(r)}this._handleAsynchronousMethods(e).then((n=>n&&t(Object.assign(Object.assign({},n),{id:e.id})))).catch((e=>n(e)))}))}_sendMultipleRequestsAsync(e){return Promise.all(e.map((e=>this._sendRequestAsync(e))))}_handleSynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case f.JSONRPCMethod.eth_accounts:return this._eth_accounts();case f.JSONRPCMethod.eth_coinbase:return this._eth_coinbase();case f.JSONRPCMethod.eth_uninstallFilter:return this._eth_uninstallFilter(n);case f.JSONRPCMethod.net_version:return this._net_version();case f.JSONRPCMethod.eth_chainId:return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case f.JSONRPCMethod.eth_requestAccounts:return this._eth_requestAccounts();case f.JSONRPCMethod.eth_sign:return this._eth_sign(n);case f.JSONRPCMethod.eth_ecRecover:return this._eth_ecRecover(n);case f.JSONRPCMethod.personal_sign:return this._personal_sign(n);case f.JSONRPCMethod.personal_ecRecover:return this._personal_ecRecover(n);case f.JSONRPCMethod.eth_signTransaction:return this._eth_signTransaction(n);case f.JSONRPCMethod.eth_sendRawTransaction:return this._eth_sendRawTransaction(n);case f.JSONRPCMethod.eth_sendTransaction:return this._eth_sendTransaction(n);case f.JSONRPCMethod.eth_signTypedData_v1:return this._eth_signTypedData_v1(n);case f.JSONRPCMethod.eth_signTypedData_v2:return this._throwUnsupportedMethodError();case f.JSONRPCMethod.eth_signTypedData_v3:return this._eth_signTypedData_v3(n);case f.JSONRPCMethod.eth_signTypedData_v4:case f.JSONRPCMethod.eth_signTypedData:return this._eth_signTypedData_v4(n);case f.JSONRPCMethod.cbWallet_arbitrary:return this._cbwallet_arbitrary(n);case f.JSONRPCMethod.wallet_addEthereumChain:return this._wallet_addEthereumChain(n);case f.JSONRPCMethod.wallet_switchEthereumChain:return this._wallet_switchEthereumChain(n);case f.JSONRPCMethod.wallet_watchAsset:return this._wallet_watchAsset(n)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(e,this.jsonRpcUrl)}_handleAsynchronousFilterMethods(e){const{method:t}=e,n=e.params||[];switch(t){case f.JSONRPCMethod.eth_newFilter:return this._eth_newFilter(n);case f.JSONRPCMethod.eth_newBlockFilter:return this._eth_newBlockFilter();case f.JSONRPCMethod.eth_newPendingTransactionFilter:return this._eth_newPendingTransactionFilter();case f.JSONRPCMethod.eth_getFilterChanges:return this._eth_getFilterChanges(n);case f.JSONRPCMethod.eth_getFilterLogs:return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(e){switch(e.method){case f.JSONRPCMethod.eth_subscribe:case f.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(e)}}_isKnownAddress(e){try{const t=(0,l.ensureAddressString)(e);return this._addresses.map((e=>(0,l.ensureAddressString)(e))).includes(t)}catch(t){}return!1}_ensureKnownAddress(e){var t;if(!this._isKnownAddress(e))throw null===(t=this._eventListener)||void 0===t||t.onEvent(a.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(t){const n=t.from?(0,l.ensureAddressString)(t.from):this.selectedAddress;if(!n)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(n);return{fromAddress:n,toAddress:t.to?(0,l.ensureAddressString)(t.to):null,weiValue:null!=t.value?(0,l.ensureBN)(t.value):new o.default(0),data:t.data?(0,l.ensureBuffer)(t.data):e.alloc(0),nonce:null!=t.nonce?(0,l.ensureIntNumber)(t.nonce):null,gasPriceInWei:null!=t.gasPrice?(0,l.ensureBN)(t.gasPrice):null,maxFeePerGas:null!=t.maxFeePerGas?(0,l.ensureBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:null!=t.maxPriorityFeePerGas?(0,l.ensureBN)(t.maxPriorityFeePerGas):null,gasLimit:null!=t.gas?(0,l.ensureBN)(t.gas):null,chainId:this.getChainId()}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw s.ethErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw s.ethErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,t,n,r){this._ensureKnownAddress(t);try{const i=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await i.signEthereumMessage(e,t,n,r).promise).result}}catch(i){if("string"===typeof i.message&&i.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied message signature");throw i}}async _ethereumAddressFromSignedMessage(e,t,n){const r=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await r.ethereumAddressFromSignedMessage(e,t,n).promise).result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,l.hexStringFromIntNumber)(this.getChainId())}getChainId(){const e=this._storage.getItem(b)||"1",t=parseInt(e,10);return(0,l.ensureIntNumber)(t)}async _eth_requestAccounts(){var e;if(null===(e=this._eventListener)||void 0===e||e.onEvent(a.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?u.Session.hash(this._relay.session.id):null}),this._addresses.length>0)return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let t;try{const e=await this.initializeRelay();t=await e.requestEthereumAccounts().promise}catch(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied account authorization");throw n}if(!t.result)throw new Error("accounts received is empty");return this._setAddresses(t.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();const t=(0,l.ensureAddressString)(e[0]),n=(0,l.ensureBuffer)(e[1]);return this._signEthereumMessage(n,t,!1)}_eth_ecRecover(e){const t=(0,l.ensureBuffer)(e[0]),n=(0,l.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!1)}_personal_sign(e){this._requireAuthorization();const t=(0,l.ensureBuffer)(e[0]),n=(0,l.ensureAddressString)(e[1]);return this._signEthereumMessage(t,n,!0)}_personal_ecRecover(e){const t=(0,l.ensureBuffer)(e[0]),n=(0,l.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const e=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await e.signEthereumTransaction(t).promise).result}}catch(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_sendRawTransaction(e){const t=(0,l.ensureBuffer)(e[0]),n=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await n.submitEthereumTransaction(t,this.getChainId()).promise).result}}async _eth_sendTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const e=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await e.signAndSubmitEthereumTransaction(t).promise).result}}catch(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_signTypedData_v1(e){this._requireAuthorization();const t=(0,l.ensureParsedJSONObject)(e[0]),n=(0,l.ensureAddressString)(e[1]);this._ensureKnownAddress(n);const r=h.default.hashForSignTypedDataLegacy({data:t}),i=JSON.stringify(t,null,2);return this._signEthereumMessage(r,n,!1,i)}async _eth_signTypedData_v3(e){this._requireAuthorization();const t=(0,l.ensureAddressString)(e[0]),n=(0,l.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const r=h.default.hashForSignTypedData_v3({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,t,!1,i)}async _eth_signTypedData_v4(e){this._requireAuthorization();const t=(0,l.ensureAddressString)(e[0]),n=(0,l.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const r=h.default.hashForSignTypedData_v4({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,t,!1,i)}async _cbwallet_arbitrary(e){const t=e[0],n=e[1];if("string"!==typeof n)throw new Error("parameter must be a string");if("object"!==typeof t||null===t)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(t,n)}}async _wallet_addEthereumChain(e){var t,n,r,i;const o=e[0];if(0===(null===(t=o.rpcUrls)||void 0===t?void 0:t.length))return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!o.chainName||""===o.chainName.trim())throw s.ethErrors.provider.custom({code:0,message:"chainName is a required field"});if(!o.nativeCurrency)throw s.ethErrors.provider.custom({code:0,message:"nativeCurrency is a required field"});const a=parseInt(o.chainId,16);return await this.addEthereumChain(a,null!==(n=o.rpcUrls)&&void 0!==n?n:[],null!==(r=o.blockExplorerUrls)&&void 0!==r?r:[],o.chainName,null!==(i=o.iconUrls)&&void 0!==i?i:[],o.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){const t=e[0];return await this.switchEthereumChain(parseInt(t.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){var t;const n=Array.isArray(e)?e[0]:e;if(0===(null===(t=n.type)||void 0===t?void 0:t.length))throw s.ethErrors.rpc.invalidParams({message:"type is a required field"});if("ERC20"!==n.type)throw s.ethErrors.rpc.invalidParams({message:`Asset of type '${n.type}' not supported`});if(!(null===n||void 0===n?void 0:n.options))throw s.ethErrors.rpc.invalidParams({message:"options is a required field"});if(!n.options.address)throw s.ethErrors.rpc.invalidParams({message:"option address is a required option"});const r=this.getChainId(),{address:i,symbol:o,image:a,decimals:u}=n.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(n.type,i,o,u,a,r)}}_eth_uninstallFilter(e){const t=(0,l.ensureHexString)(e[0]);return this._filterPolyfill.uninstallFilter(t)}async _eth_newFilter(e){const t=e[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(t)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(e){const t=(0,l.ensureHexString)(e[0]);return this._filterPolyfill.getFilterChanges(t)}_eth_getFilterLogs(e){const t=(0,l.ensureHexString)(e[0]);return this._filterPolyfill.getFilterLogs(t)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then((e=>(e.setAccountsCallback((e=>this._setAddresses(e))),e.setChainCallback(((e,t)=>{this.updateProviderInfo(t,parseInt(e,10),!0)})),this._relay=e,e)))}}t.CoinbaseWalletProvider=m}).call(this,n(304).Buffer)},1164:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const r=n(1165);Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return r.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});const i=n(1198);Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=n(1230);Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=n(1166);Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})},1165:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.EthereumRpcError=void 0;const r=n(1197);class i extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!==typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==n&&(this.data=n)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return r.default(this.serialize(),o,2)}}t.EthereumRpcError=i;function o(e,t){if("[Circular]"!==t)return t}t.EthereumProviderError=class extends i{constructor(e,t,n){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}},1166:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},1167:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EVENTS=void 0,t.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}},1168:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Session=void 0;const r=n(1231),i=n(1135),o=n(1159),s=n(1121),a="session:id",u="session:secret",c="session:linked";class l{constructor(e,t,n,i){this._storage=e,this._id=t||(0,s.randomBytesHex)(16),this._secret=n||(0,s.randomBytesHex)(32);const o=r.sha256.create();o.update(`${this._id}, ${this._secret} WalletLink`),this._key=o.hex(),this._linked=!!i}static load(e){const t=e.getItem(a),n=e.getItem(c),r=e.getItem(u);return t&&r?new l(e,t,r,"1"===n):null}static get persistedSessionIdChange$(){return(0,i.fromEvent)(window,"storage").pipe((0,o.filter)((e=>e.key===a)),(0,o.map)((e=>({oldValue:e.oldValue||null,newValue:e.newValue||null}))))}static hash(e){return r.sha256.create().update(e).hex()}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(a,this._id),this._storage.setItem(u,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(c,this._linked?"1":"0")}}t.Session=l},1169:function(e,t,n){"use strict";function r(e){setTimeout((function(){throw e}),0)}n.d(t,"a",(function(){return r}))},1170:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){return"function"===typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},1171:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}()},1172:function(e,t,n){"use strict";function r(e){return null!==e&&"object"===typeof e}n.d(t,"a",(function(){return r}))},1173:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1108);function i(e){for(;e;){var t=e,n=t.closed,i=t.destination,o=t.isStopped;if(n||o)return!1;e=i&&i instanceof r.a?i:null}return!0}},1174:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l}));var r=n(83),i=n(1112),o=n(1109),s=n(1108),a=n(1111),u=n(1149),c=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.__extends(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new a.a).add(this.source.subscribe(new h(this.getSubject(),this))),e.closed&&(this._connection=null,e=a.a.EMPTY)),e},t.prototype.refCount=function(){return Object(u.a)()(this)},t}(o.a),l=function(){var e=c.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:e._subscribe},_isComplete:{value:e._isComplete,writable:!0},getSubject:{value:e.getSubject},connect:{value:e.connect},refCount:{value:e.refCount}}}(),h=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return r.__extends(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(i.b);s.a},1175:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(83),i=n(1112),o=n(1138),s=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return r.__extends(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.a;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.a)},1176:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return u}));var r=n(83),i=n(1108),o=n(1128);function s(e,t){return void 0===t&&(t=0),function(n){return n.lift(new a(e,t))}}var a=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.scheduler,this.delay))},e}(),u=function(e){function t(t,n,r){void 0===r&&(r=0);var i=e.call(this,t)||this;return i.scheduler=n,i.delay=r,i}return r.__extends(t,e),t.dispatch=function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new c(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(o.a.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(o.a.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(o.a.createComplete()),this.unsubscribe()},t}(i.a),c=function(){return function(e,t){this.notification=e,this.destination=t}}()},1177:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1109),i=n(1111);function o(e,t){return new r.a((function(n){var r=new i.a,o=0;return r.add(t.schedule((function(){o!==e.length?(n.next(e[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}},1178:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(t,n){void 0===n&&(n=e.now),this.SchedulerAction=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(n,t)},e.now=function(){return Date.now()},e}()},1179:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}()},1180:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1155);function i(){return Object(r.a)(1)}},1181:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1109),i=n(1119),o=n(1155),s=n(1140);function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Number.POSITIVE_INFINITY,a=null,u=e[e.length-1];return Object(i.a)(u)?(a=e.pop(),e.length>1&&"number"===typeof e[e.length-1]&&(n=e.pop())):"number"===typeof u&&(n=e.pop()),null===a&&1===e.length&&e[0]instanceof r.a?e[0]:Object(o.a)(n)(Object(s.a)(e,a))}},1182:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(83),i=n(1114),o=n(1140),s=n(1123),a=n(1127);function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){if(!Object(i.a)(e[0]))return e[0];e=e[0]}return Object(o.a)(e,void 0).lift(new c)}var c=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new l(e))},e}(),l=function(e){function t(t){var n=e.call(this,t)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return r.__extends(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var n=0;n<t&&!this.hasFirst;n++){var r=e[n],i=Object(a.a)(this,r,void 0,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},t.prototype.notifyNext=function(e,t,n){if(!this.hasFirst){this.hasFirst=!0;for(var r=0;r<this.subscriptions.length;r++)if(r!==n){var i=this.subscriptions[r];i.unsubscribe(),this.remove(i)}this.subscriptions=null}this.destination.next(t)},t}(s.a)},1183:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1109),i=n(1113),o=n(1157),s=n(1119);function a(e,t,n){void 0===e&&(e=0);var a=-1;return Object(o.a)(t)?a=Number(t)<1?1:Number(t):Object(s.a)(t)&&(n=t),Object(s.a)(n)||(n=i.a),new r.a((function(t){var r=Object(o.a)(e)?e:+e-n.now();return n.schedule(u,r,{index:0,period:a,subscriber:t})}))}function u(e){var t=e.index,n=e.period,r=e.subscriber;if(r.next(t),!r.closed){if(-1===n)return r.complete();e.index=t+1,this.schedule(e,n)}}},1184:function(e,t,n){"use strict";var r=String.prototype.replace,i=/%20/g,o="RFC1738",s="RFC3986";e.exports={default:s,formatters:{RFC1738:function(e){return r.call(e,i,"+")},RFC3986:function(e){return String(e)}},RFC1738:o,RFC3986:s}},1185:function(e,t,n){"use strict";function r(){return e=>e}Object.defineProperty(t,"__esModule",{value:!0}),t.RegExpString=t.IntNumber=t.BigIntString=t.AddressString=t.HexString=t.OpaqueType=void 0,t.OpaqueType=r,t.HexString=e=>e,t.AddressString=e=>e,t.BigIntString=e=>e,t.IntNumber=function(e){return Math.floor(e)},t.RegExpString=e=>e},1186:function(e,t,n){"use strict";var r=n(1132).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,o){if("function"===typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(o||i);var s=n.readable||!1!==n.readable&&t.readable,a=n.writable||!1!==n.writable&&t.writable,u=function(){t.writable||l()},c=t._writableState&&t._writableState.finished,l=function(){a=!1,c=!0,s||o.call(t)},h=t._readableState&&t._readableState.endEmitted,d=function(){s=!1,h=!0,a||o.call(t)},f=function(e){o.call(t,e)},p=function(){var e;return s&&!h?(t._readableState&&t._readableState.ended||(e=new r),o.call(t,e)):a&&!c?(t._writableState&&t._writableState.ended||(e=new r),o.call(t,e)):void 0},b=function(){t.req.on("finish",l)};return!function(e){return e.setHeader&&"function"===typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",l),t.on("abort",p),t.req?b():t.on("request",b)),t.on("end",d),t.on("finish",l),!1!==n.error&&t.on("error",f),t.on("close",p),function(){t.removeListener("complete",l),t.removeListener("abort",p),t.removeListener("request",b),t.req&&t.req.removeListener("finish",l),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",l),t.removeListener("end",d),t.removeListener("error",f),t.removeListener("close",p)}}},1187:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.EthereumRpcError=void 0;const r=n(1197);class i extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!==typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==n&&(this.data=n)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return r.default(this.serialize(),o,2)}}t.EthereumRpcError=i;function o(e,t){if("[Circular]"!==t)return t}t.EthereumProviderError=class extends i{constructor(e,t,n){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}},1188:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},1189:function(e,t,n){const r=n(1147).default;e.exports=class extends r{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(e){this.updates=this.updates.concat(e),e.forEach((e=>this.emit("update",e)))}addInitialResults(e){}getChangesAndClear(){const e=this.updates;return this.updates=[],e}}},1190:function(e,t){function n(e){return void 0===e||null===e?e:Number.parseInt(e,16)}function r(e){if(void 0===e||null===e)return e;return"0x"+e.toString(16)}e.exports=async function(e){let{provider:t,fromBlock:i,toBlock:o}=e;i||(i=o);const s=n(i),a=n(o),u=Array(a-s+1).fill().map(((e,t)=>s+t)).map(r);return await Promise.all(u.map((e=>function(e,t,n){return new Promise(((r,i)=>{e.sendAsync({id:1,jsonrpc:"2.0",method:t,params:n},((e,t)=>{if(e)return i(e);r(t.result)}))}))}(t,"eth_getBlockByNumber",[e,!1]))))}},1191:function(e,t,n){"use strict";n.r(t),n.d(t,"useCallback",(function(){return x})),n.d(t,"useContext",(function(){return k})),n.d(t,"useDebugValue",(function(){return C})),n.d(t,"useEffect",(function(){return m})),n.d(t,"useErrorBoundary",(function(){return R})),n.d(t,"useId",(function(){return M})),n.d(t,"useImperativeHandle",(function(){return S})),n.d(t,"useLayoutEffect",(function(){return v})),n.d(t,"useMemo",(function(){return E})),n.d(t,"useReducer",(function(){return _})),n.d(t,"useRef",(function(){return w})),n.d(t,"useState",(function(){return y}));var r,i,o,s,a=n(1134),u=0,c=[],l=[],h=a.options.__b,d=a.options.__r,f=a.options.diffed,p=a.options.__c,b=a.options.unmount;function g(e,t){a.options.__h&&a.options.__h(i,e,u||t),u=0;var n=i.__H||(i.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:l}),n.__[e]}function y(e){return u=1,_(P,e)}function _(e,t,n){var o=g(r++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):P(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],n=o.t(t,e);t!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=i,!i.u)){i.u=!0;var s=i.shouldComponentUpdate;i.shouldComponentUpdate=function(e,t,n){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!s||s.call(this,e,t,n);var i=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&o.__c.props===e)&&(!s||s.call(this,e,t,n))}}return o.__N||o.__}function m(e,t){var n=g(r++,3);!a.options.__s&&T(n.__H,t)&&(n.__=e,n.i=t,i.__H.__h.push(n))}function v(e,t){var n=g(r++,4);!a.options.__s&&T(n.__H,t)&&(n.__=e,n.i=t,i.__h.push(n))}function w(e){return u=5,E((function(){return{current:e}}),[])}function S(e,t,n){u=6,v((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function E(e,t){var n=g(r++,7);return T(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function x(e,t){return u=8,E((function(){return e}),t)}function k(e){var t=i.context[e.__c],n=g(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(i)),t.props.value):e.__}function C(e,t){a.options.useDebugValue&&a.options.useDebugValue(t?t(e):e)}function R(e){var t=g(r++,10),n=y();return t.__=e,i.componentDidCatch||(i.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function M(){var e=g(r++,11);if(!e.__){for(var t=i.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function O(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(j),e.__H.__h.forEach(N),e.__H.__h=[]}catch(i){e.__H.__h=[],a.options.__e(i,e.__v)}}a.options.__b=function(e){i=null,h&&h(e)},a.options.__r=function(e){d&&d(e),r=0;var t=(i=e.__c).__H;t&&(o===i?(t.__h=[],i.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=l,e.__N=e.i=void 0}))):(t.__h.forEach(j),t.__h.forEach(N),t.__h=[])),o=i},a.options.diffed=function(e){f&&f(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&s===a.options.requestAnimationFrame||((s=a.options.requestAnimationFrame)||I)(O)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==l&&(e.__=e.__V),e.i=void 0,e.__V=l}))),o=i=null},a.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(j),e.__h=e.__h.filter((function(e){return!e.__||N(e)}))}catch(o){t.some((function(e){e.__h&&(e.__h=[])})),t=[],a.options.__e(o,e.__v)}})),p&&p(e,t)},a.options.unmount=function(e){b&&b(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{j(e)}catch(e){t=e}})),n.__H=void 0,t&&a.options.__e(t,n.__v))};var A="function"==typeof requestAnimationFrame;function I(e){var t,n=function(){clearTimeout(r),A&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);A&&(t=requestAnimationFrame(n))}function j(e){var t=i,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),i=t}function N(e){var t=i;e.__c=e.__(),i=t}function T(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function P(e,t){return"function"==typeof t?t(e):t}},1192:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelayMessageType=void 0,function(e){e.SESSION_ID_REQUEST="SESSION_ID_REQUEST",e.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",e.LINKED="LINKED",e.UNLINKED="UNLINKED",e.WEB3_REQUEST="WEB3_REQUEST",e.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",e.WEB3_RESPONSE="WEB3_RESPONSE"}(t.RelayMessageType||(t.RelayMessageType={}))},1194:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1109),i=n(1111),o=n(1122);var s=n(1177),a=n(1143);var u=n(1203),c=n(1202);function l(e,t){if(null!=e){if(function(e){return e&&"function"===typeof e[o.a]}(e))return function(e,t){return new r.a((function(n){var r=new i.a;return r.add(t.schedule((function(){var i=e[o.a]();r.add(i.subscribe({next:function(e){r.add(t.schedule((function(){return n.next(e)})))},error:function(e){r.add(t.schedule((function(){return n.error(e)})))},complete:function(){r.add(t.schedule((function(){return n.complete()})))}}))}))),r}))}(e,t);if(Object(u.a)(e))return function(e,t){return new r.a((function(n){var r=new i.a;return r.add(t.schedule((function(){return e.then((function(e){r.add(t.schedule((function(){n.next(e),r.add(t.schedule((function(){return n.complete()})))})))}),(function(e){r.add(t.schedule((function(){return n.error(e)})))}))}))),r}))}(e,t);if(Object(c.a)(e))return Object(s.a)(e,t);if(function(e){return e&&"function"===typeof e[a.a]}(e)||"string"===typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new r.a((function(n){var r,o=new i.a;return o.add((function(){r&&"function"===typeof r.return&&r.return()})),o.add(t.schedule((function(){r=e[a.a](),o.add(t.schedule((function(){if(!n.closed){var e,t;try{var i=r.next();e=i.value,t=i.done}catch(o){return void n.error(o)}t?n.complete():(n.next(e),this.schedule())}})))}))),o}))}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}},1196:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletSDK=void 0;const r=n(1229),i=n(1163),o=n(1277),s=n(1294),a=n(1306),u=n(1121),c=Object({NODE_ENV:"production",PUBLIC_URL:"https://cdn.decentraland.org/@dcl/explorer-website/0.1.0-7378979040.commit-0cf2023",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_WEBSITE_VERSION:"0.1.0-7378979040.commit-0cf2023",REACT_APP_EXPLORER_VERSION:"1.0.131583-20230718133624.commit-7106e1f",REACT_APP_EXPLORER_BASE_URL:""}).LINK_API_URL||"https://www.walletlink.org",l=Object({NODE_ENV:"production",PUBLIC_URL:"https://cdn.decentraland.org/@dcl/explorer-website/0.1.0-7378979040.commit-0cf2023",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_WEBSITE_VERSION:"0.1.0-7378979040.commit-0cf2023",REACT_APP_EXPLORER_VERSION:"1.0.131583-20230718133624.commit-7106e1f",REACT_APP_EXPLORER_BASE_URL:""}).SDK_VERSION||n(1307).version||"unknown";class h{constructor(e){var t,n;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const i=e.linkAPIUrl||c;let u;u=e.uiConstructor?e.uiConstructor:e=>new o.WalletSDKUI(e),"undefined"===typeof e.overrideIsMetaMask?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=e.overrideIsMetaMask,this._overrideIsCoinbaseWallet=null===(t=e.overrideIsCoinbaseWallet)||void 0===t||t,this._overrideIsCoinbaseBrowser=null!==(n=e.overrideIsCoinbaseBrowser)&&void 0!==n&&n,this._eventListener=e.eventListener;const d=new URL(i),f=`${d.protocol}//${d.host}`;this._storage=new r.ScopedLocalStorage(`-walletlink:${f}`),this._storage.setItem("version",h.VERSION),this.walletExtension||(this._relayEventManager=new a.WalletSDKRelayEventManager,this._relay=new s.WalletSDKRelay({linkAPIUrl:i,version:l,darkMode:!!e.darkMode,uiConstructor:u,storage:this._storage,relayEventManager:this._relayEventManager,eventListener:this._eventListener}),this.setAppInfo(e.appName,e.appLogoUrl),e.headlessMode||this._relay.attachUI())}makeWeb3Provider(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(e,t),n;const r=this._relay;if(!r||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||r.setConnectDisabled(!0),new i.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(r),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:t,qrUrl:this.getQrUrl(),eventListener:this._eventListener,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(e,t){var n;this._appName=e||"DApp",this._appLogoUrl=t||(0,u.getFavicon)();const r=this.walletExtension;r?this.isCipherProvider(r)||r.setAppInfo(this._appName,this._appLogoUrl):null===(n=this._relay)||void 0===n||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var e;const t=this.walletExtension;t?t.close():null===(e=this._relay)||void 0===e||e.resetAndReload()}getQrUrl(){var e,t;return null!==(t=null===(e=this._relay)||void 0===e?void 0:e.getQRCodeUrl())&&void 0!==t?t:null}get walletExtension(){var e;return null!==(e=window.coinbaseWalletExtension)&&void 0!==e?e:window.walletLinkExtension}isCipherProvider(e){return"boolean"===typeof e.isCipher&&e.isCipher}}t.CoinbaseWalletSDK=h,h.VERSION=l},1197:function(e,t){e.exports=i,i.default=i,i.stable=a,i.stableStringify=a;var n=[],r=[];function i(e,t,i){var s;o(e,"",[],void 0);try{s=0===r.length?JSON.stringify(e,t,i):JSON.stringify(e,c(t),i)}catch(u){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var a=n.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return s}function o(e,t,i,s){var a;if("object"===typeof e&&null!==e){for(a=0;a<i.length;a++)if(i[a]===e){var u=Object.getOwnPropertyDescriptor(s,t);return void(void 0!==u.get?u.configurable?(Object.defineProperty(s,t,{value:"[Circular]"}),n.push([s,t,e,u])):r.push([e,t]):(s[t]="[Circular]",n.push([s,t,e])))}if(i.push(e),Array.isArray(e))for(a=0;a<e.length;a++)o(e[a],a,i,e);else{var c=Object.keys(e);for(a=0;a<c.length;a++){var l=c[a];o(e[l],l,i,e)}}i.pop()}}function s(e,t){return e<t?-1:e>t?1:0}function a(e,t,i){var o,s=u(e,"",[],void 0)||e;try{o=0===r.length?JSON.stringify(s,t,i):JSON.stringify(s,c(t),i)}catch(l){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var a=n.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return o}function u(e,t,i,o){var a;if("object"===typeof e&&null!==e){for(a=0;a<i.length;a++)if(i[a]===e){var c=Object.getOwnPropertyDescriptor(o,t);return void(void 0!==c.get?c.configurable?(Object.defineProperty(o,t,{value:"[Circular]"}),n.push([o,t,e,c])):r.push([e,t]):(o[t]="[Circular]",n.push([o,t,e])))}try{if("function"===typeof e.toJSON)return}catch(f){return}if(i.push(e),Array.isArray(e))for(a=0;a<e.length;a++)u(e[a],a,i,e);else{var l={},h=Object.keys(e).sort(s);for(a=0;a<h.length;a++){var d=h[a];u(e[d],d,i,e),l[d]=e[d]}if(void 0===o)return l;n.push([o,t,e]),o[t]=l}i.pop()}}function c(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(r.length>0)for(var i=0;i<r.length;i++){var o=r[i];if(o[1]===t&&o[0]===n){n="[Circular]",r.splice(i,1);break}}return e.call(this,t,n)}}},1198:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(1166),i=n(1165),o=r.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",a={code:o,message:u(o)};function u(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;if(Number.isInteger(e)){const n=e.toString();if(d(r.errorValues,n))return r.errorValues[n].message;if(l(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function c(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!r.errorValues[t]||!!l(e)}function l(e){return e>=-32099&&e<=-32e3}function h(e){return e&&"object"===typeof e&&!Array.isArray(e)?Object.assign({},e):e}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=u,t.isValidCode=c,t.serializeError=function(e){let{fallbackError:t=a,shouldIncludeStack:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,o;if(!t||!Number.isInteger(t.code)||"string"!==typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof i.EthereumRpcError)return e.serialize();const s={};if(e&&"object"===typeof e&&!Array.isArray(e)&&d(e,"code")&&c(e.code)){const t=e;s.code=t.code,t.message&&"string"===typeof t.message?(s.message=t.message,d(t,"data")&&(s.data=t.data)):(s.message=u(s.code),s.data={originalError:h(e)})}else{s.code=t.code;const n=null===(r=e)||void 0===r?void 0:r.message;s.message=n&&"string"===typeof n?n:t.message,s.data={originalError:h(e)}}const l=null===(o=e)||void 0===o?void 0:o.stack;return n&&e&&l&&"string"===typeof l&&(s.stack=l),s}},1199:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1136),i=n(1169),o={closed:!0,next:function(e){},error:function(e){if(r.a.useDeprecatedSynchronousErrorHandling)throw e;Object(i.a)(e)},complete:function(){}}},1200:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(83),i=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return r.__extends(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},t}(n(1111).a)},1201:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}}},1202:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){return e&&"number"===typeof e.length&&"function"!==typeof e}},1203:function(e,t,n){"use strict";function r(e){return!!e&&"function"!==typeof e.subscribe&&"function"===typeof e.then}n.d(t,"a",(function(){return r}))},1204:function(e,t,n){"use strict";function r(e,t){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=e,n.thisArg=t,n}n.d(t,"a",(function(){return r}))},1205:function(e,t,n){"use strict";var r=n(1184),i=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)"undefined"!==typeof e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],s=i.obj[i.prop],a=Object.keys(s),u=0;u<a.length;++u){var c=a[u],l=s[c];"object"===typeof l&&null!==l&&-1===n.indexOf(l)&&(t.push({obj:s,prop:c}),n.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)"undefined"!==typeof n[i]&&r.push(n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(i){return r}},encode:function(e,t,n,i,o){if(0===e.length)return e;var a=e;if("symbol"===typeof e?a=Symbol.prototype.toString.call(e):"string"!==typeof e&&(a=String(e)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var u="",c=0;c<a.length;++c){var l=a.charCodeAt(c);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===r.RFC1738&&(40===l||41===l)?u+=a.charAt(c):l<128?u+=s[l]:l<2048?u+=s[192|l>>6]+s[128|63&l]:l<55296||l>=57344?u+=s[224|l>>12]+s[128|l>>6&63]+s[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(c)),u+=s[240|l>>18]+s[128|l>>12&63]+s[128|l>>6&63]+s[128|63&l])}return u},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!==typeof n){if(o(t))t.push(n);else{if(!t||"object"!==typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!==typeof t)return[t].concat(n);var s=t;return o(t)&&!o(n)&&(s=a(t,r)),o(t)&&o(n)?(n.forEach((function(n,o){if(i.call(t,o)){var s=t[o];s&&"object"===typeof s&&n&&"object"===typeof n?t[o]=e(s,n,r):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var s=n[o];return i.call(t,o)?t[o]=e(t[o],s,r):t[o]=s,t}),s)}}},1206:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKRelayAbstract=t.APP_VERSION_KEY=t.LOCAL_STORAGE_ADDRESSES_KEY=t.WALLET_USER_NAME_KEY=void 0;const r=n(1164);t.WALLET_USER_NAME_KEY="walletUsername",t.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",t.APP_VERSION_KEY="AppVersion";t.WalletSDKRelayAbstract=class{async makeEthereumJSONRPCRequest(e,t){if(!t)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(t,{method:"POST",body:JSON.stringify(e),mode:"cors",headers:{"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{if(!e)throw r.ethErrors.rpc.parse({});const t=e,{error:n}=t;if(n)throw(0,r.serializeError)(n);return t}))}}},1207:function(e,t,n){(function(t){const r=n(1236),i=n(17);function o(e){return t.allocUnsafe(e).fill(0)}function s(e,t,n){const r=o(t);return e=a(e),n?e.length<t?(e.copy(r),r):e.slice(0,t):e.length<t?(e.copy(r,t-e.length),r):e.slice(-t)}function a(e){if(!t.isBuffer(e))if(Array.isArray(e))e=t.from(e);else if("string"===typeof e)e=u(e)?t.from((n=c(e)).length%2?"0"+n:n,"hex"):t.from(e);else if("number"===typeof e)e=intToBuffer(e);else if(null===e||void 0===e)e=t.allocUnsafe(0);else if(i.isBN(e))e=e.toArrayLike(t);else{if(!e.toArray)throw new Error("invalid type");e=t.from(e.toArray())}var n;return e}function u(e){return"string"===typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)}function c(e){return"string"===typeof e&&e.startsWith("0x")?e.slice(2):e}e.exports={zeros:o,setLength:s,setLengthRight:function(e,t){return s(e,t,!0)},isHexString:u,stripHexPrefix:c,toBuffer:a,bufferToHex:function(e){return"0x"+(e=a(e)).toString("hex")},keccak:function(e,t){return e=a(e),t||(t=256),r("keccak"+t).update(e).digest()}}}).call(this,n(304).Buffer)},1208:function(e,t,n){(t=e.exports=n(1209)).Stream=t,t.Readable=t,t.Writable=n(1213),t.Duplex=n(1133),t.Transform=n(1215),t.PassThrough=n(1246),t.finished=n(1186),t.pipeline=n(1247)},1209:function(e,t,n){"use strict";(function(t,r){var i;e.exports=k,k.ReadableState=x;n(31).EventEmitter;var o=function(e,t){return e.listeners(t).length},s=n(1210),a=n(304).Buffer,u=t.Uint8Array||function(){};var c,l=n(1239);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,d,f,p=n(1240),b=n(1211),g=n(1212).getHighWaterMark,y=n(1132).codes,_=y.ERR_INVALID_ARG_TYPE,m=y.ERR_STREAM_PUSH_AFTER_EOF,v=y.ERR_METHOD_NOT_IMPLEMENTED,w=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(490)(k,s);var S=b.errorOrDestroy,E=["error","close","destroy","pause","resume"];function x(e,t,r){i=i||n(1133),e=e||{},"boolean"!==typeof r&&(r=t instanceof i),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=n(1214).StringDecoder),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function k(e){if(i=i||n(1133),!(this instanceof k))return new k(e);var t=this instanceof i;this._readableState=new x(e,this,t),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function C(e,t,n,r,i){c("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?A(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,I(e)))}(e,s);else if(i||(o=function(e,t){var n;r=t,a.isBuffer(r)||r instanceof u||"string"===typeof t||void 0===t||e.objectMode||(n=new _("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(s,t)),o)S(e,o);else if(s.objectMode||t&&t.length>0)if("string"===typeof t||s.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),r)s.endEmitted?S(e,new w):R(e,s,t,!0);else if(s.ended)S(e,new m);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?R(e,s,t,!1):j(e,s)):R(e,s,t,!1)}else r||(s.reading=!1,j(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function R(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&A(e)),j(e,t)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),k.prototype.destroy=b.destroy,k.prototype._undestroy=b.undestroy,k.prototype._destroy=function(e,t){t(e)},k.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"===typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=a.from(e,t),t=""),n=!0),C(this,e,t,!1,n)},k.prototype.unshift=function(e){return C(this,e,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(e){h||(h=n(1214).StringDecoder);var t=new h(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var M=1073741824;function O(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=M?e=M:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function A(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(I,e))}function I(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function j(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(N,e,t))}function N(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(c("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function T(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function P(e){c("readable nexttick read 0"),e.read(0)}function L(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function H(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(F,t,e))}function F(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function U(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}k.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?H(this):A(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&H(this),null;var r,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),t.ended||t.reading?c("reading or ended",i=!1):i&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=O(n,t))),null===(r=e>0?B(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&H(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(e){S(this,new v("_read()"))},k.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?u:g;function a(t,r){c("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",l),e.removeListener("error",f),e.removeListener("unpipe",a),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",d),h=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function u(){c("onend"),e.end()}i.endEmitted?r.nextTick(s):n.once("end",s),e.on("unpipe",a);var l=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,D(e))}}(n);e.on("drain",l);var h=!1;function d(t){c("ondata");var r=e.write(t);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function f(t){c("onerror",t),g(),e.removeListener("error",f),0===o(e,"error")&&S(e,t)}function p(){e.removeListener("finish",b),g()}function b(){c("onfinish"),e.removeListener("close",p),g()}function g(){c("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,n){if("function"===typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",p),e.once("finish",b),e.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=U(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},k.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?A(this):i.reading||r.nextTick(P,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(T,this),n},k.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(T,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(L,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),!n.objectMode||null!==i&&void 0!==i)&&((n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause())))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<E.length;o++)e.on(E[o],this.emit.bind(this,E[o]));return this._read=function(t){c("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"===typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=n(1244)),d(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=B,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(k.from=function(e,t){return void 0===f&&(f=n(1245)),f(k,e,t)})}).call(this,n(38),n(91))},1210:function(e,t,n){e.exports=n(31).EventEmitter},1211:function(e,t,n){"use strict";(function(t){function n(e,t){i(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(i,this,e)):t.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!o&&e?s._writableState?s._writableState.errorEmitted?t.nextTick(r,s):(s._writableState.errorEmitted=!0,t.nextTick(n,s,e)):t.nextTick(n,s,e):o?(t.nextTick(r,s),o(e)):t.nextTick(r,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,n(91))},1212:function(e,t,n){"use strict";var r=n(1132).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},1213:function(e,t,n){"use strict";(function(t,r){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var o;e.exports=k,k.WritableState=x;var s={deprecate:n(1242)},a=n(1210),u=n(304).Buffer,c=t.Uint8Array||function(){};var l,h=n(1211),d=n(1212).getHighWaterMark,f=n(1132).codes,p=f.ERR_INVALID_ARG_TYPE,b=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,y=f.ERR_STREAM_CANNOT_PIPE,_=f.ERR_STREAM_DESTROYED,m=f.ERR_STREAM_NULL_VALUES,v=f.ERR_STREAM_WRITE_AFTER_END,w=f.ERR_UNKNOWN_ENCODING,S=h.errorOrDestroy;function E(){}function x(e,t,s){o=o||n(1133),e=e||{},"boolean"!==typeof s&&(s=t instanceof o),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,o=n.writecb;if("function"!==typeof o)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,o){--t.pendingcb,n?(r.nextTick(o,i),r.nextTick(I,e,t),e._writableState.errorEmitted=!0,S(e,i)):(o(i),e._writableState.errorEmitted=!0,S(e,i),I(e,t))}(e,n,i,t,o);else{var s=O(n)||e.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||M(e,n),i?r.nextTick(R,e,n,s,o):R(e,n,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function k(e){var t=this instanceof(o=o||n(1133));if(!t&&!l.call(k,this))return new k(e);this._writableState=new x(e,this,t),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),a.call(this)}function C(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new _("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function R(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),I(e,t)}function M(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),s=t.corkedRequestsFree;s.entry=n;for(var a=0,u=!0;n;)o[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;o.allBuffers=u,C(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,l=n.encoding,h=n.callback;if(C(e,t,!1,t.objectMode?1:c.length,c,l,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function O(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function A(e,t){e._final((function(n){t.pendingcb--,n&&S(e,n),t.prefinished=!0,e.emit("prefinish"),I(e,t)}))}function I(e,t){var n=O(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!==typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(A,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}n(490)(k,a),x.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(x.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!l.call(this,e)||this===k&&(e&&e._writableState instanceof x)}})):l=function(e){return e instanceof this},k.prototype.pipe=function(){S(this,new y)},k.prototype.write=function(e,t,n){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=e,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"===typeof t&&(n=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!==typeof n&&(n=E),o.ending?function(e,t){var n=new v;S(e,n),r.nextTick(t,n)}(this,n):(a||function(e,t,n,i){var o;return null===n?o=new m:"string"===typeof n||t.objectMode||(o=new p("chunk",["string","Buffer"],n)),!o||(S(e,o),r.nextTick(i,o),!1)}(this,o,e,n))&&(o.pendingcb++,s=function(e,t,n,r,i,o){if(!n){var s=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=u.from(t,n));return t}(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else C(e,t,!1,a,r,i,o);return c}(this,o,a,e,t,n)),s},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||M(this,e))},k.prototype.setDefaultEncoding=function(e){if("string"===typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,n){n(new b("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,n){var i=this._writableState;return"function"===typeof e?(n=e,e=null,t=null):"function"===typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,I(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=h.destroy,k.prototype._undestroy=h.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this,n(38),n(91))},1214:function(e,t,n){"use strict";var r=n(1243).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!==typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=h,t=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function s(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!==(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\ufffd":t},o.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=s(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if(i=s(t[r]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if(i=s(t[r]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},1215:function(e,t,n){"use strict";e.exports=l;var r=n(1132).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(1133);function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"===typeof e.transform&&(this._transform=e.transform),"function"===typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",h)}function h(){var e=this;"function"!==typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(t,n){d(e,t,n)}))}function d(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}n(490)(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,n){n(new i("_transform()"))},l.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},1216:function(e,t,n){"use strict";const r=(e,t)=>function(){const n=t.promiseModule,r=new Array(arguments.length);for(let e=0;e<arguments.length;e++)r[e]=arguments[e];return new n(((n,i)=>{t.errorFirst?r.push((function(e,r){if(t.multiArgs){const t=new Array(arguments.length-1);for(let e=1;e<arguments.length;e++)t[e-1]=arguments[e];e?(t.unshift(e),i(t)):n(t)}else e?i(e):n(r)})):r.push((function(e){if(t.multiArgs){const e=new Array(arguments.length-1);for(let t=0;t<arguments.length;t++)e[t]=arguments[t];n(e)}else n(e)})),e.apply(this,r)}))};e.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);const n=e=>{const n=t=>"string"===typeof t?e===t:t.test(e);return t.include?t.include.some(n):!t.exclude.some(n)};let i;i="function"===typeof e?function(){return t.excludeMain?e.apply(this,arguments):r(e,t).apply(this,arguments)}:Object.create(Object.getPrototypeOf(e));for(const o in e){const s=e[o];i[o]="function"===typeof s&&n(o)?r(s,t):s}return i}},1217:function(e,t,n){const r=n(1257),i=n(1258)();function o(e){this.currentProvider=e}function s(e){return function(){const t=this;var n=[].slice.call(arguments),r=n.pop();t.sendAsync({method:e,params:n},r)}}function a(e,t){return function(){const n=this;var r=[].slice.call(arguments),i=r.pop();r.length<e&&r.push("latest"),n.sendAsync({method:t,params:r},i)}}e.exports=o,o.prototype.getBalance=a(2,"eth_getBalance"),o.prototype.getCode=a(2,"eth_getCode"),o.prototype.getTransactionCount=a(2,"eth_getTransactionCount"),o.prototype.getStorageAt=a(3,"eth_getStorageAt"),o.prototype.call=a(2,"eth_call"),o.prototype.protocolVersion=s("eth_protocolVersion"),o.prototype.syncing=s("eth_syncing"),o.prototype.coinbase=s("eth_coinbase"),o.prototype.mining=s("eth_mining"),o.prototype.hashrate=s("eth_hashrate"),o.prototype.gasPrice=s("eth_gasPrice"),o.prototype.accounts=s("eth_accounts"),o.prototype.blockNumber=s("eth_blockNumber"),o.prototype.getBlockTransactionCountByHash=s("eth_getBlockTransactionCountByHash"),o.prototype.getBlockTransactionCountByNumber=s("eth_getBlockTransactionCountByNumber"),o.prototype.getUncleCountByBlockHash=s("eth_getUncleCountByBlockHash"),o.prototype.getUncleCountByBlockNumber=s("eth_getUncleCountByBlockNumber"),o.prototype.sign=s("eth_sign"),o.prototype.sendTransaction=s("eth_sendTransaction"),o.prototype.sendRawTransaction=s("eth_sendRawTransaction"),o.prototype.estimateGas=s("eth_estimateGas"),o.prototype.getBlockByHash=s("eth_getBlockByHash"),o.prototype.getBlockByNumber=s("eth_getBlockByNumber"),o.prototype.getTransactionByHash=s("eth_getTransactionByHash"),o.prototype.getTransactionByBlockHashAndIndex=s("eth_getTransactionByBlockHashAndIndex"),o.prototype.getTransactionByBlockNumberAndIndex=s("eth_getTransactionByBlockNumberAndIndex"),o.prototype.getTransactionReceipt=s("eth_getTransactionReceipt"),o.prototype.getUncleByBlockHashAndIndex=s("eth_getUncleByBlockHashAndIndex"),o.prototype.getUncleByBlockNumberAndIndex=s("eth_getUncleByBlockNumberAndIndex"),o.prototype.getCompilers=s("eth_getCompilers"),o.prototype.compileLLL=s("eth_compileLLL"),o.prototype.compileSolidity=s("eth_compileSolidity"),o.prototype.compileSerpent=s("eth_compileSerpent"),o.prototype.newFilter=s("eth_newFilter"),o.prototype.newBlockFilter=s("eth_newBlockFilter"),o.prototype.newPendingTransactionFilter=s("eth_newPendingTransactionFilter"),o.prototype.uninstallFilter=s("eth_uninstallFilter"),o.prototype.getFilterChanges=s("eth_getFilterChanges"),o.prototype.getFilterLogs=s("eth_getFilterLogs"),o.prototype.getLogs=s("eth_getLogs"),o.prototype.getWork=s("eth_getWork"),o.prototype.submitWork=s("eth_submitWork"),o.prototype.submitHashrate=s("eth_submitHashrate"),o.prototype.sendAsync=function(e,t){var n;this.currentProvider.sendAsync((n=e,r({id:i(),jsonrpc:"2.0",params:[]},n)),(function(e,n){if(!e&&n.error&&(e=new Error("EthQuery - RPC Error - "+n.error.message)),e)return t(e);t(null,n.result)}))}},1218:function(e,t,n){e.exports=n(1264)},1219:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1265),t),i(n(1266),t),i(n(1267),t),i(n(1220),t),i(n(1221),t),i(n(1270),t)},1220:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUniqueId=void 0;const r=4294967295;let i=Math.floor(Math.random()*r);t.getUniqueId=function(){return i=(i+1)%r,i}},1221:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonRpcEngine=void 0;const i=r(n(1147)),o=n(1268);class s extends i.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!==typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,n,r)=>{try{const[i,o,a]=await s._runAllMiddleware(e,t,this._middleware);return o?(await s._runReturnHandlers(a),r(i)):n((async e=>{try{await s._runReturnHandlers(a)}catch(t){return e(t)}return e()}))}catch(i){return r(i)}}}async _handleBatch(e,t){try{const n=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,n):n}catch(n){if(t)return t(n);throw n}}_promiseHandle(e){return new Promise((t=>{this._handle(e,((e,n)=>{t(n)}))}))}async _handle(e,t){if(!e||Array.isArray(e)||"object"!==typeof e){const n=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(n,{id:void 0,jsonrpc:"2.0",error:n})}if("string"!==typeof e.method){const n=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return t(n,{id:e.id,jsonrpc:"2.0",error:n})}const n=Object.assign({},e),r={id:n.id,jsonrpc:n.jsonrpc};let i=null;try{await this._processRequest(n,r)}catch(s){i=s}return i&&(delete r.result,r.error||(r.error=o.serializeError(i))),t(i,r)}async _processRequest(e,t){const[n,r,i]=await s._runAllMiddleware(e,t,this._middleware);if(s._checkForCompletion(e,t,r),await s._runReturnHandlers(i),n)throw n}static async _runAllMiddleware(e,t,n){const r=[];let i=null,o=!1;for(const a of n)if([i,o]=await s._runMiddleware(e,t,a,r),o)break;return[i,o,r.reverse()]}static _runMiddleware(e,t,n,r){return new Promise((i=>{const s=e=>{const n=e||t.error;n&&(t.error=o.serializeError(n)),i([n,!0])},u=n=>{t.error?s(t.error):(n&&("function"!==typeof n&&s(new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof n}" for request:\n${a(e)}`,{request:e})),r.push(n)),i([null,!1]))};try{n(e,t,u,s)}catch(c){s(c)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,n)=>{t((t=>t?n(t):e()))}))}static _checkForCompletion(e,t,n){if(!("result"in t)&&!("error"in t))throw new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${a(e)}`,{request:e});if(!n)throw new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${a(e)}`,{request:e})}}function a(e){return JSON.stringify(e,null,2)}t.JsonRpcEngine=s},1222:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(1188),i=n(1187),o=r.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",a={code:o,message:u(o)};function u(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;if(Number.isInteger(e)){const n=e.toString();if(d(r.errorValues,n))return r.errorValues[n].message;if(l(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function c(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!r.errorValues[t]||!!l(e)}function l(e){return e>=-32099&&e<=-32e3}function h(e){return e&&"object"===typeof e&&!Array.isArray(e)?Object.assign({},e):e}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=u,t.isValidCode=c,t.serializeError=function(e){let{fallbackError:t=a,shouldIncludeStack:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,o;if(!t||!Number.isInteger(t.code)||"string"!==typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof i.EthereumRpcError)return e.serialize();const s={};if(e&&"object"===typeof e&&!Array.isArray(e)&&d(e,"code")&&c(e.code)){const t=e;s.code=t.code,t.message&&"string"===typeof t.message?(s.message=t.message,d(t,"data")&&(s.data=t.data)):(s.message=u(s.code),s.data={originalError:h(e)})}else{s.code=t.code;const n=null===(r=e)||void 0===r?void 0:r.message;s.message=n&&"string"===typeof n?n:t.message,s.data={originalError:h(e)}}const l=null===(o=e)||void 0===o?void 0:o.stack;return n&&e&&l&&"string"===typeof l&&(s.stack=l),s}},1223:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Method=void 0,function(e){e.requestEthereumAccounts="requestEthereumAccounts",e.signEthereumMessage="signEthereumMessage",e.signEthereumTransaction="signEthereumTransaction",e.submitEthereumTransaction="submitEthereumTransaction",e.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",e.scanQRCode="scanQRCode",e.generic="generic",e.childRequestEthereumAccounts="childRequestEthereumAccounts",e.addEthereumChain="addEthereumChain",e.switchEthereumChain="switchEthereumChain",e.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",e.watchAsset="watchAsset"}(t.Web3Method||(t.Web3Method={}))},1229:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScopedLocalStorage=void 0;t.ScopedLocalStorage=class{constructor(e){this.scope=e}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),t=[];for(let n=0;n<localStorage.length;n++){const r=localStorage.key(n);"string"===typeof r&&r.startsWith(e)&&t.push(r)}t.forEach((e=>localStorage.removeItem(e)))}scopedKey(e){return`${this.scope}:${e}`}}},1230:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;const r=n(1165),i=n(1198),o=n(1166);function s(e,t){const[n,o]=u(t);return new r.EthereumRpcError(e,n||i.getMessageFromCode(e),o)}function a(e,t){const[n,o]=u(t);return new r.EthereumProviderError(e,n||i.getMessageFromCode(e),o)}function u(e){if(e){if("string"===typeof e)return[e];if("object"===typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&"string"!==typeof t)throw new Error("Must specify string message.");return[t||void 0,n]}}return[]}t.ethErrors={rpc:{parse:e=>s(o.errorCodes.rpc.parse,e),invalidRequest:e=>s(o.errorCodes.rpc.invalidRequest,e),invalidParams:e=>s(o.errorCodes.rpc.invalidParams,e),methodNotFound:e=>s(o.errorCodes.rpc.methodNotFound,e),internal:e=>s(o.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(t,e)},invalidInput:e=>s(o.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>s(o.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>s(o.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>s(o.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>s(o.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>s(o.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>a(o.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(o.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(o.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(o.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(o.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:i}=e;if(!n||"string"!==typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(t,n,i)}}}},1231:function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"===typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"===typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"===typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&"object"===typeof module&&module.exports,AMD=__webpack_require__(229),ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];!root.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(n){return new Sha256(t,!0).update(n)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<OUTPUT_TYPES.length;++n){var r=OUTPUT_TYPES[n];t[r]=createOutputMethod(r,e)}return t},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(e){if("string"===typeof e)return crypto.createHash(algorithm).update(e,"utf8").digest("hex");if(null===e||void 0===e)throw new Error(ERROR);return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(e)).digest("hex"):method(e)};return nodeMethod},createHmacOutputMethod=function(e,t){return function(n,r){return new HmacSha256(n,t,!0).update(r)[e]()}},createHmacMethod=function(e){var t=createHmacOutputMethod("hex",e);t.create=function(t){return new HmacSha256(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<OUTPUT_TYPES.length;++n){var r=OUTPUT_TYPES[n];t[r]=createHmacOutputMethod(r,e)}return t};function Sha256(e,t){t?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function HmacSha256(e,t,n){var r,i=typeof e;if("string"===i){var o,s=[],a=e.length,u=0;for(r=0;r<a;++r)(o=e.charCodeAt(r))<128?s[u++]=o:o<2048?(s[u++]=192|o>>6,s[u++]=128|63&o):o<55296||o>=57344?(s[u++]=224|o>>12,s[u++]=128|o>>6&63,s[u++]=128|63&o):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++r)),s[u++]=240|o>>18,s[u++]=128|o>>12&63,s[u++]=128|o>>6&63,s[u++]=128|63&o);e=s}else{if("object"!==i)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}e.length>64&&(e=new Sha256(t,!0).update(e).array());var c=[],l=[];for(r=0;r<64;++r){var h=e[r]||0;c[r]=92^h,l[r]=54^h}Sha256.call(this,t,n),this.update(l),this.oKeyPad=c,this.inner=!0,this.sharedMemory=n}Sha256.prototype.update=function(e){if(!this.finalized){var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR);t=!0}for(var r,i,o=0,s=e.length,a=this.blocks;o<s;){if(this.hashed&&(this.hashed=!1,a[0]=this.block,a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),t)for(i=this.start;o<s&&i<64;++o)a[i>>2]|=e[o]<<SHIFT[3&i++];else for(i=this.start;o<s&&i<64;++o)(r=e.charCodeAt(o))<128?a[i>>2]|=r<<SHIFT[3&i++]:r<2048?(a[i>>2]|=(192|r>>6)<<SHIFT[3&i++],a[i>>2]|=(128|63&r)<<SHIFT[3&i++]):r<55296||r>=57344?(a[i>>2]|=(224|r>>12)<<SHIFT[3&i++],a[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],a[i>>2]|=(128|63&r)<<SHIFT[3&i++]):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++o)),a[i>>2]|=(240|r>>18)<<SHIFT[3&i++],a[i>>2]|=(128|r>>12&63)<<SHIFT[3&i++],a[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],a[i>>2]|=(128|63&r)<<SHIFT[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.block=a[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e,t,n,r,i,o,s,a,u,c=this.h0,l=this.h1,h=this.h2,d=this.h3,f=this.h4,p=this.h5,b=this.h6,g=this.h7,y=this.blocks;for(e=16;e<64;++e)t=((i=y[e-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,n=((i=y[e-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,y[e]=y[e-16]+t+y[e-7]+n<<0;for(u=l&h,e=0;e<64;e+=4)this.first?(this.is224?(o=300032,g=(i=y[0]-1413257819)-150054599<<0,d=i+24177077<<0):(o=704751109,g=(i=y[0]-210244248)-1521486534<<0,d=i+143694565<<0),this.first=!1):(t=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),r=(o=c&l)^c&h^u,g=d+(i=g+(n=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&p^~f&b)+K[e]+y[e])<<0,d=i+(t+r)<<0),t=(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),r=(s=d&c)^d&l^o,b=h+(i=b+(n=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&f^~g&p)+K[e+1]+y[e+1])<<0,t=((h=i+(t+r)<<0)>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),r=(a=h&d)^h&c^s,p=l+(i=p+(n=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7))+(b&g^~b&f)+K[e+2]+y[e+2])<<0,t=((l=i+(t+r)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),r=(u=l&h)^l&d^a,f=c+(i=f+(n=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&b^~p&g)+K[e+3]+y[e+3])<<0,c=i+(t+r)<<0;this.h0=this.h0+c<<0,this.h1=this.h1+l<<0,this.h2=this.h2+h<<0,this.h3=this.h3+d<<0,this.h4=this.h4+f<<0,this.h5=this.h5+p<<0,this.h6=this.h6+b<<0,this.h7=this.h7+g<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,u=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s];return this.is224||(u+=HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a]),u},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,u=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24&255,n>>16&255,n>>8&255,255&n,r>>24&255,r>>16&255,r>>8&255,255&r,i>>24&255,i>>16&255,i>>8&255,255&i,o>>24&255,o>>16&255,o>>8&255,255&o,s>>24&255,s>>16&255,s>>8&255,255&s];return this.is224||u.push(a>>24&255,a>>16&255,a>>8&255,255&a),u},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__(91),__webpack_require__(38))},1232:function(e,t,n){"use strict";var r=n(1233),i=n(1234),o=n(1184);e.exports={formats:o,parse:i,stringify:r}},1233:function(e,t,n){"use strict";var r=n(491),i=n(1205),o=n(1184),s=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=String.prototype.split,l=Array.prototype.push,h=function(e,t){l.apply(e,u(t)?t:[t])},d=Date.prototype.toISOString,f=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},b={},g=function e(t,n,o,s,a,l,d,f,g,y,_,m,v,w,S,E){for(var x,k=t,C=E,R=0,M=!1;void 0!==(C=C.get(b))&&!M;){var O=C.get(t);if(R+=1,"undefined"!==typeof O){if(O===R)throw new RangeError("Cyclic object value");M=!0}"undefined"===typeof C.get(b)&&(R=0)}if("function"===typeof f?k=f(n,k):k instanceof Date?k=_(k):"comma"===o&&u(k)&&(k=i.maybeMap(k,(function(e){return e instanceof Date?_(e):e}))),null===k){if(a)return d&&!w?d(n,p.encoder,S,"key",m):n;k=""}if("string"===typeof(x=k)||"number"===typeof x||"boolean"===typeof x||"symbol"===typeof x||"bigint"===typeof x||i.isBuffer(k)){if(d){var A=w?n:d(n,p.encoder,S,"key",m);if("comma"===o&&w){for(var I=c.call(String(k),","),j="",N=0;N<I.length;++N)j+=(0===N?"":",")+v(d(I[N],p.encoder,S,"value",m));return[v(A)+(s&&u(k)&&1===I.length?"[]":"")+"="+j]}return[v(A)+"="+v(d(k,p.encoder,S,"value",m))]}return[v(n)+"="+v(String(k))]}var T,P=[];if("undefined"===typeof k)return P;if("comma"===o&&u(k))T=[{value:k.length>0?k.join(",")||null:void 0}];else if(u(f))T=f;else{var L=Object.keys(k);T=g?L.sort(g):L}for(var D=s&&u(k)&&1===k.length?n+"[]":n,B=0;B<T.length;++B){var H=T[B],F="object"===typeof H&&"undefined"!==typeof H.value?H.value:k[H];if(!l||null!==F){var U=u(k)?"function"===typeof o?o(D,H):D:D+(y?"."+H:"["+H+"]");E.set(t,R);var W=r();W.set(b,E),h(P,e(F,U,o,s,a,l,d,f,g,y,_,m,v,w,S,W))}}return P};e.exports=function(e,t){var n,i=e,c=function(e){if(!e)return p;if(null!==e.encoder&&"undefined"!==typeof e.encoder&&"function"!==typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if("undefined"!==typeof e.format){if(!s.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],i=p.filter;return("function"===typeof e.filter||u(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"===typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:"undefined"===typeof e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:"undefined"===typeof e.delimiter?p.delimiter:e.delimiter,encode:"boolean"===typeof e.encode?e.encode:p.encode,encoder:"function"===typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"===typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:"function"===typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"===typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"===typeof e.sort?e.sort:null,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"===typeof c.filter?i=(0,c.filter)("",i):u(c.filter)&&(n=c.filter);var l,d=[];if("object"!==typeof i||null===i)return"";l=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=a[l];if(t&&"commaRoundTrip"in t&&"boolean"!==typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var b="comma"===f&&t&&t.commaRoundTrip;n||(n=Object.keys(i)),c.sort&&n.sort(c.sort);for(var y=r(),_=0;_<n.length;++_){var m=n[_];c.skipNulls&&null===i[m]||h(d,g(i[m],m,f,b,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,y))}var v=d.join(c.delimiter),w=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),v.length>0?w+v:""}},1234:function(e,t,n){"use strict";var r=n(1205),i=Object.prototype.hasOwnProperty,o=Array.isArray,s={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=a?o.slice(0,a.index):o,l=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var h=0;n.depth>0&&null!==(a=s.exec(o))&&h<n.depth;){if(h+=1,!n.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(a[1])}return a&&l.push("["+o.slice(a.index)+"]"),function(e,t,n,r){for(var i=r?t:u(t,n),o=e.length-1;o>=0;--o){var s,a=e[o];if("[]"===a&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,l=parseInt(c,10);n.parseArrays||""!==c?!isNaN(l)&&a!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(s=[])[l]=i:"__proto__"!==c&&(s[c]=i):s={0:i}}i=s}return i}(l,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return s;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?s.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?s.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:s.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:s.comma,decoder:"function"===typeof e.decoder?e.decoder:s.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:s.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:s.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var l="string"===typeof e?function(e,t){var n,c={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,h=t.parameterLimit===1/0?void 0:t.parameterLimit,d=l.split(t.delimiter,h),f=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?p="utf-8":"utf8=%26%2310003%3B"===d[n]&&(p="iso-8859-1"),f=n,n=d.length);for(n=0;n<d.length;++n)if(n!==f){var b,g,y=d[n],_=y.indexOf("]="),m=-1===_?y.indexOf("="):_+1;-1===m?(b=t.decoder(y,s.decoder,p,"key"),g=t.strictNullHandling?null:""):(b=t.decoder(y.slice(0,m),s.decoder,p,"key"),g=r.maybeMap(u(y.slice(m+1),t),(function(e){return t.decoder(e,s.decoder,p,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===p&&(g=a(g)),y.indexOf("[]=")>-1&&(g=o(g)?[g]:g),i.call(c,b)?c[b]=r.combine(c[b],g):c[b]=g}return c}(e,n):e,h=n.plainObjects?Object.create(null):{},d=Object.keys(l),f=0;f<d.length;++f){var p=d[f],b=c(p,l[p],n,"string"===typeof e);h=r.merge(h,b,n)}return!0===n.allowSparse?h:r.compact(h)}},1235:function(e,t,n){(function(t){const r=n(1207),i=n(1251),o={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},s={encodeData(e,n,o){let s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const a=["bytes32"],u=[this.hashType(e,o)];if(s){const c=(e,n,a)=>{if(void 0!==o[n])return["bytes32",null==a?"0x0000000000000000000000000000000000000000000000000000000000000000":r.keccak(this.encodeData(n,a,o,s))];if(void 0===a)throw new Error(`missing value for field ${e} of type ${n}`);if("bytes"===n)return["bytes32",r.keccak(a)];if("string"===n)return"string"===typeof a&&(a=t.from(a,"utf8")),["bytes32",r.keccak(a)];if(n.lastIndexOf("]")===n.length-1){const t=n.slice(0,n.lastIndexOf("[")),o=a.map((n=>c(e,t,n)));return["bytes32",r.keccak(i.rawEncode(o.map((e=>{let[t]=e;return t})),o.map((e=>{let[,t]=e;return t}))))]}return[n,a]};for(const t of o[e]){const[e,r]=c(t.name,t.type,n[t.name]);a.push(e),u.push(r)}}else for(const i of o[e]){let e=n[i.name];if(void 0!==e)if("bytes"===i.type)a.push("bytes32"),e=r.keccak(e),u.push(e);else if("string"===i.type)a.push("bytes32"),"string"===typeof e&&(e=t.from(e,"utf8")),e=r.keccak(e),u.push(e);else if(void 0!==o[i.type])a.push("bytes32"),e=r.keccak(this.encodeData(i.type,e,o,s)),u.push(e);else{if(i.type.lastIndexOf("]")===i.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");a.push(i.type),u.push(e)}}return i.rawEncode(a,u)},encodeType(e,t){let n="",r=this.findTypeDependencies(e,t).filter((t=>t!==e));r=[e].concat(r.sort());for(const i of r){if(!t[i])throw new Error("No type definition specified: "+i);n+=i+"("+t[i].map((e=>{let{name:t,type:n}=e;return n+" "+t})).join(",")+")"}return n},findTypeDependencies(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e=e.match(/^\w*/)[0],n.includes(e)||void 0===t[e])return n;n.push(e);for(const r of t[e])for(const e of this.findTypeDependencies(r.type,t,n))!n.includes(e)&&n.push(e);return n},hashStruct(e,t,n){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return r.keccak(this.encodeData(e,t,n,i))},hashType(e,t){return r.keccak(this.encodeType(e,t))},sanitizeData(e){const t={};for(const n in o.properties)e[n]&&(t[n]=e[n]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=this.sanitizeData(e),o=[t.from("1901","hex")];return o.push(this.hashStruct("EIP712Domain",i.domain,i.types,n)),"EIP712Domain"!==i.primaryType&&o.push(this.hashStruct(i.primaryType,i.message,i.types,n)),r.keccak(t.concat(o))}};e.exports={TYPED_MESSAGE_SCHEMA:o,TypedDataUtils:s,hashForSignTypedDataLegacy:function(e){return function(e){const t=new Error("Expect argument to be non-empty array");if("object"!==typeof e||!e.length)throw t;const n=e.map((function(e){return"bytes"===e.type?r.toBuffer(e.value):e.value})),o=e.map((function(e){return e.type})),s=e.map((function(e){if(!e.name)throw t;return e.type+" "+e.name}));return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(new Array(e.length).fill("string"),s),i.soliditySHA3(o,n)])}(e.data)},hashForSignTypedData_v3:function(e){return s.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return s.hash(e.data)}}}).call(this,n(304).Buffer)},1236:function(e,t,n){e.exports=n(1237)(n(1249))},1237:function(e,t,n){const r=n(1238),i=n(1248);e.exports=function(e){const t=r(e),n=i(e);return function(e,r){switch("string"===typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,r);case"keccak256":return new t(1088,512,null,256,r);case"keccak384":return new t(832,768,null,384,r);case"keccak512":return new t(576,1024,null,512,r);case"sha3-224":return new t(1152,448,6,224,r);case"sha3-256":return new t(1088,512,6,256,r);case"sha3-384":return new t(832,768,6,384,r);case"sha3-512":return new t(576,1024,6,512,r);case"shake128":return new n(1344,256,31,r);case"shake256":return new n(1088,512,31,r);default:throw new Error("Invald algorithm: "+e)}}}},1238:function(e,t,n){(function(t){const{Transform:r}=n(1208);e.exports=e=>class n extends r{constructor(t,n,r,i,o){super(o),this._rate=t,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=i,this._options=o,this._state=new e,this._state.initialize(t,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(i){r=i}n(r)}_flush(e){let t=null;try{this.push(this.digest())}catch(n){t=n}e(t)}update(e,n){if(!t.isBuffer(e)&&"string"!==typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return t.isBuffer(e)||(e=t.from(e,n)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new n(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}}).call(this,n(304).Buffer)},1240:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=n(304).Buffer,a=n(1241).inspect,u=a&&a.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n,c;return t=e,n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,n,r,i=s.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,n=i,r=a,s.prototype.copy.call(t,n,r),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0===(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0===(e-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,t}},{key:u,value:function(e,t){return a(this,function(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){i(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}({},t,{depth:0,customInspect:!1}))}}],n&&o(t.prototype,n),c&&o(t,c),e}()},1242:function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(r){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,n(38))},1243:function(e,t,n){var r=n(304),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=s),o(i,s),s.from=function(e,t,n){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},1244:function(e,t,n){"use strict";(function(t){var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(1186),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function f(e,t){return{value:e,done:t}}function p(e){var t=e[s];if(null!==t){var n=e[d].read();null!==n&&(e[l]=null,e[s]=null,e[a]=null,t(f(n,!1)))}}function b(e){t.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(r={get stream(){return this[d]},next:function(){var e=this,n=this[u];if(null!==n)return Promise.reject(n);if(this[c])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise((function(n,r){t.nextTick((function(){e[u]?r(e[u]):n(f(void 0,!0))}))}));var r,i=this[l];if(i)r=new Promise(function(e,t){return function(n,r){e.then((function(){t[c]?n(f(void 0,!0)):t[h](n,r)}),r)}}(i,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(f(o,!1));r=new Promise(this[h])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[d].destroy(null,(function(e){e?n(e):t(f(void 0,!0))}))}))})),r),g);e.exports=function(e){var t,n=Object.create(y,(i(t={},d,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var r=n[d].read();r?(n[l]=null,n[s]=null,n[a]=null,e(f(r,!1))):(n[s]=e,n[a]=t)},writable:!0}),t));return n[l]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[a];return null!==t&&(n[l]=null,n[s]=null,n[a]=null,t(e)),void(n[u]=e)}var r=n[s];null!==r&&(n[l]=null,n[s]=null,n[a]=null,r(f(void 0,!0))),n[c]=!0})),e.on("readable",b.bind(null,n)),n}}).call(this,n(91))},1245:function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},1246:function(e,t,n){"use strict";e.exports=i;var r=n(1215);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(490)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},1247:function(e,t,n){"use strict";var r;var i=n(1132).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function u(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var a=!1;e.on("close",(function(){a=!0})),void 0===r&&(r=n(1186)),r(e,{readable:t,writable:i},(function(e){if(e)return o(e);a=!0,o()}));var u=!1;return function(t){if(!a&&!u)return u=!0,function(e){return e.setHeader&&"function"===typeof e.abort}(e)?e.abort():"function"===typeof e.destroy?e.destroy():void o(t||new s("pipe"))}}function c(e){e()}function l(e,t){return e.pipe(t)}function h(e){return e.length?"function"!==typeof e[e.length-1]?a:e.pop():a}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=h(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var s=t.map((function(e,n){var o=n<t.length-1;return u(e,o,n>0,(function(e){r||(r=e),e&&s.forEach(c),o||(s.forEach(c),i(r))}))}));return t.reduce(l)}},1248:function(e,t,n){(function(t){const{Transform:r}=n(1208);e.exports=e=>class n extends r{constructor(t,n,r,i){super(i),this._rate=t,this._capacity=n,this._delimitedSuffix=r,this._options=i,this._state=new e,this._state.initialize(t,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(i){r=i}n(r)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,n){if(!t.isBuffer(e)&&"string"!==typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return t.isBuffer(e)||(e=t.from(e,n)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let n=this._state.squeeze(e);return void 0!==t&&(n=n.toString(t)),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new n(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}}).call(this,n(304).Buffer)},1249:function(e,t,n){(function(t){const r=n(1250);function i(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}i.prototype.initialize=function(e,t){for(let n=0;n<50;++n)this.state[n]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(r.p1600(this.state),this.count=0)},i.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<this.count%4*8,0!==(128&e)&&this.count===this.blockSize-1&&r.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,r.p1600(this.state),this.count=0,this.squeezing=!0},i.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const n=t.alloc(e);for(let t=0;t<e;++t)n[t]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(r.p1600(this.state),this.count=0);return n},i.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=i}).call(this,n(304).Buffer)},1250:function(e,t){const n=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],a=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],h=e[8]^e[18]^e[28]^e[38]^e[48],d=e[9]^e[19]^e[29]^e[39]^e[49];let f=h^(o<<1|s>>>31),p=d^(s<<1|o>>>31);const b=e[0]^f,g=e[1]^p,y=e[10]^f,_=e[11]^p,m=e[20]^f,v=e[21]^p,w=e[30]^f,S=e[31]^p,E=e[40]^f,x=e[41]^p;f=r^(a<<1|u>>>31),p=i^(u<<1|a>>>31);const k=e[2]^f,C=e[3]^p,R=e[12]^f,M=e[13]^p,O=e[22]^f,A=e[23]^p,I=e[32]^f,j=e[33]^p,N=e[42]^f,T=e[43]^p;f=o^(c<<1|l>>>31),p=s^(l<<1|c>>>31);const P=e[4]^f,L=e[5]^p,D=e[14]^f,B=e[15]^p,H=e[24]^f,F=e[25]^p,U=e[34]^f,W=e[35]^p,z=e[44]^f,q=e[45]^p;f=a^(h<<1|d>>>31),p=u^(d<<1|h>>>31);const V=e[6]^f,J=e[7]^p,G=e[16]^f,Y=e[17]^p,$=e[26]^f,K=e[27]^p,Q=e[36]^f,X=e[37]^p,Z=e[46]^f,ee=e[47]^p;f=c^(r<<1|i>>>31),p=l^(i<<1|r>>>31);const te=e[8]^f,ne=e[9]^p,re=e[18]^f,ie=e[19]^p,oe=e[28]^f,se=e[29]^p,ae=e[38]^f,ue=e[39]^p,ce=e[48]^f,le=e[49]^p,he=b,de=g,fe=_<<4|y>>>28,pe=y<<4|_>>>28,be=m<<3|v>>>29,ge=v<<3|m>>>29,ye=S<<9|w>>>23,_e=w<<9|S>>>23,me=E<<18|x>>>14,ve=x<<18|E>>>14,we=k<<1|C>>>31,Se=C<<1|k>>>31,Ee=M<<12|R>>>20,xe=R<<12|M>>>20,ke=O<<10|A>>>22,Ce=A<<10|O>>>22,Re=j<<13|I>>>19,Me=I<<13|j>>>19,Oe=N<<2|T>>>30,Ae=T<<2|N>>>30,Ie=L<<30|P>>>2,je=P<<30|L>>>2,Ne=D<<6|B>>>26,Te=B<<6|D>>>26,Pe=F<<11|H>>>21,Le=H<<11|F>>>21,De=U<<15|W>>>17,Be=W<<15|U>>>17,He=q<<29|z>>>3,Fe=z<<29|q>>>3,Ue=V<<28|J>>>4,We=J<<28|V>>>4,ze=Y<<23|G>>>9,qe=G<<23|Y>>>9,Ve=$<<25|K>>>7,Je=K<<25|$>>>7,Ge=Q<<21|X>>>11,Ye=X<<21|Q>>>11,$e=ee<<24|Z>>>8,Ke=Z<<24|ee>>>8,Qe=te<<27|ne>>>5,Xe=ne<<27|te>>>5,Ze=re<<20|ie>>>12,et=ie<<20|re>>>12,tt=se<<7|oe>>>25,nt=oe<<7|se>>>25,rt=ae<<8|ue>>>24,it=ue<<8|ae>>>24,ot=ce<<14|le>>>18,st=le<<14|ce>>>18;e[0]=he^~Ee&Pe,e[1]=de^~xe&Le,e[10]=Ue^~Ze&be,e[11]=We^~et&ge,e[20]=we^~Ne&Ve,e[21]=Se^~Te&Je,e[30]=Qe^~fe&ke,e[31]=Xe^~pe&Ce,e[40]=Ie^~ze&tt,e[41]=je^~qe&nt,e[2]=Ee^~Pe&Ge,e[3]=xe^~Le&Ye,e[12]=Ze^~be&Re,e[13]=et^~ge&Me,e[22]=Ne^~Ve&rt,e[23]=Te^~Je&it,e[32]=fe^~ke&De,e[33]=pe^~Ce&Be,e[42]=ze^~tt&ye,e[43]=qe^~nt&_e,e[4]=Pe^~Ge&ot,e[5]=Le^~Ye&st,e[14]=be^~Re&He,e[15]=ge^~Me&Fe,e[24]=Ve^~rt&me,e[25]=Je^~it&ve,e[34]=ke^~De&$e,e[35]=Ce^~Be&Ke,e[44]=tt^~ye&Oe,e[45]=nt^~_e&Ae,e[6]=Ge^~ot&he,e[7]=Ye^~st&de,e[16]=Re^~He&Ue,e[17]=Me^~Fe&We,e[26]=rt^~me&we,e[27]=it^~ve&Se,e[36]=De^~$e&Qe,e[37]=Be^~Ke&Xe,e[46]=ye^~Oe&Ie,e[47]=_e^~Ae&je,e[8]=ot^~he&Ee,e[9]=st^~de&xe,e[18]=He^~Ue&Ze,e[19]=Fe^~We&et,e[28]=me^~we&Ne,e[29]=ve^~Se&Te,e[38]=$e^~Qe&fe,e[39]=Ke^~Xe&pe,e[48]=Oe^~Ie&ze,e[49]=Ae^~je&qe,e[0]^=n[2*t],e[1]^=n[2*t+1]}}},1251:function(e,t,n){(function(t){const r=n(1207),i=n(17);function o(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}function s(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function a(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function u(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function c(e){var t=typeof e;if("string"===t)return r.isHexString(e)?new i(r.stripHexPrefix(e),16):new i(e,10);if("number"===t)return new i(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function l(e,n){var o,h,d,f;if("address"===e)return l("uint160",c(n));if("bool"===e)return l("uint8",n?1:0);if("string"===e)return l("bytes",new t(n,"utf8"));if(function(e){return e.lastIndexOf("]")===e.length-1}(e)){if("undefined"===typeof n.length)throw new Error("Not an array?");if("dynamic"!==(o=u(e))&&0!==o&&n.length>o)throw new Error("Elements exceed array size: "+o);for(f in d=[],e=e.slice(0,e.lastIndexOf("[")),"string"===typeof n&&(n=JSON.parse(n)),n)d.push(l(e,n[f]));if("dynamic"===o){var p=l("uint256",n.length);d.unshift(p)}return t.concat(d)}if("bytes"===e)return n=new t(n),d=t.concat([l("uint256",n.length),n]),n.length%32!==0&&(d=t.concat([d,r.zeros(32-n.length%32)])),d;if(e.startsWith("bytes")){if((o=s(e))<1||o>32)throw new Error("Invalid bytes<N> width: "+o);return r.setLengthRight(n,32)}if(e.startsWith("uint")){if((o=s(e))%8||o<8||o>256)throw new Error("Invalid uint<N> width: "+o);if((h=c(n)).bitLength()>o)throw new Error("Supplied uint exceeds width: "+o+" vs "+h.bitLength());if(h<0)throw new Error("Supplied uint is negative");return h.toArrayLike(t,"be",32)}if(e.startsWith("int")){if((o=s(e))%8||o<8||o>256)throw new Error("Invalid int<N> width: "+o);if((h=c(n)).bitLength()>o)throw new Error("Supplied int exceeds width: "+o+" vs "+h.bitLength());return h.toTwos(256).toArrayLike(t,"be",32)}if(e.startsWith("ufixed")){if(o=a(e),(h=c(n))<0)throw new Error("Supplied ufixed is negative");return l("uint256",h.mul(new i(2).pow(new i(o[1]))))}if(e.startsWith("fixed"))return o=a(e),l("int256",c(n).mul(new i(2).pow(new i(o[1]))));throw new Error("Unsupported or invalid type: "+e)}function h(e){return"string"===e||"bytes"===e||"dynamic"===u(e)}function d(e,n){if(e.length!==n.length)throw new Error("Number of types are not matching the values");for(var i,a,u=[],l=0;l<e.length;l++){var h=o(e[l]),d=n[l];if("bytes"===h)u.push(d);else if("string"===h)u.push(new t(d,"utf8"));else if("bool"===h)u.push(new t(d?"01":"00","hex"));else if("address"===h)u.push(r.setLength(d,20));else if(h.startsWith("bytes")){if((i=s(h))<1||i>32)throw new Error("Invalid bytes<N> width: "+i);u.push(r.setLengthRight(d,i))}else if(h.startsWith("uint")){if((i=s(h))%8||i<8||i>256)throw new Error("Invalid uint<N> width: "+i);if((a=c(d)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+a.bitLength());u.push(a.toArrayLike(t,"be",i/8))}else{if(!h.startsWith("int"))throw new Error("Unsupported or invalid type: "+h);if((i=s(h))%8||i<8||i>256)throw new Error("Invalid int<N> width: "+i);if((a=c(d)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+a.bitLength());u.push(a.toTwos(i).toArrayLike(t,"be",i/8))}}return t.concat(u)}e.exports={rawEncode:function(e,n){var r=[],i=[],s=32*e.length;for(var a in e){var u=o(e[a]),c=l(u,n[a]);h(u)?(r.push(l("uint256",s)),i.push(c),s+=c.length):r.push(c)}return t.concat(r.concat(i))},solidityPack:d,soliditySHA3:function(e,t){return r.keccak(d(e,t))}}}).call(this,n(304).Buffer)},1252:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterFromParam=t.FilterPolyfill=void 0;const r=n(1185),i=n(1121),o={jsonrpc:"2.0",id:0};function s(e){return{fromBlock:u(e.fromBlock),toBlock:u(e.toBlock),addresses:void 0===e.address?null:Array.isArray(e.address)?e.address:[e.address],topics:e.topics||[]}}function a(e){const t={fromBlock:c(e.fromBlock),toBlock:c(e.toBlock),topics:e.topics};return null!==e.addresses&&(t.address=e.addresses),t}function u(e){if(void 0===e||"latest"===e||"pending"===e)return"latest";if("earliest"===e)return(0,r.IntNumber)(0);if((0,i.isHexString)(e))return(0,i.intNumberFromHexString)(e);throw new Error(`Invalid block option: ${String(e)}`)}function c(e){return"latest"===e?e:(0,i.hexStringFromIntNumber)(e)}function l(){return Object.assign(Object.assign({},o),{error:{code:-32e3,message:"filter not found"}})}function h(){return Object.assign(Object.assign({},o),{result:[]})}t.FilterPolyfill=class{constructor(e){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,r.IntNumber)(1),this.provider=e}async newFilter(e){const t=s(e),n=this.makeFilterId(),r=await this.setInitialCursorPosition(n,t.fromBlock);return console.log(`Installing new log filter(${n}):`,t,"initial cursor position:",r),this.logFilters.set(n,t),this.setFilterTimeout(n),(0,i.hexStringFromIntNumber)(n)}async newBlockFilter(){const e=this.makeFilterId(),t=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,t),this.blockFilters.add(e),this.setFilterTimeout(e),(0,i.hexStringFromIntNumber)(e)}async newPendingTransactionFilter(){const e=this.makeFilterId(),t=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,t),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),(0,i.hexStringFromIntNumber)(e)}uninstallFilter(e){const t=(0,i.intNumberFromHexString)(e);return console.log(`Uninstalling filter (${t})`),this.deleteFilter(t),!0}getFilterChanges(e){const t=(0,i.intNumberFromHexString)(e);return this.timeouts.has(t)&&this.setFilterTimeout(t),this.logFilters.has(t)?this.getLogFilterChanges(t):this.blockFilters.has(t)?this.getBlockFilterChanges(t):this.pendingTransactionFilters.has(t)?this.getPendingTransactionFilterChanges(t):Promise.resolve(l())}async getFilterLogs(e){const t=(0,i.intNumberFromHexString)(e),n=this.logFilters.get(t);return n?this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[a(n)]})):l()}makeFilterId(){return(0,r.IntNumber)(++this.nextFilterId)}sendAsyncPromise(e){return new Promise(((t,n)=>{this.provider.sendAsync(e,((e,r)=>e?n(e):Array.isArray(r)||null==r?n(new Error(`unexpected response received: ${JSON.stringify(r)}`)):void t(r)))}))}deleteFilter(e){console.log(`Deleting filter (${e})`),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}async getLogFilterChanges(e){const t=this.logFilters.get(e),n=this.cursors.get(e);if(!n||!t)return l();const s=await this.getCurrentBlockHeight(),u="latest"===t.toBlock?s:t.toBlock;if(n>s)return h();if(n>t.toBlock)return h();console.log(`Fetching logs from ${n} to ${u} for filter ${e}`);const c=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[a(Object.assign(Object.assign({},t),{fromBlock:n,toBlock:u}))]}));if(Array.isArray(c.result)){const t=c.result.map((e=>(0,i.intNumberFromHexString)(e.blockNumber||"0x0"))),o=Math.max(...t);if(o&&o>n){const t=(0,r.IntNumber)(o+1);console.log(`Moving cursor position for filter (${e}) from ${n} to ${t}`),this.cursors.set(e,t)}}return c}async getBlockFilterChanges(e){const t=this.cursors.get(e);if(!t)return l();const n=await this.getCurrentBlockHeight();if(t>n)return h();console.log(`Fetching blocks from ${t} to ${n} for filter (${e})`);const s=(await Promise.all((0,i.range)(t,n+1).map((e=>this.getBlockHashByNumber((0,r.IntNumber)(e)))))).filter((e=>!!e)),a=(0,r.IntNumber)(t+s.length);return console.log(`Moving cursor position for filter (${e}) from ${t} to ${a}`),this.cursors.set(e,a),Object.assign(Object.assign({},o),{result:s})}async getPendingTransactionFilterChanges(e){return Promise.resolve(h())}async setInitialCursorPosition(e,t){const n=await this.getCurrentBlockHeight(),r="number"===typeof t&&t>n?t:n;return this.cursors.set(e,r),r}setFilterTimeout(e){const t=this.timeouts.get(e);t&&window.clearTimeout(t);const n=window.setTimeout((()=>{console.log(`Filter (${e}) timed out`),this.deleteFilter(e)}),3e5);this.timeouts.set(e,n)}async getCurrentBlockHeight(){const{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_blockNumber",params:[]}));return(0,i.intNumberFromHexString)((0,i.ensureHexString)(e))}async getBlockHashByNumber(e){const t=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getBlockByNumber",params:[(0,i.hexStringFromIntNumber)(e),!1]}));return t.result&&"string"===typeof t.result.hash?(0,i.ensureHexString)(t.result.hash):null}},t.filterFromParam=s},1253:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONRPCMethod=void 0,function(e){e.eth_accounts="eth_accounts",e.eth_coinbase="eth_coinbase",e.net_version="net_version",e.eth_chainId="eth_chainId",e.eth_uninstallFilter="eth_uninstallFilter",e.eth_requestAccounts="eth_requestAccounts",e.eth_sign="eth_sign",e.eth_ecRecover="eth_ecRecover",e.personal_sign="personal_sign",e.personal_ecRecover="personal_ecRecover",e.eth_signTransaction="eth_signTransaction",e.eth_sendRawTransaction="eth_sendRawTransaction",e.eth_sendTransaction="eth_sendTransaction",e.eth_signTypedData_v1="eth_signTypedData_v1",e.eth_signTypedData_v2="eth_signTypedData_v2",e.eth_signTypedData_v3="eth_signTypedData_v3",e.eth_signTypedData_v4="eth_signTypedData_v4",e.eth_signTypedData="eth_signTypedData",e.cbWallet_arbitrary="walletlink_arbitrary",e.wallet_addEthereumChain="wallet_addEthereumChain",e.wallet_switchEthereumChain="wallet_switchEthereumChain",e.wallet_watchAsset="wallet_watchAsset",e.eth_subscribe="eth_subscribe",e.eth_unsubscribe="eth_unsubscribe",e.eth_newFilter="eth_newFilter",e.eth_newBlockFilter="eth_newBlockFilter",e.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",e.eth_getFilterChanges="eth_getFilterChanges",e.eth_getFilterLogs="eth_getFilterLogs"}(t.JSONRPCMethod||(t.JSONRPCMethod={}))},1254:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionManager=void 0;const r=n(1255),i=n(1263),o=()=>{};t.SubscriptionManager=class{constructor(e){const t=new r({provider:e,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:o}=i({blockTracker:t,provider:e});this.events=n,this.subscriptionMiddleware=o}async handleRequest(e){const t={};return await this.subscriptionMiddleware(e,t,o,o),t}destroy(){this.subscriptionMiddleware.destroy()}}},1255:function(e,t,n){const r=n(1216),i=n(1256);function o(e,t){return new Promise((n=>{const r=setTimeout(n,e);r.unref&&t&&r.unref()}))}e.exports=class extends i{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");const t=e.pollingInterval||2e4,n=e.retryTimeout||t/10,r=void 0===e.keepEventLoopActive||e.keepEventLoopActive,i=e.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:t},e)),this._provider=e.provider,this._pollingInterval=t,this._retryTimeout=n,this._keepEventLoopActive=r,this._setSkipCacheFlag=i}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._performSync().catch((e=>this.emit("error",e)))}async _performSync(){for(;this._isRunning;)try{await this._updateLatestBlock(),await o(this._pollingInterval,!this._keepEventLoopActive)}catch(e){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${e.stack}`);try{this.emit("error",n)}catch(t){console.error(n)}await o(this._retryTimeout,!this._keepEventLoopActive)}}async _updateLatestBlock(){const e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){const e={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0);const t=await r((t=>this._provider.sendAsync(e,t)))();if(t.error)throw new Error(`PollingBlockTracker - encountered error fetching block:\n${t.error}`);return t.result}}},1256:function(e,t,n){n(1217),n(1216);const r=n(1259),i=(e,t)=>e+t,o=["sync","latest"];function s(e){return Number.parseInt(e,16)}e.exports=class extends r{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._blockResetDuration=e.blockResetDuration||2e4,this._blockResetTimeout,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){if(this._currentBlock)return this._currentBlock;return await new Promise((e=>this.once("latest",e)))}removeAllListeners(e){e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener()}_start(){}_end(){}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e,t){o.includes(e)&&this._maybeStart()}_onRemoveListener(e,t){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}_maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}_getBlockTrackerEventCount(){return o.map((e=>this.listenerCount(e))).reduce(i)}_newPotentialLatest(e){const t=this._currentBlock;t&&s(e)<=s(t)||this._setCurrentBlock(e)}_setCurrentBlock(e){const t=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:t,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}},1257:function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e};var n=Object.prototype.hasOwnProperty},1258:function(e,t){e.exports=function(e){var t=(e=e||{}).max||Number.MAX_SAFE_INTEGER,n="undefined"!==typeof e.start?e.start:Math.floor(Math.random()*t);return function(){return n%=t,n++}}},1259:function(e,t,n){const r=n(1260),i=n(31);var o="object"===typeof Reflect?Reflect:null,s=o&&"function"===typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};function a(){i.call(this)}function u(e,t,n){try{s(e,t,n)}catch(r){setTimeout((()=>{throw r}))}}function c(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}e.exports=a,r.inherits(a,i),a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[e];if(void 0===a)return!1;if("function"===typeof a)u(a,this,t);else{var l=a.length,h=c(a,l);for(n=0;n<l;++n)u(h[n],this,t)}return!0}},1260:function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;t.format=function(e){if(!y(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(a(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,s=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}})),u=r[n];n<o;u=r[++n])b(u)||!v(u)?s+=" "+u:s+=" "+a(u);return s},t.deprecate=function(n,r){if("undefined"!==typeof e&&!0===e.noDeprecation)return n;if("undefined"===typeof e)return function(){return t.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var o,s={};function a(e,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(n)?r.showHidden=n:n&&t._extend(r,n),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,e,r.depth)}function u(e,t){var n=a.styles[t];return n?"\x1b["+a.colors[n][0]+"m"+e+"\x1b["+a.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&E(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return y(i)||(i=l(e,i,r)),i}var o=function(e,t){if(_(t))return e.stylize("undefined","undefined");if(y(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(g(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(b(t))return e.stylize("null","null")}(e,n);if(o)return o;var s=Object.keys(n),a=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(n)),S(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(n);if(0===s.length){if(E(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(m(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return h(n)}var c,v="",x=!1,k=["{","}"];(f(n)&&(x=!0,k=["[","]"]),E(n))&&(v=" [Function"+(n.name?": "+n.name:"")+"]");return m(n)&&(v=" "+RegExp.prototype.toString.call(n)),w(n)&&(v=" "+Date.prototype.toUTCString.call(n)),S(n)&&(v=" "+h(n)),0!==s.length||x&&0!=n.length?r<0?m(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=x?function(e,t,n,r,i){for(var o=[],s=0,a=t.length;s<a;++s)M(t,String(s))?o.push(d(e,t,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(d(e,t,n,r,i,!0))})),o}(e,n,r,a,s):s.map((function(t){return d(e,n,r,a,t,x)})),e.seen.pop(),function(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(c,v,k)):k[0]+v+k[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),M(r,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=b(n)?l(e,u.value,null):l(e,u.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),_(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function f(e){return Array.isArray(e)}function p(e){return"boolean"===typeof e}function b(e){return null===e}function g(e){return"number"===typeof e}function y(e){return"string"===typeof e}function _(e){return void 0===e}function m(e){return v(e)&&"[object RegExp]"===x(e)}function v(e){return"object"===typeof e&&null!==e}function w(e){return v(e)&&"[object Date]"===x(e)}function S(e){return v(e)&&("[object Error]"===x(e)||e instanceof Error)}function E(e){return"function"===typeof e}function x(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(_(o)&&(o=Object({NODE_ENV:"production",PUBLIC_URL:"https://cdn.decentraland.org/@dcl/explorer-website/0.1.0-7378979040.commit-0cf2023",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_WEBSITE_VERSION:"0.1.0-7378979040.commit-0cf2023",REACT_APP_EXPLORER_VERSION:"1.0.131583-20230718133624.commit-7106e1f",REACT_APP_EXPLORER_BASE_URL:""}).NODE_DEBUG||""),n=n.toUpperCase(),!s[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=e.pid;s[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else s[n]=function(){};return s[n]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=f,t.isBoolean=p,t.isNull=b,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=y,t.isSymbol=function(e){return"symbol"===typeof e},t.isUndefined=_,t.isRegExp=m,t.isObject=v,t.isDate=w,t.isError=S,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e},t.isBuffer=n(1261);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),C[e.getMonth()],t].join(" ")}function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",R(),t.format.apply(t,arguments))},t.inherits=n(1262),t._extend=function(e,t){if(!t||!v(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var O="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function A(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');if(O&&e[O]){var t;if("function"!==typeof(t=e[O]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,O,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,i)}catch(s){n(s)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),O&&Object.defineProperty(t,O,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},t.promisify.custom=O,t.callbackify=function(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!==typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};t.apply(this,n).then((function(t){e.nextTick(s,null,t)}),(function(t){e.nextTick(A,t,s)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,r(t)),n}}).call(this,n(91))},1261:function(e,t){e.exports=function(e){return e&&"object"===typeof e&&"function"===typeof e.copy&&"function"===typeof e.fill&&"function"===typeof e.readUInt8}},1262:function(e,t){"function"===typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},1263:function(e,t,n){const r=n(1147).default,i=n(1218),{createAsyncMiddleware:o}=n(1219),s=n(1271),{unsafeRandomBytes:a,incrementHexInt:u}=n(1145),c=n(1190);function l(e){return{hash:e.hash,parentHash:e.parentHash,sha3Uncles:e.sha3Uncles,miner:e.miner,stateRoot:e.stateRoot,transactionsRoot:e.transactionsRoot,receiptsRoot:e.receiptsRoot,logsBloom:e.logsBloom,difficulty:e.difficulty,number:e.number,gasLimit:e.gasLimit,gasUsed:e.gasUsed,nonce:e.nonce,mixHash:e.mixHash,timestamp:e.timestamp,extraData:e.extraData}}e.exports=function(e){let{blockTracker:t,provider:n}=e;const h={},d=s({blockTracker:t,provider:n});let f=!1;const p=new r,b=i({eth_subscribe:o((async function(e,r){if(f)throw new Error("SubscriptionManager - attempting to use after destroying");const i=e.params[0],o=a(16);let s;switch(i){case"newHeads":s=p({subId:o});break;case"logs":const t=e.params[1];s=b({subId:o,filter:await d.newLogFilter(t)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${i}"`)}return h[o]=s,void(r.result=o);function p(e){let{subId:r}=e;const o={type:i,destroy:async()=>{t.removeListener("sync",o.update)},update:async e=>{let{oldBlock:t,newBlock:i}=e;const o=i,s=u(t);(await c({provider:n,fromBlock:s,toBlock:o})).map(l).forEach((e=>{g(r,e)}))}};return t.on("sync",o.update),o}function b(e){let{subId:t,filter:n}=e;n.on("update",(e=>g(t,e)));return{type:i,destroy:async()=>await d.uninstallFilter(n.idHex)}}})),eth_unsubscribe:o((async function(e,t){if(f)throw new Error("SubscriptionManager - attempting to use after destroying");const n=e.params[0],r=h[n];if(!r)return void(t.result=!1);delete h[n],await r.destroy(),t.result=!0}))});return b.destroy=function(){p.removeAllListeners();for(const e in h)h[e].destroy(),delete h[e];f=!0},{events:p,middleware:b};function g(e,t){p.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:e,result:t}})}}},1264:function(e,t){e.exports=function(e){return(t,n,r,i)=>{const o=e[t.method];return void 0===o?r():"function"===typeof o?o(t,n,r,i):(n.result=o,i())}}},1265:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createIdRemapMiddleware=void 0;const r=n(1220);t.createIdRemapMiddleware=function(){return(e,t,n,i)=>{const o=e.id,s=r.getUniqueId();e.id=s,t.id=s,n((n=>{e.id=o,t.id=o,n()}))}}},1266:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAsyncMiddleware=void 0,t.createAsyncMiddleware=function(e){return async(t,n,r,i)=>{let o;const s=new Promise((e=>{o=e}));let a=null,u=!1;const c=async()=>{u=!0,r((e=>{a=e,o()})),await s};try{await e(t,n,c),u?(await s,a(null)):i(null)}catch(l){a?a(l):i(l)}}}},1267:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createScaffoldMiddleware=void 0,t.createScaffoldMiddleware=function(e){return(t,n,r,i)=>{const o=e[t.method];return void 0===o?r():"function"===typeof o?o(t,n,r,i):(n.result=o,i())}}},1268:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const r=n(1187);Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return r.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});const i=n(1222);Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=n(1269);Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=n(1188);Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})},1269:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;const r=n(1187),i=n(1222),o=n(1188);function s(e,t){const[n,o]=u(t);return new r.EthereumRpcError(e,n||i.getMessageFromCode(e),o)}function a(e,t){const[n,o]=u(t);return new r.EthereumProviderError(e,n||i.getMessageFromCode(e),o)}function u(e){if(e){if("string"===typeof e)return[e];if("object"===typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&"string"!==typeof t)throw new Error("Must specify string message.");return[t||void 0,n]}}return[]}t.ethErrors={rpc:{parse:e=>s(o.errorCodes.rpc.parse,e),invalidRequest:e=>s(o.errorCodes.rpc.invalidRequest,e),invalidParams:e=>s(o.errorCodes.rpc.invalidParams,e),methodNotFound:e=>s(o.errorCodes.rpc.methodNotFound,e),internal:e=>s(o.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(t,e)},invalidInput:e=>s(o.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>s(o.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>s(o.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>s(o.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>s(o.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>s(o.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>a(o.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(o.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(o.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(o.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(o.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:i}=e;if(!n||"string"!==typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(t,n,i)}}}},1270:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMiddleware=void 0;const r=n(1221);t.mergeMiddleware=function(e){const t=new r.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}},1271:function(e,t,n){const r=n(1333).Mutex,{createAsyncMiddleware:i}=n(1219),o=n(1218),s=n(1272),a=n(1275),u=n(1276),{intToHex:c,hexToInt:l}=n(1145);function h(e){return d((async function(){const t=await e(...arguments),n=c(t.id);return n}))}function d(e){return i((async(t,n)=>{const r=await e.apply(null,t.params);n.result=r}))}function f(e,t){const n=[];for(let r in e)n.push(e[r]);return n}e.exports=function(e){let{blockTracker:t,provider:n}=e,i=0,p={};const b=new r,g=function(e){let{mutex:t}=e;return e=>async(n,r,i,o)=>{(await t.acquire())(),e(n,r,i,o)}}({mutex:b}),y=o({eth_newFilter:g(h(m)),eth_newBlockFilter:g(h(v)),eth_newPendingTransactionFilter:g(h(w)),eth_uninstallFilter:g(d(x)),eth_getFilterChanges:g(d(S)),eth_getFilterLogs:g(d(E))}),_=async e=>{let{oldBlock:t,newBlock:n}=e;if(0===p.length)return;const r=await b.acquire();try{await Promise.all(f(p).map((async e=>{try{await e.update({oldBlock:t,newBlock:n})}catch(r){console.error(r)}})))}catch(i){console.error(i)}r()};return y.newLogFilter=m,y.newBlockFilter=v,y.newPendingTransactionFilter=w,y.uninstallFilter=x,y.getFilterChanges=S,y.getFilterLogs=E,y.destroy=()=>{!async function(){const e=f(p).length;p={},C({prevFilterCount:e,newFilterCount:0})}()},y;async function m(e){const t=new s({provider:n,params:e});await k(t);return t}async function v(){const e=new a({provider:n});await k(e);return e}async function w(){const e=new u({provider:n});await k(e);return e}async function S(e){const t=l(e),n=p[t];if(!n)throw new Error(`No filter for index "${t}"`);return n.getChangesAndClear()}async function E(e){const t=l(e),n=p[t];if(!n)throw new Error(`No filter for index "${t}"`);return"log"===n.type?results=n.getAllResults():results=[],results}async function x(e){const t=l(e),n=p[t],r=Boolean(n);return r&&await async function(e){const t=f(p).length;delete p[e];const n=f(p).length;C({prevFilterCount:t,newFilterCount:n})}(t),r}async function k(e){const n=f(p).length,r=await t.getLatestBlock();await e.initialize({currentBlock:r}),i++,p[i]=e,e.id=i,e.idHex=c(i);return C({prevFilterCount:n,newFilterCount:f(p).length}),i}function C(e){let{prevFilterCount:n,newFilterCount:r}=e;0===n&&r>0?t.on("sync",_):n>0&&0===r&&t.removeListener("sync",_)}}},1272:function(e,t,n){const r=n(1217),i=n(1273),o=n(1274),{bnToHex:s,hexToInt:a,incrementHexInt:u,minBlockRef:c,blockRefIsNumber:l}=n(1145);e.exports=class extends o{constructor(e){let{provider:t,params:n}=e;super(),this.type="log",this.ethQuery=new r(t),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},n),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map((e=>e.toLowerCase())))}async initialize(e){let{currentBlock:t}=e,n=this.params.fromBlock;["latest","pending"].includes(n)&&(n=t),"earliest"===n&&(n="0x0"),this.params.fromBlock=n;const r=c(this.params.toBlock,t),i=Object.assign({},this.params,{toBlock:r}),o=await this._fetchLogs(i);this.addInitialResults(o)}async update(e){let{oldBlock:t,newBlock:n}=e;const r=n;let i;i=t?u(t):n;const o=Object.assign({},this.params,{fromBlock:i,toBlock:r}),s=(await this._fetchLogs(o)).filter((e=>this.matchLog(e)));this.addResults(s)}async _fetchLogs(e){return await i((t=>this.ethQuery.getLogs(e,t)))()}matchLog(e){if(a(this.params.fromBlock)>=a(e.blockNumber))return!1;if(l(this.params.toBlock)&&a(this.params.toBlock)<=a(e.blockNumber))return!1;const t=e.address&&e.address.toLowerCase();if(this.params.address&&t&&!this.params.address.includes(t))return!1;return this.params.topics.every(((t,n)=>{let r=e.topics[n];if(!r)return!1;r=r.toLowerCase();let i=Array.isArray(t)?t:[t];if(i.includes(null))return!0;i=i.map((e=>e.toLowerCase()));return i.includes(r)}))}}},1273:function(e,t,n){"use strict";const r=(e,t,n,r)=>function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];const a=t.promiseModule;return new a(((i,s)=>{t.multiArgs?o.push((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.errorFirst?n[0]?s(n):(n.shift(),i(n)):i(n)})):t.errorFirst?o.push(((e,t)=>{e?s(e):i(t)})):o.push(i);const a=this===n?r:this;Reflect.apply(e,a,o)}))},i=new WeakMap;e.exports=(e,t)=>{t={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...t};const n=typeof e;if(null===e||"object"!==n&&"function"!==n)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===e?"null":n}\``);const o=new WeakMap,s=new Proxy(e,{apply(e,n,i){const a=o.get(e);if(a)return Reflect.apply(a,n,i);const u=t.excludeMain?e:r(e,t,s,e);return o.set(e,u),Reflect.apply(u,n,i)},get(e,n){const a=e[n];if(!((e,n)=>{let r=i.get(e);if(r||(r={},i.set(e,r)),n in r)return r[n];const o=e=>"string"===typeof e||"symbol"===typeof n?n===e:e.test(n),s=Reflect.getOwnPropertyDescriptor(e,n),a=void 0===s||s.writable||s.configurable,u=(t.include?t.include.some(o):!t.exclude.some(o))&&a;return r[n]=u,u})(e,n)||a===Function.prototype[n])return a;const u=o.get(a);if(u)return u;if("function"===typeof a){const n=r(a,t,s,e);return o.set(a,n),n}return a}});return s}},1274:function(e,t,n){const r=n(1189);e.exports=class extends r{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(e){this.allResults=this.allResults.concat(e),super.addResults(e)}addInitialResults(e){this.allResults=this.allResults.concat(e),super.addInitialResults(e)}getAllResults(){return this.allResults}}},1275:function(e,t,n){const r=n(1189),i=n(1190),{incrementHexInt:o}=n(1145);e.exports=class extends r{constructor(e){let{provider:t,params:n}=e;super(),this.type="block",this.provider=t}async update(e){let{oldBlock:t,newBlock:n}=e;const r=n,s=o(t),a=(await i({provider:this.provider,fromBlock:s,toBlock:r})).map((e=>e.hash));this.addResults(a)}}},1276:function(e,t,n){const r=n(1189),i=n(1190),{incrementHexInt:o}=n(1145);e.exports=class extends r{constructor(e){let{provider:t}=e;super(),this.type="tx",this.provider=t}async update(e){let{oldBlock:t}=e;const n=t,r=o(t),s=await i({provider:this.provider,fromBlock:r,toBlock:n}),a=[];for(const i of s)a.push(...i.transactions);this.addResults(a)}}},1277:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKUI=void 0;const r=n(1278),i=n(1290),o=n(1292);t.WalletSDKUI=class{constructor(e){this.attached=!1,this.snackbar=new i.Snackbar({darkMode:e.darkMode}),this.linkFlow=new r.LinkFlow({darkMode:e.darkMode,version:e.version,sessionId:e.session.id,sessionSecret:e.session.secret,linkAPIUrl:e.linkAPIUrl,connected$:e.connected$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.linkFlow.attach(t),this.snackbar.attach(t),this.attached=!0,(0,o.injectCssReset)()}setConnectDisabled(e){this.linkFlow.setConnectDisabled(e)}addEthereumChain(e){}watchAsset(e){}switchEthereumChain(e){}requestEthereumAccounts(e){this.linkFlow.open({onCancel:e.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(e){}signEthereumTransaction(e){}submitEthereumTransaction(e){}ethereumAddressFromSignedMessage(e){}showConnecting(e){let t;return t=e.isUnlinkedErrorState?{autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:{message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(t)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(e){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}}},1278:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkFlow=void 0;const r=n(1134),i=n(1135),o=n(1279);t.LinkFlow=class{constructor(e){this.extensionUI$=new i.BehaviorSubject({}),this.subscriptions=new i.Subscription,this.isConnected=!1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=e.darkMode,this.version=e.version,this.sessionId=e.sessionId,this.sessionSecret=e.sessionSecret,this.linkAPIUrl=e.linkAPIUrl,this.isParentConnection=e.isParentConnection,this.connected$=e.connected$}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",e.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe((e=>{this.isConnected!==e&&(this.isConnected=e,this.render())})))}detach(){var e;this.root&&(this.subscriptions.unsubscribe(),(0,r.render)(null,this.root),null===(e=this.root.parentElement)||void 0===e||e.removeChild(this.root))}setConnectDisabled(e){this.connectDisabled=e}open(e){this.isOpen=!0,this.onCancel=e.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){if(!this.root)return;const e=this.extensionUI$.subscribe((()=>{this.root&&(0,r.render)((0,r.h)(o.TryExtensionLinkDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}));this.subscriptions.add(e)}}},1279:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TryExtensionLinkDialog=void 0;const i=r(n(28)),o=n(1134),s=n(1191),a=n(1121),u=n(1280),c=r(n(1281)),l=r(n(1282)),h=r(n(1283)),d=r(n(1284)),f=n(1285),p=n(1287),b=r(n(1289));t.TryExtensionLinkDialog=e=>{const[t,n]=(0,s.useState)(!e.isOpen),[r,a]=(0,s.useState)(!e.isOpen);return(0,s.useEffect)((()=>{const{isOpen:t}=e,r=[window.setTimeout((()=>{a(!t)}),10)];return t?n(!1):r.push(window.setTimeout((()=>{n(!0)}),360)),()=>{r.forEach(window.clearTimeout)}}),[e.isOpen]),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-container",t&&"-cbwsdk-extension-dialog-container-hidden")},(0,o.h)("style",null,b.default),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-backdrop",r&&"-cbwsdk-extension-dialog-backdrop-hidden")}),(0,o.h)("div",{class:"-cbwsdk-extension-dialog"},(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box",r&&"-cbwsdk-extension-dialog-box-hidden")},(0,o.h)(g,{onInstallClick:()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}}),e.connectDisabled?null:(0,o.h)(y,{darkMode:e.darkMode,version:e.version,sessionId:e.sessionId,sessionSecret:e.sessionSecret,linkAPIUrl:e.linkAPIUrl,isConnected:e.isConnected,isParentConnection:e.isParentConnection}),e.onCancel&&(0,o.h)(m,{onClick:e.onCancel}))))};const g=e=>{let{onInstallClick:t}=e;const[n,r]=(0,s.useState)(!1),i=(0,s.useCallback)((()=>{n?window.location.reload():(t(),r(!0))}),[t,n]);return(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top"},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-install-region"},(0,o.h)("h2",null,"Try the Coinbase Wallet extension"),n&&(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-subtext"},"After installing Coinbase Wallet, refresh the page and connect again."),(0,o.h)("button",{type:"button",onClick:i},n?"Refresh":"Install")),(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-info-region"},(0,o.h)(_,{icon:l.default,text:"Connect to crypto apps with one click"}),(0,o.h)(_,{icon:h.default,text:"Your private key is stored securely"}),(0,o.h)(_,{icon:c.default,text:"Works with Ethereum, Polygon, and more"})))},y=e=>{const t=(0,a.createQrUrl)(e.sessionId,e.sessionSecret,e.linkAPIUrl,e.isParentConnection);return(0,o.h)("div",{"data-testid":"scan-qr-box",class:"-cbwsdk-extension-dialog-box-bottom"},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-description-region"},(0,o.h)("h2",null,"Or scan to connect"),(0,o.h)("body",{class:"-cbwsdk-extension-dialog-box-bottom-description"},"Open"," ",(0,o.h)("a",{href:"https://wallet.coinbase.com/",target:"_blank",rel:"noopener noreferrer"},"Coinbase Wallet")," ","on your mobile phone and scan")),(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-qr-region"},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-qr-wrapper"},(0,o.h)(f.QRCode,{content:t,width:150,height:150,fgColor:"#000",bgColor:"transparent",image:{svg:d.default,width:34,height:34}})),(0,o.h)("input",{type:"hidden",name:"cbwsdk-version",value:u.LIB_VERSION}),(0,o.h)("input",{type:"hidden",value:t}),!e.isConnected&&(0,o.h)("div",{"data-testid":"connecting-spinner",class:"-cbwsdk-extension-dialog-box-bottom-qr-connecting"},(0,o.h)(p.Spinner,{size:36,color:"#000"}),(0,o.h)("p",null,"Connecting..."))))},_=e=>(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-description"},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-description-icon-wrapper"},(0,o.h)("img",{src:e.icon})),(0,o.h)("body",{class:"-cbwsdk-extension-dialog-box-top-description-text"},e.text)),m=e=>(0,o.h)("button",{type:"button",class:"-cbwsdk-extension-dialog-box-cancel",onClick:e.onClick},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-cancel-x"}))},1280:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LIB_VERSION=void 0,t.LIB_VERSION="3.1.0"},1281:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOHMzLjU4IDggOCA4IDgtMy41OCA4LTgtMy41OC04LTgtOFptNS45MSA3aC0xLjk0Yy0uMS0xLjU3LS40Mi0zLS45MS00LjE1IDEuNDguODggMi41NSAyLjM4IDIuODUgNC4xNVpNOCAxNGMtLjQ1IDAtMS43Mi0xLjc3LTEuOTUtNWgzLjljLS4yMyAzLjIzLTEuNSA1LTEuOTUgNVpNNi4wNSA3QzYuMjggMy43NyA3LjU1IDIgOCAyYy40NSAwIDEuNzIgMS43NyAxLjk1IDVoLTMuOVpNNC45NCAyLjg1QzQuNDYgNCA0LjEzIDUuNDMgNC4wMyA3SDIuMDljLjMtMS43NyAxLjM3LTMuMjcgMi44NS00LjE1Wk0yLjA5IDloMS45NGMuMSAxLjU3LjQyIDMgLjkxIDQuMTVBNS45OTggNS45OTggMCAwIDEgMi4wOSA5Wm04Ljk3IDQuMTVjLjQ4LTEuMTUuODEtMi41OC45MS00LjE1aDEuOTRhNS45OTggNS45OTggMCAwIDEtMi44NSA0LjE1WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},1282:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1LjYzNSAyLjExN2EzLjg4OSAzLjg4OSAwIDAgMC01LjUyMSAwTDYuODkgNS4zMzVBMy44OTQgMy44OTQgMCAwIDAgNS44IDguNzM5Yy4wODMuNTA2LjI2OCAxLjAxMS41NTMgMS40NjYuMTUxLjI1My4zMzYuNDcyLjUzNy42OTFsLjYyMS42MjQgMS4xNDEtMS4xNDYtLjYyLS42MjRhMi4xMDUgMi4xMDUgMCAwIDEtLjQ4Ny0uNzQxIDIuMzQgMi4zNCAwIDAgMSAuNTAzLTIuNTFsMy4yMDYtMy4yMmEyLjI5MyAyLjI5MyAwIDAgMSAzLjIzOSAwYy44OS44OTQuODkgMi4zNDMgMCAzLjI1M2wtMS41MjcgMS41MzNjLjIzNC42NC4zMzUgMS4zMzEuMzAyIDIuMDA1bDIuMzgzLTIuMzkyYzEuNTEtMS41MzQgMS40OTMtNC4wMjgtLjAxNy01LjU2MVoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBkPSJNMTEuMjcxIDcuNzQ1YTMuMTMgMy4xMyAwIDAgMC0uNTU0LS42OWwtLjYyLS42MjQtMS4xNDIgMS4xNDYuNjIxLjYyM2MuMjE4LjIyLjM4Ni40ODkuNDg3Ljc1OC4zMzUuODI2LjE2NyAxLjgyLS41MDQgMi40OTRsLTMuMjA1IDMuMjE5YTIuMjkzIDIuMjkzIDAgMCAxLTMuMjQgMCAyLjMxNiAyLjMxNiAwIDAgMSAwLTMuMjUybDEuNTI4LTEuNTM0YTQuODE1IDQuODE1IDAgMCAxLS4yODUtMi4wMDVsLTIuMzgzIDIuMzkzYTMuOTI3IDMuOTI3IDAgMCAwIDAgNS41NDQgMy45MDkgMy45MDkgMCAwIDAgNS41MzggMGwzLjIwNS0zLjIxOWEzLjk1OCAzLjk1OCAwIDAgMCAxLjA5MS0zLjQwNCA0LjIxMSA0LjIxMSAwIDAgMC0uNTM3LTEuNDQ5WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},1283:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgN3Y5aDE0VjdIMVptNy41IDQuMzlWMTRoLTF2LTIuNjFjLS40NC0uMTktLjc1LS42My0uNzUtMS4xNGExLjI1IDEuMjUgMCAwIDEgMi41IDBjMCAuNTEtLjMxLjk1LS43NSAxLjE0Wk01LjY3IDZWNC4zM0M1LjY3IDMuMDUgNi43MSAyIDggMnMyLjMzIDEuMDUgMi4zMyAyLjMzVjZoMlY0LjMzQzEyLjMzIDEuOTQgMTAuMzkgMCA4IDBTMy42NyAxLjk0IDMuNjcgNC4zM1Y2aDJaIiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"},1284:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="50" cy="50" r="50" fill="white"/>\n<circle cx="49.9996" cy="49.9996" r="43.6363" fill="#1B53E4"/>\n<circle cx="49.9996" cy="49.9996" r="43.6363" stroke="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M19.3379 49.9484C19.3379 66.8508 33.04 80.553 49.9425 80.553C66.8449 80.553 80.5471 66.8508 80.5471 49.9484C80.5471 33.0459 66.8449 19.3438 49.9425 19.3438C33.04 19.3438 19.3379 33.0459 19.3379 49.9484ZM44.0817 40.0799C41.8725 40.0799 40.0817 41.8708 40.0817 44.0799V55.8029C40.0817 58.012 41.8725 59.8029 44.0817 59.8029H55.8046C58.0138 59.8029 59.8046 58.012 59.8046 55.8029V44.0799C59.8046 41.8708 58.0138 40.0799 55.8046 40.0799H44.0817Z" fill="white"/>\n</svg>\n\n'},1285:function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QRCode=void 0;const i=n(1134),o=n(1191),s=r(n(1286));t.QRCode=t=>{const[n,r]=(0,o.useState)("");return(0,o.useEffect)((()=>{var n,i;const o=new s.default({content:t.content,background:t.bgColor||"#ffffff",color:t.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(n=t.width)&&void 0!==n?n:256,height:null!==(i=t.height)&&void 0!==i?i:256,padding:0,image:t.image}),a=e.from(o.svg(),"utf8").toString("base64");r(`data:image/svg+xml;base64,${a}`)})),n?(0,i.h)("img",{src:n,alt:"QR Code"}):null}}).call(this,n(304).Buffer)},1286:function(e,t){function n(e){this.mode=i.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,n=this.data.length;t<n;t++){var r=[],o=this.data.charCodeAt(t);o>65536?(r[0]=240|(1835008&o)>>>18,r[1]=128|(258048&o)>>>12,r[2]=128|(4032&o)>>>6,r[3]=128|63&o):o>2048?(r[0]=224|(61440&o)>>>12,r[1]=128|(4032&o)>>>6,r[2]=128|63&o):o>128?(r[0]=192|(1984&o)>>>6,r[1]=128|63&o):r[0]=o,this.parsedData.push(r)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function r(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}n.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,n=this.parsedData.length;t<n;t++)e.put(this.parsedData[t],8)}},r.prototype={addData:function(e){var t=new n(e);this.dataList.push(t),this.dataCache=null},isDark:function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[n][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=r.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},getBestMaskPattern:function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=y.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},createMovieClip:function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var i=0;i<this.modules.length;i++)for(var o=1*i,s=0;s<this.modules[i].length;s++){var a=1*s;this.modules[i][s]&&(r.beginFill(0,100),r.moveTo(a,o),r.lineTo(a+1,o),r.lineTo(a+1,o+1),r.lineTo(a,o+1),r.endFill())}return r},setupTimingPattern:function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},setupPositionAdjustPattern:function(){for(var e=y.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],i=e[n];if(null==this.modules[r][i])for(var o=-2;o<=2;o++)for(var s=-2;s<=2;s++)this.modules[r+o][i+s]=-2==o||2==o||-2==s||2==s||0==o&&0==s}},setupTypeNumber:function(e){for(var t=y.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},setupTypeInfo:function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=y.getBCHTypeInfo(n),i=0;i<15;i++){var o=!e&&1==(r>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(i=0;i<15;i++){o=!e&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var n=-1,r=this.moduleCount-1,i=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var a=0;a<2;a++)if(null==this.modules[r][s-a]){var u=!1;o<e.length&&(u=1==(e[o]>>>i&1)),y.getMask(t,r,s-a)&&(u=!u),this.modules[r][s-a]=u,-1==--i&&(o++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}}},r.PAD0=236,r.PAD1=17,r.createData=function(e,t,n){for(var i=w.getRSBlocks(e,t),o=new S,s=0;s<n.length;s++){var a=n[s];o.put(a.mode,4),o.put(a.getLength(),y.getLengthInBits(a.mode,e)),a.write(o)}var u=0;for(s=0;s<i.length;s++)u+=i[s].dataCount;if(o.getLengthInBits()>8*u)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+8*u+")");for(o.getLengthInBits()+4<=8*u&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*u)&&(o.put(r.PAD0,8),!(o.getLengthInBits()>=8*u));)o.put(r.PAD1,8);return r.createBytes(o,i)},r.createBytes=function(e,t){for(var n=0,r=0,i=0,o=new Array(t.length),s=new Array(t.length),a=0;a<t.length;a++){var u=t[a].dataCount,c=t[a].totalCount-u;r=Math.max(r,u),i=Math.max(i,c),o[a]=new Array(u);for(var l=0;l<o[a].length;l++)o[a][l]=255&e.buffer[l+n];n+=u;var h=y.getErrorCorrectPolynomial(c),d=new v(o[a],h.getLength()-1).mod(h);s[a]=new Array(h.getLength()-1);for(l=0;l<s[a].length;l++){var f=l+d.getLength()-s[a].length;s[a][l]=f>=0?d.get(f):0}}var p=0;for(l=0;l<t.length;l++)p+=t[l].totalCount;var b=new Array(p),g=0;for(l=0;l<r;l++)for(a=0;a<t.length;a++)l<o[a].length&&(b[g++]=o[a][l]);for(l=0;l<i;l++)for(a=0;a<t.length;a++)l<s[a].length&&(b[g++]=s[a][l]);return b};for(var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},o=1,s=0,a=3,u=2,c=0,l=1,h=2,d=3,f=4,p=5,b=6,g=7,y={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;y.getBCHDigit(t)-y.getBCHDigit(y.G15)>=0;)t^=y.G15<<y.getBCHDigit(t)-y.getBCHDigit(y.G15);return(e<<10|t)^y.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;y.getBCHDigit(t)-y.getBCHDigit(y.G18)>=0;)t^=y.G18<<y.getBCHDigit(t)-y.getBCHDigit(y.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return y.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case c:return(t+n)%2==0;case l:return t%2==0;case h:return n%3==0;case d:return(t+n)%3==0;case f:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case p:return t*n%2+t*n%3==0;case b:return(t*n%2+t*n%3)%2==0;case g:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new v([1],0),n=0;n<e;n++)t=t.multiply(new v([1,_.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;case i.MODE_8BIT_BYTE:case i.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var i=0;i<t;i++){for(var o=0,s=e.isDark(r,i),a=-1;a<=1;a++)if(!(r+a<0||t<=r+a))for(var u=-1;u<=1;u++)i+u<0||t<=i+u||0==a&&0==u||s==e.isDark(r+a,i+u)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<t-1;r++)for(i=0;i<t-1;i++){var c=0;e.isDark(r,i)&&c++,e.isDark(r+1,i)&&c++,e.isDark(r,i+1)&&c++,e.isDark(r+1,i+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<t;r++)for(i=0;i<t-6;i++)e.isDark(r,i)&&!e.isDark(r,i+1)&&e.isDark(r,i+2)&&e.isDark(r,i+3)&&e.isDark(r,i+4)&&!e.isDark(r,i+5)&&e.isDark(r,i+6)&&(n+=40);for(i=0;i<t;i++)for(r=0;r<t-6;r++)e.isDark(r,i)&&!e.isDark(r+1,i)&&e.isDark(r+2,i)&&e.isDark(r+3,i)&&e.isDark(r+4,i)&&!e.isDark(r+5,i)&&e.isDark(r+6,i)&&(n+=40);var l=0;for(i=0;i<t;i++)for(r=0;r<t;r++)e.isDark(r,i)&&l++;return n+=10*(Math.abs(100*l/t/t-50)/5)}},_={glog:function(e){if(e<1)throw new Error("glog("+e+")");return _.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return _.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},m=0;m<8;m++)_.EXP_TABLE[m]=1<<m;for(m=8;m<256;m++)_.EXP_TABLE[m]=_.EXP_TABLE[m-4]^_.EXP_TABLE[m-5]^_.EXP_TABLE[m-6]^_.EXP_TABLE[m-8];for(m=0;m<255;m++)_.LOG_TABLE[_.EXP_TABLE[m]]=m;function v(e,t){if(void 0==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}function w(e,t){this.totalCount=e,this.dataCount=t}function S(){this.buffer=[],this.length=0}v.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var r=0;r<e.getLength();r++)t[n+r]^=_.gexp(_.glog(this.get(n))+_.glog(e.get(r)));return new v(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=_.glog(this.get(0))-_.glog(e.get(0)),n=new Array(this.getLength()),r=0;r<this.getLength();r++)n[r]=this.get(r);for(r=0;r<e.getLength();r++)n[r]^=_.gexp(_.glog(e.get(r))+t);return new v(n,0).mod(e)}},w.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],w.getRSBlocks=function(e,t){var n=w.getRsBlockTable(e,t);if(void 0==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,i=[],o=0;o<r;o++)for(var s=n[3*o+0],a=n[3*o+1],u=n[3*o+2],c=0;c<s;c++)i.push(new w(a,u));return i},w.getRsBlockTable=function(e,t){switch(t){case o:return w.RS_BLOCK_TABLE[4*(e-1)+0];case s:return w.RS_BLOCK_TABLE[4*(e-1)+1];case a:return w.RS_BLOCK_TABLE[4*(e-1)+2];case u:return w.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},S.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var E=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function x(e){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},"string"===typeof e&&(e={content:e}),e)for(var t in e)this.options[t]=e[t];if("string"!==typeof this.options.content)throw new Error("Expected 'content' as string!");if(0===this.options.content.length)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");var n=this.options.content,i=function(e,t){for(var n=function(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=e?3:0)}(e),r=1,i=0,o=0,s=E.length;o<=s;o++){var a=E[o];if(!a)throw new Error("Content too long: expected "+i+" but got "+n);switch(t){case"L":i=a[0];break;case"M":i=a[1];break;case"Q":i=a[2];break;case"H":i=a[3];break;default:throw new Error("Unknwon error correction level: "+t)}if(n<=i)break;r++}if(r>E.length)throw new Error("Content too long");return r}(n,this.options.ecl),c=function(e){switch(e){case"L":return o;case"M":return s;case"Q":return a;case"H":return u;default:throw new Error("Unknwon error correction level: "+e)}}(this.options.ecl);this.qrcode=new r(i,c),this.qrcode.addData(n),this.qrcode.make()}x.prototype.svg=function(e){var t=this.options||{},n=this.qrcode.modules;"undefined"==typeof e&&(e={container:t.container||"svg"});for(var r="undefined"==typeof t.pretty||!!t.pretty,i=r?" ":"",o=r?"\r\n":"",s=t.width,a=t.height,u=n.length,c=s/(u+2*t.padding),l=a/(u+2*t.padding),h="undefined"!=typeof t.join&&!!t.join,d="undefined"!=typeof t.swap&&!!t.swap,f="undefined"==typeof t.xmlDeclaration||!!t.xmlDeclaration,p="undefined"!=typeof t.predefined&&!!t.predefined,b=p?i+'<defs><path id="qrmodule" d="M0 0 h'+l+" v"+c+' H0 z" style="fill:'+t.color+';shape-rendering:crispEdges;" /></defs>'+o:"",g=i+'<rect x="0" y="0" width="'+s+'" height="'+a+'" style="fill:'+t.background+';shape-rendering:crispEdges;"/>'+o,y="",_="",m=0;m<u;m++)for(var v=0;v<u;v++){if(n[v][m]){var w=v*c+t.padding*c,S=m*l+t.padding*l;if(d){var E=w;w=S,S=E}if(h){var x=c+w,k=l+S;w=Number.isInteger(w)?Number(w):w.toFixed(2),S=Number.isInteger(S)?Number(S):S.toFixed(2),x=Number.isInteger(x)?Number(x):x.toFixed(2),_+="M"+w+","+S+" V"+(k=Number.isInteger(k)?Number(k):k.toFixed(2))+" H"+x+" V"+S+" H"+w+" Z "}else y+=p?i+'<use x="'+w.toString()+'" y="'+S.toString()+'" href="#qrmodule" />'+o:i+'<rect x="'+w.toString()+'" y="'+S.toString()+'" width="'+c+'" height="'+l+'" style="fill:'+t.color+';shape-rendering:crispEdges;"/>'+o}}h&&(y=i+'<path x="0" y="0" style="fill:'+t.color+';shape-rendering:crispEdges;" d="'+_+'" />');let C="";if(void 0!==this.options.image&&this.options.image.svg){const e=s*this.options.image.width/100,t=a*this.options.image.height/100;C+=`<svg x="${s/2-e/2}" y="${a/2-t/2}" width="${e}" height="${t}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,C+=this.options.image.svg+o,C+="</svg>"}var R="";switch(e.container){case"svg":f&&(R+='<?xml version="1.0" standalone="yes"?>'+o),R+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+s+'" height="'+a+'">'+o,R+=b+g+y,R+=C,R+="</svg>";break;case"svg-viewbox":f&&(R+='<?xml version="1.0" standalone="yes"?>'+o),R+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+s+" "+a+'">'+o,R+=b+g+y,R+=C,R+="</svg>";break;case"g":R+='<g width="'+s+'" height="'+a+'">'+o,R+=b+g+y,R+=C,R+="</g>";break;default:R+=(b+g+y+C).replace(/^\s+/,"")}return R},e.exports=x},1287:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=void 0;const i=n(1134),o=r(n(1288));t.Spinner=e=>{var t;const n=null!==(t=e.size)&&void 0!==t?t:64,r=e.color||"#000";return(0,i.h)("div",{class:"-cbwsdk-spinner"},(0,i.h)("style",null,o.default),(0,i.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:n,height:n}},(0,i.h)("circle",{style:{cx:50,cy:50,r:45,stroke:r}})))}},1288:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"},1289:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='.-cbwsdk-css-reset .-cbwsdk-extension-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.5);transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box{display:flex;position:relative;max-width:500px;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top{display:flex;flex-direction:row;background-color:#fff;border-radius:8px;overflow:hidden;min-height:300px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-subtext{margin-top:15px;font-size:12px;line-height:1.5}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-install-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;padding:32px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-install-region button{display:block;border-radius:8px;background-color:#1652f0;color:#fff;width:90%;min-width:fit-content;height:44px;margin-top:16px;font-size:16px;padding-left:16px;padding-right:16px;cursor:pointer;font-weight:500;text-align:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;background-color:#fafbfc}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description{display:flex;flex-direction:row;align-items:center;padding-top:14px;padding-bottom:14px;padding-left:24px;padding-right:32px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-icon-wrapper{display:block;position:relative;width:40px;height:40px;flex-shrink:0;flex-grow:0;border-radius:20px;background-color:#fff;box-shadow:0px 0px 8px rgba(0,0,0,.04),0px 16px 24px rgba(0,0,0,.06)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-icon-wrapper img{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-text{margin-left:16px;flex-grow:1;font-size:13px;line-height:19px;color:#000;align-self:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom{display:flex;flex-direction:row;overflow:hidden;border-radius:8px;background-color:#fff;margin-top:8px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description-region{display:flex;flex-direction:column;justify-content:center;padding:32px;flex-grow:1}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description{font-size:13px;line-height:19px;margin-top:12px;color:#aaa}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description a{font-size:inherit;line-height:inherit;color:#1652f0;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-region{position:relative;flex-shrink:0;display:flex;flex-direction:column;justify-content:center;padding-left:24px;padding-right:24px;padding-top:16px;padding-bottom:16px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-wrapper{position:relative;display:block;padding:8px;border-radius:8px;box-shadow:0px 4px 12px rgba(0,0,0,.1)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-wrapper img{display:block}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting>p{font-size:12px;font-weight:bold;color:#000;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel{position:absolute;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;top:16px;right:16px;width:24px;height:24px;border-radius:12px;background-color:#fafbfc;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::before,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::after{content:"";position:absolute;display:block;top:-1px;left:-7px;width:14px;height:1px;background-color:#000;transition:background-color .2s}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::before{transform:rotate(45deg)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::after{transform:rotate(135deg)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel:hover .-cbwsdk-link-dialog-box-cancel-x-a,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel:hover .-cbwsdk-link-dialog-box-cancel-x-b{background-color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-container-hidden{display:none}.-cbwsdk-css-reset .-cbwsdk-extension-dialog h2{display:block;text-align:left;font-size:22px;font-weight:600;line-height:28px;color:#000}'},1290:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SnackbarInstance=t.SnackbarContainer=t.Snackbar=void 0;const i=r(n(28)),o=n(1134),s=n(1191),a=r(n(1291));t.Snackbar=class{constructor(e){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=e.darkMode}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){const t=this.nextItemKey++;return this.items.set(t,e),this.render(),()=>{this.items.delete(t),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,o.render)((0,o.h)("div",null,(0,o.h)(t.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((e=>{let[n,r]=e;return(0,o.h)(t.SnackbarInstance,Object.assign({},r,{key:n}))})))),this.root)}};t.SnackbarContainer=e=>(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-container")},(0,o.h)("style",null,a.default),(0,o.h)("div",{class:"-cbwsdk-snackbar"},e.children));t.SnackbarInstance=e=>{let{autoExpand:t,message:n,menuItems:r}=e;const[a,u]=(0,s.useState)(!0),[c,l]=(0,s.useState)(null!==t&&void 0!==t&&t);(0,s.useEffect)((()=>{const e=[window.setTimeout((()=>{u(!1)}),1),window.setTimeout((()=>{l(!0)}),1e4)];return()=>{e.forEach(window.clearTimeout)}}));return(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance",a&&"-cbwsdk-snackbar-instance-hidden",c&&"-cbwsdk-snackbar-instance-expanded")},(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{l(!c)}},(0,o.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-cbwsdk-snackbar-instance-header-cblogo"}),(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},n),(0,o.h)("div",{class:"-gear-container"},!c&&(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,o.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),r&&r.length>0&&(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},r.map(((e,t)=>(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:e.onClick,key:t},(0,o.h)("svg",{width:e.svgWidth,height:e.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":e.defaultFillRule,"clip-rule":e.defaultClipRule,d:e.path,fill:"#AAAAAA"})),(0,o.h)("span",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item-info",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},e.info))))))}},1291:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"},1292:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.injectCssReset=void 0;const i=r(n(1293));t.injectCssReset=function(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(e)}},1293:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;bottom:auto;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:block;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;left:auto;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";right:auto;tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;top:auto;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;width:auto;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset *{box-sizing:border-box;display:initial;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'},1294:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKRelay=void 0;const u=a(n(1295)),c=n(1164),l=n(1135),h=n(1159),d=n(1167),f=n(1296),p=n(1300),b=n(1121),g=s(n(1301)),y=n(1168),_=n(1206),m=n(1223),v=n(1302),w=n(1303),S=n(1304),E=n(1305);class x extends _.WalletSDKRelayAbstract{constructor(e){super(),this.accountsCallback=null,this.chainCallback=null,this.appName="",this.appLogoUrl=null,this.subscriptions=new l.Subscription,this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this._session=y.Session.load(e.storage)||new y.Session(e.storage).save(),this.relayEventManager=e.relayEventManager,this.eventListener=e.eventListener,this.connection=new f.WalletSDKConnection(this._session.id,this._session.key,this.linkAPIUrl,this.eventListener),this.subscriptions.add(this.connection.sessionConfig$.subscribe({next:e=>{this.onSessionConfigChanged(e)},error:()=>{var e;null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),this.subscriptions.add(this.connection.incomingEvent$.pipe((0,h.filter)((e=>"Web3Response"===e.event))).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(this.connection.linked$.pipe((0,h.skip)(1),(0,h.tap)((e=>{var t;this.isLinked=e;const n=this.storage.getItem(_.LOCAL_STORAGE_ADDRESSES_KEY);if(e&&(this.session.linked=e),this.isUnlinkedErrorState=!1,n){const r=n.split(" "),i="true"===this.storage.getItem("IsStandaloneSigning");if(""!==r[0]&&!e&&this.session.linked&&!i){this.isUnlinkedErrorState=!0;const e=this.getSessionIdHash();null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:e})}}}))).subscribe()),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,h.filter)((e=>!!e.metadata&&"1"===e.metadata.__destroyed))).subscribe((()=>{var e;const t=this.connection.isDestroyed;return null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:t,sessionIdHash:this.getSessionIdHash()}),this.resetAndReload()}))),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,h.filter)((e=>e.metadata&&void 0!==e.metadata.WalletUsername))).pipe((0,h.mergeMap)((e=>g.decrypt(e.metadata.WalletUsername,this._session.secret)))).subscribe({next:e=>{this.storage.setItem(_.WALLET_USER_NAME_KEY,e)},error:()=>{var e;null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,h.filter)((e=>e.metadata&&void 0!==e.metadata.AppVersion))).pipe((0,h.mergeMap)((e=>g.decrypt(e.metadata.AppVersion,this._session.secret)))).subscribe({next:e=>{this.storage.setItem(_.APP_VERSION_KEY,e)},error:()=>{var e;null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,h.filter)((e=>e.metadata&&void 0!==e.metadata.ChainId&&void 0!==e.metadata.JsonRpcUrl))).pipe((0,h.mergeMap)((e=>(0,l.zip)(g.decrypt(e.metadata.ChainId,this._session.secret),g.decrypt(e.metadata.JsonRpcUrl,this._session.secret))))).pipe((0,h.distinctUntilChanged)()).subscribe({next:e=>{let[t,n]=e;this.chainCallback&&this.chainCallback(t,n)},error:()=>{var e;null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,h.filter)((e=>e.metadata&&void 0!==e.metadata.EthereumAddress))).pipe((0,h.mergeMap)((e=>g.decrypt(e.metadata.EthereumAddress,this._session.secret)))).subscribe({next:e=>{this.accountsCallback&&this.accountsCallback([e]),x.accountRequestCallbackIds.size>0&&(Array.from(x.accountRequestCallbackIds.values()).forEach((t=>{const n=(0,E.Web3ResponseMessage)({id:t,response:(0,S.RequestEthereumAccountsResponse)([e])});this.invokeCallback(Object.assign(Object.assign({},n),{id:t}))})),x.accountRequestCallbackIds.clear())},error:()=>{var e;null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}})),this.ui=e.uiConstructor({linkAPIUrl:e.linkAPIUrl,version:e.version,darkMode:e.darkMode,session:this._session,connected$:this.connection.connected$}),this.connection.connect()}attachUI(){this.ui.attach()}resetAndReload(){this.connection.setSessionMetadata("__destroyed","1").pipe((0,h.timeout)(1e3),(0,h.catchError)((e=>(0,l.of)(null)))).subscribe((e=>{var t,n,r;try{this.subscriptions.unsubscribe()}catch(o){null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(n=this.eventListener)||void 0===n||n.onEvent(d.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const i=y.Session.load(this.storage);(null===i||void 0===i?void 0:i.id)===this._session.id?this.storage.clear():i&&(null===(r=this.eventListener)||void 0===r||r.onEvent(d.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:y.Session.hash(i.id)})),this.ui.reloadUI()}),(e=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${e}`,sessionIdHash:this.getSessionIdHash()})}))}setAppInfo(e,t){this.appName=e,this.appLogoUrl=t}getStorageItem(e){return this.storage.getItem(e)}get session(){return this._session}setStorageItem(e,t){this.storage.setItem(e,t)}signEthereumMessage(e,t,n,r){return this.sendRequest({method:m.Web3Method.signEthereumMessage,params:{message:(0,b.hexStringFromBuffer)(e,!0),address:t,addPrefix:n,typedDataJson:r||null}})}ethereumAddressFromSignedMessage(e,t,n){return this.sendRequest({method:m.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,b.hexStringFromBuffer)(e,!0),signature:(0,b.hexStringFromBuffer)(t,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:m.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,b.bigIntStringFromBN)(e.weiValue),data:(0,b.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,b.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,b.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,b.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,b.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:m.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,b.bigIntStringFromBN)(e.weiValue),data:(0,b.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,b.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,b.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,b.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,b.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:m.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,b.hexStringFromBuffer)(e,!0),chainId:t}})}scanQRCode(e){return this.sendRequest({method:m.Web3Method.scanQRCode,params:{regExp:e}})}getQRCodeUrl(){return(0,b.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1)}genericRequest(e,t){return this.sendRequest({method:m.Web3Method.generic,params:{action:t,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let t=null;const n=(0,b.randomBytesHex)(8),r=r=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,r),null===t||void 0===t||t()};return{promise:new Promise(((i,o)=>{this.ui.isStandalone()||(t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,(e=>{if(null===t||void 0===t||t(),e.errorMessage)return o(new Error(e.errorMessage));i(e)})),this.ui.isStandalone()?this.sendRequestStandalone(n,e):this.publishWeb3RequestEvent(n,e)})),cancel:r}}setConnectDisabled(e){this.ui.setConnectDisabled(e)}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}publishWeb3RequestEvent(e,t){var n;const r=(0,w.Web3RequestMessage)({id:e,request:t}),i=y.Session.load(this.storage);null===(n=this.eventListener)||void 0===n||n.onEvent(d.EVENTS.WEB3_REQUEST,{eventId:r.id,method:`relay::${r.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?y.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",r,!0).subscribe({next:e=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:r.id,method:`relay::${r.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?y.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==this._session.id).toString()})},error:e=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:r.id,response:{method:r.request.method,errorMessage:e.message}}))}}))}publishWeb3RequestCanceledEvent(e){const t=(0,v.Web3RequestCanceledMessage)(e);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",t,!1).subscribe())}publishEvent(e,t,n){const r=this.session.secret;return new l.Observable((e=>{g.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin})),r).then((t=>{e.next(t),e.complete()}))})).pipe((0,h.mergeMap)((t=>this.connection.publishEvent(e,t,n))))}handleIncomingEvent(e){try{this.subscriptions.add(g.decrypt(e.data,this.session.secret).pipe((0,h.map)((e=>JSON.parse(e)))).subscribe({next:e=>{const t=(0,E.isWeb3ResponseMessage)(e)?e:null;t&&this.handleWeb3ResponseMessage(t)},error:()=>{var e;null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(t){return}}handleWeb3ResponseMessage(e){var t;const{response:n}=e;if(null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.WEB3_RESPONSE,{eventId:e.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),(0,S.isRequestEthereumAccountsResponse)(n))return x.accountRequestCallbackIds.forEach((t=>this.invokeCallback(Object.assign(Object.assign({},e),{id:t})))),void x.accountRequestCallbackIds.clear();this.invokeCallback(e)}handleErrorResponse(e,t,n,r){this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:e,response:(0,S.ErrorResponse)(t,(null!==n&&void 0!==n?n:p.WalletUIError.UserRejectedRequest).message,r)}))}invokeCallback(e){const t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){const e={method:m.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},t=(0,b.randomBytesHex)(8),n=n=>{this.publishWeb3RequestCanceledEvent(t),this.handleErrorResponse(t,e.method,n)};return{promise:new Promise(((r,i)=>{var o;this.relayEventManager.callbacks.set(t,(e=>{if(this.ui.hideRequestEthereumAccounts(),e.errorMessage)return i(new Error(e.errorMessage));r(e)}));const s=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)||null;if(s&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(s))window.location.href=`https://go.cb-w.com/xoXnYwQimhb?cb_url=${encodeURIComponent(window.location.href)}`;else{if(this.ui.inlineAccountsResponse()){const e=e=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:t,response:(0,S.RequestEthereumAccountsResponse)(e)}))};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:e})}else this.ui.requestEthereumAccounts({onCancel:n});x.accountRequestCallbackIds.add(t),this.ui.inlineAccountsResponse()||this.ui.isStandalone()||this.publishWeb3RequestEvent(t,e)}})),cancel:n}}watchAsset(e,t,n,r,i,o){const s={method:m.Web3Method.watchAsset,params:{type:e,options:{address:t,symbol:n,decimals:r,image:i},chainId:o}};let a=null;const u=(0,b.randomBytesHex)(8),c=e=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,s.method,e),null===a||void 0===a||a()};this.ui.inlineWatchAsset()||(a=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload}));return{cancel:c,promise:new Promise(((c,l)=>{this.relayEventManager.callbacks.set(u,(e=>{if(null===a||void 0===a||a(),e.errorMessage)return l(new Error(e.errorMessage));c(e)}));const h=e=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:u,response:(0,S.WatchAssetReponse)(!1)}))},d=()=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:u,response:(0,S.WatchAssetReponse)(!0)}))};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:d,onCancel:h,type:e,address:t,symbol:n,decimals:r,image:i,chainId:o}),this.ui.inlineWatchAsset()||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,s)}))}}addEthereumChain(e,t,n,r,i,o){const s={method:m.Web3Method.addEthereumChain,params:{chainId:e,rpcUrls:t,blockExplorerUrls:r,chainName:i,iconUrls:n,nativeCurrency:o}};let a=null;const u=(0,b.randomBytesHex)(8),c=e=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,s.method,e),null===a||void 0===a||a()};this.ui.inlineAddEthereumChain(e)||(a=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload}));return{promise:new Promise(((t,n)=>{this.relayEventManager.callbacks.set(u,(e=>{if(null===a||void 0===a||a(),e.errorMessage)return n(new Error(e.errorMessage));t(e)}));const r=e=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:u,response:(0,S.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},i=e=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:u,response:(0,S.AddEthereumChainResponse)({isApproved:!0,rpcUrl:e})}))};this.ui.inlineAddEthereumChain(e)&&this.ui.addEthereumChain({onCancel:r,onApprove:i,chainId:s.params.chainId,rpcUrls:s.params.rpcUrls,blockExplorerUrls:s.params.blockExplorerUrls,chainName:s.params.chainName,iconUrls:s.params.iconUrls,nativeCurrency:s.params.nativeCurrency}),this.ui.inlineAddEthereumChain(e)||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,s)})),cancel:c}}switchEthereumChain(e){const t={method:m.Web3Method.switchEthereumChain,params:{chainId:e}};let n=null;const r=(0,b.randomBytesHex)(8),i=e=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,t.method,e),null===n||void 0===n||n()};this.ui.inlineSwitchEthereumChain()||(n=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload}));return{promise:new Promise(((e,i)=>{this.relayEventManager.callbacks.set(r,(t=>(null===n||void 0===n||n(),t.errorMessage&&t.errorCode?i(c.ethErrors.provider.custom({code:t.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):t.errorMessage?i(new Error(t.errorMessage)):void e(t))));this.ui.switchEthereumChain({onCancel:e=>{if("number"===typeof e){const t=e;this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:r,response:(0,S.ErrorResponse)(m.Web3Method.switchEthereumChain,p.WalletUIError.SwitchEthereumChainUnsupportedChainId.message,t)}))}else e instanceof p.WalletUIError?this.handleErrorResponse(r,m.Web3Method.switchEthereumChain,e,e.errorCode):this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:r,response:(0,S.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:e=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:r,response:(0,S.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:e})}))},chainId:t.params.chainId}),this.ui.inlineSwitchEthereumChain()||this.ui.isStandalone()||this.publishWeb3RequestEvent(r,t)})),cancel:i}}inlineAddEthereumChain(e){return this.ui.inlineAddEthereumChain(e)}getSessionIdHash(){return y.Session.hash(this._session.id)}sendRequestStandalone(e,t){const n=n=>{this.handleErrorResponse(e,t.method,n)},r=t=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:e,response:t}))};switch(t.method){case m.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:t,onSuccess:r,onCancel:n});break;case m.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:t,onSuccess:r,onCancel:n});break;case m.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:t,onSuccess:r,onCancel:n});break;case m.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:t,onSuccess:r});break;default:n()}}onSessionConfigChanged(e){}}x.accountRequestCallbackIds=new Set,o([u.default],x.prototype,"resetAndReload",null),o([u.default],x.prototype,"handleIncomingEvent",null),t.WalletSDKRelay=x},1295:function(e,t,n){"use strict";var r;function i(e,t,n){if(!n||typeof n.value!==r.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+t+"> is not a method!");return{configurable:r.boolTrue,get:function(){var e=n.value.bind(this);return Object.defineProperty(this,t,{value:e,configurable:r.boolTrue,writable:r.boolTrue}),e}}}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.typeOfFunction="function",e.boolTrue=!0}(r||(r={})),t.bind=i,t.default=i},1296:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKConnection=void 0;const r=n(1135),i=n(1159),o=n(1168),s=n(1185),a=n(1297),u=n(1167),c=n(1298),l=n(1299);t.WalletSDKConnection=class{constructor(e,t,n,a){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:WebSocket;this.sessionId=e,this.sessionKey=t,this.eventListener=a,this.subscriptions=new r.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,s.IntNumber)(1),this.connectedSubject=new r.BehaviorSubject(!1),this.linkedSubject=new r.BehaviorSubject(!1),this.sessionConfigSubject=new r.ReplaySubject(1);const h=new c.RxWebSocket(n+"/rpc",l);this.ws=h,this.subscriptions.add(h.connectionState$.pipe((0,i.tap)((t=>{var n;return null===(n=this.eventListener)||void 0===n?void 0:n.onEvent(u.EVENTS.CONNECTED_STATE_CHANGE,{state:t,sessionIdHash:o.Session.hash(e)})})),(0,i.skip)(1),(0,i.filter)((e=>e===c.ConnectionState.DISCONNECTED&&!this.destroyed)),(0,i.delay)(5e3),(0,i.filter)((e=>!this.destroyed)),(0,i.flatMap)((e=>h.connect())),(0,i.retry)()).subscribe()),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(2),(0,i.switchMap)((e=>(0,r.iif)((()=>e===c.ConnectionState.CONNECTED),this.authenticate().pipe((0,i.tap)((e=>this.sendIsLinked())),(0,i.tap)((e=>this.sendGetSessionConfig())),(0,i.map)((e=>!0))),(0,r.of)(!1)))),(0,i.distinctUntilChanged)(),(0,i.catchError)((e=>(0,r.of)(!1)))).subscribe((e=>this.connectedSubject.next(e)))),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(1),(0,i.switchMap)((e=>(0,r.iif)((()=>e===c.ConnectionState.CONNECTED),(0,r.timer)(0,1e4))))).subscribe((e=>0===e?this.updateLastHeartbeat():this.heartbeat()))),this.subscriptions.add(h.incomingData$.pipe((0,i.filter)((e=>"h"===e))).subscribe((e=>this.updateLastHeartbeat()))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((e=>["IsLinkedOK","Linked"].includes(e.type)))).subscribe((t=>{var n;const r=t;null===(n=this.eventListener)||void 0===n||n.onEvent(u.EVENTS.LINKED,{sessionIdHash:o.Session.hash(e),linked:r.linked,type:t.type,onlineGuests:r.onlineGuests}),this.linkedSubject.next(r.linked||r.onlineGuests>0)}))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((e=>["GetSessionConfigOK","SessionConfigUpdated"].includes(e.type)))).subscribe((t=>{var n;const r=t;null===(n=this.eventListener)||void 0===n||n.onEvent(u.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:o.Session.hash(e),metadata_keys:r&&r.metadata?Object.keys(r.metadata):void 0}),this.sessionConfigSubject.next({webhookId:r.webhookId,webhookUrl:r.webhookUrl,metadata:r.metadata})})))}connect(){var e;if(this.destroyed)throw new Error("instance is destroyed");null===(e=this.eventListener)||void 0===e||e.onEvent(u.EVENTS.STARTED_CONNECTING,{sessionIdHash:o.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){var e;this.subscriptions.unsubscribe(),this.ws.disconnect(),null===(e=this.eventListener)||void 0===e||e.onEvent(u.EVENTS.DISCONNECTED,{sessionIdHash:o.Session.hash(this.sessionId)}),this.destroyed=!0}get isDestroyed(){return this.destroyed}get connected$(){return this.connectedSubject.asObservable()}get onceConnected$(){return this.connected$.pipe((0,i.filter)((e=>e)),(0,i.take)(1),(0,i.map)((()=>{})))}get linked$(){return this.linkedSubject.asObservable()}get onceLinked$(){return this.linked$.pipe((0,i.filter)((e=>e)),(0,i.take)(1),(0,i.map)((()=>{})))}get sessionConfig$(){return this.sessionConfigSubject.asObservable()}get incomingEvent$(){return this.ws.incomingJSONData$.pipe((0,i.filter)((e=>{if("Event"!==e.type)return!1;const t=e;return"string"===typeof t.sessionId&&"string"===typeof t.eventId&&"string"===typeof t.event&&"string"===typeof t.data})),(0,i.map)((e=>e)))}setSessionMetadata(e,t){const n=(0,a.ClientMessageSetSessionConfig)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:{[e]:t}});return this.onceConnected$.pipe((0,i.flatMap)((e=>this.makeRequest(n))),(0,i.map)((e=>{if((0,l.isServerMessageFail)(e))throw new Error(e.error||"failed to set session metadata")})))}publishEvent(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=(0,a.ClientMessagePublishEvent)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:e,data:t,callWebhook:n});return this.onceLinked$.pipe((0,i.flatMap)((e=>this.makeRequest(r))),(0,i.map)((e=>{if((0,l.isServerMessageFail)(e))throw new Error(e.error||"failed to publish event");return e.eventId})))}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(e){}}makeRequest(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4;const n=e.id;try{this.sendData(e)}catch(o){return(0,r.throwError)(o)}return this.ws.incomingJSONData$.pipe((0,i.timeoutWith)(t,(0,r.throwError)(new Error(`request ${n} timed out`))),(0,i.filter)((e=>e.id===n)),(0,i.take)(1))}authenticate(){const e=(0,a.ClientMessageHostSession)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(e).pipe((0,i.map)((e=>{if((0,l.isServerMessageFail)(e))throw new Error(e.error||"failed to authentcate")})))}sendIsLinked(){const e=(0,a.ClientMessageIsLinked)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}sendGetSessionConfig(){const e=(0,a.ClientMessageGetSessionConfig)({id:(0,s.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}}},1297:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientMessagePublishEvent=t.ClientMessageSetSessionConfig=t.ClientMessageGetSessionConfig=t.ClientMessageIsLinked=t.ClientMessageHostSession=void 0,t.ClientMessageHostSession=function(e){return Object.assign({type:"HostSession"},e)},t.ClientMessageIsLinked=function(e){return Object.assign({type:"IsLinked"},e)},t.ClientMessageGetSessionConfig=function(e){return Object.assign({type:"GetSessionConfig"},e)},t.ClientMessageSetSessionConfig=function(e){return Object.assign({type:"SetSessionConfig"},e)},t.ClientMessagePublishEvent=function(e){return Object.assign({type:"PublishEvent"},e)}},1298:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RxWebSocket=t.ConnectionState=void 0;const r=n(1135),i=n(1159);var o;!function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"}(o=t.ConnectionState||(t.ConnectionState={}));t.RxWebSocket=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WebSocket;this.WebSocketClass=t,this.webSocket=null,this.connectionStateSubject=new r.BehaviorSubject(o.DISCONNECTED),this.incomingDataSubject=new r.Subject,this.url=e.replace(/^http/,"ws")}connect(){return this.webSocket?(0,r.throwError)(new Error("webSocket object is not null")):new r.Observable((e=>{let t;try{this.webSocket=t=new this.WebSocketClass(this.url)}catch(n){return void e.error(n)}this.connectionStateSubject.next(o.CONNECTING),t.onclose=t=>{this.clearWebSocket(),e.error(new Error(`websocket error ${t.code}: ${t.reason}`)),this.connectionStateSubject.next(o.DISCONNECTED)},t.onopen=t=>{e.next(),e.complete(),this.connectionStateSubject.next(o.CONNECTED)},t.onmessage=e=>{this.incomingDataSubject.next(e.data)}})).pipe((0,i.take)(1))}disconnect(){const{webSocket:e}=this;if(e){this.clearWebSocket(),this.connectionStateSubject.next(o.DISCONNECTED);try{e.close()}catch(t){}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe((0,i.flatMap)((e=>{let t;try{t=JSON.parse(e)}catch(n){return(0,r.empty)()}return(0,r.of)(t)})))}sendData(e){const{webSocket:t}=this;if(!t)throw new Error("websocket is not connected");t.send(e)}clearWebSocket(){const{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}},1299:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isServerMessageFail=void 0,t.isServerMessageFail=function(e){return e&&"Fail"===e.type&&"number"===typeof e.id&&"string"===typeof e.sessionId&&"string"===typeof e.error}},1300:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletUIError=void 0;class r extends Error{constructor(e,t){super(e),this.message=e,this.errorCode=t}}t.WalletUIError=r,r.UserRejectedRequest=new r("User rejected request"),r.SwitchEthereumChainUnsupportedChainId=new r("Unsupported chainId",4902)},1301:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=void 0;const r=n(1135),i=n(1121);t.encrypt=async function(e,t){if(64!==t.length)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.importKey("raw",(0,i.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=new TextEncoder,s=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},r,o.encode(e)),a=s.slice(s.byteLength-16),u=s.slice(0,s.byteLength-16),c=new Uint8Array(a),l=new Uint8Array(u),h=new Uint8Array([...n,...c,...l]);return(0,i.uint8ArrayToHex)(h)},t.decrypt=function(e,t){if(64!==t.length)throw Error("secret must be 256 bits");return new r.Observable((n=>{!async function(){const r=await crypto.subtle.importKey("raw",(0,i.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,i.hexStringToUint8Array)(e),s=o.slice(0,12),a=o.slice(12,28),u=o.slice(28),c=new Uint8Array([...u,...a]),l={name:"AES-GCM",iv:new Uint8Array(s)};try{const e=await window.crypto.subtle.decrypt(l,r,c),t=new TextDecoder;n.next(t.decode(e)),n.complete()}catch(h){n.error(h)}}()}))}},1302:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestCanceledMessage=void 0;const r=n(1192);t.Web3RequestCanceledMessage=function(e){return{type:r.RelayMessageType.WEB3_REQUEST_CANCELED,id:e}}},1303:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestMessage=void 0;const r=n(1192);t.Web3RequestMessage=function(e){return Object.assign({type:r.RelayMessageType.WEB3_REQUEST},e)}},1304:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumAddressFromSignedMessageResponse=t.SubmitEthereumTransactionResponse=t.SignEthereumTransactionResponse=t.SignEthereumMessageResponse=t.isRequestEthereumAccountsResponse=t.WatchAssetReponse=t.RequestEthereumAccountsResponse=t.SwitchEthereumChainResponse=t.AddEthereumChainResponse=t.ErrorResponse=void 0;const r=n(1223);t.ErrorResponse=function(e,t,n){return{method:e,errorMessage:t,errorCode:n}},t.AddEthereumChainResponse=function(e){return{method:r.Web3Method.addEthereumChain,result:e}},t.SwitchEthereumChainResponse=function(e){return{method:r.Web3Method.switchEthereumChain,result:e}},t.RequestEthereumAccountsResponse=function(e){return{method:r.Web3Method.requestEthereumAccounts,result:e}},t.WatchAssetReponse=function(e){return{method:r.Web3Method.watchAsset,result:e}},t.isRequestEthereumAccountsResponse=function(e){return e&&e.method===r.Web3Method.requestEthereumAccounts},t.SignEthereumMessageResponse=function(e){return{method:r.Web3Method.signEthereumMessage,result:e}},t.SignEthereumTransactionResponse=function(e){return{method:r.Web3Method.signEthereumTransaction,result:e}},t.SubmitEthereumTransactionResponse=function(e){return{method:r.Web3Method.submitEthereumTransaction,result:e}},t.EthereumAddressFromSignedMessageResponse=function(e){return{method:r.Web3Method.ethereumAddressFromSignedMessage,result:e}}},1305:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWeb3ResponseMessage=t.Web3ResponseMessage=void 0;const r=n(1192);t.Web3ResponseMessage=function(e){return Object.assign({type:r.RelayMessageType.WEB3_RESPONSE},e)},t.isWeb3ResponseMessage=function(e){return e&&e.type===r.RelayMessageType.WEB3_RESPONSE}},1306:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKRelayEventManager=void 0;const r=n(1121);t.WalletSDKRelayEventManager=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,t=(0,r.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}},1307:function(e){e.exports=JSON.parse('{"name":"@coinbase/wallet-sdk","version":"3.1.0","description":"Coinbase Wallet JavaScript SDK","keywords":["cipher","cipherbrowser","coinbase","coinbasewallet","eth","ether","ethereum","etherium","injection","toshi","wallet","walletlink","web3"],"main":"dist/index.js","types":"dist/index.d.ts","repository":"https://github.com/coinbase/coinbase-wallet-sdk.git","author":"Coinbase, Inc.","license":"Apache-2.0","scripts":{"pretest:unit":"node compile-assets.js","test:unit":"jest","test:unit:coverage":"yarn test:unit && open coverage/lcov-report/index.html","test:karma":"yarn build-npm && karma start","prebuild":"node -p \\"\'export const LIB_VERSION = \' + JSON.stringify(require(\'./package.json\').version) + \';\'\\" > src/version.ts","build":"node compile-assets.js && webpack --config webpack.config.js","build-npm":"tsc -p ./tsconfig.build.json","build:dev":"export LINK_API_URL=\'http://localhost:3000\'; yarn build","build:dev:watch":"nodemon -e \'ts,tsx,js,json,css,scss,svg\' --ignore \'src/**/*-css.ts\' --ignore \'src/**/*-svg.ts\' --watch src/ --exec \'yarn build:dev\'","build:prod":"yarn prebuild && yarn build && yarn build-npm && cp ./package.json ./README.md ./LICENSE build/npm && cp -a src/vendor-js build/npm/dist && sed -i.bak \'s| \\"private\\": true,||g\' build/npm/package.json && rm -f build/npm/package.json.bak","lint:types":"tsc --noEmit","lint:prettier":"prettier --check \\"{src,__tests__}/**/*.(js|ts|tsx)\\"","lint:eslint":"eslint ./src --ext .ts,.tsx","fix:eslint":"yarn lint:eslint --fix","fix:prettier":"prettier . --write","release":"./scripts/release.sh"},"dependencies":{"@metamask/safe-event-emitter":"2.0.0","bind-decorator":"^1.0.11","bn.js":"^5.1.1","clsx":"^1.1.0","eth-block-tracker":"4.4.3","eth-json-rpc-filters":"4.2.2","eth-rpc-errors":"4.0.2","js-sha256":"0.9.0","json-rpc-engine":"6.1.0","keccak":"^3.0.1","preact":"^10.5.9","qs":"^6.10.3","rxjs":"^6.6.3","stream-browserify":"^3.0.0"},"devDependencies":{"@babel/core":"^7.17.9","@babel/plugin-proposal-decorators":"^7.17.9","@babel/plugin-transform-react-jsx":"^7.17.3","@babel/preset-env":"^7.16.11","@babel/preset-typescript":"^7.16.7","@peculiar/webcrypto":"^1.3.3","@testing-library/jest-dom":"^5.16.4","@testing-library/preact":"^2.0.1","@types/bn.js":"^4.11.6","@types/jest":"^27.4.1","@types/node":"^14.14.20","@types/qs":"^6.9.7","@typescript-eslint/eslint-plugin":"^5.7.0","@typescript-eslint/eslint-plugin-tslint":"^5.7.0","@typescript-eslint/parser":"^5.7.0","babel-jest":"^27.5.1","browserify":"17.0.0","copy-webpack-plugin":"^6.4.1","core-js":"^3.8.2","eslint":"^8.4.1","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.25.3","eslint-plugin-preact":"^0.1.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-simple-import-sort":"^7.0.0","jasmine":"3.8.0","jest":"^27.5.1","jest-chrome":"^0.7.2","karma":"^6.3.15","karma-browserify":"8.1.0","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^4.0.1","nodemon":"^2.0.6","prettier":"^2.5.1","raw-loader":"^4.0.2","regenerator-runtime":"^0.13.7","sass":"^1.50.0","svgo":"^2.8.0","ts-jest":"^27.1.4","ts-loader":"^8.0.13","ts-node":"^10.7.0","tslib":"^2.0.3","typescript":"^4.1.3","watchify":"4.0.0","webpack":"^5.72.0","webpack-cli":"^4.9.2","whatwg-fetch":"^3.5.0"},"engines":{"node":">= 10.0.0"},"_resolved":"https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-3.1.0.tgz","_integrity":"sha512-8IGfVklv/CMfCT4qd9KfL0IwlINsIgSlW1oQB/or8uSY9wAqoY8lIoQVpOyFx7YDK094Xfd9alhulZtRZNJBjw==","_from":"@coinbase/wallet-sdk@3.1.0"}')},1333:function(e,t,n){"use strict";n.r(t),n.d(t,"Mutex",(function(){return s})),n.d(t,"Semaphore",(function(){return o})),n.d(t,"withTimeout",(function(){return a}));function r(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}Object.create;Object.create;var o=function(){function e(e){if(this._maxConcurrency=e,this._queue=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}return e.prototype.acquire=function(){var e=this,t=this.isLocked(),n=new Promise((function(t){return e._queue.push(t)}));return t||this._dispatch(),n},e.prototype.runExclusive=function(e){return r(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.acquire()];case 1:t=i.sent(),n=t[0],r=t[1],i.label=2;case 2:return i.trys.push([2,,4,5]),[4,e(n)];case 3:return[2,i.sent()];case 4:return r(),[7];case 5:return[2]}}))}))},e.prototype.isLocked=function(){return this._value<=0},e.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var e=this._currentReleaser;this._currentReleaser=void 0,e()}},e.prototype._dispatch=function(){var e=this,t=this._queue.shift();if(t){var n=!1;this._currentReleaser=function(){n||(n=!0,e._value++,e._dispatch())},t([this._value--,this._currentReleaser])}},e}(),s=function(){function e(){this._semaphore=new o(1)}return e.prototype.acquire=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this._semaphore.acquire()];case 1:return e=t.sent(),[2,e[1]]}}))}))},e.prototype.runExclusive=function(e){return this._semaphore.runExclusive((function(){return e()}))},e.prototype.isLocked=function(){return this._semaphore.isLocked()},e.prototype.release=function(){this._semaphore.release()},e}();function a(e,t,n){var o=this;return void 0===n&&(n=new Error("timeout")),{acquire:function(){return new Promise((function(s,a){return r(o,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return r=!1,setTimeout((function(){r=!0,a(n)}),t),[4,e.acquire()];case 1:return o=i.sent(),r?(Array.isArray(o)?o[1]:o)():s(o),[2]}}))}))}))},runExclusive:function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:t=function(){},r.label=1;case 1:return r.trys.push([1,,7,8]),[4,this.acquire()];case 2:return n=r.sent(),Array.isArray(n)?(t=n[1],[4,e(n[0])]):[3,4];case 3:return[2,r.sent()];case 4:return t=n,[4,e()];case 5:return[2,r.sent()];case 6:return[3,8];case 7:return t(),[7];case 8:return[2]}}))}))},release:function(){e.release()},isLocked:function(){return e.isLocked()}}}}}]);
3
- //# sourceMappingURL=3.b22ae47b.chunk.js.map