@depay/widgets 10.2.13 → 10.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.bundle.js +2 -2
- package/dist/esm/index.js +14 -7
- package/dist/umd/index.bundle.js +2 -2
- package/dist/umd/index.js +14 -7
- package/package.json +3 -3
package/dist/esm/index.bundle.js
CHANGED
|
@@ -111,7 +111,7 @@ var r=n(129),i=n(130),o=n(131);function a(){return u.TYPED_ARRAY_SUPPORT?2147483
|
|
|
111
111
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
112
112
|
var r=n(19),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createQrUrl=e.getFavicon=e.range=e.isBigNumber=e.ensureParsedJSONObject=e.ensureBN=e.ensureRegExpString=e.ensureIntNumber=e.ensureBuffer=e.ensureAddressString=e.ensureEvenLengthHexString=e.ensureHexString=e.isHexString=e.prepend0x=e.strip0x=e.has0xPrefix=e.hexStringFromIntNumber=e.intNumberFromHexString=e.bigIntStringFromBN=e.hexStringFromBuffer=e.hexStringToUint8Array=e.uint8ArrayToHex=e.randomBytesHex=void 0;const i=r(n(66)),o=n(140),a=n(68),s=/^[0-9]*$/,u=/^[a-f0-9]*$/;function c(t){return[...t].map((t=>t.toString(16).padStart(2,"0"))).join("")}function l(t){return t.startsWith("0x")||t.startsWith("0X")}function h(t){return l(t)?t.slice(2):t}function d(t){return l(t)?"0x"+t.slice(2):"0x"+t}function f(t){if("string"!=typeof t)return!1;const e=h(t).toLowerCase();return u.test(e)}function p(t,e=!1){if("string"==typeof t){const n=h(t).toLowerCase();if(u.test(n))return(0,a.HexString)(e?"0x"+n:n)}throw new Error(`"${String(t)}" is not a hexadecimal string`)}function m(t,e=!1){let n=p(t,!1);return n.length%2==1&&(n=(0,a.HexString)("0"+n)),e?(0,a.HexString)("0x"+n):n}function g(t){if("number"==typeof t&&Number.isInteger(t))return(0,a.IntNumber)(t);if("string"==typeof t){if(s.test(t))return(0,a.IntNumber)(Number(t));if(f(t))return(0,a.IntNumber)(new i.default(m(t,!1),16).toNumber())}throw new Error("Not an integer: "+String(t))}function y(t){if(null==t||"function"!=typeof t.constructor)return!1;const{constructor:e}=t;return"function"==typeof e.config&&"number"==typeof e.EUCLID}e.randomBytesHex=function(t){return c(crypto.getRandomValues(new Uint8Array(t)))},e.uint8ArrayToHex=c,e.hexStringToUint8Array=function(t){return new Uint8Array(t.match(/.{1,2}/g).map((t=>parseInt(t,16))))},e.hexStringFromBuffer=function(t,e=!1){const n=t.toString("hex");return(0,a.HexString)(e?"0x"+n:n)},e.bigIntStringFromBN=function(t){return(0,a.BigIntString)(t.toString(10))},e.intNumberFromHexString=function(t){return(0,a.IntNumber)(new i.default(m(t,!1),16).toNumber())},e.hexStringFromIntNumber=function(t){return(0,a.HexString)("0x"+new i.default(t).toString(16))},e.has0xPrefix=l,e.strip0x=h,e.prepend0x=d,e.isHexString=f,e.ensureHexString=p,e.ensureEvenLengthHexString=m,e.ensureAddressString=function(t){if("string"==typeof t){const e=h(t).toLowerCase();if(f(e)&&40===e.length)return(0,a.AddressString)(d(e))}throw new Error("Invalid Ethereum address: "+String(t))},e.ensureBuffer=function(e){if(t.isBuffer(e))return e;if("string"==typeof e){if(f(e)){const n=m(e,!1);return t.from(n,"hex")}return t.from(e,"utf8")}throw new Error("Not binary data: "+String(e))},e.ensureIntNumber=g,e.ensureRegExpString=function(t){if(t instanceof RegExp)return(0,a.RegExpString)(t.toString());throw new Error("Not a RegExp: "+String(t))},e.ensureBN=function(t){if(null!==t&&(i.default.isBN(t)||y(t)))return new i.default(t.toString(10),10);if("number"==typeof t)return new i.default(g(t));if("string"==typeof t){if(s.test(t))return new i.default(t,10);if(f(t))return new i.default(m(t,!1),16)}throw new Error("Not an integer: "+String(t))},e.ensureParsedJSONObject=function(t){if("string"==typeof t)return JSON.parse(t);if("object"==typeof t)return t;throw new Error("Not a JSON string or an object: "+String(t))},e.isBigNumber=y,e.range=function(t,e){return Array.from({length:e-t},((e,n)=>t+n))},e.getFavicon=function(){const t=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:n}=document.location,r=t?t.getAttribute("href"):null;return!r||r.startsWith("javascript:")?null:r.startsWith("http://")||r.startsWith("https://")||r.startsWith("data:")?r:r.startsWith("//")?e+r:`${e}//${n}${r}`},e.createQrUrl=function(t,e,n,r){const i=r?"parent-id":"id";return`${n}/#/link?${(0,o.stringify)({[i]:t,secret:e,server:n,v:"1"})}`}}).call(this,n(19).Buffer)},function(t,e,n){n.d(e,"a",(function(){return a}));var r=n(10),i=n(29),o=n(58);function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(r.a)(n)?(t.pop(),Object(o.a)(t,n)):Object(i.a)(t)}},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,h=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&f())}function f(){if(!l){var t=s(d);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||l||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var r=n(15);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)}function o(t){return 0===t.length?r.a:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}},function(t,e,n){n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return l}));var r=n(0),i=1,o=Promise.resolve(),a={};function s(t){return t in a&&(delete a[t],!0)}var u=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.a(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=function(t){var e=i++;return a[e]=!0,o.then((function(){return s(e)&&t()})),e}(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(function(t){s(t)}(n),e.scheduled=void 0)},e}(n(32).a),c=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(n(30).a))(u),l=c},function(t,e,n){n.d(e,"a",(function(){return r}));var r="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}()},function(t,e,n){var r=n(37).Buffer;function i(t,e){this._block=r.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=r.from(t,e));for(var n=this._block,i=this._blockSize,o=t.length,a=this._len,s=0;s<o;){for(var u=a%i,c=Math.min(o-s,i-u),l=0;l<c;l++)n[u+l]=t[s+l];s+=c,(a+=c)%i==0&&this._update(n)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,n){var r={};function i(t,e,n){n||(n=Error);var i=function(t){var n,r;function i(n,r,i){return t.call(this,function(t,n,r){return"string"==typeof e?e:e(t,n,r)}(n,r,i))||this}return r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=t,r[t]=i}function o(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,n){var r,i,a;if("string"==typeof e&&(i="not ",e.substr(0,i.length)===i)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))a="The ".concat(t," ").concat(r," ").concat(o(e,"type"));else{var s=function(t,e,n){return"number"!=typeof n&&(n=0),!(n+".".length>t.length)&&-1!==t.indexOf(".",n)}(t)?"property":"argument";a='The "'.concat(t,'" ').concat(s," ").concat(r," ").concat(o(e,"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(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" 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(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},function(t,e,n){(function(e){var r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=c;var i=n(110),o=n(114);n(24)(c,i);for(var a=r(o.prototype),s=0;s<a.length;s++){var u=a[s];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.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(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,n(40))},function(t,e,n){n.r(e),n.d(e,"Observable",(function(){return r.a})),n.d(e,"ConnectableObservable",(function(){return i.a})),n.d(e,"GroupedObservable",(function(){return o.a})),n.d(e,"observable",(function(){return a.a})),n.d(e,"Subject",(function(){return s.a})),n.d(e,"BehaviorSubject",(function(){return u.a})),n.d(e,"ReplaySubject",(function(){return c.a})),n.d(e,"AsyncSubject",(function(){return l.a})),n.d(e,"asap",(function(){return h.a})),n.d(e,"asapScheduler",(function(){return h.b})),n.d(e,"async",(function(){return d.a})),n.d(e,"asyncScheduler",(function(){return d.b})),n.d(e,"queue",(function(){return f.a})),n.d(e,"queueScheduler",(function(){return f.b})),n.d(e,"animationFrame",(function(){return w})),n.d(e,"animationFrameScheduler",(function(){return b})),n.d(e,"VirtualTimeScheduler",(function(){return v})),n.d(e,"VirtualAction",(function(){return M})),n.d(e,"Scheduler",(function(){return L.a})),n.d(e,"Subscription",(function(){return _.a})),n.d(e,"Subscriber",(function(){return N.a})),n.d(e,"Notification",(function(){return E.a})),n.d(e,"NotificationKind",(function(){return E.b})),n.d(e,"pipe",(function(){return S.a})),n.d(e,"noop",(function(){return x.a})),n.d(e,"identity",(function(){return A.a})),n.d(e,"isObservable",(function(){return I})),n.d(e,"ArgumentOutOfRangeError",(function(){return k.a})),n.d(e,"EmptyError",(function(){return j.a})),n.d(e,"ObjectUnsubscribedError",(function(){return T.a})),n.d(e,"UnsubscriptionError",(function(){return C.a})),n.d(e,"TimeoutError",(function(){return D.a})),n.d(e,"bindCallback",(function(){return B})),n.d(e,"bindNodeCallback",(function(){return F})),n.d(e,"combineLatest",(function(){return G.b})),n.d(e,"concat",(function(){return Z.a})),n.d(e,"defer",(function(){return V.a})),n.d(e,"empty",(function(){return q.b})),n.d(e,"forkJoin",(function(){return X})),n.d(e,"from",(function(){return K.a})),n.d(e,"fromEvent",(function(){return et})),n.d(e,"fromEventPattern",(function(){return nt})),n.d(e,"generate",(function(){return rt})),n.d(e,"iif",(function(){return ot})),n.d(e,"interval",(function(){return st})),n.d(e,"merge",(function(){return ct.a})),n.d(e,"never",(function(){return ht})),n.d(e,"of",(function(){return dt.a})),n.d(e,"onErrorResumeNext",(function(){return ft})),n.d(e,"pairs",(function(){return pt})),n.d(e,"partition",(function(){return wt})),n.d(e,"race",(function(){return vt.a})),n.d(e,"range",(function(){return Mt})),n.d(e,"throwError",(function(){return _t.a})),n.d(e,"timer",(function(){return Nt.a})),n.d(e,"using",(function(){return Et})),n.d(e,"zip",(function(){return St.b})),n.d(e,"scheduled",(function(){return xt.a})),n.d(e,"EMPTY",(function(){return q.a})),n.d(e,"NEVER",(function(){return lt})),n.d(e,"config",(function(){return At.a}));var r=n(3),i=n(70),o=n(67),a=n(22),s=n(5),u=n(71),c=n(50),l=n(31),h=n(42),d=n(6),f=n(61),p=n(0),m=n(32),g=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return p.a(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(m.a),y=n(30),b=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(y.a))(g),w=b,v=function(t){function e(e,n){void 0===e&&(e=M),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return p.a(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10,e}(y.a),M=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return p.a(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(m.a),L=n(62),_=n(4),N=n(1),E=n(18),S=n(41),x=n(21),A=n(15);function I(t){return!!t&&(t instanceof r.a||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var k=n(25),j=n(27),T=n(23),C=n(44),D=n(73),O=n(9),z=n(57),P=n(7),R=n(10);function B(t,e,n){if(e){if(!Object(R.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return B(t,n).apply(void 0,r).pipe(Object(O.a)((function(t){return Object(P.a)(t)?e.apply(void 0,t):e(t)})))};n=e}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o,a=this,s={context:a,subject:o,callbackFunc:t,scheduler:n};return new r.a((function(r){if(n){var i={args:e,subscriber:r,params:s};return n.schedule(U,0,i)}if(!o){o=new l.a;try{t.apply(a,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];o.next(t.length<=1?t[0]:t),o.complete()}]))}catch(t){Object(z.a)(o)?o.error(t):console.warn(t)}}return o.subscribe(r)}))}}function U(t){var e=this,n=t.args,r=t.subscriber,i=t.params,o=i.callbackFunc,a=i.context,s=i.scheduler,u=i.subject;if(!u){u=i.subject=new l.a;try{o.apply(a,n.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.length<=1?t[0]:t;e.add(s.schedule(Y,0,{value:r,subject:u}))}]))}catch(t){u.error(t)}}this.add(u.subscribe(r))}function Y(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function F(t,e,n){if(e){if(!Object(R.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return F(t,n).apply(void 0,r).pipe(Object(O.a)((function(t){return Object(P.a)(t)?e.apply(void 0,t):e(t)})))};n=e}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o={subject:void 0,args:e,callbackFunc:t,scheduler:n,context:this};return new r.a((function(r){var i=o.context,a=o.subject;if(n)return n.schedule(W,0,{params:o,subscriber:r,context:i});if(!a){a=o.subject=new l.a;try{t.apply(i,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.shift();n?a.error(n):(a.next(t.length<=1?t[0]:t),a.complete())}]))}catch(t){Object(z.a)(a)?a.error(t):console.warn(t)}}return a.subscribe(r)}))}}function W(t){var e=this,n=t.params,r=t.subscriber,i=t.context,o=n.callbackFunc,a=n.args,s=n.scheduler,u=n.subject;if(!u){u=n.subject=new l.a;try{o.apply(i,a.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.shift();if(r)e.add(s.schedule(H,0,{err:r,subject:u}));else{var i=t.length<=1?t[0]:t;e.add(s.schedule(Q,0,{value:i,subject:u}))}}]))}catch(t){this.add(s.schedule(H,0,{err:t,subject:u}))}}this.add(u.subscribe(r))}function Q(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function H(t){var e=t.err;t.subject.error(e)}var G=n(52),Z=n(34),V=n(54),q=n(11),J=n(56),K=n(12);function X(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){var n=t[0];if(Object(P.a)(n))return $(n,null);if(Object(J.a)(n)&&Object.getPrototypeOf(n)===Object.prototype){var r=Object.keys(n);return $(r.map((function(t){return n[t]})),r)}}if("function"==typeof t[t.length-1]){var i=t.pop();return $(t=1===t.length&&Object(P.a)(t[0])?t[0]:t,null).pipe(Object(O.a)((function(t){return i.apply(void 0,t)})))}return $(t,null)}function $(t,e){return new r.a((function(n){var r=t.length;if(0!==r)for(var i=new Array(r),o=0,a=0,s=function(s){var u=Object(K.a)(t[s]),c=!1;n.add(u.subscribe({next:function(t){c||(c=!0,a++),i[s]=t},error:function(t){return n.error(t)},complete:function(){++o!==r&&c||(a===r&&n.next(e?e.reduce((function(t,e,n){return t[e]=i[n],t}),{}):i),n.complete())}}))},u=0;u<r;u++)s(u);else n.complete()}))}var tt=n(26);function et(t,e,n,i){return Object(tt.a)(n)&&(i=n,n=void 0),i?et(t,e,n).pipe(Object(O.a)((function(t){return Object(P.a)(t)?i.apply(void 0,t):i(t)}))):new r.a((function(r){!function t(e,n,r,i,o){var a;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){var s=e;e.addEventListener(n,r,o),a=function(){return s.removeEventListener(n,r,o)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){var u=e;e.on(n,r),a=function(){return u.off(n,r)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var c=e;e.addListener(n,r),a=function(){return c.removeListener(n,r)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var l=0,h=e.length;l<h;l++)t(e[l],n,r,i,o)}i.add(a)}(t,e,(function(t){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function nt(t,e,n){return n?nt(t,e).pipe(Object(O.a)((function(t){return Object(P.a)(t)?n.apply(void 0,t):n(t)}))):new r.a((function(n){var r,i=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.next(1===t.length?t[0]:t)};try{r=t(i)}catch(t){return void n.error(t)}if(Object(tt.a)(e))return function(){return e(i,r)}}))}function rt(t,e,n,i,o){var a,s;if(1==arguments.length){var u=t;s=u.initialState,e=u.condition,n=u.iterate,a=u.resultSelector||A.a,o=u.scheduler}else void 0===i||Object(R.a)(i)?(s=t,a=A.a,o=i):(s=t,a=i);return new r.a((function(t){var r=s;if(o)return o.schedule(it,0,{subscriber:t,iterate:n,condition:e,resultSelector:a,state:r});for(;;){if(e){var i=void 0;try{i=e(r)}catch(e){return void t.error(e)}if(!i){t.complete();break}}var u=void 0;try{u=a(r)}catch(e){return void t.error(e)}if(t.next(u),t.closed)break;try{r=n(r)}catch(e){return void t.error(e)}}}))}function it(t){var e=t.subscriber,n=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(t){return void e.error(t)}else t.needIterate=!0;if(n){var r=void 0;try{r=n(t.state)}catch(t){return void e.error(t)}if(!r)return void e.complete();if(e.closed)return}var i;try{i=t.resultSelector(t.state)}catch(t){return void e.error(t)}if(!e.closed&&(e.next(i),!e.closed))return this.schedule(t)}}function ot(t,e,n){return void 0===e&&(e=q.a),void 0===n&&(n=q.a),Object(V.a)((function(){return t()?e:n}))}var at=n(33);function st(t,e){return void 0===t&&(t=0),void 0===e&&(e=d.a),(!Object(at.a)(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=d.a),new r.a((function(n){return n.add(e.schedule(ut,t,{subscriber:n,counter:0,period:t})),n}))}function ut(t){var e=t.subscriber,n=t.counter,r=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r)}var ct=n(75),lt=new r.a(x.a);function ht(){return lt}var dt=n(39);function ft(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return q.a;var n=t[0],i=t.slice(1);return 1===t.length&&Object(P.a)(n)?ft.apply(void 0,n):new r.a((function(t){var e=function(){return t.add(ft.apply(void 0,i).subscribe(t))};return Object(K.a)(n).subscribe({next:function(e){t.next(e)},error:e,complete:e})}))}function pt(t,e){return e?new r.a((function(n){var r=Object.keys(t),i=new _.a;return i.add(e.schedule(mt,0,{keys:r,index:0,subscriber:n,subscription:i,obj:t})),i})):new r.a((function(e){for(var n=Object.keys(t),r=0;r<n.length&&!e.closed;r++){var i=n[r];t.hasOwnProperty(i)&&e.next([i,t[i]])}e.complete()}))}function mt(t){var e=t.keys,n=t.index,r=t.subscriber,i=t.subscription,o=t.obj;if(!r.closed)if(n<e.length){var a=e[n];r.next([a,o[a]]),i.add(this.schedule({keys:e,index:n+1,subscriber:r,subscription:i,obj:o}))}else r.complete()}var gt=n(83),yt=n(35),bt=n(17);function wt(t,e,n){return[Object(bt.a)(e,n)(new r.a(Object(yt.a)(t))),Object(bt.a)(Object(gt.a)(e,n))(new r.a(Object(yt.a)(t)))]}var vt=n(76);function Mt(t,e,n){return void 0===t&&(t=0),new r.a((function(r){void 0===e&&(e=t,t=0);var i=0,o=t;if(n)return n.schedule(Lt,0,{index:i,count:e,start:t,subscriber:r});for(;;){if(i++>=e){r.complete();break}if(r.next(o++),r.closed)break}}))}function Lt(t){var e=t.start,n=t.index,r=t.count,i=t.subscriber;n>=r?i.complete():(i.next(e),i.closed||(t.index=n+1,t.start=e+1,this.schedule(t)))}var _t=n(51),Nt=n(77);function Et(t,e){return new r.a((function(n){var r,i;try{r=t()}catch(t){return void n.error(t)}try{i=e(r)}catch(t){return void n.error(t)}var o=(i?Object(K.a)(i):q.a).subscribe(n);return function(){o.unsubscribe(),r&&r.unsubscribe()}}))}var St=n(55),xt=n(78),At=n(14)},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(0),i=n(1);function o(){return function(t){return t.lift(new a(t))}}var a=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new s(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),s=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(i.a)},function(t,e,n){n.d(e,"a",(function(){return l}));var r=n(0),i=n(5),o=n(61),a=n(4),s=n(72),u=n(23),c=n(79),l=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return r.a(e,t),e.prototype.nextInfiniteTimeWindow=function(e){if(!this.isStopped){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift()}t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this.isStopped||(this._events.push(new h(this._getNow(),e)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,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?e=a.a.EMPTY:(this.observers.push(t),e=new c.a(this,t)),i&&t.add(t=new s.a(t,i)),n)for(var l=0;l<o&&!t.closed;l++)t.next(r[l]);else for(l=0;l<o&&!t.closed;l++)t.next(r[l].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||o.a).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(t-r[o].time<n);)o++;return i>e&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r},e}(i.a),h=function(t,e){this.time=t,this.value=e}},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(3);function i(t,e){return e?new r.a((function(n){return e.schedule(o,0,{error:t,subscriber:n})})):new r.a((function(e){return e.error(t)}))}function o(t){var e=t.error;t.subscriber.error(e)}},function(t,e,n){n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return h}));var r=n(0),i=n(10),o=n(7),a=n(16),s=n(13),u=n(29),c={};function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=void 0,r=void 0;return Object(i.a)(t[t.length-1])&&(r=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(o.a)(t[0])&&(t=t[0]),Object(u.a)(t,r).lift(new h(n))}var h=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new d(t,this.resultSelector))},t}(),d=function(t){function e(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return r.a(e,t),e.prototype._next=function(t){this.values.push(c),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(Object(s.a)(this,r,void 0,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n){var r=this.values,i=r[n],o=this.toRespond?i===c?--this.toRespond:this.toRespond:0;r[n]=e,0===o&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(a.a)},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(28),i=n(15);function o(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Object(r.b)(i.a,t)}},function(t,e,n){n.d(e,"a",(function(){return a}));var r=n(3),i=n(12),o=n(11);function a(t){return new r.a((function(e){var n;try{n=t()}catch(t){return void e.error(t)}return(n?Object(i.a)(n):Object(o.b)()).subscribe(e)}))}},function(t,e,n){n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return l}));var r=n(0),i=n(29),o=n(7),a=n(1),s=n(20),u=n(2);function c(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return"function"==typeof n&&t.pop(),Object(i.a)(t,void 0).lift(new l(n))}var l=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new h(t,this.resultSelector))},t}(),h=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.resultSelector=n,i.iterators=[],i.active=0,i.resultSelector="function"==typeof n?n:void 0,i}return r.a(e,t),e.prototype._next=function(t){var e=this.iterators;Object(o.a)(t)?e.push(new f(t)):"function"==typeof t[s.a]?e.push(new d(t[s.a]())):e.push(new p(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];r.stillUnsubscribed?this.destination.add(r.subscribe()):this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++)if("function"==typeof(a=t[r]).hasValue&&!a.hasValue())return;var i=!1,o=[];for(r=0;r<e;r++){var a,s=(a=t[r]).next();if(a.hasCompleted()&&(i=!0),s.done)return void n.complete();o.push(s.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),i&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(a.a),d=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return Boolean(t&&t.done)},t}(),f=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[s.a]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),p=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return r.a(e,t),e.prototype[s.a]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t){this.buffer.push(t),this.parent.checkIterators()},e.prototype.subscribe=function(){return Object(u.c)(this.observable,new u.a(this))},e}(u.b)},function(t,e,n){function r(t){return null!==t&&"object"==typeof t}n.d(e,"a",(function(){return r}))},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(1);function i(t){for(;t;){var e=t,n=e.closed,i=e.destination,o=e.isStopped;if(n||o)return!1;t=i&&i instanceof r.a?i:null}return!0}},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(3),i=n(4);function o(t,e){return new r.a((function(n){var r=new i.a,o=0;return r.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(14),i=n(36),o={closed:!0,next:function(t){},error:function(t){if(r.a.useDeprecatedSynchronousErrorHandling)throw t;Object(i.a)(t)},complete:function(){}}},function(t,e){function n(t){return t.sort(((t,e)=>"latest"===t||"earliest"===e?1:"latest"===e||"earliest"===t?-1:r(t)-r(e)))}function r(t){return null==t?t:Number.parseInt(t,16)}function i(t){if(null==t)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function o(){return Math.floor(16*Math.random()).toString(16)}t.exports={minBlockRef:function(...t){return n(t)[0]},maxBlockRef:function(...t){const e=n(t);return e[e.length-1]},sortBlockRefs:n,bnToHex:function(t){return"0x"+t.toString(16)},blockRefIsNumber:function(t){return t&&!["earliest","latest","pending"].includes(t)},hexToInt:r,incrementHexInt:function(t){return null==t?t:i(r(t)+1)},intToHex:i,unsafeRandomBytes:function(t){let e="0x";for(let n=0;n<t;n++)e+=o(),e+=o();return e}}},function(t,e,n){n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a}));var r=n(0),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.a(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(n(32).a),o=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e}(n(30).a))(i),a=o},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}()},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});const r=n(65);function i(t,e,n){try{Reflect.apply(t,e,n)}catch(t){setTimeout((()=>{throw t}))}}class o extends r.EventEmitter{emit(t,...e){let n="error"===t;const r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){let t;if(e.length>0&&([t]=e),t instanceof Error)throw t;const n=new Error("Unhandled error."+(t?` (${t.message})`:""));throw n.context=t,n}const o=r[t];if(void 0===o)return!1;if("function"==typeof o)i(o,this,e);else{const t=o.length,n=function(t){const e=t.length,n=new Array(e);for(let r=0;r<e;r+=1)n[r]=t[r];return n}(o);for(let r=0;r<t;r+=1)i(n[r],this,e)}return!0}}e.default=o},function(t,e,n){var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,o),r(n)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}y(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&y(t,"error",e,{once:!0})}(t,i)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function h(t,e,n,r){var i,o,a,s;if(c(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),a=o[e]),void 0===a)a=o[e]=n,++t._eventsCount;else if("function"==typeof a?a=o[e]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=l(t))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return t}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function p(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):g(i,i.length)}function m(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function y(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){r.once&&t.removeEventListener(e,i),n(o)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");u=t}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)o(u,this,e);else{var c=u.length,l=g(u,c);for(n=0;n<c;++n)o(l[n],this,e)}return!0},s.prototype.addListener=function(t,e){return h(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return h(this,t,e,!0)},s.prototype.once=function(t,e){return c(e),this.on(t,f(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){return c(e),this.prependListener(t,f(this,t,e)),this},s.prototype.removeListener=function(t,e){var n,r,i,o,a;if(c(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,a||e)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},s.prototype.listeners=function(t){return p(this,t,!0)},s.prototype.rawListeners=function(t){return p(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){(function(t){!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(133).Buffer}catch(t){}function s(t,e){var n=t.charCodeAt(e);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+t)}function u(t,e,n){var r=s(t,n);return n-1>=e&&(r|=s(t,n-1)<<4),r}function c(t,e,n,i){for(var o=0,a=0,s=Math.min(t.length,n),u=e;u<s;u++){var c=t.charCodeAt(u)-48;o*=i,a=c>=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&a<i,"Invalid character"),o+=a}return o}function l(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},o.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===n)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,a=0;if("be"===n)for(r=t.length-1;r>=e;r-=2)i=u(t,e,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)i=u(t,e,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,l=n;l<s;l+=r)u=c(t,l,l+r,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var h=1;for(u=c(t,l,t.length,e),l=0;l<a;l++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){l(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(t){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c<r;c++){for(var l=u>>>26,h=67108863&u,d=Math.min(c,e.length-1),f=Math.max(0,c-t.length+1);f<=d;f++){var p=c-f|0;l+=(a=(i=0|t.words[p])*(o=0|e.words[f])+h)/67108864|0,h=67108863&a}n.words[c]=0|h,u=0|l}return 0!==u?n.words[c]=0|u:n.length--,n._strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);n=0!=(o=s>>>24-i&16777215)||a!==this.length-1?d[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],l=p[t];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(l).toString(t);n=(h=h.idivn(l)).isZero()?m+n:d[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;t[n++]=255&a,n<t.length&&(t[n++]=a>>8&255),n<t.length&&(t[n++]=a>>16&255),6===o?(n<t.length&&(t[n++]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n<t.length)for(t[n++]=r;n<t.length;)t[n++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var n=t.length-1,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;t[n--]=255&a,n>=0&&(t[n--]=a>>8&255),n>=0&&(t[n--]=a>>16&255),6===o?(n>=0&&(t[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(t[n--]=r;n>=0;)t[n--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,n,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,a=0;a<r.length;a++)o=(e=(0|n.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<n.length;a++)o=(e=(0|n.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,n){var r,i,o,a=t.words,s=e.words,u=n.words,c=0,l=0|a[0],h=8191&l,d=l>>>13,f=0|a[1],p=8191&f,m=f>>>13,g=0|a[2],y=8191&g,b=g>>>13,w=0|a[3],v=8191&w,M=w>>>13,L=0|a[4],_=8191&L,N=L>>>13,E=0|a[5],S=8191&E,x=E>>>13,A=0|a[6],I=8191&A,k=A>>>13,j=0|a[7],T=8191&j,C=j>>>13,D=0|a[8],O=8191&D,z=D>>>13,P=0|a[9],R=8191&P,B=P>>>13,U=0|s[0],Y=8191&U,F=U>>>13,W=0|s[1],Q=8191&W,H=W>>>13,G=0|s[2],Z=8191&G,V=G>>>13,q=0|s[3],J=8191&q,K=q>>>13,X=0|s[4],$=8191&X,tt=X>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,lt=0|s[8],ht=8191<,dt=lt>>>13,ft=0|s[9],pt=8191&ft,mt=ft>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(c+(r=Math.imul(h,Y))|0)+((8191&(i=(i=Math.imul(h,F))+Math.imul(d,Y)|0))<<13)|0;c=((o=Math.imul(d,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,Y),i=(i=Math.imul(p,F))+Math.imul(m,Y)|0,o=Math.imul(m,F);var yt=(c+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,H)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,H)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(y,Y),i=(i=Math.imul(y,F))+Math.imul(b,Y)|0,o=Math.imul(b,F),r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,H)|0;var bt=(c+(r=r+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(v,Y),i=(i=Math.imul(v,F))+Math.imul(M,Y)|0,o=Math.imul(M,F),r=r+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,H)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,V)|0;var wt=(c+(r=r+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(_,Y),i=(i=Math.imul(_,F))+Math.imul(N,Y)|0,o=Math.imul(N,F),r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,H)|0,r=r+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,V)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,V)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,K)|0;var vt=(c+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(S,Y),i=(i=Math.imul(S,F))+Math.imul(x,Y)|0,o=Math.imul(x,F),r=r+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,H)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,H)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,V)|0,r=r+Math.imul(y,J)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,K)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(c+(r=r+Math.imul(h,nt)|0)|0)+((8191&(i=(i=i+Math.imul(h,rt)|0)+Math.imul(d,nt)|0))<<13)|0;c=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(I,Y),i=(i=Math.imul(I,F))+Math.imul(k,Y)|0,o=Math.imul(k,F),r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,H)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,H)|0,r=r+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,V)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,V)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,K)|0,r=r+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Lt=(c+(r=r+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(d,ot)|0))<<13)|0;c=((o=o+Math.imul(d,at)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(T,Y),i=(i=Math.imul(T,F))+Math.imul(C,Y)|0,o=Math.imul(C,F),r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,H)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(_,J)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(N,J)|0,o=o+Math.imul(N,K)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(y,nt)|0,i=(i=i+Math.imul(y,rt)|0)+Math.imul(b,nt)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var _t=(c+(r=r+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(d,ut)|0))<<13)|0;c=((o=o+Math.imul(d,ct)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(O,Y),i=(i=Math.imul(O,F))+Math.imul(z,Y)|0,o=Math.imul(z,F),r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,H)|0,r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,V)|0,r=r+Math.imul(S,J)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,K)|0,r=r+Math.imul(_,$)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(M,nt)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var Nt=(c+(r=r+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,dt)|0)+Math.imul(d,ht)|0))<<13)|0;c=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(R,Y),i=(i=Math.imul(R,F))+Math.imul(B,Y)|0,o=Math.imul(B,F),r=r+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(z,Q)|0,o=o+Math.imul(z,H)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,V)|0,r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,K)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(_,nt)|0,i=(i=i+Math.imul(_,rt)|0)+Math.imul(N,nt)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,at)|0,r=r+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,r=r+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,dt)|0;var Et=(c+(r=r+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(d,pt)|0))<<13)|0;c=((o=o+Math.imul(d,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(R,Q),i=(i=Math.imul(R,H))+Math.imul(B,Q)|0,o=Math.imul(B,H),r=r+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(z,Z)|0,o=o+Math.imul(z,V)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,K)|0,r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(S,nt)|0,i=(i=i+Math.imul(S,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,at)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ct)|0,r=r+Math.imul(y,ht)|0,i=(i=i+Math.imul(y,dt)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,dt)|0;var St=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(R,Z),i=(i=Math.imul(R,V))+Math.imul(B,Z)|0,o=Math.imul(B,V),r=r+Math.imul(O,J)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(z,J)|0,o=o+Math.imul(z,K)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,at)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,at)|0,r=r+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ct)|0,r=r+Math.imul(v,ht)|0,i=(i=i+Math.imul(v,dt)|0)+Math.imul(M,ht)|0,o=o+Math.imul(M,dt)|0;var xt=(c+(r=r+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(R,J),i=(i=Math.imul(R,K))+Math.imul(B,J)|0,o=Math.imul(B,K),r=r+Math.imul(O,$)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(z,$)|0,o=o+Math.imul(z,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(C,nt)|0,o=o+Math.imul(C,rt)|0,r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,r=r+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ct)|0,r=r+Math.imul(_,ht)|0,i=(i=i+Math.imul(_,dt)|0)+Math.imul(N,ht)|0,o=o+Math.imul(N,dt)|0;var At=(c+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(M,pt)|0))<<13)|0;c=((o=o+Math.imul(M,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(R,$),i=(i=Math.imul(R,tt))+Math.imul(B,$)|0,o=Math.imul(B,tt),r=r+Math.imul(O,nt)|0,i=(i=i+Math.imul(O,rt)|0)+Math.imul(z,nt)|0,o=o+Math.imul(z,rt)|0,r=r+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,r=r+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,dt)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,dt)|0;var It=(c+(r=r+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(N,pt)|0))<<13)|0;c=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(R,nt),i=(i=Math.imul(R,rt))+Math.imul(B,nt)|0,o=Math.imul(B,rt),r=r+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(z,ot)|0,o=o+Math.imul(z,at)|0,r=r+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,r=r+Math.imul(I,ht)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,dt)|0;var kt=(c+(r=r+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(R,ot),i=(i=Math.imul(R,at))+Math.imul(B,ot)|0,o=Math.imul(B,at),r=r+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(z,ut)|0,o=o+Math.imul(z,ct)|0,r=r+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,dt)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,dt)|0;var jt=(c+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,r=Math.imul(R,ut),i=(i=Math.imul(R,ct))+Math.imul(B,ut)|0,o=Math.imul(B,ct),r=r+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,dt)|0)+Math.imul(z,ht)|0,o=o+Math.imul(z,dt)|0;var Tt=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(R,ht),i=(i=Math.imul(R,dt))+Math.imul(B,ht)|0,o=Math.imul(B,dt);var Ct=(c+(r=r+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(z,pt)|0))<<13)|0;c=((o=o+Math.imul(z,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863;var Dt=(c+(r=Math.imul(R,pt))|0)+((8191&(i=(i=Math.imul(R,mt))+Math.imul(B,pt)|0))<<13)|0;return c=((o=Math.imul(B,mt))+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,u[0]=gt,u[1]=yt,u[2]=bt,u[3]=wt,u[4]=vt,u[5]=Mt,u[6]=Lt,u[7]=_t,u[8]=Nt,u[9]=Et,u[10]=St,u[11]=xt,u[12]=At,u[13]=It,u[14]=kt,u[15]=jt,u[16]=Tt,u[17]=Ct,u[18]=Dt,0!==c&&(u[19]=c,n.length++),n};function y(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var a=i;i=0;for(var s=67108863&r,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,h=(0|t.words[l])*(0|e.words[c]),d=67108863&h;s=67108863&(d=d+s|0),i+=(a=(a=a+(h/67108864|0)|0)+(d>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function b(t,e,n){return y(t,e,n)}Math.imul||(g=m),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):n<63?m(this,t,e):n<1024?y(this,t,e):b(this,t,e)},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),b(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),r("number"==typeof t),r(t<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,a=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=t.words[r]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,u=(0|this.words[e])-s<<n;this.words[e]=u|a,a=s>>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,u=n;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var h=0|this.words[c];this.words[c]=l<<26-o|h>>>o,l=h&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n||!(this.words[n]&i))},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,n){var i,o,a=t.length+n;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+s;var u=(0|t.words[i])*e;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!=(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var l=r.clone()._ishlnsubmul(i,1,u);0===l.negative&&(r=l,s&&(s.words[u]=1));for(var h=u-1;h>=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);s&&(s.words[h]=d)}return s&&s._strip(),r._strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/t|0,n=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),h=e.clone();!e.isZero();){for(var d=0,f=1;0==(e.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(h)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,d=1;0==(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function M(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function L(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function N(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(M,v),M.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r<n;r++)e.words[r]=t.words[r];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,r=10;r<t.length;r++){var o=0|t.words[r];t.words[r-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},M.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(L,v),i(_,v),i(N,v),N.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new M;else if("p224"===t)e=new L;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new N}return w[t]=e,e},E.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var h=this.pow(l,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=a;0!==f.cmp(s);){for(var m=f,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g<p);var y=this.pow(h,new o(1).iushln(p-g-1));d=d.redMul(y),h=y.redSqr(),f=f.redMul(h),p=g}return d},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],a=0,s=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var c=e.words[r],l=u-1;l>=0;l--){var h=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4==++s||0===r&&0===l)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,E),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(132)(t))},function(t,e,n){n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return d}));var r=n(0),i=n(1),o=n(4),a=n(3),s=n(5);function u(t,e,n,r){return function(i){return i.lift(new c(t,e,n,r))}}var c=function(){function t(t,e,n,r){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=r}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),l=function(t){function e(e,n,r,i,o){var a=t.call(this,e)||this;return a.keySelector=n,a.elementSelector=r,a.durationSelector=i,a.subjectSelector=o,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return r.a(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new s.a,n.set(e,i);var o=new d(e,i,this);if(this.destination.next(o),this.durationSelector){var a=void 0;try{a=this.durationSelector(new d(e,i))}catch(t){return void this.error(t)}this.add(a.subscribe(new h(e,i,this)))}}i.closed||i.next(r)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t)})),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete()})),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(i.a),h=function(t){function e(e,n,r){var i=t.call(this,n)||this;return i.key=e,i.group=n,i.parent=r,i}return r.a(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(i.a),d=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.groupSubject=n,i.refCountSubscription=r,i}return r.a(e,t),e.prototype._subscribe=function(t){var e=new o.a,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new f(n)),e.add(r.subscribe(t)),e},e}(a.a),f=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return r.a(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(o.a)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=e.RegExpString=e.IntNumber=e.BigIntString=e.AddressString=e.HexString=e.OpaqueType=void 0,e.OpaqueType=function(){return t=>t},e.HexString=t=>t,e.AddressString=t=>t,e.BigIntString=t=>t,e.IntNumber=function(t){return Math.floor(t)},e.RegExpString=t=>t,function(t){t.CoinbaseWallet="CoinbaseWallet",t.MetaMask="MetaMask",t.Unselected=""}(e.ProviderType||(e.ProviderType={}))},function(t,e,n){n.r(e),n.d(e,"audit",(function(){return o})),n.d(e,"auditTime",(function(){return l})),n.d(e,"buffer",(function(){return h})),n.d(e,"bufferCount",(function(){return m})),n.d(e,"bufferTime",(function(){return v})),n.d(e,"bufferToggle",(function(){return k})),n.d(e,"bufferWhen",(function(){return C})),n.d(e,"catchError",(function(){return z})),n.d(e,"combineAll",(function(){return U})),n.d(e,"combineLatest",(function(){return W})),n.d(e,"concat",(function(){return H})),n.d(e,"concatAll",(function(){return G.a})),n.d(e,"concatMap",(function(){return V})),n.d(e,"concatMapTo",(function(){return q})),n.d(e,"count",(function(){return J})),n.d(e,"debounce",(function(){return $})),n.d(e,"debounceTime",(function(){return nt})),n.d(e,"defaultIfEmpty",(function(){return at})),n.d(e,"delay",(function(){return ht})),n.d(e,"delayWhen",(function(){return gt})),n.d(e,"dematerialize",(function(){return Mt})),n.d(e,"distinct",(function(){return Nt})),n.d(e,"distinctUntilChanged",(function(){return xt})),n.d(e,"distinctUntilKeyChanged",(function(){return kt})),n.d(e,"elementAt",(function(){return Ft})),n.d(e,"endWith",(function(){return Qt})),n.d(e,"every",(function(){return Ht})),n.d(e,"exhaust",(function(){return Vt})),n.d(e,"exhaustMap",(function(){return Xt})),n.d(e,"expand",(function(){return ee})),n.d(e,"filter",(function(){return Tt.a})),n.d(e,"finalize",(function(){return ie})),n.d(e,"find",(function(){return se})),n.d(e,"findIndex",(function(){return le})),n.d(e,"first",(function(){return de})),n.d(e,"groupBy",(function(){return fe.b})),n.d(e,"ignoreElements",(function(){return pe})),n.d(e,"isEmpty",(function(){return ye})),n.d(e,"last",(function(){return _e})),n.d(e,"map",(function(){return Kt.a})),n.d(e,"mapTo",(function(){return Ne})),n.d(e,"materialize",(function(){return xe})),n.d(e,"max",(function(){return Oe})),n.d(e,"merge",(function(){return Pe})),n.d(e,"mergeAll",(function(){return Re.a})),n.d(e,"mergeMap",(function(){return Z.b})),n.d(e,"flatMap",(function(){return Z.a})),n.d(e,"mergeMapTo",(function(){return Be})),n.d(e,"mergeScan",(function(){return Ue})),n.d(e,"min",(function(){return We})),n.d(e,"multicast",(function(){return He})),n.d(e,"observeOn",(function(){return Ze.b})),n.d(e,"onErrorResumeNext",(function(){return Ve})),n.d(e,"pairwise",(function(){return Ke})),n.d(e,"partition",(function(){return en})),n.d(e,"pluck",(function(){return nn})),n.d(e,"publish",(function(){return on})),n.d(e,"publishBehavior",(function(){return sn})),n.d(e,"publishLast",(function(){return cn})),n.d(e,"publishReplay",(function(){return hn})),n.d(e,"race",(function(){return fn})),n.d(e,"reduce",(function(){return De})),n.d(e,"repeat",(function(){return pn})),n.d(e,"repeatWhen",(function(){return yn})),n.d(e,"retry",(function(){return vn})),n.d(e,"retryWhen",(function(){return _n})),n.d(e,"refCount",(function(){return Sn.a})),n.d(e,"sample",(function(){return xn})),n.d(e,"sampleTime",(function(){return kn})),n.d(e,"scan",(function(){return ke})),n.d(e,"sequenceEqual",(function(){return Dn})),n.d(e,"share",(function(){return Bn})),n.d(e,"shareReplay",(function(){return Un})),n.d(e,"single",(function(){return Yn})),n.d(e,"skip",(function(){return Qn})),n.d(e,"skipLast",(function(){return Zn})),n.d(e,"skipUntil",(function(){return Jn})),n.d(e,"skipWhile",(function(){return $n})),n.d(e,"startWith",(function(){return nr})),n.d(e,"subscribeOn",(function(){return ar})),n.d(e,"switchAll",(function(){return hr})),n.d(e,"switchMap",(function(){return ur})),n.d(e,"switchMapTo",(function(){return dr})),n.d(e,"take",(function(){return Bt})),n.d(e,"takeLast",(function(){return ve})),n.d(e,"takeUntil",(function(){return fr})),n.d(e,"takeWhile",(function(){return gr})),n.d(e,"tap",(function(){return Mr})),n.d(e,"throttle",(function(){return Er})),n.d(e,"throttleTime",(function(){return Ar})),n.d(e,"throwIfEmpty",(function(){return Dt})),n.d(e,"timeInterval",(function(){return Cr})),n.d(e,"timeout",(function(){return Ur})),n.d(e,"timeoutWith",(function(){return zr})),n.d(e,"timestamp",(function(){return Yr})),n.d(e,"toArray",(function(){return Qr})),n.d(e,"window",(function(){return Hr})),n.d(e,"windowCount",(function(){return Vr})),n.d(e,"windowTime",(function(){return Kr})),n.d(e,"windowToggle",(function(){return ii})),n.d(e,"windowWhen",(function(){return si})),n.d(e,"withLatestFrom",(function(){return li})),n.d(e,"zip",(function(){return pi})),n.d(e,"zipAll",(function(){return mi}));var r=n(0),i=n(2);function o(t){return function(e){return e.lift(new a(t))}}var a=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.durationSelector))},t}(),s=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.a(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(t){return this.destination.error(t)}var n=Object(i.c)(e,new i.a(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=void 0,n.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(i.b),u=n(6),c=n(77);function l(t,e){return void 0===e&&(e=u.a),o((function(){return Object(c.a)(t,e)}))}function h(t){return function(e){return e.lift(new d(t))}}var d=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.closingNotifier))},t}(),f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add(Object(i.c)(n,new i.a(r))),r}return r.a(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(){var t=this.buffer;this.buffer=[],this.destination.next(t)},e}(i.b),p=n(1);function m(t,e){return void 0===e&&(e=null),function(n){return n.lift(new g(t,e))}}var g=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?b:y}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),y=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return r.a(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(p.a),b=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.bufferSize=n,i.startBufferEvery=r,i.buffers=[],i.count=0,i}return r.a(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,r=this.buffers,i=this.count;this.count++,i%n==0&&r.push([]);for(var o=r.length;o--;){var a=r[o];a.push(t),a.length===e&&(r.splice(o,1),this.destination.next(a))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)},e}(p.a),w=n(10);function v(t){var e=arguments.length,n=u.a;Object(w.a)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var r=null;e>=2&&(r=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(e){return e.lift(new M(t,r,i,n))}}var M=function(){function t(t,e,n,r){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new _(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),L=function(){this.buffer=[]},_=function(t){function e(e,n,r,i,o){var a=t.call(this,e)||this;a.bufferTimeSpan=n,a.bufferCreationInterval=r,a.maxBufferSize=i,a.scheduler=o,a.contexts=[];var s=a.openContext();if(a.timespanOnly=null==r||r<0,a.timespanOnly){var u={subscriber:a,context:s,bufferTimeSpan:n};a.add(s.closeAction=o.schedule(N,n,u))}else{var c={subscriber:a,context:s},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:a,scheduler:o};a.add(s.closeAction=o.schedule(S,n,c)),a.add(o.schedule(E,r,l))}return a}return r.a(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i<r;i++){var o=n[i],a=o.buffer;a.push(t),a.length==this.maxBufferSize&&(e=o)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var r=e.shift();n.next(r.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(N,n,r))}},e.prototype.openContext=function(){var t=new L;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(p.a);function N(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function E(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,o=r.openContext();r.closed||(r.add(o.closeAction=i.schedule(S,n,{subscriber:r,context:o})),this.schedule(t,e))}function S(t){var e=t.subscriber,n=t.context;e.closeContext(n)}var x=n(4),A=n(13),I=n(16);function k(t,e){return function(n){return n.lift(new j(t,e))}}var j=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new T(t,this.openings,this.closingSelector))},t}(),T=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.closingSelector=r,i.contexts=[],i.add(Object(A.a)(i,n)),i}return r.a(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r<n;r++)e[r].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,r=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(r),r.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new x.a,r={buffer:[],subscription:n};e.push(r);var i=Object(A.a)(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))},e}(I.a);function C(t){return function(e){return e.lift(new D(t))}}var D=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new O(t,this.closingSelector))},t}(),O=function(t){function e(e,n){var r=t.call(this,e)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return r.a(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},e.prototype.notifyNext=function(){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new x.a,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(Object(i.c)(e,new i.a(this))),this.subscribing=!1},e}(i.b);function z(t){return function(e){var n=new P(t),r=e.lift(n);return n.caught=r}}var P=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new R(t,this.selector,this.caught))},t}(),R=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var r=new i.a(this);this.add(r);var o=Object(i.c)(n,r);o!==r&&this.add(o)}},e}(i.b),B=n(52);function U(t){return function(e){return e.lift(new B.a(t))}}var Y=n(7),F=n(12);function W(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null;return"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(Y.a)(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(Object(F.a)([e].concat(t)),new B.a(n))}}var Q=n(34);function H(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Q.a.apply(void 0,[e].concat(t)))}}var G=n(74),Z=n(28);function V(t,e){return Object(Z.b)(t,e,1)}function q(t,e){return V((function(){return t}),e)}function J(t){return function(e){return e.lift(new K(t,e))}}var K=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new X(t,this.predicate,this.source))},t}(),X=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.count=0,i.index=0,i}return r.a(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(p.a);function $(t){return function(e){return e.lift(new tt(t))}}var tt=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new et(t,this.durationSelector))},t}(),et=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.a(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=Object(i.c)(e,new i.a(this)))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=void 0,n.unsubscribe(),this.remove(n)),this.value=void 0,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(i.b);function nt(t,e){return void 0===e&&(e=u.a),function(n){return n.lift(new rt(t,e))}}var rt=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new it(t,this.dueTime,this.scheduler))},t}(),it=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return r.a(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(ot,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(p.a);function ot(t){t.debouncedNext()}function at(t){return void 0===t&&(t=null),function(e){return e.lift(new st(t))}}var st=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new ut(t,this.defaultValue))},t}(),ut=function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}return r.a(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(p.a);function ct(t){return t instanceof Date&&!isNaN(+t)}var lt=n(18);function ht(t,e){void 0===e&&(e=u.a);var n=ct(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new dt(n,e))}}var dt=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new ft(t,this.delay,this.scheduler))},t}(),ft=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.delay=n,i.scheduler=r,i.queue=[],i.active=!1,i.errored=!1,i}return r.a(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,i=t.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(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new pt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(lt.a.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(lt.a.createComplete()),this.unsubscribe()},e}(p.a),pt=function(t,e){this.time=t,this.notification=e},mt=n(3);function gt(t,e){return e?function(n){return new wt(n,e).lift(new yt(t))}:function(e){return e.lift(new yt(t))}}var yt=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new bt(t,this.delayDurationSelector))},t}(),bt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=Object(A.a)(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(I.a),wt=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return r.a(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new vt(t,this.source))},e}(mt.a),vt=function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return r.a(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(p.a);function Mt(){return function(t){return t.lift(new Lt)}}var Lt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new _t(t))},t}(),_t=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(p.a);function Nt(t,e){return function(n){return n.lift(new Et(t,e))}}var Et=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new St(t,this.keySelector,this.flushes))},t}(),St=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.keySelector=n,o.values=new Set,r&&o.add(Object(i.c)(r,new i.a(o))),o}return r.a(e,t),e.prototype.notifyNext=function(){this.values.clear()},e.prototype.notifyError=function(t){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(i.b);function xt(t,e){return function(n){return n.lift(new At(t,e))}}var At=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new It(t,this.compare,this.keySelector))},t}(),It=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}return r.a(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(p.a);function kt(t,e){return xt((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}var jt=n(25),Tt=n(17),Ct=n(27);function Dt(t){return void 0===t&&(t=Pt),function(e){return e.lift(new Ot(t))}}var Ot=function(){function t(t){this.errorFactory=t}return t.prototype.call=function(t,e){return e.subscribe(new zt(t,this.errorFactory))},t}(),zt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.a(e,t),e.prototype._next=function(t){this.hasValue=!0,this.destination.next(t)},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var t=void 0;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)},e}(p.a);function Pt(){return new Ct.a}var Rt=n(11);function Bt(t){return function(e){return 0===t?Object(Rt.b)():e.lift(new Ut(t))}}var Ut=function(){function t(t){if(this.total=t,this.total<0)throw new jt.a}return t.prototype.call=function(t,e){return e.subscribe(new Yt(t,this.total))},t}(),Yt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(p.a);function Ft(t,e){if(t<0)throw new jt.a;var n=arguments.length>=2;return function(r){return r.pipe(Object(Tt.a)((function(e,n){return n===t})),Bt(1),n?at(e):Dt((function(){return new jt.a})))}}var Wt=n(39);function Qt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Object(Q.a)(e,Wt.a.apply(void 0,t))}}function Ht(t,e){return function(n){return n.lift(new Gt(t,e,n))}}var Gt=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new Zt(t,this.predicate,this.thisArg,this.source))},t}(),Zt=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=r,o.source=i,o.index=0,o.thisArg=r||o,o}return r.a(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(p.a);function Vt(){return function(t){return t.lift(new qt)}}var qt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Jt(t))},t}(),Jt=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return r.a(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(Object(i.c)(t,new i.a(this))))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(i.b),Kt=n(9);function Xt(t,e){return e?function(n){return n.pipe(Xt((function(n,r){return Object(F.a)(t(n,r)).pipe(Object(Kt.a)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new $t(t))}}var $t=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new te(t,this.project))},t}(),te=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.hasSubscription=!0,this._innerSub(e)},e.prototype._innerSub=function(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(i.b);function ee(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(r){return r.lift(new ne(t,e,n))}}var ne=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new re(t,this.project,this.concurrent,this.scheduler))},t}(),re=function(t){function e(e,n,r,i){var o=t.call(this,e)||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.a(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,r=t.value,i=t.index;e.subscribeToProjection(n,r,i)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(t);try{var i=(0,this.project)(t,r);if(this.scheduler){var o={subscriber:this,result:i,value:t,index:r};this.destination.add(this.scheduler.schedule(e.dispatch,0,o))}else this.subscribeToProjection(i,t,r)}catch(t){n.error(t)}}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(Object(i.c)(t,new i.a(this)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this._next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(i.b);function ie(t){return function(e){return e.lift(new oe(t))}}var oe=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new ae(t,this.callback))},t}(),ae=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new x.a(n)),r}return r.a(e,t),e}(p.a);function se(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new ue(t,n,!1,e))}}var ue=function(){function t(t,e,n,r){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=r}return t.prototype.call=function(t,e){return e.subscribe(new ce(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),ce=function(t){function e(e,n,r,i,o){var a=t.call(this,e)||this;return a.predicate=n,a.source=r,a.yieldIndex=i,a.thisArg=o,a.index=0,a}return r.a(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(p.a);function le(t,e){return function(n){return n.lift(new ue(t,n,!0,e))}}var he=n(15);function de(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(Tt.a)((function(e,n){return t(e,n,r)})):he.a,Bt(1),n?at(e):Dt((function(){return new Ct.a})))}}var fe=n(67);function pe(){return function(t){return t.lift(new me)}}var me=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ge(t))},t}(),ge=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e.prototype._next=function(t){},e}(p.a);function ye(){return function(t){return t.lift(new be)}}var be=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new we(t))},t}(),we=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(p.a);function ve(t){return function(e){return 0===t?Object(Rt.b)():e.lift(new Me(t))}}var Me=function(){function t(t){if(this.total=t,this.total<0)throw new jt.a}return t.prototype.call=function(t,e){return e.subscribe(new Le(t,this.total))},t}(),Le=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length<n?e.push(t):e[r%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i<n;i++){var o=e++%n;t.next(r[o])}t.complete()},e}(p.a);function _e(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(Tt.a)((function(e,n){return t(e,n,r)})):he.a,ve(1),n?at(e):Dt((function(){return new Ct.a})))}}function Ne(t){return function(e){return e.lift(new Ee(t))}}var Ee=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new Se(t,this.value))},t}(),Se=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return r.a(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(p.a);function xe(){return function(t){return t.lift(new Ae)}}var Ae=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ie(t))},t}(),Ie=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype._next=function(t){this.destination.next(lt.a.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(lt.a.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(lt.a.createComplete()),t.complete()},e}(p.a);function ke(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new je(t,e,n))}}var je=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new Te(t,this.accumulator,this.seed,this.hasSeed))},t}(),Te=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return r.a(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(p.a),Ce=n(41);function De(t,e){return arguments.length>=2?function(n){return Object(Ce.a)(ke(t,e),ve(1),at(e))(n)}:function(e){return Object(Ce.a)(ke((function(e,n,r){return t(e,n,r+1)})),ve(1))(e)}}function Oe(t){return De("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}var ze=n(75);function Pe(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(ze.a.apply(void 0,[e].concat(t)))}}var Re=n(53);function Be(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?Object(Z.b)((function(){return t}),e,n):("number"==typeof e&&(n=e),Object(Z.b)((function(){return t}),n))}function Ue(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new Ye(t,e,n))}}var Ye=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new Fe(t,this.accumulator,this.seed,this.concurrent))},t}(),Fe=function(t){function e(e,n,r,i){var o=t.call(this,e)||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.a(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,t,e)}catch(t){return n.error(t)}this.active++,this._innerSub(r)}else this.buffer.push(t)},e.prototype._innerSub=function(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r)},e.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()},e.prototype.notifyNext=function(t){var e=this.destination;this.acc=t,this.hasValue=!0,e.next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(i.b);function We(t){return De("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}var Qe=n(70);function He(t,e){return function(n){var r;if(r="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new Ge(r,e));var i=Object.create(n,Qe.b);return i.source=n,i.subjectFactory=r,i}}var Ge=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}(),Ze=n(72);function Ve(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Object(Y.a)(t[0])&&(t=t[0]),function(e){return e.lift(new qe(t))}}var qe=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new Je(t,this.nextSources))},t}(),Je=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.nextSources=n,r}return r.a(e,t),e.prototype.notifyError=function(){this.subscribeToNextSource()},e.prototype.notifyComplete=function(){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r)}else this.destination.complete()},e}(i.b);function Ke(){return function(t){return t.lift(new Xe)}}var Xe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new $e(t))},t}(),$e=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return r.a(e,t),e.prototype._next=function(t){var e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)},e}(p.a),tn=n(83);function en(t,e){return function(n){return[Object(Tt.a)(t,e)(n),Object(Tt.a)(Object(tn.a)(t,e))(n)]}}function nn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Object(Kt.a)(function(t,e){return function(n){for(var r=n,i=0;i<e;i++){var o=null!=r?r[t[i]]:void 0;if(void 0===o)return;r=o}return r}}(t,n))(e)}}var rn=n(5);function on(t){return t?He((function(){return new rn.a}),t):He(new rn.a)}var an=n(71);function sn(t){return function(e){return He(new an.a(t))(e)}}var un=n(31);function cn(){return function(t){return He(new un.a)(t)}}var ln=n(50);function hn(t,e,n,r){n&&"function"!=typeof n&&(r=n);var i="function"==typeof n?n:void 0,o=new ln.a(t,e,r);return function(t){return He((function(){return o}),i)(t)}}var dn=n(76);function fn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&Object(Y.a)(t[0])&&(t=t[0]),e.lift.call(dn.a.apply(void 0,[e].concat(t)))}}function pn(t){return void 0===t&&(t=-1),function(e){return 0===t?Object(Rt.b)():t<0?e.lift(new mn(-1,e)):e.lift(new mn(t-1,e))}}var mn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new gn(t,this.count,this.source))},t}(),gn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.a(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(p.a);function yn(t){return function(e){return e.lift(new bn(t))}}var bn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new wn(t,this.notifier,e))},t}(),wn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i.sourceIsBeingSubscribedTo=!0,i}return r.a(e,t),e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new rn.a;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=Object(i.c)(e,new i.a(this))},e}(i.b);function vn(t){return void 0===t&&(t=-1),function(e){return e.lift(new Mn(t,e))}}var Mn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Ln(t,this.count,this.source))},t}(),Ln=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(p.a);function _n(t){return function(e){return e.lift(new Nn(t,e))}}var Nn=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new En(t,this.notifier,this.source))},t}(),En=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i}return r.a(e,t),e.prototype.error=function(e){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 rn.a;try{r=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}o=Object(i.c)(r,new i.a(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype.notifyNext=function(){var t=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=t,this.source.subscribe(this)},e}(i.b),Sn=n(49);function xn(t){return function(e){return e.lift(new An(t))}}var An=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new In(t),r=e.subscribe(n);return r.add(Object(i.c)(this.notifier,new i.a(n))),r},t}(),In=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return r.a(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(i.b);function kn(t,e){return void 0===e&&(e=u.a),function(n){return n.lift(new jn(t,e))}}var jn=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Tn(t,this.period,this.scheduler))},t}(),Tn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.period=n,i.scheduler=r,i.hasValue=!1,i.add(r.schedule(Cn,n,{subscriber:i,period:n})),i}return r.a(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(p.a);function Cn(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Dn(t,e){return function(n){return n.lift(new On(t,e))}}var On=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new zn(t,this.compareTo,this.comparator))},t}(),zn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.compareTo=n,i.comparator=r,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(n.subscribe(new Pn(e,i))),i}return r.a(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this._a,e=this._b,n=this.comparator;t.length>0&&e.length>0;){var r=t.shift(),i=e.shift(),o=!1;try{o=n?n(r,i):r===i}catch(t){this.destination.error(t)}o||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(p.a),Pn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return r.a(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(p.a);function Rn(){return new rn.a}function Bn(){return function(t){return Object(Sn.a)()(He(Rn)(t))}}function Un(t,e,n){var r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,r=t.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=t.windowTime,a=void 0===o?Number.POSITIVE_INFINITY:o,s=t.refCount,u=t.scheduler,c=0,l=!1,h=!1;return function(t){var r;c++,!e||l?(l=!1,e=new ln.a(i,a,u),r=e.subscribe(this),n=t.subscribe({next:function(t){e.next(t)},error:function(t){l=!0,e.error(t)},complete:function(){h=!0,n=void 0,e.complete()}}),h&&(n=void 0)):r=e.subscribe(this),this.add((function(){c--,r.unsubscribe(),r=void 0,n&&!h&&s&&0===c&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(r))}}function Yn(t){return function(e){return e.lift(new Fn(t,e))}}var Fn=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Wn(t,this.predicate,this.source))},t}(),Wn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.seenValue=!1,i.index=0,i}return r.a(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new Ct.a)},e}(p.a);function Qn(t){return function(e){return e.lift(new Hn(t))}}var Hn=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new Gn(t,this.total))},t}(),Gn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(p.a);function Zn(t){return function(e){return e.lift(new Vn(t))}}var Vn=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new jt.a}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new p.a(t)):e.subscribe(new qn(t,this._skipCount))},t}(),qn=function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.a(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var r=n%e,i=this._ring,o=i[r];i[r]=t,this.destination.next(o)}},e}(p.a);function Jn(t){return function(e){return e.lift(new Kn(t))}}var Kn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Xn(t,this.notifier))},t}(),Xn=function(t){function e(e,n){var r=t.call(this,e)||this;r.hasValue=!1;var o=new i.a(r);r.add(o),r.innerSubscription=o;var a=Object(i.c)(n,o);return a!==o&&(r.add(a),r.innerSubscription=a),r}return r.a(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(i.b);function $n(t){return function(e){return e.lift(new tr(t))}}var tr=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new er(t,this.predicate))},t}(),er=function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(t){this.destination.error(t)}},e}(p.a);function nr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(w.a)(n)?(t.pop(),function(e){return Object(Q.a)(t,e,n)}):function(e){return Object(Q.a)(t,e)}}var rr=n(42),ir=n(33),or=function(t){function e(e,n,r){void 0===n&&(n=0),void 0===r&&(r=rr.a);var i=t.call(this)||this;return i.source=e,i.delayTime=n,i.scheduler=r,(!Object(ir.a)(n)||n<0)&&(i.delayTime=0),r&&"function"==typeof r.schedule||(i.scheduler=rr.a),i}return r.a(e,t),e.create=function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=rr.a),new e(t,n,r)},e.dispatch=function(t){var e=t.source,n=t.subscriber;return this.add(e.subscribe(n))},e.prototype._subscribe=function(t){var n=this.delayTime,r=this.source;return this.scheduler.schedule(e.dispatch,n,{source:r,subscriber:t})},e}(mt.a);function ar(t,e){return void 0===e&&(e=0),function(n){return n.lift(new sr(t,e))}}var sr=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new or(e,this.delay,this.scheduler).subscribe(t)},t}();function ur(t,e){return"function"==typeof e?function(n){return n.pipe(ur((function(n,r){return Object(F.a)(t(n,r)).pipe(Object(Kt.a)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new cr(t))}}var cr=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new lr(t,this.project))},t}(),lr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e)},e.prototype._innerSub=function(t){var e=this.innerSubscription;e&&e.unsubscribe();var n=new i.a(this),r=this.destination;r.add(n),this.innerSubscription=Object(i.c)(t,n),this.innerSubscription!==n&&r.add(this.innerSubscription)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=void 0},e.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t){this.destination.next(t)},e}(i.b);function hr(){return ur(he.a)}function dr(t,e){return e?ur((function(){return t}),e):ur((function(){return t}))}function fr(t){return function(e){return e.lift(new pr(t))}}var pr=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new mr(t),r=Object(i.c)(this.notifier,new i.a(n));return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n},t}(),mr=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return r.a(e,t),e.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(i.b);function gr(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new yr(t,e))}}var yr=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new br(t,this.predicate,this.inclusive))},t}(),br=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.inclusive=r,i.index=0,i}return r.a(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void n.error(t)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())},e}(p.a),wr=n(21),vr=n(26);function Mr(t,e,n){return function(r){return r.lift(new Lr(t,e,n))}}var Lr=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new _r(t,this.nextOrObserver,this.error,this.complete))},t}(),_r=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o._tapNext=wr.a,o._tapError=wr.a,o._tapComplete=wr.a,o._tapError=r||wr.a,o._tapComplete=i||wr.a,Object(vr.a)(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||wr.a,o._tapError=n.error||wr.a,o._tapComplete=n.complete||wr.a),o}return r.a(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(p.a),Nr={leading:!0,trailing:!1};function Er(t,e){return void 0===e&&(e=Nr),function(n){return n.lift(new Sr(t,!!e.leading,!!e.trailing))}}var Sr=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new xr(t,this.durationSelector,this.leading,this.trailing))},t}(),xr=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.destination=e,o.durationSelector=n,o._leading=r,o._trailing=i,o._hasValue=!1,o}return r.a(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=void 0},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=Object(i.c)(e,new i.a(this)))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=void 0,e&&this.send()},e.prototype.notifyNext=function(){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(i.b);function Ar(t,e,n){return void 0===e&&(e=u.a),void 0===n&&(n=Nr),function(r){return r.lift(new Ir(t,e,n.leading,n.trailing))}}var Ir=function(){function t(t,e,n,r){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=r}return t.prototype.call=function(t,e){return e.subscribe(new kr(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),kr=function(t){function e(e,n,r,i,o){var a=t.call(this,e)||this;return a.duration=n,a.scheduler=r,a.leading=i,a.trailing=o,a._hasTrailingValue=!1,a._trailingValue=null,a}return r.a(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(jr,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(p.a);function jr(t){t.subscriber.clearThrottle()}var Tr=n(54);function Cr(t){return void 0===t&&(t=u.a),function(e){return Object(Tr.a)((function(){return e.pipe(ke((function(e,n){var r=e.current;return{value:n,current:t.now(),last:r}}),{current:t.now(),value:void 0,last:void 0}),Object(Kt.a)((function(t){var e=t.current,n=t.last,r=t.value;return new Dr(r,e-n)})))}))}}var Dr=function(t,e){this.value=t,this.interval=e},Or=n(73);function zr(t,e,n){return void 0===n&&(n=u.a),function(r){var i=ct(t),o=i?+t-n.now():Math.abs(t);return r.lift(new Pr(o,i,e,n))}}var Pr=function(){function t(t,e,n,r){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new Rr(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Rr=function(t){function e(e,n,r,i,o){var a=t.call(this,e)||this;return a.absoluteTimeout=n,a.waitFor=r,a.withObservable=i,a.scheduler=o,a.scheduleTimeout(),a}return r.a(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(Object(i.c)(e,new i.a(t)))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},e}(i.b),Br=n(51);function Ur(t,e){return void 0===e&&(e=u.a),zr(t,Object(Br.a)(new Or.a),e)}function Yr(t){return void 0===t&&(t=u.a),Object(Kt.a)((function(e){return new Fr(e,t.now())}))}var Fr=function(t,e){this.value=t,this.timestamp=e};function Wr(t,e,n){return 0===n?[e]:(t.push(e),t)}function Qr(){return De(Wr,[])}function Hr(t){return function(e){return e.lift(new Gr(t))}}var Gr=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new Zr(t),r=e.subscribe(n);return r.closed||n.add(Object(i.c)(this.windowBoundaries,new i.a(n))),r},t}(),Zr=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new rn.a,e.next(n.window),n}return r.a(e,t),e.prototype.notifyNext=function(){this.openWindow()},e.prototype.notifyError=function(t){this._error(t)},e.prototype.notifyComplete=function(){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new rn.a;e.next(n)},e}(i.b);function Vr(t,e){return void 0===e&&(e=0),function(n){return n.lift(new qr(t,e))}}var qr=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new Jr(t,this.windowSize,this.startWindowEvery))},t}(),Jr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.destination=e,i.windowSize=n,i.startWindowEvery=r,i.windows=[new rn.a],i.count=0,e.next(i.windows[0]),i}return r.a(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,o=i.length,a=0;a<o&&!this.closed;a++)i[a].next(t);var s=this.count-r+1;if(s>=0&&s%e==0&&!this.closed&&i.shift().complete(),++this.count%e==0&&!this.closed){var u=new rn.a;i.push(u),n.next(u)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(p.a);function Kr(t){var e=u.a,n=null,r=Number.POSITIVE_INFINITY;return Object(w.a)(arguments[3])&&(e=arguments[3]),Object(w.a)(arguments[2])?e=arguments[2]:Object(ir.a)(arguments[2])&&(r=Number(arguments[2])),Object(w.a)(arguments[1])?e=arguments[1]:Object(ir.a)(arguments[1])&&(n=Number(arguments[1])),function(i){return i.lift(new Xr(t,n,r,e))}}var Xr=function(){function t(t,e,n,r){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new ti(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),$r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return r.a(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(rn.a),ti=function(t){function e(e,n,r,i,o){var a=t.call(this,e)||this;a.destination=e,a.windowTimeSpan=n,a.windowCreationInterval=r,a.maxWindowSize=i,a.scheduler=o,a.windows=[];var s=a.openWindow();if(null!==r&&r>=0){var u={subscriber:a,window:s,context:null},c={windowTimeSpan:n,windowCreationInterval:r,subscriber:a,scheduler:o};a.add(o.schedule(ri,n,u)),a.add(o.schedule(ni,r,c))}else{var l={subscriber:a,window:s,windowTimeSpan:n};a.add(o.schedule(ei,n,l))}return a}return r.a(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r<n;r++){var i=e[r];i.closed||(i.next(t),i.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(i))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new $r;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(p.a);function ei(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n)}function ni(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,i=t.windowCreationInterval,o=n.openWindow(),a={action:this,subscription:null},s={subscriber:n,window:o,context:a};a.subscription=r.schedule(ri,e,s),this.add(a.subscription),this.schedule(t,i)}function ri(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n)}function ii(t,e){return function(n){return n.lift(new oi(t,e))}}var oi=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new ai(t,this.openings,this.closingSelector))},t}(),ai=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(i.openSubscription=Object(A.a)(i,n,n)),i}return r.a(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r<n;r++)e[r].window.next(t)},e.prototype._error=function(e){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(e),o.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,r=-1;++r<n;){var i=e[r];i.window.complete(),i.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var r=t[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,r,i){if(t===this.openings){var o=void 0;try{o=(0,this.closingSelector)(e)}catch(t){return this.error(t)}var a=new rn.a,s=new x.a,u={window:a,subscription:s};this.contexts.push(u);var c=Object(A.a)(this,o,u);c.closed?this.closeWindow(this.contexts.length-1):(c.context=u,s.add(c)),this.destination.next(a)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],r=n.window,i=n.subscription;e.splice(t,1),r.complete(),i.unsubscribe()}},e}(I.a);function si(t){return function(e){return e.lift(new ui(t))}}var ui=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new ci(t,this.closingSelector))},t}(),ci=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.closingSelector=n,r.openWindow(),r}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.openWindow(i)},e.prototype.notifyError=function(t){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n,r=this.window=new rn.a;this.destination.next(r);try{n=(0,this.closingSelector)()}catch(t){return this.destination.error(t),void this.window.error(t)}this.add(this.closingNotification=Object(A.a)(this,n))},e}(I.a);function li(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"==typeof t[t.length-1]&&(n=t.pop());var r=t;return e.lift(new hi(r,n))}}var hi=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new di(t,this.observables,this.project))},t}(),di=function(t){function e(e,n,r){var i=t.call(this,e)||this;i.observables=n,i.project=r,i.toRespond=[];var o=n.length;i.values=new Array(o);for(var a=0;a<o;a++)i.toRespond.push(a);for(a=0;a<o;a++){var s=n[a];i.add(Object(A.a)(i,s,void 0,a))}return i}return r.a(e,t),e.prototype.notifyNext=function(t,e,n){this.values[n]=e;var r=this.toRespond;if(r.length>0){var i=r.indexOf(n);-1!==i&&r.splice(i,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(I.a),fi=n(55);function pi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(fi.b.apply(void 0,[e].concat(t)))}}function mi(t){return function(e){return e.lift(new fi.a(t))}}},function(t,e,n){n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return l}));var r=n(0),i=n(5),o=n(3),a=n(1),s=n(4),u=n(49),c=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.a(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new s.a).add(this.source.subscribe(new h(this.getSubject(),this))),t.closed&&(this._connection=null,t=s.a.EMPTY)),t},e.prototype.refCount=function(){return Object(u.a)()(this)},e}(o.a),l=function(){var t=c.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),h=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(i.b);a.a},function(t,e,n){n.d(e,"a",(function(){return a}));var r=n(0),i=n(5),o=n(23),a=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.a(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.a;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.a)},function(t,e,n){n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return u}));var r=n(0),i=n(1),o=n(18);function a(t,e){return void 0===e&&(e=0),function(n){return n.lift(new s(t,e))}}var s=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.scheduler,this.delay))},t}(),u=function(t){function e(e,n,r){void 0===r&&(r=0);var i=t.call(this,e)||this;return i.scheduler=n,i.delay=r,i}return r.a(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new c(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(o.a.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(o.a.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(o.a.createComplete()),this.unsubscribe()},e}(i.a),c=function(t,e){this.notification=t,this.destination=e}},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}()},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(53);function i(){return Object(r.a)(1)}},function(t,e,n){n.d(e,"a",(function(){return s}));var r=n(3),i=n(10),o=n(53),a=n(29);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,s=null,u=t[t.length-1];return Object(i.a)(u)?(s=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof u&&(n=t.pop()),null===s&&1===t.length&&t[0]instanceof r.a?t[0]:Object(o.a)(n)(Object(a.a)(t,s))}},function(t,e,n){n.d(e,"a",(function(){return u}));var r=n(0),i=n(7),o=n(29),a=n(16),s=n(13);function u(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!Object(i.a)(t[0]))return t[0];t=t[0]}return Object(o.a)(t,void 0).lift(new c)}var c=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new l(t))},t}(),l=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return r.a(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],i=Object(s.a)(this,r,void 0,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},e.prototype.notifyNext=function(t,e,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(e)},e}(a.a)},function(t,e,n){n.d(e,"a",(function(){return s}));var r=n(3),i=n(6),o=n(33),a=n(10);function s(t,e,n){void 0===t&&(t=0);var s=-1;return Object(o.a)(e)?s=Number(e)<1?1:Number(e):Object(a.a)(e)&&(n=e),Object(a.a)(n)||(n=i.a),new r.a((function(e){var r=Object(o.a)(t)?t:+t-n.now();return n.schedule(u,r,{index:0,period:s,subscriber:e})}))}function u(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}},function(t,e,n){n.d(e,"a",(function(){return l}));var r=n(3),i=n(4),o=n(22),a=n(58),s=n(20),u=n(82),c=n(81);function l(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[o.a]}(t))return function(t,e){return new r.a((function(n){var r=new i.a;return r.add(e.schedule((function(){var i=t[o.a]();r.add(i.subscribe({next:function(t){r.add(e.schedule((function(){return n.next(t)})))},error:function(t){r.add(e.schedule((function(){return n.error(t)})))},complete:function(){r.add(e.schedule((function(){return n.complete()})))}}))}))),r}))}(t,e);if(Object(u.a)(t))return function(t,e){return new r.a((function(n){var r=new i.a;return r.add(e.schedule((function(){return t.then((function(t){r.add(e.schedule((function(){n.next(t),r.add(e.schedule((function(){return n.complete()})))})))}),(function(t){r.add(e.schedule((function(){return n.error(t)})))}))}))),r}))}(t,e);if(Object(c.a)(t))return Object(a.a)(t,e);if(function(t){return t&&"function"==typeof t[s.a]}(t)||"string"==typeof t)return function(t,e){if(!t)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(e.schedule((function(){r=t[s.a](),o.add(e.schedule((function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}})))}))),o}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(0),i=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.a(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(n(4).a)},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.complete()}}},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},function(t,e,n){function r(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,"a",(function(){return r}))},function(t,e,n){function r(t,e){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}n.d(e,"a",(function(){return r}))},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=e.CoinbaseWalletSDK=void 0;const r=n(101),i=n(85);var o=n(101);Object.defineProperty(e,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return o.CoinbaseWalletSDK}});var a=n(85);Object.defineProperty(e,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return a.CoinbaseWalletProvider}}),e.default=r.CoinbaseWalletSDK,"undefined"!=typeof window&&(window.CoinbaseWalletSDK=r.CoinbaseWalletSDK,window.CoinbaseWalletProvider=i.CoinbaseWalletProvider,window.WalletLink=r.CoinbaseWalletSDK,window.WalletLinkProvider=i.CoinbaseWalletProvider)},function(t,e,n){(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=void 0;const i=r(n(64)),o=r(n(66)),a=n(86),s=n(89),u=n(90),c=n(107),l=n(38),h=r(n(152)),d=n(168),f=n(169),p=n(170);class m extends i.default{constructor(t){var e,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=t.jsonRpcUrl,this._overrideIsMetaMask=t.overrideIsMetaMask,this._relayProvider=t.relayProvider,this._storage=t.storage,this._relayEventManager=t.relayEventManager,this.diagnostic=t.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e,this.isCoinbaseBrowser=null!==(n=t.overrideIsCoinbaseBrowser)&&void 0!==n&&n,this.qrUrl=t.qrUrl,this.supportsAddressSwitching=t.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 t=o.split(" ");""!==t[0]&&(this._addresses=t.map((t=>(0,l.ensureAddressString)(t))),this.emit("accountsChanged",t))}this._subscriptionManager.events.on("notification",(t=>{this.emit("message",{type:t.method,data:t.params})})),this._addresses.length>0&&this.initializeRelay(),window.addEventListener("message",(t=>{var e;if("walletLinkMessage"===t.data.type&&"defaultChainChanged"===t.data.data.action){const n=t.data.data.chainId,r=null!==(e=t.data.data.jsonRpcUrl)&&void 0!==e?e: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 t;return null!==(t=this._storage.getItem("DefaultJsonRpcUrl"))&&void 0!==t?t:this._jsonRpcUrlFromOpts}set jsonRpcUrl(t){this._storage.setItem("DefaultJsonRpcUrl",t)}get isChainOverridden(){return"true"===this._storage.getItem("HasChainOverriddenFromRelay")}set isChainOverridden(t){this._storage.setItem("HasChainOverriddenFromRelay",t.toString())}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(t,e){this.isChainOverridden||this.updateProviderInfo(t,this.getChainId(),!1)}updateProviderInfo(t,e,n){if("true"===this._storage.getItem("HasChainBeenSwitched")&&n)return;n&&(this.isChainOverridden=!0),this.jsonRpcUrl=t;const r=this.getChainId();this._storage.setItem("DefaultChainId",e.toString(10)),(0,l.ensureIntNumber)(e)===r&&this.hasMadeFirstChainChangedEmission||(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(t,e,n,r,i,o){const a=await this.initializeRelay();return!!(await a.watchAsset(t,e,n,r,i,null==o?void 0:o.toString()).promise).result}async addEthereumChain(t,e,n,r,i,o){var a,s;if((0,l.ensureIntNumber)(t)===this.getChainId())return!1;const u=await this.initializeRelay(),c=u.inlineAddEthereumChain(t.toString());this._isAuthorized()||c||await u.requestEthereumAccounts().promise;const h=await u.addEthereumChain(t.toString(),e,i,n,r,o).promise;return!0===(null===(a=h.result)||void 0===a?void 0:a.isApproved)&&(this._storage.setItem("HasChainBeenSwitched","true"),this.updateProviderInfo(e[0],t,!1)),!0===(null===(s=h.result)||void 0===s?void 0:s.isApproved)}async switchEthereumChain(t){if((0,l.ensureIntNumber)(t)===this.getChainId())return;const e=await this.initializeRelay(),n=await e.switchEthereumChain(t.toString(10)).promise;if(n.errorCode)throw a.ethErrors.provider.custom({code:n.errorCode});const r=n.result;r.isApproved&&r.rpcUrl.length>0&&(this._storage.setItem("HasChainBeenSwitched","true"),this.updateProviderInfo(r.rpcUrl,t,!1))}setAppInfo(t,e){this.initializeRelay().then((n=>n.setAppInfo(t,e)))}async enable(){var t;return null===(t=this.diagnostic)||void 0===t||t.log(s.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?u.Session.hash(this._relay.session.id):void 0}),this._addresses.length>0?[...this._addresses]:await this._send(f.JSONRPCMethod.eth_requestAccounts)}async close(){(await this.initializeRelay()).resetAndReload()}send(t,e){if("string"==typeof t){const n={jsonrpc:"2.0",id:0,method:t,params:Array.isArray(e)?e:void 0!==e?[e]:[]};return this._sendRequestAsync(n).then((t=>t.result))}if("function"==typeof e){const n=t,r=e;return this._sendAsync(n,r)}if(Array.isArray(t))return t.map((t=>this._sendRequest(t)));const n=t;return this._sendRequest(n)}async sendAsync(t,e){if("function"!=typeof e)throw new Error("callback is required");if(Array.isArray(t)){const n=e;return void this._sendMultipleRequestsAsync(t).then((t=>n(null,t))).catch((t=>n(t,null)))}const n=e;return this._sendRequestAsync(t).then((t=>n(null,t))).catch((t=>n(t,null)))}async request(t){if(!t||"object"!=typeof t||Array.isArray(t))throw a.ethErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:t});const{method:e,params:n}=t;if("string"!=typeof e||0===e.length)throw a.ethErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:t});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw a.ethErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:t});const r=void 0===n?[]:n,i=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:e,params:r,jsonrpc:"2.0",id:i})).result}async scanQRCode(t){const e=await this.initializeRelay(),n=await e.scanQRCode((0,l.ensureRegExpString)(t)).promise;if("string"!=typeof n.result)throw new Error("result was not a string");return n.result}async genericRequest(t,e){const n=await this.initializeRelay(),r=await n.genericRequest(t,e).promise;if("string"!=typeof r.result)throw new Error("result was not a string");return r.result}async selectProvider(t){const e=await this.initializeRelay(),n=await e.selectProvider(t).promise;if("string"!=typeof n.result)throw new Error("result was not a string");return n.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(t){const e={jsonrpc:"2.0",id:t.id},{method:n}=t;if(e.result=this._handleSynchronousMethods(t),void 0===e.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 e}_setAddresses(t,e){if(!Array.isArray(t))throw new Error("addresses is not an array");const n=t.map((t=>(0,l.ensureAddressString)(t)));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses.length>0&&!1===this.supportsAddressSwitching&&!e||(this._addresses=n,this.emit("accountsChanged",this._addresses),this._storage.setItem(c.LOCAL_STORAGE_ADDRESSES_KEY,n.join(" "))))}_sendRequestAsync(t){return new Promise(((e,n)=>{try{const r=this._handleSynchronousMethods(t);if(void 0!==r)return e({jsonrpc:"2.0",id:t.id,result:r});const i=this._handleAsynchronousFilterMethods(t);if(void 0!==i)return void i.then((n=>e(Object.assign(Object.assign({},n),{id:t.id})))).catch((t=>n(t)));const o=this._handleSubscriptionMethods(t);if(void 0!==o)return void o.then((n=>e({jsonrpc:"2.0",id:t.id,result:n.result}))).catch((t=>n(t)))}catch(t){return n(t)}this._handleAsynchronousMethods(t).then((n=>n&&e(Object.assign(Object.assign({},n),{id:t.id})))).catch((t=>n(t)))}))}_sendMultipleRequestsAsync(t){return Promise.all(t.map((t=>this._sendRequestAsync(t))))}_handleSynchronousMethods(t){const{method:e}=t,n=t.params||[];switch(e){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(t){const{method:e}=t,n=t.params||[];switch(e){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(t,this.jsonRpcUrl)}_handleAsynchronousFilterMethods(t){const{method:e}=t,n=t.params||[];switch(e){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(t){switch(t.method){case f.JSONRPCMethod.eth_subscribe:case f.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(t)}}_isKnownAddress(t){try{const e=(0,l.ensureAddressString)(t);return this._addresses.map((t=>(0,l.ensureAddressString)(t))).includes(e)}catch(t){}return!1}_ensureKnownAddress(t){var e;if(!this._isKnownAddress(t))throw null===(e=this.diagnostic)||void 0===e||e.log(s.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const n=e.from?(0,l.ensureAddressString)(e.from):this.selectedAddress;if(!n)throw new Error("Ethereum address is unavailable");return this._ensureKnownAddress(n),{fromAddress:n,toAddress:e.to?(0,l.ensureAddressString)(e.to):null,weiValue:null!=e.value?(0,l.ensureBN)(e.value):new o.default(0),data:e.data?(0,l.ensureBuffer)(e.data):t.alloc(0),nonce:null!=e.nonce?(0,l.ensureIntNumber)(e.nonce):null,gasPriceInWei:null!=e.gasPrice?(0,l.ensureBN)(e.gasPrice):null,maxFeePerGas:null!=e.maxFeePerGas?(0,l.ensureBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:null!=e.maxPriorityFeePerGas?(0,l.ensureBN)(e.maxPriorityFeePerGas):null,gasLimit:null!=e.gas?(0,l.ensureBN)(e.gas):null,chainId:this.getChainId()}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw a.ethErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw a.ethErrors.provider.unsupportedMethod({})}async _signEthereumMessage(t,e,n,r){this._ensureKnownAddress(e);try{const i=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await i.signEthereumMessage(t,e,n,r).promise).result}}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw a.ethErrors.provider.userRejectedRequest("User denied message signature");throw t}}async _ethereumAddressFromSignedMessage(t,e,n){const r=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await r.ethereumAddressFromSignedMessage(t,e,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 t=this._storage.getItem("DefaultChainId")||"1",e=parseInt(t,10);return(0,l.ensureIntNumber)(e)}async _eth_requestAccounts(){var t;if(null===(t=this.diagnostic)||void 0===t||t.log(s.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?u.Session.hash(this._relay.session.id):void 0}),this._addresses.length>0)return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let e;try{const t=await this.initializeRelay();e=await t.requestEthereumAccounts().promise}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw a.ethErrors.provider.userRejectedRequest("User denied account authorization");throw t}if(!e.result)throw new Error("accounts received is empty");return this._setAddresses(e.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(t){this._requireAuthorization();const e=(0,l.ensureAddressString)(t[0]),n=(0,l.ensureBuffer)(t[1]);return this._signEthereumMessage(n,e,!1)}_eth_ecRecover(t){const e=(0,l.ensureBuffer)(t[0]),n=(0,l.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(e,n,!1)}_personal_sign(t){this._requireAuthorization();const e=(0,l.ensureBuffer)(t[0]),n=(0,l.ensureAddressString)(t[1]);return this._signEthereumMessage(e,n,!0)}_personal_ecRecover(t){const e=(0,l.ensureBuffer)(t[0]),n=(0,l.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(e,n,!0)}async _eth_signTransaction(t){this._requireAuthorization();const e=this._prepareTransactionParams(t[0]||{});try{const t=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await t.signEthereumTransaction(e).promise).result}}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw a.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw t}}async _eth_sendRawTransaction(t){const e=(0,l.ensureBuffer)(t[0]),n=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await n.submitEthereumTransaction(e,this.getChainId()).promise).result}}async _eth_sendTransaction(t){this._requireAuthorization();const e=this._prepareTransactionParams(t[0]||{});try{const t=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await t.signAndSubmitEthereumTransaction(e).promise).result}}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw a.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw t}}async _eth_signTypedData_v1(t){this._requireAuthorization();const e=(0,l.ensureParsedJSONObject)(t[0]),n=(0,l.ensureAddressString)(t[1]);this._ensureKnownAddress(n);const r=h.default.hashForSignTypedDataLegacy({data:e}),i=JSON.stringify(e,null,2);return this._signEthereumMessage(r,n,!1,i)}async _eth_signTypedData_v3(t){this._requireAuthorization();const e=(0,l.ensureAddressString)(t[0]),n=(0,l.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const r=h.default.hashForSignTypedData_v3({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,e,!1,i)}async _eth_signTypedData_v4(t){this._requireAuthorization();const e=(0,l.ensureAddressString)(t[0]),n=(0,l.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const r=h.default.hashForSignTypedData_v4({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,e,!1,i)}async _cbwallet_arbitrary(t){const e=t[0],n=t[1];if("string"!=typeof n)throw new Error("parameter must be a string");if("object"!=typeof e||null===e)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(e,n)}}async _wallet_addEthereumChain(t){var e,n,r,i;const o=t[0];if(0===(null===(e=o.rpcUrls)||void 0===e?void 0:e.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 a.ethErrors.provider.custom({code:0,message:"chainName is a required field"});if(!o.nativeCurrency)throw a.ethErrors.provider.custom({code:0,message:"nativeCurrency is a required field"});const s=parseInt(o.chainId,16);return await this.addEthereumChain(s,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(t){const e=t[0];return await this.switchEthereumChain(parseInt(e.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(t){const e=Array.isArray(t)?t[0]:t;if(!e.type)throw a.ethErrors.rpc.invalidParams({message:"Type is required"});if("ERC20"!==(null==e?void 0:e.type))throw a.ethErrors.rpc.invalidParams({message:`Asset of type '${e.type}' is not supported`});if(!(null==e?void 0:e.options))throw a.ethErrors.rpc.invalidParams({message:"Options are required"});if(!(null==e?void 0:e.options.address))throw a.ethErrors.rpc.invalidParams({message:"Address is required"});const n=this.getChainId(),{address:r,symbol:i,image:o,decimals:s}=e.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(e.type,r,i,s,o,n)}}_eth_uninstallFilter(t){const e=(0,l.ensureHexString)(t[0]);return this._filterPolyfill.uninstallFilter(e)}async _eth_newFilter(t){const e=t[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(e)}}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(t){const e=(0,l.ensureHexString)(t[0]);return this._filterPolyfill.getFilterChanges(e)}_eth_getFilterLogs(t){const e=(0,l.ensureHexString)(t[0]);return this._filterPolyfill.getFilterLogs(e)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then((t=>(t.setAccountsCallback(((t,e)=>this._setAddresses(t,e))),t.setChainCallback(((t,e)=>{this.updateProviderInfo(e,parseInt(t,10),!0)})),this._relay=t,t)))}}e.CoinbaseWalletProvider=m}).call(this,n(19).Buffer)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const r=n(87);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return r.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});const i=n(103);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=n(134);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const a=n(88);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const r=n(102);class i extends Error{constructor(t,e,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!=typeof e)throw new Error('"message" must be a nonempty string.');super(e),this.code=t,void 0!==n&&(this.data=n)}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return r.default(this.serialize(),o,2)}}function o(t,e){if("[Circular]"!==e)return e}e.EthereumRpcError=i,e.EthereumProviderError=class extends i{constructor(t,e,n){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,n)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.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}},e.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."}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EVENTS=void 0,e.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"}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Session=void 0;const r=n(48),i=n(69),o=n(135),a=n(38);class s{constructor(t,e,n,r){this._storage=t,this._id=e||(0,a.randomBytesHex)(16),this._secret=n||(0,a.randomBytesHex)(32),this._key=(new o.sha256).update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!r}static load(t){const e=t.getItem("session:id"),n=t.getItem("session:linked"),r=t.getItem("session:secret");return e&&r?new s(t,e,r,"1"===n):null}static get persistedSessionIdChange$(){return(0,r.fromEvent)(window,"storage").pipe((0,i.filter)((t=>"session:id"===t.key)),(0,i.map)((t=>({oldValue:t.oldValue||null,newValue:t.newValue||null}))))}static hash(t){return(new o.sha256).update(t).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(t){this._linked=t,this.persistLinked()}save(){return this._storage.setItem("session:id",this._id),this._storage.setItem("session:secret",this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem("session:linked",this._linked?"1":"0")}}e.Session=s},function(t,e,n){var r=SyntaxError,i=Function,o=TypeError,a=function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch(t){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(t){s=null}var u=function(){throw new o},c=s?function(){try{return u}catch(t){try{return s(arguments,"callee").get}catch(t){return u}}}():u,l=n(143)(),h=Object.getPrototypeOf||function(t){return t.__proto__},d={},f="undefined"==typeof Uint8Array?void 0:h(Uint8Array),p={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":l?h([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l?h(h([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l?h((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l?h((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l?h(""[Symbol.iterator]()):void 0,"%Symbol%":l?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":c,"%TypedArray%":f,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},m={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},g=n(92),y=n(146),b=g.call(Function.call,Array.prototype.concat),w=g.call(Function.apply,Array.prototype.splice),v=g.call(Function.call,String.prototype.replace),M=g.call(Function.call,String.prototype.slice),L=g.call(Function.call,RegExp.prototype.exec),_=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,E=function(t){var e=M(t,0,1),n=M(t,-1);if("%"===e&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new r("invalid intrinsic syntax, expected opening `%`");var i=[];return v(t,_,(function(t,e,n,r){i[i.length]=n?v(r,N,"$1"):e||t})),i},S=function(t,e){var n,i=t;if(y(m,i)&&(i="%"+(n=m[i])[0]+"%"),y(p,i)){var s=p[i];if(s===d&&(s=function t(e){var n;if("%AsyncFunction%"===e)n=a("async function () {}");else if("%GeneratorFunction%"===e)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=a("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(n=h(i.prototype))}return p[e]=n,n}(i)),void 0===s&&!e)throw new o("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:s}}throw new r("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');if(null===L(/^%?[^%]*%?$/g,t))throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=E(t),i=n.length>0?n[0]:"",a=S("%"+i+"%",e),u=a.name,c=a.value,l=!1,h=a.alias;h&&(i=h[0],w(n,b([0,1],h)));for(var d=1,f=!0;d<n.length;d+=1){var m=n[d],g=M(m,0,1),v=M(m,-1);if(('"'===g||"'"===g||"`"===g||'"'===v||"'"===v||"`"===v)&&g!==v)throw new r("property names with quotes must have matching quotes");if("constructor"!==m&&f||(l=!0),y(p,u="%"+(i+="."+m)+"%"))c=p[u];else if(null!=c){if(!(m in c)){if(!e)throw new o("base intrinsic for "+t+" exists, but the property is not available.");return}if(s&&d+1>=n.length){var _=s(c,m);c=(f=!!_)&&"get"in _&&!("originalValue"in _.get)?_.get:c[m]}else f=y(c,m),c=c[m];f&&!l&&(p[u]=c)}}return c}},function(t,e,n){var r=n(145);t.exports=Function.prototype.bind||r},function(t,e,n){var r=String.prototype.replace,i=/%20/g,o="RFC3986";t.exports={default:o,formatters:{RFC1738:function(t){return r.call(t,i,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:o}},function(t,e,n){var r=n(46).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,n,o){if("function"==typeof n)return t(e,null,n);n||(n={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.apply(this,r)}}}(o||i);var a=n.readable||!1!==n.readable&&e.readable,s=n.writable||!1!==n.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){s=!1,c=!0,a||o.call(e)},h=e._readableState&&e._readableState.endEmitted,d=function(){a=!1,h=!0,s||o.call(e)},f=function(t){o.call(e,t)},p=function(){var t;return a&&!h?(e._readableState&&e._readableState.ended||(t=new r),o.call(e,t)):s&&!c?(e._writableState&&e._writableState.ended||(t=new r),o.call(e,t)):void 0},m=function(){e.req.on("finish",l)};return function(t){return t.setHeader&&"function"==typeof t.abort}(e)?(e.on("complete",l),e.on("abort",p),e.req?m():e.on("request",m)):s&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",d),e.on("finish",l),!1!==n.error&&e.on("error",f),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",d),e.removeListener("error",f),e.removeListener("close",p)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const r=n(102);class i extends Error{constructor(t,e,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!=typeof e)throw new Error('"message" must be a nonempty string.');super(e),this.code=t,void 0!==n&&(this.data=n)}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return r.default(this.serialize(),o,2)}}function o(t,e){if("[Circular]"!==e)return e}e.EthereumRpcError=i,e.EthereumProviderError=class extends i{constructor(t,e,n){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,n)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.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}},e.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."}}},function(t,e,n){const r=n(64).default;t.exports=class extends r{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(t){this.updates=this.updates.concat(t),t.forEach((t=>this.emit("update",t)))}addInitialResults(t){}getChangesAndClear(){const t=this.updates;return this.updates=[],t}}},function(t,e){function n(t){return null==t?t:Number.parseInt(t,16)}function r(t){return null==t?t:"0x"+t.toString(16)}t.exports=async function({provider:t,fromBlock:e,toBlock:i}){e||(e=i);const o=n(e),a=n(i),s=Array(a-o+1).fill().map(((t,e)=>o+e)).map(r);return await Promise.all(s.map((e=>function(t,e,n){return new Promise(((e,r)=>{t.sendAsync({id:1,jsonrpc:"2.0",method:"eth_getBlockByNumber",params:n},((t,n)=>{if(t)return r(t);e(n.result)}))}))}(t,0,[e,!1]))))}},function(t,e,n){n.r(e),n.d(e,"useState",(function(){return m})),n.d(e,"useReducer",(function(){return g})),n.d(e,"useEffect",(function(){return y})),n.d(e,"useLayoutEffect",(function(){return b})),n.d(e,"useRef",(function(){return w})),n.d(e,"useImperativeHandle",(function(){return v})),n.d(e,"useMemo",(function(){return M})),n.d(e,"useCallback",(function(){return L})),n.d(e,"useContext",(function(){return _})),n.d(e,"useDebugValue",(function(){return N})),n.d(e,"useErrorBoundary",(function(){return E}));var r,i,o,a=n(8),s=0,u=[],c=a.options.__b,l=a.options.__r,h=a.options.diffed,d=a.options.__c,f=a.options.unmount;function p(t,e){a.options.__h&&a.options.__h(i,t,s||e),s=0;var n=i.__H||(i.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function m(t){return s=1,g(j,t)}function g(t,e,n){var o=p(r++,2);return o.t=t,o.__c||(o.__=[n?n(e):j(void 0,e),function(t){var e=o.t(o.__[0],t);o.__[0]!==e&&(o.__=[e,o.__[1]],o.__c.setState({}))}],o.__c=i),o.__}function y(t,e){var n=p(r++,3);!a.options.__s&&k(n.__H,e)&&(n.__=t,n.__H=e,i.__H.__h.push(n))}function b(t,e){var n=p(r++,4);!a.options.__s&&k(n.__H,e)&&(n.__=t,n.__H=e,i.__h.push(n))}function w(t){return s=5,M((function(){return{current:t}}),[])}function v(t,e,n){s=6,b((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==n?n:n.concat(t))}function M(t,e){var n=p(r++,7);return k(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function L(t,e){return s=8,M((function(){return t}),e)}function _(t){var e=i.context[t.__c],n=p(r++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(i)),e.props.value):t.__}function N(t,e){a.options.useDebugValue&&a.options.useDebugValue(e?e(t):t)}function E(t){var e=p(r++,10),n=m();return e.__=t,i.componentDidCatch||(i.componentDidCatch=function(t){e.__&&e.__(t),n[1](t)}),[n[0],function(){n[1](void 0)}]}function S(){for(var t;t=u.shift();)if(t.__P)try{t.__H.__h.forEach(A),t.__H.__h.forEach(I),t.__H.__h=[]}catch(e){t.__H.__h=[],a.options.__e(e,t.__v)}}a.options.__b=function(t){i=null,c&&c(t)},a.options.__r=function(t){l&&l(t),r=0;var e=(i=t.__c).__H;e&&(e.__h.forEach(A),e.__h.forEach(I),e.__h=[])},a.options.diffed=function(t){h&&h(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==u.push(e)&&o===a.options.requestAnimationFrame||((o=a.options.requestAnimationFrame)||function(t){var e,n=function(){clearTimeout(r),x&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);x&&(e=requestAnimationFrame(n))})(S)),i=null},a.options.__c=function(t,e){e.some((function(t){try{t.__h.forEach(A),t.__h=t.__h.filter((function(t){return!t.__||I(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],a.options.__e(n,t.__v)}})),d&&d(t,e)},a.options.unmount=function(t){f&&f(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{A(t)}catch(t){e=t}})),e&&a.options.__e(e,n.__v))};var x="function"==typeof requestAnimationFrame;function A(t){var e=i,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),i=e}function I(t){var e=i;t.__c=t.__(),i=e}function k(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function j(t,e){return"function"==typeof e?e(t):e}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.RelayMessageType=void 0,function(t){t.SESSION_ID_REQUEST="SESSION_ID_REQUEST",t.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",t.LINKED="LINKED",t.UNLINKED="UNLINKED",t.WEB3_REQUEST="WEB3_REQUEST",t.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",t.WEB3_RESPONSE="WEB3_RESPONSE"}(e.RelayMessageType||(e.RelayMessageType={}))},function(t,e,n){(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletSDK=void 0;const r=n(127),i=n(128),o=n(85),a=n(193),s=n(210),u=n(222),c=n(38),l=t.env.LINK_API_URL||"https://www.walletlink.org",h=t.env.SDK_VERSION||n(223).version||"unknown";class d{constructor(t){var e,n,r;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const o=t.linkAPIUrl||l;let c;if(c=t.uiConstructor?t.uiConstructor:t=>new a.WalletSDKUI(t),void 0===t.overrideIsMetaMask?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=t.overrideIsMetaMask,this._overrideIsCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e,this._overrideIsCoinbaseBrowser=null!==(n=t.overrideIsCoinbaseBrowser)&&void 0!==n&&n,t.diagnosticLogger&&t.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");t.eventListener?this._diagnosticLogger={log:t.eventListener.onEvent}:this._diagnosticLogger=t.diagnosticLogger,this._reloadOnDisconnect=null===(r=t.reloadOnDisconnect)||void 0===r||r;const f=new URL(o),p=`${f.protocol}//${f.host}`;this._storage=new i.ScopedLocalStorage("-walletlink:"+p),this._storage.setItem("version",d.VERSION),this.walletExtension||(this._relayEventManager=new u.WalletSDKRelayEventManager,this._relay=new s.WalletSDKRelay({linkAPIUrl:o,version:h,darkMode:!!t.darkMode,uiConstructor:c,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger}),this.setAppInfo(t.appName,t.appLogoUrl),t.headlessMode||this._relay.attachUI())}makeWeb3Provider(t="",e=1){const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(t,e),!1===this._reloadOnDisconnect&&"function"==typeof n.disableReloadOnDisconnect&&n.disableReloadOnDisconnect(),n;const r=this._relay;if(!r||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return t||r.setConnectDisabled(!0),new o.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(r),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:t,chainId:e,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(t,e){var n;this._appName=t||"DApp",this._appLogoUrl=e||(0,c.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 t;const e=this.walletExtension;e?e.close():null===(t=this._relay)||void 0===t||t.resetAndReload()}getQrUrl(){var t,e;return null!==(e=null===(t=this._relay)||void 0===t?void 0:t.getQRCodeUrl())&&void 0!==e?e:null}getCoinbaseWalletLogo(t,e=240){return(0,r.walletLogo)(t,e)}get walletExtension(){var t;return null!==(t=window.coinbaseWalletExtension)&&void 0!==t?t:window.walletLinkExtension}isCipherProvider(t){return"boolean"==typeof t.isCipher&&t.isCipher}}e.CoinbaseWalletSDK=d,d.VERSION=h}).call(this,n(40))},function(t,e){t.exports=o,o.default=o,o.stable=u,o.stableStringify=u;var n=[],r=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function o(t,e,o,s){var u;void 0===s&&(s=i()),function t(e,n,r,i,o,s,u){var c;if(s+=1,"object"==typeof e&&null!==e){for(c=0;c<i.length;c++)if(i[c]===e)return void a("[Circular]",e,n,o);if(void 0!==u.depthLimit&&s>u.depthLimit)return void a("[...]",e,n,o);if(void 0!==u.edgesLimit&&r+1>u.edgesLimit)return void a("[...]",e,n,o);if(i.push(e),Array.isArray(e))for(c=0;c<e.length;c++)t(e[c],c,c,i,e,s,u);else{var l=Object.keys(e);for(c=0;c<l.length;c++){var h=l[c];t(e[h],h,c,i,e,s,u)}}i.pop()}}(t,"",0,[],void 0,0,s);try{u=0===r.length?JSON.stringify(t,e,o):JSON.stringify(t,c(e),o)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var l=n.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return u}function a(t,e,i,o){var a=Object.getOwnPropertyDescriptor(o,i);void 0!==a.get?a.configurable?(Object.defineProperty(o,i,{value:t}),n.push([o,i,e,a])):r.push([e,i,t]):(o[i]=t,n.push([o,i,e]))}function s(t,e){return t<e?-1:t>e?1:0}function u(t,e,o,u){void 0===u&&(u=i());var l,h=function t(e,r,i,o,u,c,l){var h;if(c+=1,"object"==typeof e&&null!==e){for(h=0;h<o.length;h++)if(o[h]===e)return void a("[Circular]",e,r,u);try{if("function"==typeof e.toJSON)return}catch(t){return}if(void 0!==l.depthLimit&&c>l.depthLimit)return void a("[...]",e,r,u);if(void 0!==l.edgesLimit&&i+1>l.edgesLimit)return void a("[...]",e,r,u);if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)t(e[h],h,h,o,e,c,l);else{var d={},f=Object.keys(e).sort(s);for(h=0;h<f.length;h++){var p=f[h];t(e[p],p,h,o,e,c,l),d[p]=e[p]}if(void 0===u)return d;n.push([u,r,e]),u[r]=d}o.pop()}}(t,"",0,[],void 0,0,u)||t;try{l=0===r.length?JSON.stringify(h,e,o):JSON.stringify(h,c(e),o)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var d=n.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return l}function c(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(r.length>0)for(var i=0;i<r.length;i++){var o=r[i];if(o[1]===e&&o[0]===n){n=o[2],r.splice(i,1);break}}return t.call(this,e,n)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(88),i=n(87),o=r.errorCodes.rpc.internal,a={code:o,message:s(o)};function s(t,n="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(t)){const n=t.toString();if(h(r.errorValues,n))return r.errorValues[n].message;if(c(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function u(t){if(!Number.isInteger(t))return!1;const e=t.toString();return!!r.errorValues[e]||!!c(t)}function c(t){return t>=-32099&&t<=-32e3}function l(t){return t&&"object"==typeof t&&!Array.isArray(t)?Object.assign({},t):t}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=s,e.isValidCode=u,e.serializeError=function(t,{fallbackError:e=a,shouldIncludeStack:n=!1}={}){var r,o;if(!e||!Number.isInteger(e.code)||"string"!=typeof e.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof i.EthereumRpcError)return t.serialize();const c={};if(t&&"object"==typeof t&&!Array.isArray(t)&&h(t,"code")&&u(t.code)){const e=t;c.code=e.code,e.message&&"string"==typeof e.message?(c.message=e.message,h(e,"data")&&(c.data=e.data)):(c.message=s(c.code),c.data={originalError:l(t)})}else{c.code=e.code;const n=null===(r=t)||void 0===r?void 0:r.message;c.message=n&&"string"==typeof n?n:e.message,c.data={originalError:l(t)}}const d=null===(o=t)||void 0===o?void 0:o.stack;return n&&t&&d&&"string"==typeof d&&(c.stack=d),c}},function(t,e,n){var r=n(24),i=n(45),o=n(37).Buffer,a=[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],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t,e,n){return n^t&(e^n)}function l(t,e,n){return t&e|n&(t|e)}function h(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function d(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function f(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}r(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,y=0;y<16;++y)n[y]=t.readInt32BE(4*y);for(;y<64;++y)n[y]=0|(((e=n[y-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+n[y-7]+f(n[y-15])+n[y-16];for(var b=0;b<64;++b){var w=g+d(u)+c(u,p,m)+a[b]+n[b]|0,v=h(r)+l(r,i,o)|0;g=m,m=p,p=u,u=s+w|0,s=o,o=i,i=r,r=w+v|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,n){var r=n(24),i=n(45),o=n(37).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(t,e,n){return n^t&(e^n)}function l(t,e,n){return t&e|n&(t|e)}function h(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function d(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function f(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function y(t,e){return t>>>0<e>>>0?1:0}r(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,b=0|this._gh,w=0|this._hh,v=0|this._al,M=0|this._bl,L=0|this._cl,_=0|this._dl,N=0|this._el,E=0|this._fl,S=0|this._gl,x=0|this._hl,A=0;A<32;A+=2)e[A]=t.readInt32BE(4*A),e[A+1]=t.readInt32BE(4*A+4);for(;A<160;A+=2){var I=e[A-30],k=e[A-30+1],j=f(I,k),T=p(k,I),C=m(I=e[A-4],k=e[A-4+1]),D=g(k,I),O=e[A-14],z=e[A-14+1],P=e[A-32],R=e[A-32+1],B=T+z|0,U=j+O+y(B,T)|0;U=(U=U+C+y(B=B+D|0,D)|0)+P+y(B=B+R|0,R)|0,e[A]=U,e[A+1]=B}for(var Y=0;Y<160;Y+=2){U=e[Y],B=e[Y+1];var F=l(n,r,i),W=l(v,M,L),Q=h(n,v),H=h(v,n),G=d(s,N),Z=d(N,s),V=a[Y],q=a[Y+1],J=c(s,u,b),K=c(N,E,S),X=x+Z|0,$=w+G+y(X,x)|0;$=($=($=$+J+y(X=X+K|0,K)|0)+V+y(X=X+q|0,q)|0)+U+y(X=X+B|0,B)|0;var tt=H+W|0,et=Q+F+y(tt,H)|0;w=b,x=S,b=u,S=E,u=s,E=N,s=o+$+y(N=_+X|0,_)|0,o=i,_=L,i=r,L=M,r=n,M=v,n=$+et+y(v=X+tt|0,X)|0}this._al=this._al+v|0,this._bl=this._bl+M|0,this._cl=this._cl+L|0,this._dl=this._dl+_|0,this._el=this._el+N|0,this._fl=this._fl+E|0,this._gl=this._gl+S|0,this._hl=this._hl+x|0,this._ah=this._ah+n+y(this._al,v)|0,this._bh=this._bh+r+y(this._bl,M)|0,this._ch=this._ch+i+y(this._cl,L)|0,this._dh=this._dh+o+y(this._dl,_)|0,this._eh=this._eh+s+y(this._el,N)|0,this._fh=this._fh+u+y(this._fl,E)|0,this._gh=this._gh+b+y(this._gl,S)|0,this._hh=this._hh+w+y(this._hl,x)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,n){var r=n(93),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),s=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)void 0!==t[r]&&(n[r]=t[r]);return n};t.exports={arrayToObject:s,assign:function(t,e){return Object.keys(e).reduce((function(t,n){return t[n]=e[n],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r<e.length;++r)for(var i=e[r],a=i.obj[i.prop],s=Object.keys(a),u=0;u<s.length;++u){var c=s[u],l=a[c];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(e.push({obj:a,prop:c}),n.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);e.obj[e.prop]=r}}}(e),t},decode:function(t,e,n){var r=t.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(t){return r}},encode:function(t,e,n,i,o){if(0===t.length)return t;var s=t;if("symbol"==typeof t?s=Symbol.prototype.toString.call(t):"string"!=typeof t&&(s=String(t)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var u="",c=0;c<s.length;++c){var l=s.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+=s.charAt(c):l<128?u+=a[l]:l<2048?u+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?u+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(c)),u+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return u},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var n=[],r=0;r<t.length;r+=1)n.push(e(t[r]));return n}return e(t)},merge:function t(e,n,r){if(!n)return e;if("object"!=typeof n){if(o(e))e.push(n);else{if(!e||"object"!=typeof e)return[e,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(n);var a=e;return o(e)&&!o(n)&&(a=s(e,r)),o(e)&&o(n)?(n.forEach((function(n,o){if(i.call(e,o)){var a=e[o];a&&"object"==typeof a&&n&&"object"==typeof n?e[o]=t(a,n,r):e.push(n)}else e[o]=n})),e):Object.keys(n).reduce((function(e,o){var a=n[o];return i.call(e,o)?e[o]=t(e[o],a,r):e[o]=a,e}),a)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelayAbstract=e.APP_VERSION_KEY=e.LOCAL_STORAGE_ADDRESSES_KEY=e.WALLET_USER_NAME_KEY=void 0;const r=n(86);e.WALLET_USER_NAME_KEY="walletUsername",e.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",e.APP_VERSION_KEY="AppVersion",e.WalletSDKRelayAbstract=class{async makeEthereumJSONRPCRequest(t,e){if(!e)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(e,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then((t=>t.json())).then((t=>{if(!t)throw r.ethErrors.rpc.parse({});const e=t,{error:n}=e;if(n)throw(0,r.serializeError)(n);return e}))}}},function(t,e,n){(function(e){const r=n(153),i=n(66);function o(t){return e.allocUnsafe(t).fill(0)}function a(t,e,n){const r=o(e);return t=s(t),n?t.length<e?(t.copy(r),r):t.slice(0,e):t.length<e?(t.copy(r,e-t.length),r):t.slice(-e)}function s(t){if(!e.isBuffer(t))if(Array.isArray(t))t=e.from(t);else if("string"==typeof t)t=u(t)?e.from((n=c(t)).length%2?"0"+n:n,"hex"):e.from(t);else if("number"==typeof t)t=intToBuffer(t);else if(null==t)t=e.allocUnsafe(0);else if(i.isBN(t))t=t.toArrayLike(e);else{if(!t.toArray)throw new Error("invalid type");t=e.from(t.toArray())}var n;return t}function u(t){return"string"==typeof t&&t.match(/^0x[0-9A-Fa-f]*$/)}function c(t){return"string"==typeof t&&t.startsWith("0x")?t.slice(2):t}t.exports={zeros:o,setLength:a,setLengthRight:function(t,e){return a(t,e,!0)},isHexString:u,stripHexPrefix:c,toBuffer:s,bufferToHex:function(t){return"0x"+(t=s(t)).toString("hex")},keccak:function(t,e){return t=s(t),e||(e=256),r("keccak"+e).update(t).digest()}}}).call(this,n(19).Buffer)},function(t,e,n){(e=t.exports=n(110)).Stream=e,e.Readable=e,e.Writable=n(114),e.Duplex=n(47),e.Transform=n(116),e.PassThrough=n(162),e.finished=n(94),e.pipeline=n(163)},function(t,e,n){(function(e,r){var i;t.exports=E,E.ReadableState=N,n(65).EventEmitter;var o,a=function(t,e){return t.listeners(e).length},s=n(111),u=n(19).Buffer,c=e.Uint8Array||function(){},l=n(156);o=l&&l.debuglog?l.debuglog("stream"):function(){};var h,d,f,p=n(157),m=n(112),g=n(113).getHighWaterMark,y=n(46).codes,b=y.ERR_INVALID_ARG_TYPE,w=y.ERR_STREAM_PUSH_AFTER_EOF,v=y.ERR_METHOD_NOT_IMPLEMENTED,M=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(24)(E,s);var L=m.errorOrDestroy,_=["error","close","destroy","pause","resume"];function N(t,e,r){i=i||n(47),t=t||{},"boolean"!=typeof r&&(r=e instanceof i),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"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!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=n(115).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function E(t){if(i=i||n(47),!(this instanceof E))return new E(t);var e=this instanceof i;this._readableState=new N(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function S(t,e,n,r,i){o("readableAddChunk",e);var a,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(o("onEofChunk"),!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,e.sync?I(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,k(t)))}}(t,s);else if(i||(a=function(t,e){var n,r;return r=e,u.isBuffer(r)||r instanceof c||"string"==typeof e||void 0===e||t.objectMode||(n=new b("chunk",["string","Buffer","Uint8Array"],e)),n}(s,e)),a)L(t,a);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),r)s.endEmitted?L(t,new M):x(t,s,e,!0);else if(s.ended)L(t,new w);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?x(t,s,e,!1):j(t,s)):x(t,s,e,!1)}else r||(s.reading=!1,j(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function x(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",n)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&I(t)),j(t,e)}function A(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function I(t){var e=t._readableState;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(k,t))}function k(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,z(t)}function j(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(T,t,e))}function T(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var n=e.length;if(o("maybeReadMore read 0"),t.read(0),n===e.length)break}e.readingMore=!1}function C(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function D(t){o("readable nexttick read 0"),t.read(0)}function O(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),z(t),e.flowing&&!e.reading&&t.read(0)}function z(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function P(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function R(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(B,e,t))}function B(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function U(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),E.prototype.destroy=m.destroy,E.prototype._undestroy=m.undestroy,E.prototype._destroy=function(t,e){e(t)},E.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=u.from(t,e),e=""),n=!0),S(this,t,e,!1,n)},E.prototype.unshift=function(t){return S(this,t,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(t){h||(h=n(115).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this},E.prototype.read=function(t){o("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?R(this):I(this),null;if(0===(t=A(t,e))&&e.ended)return 0===e.length&&R(this),null;var r,i=e.needReadable;return o("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&o("length less than watermark",i=!0),e.ended||e.reading?o("reading or ended",i=!1):i&&(o("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=A(n,e))),null===(r=t>0?P(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&R(this)),null!==r&&this.emit("data",r),r},E.prototype._read=function(t){L(this,new v("_read()"))},E.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,o("pipe count=%d opts=%j",i.pipesCount,e);var s=e&&!1===e.end||t===r.stdout||t===r.stderr?m:u;function u(){o("onend"),t.end()}i.endEmitted?r.nextTick(s):n.once("end",s),t.on("unpipe",(function e(r,a){o("onunpipe"),r===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),t.removeListener("close",f),t.removeListener("finish",p),t.removeListener("drain",c),t.removeListener("error",d),t.removeListener("unpipe",e),n.removeListener("end",u),n.removeListener("end",m),n.removeListener("data",h),l=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}));var c=function(t){return function(){var e=t._readableState;o("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,z(t))}}(n);t.on("drain",c);var l=!1;function h(e){o("ondata");var r=t.write(e);o("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==U(i.pipes,t))&&!l&&(o("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function d(e){o("onerror",e),m(),t.removeListener("error",d),0===a(t,"error")&&L(t,e)}function f(){t.removeListener("finish",p),m()}function p(){o("onfinish"),t.removeListener("close",f),m()}function m(){o("unpipe"),n.unpipe(t)}return n.on("data",h),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",d),t.once("close",f),t.once("finish",p),t.emit("pipe",n),i.flowing||(o("pipe resume"),n.resume()),t},E.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=U(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},E.prototype.on=function(t,e){var n=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,o("on readable",i.length,i.reading),i.length?I(this):i.reading||r.nextTick(D,this))),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(t,e){var n=s.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(C,this),n},E.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(C,this),e},E.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(O,t,e))}(this,t)),t.paused=!1,this},E.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(o("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){o("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a<_.length;a++)t.on(_[a],this.emit.bind(this,_[a]));return this._read=function(e){o("wrapped _read",e),r&&(r=!1,t.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=n(160)),d(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),E._fromList=P,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(t,e){return void 0===f&&(f=n(161)),f(E,t,e)})}).call(this,n(63),n(40))},function(t,e,n){t.exports=n(65).EventEmitter},function(t,e,n){(function(e){function n(t,e){i(t,e),r(t)}function r(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var a=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?a._writableState?a._writableState.errorEmitted?e.nextTick(r,a):(a._writableState.errorEmitted=!0,e.nextTick(n,a,t)):e.nextTick(n,a,t):o?(e.nextTick(r,a),o(t)):e.nextTick(r,a)})),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(t,e){var n=t._readableState,r=t._writableState;n&&n.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,n(40))},function(t,e,n){var r=n(46).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,n,i){var o=function(t,e,n){return null!=t.highWaterMark?t.highWaterMark:e?t[n]:null}(e,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 t.objectMode?16:16384}}},function(t,e,n){(function(e,r){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(undefined),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=E,E.WritableState=N;var a,s={deprecate:n(159)},u=n(111),c=n(19).Buffer,l=e.Uint8Array||function(){},h=n(112),d=n(113).getHighWaterMark,f=n(46).codes,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,y=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,w=f.ERR_STREAM_NULL_VALUES,v=f.ERR_STREAM_WRITE_AFTER_END,M=f.ERR_UNKNOWN_ENCODING,L=h.errorOrDestroy;function _(){}function N(t,e,a){o=o||n(47),t=t||{},"boolean"!=typeof a&&(a=e instanceof o),this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,i=n.sync,o=n.writecb;if("function"!=typeof o)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,i,o){--e.pendingcb,n?(r.nextTick(o,i),r.nextTick(j,t,e),t._writableState.errorEmitted=!0,L(t,i)):(o(i),t._writableState.errorEmitted=!0,L(t,i),j(t,e))}(t,n,i,e,o);else{var a=I(n)||t.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||A(t,n),i?r.nextTick(x,t,n,a,o):x(t,n,a,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function E(t){var e=this instanceof(o=o||n(47));if(!e&&!a.call(E,this))return new E(t);this._writableState=new N(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),u.call(this)}function S(t,e,n,r,i,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new b("write")):n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function x(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),j(t,e)}function A(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,o=new Array(r),a=e.corkedRequestsFree;a.entry=n;for(var s=0,u=!0;n;)o[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;o.allBuffers=u,S(t,e,!0,e.length,o,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,l=n.encoding,h=n.callback;if(S(t,e,!1,e.objectMode?1:c.length,c,l,h),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function I(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function k(t,e){t._final((function(n){e.pendingcb--,n&&L(t,n),e.prefinished=!0,t.emit("prefinish"),j(t,e)}))}function j(t,e){var n=I(e);if(n&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,r.nextTick(k,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return n}n(24)(E,u),N.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(N.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(t){return!!a.call(this,t)||this===E&&t&&t._writableState instanceof N}})):a=function(t){return t instanceof this},E.prototype.pipe=function(){L(this,new y)},E.prototype.write=function(t,e,n){var i,o=this._writableState,a=!1,s=!o.objectMode&&(i=t,c.isBuffer(i)||i instanceof l);return s&&!c.isBuffer(t)&&(t=function(t){return c.from(t)}(t)),"function"==typeof e&&(n=e,e=null),s?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof n&&(n=_),o.ending?function(t,e){var n=new v;L(t,n),r.nextTick(e,n)}(this,n):(s||function(t,e,n,i){var o;return null===n?o=new w:"string"==typeof n||e.objectMode||(o=new p("chunk",["string","Buffer"],n)),!o||(L(t,o),r.nextTick(i,o),!1)}(this,o,t,n))&&(o.pendingcb++,a=function(t,e,n,r,i,o){if(!n){var a=function(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=c.from(e,n)),e}(e,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=e.objectMode?1:r.length;e.length+=s;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else S(t,e,!1,s,r,i,o);return u}(this,o,s,t,e,n)),a},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||A(this,t))},E.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new M(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(t,e,n){n(new m("_write()"))},E.prototype._writev=null,E.prototype.end=function(t,e,n){var i=this._writableState;return"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,j(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),E.prototype.destroy=h.destroy,E.prototype._undestroy=h.undestroy,E.prototype._destroy=function(t,e){e(t)}}).call(this,n(63),n(40))},function(t,e,n){var r=n(37).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.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(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function l(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=a(e[r]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--r<n||-2===i?0:(i=a(e[r]))>=0?(i>0&&(t.lastNeed=i-2),i):--r<n||-2===i?0:(i=a(e[r]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){t.exports=l;var r=n(46).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(47);function c(t,e){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!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(e,n){d(t,e,n)}))}function d(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new s;if(t._transformState.transforming)throw new a;return t.push(null)}n(24)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,n){n(new i("_transform()"))},l.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,n){const r=(t,e)=>function(){const n=e.promiseModule,r=new Array(arguments.length);for(let t=0;t<arguments.length;t++)r[t]=arguments[t];return new n(((n,i)=>{e.errorFirst?r.push((function(t,r){if(e.multiArgs){const e=new Array(arguments.length-1);for(let t=1;t<arguments.length;t++)e[t-1]=arguments[t];t?(e.unshift(t),i(e)):n(e)}else t?i(t):n(r)})):r.push((function(t){if(e.multiArgs){const t=new Array(arguments.length-1);for(let e=0;e<arguments.length;e++)t[e]=arguments[e];n(t)}else n(t)})),t.apply(this,r)}))};t.exports=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const n=t=>{const n=e=>"string"==typeof e?t===e:e.test(t);return e.include?e.include.some(n):!e.exclude.some(n)};let i;i="function"==typeof t?function(){return e.excludeMain?t.apply(this,arguments):r(t,e).apply(this,arguments)}:Object.create(Object.getPrototypeOf(t));for(const o in t){const a=t[o];i[o]="function"==typeof a&&n(o)?r(a,e):a}return i}},function(t,e,n){const r=n(173),i=n(174)();function o(t){this.currentProvider=t}function a(t){return function(){var e=[].slice.call(arguments),n=e.pop();this.sendAsync({method:t,params:e},n)}}function s(t,e){return function(){var n=[].slice.call(arguments),r=n.pop();n.length<t&&n.push("latest"),this.sendAsync({method:e,params:n},r)}}t.exports=o,o.prototype.getBalance=s(2,"eth_getBalance"),o.prototype.getCode=s(2,"eth_getCode"),o.prototype.getTransactionCount=s(2,"eth_getTransactionCount"),o.prototype.getStorageAt=s(3,"eth_getStorageAt"),o.prototype.call=s(2,"eth_call"),o.prototype.protocolVersion=a("eth_protocolVersion"),o.prototype.syncing=a("eth_syncing"),o.prototype.coinbase=a("eth_coinbase"),o.prototype.mining=a("eth_mining"),o.prototype.hashrate=a("eth_hashrate"),o.prototype.gasPrice=a("eth_gasPrice"),o.prototype.accounts=a("eth_accounts"),o.prototype.blockNumber=a("eth_blockNumber"),o.prototype.getBlockTransactionCountByHash=a("eth_getBlockTransactionCountByHash"),o.prototype.getBlockTransactionCountByNumber=a("eth_getBlockTransactionCountByNumber"),o.prototype.getUncleCountByBlockHash=a("eth_getUncleCountByBlockHash"),o.prototype.getUncleCountByBlockNumber=a("eth_getUncleCountByBlockNumber"),o.prototype.sign=a("eth_sign"),o.prototype.sendTransaction=a("eth_sendTransaction"),o.prototype.sendRawTransaction=a("eth_sendRawTransaction"),o.prototype.estimateGas=a("eth_estimateGas"),o.prototype.getBlockByHash=a("eth_getBlockByHash"),o.prototype.getBlockByNumber=a("eth_getBlockByNumber"),o.prototype.getTransactionByHash=a("eth_getTransactionByHash"),o.prototype.getTransactionByBlockHashAndIndex=a("eth_getTransactionByBlockHashAndIndex"),o.prototype.getTransactionByBlockNumberAndIndex=a("eth_getTransactionByBlockNumberAndIndex"),o.prototype.getTransactionReceipt=a("eth_getTransactionReceipt"),o.prototype.getUncleByBlockHashAndIndex=a("eth_getUncleByBlockHashAndIndex"),o.prototype.getUncleByBlockNumberAndIndex=a("eth_getUncleByBlockNumberAndIndex"),o.prototype.getCompilers=a("eth_getCompilers"),o.prototype.compileLLL=a("eth_compileLLL"),o.prototype.compileSolidity=a("eth_compileSolidity"),o.prototype.compileSerpent=a("eth_compileSerpent"),o.prototype.newFilter=a("eth_newFilter"),o.prototype.newBlockFilter=a("eth_newBlockFilter"),o.prototype.newPendingTransactionFilter=a("eth_newPendingTransactionFilter"),o.prototype.uninstallFilter=a("eth_uninstallFilter"),o.prototype.getFilterChanges=a("eth_getFilterChanges"),o.prototype.getFilterLogs=a("eth_getFilterLogs"),o.prototype.getLogs=a("eth_getLogs"),o.prototype.getWork=a("eth_getWork"),o.prototype.submitWork=a("eth_submitWork"),o.prototype.submitHashrate=a("eth_submitHashrate"),o.prototype.sendAsync=function(t,e){var n;this.currentProvider.sendAsync((n=t,r({id:i(),jsonrpc:"2.0",params:[]},n)),(function(t,n){if(!t&&n.error&&(t=new Error("EthQuery - RPC Error - "+n.error.message)),t)return e(t);e(null,n.result)}))}},function(t,e,n){t.exports=n(180)},function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(181),e),i(n(182),e),i(n(183),e),i(n(121),e),i(n(122),e),i(n(186),e)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;let r=Math.floor(4294967295*Math.random());e.getUniqueId=function(){return r=(r+1)%4294967295,r}},function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.JsonRpcEngine=void 0;const i=r(n(64)),o=n(184);class a extends i.default{constructor(){super(),this._middleware=[]}push(t){this._middleware.push(t)}handle(t,e){if(e&&"function"!=typeof e)throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?e?this._handleBatch(t,e):this._handleBatch(t):e?this._handle(t,e):this._promiseHandle(t)}asMiddleware(){return async(t,e,n,r)=>{try{const[i,o,s]=await a._runAllMiddleware(t,e,this._middleware);return o?(await a._runReturnHandlers(s),r(i)):n((async t=>{try{await a._runReturnHandlers(s)}catch(e){return t(e)}return t()}))}catch(t){return r(t)}}}async _handleBatch(t,e){try{const n=await Promise.all(t.map(this._promiseHandle.bind(this)));return e?e(null,n):n}catch(t){if(e)return e(t);throw t}}_promiseHandle(t){return new Promise((e=>{this._handle(t,((t,n)=>{e(n)}))}))}async _handle(t,e){if(!t||Array.isArray(t)||"object"!=typeof t){const n=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof t,{request:t});return e(n,{id:void 0,jsonrpc:"2.0",error:n})}if("string"!=typeof t.method){const n=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof t.method,{request:t});return e(n,{id:t.id,jsonrpc:"2.0",error:n})}const n=Object.assign({},t),r={id:n.id,jsonrpc:n.jsonrpc};let i=null;try{await this._processRequest(n,r)}catch(t){i=t}return i&&(delete r.result,r.error||(r.error=o.serializeError(i))),e(i,r)}async _processRequest(t,e){const[n,r,i]=await a._runAllMiddleware(t,e,this._middleware);if(a._checkForCompletion(t,e,r),await a._runReturnHandlers(i),n)throw n}static async _runAllMiddleware(t,e,n){const r=[];let i=null,o=!1;for(const s of n)if([i,o]=await a._runMiddleware(t,e,s,r),o)break;return[i,o,r.reverse()]}static _runMiddleware(t,e,n,r){return new Promise((i=>{const a=t=>{const n=t||e.error;n&&(e.error=o.serializeError(n)),i([n,!0])},u=n=>{e.error?a(e.error):(n&&("function"!=typeof n&&a(new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof n}" for request:\n${s(t)}`,{request:t})),r.push(n)),i([null,!1]))};try{n(t,e,u,a)}catch(t){a(t)}}))}static async _runReturnHandlers(t){for(const e of t)await new Promise(((t,n)=>{e((e=>e?n(e):t()))}))}static _checkForCompletion(t,e,n){if(!("result"in e)&&!("error"in e))throw new o.EthereumRpcError(o.errorCodes.rpc.internal,"JsonRpcEngine: Response has no error or result for request:\n"+s(t),{request:t});if(!n)throw new o.EthereumRpcError(o.errorCodes.rpc.internal,"JsonRpcEngine: Nothing ended request:\n"+s(t),{request:t})}}function s(t){return JSON.stringify(t,null,2)}e.JsonRpcEngine=a},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(96),i=n(95),o=r.errorCodes.rpc.internal,a={code:o,message:s(o)};function s(t,n="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(t)){const n=t.toString();if(h(r.errorValues,n))return r.errorValues[n].message;if(c(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function u(t){if(!Number.isInteger(t))return!1;const e=t.toString();return!!r.errorValues[e]||!!c(t)}function c(t){return t>=-32099&&t<=-32e3}function l(t){return t&&"object"==typeof t&&!Array.isArray(t)?Object.assign({},t):t}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=s,e.isValidCode=u,e.serializeError=function(t,{fallbackError:e=a,shouldIncludeStack:n=!1}={}){var r,o;if(!e||!Number.isInteger(e.code)||"string"!=typeof e.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof i.EthereumRpcError)return t.serialize();const c={};if(t&&"object"==typeof t&&!Array.isArray(t)&&h(t,"code")&&u(t.code)){const e=t;c.code=e.code,e.message&&"string"==typeof e.message?(c.message=e.message,h(e,"data")&&(c.data=e.data)):(c.message=s(c.code),c.data={originalError:l(t)})}else{c.code=e.code;const n=null===(r=t)||void 0===r?void 0:r.message;c.message=n&&"string"==typeof n?n:e.message,c.data={originalError:l(t)}}const d=null===(o=t)||void 0===o?void 0:o.stack;return n&&t&&d&&"string"==typeof d&&(c.stack=d),c}},function(t,e,n){function r(t){var e,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=r(t[e]))&&(i&&(i+=" "),i+=n);else for(e in t)t[e]&&(i&&(i+=" "),i+=e);return i}n.r(e),e.default=function(){for(var t,e,n=0,i="";n<arguments.length;)(t=arguments[n++])&&(e=r(t))&&(i&&(i+=" "),i+=e);return i}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Web3Method=void 0,function(t){t.requestEthereumAccounts="requestEthereumAccounts",t.signEthereumMessage="signEthereumMessage",t.signEthereumTransaction="signEthereumTransaction",t.submitEthereumTransaction="submitEthereumTransaction",t.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",t.scanQRCode="scanQRCode",t.generic="generic",t.childRequestEthereumAccounts="childRequestEthereumAccounts",t.addEthereumChain="addEthereumChain",t.switchEthereumChain="switchEthereumChain",t.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",t.watchAsset="watchAsset",t.selectProvider="selectProvider"}(e.Web3Method||(e.Web3Method={}))},function(t,e,n){n.r(e);var r=n(84);n.d(e,"CoinbaseWalletProvider",(function(){return r.CoinbaseWalletProvider})),n.d(e,"CoinbaseWalletSDK",(function(){return r.CoinbaseWalletSDK}))},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.walletLogo=void 0,e.walletLogo=(t,e)=>{let n;switch(t){case"standard":default:return n=e,`data:image/svg+xml,%3Csvg width='${e}' height='${n}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return n=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${n}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return n=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return n=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return n=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return n=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ScopedLocalStorage=void 0,e.ScopedLocalStorage=class{constructor(t){this.scope=t}setItem(t,e){localStorage.setItem(this.scopedKey(t),e)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),e=[];for(let n=0;n<localStorage.length;n++){const r=localStorage.key(n);"string"==typeof r&&r.startsWith(t)&&e.push(r)}e.forEach((t=>localStorage.removeItem(t)))}scopedKey(t){return`${this.scope}:${t}`}}},function(t,e,n){e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),a=r[0],s=r[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),l=0,h=s>0?a-4:a;for(n=0;n<h;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;return 2===s&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[l++]=255&e),1===s&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(l(t,a,a+16383>s?s:a+16383));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var i,o,a=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){
|
|
113
113
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
114
|
-
e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,h=n?i-1:0,d=n?-1:1,f=t[e+h];for(h+=d,o=f&(1<<-l)-1,f>>=-l,l+=s;l>0;o=256*o+t[e+h],h+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+h],h+=d,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+h>=1?d/u:d*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+f]=255&a,f+=p,a/=256,c-=8);t[n+f-p]|=128*m}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(87),i=n(103),o=n(88);function a(t,e){const[n,o]=u(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),o)}function s(t,e){const[n,o]=u(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),o)}function u(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){const{message:e,data:n}=t;if(e&&"string"!=typeof e)throw new Error("Must specify string message.");return[e||void 0,n]}}return[]}e.ethErrors={rpc:{parse:t=>a(o.errorCodes.rpc.parse,t),invalidRequest:t=>a(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>a(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>a(o.errorCodes.rpc.methodNotFound,t),internal:t=>a(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(e,t)},invalidInput:t=>a(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>a(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>a(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>a(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>a(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>a(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>s(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>s(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>s(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>s(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>s(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:n,data:i}=t;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(e,n,i)}}}},function(t,e,n){(e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n}).sha=n(136),e.sha1=n(137),e.sha224=n(138),e.sha256=n(104),e.sha384=n(139),e.sha512=n(105)},function(t,e,n){var r=n(24),i=n(45),o=n(37).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<30|t>>>2}function l(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,h=0;h<16;++h)n[h]=t.readInt32BE(4*h);for(;h<80;++h)n[h]=n[h-3]^n[h-8]^n[h-14]^n[h-16];for(var d=0;d<80;++d){var f=~~(d/20),p=0|((e=r)<<5|e>>>27)+l(f,i,o,s)+u+n[d]+a[f];u=s,s=o,o=c(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,n){var r=n(24),i=n(45),o=n(37).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function l(t){return t<<30|t>>>2}function h(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,d=0;d<16;++d)n[d]=t.readInt32BE(4*d);for(;d<80;++d)n[d]=(e=n[d-3]^n[d-8]^n[d-14]^n[d-16])<<1|e>>>31;for(var f=0;f<80;++f){var p=~~(f/20),m=c(r)+h(p,i,o,s)+u+n[f]+a[p]|0;u=s,s=o,o=l(i),i=r,r=m}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,n){var r=n(24),i=n(104),o=n(45),a=n(37).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}r(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,n){var r=n(24),i=n(105),o=n(45),a=n(37).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}r(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,n){var r=n(141),i=n(151),o=n(93);t.exports={formats:o,parse:i,stringify:r}},function(t,e,n){var r=n(142),i=n(106),o=n(93),a=Object.prototype.hasOwnProperty,s={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},u=Array.isArray,c=String.prototype.split,l=Array.prototype.push,h=function(t,e){l.apply(t,u(e)?e:[e])},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(t){return d.call(t)},skipNulls:!1,strictNullHandling:!1},m={},g=function t(e,n,o,a,s,l,d,f,g,y,b,w,v,M,L,_){for(var N,E=e,S=_,x=0,A=!1;void 0!==(S=S.get(m))&&!A;){var I=S.get(e);if(x+=1,void 0!==I){if(I===x)throw new RangeError("Cyclic object value");A=!0}void 0===S.get(m)&&(x=0)}if("function"==typeof f?E=f(n,E):E instanceof Date?E=b(E):"comma"===o&&u(E)&&(E=i.maybeMap(E,(function(t){return t instanceof Date?b(t):t}))),null===E){if(s)return d&&!M?d(n,p.encoder,L,"key",w):n;E=""}if("string"==typeof(N=E)||"number"==typeof N||"boolean"==typeof N||"symbol"==typeof N||"bigint"==typeof N||i.isBuffer(E)){if(d){var k=M?n:d(n,p.encoder,L,"key",w);if("comma"===o&&M){for(var j=c.call(String(E),","),T="",C=0;C<j.length;++C)T+=(0===C?"":",")+v(d(j[C],p.encoder,L,"value",w));return[v(k)+(a&&u(E)&&1===j.length?"[]":"")+"="+T]}return[v(k)+"="+v(d(E,p.encoder,L,"value",w))]}return[v(n)+"="+v(String(E))]}var D,O=[];if(void 0===E)return O;if("comma"===o&&u(E))D=[{value:E.length>0?E.join(",")||null:void 0}];else if(u(f))D=f;else{var z=Object.keys(E);D=g?z.sort(g):z}for(var P=a&&u(E)&&1===E.length?n+"[]":n,R=0;R<D.length;++R){var B=D[R],U="object"==typeof B&&void 0!==B.value?B.value:E[B];if(!l||null!==U){var Y=u(E)?"function"==typeof o?o(P,B):P:P+(y?"."+B:"["+B+"]");_.set(e,x);var F=r();F.set(m,_),h(O,t(U,Y,o,a,s,l,d,f,g,y,b,w,v,M,L,F))}}return O};t.exports=function(t,e){var n,i=t,c=function(t){if(!t)return p;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||p.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==t.format){if(!a.call(o.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=o.formatters[n],i=p.filter;return("function"==typeof t.filter||u(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===t.allowDots?p.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:p.charsetSentinel,delimiter:void 0===t.delimiter?p.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:p.encode,encoder:"function"==typeof t.encoder?t.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:p.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:p.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:p.strictNullHandling}}(e);"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=e&&e.arrayFormat in s?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var f=s[l];if(e&&"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var m="comma"===f&&e&&e.commaRoundTrip;n||(n=Object.keys(i)),c.sort&&n.sort(c.sort);for(var y=r(),b=0;b<n.length;++b){var w=n[b];c.skipNulls&&null===i[w]||h(d,g(i[w],w,f,m,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),M=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?M+="utf8=%26%2310003%3B&":M+="utf8=%E2%9C%93&"),v.length>0?M+v:""}},function(t,e,n){var r=n(91),i=n(147),o=n(149),a=r("%TypeError%"),s=r("%WeakMap%",!0),u=r("%Map%",!0),c=i("WeakMap.prototype.get",!0),l=i("WeakMap.prototype.set",!0),h=i("WeakMap.prototype.has",!0),d=i("Map.prototype.get",!0),f=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),m=function(t,e){for(var n,r=t;null!==(n=r.next);r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n};t.exports=function(){var t,e,n,r={assert:function(t){if(!r.has(t))throw new a("Side channel does not contain "+o(t))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(t)return c(t,r)}else if(u){if(e)return d(e,r)}else if(n)return function(t,e){var n=m(t,e);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(t)return h(t,r)}else if(u){if(e)return p(e,r)}else if(n)return function(t,e){return!!m(t,e)}(n,r);return!1},set:function(r,i){s&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new s),l(t,r,i)):u?(e||(e=new u),f(e,r,i)):(n||(n={key:{},next:null}),function(t,e,n){var r=m(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}}(n,r,i))}};return r}},function(t,e,n){var r="undefined"!=typeof Symbol&&Symbol,i=n(144);t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}},function(t,e,n){t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},function(t,e,n){var r=Array.prototype.slice,i=Object.prototype.toString;t.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==i.call(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n,o=r.call(arguments,1),a=Math.max(0,e.length-o.length),s=[],u=0;u<a;u++)s.push("$"+u);if(n=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof n){var i=e.apply(this,o.concat(r.call(arguments)));return Object(i)===i?i:this}return e.apply(t,o.concat(r.call(arguments)))})),e.prototype){var c=function(){};c.prototype=e.prototype,n.prototype=new c,c.prototype=null}return n}},function(t,e,n){var r=n(92);t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(t,e,n){var r=n(91),i=n(148),o=i(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&o(t,".prototype.")>-1?i(n):n}},function(t,e,n){var r=n(92),i=n(91),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||r.call(a,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(r,a,arguments);u&&c&&(u(e,"length").configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))}));return e};var h=function(){return s(r,o,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},function(t,e,n){var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"==typeof i.get?i.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,h="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,y=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,M=String.prototype.toLowerCase,L=RegExp.prototype.test,_=Array.prototype.concat,N=Array.prototype.join,E=Array.prototype.slice,S=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,k="function"==typeof Symbol&&"object"==typeof Symbol.iterator,j="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,C=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function D(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||L.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var r=t<0?-S(-t):S(t);if(r!==t){var i=String(r),o=b.call(e,i.length+1);return w.call(i,n,"$&_")+"."+w.call(w.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,n,"$&_")}var O=n(150),z=O.custom,P=F(z)?z:null;function R(t,e,n){var r="double"===(n.quoteStyle||e)?'"':"'";return r+t+r}function B(t){return w.call(String(t),/"/g,""")}function U(t){return!("[object Array]"!==H(t)||j&&"object"==typeof t&&j in t)}function Y(t){return!("[object RegExp]"!==H(t)||j&&"object"==typeof t&&j in t)}function F(t){if(k)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!I)return!1;try{return I.call(t),!0}catch(t){}return!1}t.exports=function t(e,n,r,i){var s=n||{};if(Q(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Q(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!Q(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Q(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Q(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return function t(e,n){if(e.length>n.maxStringLength){var r=e.length-n.maxStringLength,i="... "+r+" more character"+(r>1?"s":"");return t(b.call(e,0,n.maxStringLength),n)+i}return R(w.call(w.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Z),"single",n)}(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return m?D(e,v):v}if("bigint"==typeof e){var L=String(e)+"n";return m?D(e,L):L}var S=void 0===s.depth?5:s.depth;if(void 0===r&&(r=0),r>=S&&S>0&&"object"==typeof e)return U(e)?"[Array]":"[Object]";var A=function(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;n=N.call(Array(t.indent+1)," ")}return{base:n,prev:N.call(Array(e+1),n)}}(s,r);if(void 0===i)i=[];else if(G(i,e)>=0)return"[Circular]";function z(e,n,o){if(n&&(i=E.call(i)).push(n),o){var a={depth:s.depth};return Q(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,r+1,i)}return t(e,s,r+1,i)}if("function"==typeof e&&!Y(e)){var W=function(t){if(t.name)return t.name;var e=y.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),$=X(e,z);return"[Function"+(W?": "+W:" (anonymous)")+"]"+($.length>0?" { "+N.call($,", ")+" }":"")}if(F(e)){var tt=k?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):I.call(e);return"object"!=typeof e||k?tt:V(tt)}if(function(t){return!(!t||"object"!=typeof t)&&("undefined"!=typeof HTMLElement&&t instanceof HTMLElement||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)}(e)){for(var et="<"+M.call(String(e.nodeName)),nt=e.attributes||[],rt=0;rt<nt.length;rt++)et+=" "+nt[rt].name+"="+R(B(nt[rt].value),"double",s);return et+=">",e.childNodes&&e.childNodes.length&&(et+="..."),et+"</"+M.call(String(e.nodeName))+">"}if(U(e)){if(0===e.length)return"[]";var it=X(e,z);return A&&!function(t){for(var e=0;e<t.length;e++)if(G(t[e],"\n")>=0)return!1;return!0}(it)?"["+K(it,A)+"]":"[ "+N.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||j&&"object"==typeof t&&j in t)}(e)){var ot=X(e,z);return"cause"in Error.prototype||!("cause"in e)||T.call(e,"cause")?0===ot.length?"["+String(e)+"]":"{ ["+String(e)+"] "+N.call(ot,", ")+" }":"{ ["+String(e)+"] "+N.call(_.call("[cause]: "+z(e.cause),ot),", ")+" }"}if("object"==typeof e&&u){if(P&&"function"==typeof e[P]&&O)return O(e,{depth:S-r});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!o||!t||"object"!=typeof t)return!1;try{o.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var at=[];return a.call(e,(function(t,n){at.push(z(n,e,!0)+" => "+z(t,e))})),J("Map",o.call(e),at,A)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var st=[];return l.call(e,(function(t){st.push(z(t,e))})),J("Set",c.call(e),st,A)}if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{h.call(t,h);try{d.call(t,d)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return q("WeakMap");if(function(t){if(!d||!t||"object"!=typeof t)return!1;try{d.call(t,d);try{h.call(t,h)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return q("WeakSet");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{return f.call(t),!0}catch(t){}return!1}(e))return q("WeakRef");if(function(t){return!("[object Number]"!==H(t)||j&&"object"==typeof t&&j in t)}(e))return V(z(Number(e)));if(function(t){if(!t||"object"!=typeof t||!x)return!1;try{return x.call(t),!0}catch(t){}return!1}(e))return V(z(x.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||j&&"object"==typeof t&&j in t)}(e))return V(p.call(e));if(function(t){return!("[object String]"!==H(t)||j&&"object"==typeof t&&j in t)}(e))return V(z(String(e)));if(!function(t){return!("[object Date]"!==H(t)||j&&"object"==typeof t&&j in t)}(e)&&!Y(e)){var ut=X(e,z),ct=C?C(e)===Object.prototype:e instanceof Object||e.constructor===Object,lt=e instanceof Object?"":"null prototype",ht=!ct&&j&&Object(e)===e&&j in e?b.call(H(e),8,-1):lt?"Object":"",dt=(ct||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(ht||lt?"["+N.call(_.call([],ht||[],lt||[]),": ")+"] ":"");return 0===ut.length?dt+"{}":A?dt+"{"+K(ut,A)+"}":dt+"{ "+N.call(ut,", ")+" }"}return String(e)};var W=Object.prototype.hasOwnProperty||function(t){return t in this};function Q(t,e){return W.call(t,e)}function H(t){return m.call(t)}function G(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function Z(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function V(t){return"Object("+t+")"}function q(t){return t+" { ? }"}function J(t,e,n,r){return t+" ("+e+") {"+(r?K(n,r):N.call(n,", "))+"}"}function K(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+N.call(t,","+n)+"\n"+e.prev}function X(t,e){var n=U(t),r=[];if(n){r.length=t.length;for(var i=0;i<t.length;i++)r[i]=Q(t,i)?e(t[i],t):""}var o,a="function"==typeof A?A(t):[];if(k){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var u in t)Q(t,u)&&(n&&String(Number(u))===u&&u<t.length||k&&o["$"+u]instanceof Symbol||(L.call(/[^\w$]/,u)?r.push(e(u,t)+": "+e(t[u],t)):r.push(u+": "+e(t[u],t))));if("function"==typeof A)for(var c=0;c<a.length;c++)T.call(t,a[c])&&r.push("["+e(a[c])+"]: "+e(t[a[c]],t));return r}},function(t,e){},function(t,e,n){var r=n(106),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={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},s=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},u=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},c=function(t,e,n,r){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.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!==(s=a.exec(o))&&h<n.depth;){if(h+=1,!n.plainObjects&&i.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+o.slice(s.index)+"]"),function(t,e,n,r){for(var i=r?e:u(e,n),o=t.length-1;o>=0;--o){var a,s=t[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);n.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(l,e,n,r)}};t.exports=function(t,e){var n=function(t){if(!t)return a;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?a.charset:t.charset;return{allowDots:void 0===t.allowDots?a.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:a.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling}}(e);if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var l="string"==typeof t?function(t,e){var n,c={},l=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,h=e.parameterLimit===1/0?void 0:e.parameterLimit,d=l.split(e.delimiter,h),f=-1,p=e.charset;if(e.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 m,g,y=d[n],b=y.indexOf("]="),w=-1===b?y.indexOf("="):b+1;-1===w?(m=e.decoder(y,a.decoder,p,"key"),g=e.strictNullHandling?null:""):(m=e.decoder(y.slice(0,w),a.decoder,p,"key"),g=r.maybeMap(u(y.slice(w+1),e),(function(t){return e.decoder(t,a.decoder,p,"value")}))),g&&e.interpretNumericEntities&&"iso-8859-1"===p&&(g=s(g)),y.indexOf("[]=")>-1&&(g=o(g)?[g]:g),i.call(c,m)?c[m]=r.combine(c[m],g):c[m]=g}return c}(t,n):t,h=n.plainObjects?Object.create(null):{},d=Object.keys(l),f=0;f<d.length;++f){var p=d[f],m=c(p,l[p],n,"string"==typeof t);h=r.merge(h,m,n)}return!0===n.allowSparse?h:r.compact(h)}},function(t,e,n){(function(e){const r=n(108),i=n(167),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"]},a={encodeData(t,n,o,a=!0){const s=["bytes32"],u=[this.hashType(t,o)];if(a){const c=(t,n,s)=>{if(void 0!==o[n])return["bytes32",null==s?"0x0000000000000000000000000000000000000000000000000000000000000000":r.keccak(this.encodeData(n,s,o,a))];if(void 0===s)throw new Error(`missing value for field ${t} of type ${n}`);if("bytes"===n)return["bytes32",r.keccak(s)];if("string"===n)return"string"==typeof s&&(s=e.from(s,"utf8")),["bytes32",r.keccak(s)];if(n.lastIndexOf("]")===n.length-1){const e=n.slice(0,n.lastIndexOf("[")),o=s.map((n=>c(t,e,n)));return["bytes32",r.keccak(i.rawEncode(o.map((([t])=>t)),o.map((([,t])=>t))))]}return[n,s]};for(const e of o[t]){const[t,r]=c(e.name,e.type,n[e.name]);s.push(t),u.push(r)}}else for(const i of o[t]){let t=n[i.name];if(void 0!==t)if("bytes"===i.type)s.push("bytes32"),t=r.keccak(t),u.push(t);else if("string"===i.type)s.push("bytes32"),"string"==typeof t&&(t=e.from(t,"utf8")),t=r.keccak(t),u.push(t);else if(void 0!==o[i.type])s.push("bytes32"),t=r.keccak(this.encodeData(i.type,t,o,a)),u.push(t);else{if(i.type.lastIndexOf("]")===i.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");s.push(i.type),u.push(t)}}return i.rawEncode(s,u)},encodeType(t,e){let n="",r=this.findTypeDependencies(t,e).filter((e=>e!==t));r=[t].concat(r.sort());for(const t of r){if(!e[t])throw new Error("No type definition specified: "+t);n+=t+"("+e[t].map((({name:t,type:e})=>e+" "+t)).join(",")+")"}return n},findTypeDependencies(t,e,n=[]){if(t=t.match(/^\w*/)[0],n.includes(t)||void 0===e[t])return n;n.push(t);for(const r of e[t])for(const t of this.findTypeDependencies(r.type,e,n))!n.includes(t)&&n.push(t);return n},hashStruct(t,e,n,i=!0){return r.keccak(this.encodeData(t,e,n,i))},hashType(t,e){return r.keccak(this.encodeType(t,e))},sanitizeData(t){const e={};for(const n in o.properties)t[n]&&(e[n]=t[n]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,n=!0){const i=this.sanitizeData(t),o=[e.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(e.concat(o))}};t.exports={TYPED_MESSAGE_SCHEMA:o,TypedDataUtils:a,hashForSignTypedDataLegacy:function(t){return function(t){const e=new Error("Expect argument to be non-empty array");if("object"!=typeof t||!t.length)throw e;const n=t.map((function(t){return"bytes"===t.type?r.toBuffer(t.value):t.value})),o=t.map((function(t){return t.type})),a=t.map((function(t){if(!t.name)throw e;return t.type+" "+t.name}));return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(new Array(t.length).fill("string"),a),i.soliditySHA3(o,n)])}(t.data)},hashForSignTypedData_v3:function(t){return a.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return a.hash(t.data)}}}).call(this,n(19).Buffer)},function(t,e,n){t.exports=n(154)(n(165))},function(t,e,n){const r=n(155),i=n(164);t.exports=function(t){const e=r(t),n=i(t);return function(t,r){switch("string"==typeof t?t.toLowerCase():t){case"keccak224":return new e(1152,448,null,224,r);case"keccak256":return new e(1088,512,null,256,r);case"keccak384":return new e(832,768,null,384,r);case"keccak512":return new e(576,1024,null,512,r);case"sha3-224":return new e(1152,448,6,224,r);case"sha3-256":return new e(1088,512,6,256,r);case"sha3-384":return new e(832,768,6,384,r);case"sha3-512":return new e(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: "+t)}}}},function(t,e,n){(function(e){const{Transform:r}=n(109);t.exports=t=>class n extends r{constructor(e,n,r,i,o){super(o),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=i,this._options=o,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(t,e,n){let r=null;try{this.update(t,e)}catch(t){r=t}n(r)}_flush(t){let e=null;try{this.push(this.digest())}catch(t){e=t}t(e)}update(t,n){if(!e.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return e.isBuffer(t)||(t=e.from(t,n)),this._state.absorb(t),this}digest(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let e=this._state.squeeze(this._hashBitLength/8);return void 0!==t&&(e=e.toString(t)),this._resetState(),e}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new n(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}}).call(this,n(19).Buffer)},function(t,e){},function(t,e,n){function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=n(19).Buffer,a=n(158).inspect,s=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e;return(e=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,n,r,i=o.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,n=i,r=s,o.prototype.copy.call(e,n,r),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(t,e){var n;return t<this.head.data.length?(n=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):n=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,n=1,r=e.data;for(t-=r.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?r+=i:r+=i.slice(0,t),0==(t-=o)){o===i.length?(++n,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),n=this.head,r=1;for(n.data.copy(e),t-=n.data.length;n=n.next;){var i=n.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,e}},{key:s,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(t.prototype,e),t}()},function(t,e){},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(63))},function(t,e,n){(function(e){var r;function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=n(94),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function f(t,e){return{value:t,done:e}}function p(t){var e=t[a];if(null!==e){var n=t[d].read();null!==n&&(t[l]=null,t[a]=null,t[s]=null,e(f(n,!1)))}}function m(t){e.nextTick(p,t)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(r={get stream(){return this[d]},next:function(){var t=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){e.nextTick((function(){t[u]?r(t[u]):n(f(void 0,!0))}))}));var r,i=this[l];if(i)r=new Promise(function(t,e){return function(n,r){t.then((function(){e[c]?n(f(void 0,!0)):e[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 t=this;return new Promise((function(e,n){t[d].destroy(null,(function(t){t?n(t):e(f(void 0,!0))}))}))})),r),g);t.exports=function(t){var e,n=Object.create(y,(i(e={},d,{value:t,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var r=n[d].read();r?(n[l]=null,n[a]=null,n[s]=null,t(f(r,!1))):(n[a]=t,n[s]=e)},writable:!0}),e));return n[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=n[s];return null!==e&&(n[l]=null,n[a]=null,n[s]=null,e(t)),void(n[u]=t)}var r=n[a];null!==r&&(n[l]=null,n[a]=null,n[s]=null,r(f(void 0,!0))),n[c]=!0})),t.on("readable",m.bind(null,n)),n}}).call(this,n(40))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,n){t.exports=i;var r=n(116);function i(t){if(!(this instanceof i))return new i(t);r.call(this,t)}n(24)(i,r),i.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){var r,i=n(46).codes,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===r&&(r=n(94)),r(t,{readable:e,writable:i},(function(t){if(t)return o(t);s=!0,o()}));var u=!1;return function(e){if(!s&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new a("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}t.exports=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=function(t){return t.length?"function"!=typeof t[t.length-1]?s:t.pop():s}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var a=e.map((function(t,n){var o=n<e.length-1;return u(t,o,n>0,(function(t){r||(r=t),t&&a.forEach(c),o||(a.forEach(c),i(r))}))}));return e.reduce(l)}},function(t,e,n){(function(e){const{Transform:r}=n(109);t.exports=t=>class n extends r{constructor(e,n,r,i){super(i),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._options=i,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(t,e,n){let r=null;try{this.update(t,e)}catch(t){r=t}n(r)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,n){if(!e.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return e.isBuffer(t)||(t=e.from(t,n)),this._state.absorb(t),this}squeeze(t,e){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let n=this._state.squeeze(t);return void 0!==e&&(n=n.toString(e)),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new n(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}}).call(this,n(19).Buffer)},function(t,e,n){(function(e){const r=n(166);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(t,e){for(let t=0;t<50;++t)this.state[t]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(r.p1600(this.state),this.count=0)},i.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,0!=(128&t)&&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(t){this.squeezing||this.absorbLastFewBits(1);const n=e.alloc(t);for(let e=0;e<t;++e)n[e]=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(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},t.exports=i}).call(this,n(19).Buffer)},function(t,e){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];e.p1600=function(t){for(let e=0;e<24;++e){const r=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],s=t[4]^t[14]^t[24]^t[34]^t[44],u=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],h=t[8]^t[18]^t[28]^t[38]^t[48],d=t[9]^t[19]^t[29]^t[39]^t[49];let f=h^(o<<1|a>>>31),p=d^(a<<1|o>>>31);const m=t[0]^f,g=t[1]^p,y=t[10]^f,b=t[11]^p,w=t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t&Wt,t[49]=kt^~Tt&Qt,t[0]^=n[2*e],t[1]^=n[2*e+1]}}},function(t,e,n){(function(e){const r=n(108),i=n(66);function o(t){return t.startsWith("int[")?"int256"+t.slice(3):"int"===t?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):"uint"===t?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):"fixed"===t?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):"ufixed"===t?"ufixed128x128":t}function a(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function s(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function u(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?""===e[2]?"dynamic":parseInt(e[2],10):null}function c(t){var e=typeof t;if("string"===e)return r.isHexString(t)?new i(r.stripHexPrefix(t),16):new i(t,10);if("number"===e)return new i(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function l(t,n){var o,h,d,f;if("address"===t)return l("uint160",c(n));if("bool"===t)return l("uint8",n?1:0);if("string"===t)return l("bytes",new e(n,"utf8"));if(function(t){return t.lastIndexOf("]")===t.length-1}(t)){if(void 0===n.length)throw new Error("Not an array?");if("dynamic"!==(o=u(t))&&0!==o&&n.length>o)throw new Error("Elements exceed array size: "+o);for(f in d=[],t=t.slice(0,t.lastIndexOf("[")),"string"==typeof n&&(n=JSON.parse(n)),n)d.push(l(t,n[f]));if("dynamic"===o){var p=l("uint256",n.length);d.unshift(p)}return e.concat(d)}if("bytes"===t)return n=new e(n),d=e.concat([l("uint256",n.length),n]),n.length%32!=0&&(d=e.concat([d,r.zeros(32-n.length%32)])),d;if(t.startsWith("bytes")){if((o=a(t))<1||o>32)throw new Error("Invalid bytes<N> width: "+o);return r.setLengthRight(n,32)}if(t.startsWith("uint")){if((o=a(t))%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(e,"be",32)}if(t.startsWith("int")){if((o=a(t))%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(e,"be",32)}if(t.startsWith("ufixed")){if(o=s(t),(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(t.startsWith("fixed"))return o=s(t),l("int256",c(n).mul(new i(2).pow(new i(o[1]))));throw new Error("Unsupported or invalid type: "+t)}function h(t){return"string"===t||"bytes"===t||"dynamic"===u(t)}function d(t,n){if(t.length!==n.length)throw new Error("Number of types are not matching the values");for(var i,s,u=[],l=0;l<t.length;l++){var h=o(t[l]),d=n[l];if("bytes"===h)u.push(d);else if("string"===h)u.push(new e(d,"utf8"));else if("bool"===h)u.push(new e(d?"01":"00","hex"));else if("address"===h)u.push(r.setLength(d,20));else if(h.startsWith("bytes")){if((i=a(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=a(h))%8||i<8||i>256)throw new Error("Invalid uint<N> width: "+i);if((s=c(d)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+s.bitLength());u.push(s.toArrayLike(e,"be",i/8))}else{if(!h.startsWith("int"))throw new Error("Unsupported or invalid type: "+h);if((i=a(h))%8||i<8||i>256)throw new Error("Invalid int<N> width: "+i);if((s=c(d)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+s.bitLength());u.push(s.toTwos(i).toArrayLike(e,"be",i/8))}}return e.concat(u)}t.exports={rawEncode:function(t,n){var r=[],i=[],a=32*t.length;for(var s in t){var u=o(t[s]),c=l(u,n[s]);h(u)?(r.push(l("uint256",a)),i.push(c),a+=c.length):r.push(c)}return e.concat(r.concat(i))},solidityPack:d,soliditySHA3:function(t,e){return r.keccak(d(t,e))}}}).call(this,n(19).Buffer)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.filterFromParam=e.FilterPolyfill=void 0;const r=n(68),i=n(38),o={jsonrpc:"2.0",id:0};function a(t){return{fromBlock:u(t.fromBlock),toBlock:u(t.toBlock),addresses:void 0===t.address?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}function s(t){const e={fromBlock:c(t.fromBlock),toBlock:c(t.toBlock),topics:t.topics};return null!==t.addresses&&(e.address=t.addresses),e}function u(t){if(void 0===t||"latest"===t||"pending"===t)return"latest";if("earliest"===t)return(0,r.IntNumber)(0);if((0,i.isHexString)(t))return(0,i.intNumberFromHexString)(t);throw new Error("Invalid block option: "+String(t))}function c(t){return"latest"===t?t:(0,i.hexStringFromIntNumber)(t)}function l(){return Object.assign(Object.assign({},o),{error:{code:-32e3,message:"filter not found"}})}function h(){return Object.assign(Object.assign({},o),{result:[]})}e.FilterPolyfill=class{constructor(t){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=t}async newFilter(t){const e=a(t),n=this.makeFilterId(),r=await this.setInitialCursorPosition(n,e.fromBlock);return console.log(`Installing new log filter(${n}):`,e,"initial cursor position:",r),this.logFilters.set(n,e),this.setFilterTimeout(n),(0,i.hexStringFromIntNumber)(n)}async newBlockFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log(`Installing new block filter (${t}) with initial cursor position:`,e),this.blockFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}async newPendingTransactionFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log(`Installing new block filter (${t}) with initial cursor position:`,e),this.pendingTransactionFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}uninstallFilter(t){const e=(0,i.intNumberFromHexString)(t);return console.log(`Uninstalling filter (${e})`),this.deleteFilter(e),!0}getFilterChanges(t){const e=(0,i.intNumberFromHexString)(t);return this.timeouts.has(e)&&this.setFilterTimeout(e),this.logFilters.has(e)?this.getLogFilterChanges(e):this.blockFilters.has(e)?this.getBlockFilterChanges(e):this.pendingTransactionFilters.has(e)?this.getPendingTransactionFilterChanges(e):Promise.resolve(l())}async getFilterLogs(t){const e=(0,i.intNumberFromHexString)(t),n=this.logFilters.get(e);return n?this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[s(n)]})):l()}makeFilterId(){return(0,r.IntNumber)(++this.nextFilterId)}sendAsyncPromise(t){return new Promise(((e,n)=>{this.provider.sendAsync(t,((t,r)=>t?n(t):Array.isArray(r)||null==r?n(new Error("unexpected response received: "+JSON.stringify(r))):void e(r)))}))}deleteFilter(t){console.log(`Deleting filter (${t})`),this.logFilters.delete(t),this.blockFilters.delete(t),this.pendingTransactionFilters.delete(t),this.cursors.delete(t),this.timeouts.delete(t)}async getLogFilterChanges(t){const e=this.logFilters.get(t),n=this.cursors.get(t);if(!n||!e)return l();const a=await this.getCurrentBlockHeight(),u="latest"===e.toBlock?a:e.toBlock;if(n>a)return h();if(n>e.toBlock)return h();console.log(`Fetching logs from ${n} to ${u} for filter ${t}`);const c=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[s(Object.assign(Object.assign({},e),{fromBlock:n,toBlock:u}))]}));if(Array.isArray(c.result)){const e=c.result.map((t=>(0,i.intNumberFromHexString)(t.blockNumber||"0x0"))),o=Math.max(...e);if(o&&o>n){const e=(0,r.IntNumber)(o+1);console.log(`Moving cursor position for filter (${t}) from ${n} to ${e}`),this.cursors.set(t,e)}}return c}async getBlockFilterChanges(t){const e=this.cursors.get(t);if(!e)return l();const n=await this.getCurrentBlockHeight();if(e>n)return h();console.log(`Fetching blocks from ${e} to ${n} for filter (${t})`);const a=(await Promise.all((0,i.range)(e,n+1).map((t=>this.getBlockHashByNumber((0,r.IntNumber)(t)))))).filter((t=>!!t)),s=(0,r.IntNumber)(e+a.length);return console.log(`Moving cursor position for filter (${t}) from ${e} to ${s}`),this.cursors.set(t,s),Object.assign(Object.assign({},o),{result:a})}async getPendingTransactionFilterChanges(t){return Promise.resolve(h())}async setInitialCursorPosition(t,e){const n=await this.getCurrentBlockHeight(),r="number"==typeof e&&e>n?e:n;return this.cursors.set(t,r),r}setFilterTimeout(t){const e=this.timeouts.get(t);e&&window.clearTimeout(e);const n=window.setTimeout((()=>{console.log(`Filter (${t}) timed out`),this.deleteFilter(t)}),3e5);this.timeouts.set(t,n)}async getCurrentBlockHeight(){const{result:t}=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_blockNumber",params:[]}));return(0,i.intNumberFromHexString)((0,i.ensureHexString)(t))}async getBlockHashByNumber(t){const e=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getBlockByNumber",params:[(0,i.hexStringFromIntNumber)(t),!1]}));return e.result&&"string"==typeof e.result.hash?(0,i.ensureHexString)(e.result.hash):null}},e.filterFromParam=a},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.JSONRPCMethod=void 0,function(t){t.eth_accounts="eth_accounts",t.eth_coinbase="eth_coinbase",t.net_version="net_version",t.eth_chainId="eth_chainId",t.eth_uninstallFilter="eth_uninstallFilter",t.eth_requestAccounts="eth_requestAccounts",t.eth_sign="eth_sign",t.eth_ecRecover="eth_ecRecover",t.personal_sign="personal_sign",t.personal_ecRecover="personal_ecRecover",t.eth_signTransaction="eth_signTransaction",t.eth_sendRawTransaction="eth_sendRawTransaction",t.eth_sendTransaction="eth_sendTransaction",t.eth_signTypedData_v1="eth_signTypedData_v1",t.eth_signTypedData_v2="eth_signTypedData_v2",t.eth_signTypedData_v3="eth_signTypedData_v3",t.eth_signTypedData_v4="eth_signTypedData_v4",t.eth_signTypedData="eth_signTypedData",t.cbWallet_arbitrary="walletlink_arbitrary",t.wallet_addEthereumChain="wallet_addEthereumChain",t.wallet_switchEthereumChain="wallet_switchEthereumChain",t.wallet_watchAsset="wallet_watchAsset",t.eth_subscribe="eth_subscribe",t.eth_unsubscribe="eth_unsubscribe",t.eth_newFilter="eth_newFilter",t.eth_newBlockFilter="eth_newBlockFilter",t.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",t.eth_getFilterChanges="eth_getFilterChanges",t.eth_getFilterLogs="eth_getFilterLogs"}(e.JSONRPCMethod||(e.JSONRPCMethod={}))},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionManager=void 0;const r=n(171),i=n(179),o=()=>{};e.SubscriptionManager=class{constructor(t){const e=new r({provider:t,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:o}=i({blockTracker:e,provider:t});this.events=n,this.subscriptionMiddleware=o}async handleRequest(t){const e={};return await this.subscriptionMiddleware(t,e,o,o),e}destroy(){this.subscriptionMiddleware.destroy()}}},function(t,e,n){const r=n(117),i=n(172);function o(t,e){return new Promise((n=>{const r=setTimeout(n,t);r.unref&&e&&r.unref()}))}t.exports=class extends i{constructor(t={}){if(!t.provider)throw new Error("PollingBlockTracker - no provider specified.");const e=t.pollingInterval||2e4,n=t.retryTimeout||e/10,r=void 0===t.keepEventLoopActive||t.keepEventLoopActive,i=t.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:e},t)),this._provider=t.provider,this._pollingInterval=e,this._retryTimeout=n,this._keepEventLoopActive=r,this._setSkipCacheFlag=i}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._performSync().catch((t=>this.emit("error",t)))}async _performSync(){for(;this._isRunning;)try{await this._updateLatestBlock(),await o(this._pollingInterval,!this._keepEventLoopActive)}catch(t){const e=new Error("PollingBlockTracker - encountered an error while attempting to update latest block:\n"+t.stack);try{this.emit("error",e)}catch(t){console.error(e)}await o(this._retryTimeout,!this._keepEventLoopActive)}}async _updateLatestBlock(){const t=await this._fetchLatestBlock();this._newPotentialLatest(t)}async _fetchLatestBlock(){const t={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(t.skipCache=!0);const e=await r((e=>this._provider.sendAsync(t,e)))();if(e.error)throw new Error("PollingBlockTracker - encountered error fetching block:\n"+e.error);return e.result}}},function(t,e,n){n(118),n(117);const r=n(175),i=(t,e)=>t+e,o=["sync","latest"];function a(t){return Number.parseInt(t,16)}t.exports=class extends r{constructor(t={}){super(),this._blockResetDuration=t.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(){return this._currentBlock?this._currentBlock:await new Promise((t=>this.once("latest",t)))}removeAllListeners(t){t?super.removeAllListeners(t):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(t,e){o.includes(t)&&this._maybeStart()}_onRemoveListener(t,e){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((t=>this.listenerCount(t))).reduce(i)}_newPotentialLatest(t){const e=this._currentBlock;e&&a(t)<=a(e)||this._setCurrentBlock(t)}_setCurrentBlock(t){const e=this._currentBlock;this._currentBlock=t,this.emit("latest",t),this.emit("sync",{oldBlock:e,newBlock:t})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}},function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var i in r)n.call(r,i)&&(t[i]=r[i])}return t};var n=Object.prototype.hasOwnProperty},function(t,e){t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,n=void 0!==t.start?t.start:Math.floor(Math.random()*e);return function(){return n%=e,n++}}},function(t,e,n){const r=n(176),i=n(65);var o="object"==typeof Reflect?Reflect:null,a=o&&"function"==typeof o.apply?o.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};function s(){i.call(this)}function u(t,e,n){try{a(t,e,n)}catch(t){setTimeout((()=>{throw t}))}}t.exports=s,r.inherits(s,i),s.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[t];if(void 0===s)return!1;if("function"==typeof s)u(s,this,e);else{var c=s.length,l=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}(s,c);for(n=0;n<c;++n)u(l[n],this,e)}return!0}},function(t,e,n){(function(t){var r=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},i=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(s(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(t).replace(i,(function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){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 t}})),u=r[n];n<o;u=r[++n])m(u)||!v(u)?a+=" "+u:a+=" "+s(u);return a},e.deprecate=function(n,r){if(void 0!==t&&!0===t.noDeprecation)return n;if(void 0===t)return function(){return e.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var o,a={};function s(t,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&&e._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,t,r.depth)}function u(t,e){var n=s.styles[e];return n?"["+s.colors[n][0]+"m"+t+"["+s.colors[n][1]+"m":t}function c(t,e){return t}function l(t,n,r){if(t.customInspect&&n&&_(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return y(i)||(i=l(t,i,r)),i}var o=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(y(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return g(e)?t.stylize(""+e,"number"):p(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}(t,n);if(o)return o;var a=Object.keys(n),s=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),L(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(n);if(0===a.length){if(_(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(M(n))return t.stylize(Date.prototype.toString.call(n),"date");if(L(n))return h(n)}var c,v="",N=!1,E=["{","}"];return f(n)&&(N=!0,E=["[","]"]),_(n)&&(v=" [Function"+(n.name?": "+n.name:"")+"]"),w(n)&&(v=" "+RegExp.prototype.toString.call(n)),M(n)&&(v=" "+Date.prototype.toUTCString.call(n)),L(n)&&(v=" "+h(n)),0!==a.length||N&&0!=n.length?r<0?w(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=N?function(t,e,n,r,i){for(var o=[],a=0,s=e.length;a<s;++a)x(e,String(a))?o.push(d(t,e,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(d(t,e,n,r,i,!0))})),o}(t,n,r,s,a):a.map((function(e){return d(t,n,r,s,e,N)})),t.seen.pop(),function(t,e,n){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}(c,v,E)):E[0]+v+E[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),x(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=m(n)?l(t,u.value,null):l(t,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function f(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function m(t){return null===t}function g(t){return"number"==typeof t}function y(t){return"string"==typeof t}function b(t){return void 0===t}function w(t){return v(t)&&"[object RegExp]"===N(t)}function v(t){return"object"==typeof t&&null!==t}function M(t){return v(t)&&"[object Date]"===N(t)}function L(t){return v(t)&&("[object Error]"===N(t)||t instanceof Error)}function _(t){return"function"==typeof t}function N(t){return Object.prototype.toString.call(t)}function E(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(b(o)&&(o=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=t.pid;a[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else a[n]=function(){};return a[n]},e.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=f,e.isBoolean=p,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=y,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=w,e.isObject=v,e.isDate=M,e.isError=L,e.isFunction=_,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(177);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function x(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",function(){var t=new Date,e=[E(t.getHours()),E(t.getMinutes()),E(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}(),e.format.apply(e,arguments))},e.inherits=n(178),e._extend=function(t,e){if(!e||!v(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var A="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function I(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(A&&t[A]){var e;if("function"!=typeof(e=t[A]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,A,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise((function(t,r){e=t,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,r){t?n(t):e(r)}));try{t.apply(this,i)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),A&&Object.defineProperty(e,A,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=A,e.callbackify=function(e){if("function"!=typeof e)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,a=function(){return i.apply(o,arguments)};e.apply(this,n).then((function(e){t.nextTick(a,null,e)}),(function(e){t.nextTick(I,e,a)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(40))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){const r=n(64).default,i=n(119),{createAsyncMiddleware:o}=n(120),a=n(187),{unsafeRandomBytes:s,incrementHexInt:u}=n(60),c=n(98);function l(t){return{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}t.exports=function({blockTracker:t,provider:e}){const n={},h=a({blockTracker:t,provider:e});let d=!1;const f=new r,p=i({eth_subscribe:o((async function(r,i){if(d)throw new Error("SubscriptionManager - attempting to use after destroying");const o=r.params[0],a=s(16);let f;switch(o){case"newHeads":f=function({subId:n}){const r={type:o,destroy:async()=>{t.removeListener("sync",r.update)},update:async({oldBlock:t,newBlock:r})=>{const i=r,o=u(t);(await c({provider:e,fromBlock:o,toBlock:i})).map(l).forEach((t=>{m(n,t)}))}};return t.on("sync",r.update),r}({subId:a});break;case"logs":const n=r.params[1];f=function({subId:t,filter:e}){return e.on("update",(e=>m(t,e))),{type:o,destroy:async()=>await h.uninstallFilter(e.idHex)}}({subId:a,filter:await h.newLogFilter(n)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${o}"`)}return n[a]=f,void(i.result=a)})),eth_unsubscribe:o((async function(t,e){if(d)throw new Error("SubscriptionManager - attempting to use after destroying");const r=t.params[0],i=n[r];i?(delete n[r],await i.destroy(),e.result=!0):e.result=!1}))});return p.destroy=function(){f.removeAllListeners();for(const t in n)n[t].destroy(),delete n[t];d=!0},{events:f,middleware:p};function m(t,e){f.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t,result:e}})}}},function(t,e){t.exports=function(t){return(e,n,r,i)=>{const o=t[e.method];return void 0===o?r():"function"==typeof o?o(e,n,r,i):(n.result=o,i())}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.createIdRemapMiddleware=void 0;const r=n(121);e.createIdRemapMiddleware=function(){return(t,e,n,i)=>{const o=t.id,a=r.getUniqueId();t.id=a,e.id=a,n((n=>{t.id=o,e.id=o,n()}))}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(t){return async(e,n,r,i)=>{let o;const a=new Promise((t=>{o=t}));let s=null,u=!1;const c=async()=>{u=!0,r((t=>{s=t,o()})),await a};try{await t(e,n,c),u?(await a,s(null)):i(null)}catch(t){s?s(t):i(t)}}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(t){return(e,n,r,i)=>{const o=t[e.method];return void 0===o?r():"function"==typeof o?o(e,n,r,i):(n.result=o,i())}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const r=n(95);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return r.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});const i=n(123);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=n(185);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const a=n(96);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(95),i=n(123),o=n(96);function a(t,e){const[n,o]=u(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),o)}function s(t,e){const[n,o]=u(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),o)}function u(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){const{message:e,data:n}=t;if(e&&"string"!=typeof e)throw new Error("Must specify string message.");return[e||void 0,n]}}return[]}e.ethErrors={rpc:{parse:t=>a(o.errorCodes.rpc.parse,t),invalidRequest:t=>a(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>a(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>a(o.errorCodes.rpc.methodNotFound,t),internal:t=>a(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(e,t)},invalidInput:t=>a(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>a(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>a(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>a(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>a(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>a(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>s(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>s(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>s(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>s(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>s(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:n,data:i}=t;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(e,n,i)}}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;const r=n(122);e.mergeMiddleware=function(t){const e=new r.JsonRpcEngine;return t.forEach((t=>e.push(t))),e.asMiddleware()}},function(t,e,n){const r=n(224).Mutex,{createAsyncMiddleware:i}=n(120),o=n(119),a=n(188),s=n(191),u=n(192),{intToHex:c,hexToInt:l}=n(60);function h(t){return d((async(...e)=>{const n=await t(...e);return c(n.id)}))}function d(t){return i((async(e,n)=>{const r=await t.apply(null,e.params);n.result=r}))}function f(t,e){const n=[];for(let e in t)n.push(t[e]);return n}t.exports=function({blockTracker:t,provider:e}){let n=0,i={};const p=new r,m=function({mutex:t}){return e=>async(n,r,i,o)=>{(await t.acquire())(),e(n,r,i,o)}}({mutex:p}),g=o({eth_newFilter:m(h(b)),eth_newBlockFilter:m(h(w)),eth_newPendingTransactionFilter:m(h(v)),eth_uninstallFilter:m(d(_)),eth_getFilterChanges:m(d(M)),eth_getFilterLogs:m(d(L))}),y=async({oldBlock:t,newBlock:e})=>{if(0===i.length)return;const n=await p.acquire();try{await Promise.all(f(i).map((async n=>{try{await n.update({oldBlock:t,newBlock:e})}catch(t){console.error(t)}})))}catch(t){console.error(t)}n()};return g.newLogFilter=b,g.newBlockFilter=w,g.newPendingTransactionFilter=v,g.uninstallFilter=_,g.getFilterChanges=M,g.getFilterLogs=L,g.destroy=()=>{!async function(){const t=f(i).length;i={},E({prevFilterCount:t,newFilterCount:0})}()},g;async function b(t){const n=new a({provider:e,params:t});return await N(n),n}async function w(){const t=new s({provider:e});return await N(t),t}async function v(){const t=new u({provider:e});return await N(t),t}async function M(t){const e=l(t),n=i[e];if(!n)throw new Error(`No filter for index "${e}"`);return n.getChangesAndClear()}async function L(t){const e=l(t),n=i[e];if(!n)throw new Error(`No filter for index "${e}"`);return"log"===n.type?results=n.getAllResults():results=[],results}async function _(t){const e=l(t),n=i[e],r=Boolean(n);return r&&await async function(t){const e=f(i).length;delete i[t];E({prevFilterCount:e,newFilterCount:f(i).length})}(e),r}async function N(e){const r=f(i).length,o=await t.getLatestBlock();return await e.initialize({currentBlock:o}),n++,i[n]=e,e.id=n,e.idHex=c(n),E({prevFilterCount:r,newFilterCount:f(i).length}),n}function E({prevFilterCount:e,newFilterCount:n}){0===e&&n>0?t.on("sync",y):e>0&&0===n&&t.removeListener("sync",y)}}},function(t,e,n){const r=n(118),i=n(189),o=n(190),{bnToHex:a,hexToInt:s,incrementHexInt:u,minBlockRef:c,blockRefIsNumber:l}=n(60);t.exports=class extends o{constructor({provider:t,params:e}){super(),this.type="log",this.ethQuery=new r(t),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},e),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map((t=>t.toLowerCase())))}async initialize({currentBlock:t}){let e=this.params.fromBlock;["latest","pending"].includes(e)&&(e=t),"earliest"===e&&(e="0x0"),this.params.fromBlock=e;const n=c(this.params.toBlock,t),r=Object.assign({},this.params,{toBlock:n}),i=await this._fetchLogs(r);this.addInitialResults(i)}async update({oldBlock:t,newBlock:e}){const n=e;let r;r=t?u(t):e;const i=Object.assign({},this.params,{fromBlock:r,toBlock:n}),o=(await this._fetchLogs(i)).filter((t=>this.matchLog(t)));this.addResults(o)}async _fetchLogs(t){return await i((e=>this.ethQuery.getLogs(t,e)))()}matchLog(t){if(s(this.params.fromBlock)>=s(t.blockNumber))return!1;if(l(this.params.toBlock)&&s(this.params.toBlock)<=s(t.blockNumber))return!1;const e=t.address&&t.address.toLowerCase();return!(this.params.address&&e&&!this.params.address.includes(e))&&this.params.topics.every(((e,n)=>{let r=t.topics[n];if(!r)return!1;r=r.toLowerCase();let i=Array.isArray(e)?e:[e];return!!i.includes(null)||(i=i.map((t=>t.toLowerCase())),i.includes(r))}))}}},function(t,e,n){const r=(t,e,n,r)=>function(...i){return new e.promiseModule(((o,a)=>{e.multiArgs?i.push(((...t)=>{e.errorFirst?t[0]?a(t):(t.shift(),o(t)):o(t)})):e.errorFirst?i.push(((t,e)=>{t?a(t):o(e)})):i.push(o);const s=this===n?r:this;Reflect.apply(t,s,i)}))},i=new WeakMap;t.exports=(t,e)=>{e={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...e};const n=typeof t;if(null===t||"object"!==n&&"function"!==n)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===t?"null":n}\``);const o=new WeakMap,a=new Proxy(t,{apply(t,n,i){const s=o.get(t);if(s)return Reflect.apply(s,n,i);const u=e.excludeMain?t:r(t,e,a,t);return o.set(t,u),Reflect.apply(u,n,i)},get(t,n){const s=t[n];if(!((t,n)=>{let r=i.get(t);if(r||(r={},i.set(t,r)),n in r)return r[n];const o=t=>"string"==typeof t||"symbol"==typeof n?n===t:t.test(n),a=Reflect.getOwnPropertyDescriptor(t,n),s=void 0===a||a.writable||a.configurable,u=(e.include?e.include.some(o):!e.exclude.some(o))&&s;return r[n]=u,u})(t,n)||s===Function.prototype[n])return s;const u=o.get(s);if(u)return u;if("function"==typeof s){const n=r(s,e,a,t);return o.set(s,n),n}return s}});return a}},function(t,e,n){const r=n(97);t.exports=class extends r{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(t){this.allResults=this.allResults.concat(t),super.addResults(t)}addInitialResults(t){this.allResults=this.allResults.concat(t),super.addInitialResults(t)}getAllResults(){return this.allResults}}},function(t,e,n){const r=n(97),i=n(98),{incrementHexInt:o}=n(60);t.exports=class extends r{constructor({provider:t,params:e}){super(),this.type="block",this.provider=t}async update({oldBlock:t,newBlock:e}){const n=e,r=o(t),a=(await i({provider:this.provider,fromBlock:r,toBlock:n})).map((t=>t.hash));this.addResults(a)}}},function(t,e,n){const r=n(97),i=n(98),{incrementHexInt:o}=n(60);t.exports=class extends r{constructor({provider:t}){super(),this.type="tx",this.provider=t}async update({oldBlock:t}){const e=t,n=o(t),r=await i({provider:this.provider,fromBlock:n,toBlock:e}),a=[];for(const t of r)a.push(...t.transactions);this.addResults(a)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKUI=void 0;const r=n(194),i=n(206),o=n(208);e.WalletSDKUI=class{constructor(t){this.standalone=null,this.attached=!1,this.snackbar=new i.Snackbar({darkMode:t.darkMode}),this.linkFlow=new r.LinkFlow({darkMode:t.darkMode,version:t.version,sessionId:t.session.id,sessionSecret:t.session.secret,linkAPIUrl:t.linkAPIUrl,connected$:t.connected$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const t=document.documentElement,e=document.createElement("div");e.className="-cbwsdk-css-reset",t.appendChild(e),this.linkFlow.attach(e),this.snackbar.attach(e),this.attached=!0,(0,o.injectCssReset)()}setConnectDisabled(t){this.linkFlow.setConnectDisabled(t)}addEthereumChain(t){}watchAsset(t){}switchEthereumChain(t){}requestEthereumAccounts(t){this.linkFlow.open({onCancel:t.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(t){}signEthereumTransaction(t){}submitEthereumTransaction(t){}ethereumAddressFromSignedMessage(t){}showConnecting(t){let e;return e=t.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:t.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:t.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:t.onResetConnection}]},this.snackbar.presentItem(e)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(t){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(t){this.standalone=t}isStandalone(){var t;return null!==(t=this.standalone)&&void 0!==t&&t}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkFlow=void 0;const r=n(8),i=n(48),o=n(195);e.LinkFlow=class{constructor(t){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=t.darkMode,this.version=t.version,this.sessionId=t.sessionId,this.sessionSecret=t.sessionSecret,this.linkAPIUrl=t.linkAPIUrl,this.isParentConnection=t.isParentConnection,this.connected$=t.connected$}attach(t){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",t.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe((t=>{this.isConnected!==t&&(this.isConnected=t,this.render())})))}detach(){var t;this.root&&(this.subscriptions.unsubscribe(),(0,r.render)(null,this.root),null===(t=this.root.parentElement)||void 0===t||t.removeChild(this.root))}setConnectDisabled(t){this.connectDisabled=t}open(t){this.isOpen=!0,this.onCancel=t.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){if(!this.root)return;const t=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(t)}}},function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.TryExtensionLinkDialog=void 0;const i=r(n(124)),o=n(8),a=n(99),s=n(38),u=n(196),c=r(n(197)),l=r(n(198)),h=r(n(199)),d=r(n(200)),f=n(201),p=n(203),m=r(n(205));e.TryExtensionLinkDialog=t=>{const{isOpen:e,darkMode:n}=t,[r,s]=(0,a.useState)(!e),[u,c]=(0,a.useState)(!e);(0,a.useEffect)((()=>{const t=[window.setTimeout((()=>{c(!e)}),10)];return e?s(!1):t.push(window.setTimeout((()=>{s(!0)}),360)),()=>{t.forEach(window.clearTimeout)}}),[t.isOpen]);const l=n?"dark":"light";return(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-container",r&&"-cbwsdk-extension-dialog-container-hidden")},(0,o.h)("style",null,m.default),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-backdrop",l,u&&"-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",u&&"-cbwsdk-extension-dialog-box-hidden")},(0,o.h)(g,{darkMode:n,onInstallClick:()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}}),t.connectDisabled?null:(0,o.h)(y,{darkMode:n,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,linkAPIUrl:t.linkAPIUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection}),t.onCancel&&(0,o.h)(w,{darkMode:n,onClick:t.onCancel}))))};const g=({darkMode:t,onInstallClick:e})=>{const[n,r]=(0,a.useState)(!1),s=(0,a.useCallback)((()=>{n?window.location.reload():(e(),r(!0))}),[e,n]),u=t?"dark":"light";return(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box-top",u)},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-install-region"},(0,o.h)("h2",{class:u},"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:s},n?"Refresh":"Install")),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box-top-info-region",u)},(0,o.h)(b,{darkMode:t,icon:l.default,text:"Connect to crypto apps with one click"}),(0,o.h)(b,{darkMode:t,icon:h.default,text:"Your private key is stored securely"}),(0,o.h)(b,{darkMode:t,icon:c.default,text:"Works with Ethereum, Polygon, and more"})))},y=t=>{const e=(0,s.createQrUrl)(t.sessionId,t.sessionSecret,t.linkAPIUrl,t.isParentConnection),n=t.darkMode?"dark":"light";return(0,o.h)("div",{"data-testid":"scan-qr-box",class:(0,i.default)("-cbwsdk-extension-dialog-box-bottom",n)},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-description-region"},(0,o.h)("h2",{class:n},"Or scan to connect"),(0,o.h)("body",{class:(0,i.default)("-cbwsdk-extension-dialog-box-bottom-description",n)},"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:e,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:e}),!t.isConnected&&(0,o.h)("div",{"data-testid":"connecting-spinner",class:(0,i.default)("-cbwsdk-extension-dialog-box-bottom-qr-connecting",n)},(0,o.h)(p.Spinner,{size:36,color:t.darkMode?"#FFF":"#000"}),(0,o.h)("p",null,"Connecting..."))))},b=t=>{const e=t.darkMode?"dark":"light";return(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:t.icon})),(0,o.h)("body",{class:(0,i.default)("-cbwsdk-extension-dialog-box-top-description-text",e)},t.text))},w=t=>{const e=t.darkMode?"dark":"light";return(0,o.h)("button",{type:"button",class:(0,i.default)("-cbwsdk-extension-dialog-box-cancel",e),onClick:t.onClick},(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box-cancel-x",e)}))}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.LIB_VERSION=void 0,e.LIB_VERSION="3.4.0"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOHMzLjU4IDggOCA4IDgtMy41OCA4LTgtMy41OC04LTgtOFptNS45MSA3aC0xLjk0Yy0uMS0xLjU3LS40Mi0zLS45MS00LjE1IDEuNDguODggMi41NSAyLjM4IDIuODUgNC4xNVpNOCAxNGMtLjQ1IDAtMS43Mi0xLjc3LTEuOTUtNWgzLjljLS4yMyAzLjIzLT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CBkPSJNMTEuMjcxIDcuNzQ1YTMuMTMgMy4xMyAwIDAgMC0uNTU0LS42OWwtLjYyLS42MjQtMS4xNDIgMS4xNDYuNjIxLjYyM2MuMjE4LjIyLjM4Ni40ODkuNDg3Ljc1OC4zMzUuODI2LjE2NyAxLjgyLS41MDQgMi40OTRsLTMuMjA1IDMuMjE5YTIuMjkzIDIuMjkzIDAgMCAxLTMuMjQgMCAyLjMxNiAyLjMxNiAwIDAgMSAwLTMuMjUybDEuNTI4LTEuNTM0YTQuODE1IDQuODE1IDAgMCAxLS4yODUtMi4wMDVsLTIuMzgzIDIuMzkzYTMuOTI3IDMuOTI3IDAgMCAwIDAgNS41NDQgMy45MDkgMy45MDkgMCAwIDAgNS41MzggMGwzLjIwNS0zLjIxOWEzLjk1OCAzLjk1OCAwIDAgMCAxLjA5MS0zLjQwNCA0LjIxMSA0LjIxMSAwIDAgMC0uNTM3LTEuNDQ5WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgN3Y5aDE0VjdIMVptNy41IDQuMzlWMTRoLTF2LTIuNjFjLS40NC0uMTktLjc1LS42My0uNzUtMS4xNGExLjI1IDEuMjUgMCAwIDEgMi41IDBjMCAuNTEtLjMxLjk1LS43NSAxLjE0Wk01LjY3IDZWNC4zM0M1LjY3IDMuMDUgNi43MSAyIDggMnMyLjMzIDEuMDUgMi4zMyAyLjMzVjZoMlY0LjMzQzEyLjMzIDEuOTQgMTAuMzkgMCA4IDBTMy42NyAxLjk0IDMuNjcgNC4zM1Y2aDJaIiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.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'},function(t,e,n){(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.QRCode=void 0;const i=n(8),o=n(99),a=r(n(202));e.QRCode=e=>{const[n,r]=(0,o.useState)("");return(0,o.useEffect)((()=>{var n,i;const o=new a.default({content:e.content,background:e.bgColor||"#ffffff",color:e.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(n=e.width)&&void 0!==n?n:256,height:null!==(i=e.height)&&void 0!==i?i:256,padding:0,image:e.image}),s=t.from(o.svg(),"utf8").toString("base64");r("data:image/svg+xml;base64,"+s)})),n?(0,i.h)("img",{src:n,alt:"QR Code"}):null}}).call(this,n(19).Buffer)},function(t,e){function n(t){this.mode=i.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,n=this.data.length;e<n;e++){var r=[],o=this.data.charCodeAt(e);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(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}n.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,n=this.parsedData.length;e<n;e++)t.put(this.parsedData[e],8)}},r.prototype={addData:function(t){var e=new n(t);this.dataList.push(e),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,e){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(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=r.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(var r=-1;r<=7;r++)e+r<=-1||this.moduleCount<=e+r||(this.modules[t+n][e+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 t=0,e=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=o.getLostPoint(this);(0==n||t>r)&&(t=r,e=n)}return e},createMovieClip:function(t,e,n){var r=t.createEmptyMovieClip(e,n);this.make();for(var i=0;i<this.modules.length;i++)for(var o=1*i,a=0;a<this.modules[i].length;a++){var s=1*a;this.modules[i][a]&&(r.beginFill(0,100),r.moveTo(s,o),r.lineTo(s+1,o),r.lineTo(s+1,o+1),r.lineTo(s,o+1),r.endFill())}return r},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=o.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var n=0;n<t.length;n++){var r=t[e],i=t[n];if(null==this.modules[r][i])for(var a=-2;a<=2;a++)for(var s=-2;s<=2;s++)this.modules[r+a][i+s]=-2==a||2==a||-2==s||2==s||0==a&&0==s}},setupTypeNumber:function(t){for(var e=o.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!t&&1==(e>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++)r=!t&&1==(e>>n&1),this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r},setupTypeInfo:function(t,e){for(var n=this.errorCorrectLevel<<3|e,r=o.getBCHTypeInfo(n),i=0;i<15;i++){var a=!t&&1==(r>>i&1);i<6?this.modules[i][8]=a:i<8?this.modules[i+1][8]=a:this.modules[this.moduleCount-15+i][8]=a}for(i=0;i<15;i++)a=!t&&1==(r>>i&1),i<8?this.modules[8][this.moduleCount-i-1]=a:i<9?this.modules[8][15-i-1+1]=a:this.modules[8][15-i-1]=a;this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var n=-1,r=this.moduleCount-1,i=7,a=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var u=0;u<2;u++)if(null==this.modules[r][s-u]){var c=!1;a<t.length&&(c=1==(t[a]>>>i&1)),o.getMask(e,r,s-u)&&(c=!c),this.modules[r][s-u]=c,-1==--i&&(a++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}}},r.PAD0=236,r.PAD1=17,r.createData=function(t,e,n){for(var i=c.getRSBlocks(t,e),a=new l,s=0;s<n.length;s++){var u=n[s];a.put(u.mode,4),a.put(u.getLength(),o.getLengthInBits(u.mode,t)),u.write(a)}var h=0;for(s=0;s<i.length;s++)h+=i[s].dataCount;if(a.getLengthInBits()>8*h)throw new Error("code length overflow. ("+a.getLengthInBits()+">"+8*h+")");for(a.getLengthInBits()+4<=8*h&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(!1);for(;!(a.getLengthInBits()>=8*h||(a.put(r.PAD0,8),a.getLengthInBits()>=8*h));)a.put(r.PAD1,8);return r.createBytes(a,i)},r.createBytes=function(t,e){for(var n=0,r=0,i=0,a=new Array(e.length),s=new Array(e.length),c=0;c<e.length;c++){var l=e[c].dataCount,h=e[c].totalCount-l;r=Math.max(r,l),i=Math.max(i,h),a[c]=new Array(l);for(var d=0;d<a[c].length;d++)a[c][d]=255&t.buffer[d+n];n+=l;var f=o.getErrorCorrectPolynomial(h),p=new u(a[c],f.getLength()-1).mod(f);for(s[c]=new Array(f.getLength()-1),d=0;d<s[c].length;d++){var m=d+p.getLength()-s[c].length;s[c][d]=m>=0?p.get(m):0}}var g=0;for(d=0;d<e.length;d++)g+=e[d].totalCount;var y=new Array(g),b=0;for(d=0;d<r;d++)for(c=0;c<e.length;c++)d<a[c].length&&(y[b++]=a[c][d]);for(d=0;d<i;d++)for(c=0;c<e.length;c++)d<s[c].length&&(y[b++]=s[c][d]);return y};for(var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},o={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(t){for(var e=t<<10;o.getBCHDigit(e)-o.getBCHDigit(o.G15)>=0;)e^=o.G15<<o.getBCHDigit(e)-o.getBCHDigit(o.G15);return(t<<10|e)^o.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;o.getBCHDigit(e)-o.getBCHDigit(o.G18)>=0;)e^=o.G18<<o.getBCHDigit(e)-o.getBCHDigit(o.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return o.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case 0:return(e+n)%2==0;case 1:return e%2==0;case 2:return n%3==0;case 3:return(e+n)%3==0;case 4:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case 5:return e*n%2+e*n%3==0;case 6:return(e*n%2+e*n%3)%2==0;case 7:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new u([1],0),n=0;n<t;n++)e=e.multiply(new u([1,a.gexp(n)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){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:"+t)}else if(e<27)switch(t){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:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){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:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),n=0,r=0;r<e;r++)for(var i=0;i<e;i++){for(var o=0,a=t.isDark(r,i),s=-1;s<=1;s++)if(!(r+s<0||e<=r+s))for(var u=-1;u<=1;u++)i+u<0||e<=i+u||0==s&&0==u||a==t.isDark(r+s,i+u)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<e-1;r++)for(i=0;i<e-1;i++){var c=0;t.isDark(r,i)&&c++,t.isDark(r+1,i)&&c++,t.isDark(r,i+1)&&c++,t.isDark(r+1,i+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<e;r++)for(i=0;i<e-6;i++)t.isDark(r,i)&&!t.isDark(r,i+1)&&t.isDark(r,i+2)&&t.isDark(r,i+3)&&t.isDark(r,i+4)&&!t.isDark(r,i+5)&&t.isDark(r,i+6)&&(n+=40);for(i=0;i<e;i++)for(r=0;r<e-6;r++)t.isDark(r,i)&&!t.isDark(r+1,i)&&t.isDark(r+2,i)&&t.isDark(r+3,i)&&t.isDark(r+4,i)&&!t.isDark(r+5,i)&&t.isDark(r+6,i)&&(n+=40);var l=0;for(i=0;i<e;i++)for(r=0;r<e;r++)t.isDark(r,i)&&l++;return n+Math.abs(100*l/e/e-50)/5*10}},a={glog:function(t){if(t<1)throw new Error("glog("+t+")");return a.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return a.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},s=0;s<8;s++)a.EXP_TABLE[s]=1<<s;for(s=8;s<256;s++)a.EXP_TABLE[s]=a.EXP_TABLE[s-4]^a.EXP_TABLE[s-5]^a.EXP_TABLE[s-6]^a.EXP_TABLE[s-8];for(s=0;s<255;s++)a.LOG_TABLE[a.EXP_TABLE[s]]=s;function u(t,e){if(null==t.length)throw new Error(t.length+"/"+e);for(var n=0;n<t.length&&0==t[n];)n++;this.num=new Array(t.length-n+e);for(var r=0;r<t.length-n;r++)this.num[r]=t[r+n]}function c(t,e){this.totalCount=t,this.dataCount=e}function l(){this.buffer=[],this.length=0}u.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),n=0;n<this.getLength();n++)for(var r=0;r<t.getLength();r++)e[n+r]^=a.gexp(a.glog(this.get(n))+a.glog(t.get(r)));return new u(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=a.glog(this.get(0))-a.glog(t.get(0)),n=new Array(this.getLength()),r=0;r<this.getLength();r++)n[r]=this.get(r);for(r=0;r<t.getLength();r++)n[r]^=a.gexp(a.glog(t.get(r))+e);return new u(n,0).mod(t)}},c.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]],c.getRSBlocks=function(t,e){var n=c.getRsBlockTable(t,e);if(null==n)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var r=n.length/3,i=[],o=0;o<r;o++)for(var a=n[3*o+0],s=n[3*o+1],u=n[3*o+2],l=0;l<a;l++)i.push(new c(s,u));return i},c.getRsBlockTable=function(t,e){switch(e){case 1:return c.RS_BLOCK_TABLE[4*(t-1)+0];case 0:return c.RS_BLOCK_TABLE[4*(t-1)+1];case 3:return c.RS_BLOCK_TABLE[4*(t-1)+2];case 2:return c.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},l.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var h=[[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 d(t){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 t&&(t={content:t}),t)for(var e in t)this.options[e]=t[e];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(t,e){for(var n=function(t){var e=encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return e.length+(e.length!=t?3:0)}(t),r=1,i=0,o=0,a=h.length;o<=a;o++){var s=h[o];if(!s)throw new Error("Content too long: expected "+i+" but got "+n);switch(e){case"L":i=s[0];break;case"M":i=s[1];break;case"Q":i=s[2];break;case"H":i=s[3];break;default:throw new Error("Unknwon error correction level: "+e)}if(n<=i)break;r++}if(r>h.length)throw new Error("Content too long");return r}(n,this.options.ecl),o=function(t){switch(t){case"L":return 1;case"M":return 0;case"Q":return 3;case"H":return 2;default:throw new Error("Unknwon error correction level: "+t)}}(this.options.ecl);this.qrcode=new r(i,o),this.qrcode.addData(n),this.qrcode.make()}d.prototype.svg=function(t){var e=this.options||{},n=this.qrcode.modules;void 0===t&&(t={container:e.container||"svg"});for(var r=void 0===e.pretty||!!e.pretty,i=r?" ":"",o=r?"\r\n":"",a=e.width,s=e.height,u=n.length,c=a/(u+2*e.padding),l=s/(u+2*e.padding),h=void 0!==e.join&&!!e.join,d=void 0!==e.swap&&!!e.swap,f=void 0===e.xmlDeclaration||!!e.xmlDeclaration,p=void 0!==e.predefined&&!!e.predefined,m=p?i+'<defs><path id="qrmodule" d="M0 0 h'+l+" v"+c+' H0 z" style="fill:'+e.color+';shape-rendering:crispEdges;" /></defs>'+o:"",g=i+'<rect x="0" y="0" width="'+a+'" height="'+s+'" style="fill:'+e.background+';shape-rendering:crispEdges;"/>'+o,y="",b="",w=0;w<u;w++)for(var v=0;v<u;v++)if(n[v][w]){var M=v*c+e.padding*c,L=w*l+e.padding*l;if(d){var _=M;M=L,L=_}if(h){var N=c+M,E=l+L;M=Number.isInteger(M)?Number(M):M.toFixed(2),L=Number.isInteger(L)?Number(L):L.toFixed(2),N=Number.isInteger(N)?Number(N):N.toFixed(2),b+="M"+M+","+L+" V"+(E=Number.isInteger(E)?Number(E):E.toFixed(2))+" H"+N+" V"+L+" H"+M+" Z "}else y+=p?i+'<use x="'+M.toString()+'" y="'+L.toString()+'" href="#qrmodule" />'+o:i+'<rect x="'+M.toString()+'" y="'+L.toString()+'" width="'+c+'" height="'+l+'" style="fill:'+e.color+';shape-rendering:crispEdges;"/>'+o}h&&(y=i+'<path x="0" y="0" style="fill:'+e.color+';shape-rendering:crispEdges;" d="'+b+'" />');let S="";if(void 0!==this.options.image&&this.options.image.svg){const t=a*this.options.image.width/100,e=s*this.options.image.height/100;S+=`<svg x="${a/2-t/2}" y="${s/2-e/2}" width="${t}" height="${e}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,S+=this.options.image.svg+o,S+="</svg>"}var x="";switch(t.container){case"svg":f&&(x+='<?xml version="1.0" standalone="yes"?>'+o),x+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+a+'" height="'+s+'">'+o,x+=m+g+y,x+=S,x+="</svg>";break;case"svg-viewbox":f&&(x+='<?xml version="1.0" standalone="yes"?>'+o),x+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+a+" "+s+'">'+o,x+=m+g+y,x+=S,x+="</svg>";break;case"g":x+='<g width="'+a+'" height="'+s+'">'+o,x+=m+g+y,x+=S,x+="</g>";break;default:x+=(m+g+y+S).replace(/^\s+/,"")}return x},t.exports=d},function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Spinner=void 0;const i=n(8),o=r(n(204));e.Spinner=t=>{var e;const n=null!==(e=t.size)&&void 0!==e?e:64,r=t.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}})))}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.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)}}"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.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;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-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;border-radius:8px;overflow:hidden;min-height:300px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top.dark{color:#fff;background-color:#000;box-shadow:0 4px 16px rgba(255,255,255,.05)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top.light{background-color:#fff}.-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-install-region button.dark{background-color:#3773f5}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region.light{background-color:#fafbfc}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region.dark{background-color:#141519}.-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;align-self:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-text.light{color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-text.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom{display:flex;flex-direction:row;overflow:hidden;border-radius:8px;margin-top:8px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom.light{background-color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom.dark{background-color:#000;box-shadow:0 4px 16px rgba(255,255,255,.05)}.-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.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description.dark a{color:#3773f5}.-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);background-color:#fff}.-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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.light>p{color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.dark{background-color:rgba(20,21,25,.9)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting>p{font-size:12px;font-weight:bold;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;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel.light{background-color:#fafbfc}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel.dark{background-color:#141519}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.light::before,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.light::after{background-color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.dark::before,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.dark::after{background-color:#fff}.-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;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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog h2.light{color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog h2.dark{color:#fff}'},function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;const i=r(n(124)),o=n(8),a=n(99),s=r(n(207));e.Snackbar=class{constructor(t){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=t.darkMode}attach(t){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",t.appendChild(this.root),this.render()}presentItem(t){const e=this.nextItemKey++;return this.items.set(e,t),this.render(),()=>{this.items.delete(e),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,o.render)((0,o.h)("div",null,(0,o.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((([t,n])=>(0,o.h)(e.SnackbarInstance,Object.assign({},n,{key:t})))))),this.root)}},e.SnackbarContainer=t=>(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-container")},(0,o.h)("style",null,s.default),(0,o.h)("div",{class:"-cbwsdk-snackbar"},t.children)),e.SnackbarInstance=({autoExpand:t,message:e,menuItems:n})=>{const[r,s]=(0,a.useState)(!0),[u,c]=(0,a.useState)(null!=t&&t);return(0,a.useEffect)((()=>{const t=[window.setTimeout((()=>{s(!1)}),1),window.setTimeout((()=>{c(!0)}),1e4)];return()=>{t.forEach(window.clearTimeout)}})),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance",r&&"-cbwsdk-snackbar-instance-hidden",u&&"-cbwsdk-snackbar-instance-expanded")},(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{c(!u)}},(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"},e),(0,o.h)("div",{class:"-gear-container"},!u&&(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"}))),n&&n.length>0&&(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},n.map(((t,e)=>(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item",t.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:t.onClick,key:e},(0,o.h)("svg",{width:t.svgWidth,height:t.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":t.defaultFillRule,"clip-rule":t.defaultClipRule,d:t.path,fill:"#AAAAAA"})),(0,o.h)("span",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item-info",t.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},t.info))))))}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.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}"},function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.injectCssReset=void 0;const i=r(n(209));e.injectCssReset=function(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(t)}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.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}'},function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelay=void 0;const u=s(n(211)),c=n(86),l=n(48),h=n(69),d=n(89),f=n(212),p=n(216),m=n(68),g=n(38),y=a(n(217)),b=n(90),w=n(107),v=n(125),M=n(218),L=n(219),_=n(220),N=n(221);class E extends w.WalletSDKRelayAbstract{constructor(t){var e;super(),this.accountsCallback=null,this.chainCallback=null,this.appName="",this.appLogoUrl=null,this.subscriptions=new l.Subscription,this.linkAPIUrl=t.linkAPIUrl,this.storage=t.storage,this.options=t;const{session:n,ui:r,connection:i}=this.subscribe();if(this._session=n,this.connection=i,this.relayEventManager=t.relayEventManager,t.diagnosticLogger&&t.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");t.eventListener?this.diagnostic={log:t.eventListener.onEvent}:this.diagnostic=t.diagnosticLogger,this._reloadOnDisconnect=null===(e=t.reloadOnDisconnect)||void 0===e||e,this.ui=r}subscribe(){const t=b.Session.load(this.storage)||new b.Session(this.storage).save(),e=new f.WalletSDKConnection(t.id,t.key,this.linkAPIUrl,this.diagnostic);this.subscriptions.add(e.sessionConfig$.subscribe({next:t=>{this.onSessionConfigChanged(t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),this.subscriptions.add(e.incomingEvent$.pipe((0,h.filter)((t=>"Web3Response"===t.event))).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(e.linked$.pipe((0,h.skip)(1),(0,h.tap)((t=>{var e;this.isLinked=t;const n=this.storage.getItem(w.LOCAL_STORAGE_ADDRESSES_KEY);if(t&&(this.session.linked=t),this.isUnlinkedErrorState=!1,n){const r=n.split(" "),i="true"===this.storage.getItem("IsStandaloneSigning");if(""!==r[0]&&!t&&this.session.linked&&!i){this.isUnlinkedErrorState=!0;const t=this.getSessionIdHash();null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:t})}}}))).subscribe()),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>!!t.metadata&&"1"===t.metadata.__destroyed))).subscribe((()=>{var t;const n=e.isDestroyed;return null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:n,sessionIdHash:this.getSessionIdHash()}),this.resetAndReload()}))),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.WalletUsername))).pipe((0,h.mergeMap)((e=>y.decrypt(e.metadata.WalletUsername,t.secret)))).subscribe({next:t=>{this.storage.setItem(w.WALLET_USER_NAME_KEY,t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.AppVersion))).pipe((0,h.mergeMap)((e=>y.decrypt(e.metadata.AppVersion,t.secret)))).subscribe({next:t=>{this.storage.setItem(w.APP_VERSION_KEY,t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.ChainId&&void 0!==t.metadata.JsonRpcUrl))).pipe((0,h.mergeMap)((e=>(0,l.zip)(y.decrypt(e.metadata.ChainId,t.secret),y.decrypt(e.metadata.JsonRpcUrl,t.secret))))).pipe((0,h.distinctUntilChanged)()).subscribe({next:([t,e])=>{this.chainCallback&&this.chainCallback(t,e)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.EthereumAddress))).pipe((0,h.mergeMap)((e=>y.decrypt(e.metadata.EthereumAddress,t.secret)))).subscribe({next:t=>{this.accountsCallback&&this.accountsCallback([t]),E.accountRequestCallbackIds.size>0&&(Array.from(E.accountRequestCallbackIds.values()).forEach((e=>{const n=(0,N.Web3ResponseMessage)({id:e,response:(0,_.RequestEthereumAccountsResponse)([t])});this.invokeCallback(Object.assign(Object.assign({},n),{id:e}))})),E.accountRequestCallbackIds.clear())},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}}));const n=this.options.uiConstructor({linkAPIUrl:this.options.linkAPIUrl,version:this.options.version,darkMode:this.options.darkMode,session:t,connected$:e.connected$});return e.connect(),{session:t,ui:n,connection:e}}attachUI(){this.ui.attach()}resetAndReload(){this.connection.setSessionMetadata("__destroyed","1").pipe((0,h.timeout)(1e3),(0,h.catchError)((t=>(0,l.of)(null)))).subscribe((t=>{var e,n,r;const i=this.ui.isStandalone();try{this.subscriptions.unsubscribe()}catch(t){null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(n=this.diagnostic)||void 0===n||n.log(d.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const o=b.Session.load(this.storage);if((null==o?void 0:o.id)===this._session.id?this.storage.clear():o&&(null===(r=this.diagnostic)||void 0===r||r.log(d.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:b.Session.hash(o.id)})),this._reloadOnDisconnect)return void this.ui.reloadUI();this.accountsCallback&&this.accountsCallback([],!0);const{session:a,ui:s,connection:u}=this.subscribe();this._session=a,this.connection=u,this.ui=s,i&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.attachUI()}),(t=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.FAILURE,{method:"relay::resetAndReload",message:"failed to reset and reload with "+t,sessionIdHash:this.getSessionIdHash()})}))}setAppInfo(t,e){this.appName=t,this.appLogoUrl=e}getStorageItem(t){return this.storage.getItem(t)}get session(){return this._session}setStorageItem(t,e){this.storage.setItem(t,e)}signEthereumMessage(t,e,n,r){return this.sendRequest({method:v.Web3Method.signEthereumMessage,params:{message:(0,g.hexStringFromBuffer)(t,!0),address:e,addPrefix:n,typedDataJson:r||null}})}ethereumAddressFromSignedMessage(t,e,n){return this.sendRequest({method:v.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,g.hexStringFromBuffer)(t,!0),signature:(0,g.hexStringFromBuffer)(e,!0),addPrefix:n}})}signEthereumTransaction(t){return this.sendRequest({method:v.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,g.bigIntStringFromBN)(t.weiValue),data:(0,g.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,g.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.gasPriceInWei?(0,g.bigIntStringFromBN)(t.gasPriceInWei):null,maxPriorityFeePerGas:t.gasPriceInWei?(0,g.bigIntStringFromBN)(t.gasPriceInWei):null,gasLimit:t.gasLimit?(0,g.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(t){return this.sendRequest({method:v.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,g.bigIntStringFromBN)(t.weiValue),data:(0,g.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,g.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.maxFeePerGas?(0,g.bigIntStringFromBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:t.maxPriorityFeePerGas?(0,g.bigIntStringFromBN)(t.maxPriorityFeePerGas):null,gasLimit:t.gasLimit?(0,g.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!0}})}submitEthereumTransaction(t,e){return this.sendRequest({method:v.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,g.hexStringFromBuffer)(t,!0),chainId:e}})}scanQRCode(t){return this.sendRequest({method:v.Web3Method.scanQRCode,params:{regExp:t}})}getQRCodeUrl(){return(0,g.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1)}genericRequest(t,e){return this.sendRequest({method:v.Web3Method.generic,params:{action:e,data:t}})}sendGenericMessage(t){return this.sendRequest(t)}sendRequest(t){let e=null;const n=(0,g.randomBytesHex)(8),r=r=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,t.method,r),null==e||e()};return{promise:new Promise(((i,o)=>{this.ui.isStandalone()||(e=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,(t=>{if(null==e||e(),t.errorMessage)return o(new Error(t.errorMessage));i(t)})),this.ui.isStandalone()?this.sendRequestStandalone(n,t):this.publishWeb3RequestEvent(n,t)})),cancel:r}}setConnectDisabled(t){this.ui.setConnectDisabled(t)}setAccountsCallback(t){this.accountsCallback=t}setChainCallback(t){this.chainCallback=t}publishWeb3RequestEvent(t,e){var n;const r=(0,L.Web3RequestMessage)({id:t,request:e}),i=b.Session.load(this.storage);null===(n=this.diagnostic)||void 0===n||n.log(d.EVENTS.WEB3_REQUEST,{eventId:r.id,method:"relay::"+r.request.method,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?b.Session.hash(i.id):"",isSessionMismatched:((null==i?void 0:i.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",r,!0).subscribe({next:t=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:r.id,method:"relay::"+r.request.method,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?b.Session.hash(i.id):"",isSessionMismatched:((null==i?void 0:i.id)!==this._session.id).toString()})},error:t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:r.id,response:{method:r.request.method,errorMessage:t.message}}))}}))}publishWeb3RequestCanceledEvent(t){const e=(0,M.Web3RequestCanceledMessage)(t);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",e,!1).subscribe())}publishEvent(t,e,n){const r=this.session.secret;return new l.Observable((t=>{y.encrypt(JSON.stringify(Object.assign(Object.assign({},e),{origin:location.origin})),r).then((e=>{t.next(e),t.complete()}))})).pipe((0,h.mergeMap)((e=>this.connection.publishEvent(t,e,n))))}handleIncomingEvent(t){try{this.subscriptions.add(y.decrypt(t.data,this.session.secret).pipe((0,h.map)((t=>JSON.parse(t)))).subscribe({next:t=>{const e=(0,N.isWeb3ResponseMessage)(t)?t:null;e&&this.handleWeb3ResponseMessage(e)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(t){return}}handleWeb3ResponseMessage(t){var e;const{response:n}=t;if(null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.WEB3_RESPONSE,{eventId:t.id,method:"relay::"+n.method,sessionIdHash:this.getSessionIdHash()}),(0,_.isRequestEthereumAccountsResponse)(n))return E.accountRequestCallbackIds.forEach((e=>this.invokeCallback(Object.assign(Object.assign({},t),{id:e})))),void E.accountRequestCallbackIds.clear();this.invokeCallback(t)}handleErrorResponse(t,e,n,r){this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:t,response:(0,_.ErrorResponse)(e,(null!=n?n:p.WalletUIError.UserRejectedRequest).message,r)}))}invokeCallback(t){const e=this.relayEventManager.callbacks.get(t.id);e&&(e(t.response),this.relayEventManager.callbacks.delete(t.id))}requestEthereumAccounts(){const t={method:v.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},e=(0,g.randomBytesHex)(8),n=n=>{this.publishWeb3RequestCanceledEvent(e),this.handleErrorResponse(e,t.method,n)};return{promise:new Promise(((r,i)=>{var o;this.relayEventManager.callbacks.set(e,(t=>{if(this.ui.hideRequestEthereumAccounts(),t.errorMessage)return i(new Error(t.errorMessage));r(t)}));const a=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)||null;if(a&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a))window.location.href="https://go.cb-w.com/xoXnYwQimhb?cb_url="+encodeURIComponent(window.location.href);else{if(this.ui.inlineAccountsResponse()){const t=t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:e,response:(0,_.RequestEthereumAccountsResponse)(t)}))};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:t})}else{const t=c.ethErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>n(t)})}E.accountRequestCallbackIds.add(e),this.ui.inlineAccountsResponse()||this.ui.isStandalone()||this.publishWeb3RequestEvent(e,t)}})),cancel:n}}selectProvider(t){const e={method:v.Web3Method.selectProvider,params:{providerOptions:t}},n=(0,g.randomBytesHex)(8);return{cancel:t=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,t)},promise:new Promise(((e,r)=>{this.relayEventManager.callbacks.set(n,(t=>{if(t.errorMessage)return r(new Error(t.errorMessage));e(t)})),this.ui.selectProvider&&this.ui.selectProvider({onApprove:t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:n,response:(0,_.SelectProviderResponse)(t)}))},onCancel:t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:n,response:(0,_.SelectProviderResponse)(m.ProviderType.Unselected)}))},providerOptions:t})}))}}watchAsset(t,e,n,r,i,o){const a={method:v.Web3Method.watchAsset,params:{type:t,options:{address:e,symbol:n,decimals:r,image:i},chainId:o}};let s=null;const u=(0,g.randomBytesHex)(8),c=t=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,t),null==s||s()};return this.ui.inlineWatchAsset()||(s=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload})),{cancel:c,promise:new Promise(((c,l)=>{this.relayEventManager.callbacks.set(u,(t=>{if(null==s||s(),t.errorMessage)return l(new Error(t.errorMessage));c(t)}));this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:()=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:u,response:(0,_.WatchAssetReponse)(!0)}))},onCancel:t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:u,response:(0,_.WatchAssetReponse)(!1)}))},type:t,address:e,symbol:n,decimals:r,image:i,chainId:o}),this.ui.inlineWatchAsset()||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,a)}))}}addEthereumChain(t,e,n,r,i,o){const a={method:v.Web3Method.addEthereumChain,params:{chainId:t,rpcUrls:e,blockExplorerUrls:r,chainName:i,iconUrls:n,nativeCurrency:o}};let s=null;const u=(0,g.randomBytesHex)(8),c=t=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,t),null==s||s()};return this.ui.inlineAddEthereumChain(t)||(s=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload})),{promise:new Promise(((e,n)=>{this.relayEventManager.callbacks.set(u,(t=>{if(null==s||s(),t.errorMessage)return n(new Error(t.errorMessage));e(t)}));this.ui.inlineAddEthereumChain(t)&&this.ui.addEthereumChain({onCancel:t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:u,response:(0,_.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:u,response:(0,_.AddEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))},chainId:a.params.chainId,rpcUrls:a.params.rpcUrls,blockExplorerUrls:a.params.blockExplorerUrls,chainName:a.params.chainName,iconUrls:a.params.iconUrls,nativeCurrency:a.params.nativeCurrency}),this.ui.inlineAddEthereumChain(t)||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,a)})),cancel:c}}switchEthereumChain(t){const e={method:v.Web3Method.switchEthereumChain,params:{chainId:t}};let n=null;const r=(0,g.randomBytesHex)(8),i=t=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,t),null==n||n()};return this.ui.inlineSwitchEthereumChain()||(n=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload})),{promise:new Promise(((t,i)=>{this.relayEventManager.callbacks.set(r,(e=>(null==n||n(),e.errorMessage&&e.errorCode?i(c.ethErrors.provider.custom({code:e.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):e.errorMessage?i(new Error(e.errorMessage)):void t(e)))),this.ui.switchEthereumChain({onCancel:t=>{if("number"==typeof t){const e=t;this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:r,response:(0,_.ErrorResponse)(v.Web3Method.switchEthereumChain,p.WalletUIError.SwitchEthereumChainUnsupportedChainId.message,e)}))}else t instanceof p.WalletUIError?this.handleErrorResponse(r,v.Web3Method.switchEthereumChain,t,t.errorCode):this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:r,response:(0,_.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:r,response:(0,_.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))},chainId:e.params.chainId}),this.ui.inlineSwitchEthereumChain()||this.ui.isStandalone()||this.publishWeb3RequestEvent(r,e)})),cancel:i}}inlineAddEthereumChain(t){return this.ui.inlineAddEthereumChain(t)}getSessionIdHash(){return b.Session.hash(this._session.id)}sendRequestStandalone(t,e){const n=n=>{this.handleErrorResponse(t,e.method,n)},r=e=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:t,response:e}))};switch(e.method){case v.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:e,onSuccess:r,onCancel:n});break;case v.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case v.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case v.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:e,onSuccess:r});break;default:n()}}onSessionConfigChanged(t){}}E.accountRequestCallbackIds=new Set,o([u.default],E.prototype,"resetAndReload",null),o([u.default],E.prototype,"handleIncomingEvent",null),e.WalletSDKRelay=E},function(t,e,n){var r;function i(t,e,n){if(!n||typeof n.value!==r.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+e+"> is not a method!");return{configurable:r.boolTrue,get:function(){var t=n.value.bind(this);return Object.defineProperty(this,e,{value:t,configurable:r.boolTrue,writable:r.boolTrue}),t}}}Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.typeOfFunction="function",t.boolTrue=!0}(r||(r={})),e.bind=i,e.default=i},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKConnection=void 0;const r=n(48),i=n(69),o=n(90),a=n(68),s=n(213),u=n(89),c=n(214),l=n(215);e.WalletSDKConnection=class{constructor(t,e,n,s,l=WebSocket){this.sessionId=t,this.sessionKey=e,this.diagnostic=s,this.subscriptions=new r.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,a.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)((e=>{var n;return null===(n=this.diagnostic)||void 0===n?void 0:n.log(u.EVENTS.CONNECTED_STATE_CHANGE,{state:e,sessionIdHash:o.Session.hash(t)})})),(0,i.skip)(1),(0,i.filter)((t=>t===c.ConnectionState.DISCONNECTED&&!this.destroyed)),(0,i.delay)(5e3),(0,i.filter)((t=>!this.destroyed)),(0,i.flatMap)((t=>h.connect())),(0,i.retry)()).subscribe()),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(2),(0,i.switchMap)((t=>(0,r.iif)((()=>t===c.ConnectionState.CONNECTED),this.authenticate().pipe((0,i.tap)((t=>this.sendIsLinked())),(0,i.tap)((t=>this.sendGetSessionConfig())),(0,i.map)((t=>!0))),(0,r.of)(!1)))),(0,i.distinctUntilChanged)(),(0,i.catchError)((t=>(0,r.of)(!1)))).subscribe((t=>this.connectedSubject.next(t)))),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(1),(0,i.switchMap)((t=>(0,r.iif)((()=>t===c.ConnectionState.CONNECTED),(0,r.timer)(0,1e4))))).subscribe((t=>0===t?this.updateLastHeartbeat():this.heartbeat()))),this.subscriptions.add(h.incomingData$.pipe((0,i.filter)((t=>"h"===t))).subscribe((t=>this.updateLastHeartbeat()))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((t=>["IsLinkedOK","Linked"].includes(t.type)))).subscribe((e=>{var n;const r=e;null===(n=this.diagnostic)||void 0===n||n.log(u.EVENTS.LINKED,{sessionIdHash:o.Session.hash(t),linked:r.linked,type:e.type,onlineGuests:r.onlineGuests}),this.linkedSubject.next(r.linked||r.onlineGuests>0)}))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((t=>["GetSessionConfigOK","SessionConfigUpdated"].includes(t.type)))).subscribe((e=>{var n;const r=e;null===(n=this.diagnostic)||void 0===n||n.log(u.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:o.Session.hash(t),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 t;if(this.destroyed)throw new Error("instance is destroyed");null===(t=this.diagnostic)||void 0===t||t.log(u.EVENTS.STARTED_CONNECTING,{sessionIdHash:o.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){var t;this.subscriptions.unsubscribe(),this.ws.disconnect(),null===(t=this.diagnostic)||void 0===t||t.log(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)((t=>t)),(0,i.take)(1),(0,i.map)((()=>{})))}get linked$(){return this.linkedSubject.asObservable()}get onceLinked$(){return this.linked$.pipe((0,i.filter)((t=>t)),(0,i.take)(1),(0,i.map)((()=>{})))}get sessionConfig$(){return this.sessionConfigSubject.asObservable()}get incomingEvent$(){return this.ws.incomingJSONData$.pipe((0,i.filter)((t=>{if("Event"!==t.type)return!1;const e=t;return"string"==typeof e.sessionId&&"string"==typeof e.eventId&&"string"==typeof e.event&&"string"==typeof e.data})),(0,i.map)((t=>t)))}setSessionMetadata(t,e){const n=(0,s.ClientMessageSetSessionConfig)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:{[t]:e}});return this.onceConnected$.pipe((0,i.flatMap)((t=>this.makeRequest(n))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to set session metadata")})))}publishEvent(t,e,n=!1){const r=(0,s.ClientMessagePublishEvent)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:t,data:e,callWebhook:n});return this.onceLinked$.pipe((0,i.flatMap)((t=>this.makeRequest(r))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to publish event");return t.eventId})))}sendData(t){this.ws.sendData(JSON.stringify(t))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(t){}}makeRequest(t,e=6e4){const n=t.id;try{this.sendData(t)}catch(t){return(0,r.throwError)(t)}return this.ws.incomingJSONData$.pipe((0,i.timeoutWith)(e,(0,r.throwError)(new Error(`request ${n} timed out`))),(0,i.filter)((t=>t.id===n)),(0,i.take)(1))}authenticate(){const t=(0,s.ClientMessageHostSession)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(t).pipe((0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to authentcate")})))}sendIsLinked(){const t=(0,s.ClientMessageIsLinked)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}sendGetSessionConfig(){const t=(0,s.ClientMessageGetSessionConfig)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ClientMessagePublishEvent=e.ClientMessageSetSessionConfig=e.ClientMessageGetSessionConfig=e.ClientMessageIsLinked=e.ClientMessageHostSession=void 0,e.ClientMessageHostSession=function(t){return Object.assign({type:"HostSession"},t)},e.ClientMessageIsLinked=function(t){return Object.assign({type:"IsLinked"},t)},e.ClientMessageGetSessionConfig=function(t){return Object.assign({type:"GetSessionConfig"},t)},e.ClientMessageSetSessionConfig=function(t){return Object.assign({type:"SetSessionConfig"},t)},e.ClientMessagePublishEvent=function(t){return Object.assign({type:"PublishEvent"},t)}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.RxWebSocket=e.ConnectionState=void 0;const r=n(48),i=n(69);var o;!function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"}(o=e.ConnectionState||(e.ConnectionState={})),e.RxWebSocket=class{constructor(t,e=WebSocket){this.WebSocketClass=e,this.webSocket=null,this.connectionStateSubject=new r.BehaviorSubject(o.DISCONNECTED),this.incomingDataSubject=new r.Subject,this.url=t.replace(/^http/,"ws")}connect(){return this.webSocket?(0,r.throwError)(new Error("webSocket object is not null")):new r.Observable((t=>{let e;try{this.webSocket=e=new this.WebSocketClass(this.url)}catch(e){return void t.error(e)}this.connectionStateSubject.next(o.CONNECTING),e.onclose=e=>{this.clearWebSocket(),t.error(new Error(`websocket error ${e.code}: ${e.reason}`)),this.connectionStateSubject.next(o.DISCONNECTED)},e.onopen=e=>{t.next(),t.complete(),this.connectionStateSubject.next(o.CONNECTED)},e.onmessage=t=>{this.incomingDataSubject.next(t.data)}})).pipe((0,i.take)(1))}disconnect(){const{webSocket:t}=this;if(t){this.clearWebSocket(),this.connectionStateSubject.next(o.DISCONNECTED);try{t.close()}catch(t){}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe((0,i.flatMap)((t=>{let e;try{e=JSON.parse(t)}catch(t){return(0,r.empty)()}return(0,r.of)(e)})))}sendData(t){const{webSocket:e}=this;if(!e)throw new Error("websocket is not connected");e.send(t)}clearWebSocket(){const{webSocket:t}=this;t&&(this.webSocket=null,t.onclose=null,t.onerror=null,t.onmessage=null,t.onopen=null)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.isServerMessageFail=void 0,e.isServerMessageFail=function(t){return t&&"Fail"===t.type&&"number"==typeof t.id&&"string"==typeof t.sessionId&&"string"==typeof t.error}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletUIError=void 0;class r extends Error{constructor(t,e){super(t),this.message=t,this.errorCode=e}}e.WalletUIError=r,r.UserRejectedRequest=new r("User rejected request"),r.SwitchEthereumChainUnsupportedChainId=new r("Unsupported chainId",4902)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.decrypt=e.encrypt=void 0;const r=n(48),i=n(38);e.encrypt=async function(t,e){if(64!==e.length)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.importKey("raw",(0,i.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=new TextEncoder,a=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},r,o.encode(t)),s=a.slice(a.byteLength-16),u=a.slice(0,a.byteLength-16),c=new Uint8Array(s),l=new Uint8Array(u),h=new Uint8Array([...n,...c,...l]);return(0,i.uint8ArrayToHex)(h)},e.decrypt=function(t,e){if(64!==e.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)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,i.hexStringToUint8Array)(t),a=o.slice(0,12),s=o.slice(12,28),u=o.slice(28),c=new Uint8Array([...u,...s]),l={name:"AES-GCM",iv:new Uint8Array(a)};try{const t=await window.crypto.subtle.decrypt(l,r,c),e=new TextDecoder;n.next(e.decode(t)),n.complete()}catch(t){n.error(t)}}()}))}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestCanceledMessage=void 0;const r=n(100);e.Web3RequestCanceledMessage=function(t){return{type:r.RelayMessageType.WEB3_REQUEST_CANCELED,id:t}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestMessage=void 0;const r=n(100);e.Web3RequestMessage=function(t){return Object.assign({type:r.RelayMessageType.WEB3_REQUEST},t)}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumAddressFromSignedMessageResponse=e.SubmitEthereumTransactionResponse=e.SignEthereumTransactionResponse=e.SignEthereumMessageResponse=e.isRequestEthereumAccountsResponse=e.SelectProviderResponse=e.WatchAssetReponse=e.RequestEthereumAccountsResponse=e.SwitchEthereumChainResponse=e.AddEthereumChainResponse=e.ErrorResponse=void 0;const r=n(125);e.ErrorResponse=function(t,e,n){return{method:t,errorMessage:e,errorCode:n}},e.AddEthereumChainResponse=function(t){return{method:r.Web3Method.addEthereumChain,result:t}},e.SwitchEthereumChainResponse=function(t){return{method:r.Web3Method.switchEthereumChain,result:t}},e.RequestEthereumAccountsResponse=function(t){return{method:r.Web3Method.requestEthereumAccounts,result:t}},e.WatchAssetReponse=function(t){return{method:r.Web3Method.watchAsset,result:t}},e.SelectProviderResponse=function(t){return{method:r.Web3Method.selectProvider,result:t}},e.isRequestEthereumAccountsResponse=function(t){return t&&t.method===r.Web3Method.requestEthereumAccounts},e.SignEthereumMessageResponse=function(t){return{method:r.Web3Method.signEthereumMessage,result:t}},e.SignEthereumTransactionResponse=function(t){return{method:r.Web3Method.signEthereumTransaction,result:t}},e.SubmitEthereumTransactionResponse=function(t){return{method:r.Web3Method.submitEthereumTransaction,result:t}},e.EthereumAddressFromSignedMessageResponse=function(t){return{method:r.Web3Method.ethereumAddressFromSignedMessage,result:t}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.isWeb3ResponseMessage=e.Web3ResponseMessage=void 0;const r=n(100);e.Web3ResponseMessage=function(t){return Object.assign({type:r.RelayMessageType.WEB3_RESPONSE},t)},e.isWeb3ResponseMessage=function(t){return t&&t.type===r.RelayMessageType.WEB3_RESPONSE}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelayEventManager=void 0;const r=n(38);e.WalletSDKRelayEventManager=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const t=this._nextRequestId,e=(0,r.prepend0x)(t.toString(16));return this.callbacks.get(e)&&this.callbacks.delete(e),t}}},function(t){t.exports=JSON.parse('{"name":"@coinbase/wallet-sdk","version":"3.4.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","buffer":"^6.0.3","clsx":"^1.1.0","eth-block-tracker":"4.4.3","eth-json-rpc-filters":"4.2.2","eth-rpc-errors":"4.0.2","json-rpc-engine":"6.1.0","keccak":"^3.0.1","preact":"^10.5.9","qs":"^6.10.3","rxjs":"^6.6.3","sha.js":"^2.4.11","stream-browserify":"^3.0.0","util":"^0.12.4"},"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","@types/sha.js":"^2.4.0","@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","jest-websocket-mock":"^2.3.0","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"}}')},function(t,e,n){function r(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function i(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}n.r(e),n.d(e,"Mutex",(function(){return a})),n.d(e,"Semaphore",(function(){return o})),n.d(e,"withTimeout",(function(){return s}));var o=function(){function t(t){if(this._maxConcurrency=t,this._queue=[],t<=0)throw new Error("semaphore must be initialized to a positive value");this._value=t}return t.prototype.acquire=function(){var t=this,e=this.isLocked(),n=new Promise((function(e){return t._queue.push(e)}));return e||this._dispatch(),n},t.prototype.runExclusive=function(t){return r(this,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.acquire()];case 1:e=i.sent(),n=e[0],r=e[1],i.label=2;case 2:return i.trys.push([2,,4,5]),[4,t(n)];case 3:return[2,i.sent()];case 4:return r(),[7];case 5:return[2]}}))}))},t.prototype.isLocked=function(){return this._value<=0},t.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 t=this._currentReleaser;this._currentReleaser=void 0,t()}},t.prototype._dispatch=function(){var t=this,e=this._queue.shift();if(e){var n=!1;this._currentReleaser=function(){n||(n=!0,t._value++,t._dispatch())},e([this._value--,this._currentReleaser])}},t}(),a=function(){function t(){this._semaphore=new o(1)}return t.prototype.acquire=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this._semaphore.acquire()];case 1:return[2,t.sent()[1]]}}))}))},t.prototype.runExclusive=function(t){return this._semaphore.runExclusive((function(){return t()}))},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();function s(t,e,n){var o=this;return void 0===n&&(n=new Error("timeout")),{acquire:function(){return new Promise((function(a,s){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,s(n)}),e),[4,t.acquire()];case 1:return o=i.sent(),r?(Array.isArray(o)?o[1]:o)():a(o),[2]}}))}))}))},runExclusive:function(t){return r(this,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:e=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)?(e=n[1],[4,t(n[0])]):[3,4];case 3:return[2,r.sent()];case 4:return e=n,[4,t()];case 5:return[2,r.sent()];case 6:return[3,8];case 7:return e(),[7];case 8:return[2]}}))}))},release:function(){t.release()},isLocked:function(){return t.isLocked()}}}}]);void 0===YG&&console.error("esm-webpack-plugin: nothing exported!"),YG.CoinbaseWalletProvider;const FG=YG.CoinbaseWalletSDK;let WG=["ethereum","bsc","polygon","solana","fantom","velas"];WG.evm=["ethereum","bsc","polygon","fantom","velas"],WG.solana=["solana"];class QG{constructor({blockchain:t,from:e,to:n,value:r,api:i,method:o,params:a,instructions:s,sent:u,succeeded:c,failed:l}){this.blockchain=t,this.from=e&&e.match("0x")?Mp(e):e,this.to=n&&n.match("0x")?Mp(n):n,this.value=function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([QG,"access",t=>t.bigNumberify,"call",e=>e(r,t),"optionalAccess",t=>t.toString,"call",t=>t()]),this.api=i,this.method=o,this.params=a,this.sent=u,this.succeeded=c,this.failed=l,this.instructions=s,this._succeeded=!1,this._failed=!1}async prepare({wallet:t}){this.from=await t.account()}static bigNumberify(t,e){return"number"==typeof t?$M(t.toString(),Ch[e].currency.decimals):t&&t.toString?kd.from(t.toString()):t}getContractArguments(){let t=this.getContract().interface.fragments.find((t=>t.name==this.method));return this.params instanceof Array?this.params:this.params instanceof Object?t.inputs.map((t=>this.params[t.name])):void 0}getContract(){return new Tv(this.to,this.api)}async getData(){let t,e=this.getContractArguments();return t=e?await this.getContract().populateTransaction[this.method].apply(null,e):await this.getContract().populateTransaction[this.method].apply(null),t.data}success(){return this._succeeded?Promise.resolve(this):new Promise(((t,e)=>{let n=this.succeeded;this.succeeded=e=>{n&&n(e),t(e)}}))}failure(){return this._failed?Promise.resolve(this):new Promise(((t,e)=>{let n=this.failed;this.failed=(e,r)=>{n&&n(e,r),t(e,r)}}))}}const HG=({transaction:t,provider:e,signer:n})=>t.method?GG({transaction:t,signer:n,provider:e}):ZG({transaction:t,signer:n}),GG=({transaction:t,signer:e,provider:n})=>{let r=new Tv(t.to,t.api,n),i=t.getContractArguments({contract:r}),o=r.connect(e)[t.method];return i?o(...i,{value:QG.bigNumberify(t.value,t.blockchain)}):o({value:QG.bigNumberify(t.value,t.blockchain)})},ZG=({transaction:t,signer:e})=>e.sendTransaction({to:t.to,value:QG.bigNumberify(t.value,t.blockchain)});function VG(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}class qG{static __initStatic(){this.info={name:"Wallet (Ethereum)",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0NDYuNCAzNzYuOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDQ2LjQgMzc2Ljg7IiB4bWw6c3BhY2U9InByZXNl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wvc3ZnPgo=",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>VG([window,"optionalAccess",t=>t.ethereum])&&1!=Object.keys(window.ethereum).filter((t=>t.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/))).length&&!VG([window,"optionalAccess",t=>t.coin98])&&!(VG([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isTrust])||VG([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isTrustWallet]))&&!VG([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isDeficonnectProvider])&&!VG([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isHyperPay])&&!VG([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isPhantom])&&!(VG([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isCoinbaseWallet])||VG([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isWalletLink]))}constructor(){this.name=this.constructor.info.name,this.logo=this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.sendTransaction=t=>(async({transaction:t,wallet:e})=>{if(t=new QG(t),0==await e.connectedTo(t.blockchain)&&await e.switchTo(t.blockchain),0==await e.connectedTo(t.blockchain))throw{code:"WRONG_NETWORK"};await t.prepare({wallet:e});let n=await RG({blockchain:t.blockchain,method:"transactionCount",address:t.from});t.nonce=n;let r=new qM(e.getProvider(),"any"),i=r.getSigner(0);return await HG({transaction:t,provider:r,signer:i}).then((e=>{if(!e)throw"Submitting transaction failed!";t.id=e.hash,t.nonce=e.nonce||n,t.url=Ch.findByName(t.blockchain).explorerUrlFor({transaction:t}),t.sent&&t.sent(t),e.wait(1).then((()=>{t._succeeded=!0,t.succeeded&&t.succeeded(t)})).catch((e=>{e&&e.code&&"TRANSACTION_REPLACED"==e.code?(e.replacement&&e.replacement.hash&&(t.id=e.replacement.hash,t.url=Ch.findByName(t.blockchain).explorerUrlFor({transaction:t})),e.replacement&&e.replacement.hash&&e.receipt&&1==e.receipt.status?(t._succeeded=!0,t.succeeded&&t.succeeded(t)):e.replacement&&e.replacement.hash&&e.receipt&&0==e.receipt.status&&(t._failed=!0,t.failed&&t.failed(t,e))):(t._failed=!0,t.failed&&t.failed(t,e))}))})),t})({wallet:this,transaction:t})}getProvider(){return window.ethereum}async account(){if(!this.getProvider())return;return(await this.getProvider().request({method:"eth_accounts"})).map((t=>Mp(t)))[0]}async connect(){if(!this.getProvider())return;return(await this.getProvider().request({method:"eth_requestAccounts"})).map((t=>Mp(t)))[0]}on(t,e){let n;if("account"===t)n=t=>e(Mp(t[0])),this.getProvider().on("accountsChanged",n);return n}off(t,e){if("account"===t)this.getProvider().removeListener("accountsChanged",e);return e}async connectedTo(t){const e=Ch.findById(await this.getProvider().request({method:"eth_chainId"}));return t?t===e.name:e.name}addNetwork(t){return new Promise(((e,n)=>{const r=Ch.findByName(t);this.getProvider().request({method:"wallet_addEthereumChain",params:[{chainId:r.id,chainName:r.fullName,nativeCurrency:{name:r.currency.name,symbol:r.currency.symbol,decimals:r.currency.decimals},rpcUrls:[r.rpc],blockExplorerUrls:[r.explorer],iconUrls:[r.logo]}]}).then(e).catch(n)}))}switchTo(t){return new Promise(((e,n)=>{const r=Ch.findByName(t);this.getProvider().request({method:"wallet_switchEthereumChain",params:[{chainId:r.id}]}).then(e).catch((r=>{4902===r.code?this.addNetwork(t).then((()=>this.switchTo(t).then(e))).catch(n):n(r)}))}))}transactionCount({blockchain:t,address:e}){return RG({blockchain:t,method:"transactionCount",address:e})}async sign(t){await this.account();let e=new qM(this.getProvider(),"any").getSigner(0);return await e.signMessage(t)}}qG.__initStatic(),qG.__initStatic2();class JG extends qG{static __initStatic(){this.info={name:"Binance Wallet",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMC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ZjBiOTBiIi8+PC9zdmc+",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.BinanceChain])&&!window.coin98}getProvider(){return window.BinanceChain}}JG.__initStatic(),JG.__initStatic2();class KG extends qG{static __initStatic(){this.info={name:"Brave",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNTYgMzAxIiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNTYgMzAxIiB4bWw6c3BhY2U9InByZXNlcnZlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgoKCTxwYXRoIGZpbGw9IiNGMTVBMjIiIGQ9Im0yMzYgMTA1LjQtNy44LTIxLjIgNS40LTEyLjJjMC43LTEuNiAwLjMtMy40LTAuOC00LjZsLTE0LjgtMTQuOWMtNi41LTYuNS0xNi4xLTguOC0yNC44LTUuN2wtNC4xIDEuNC0yMi42LTI0LjUtMzguMi0wLjNoLTAuM2wtMzguNSAwLjMtMjIuNiAyNC43LTQtMS40Yy04LjgtMy4xLTE4LjUtMC44LTI1IDUuOGwtMTUgMTUuMmMtMSAxLTEuMyAyLjQtMC44IDMuN2w1LjcgMTIuNy03LjggMjEuMiA1LjEgMTkuMiAyMyA4Ny4yYzIuNiAxMCA4LjcgMTguOCAxNy4yIDI0LjkgMCAwIDI3LjggMTkuNyA1NS4zIDM3LjUgMi40IDEuNiA1IDIuNyA3LjcgMi43czUuMi0xLjEgNy43LTIuN2MzMC45LTIwLjIgNTUuMy0zNy41IDU1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bC02LjgtMzcuOWMtMC4yLTEuMSAwLjUtMi4zIDEuNi0yLjVsMTkuOS01LjZjMS4xLTAuMyAyLjktMC40IDQtMC4zbDIyLjQgMi4xYzEuMSAwLjEgMS4yIDAuNSAwLjEgMC45bC0zNC43IDEzLjJjLTEgMC40LTIuMyAxLjUtMi43IDIuNmwtMS40IDMuM2MtMC40IDEtMC40IDIuNyAwLjIgMy42bDExLjkgMjIuM2MwLjUgMSAwLjIgMi4zLTAuOCAzbC0yNi45IDE4LjJjLTEuOCAxLjgtMS42IDQuNyAwLjMgNi40bDEyLjggMTEuNmMwLjggMC44IDIuNCAxLjggMy40IDIuMmwxOCA4LjVjMSAwLjUgMi41IDAuMyAzLjQtMC40bDUuNy00LjZjMy0yLjQgNS4zLTUuNyA2LjYtOS4zbDEuNi00LjNjMC40LTEgMC4zLTIuOC0wLjEtMy44bC01LjgtMTMuOGMtMC40LTEtMC4yLTIuNSAwLjYtMy40bDI3LjktMjkuN2MwLjgtMC44IDEuOS0yLjIgMi43LTMtMC40LTAuMyAxLjEtMi4xIDEuNi00LjF6Ii8+Cgo8L3N2Zz4K",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isBraveWallet])}}KG.__initStatic(),KG.__initStatic2();class XG extends qG{static __initStatic(){this.info={name:"Coin98",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA0MC43IDQwIiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA0MC43IDQw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MyAzLjUgMCA2LjMgMi44IDYuMyA2LjMgMC4xIDMuNC0yLjggNi4yLTYuMyA2LjJ6bTMuOC02LjNjMCAyLjEtMS43IDMuNy0zLjggMy43cy0zLjgtMS43LTMuOC0zLjdjMC0yLjEgMS43LTMuNyAzLjgtMy43IDIuMSAwLjEgMy44IDEuNyAzLjggMy43em0tMTMuNC03LjRjMCAyLjEtMS43IDMuNy0zLjggMy43cy0zLjgtMS43LTMuOC0zLjdjMC0yLjEgMS43LTMuNyAzLjgtMy43IDIuMiAwIDMuOCAxLjYgMy44IDMuN3oiLz4KPC9zdmc+Cg==",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.coin98])}}function $G(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}XG.__initStatic(),XG.__initStatic2();class tZ extends qG{static __initStatic(){this.info={name:"Coinbase",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0nTGF5ZXJfMScgZGF0YS1uYW1lPSdMYXllciAxJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHhtbG5zOnhsaW5rPSdodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rJyB2aWV3Qm94PScwIDAgNDg4Ljk2IDQ4OC45Nic+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50KTt9LmNscy0ye2ZpbGw6IzQzNjFhZDt9PC9zdHlsZT48bGluZWFyR3JhZGllbnQgaWQ9J2xpbmVhci1ncmFkaWVudCcgeDE9JzI1MCcgeTE9JzcuMzUnIHgyPScyNTAnIHkyPSc0OTYuMzInIGdyYWRpZW50VHJhbnNmb3JtPSdtYXRyaXgoMSwgMCwgMCwgLTEsIDAsIDUwMiknIGdyYWRpZW50VW5pdHM9J3VzZXJTcGFjZU9uVXNlJz48c3RvcCBvZmZzZXQ9JzAnIHN0b3AtY29sb3I9JyMzZDViYTknLz48c3RvcCBvZmZzZXQ9JzEnIHN0b3AtY29sb3I9JyM0ODY4YjEnLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cGF0aCBjbGFzcz0nY2xzLTEnIGQ9J00yNTAsNS42OEMxMTQuODcsNS42OCw1LjUyLDExNSw1LjUyLDI1MC4xN1MxMTQuODcsNDk0LjY1LDI1MCw0OTQuNjUsNDk0LjQ4LDM4NS4yOSw0OTQuNDgsMjUwLjE3LDM4NS4xMyw1LjY4LDI1MCw1LjY4Wm0wLDM4Ny41NEExNDMuMDYsMTQzLjA2LDAsMSwxLDM5My4wNSwyNTAuMTcsMTQzLjExLDE0My4xMSwwLDAsMSwyNTAsMzkzLjIyWicgdHJhbnNmb3JtPSd0cmFuc2xhdGUoLTUuNTIgLTUuNjgpJy8+PHBhdGggY2xhc3M9J2Nscy0yJyBkPSdNMjg0LjY5LDI5Ni4wOUgyMTUuMzFhMTEsMTEsMCwwLDEtMTAuOS0xMC45VjIxNS40OGExMSwxMSwwLDAsMSwxMC45LTEwLjkxSDI4NWExMSwxMSwwLDAsMSwxMC45LDEwLjkxdjY5LjcxQTExLjA3LDExLjA3LDAsMCwxLDI4NC42OSwyOTYuMDlaJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgtNS41MiAtNS42OCknLz48L3N2Zz4=",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>$G([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isCoinbaseWallet])||$G([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isWalletLink])}}tZ.__initStatic(),tZ.__initStatic2();class eZ extends qG{static __initStatic(){this.info={name:"Crypto.com | DeFi Wallet",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA4OS45IDEwMi44IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA4OS45IDEwMi44IiB4bWw6c3BhY2U9InByZXNlcnZlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiNGRkZGRkY7fQoJLnN0MXtmaWxsOiMwMzMxNkM7fQo8L3N0eWxlPgoKPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTUuMzc1MSAtMTEzLjYxKSI+Cgk8ZyB0cmFuc2Zvcm09Im1hdHJpeCguMzE3OTQgMCAwIC4zMTQ2NSAtMS4wNDczIDMwLjQ0NykiPgoJCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Im0xNjEuNiAyNjQuMy0xNDEuNCA4MS42djE2My4zbDE0MS40IDgxLjYgMTQxLjQtODEuNnYtMTYzLjNsLTE0MS40LTgxLjZ6bTAgMC0xNDEuNCA4MS42djE2My4zbDE0MS40IDgxLjYgMTQxLjQtODEuNnYtMTYzLjNsLTE0MS40LTgxLjZ6Ii8+CgkJPHBhdGggY2xhc3M9InN0MSIgZD0ibTIxNy41IDUyNy4xaC0yMC4xbC0yNC4xLTIyLjF2LTExLjNsMjQuOS0yMy44di0zNy43bDMyLjYtMjEuMyAzNy4xIDI4LjEtNTAuNCA4OC4xem0tODMuMy01OS42IDMuNy0zNS40LTEyLjItMzEuN2g3MmwtMTEuOSAzMS43IDMuNCAzNS40aC01NXptMTYuNCAzNy41LTI0LjEgMjIuNGgtMjAuNGwtNTAuNy04OC40IDM3LjQtMjcuOCAzMi45IDIxdjM3LjdsMjQuOSAyMy44djExLjN6bS00NC44LTE3MC4xaDExMS40bDEzLjMgNTYuN2gtMTM3LjdsMTMtNTYuN3ptNTUuOC03MC42LTE0MS40IDgxLjZ2MTYzLjNsMTQxLjQgODEuNiAxNDEuNC04MS42di0xNjMuM2wtMTQxLjQtODEuNnoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isDeficonnectProvider])}}eZ.__initStatic(),eZ.__initStatic2();class nZ extends qG{static __initStatic(){this.info={name:"HyperPay",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjA0LjcgMjAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyMDQuNyAyMDA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggZmlsbD0iIzFBNzJGRSIgZD0iTTEwMi41LDUuMkM1MC44LDUuMiw4LjgsNDcuMiw4LjgsOTlzNDIsOTMuNSw5My44LDkzLjVzOTMuOC00Miw5My44LTkzLjhTMTU0LjIsNS4yLDEwMi41LDUuMnogTTEyNy4yLDExOS4yCgljLTYuMiwwLTIxLjcsMC4zLTIxLjcsMC4zbC03LDI3aC0yOWw2LjgtMjYuNUgzMWw3LjItMjEuOGMwLDAsNzguOCwwLjIsODUuMiwwYzYuNS0wLjIsMTYuNS0xLjgsMTYuOC0xNC44YzAuMy0xNy44LTI3LTE2LjgtMjkuMi0xCgljLTEuNSwxMC0xLjUsMTIuNS0xLjUsMTIuNUg4My44bDUtMjMuNUg0N2w2LjMtMjJjMCwwLDYxLjIsMC4yLDcyLjgsMC4yczQyLjIsMyw0Mi4yLDMxLjJDMTY4LjIsMTEyLDEzOC41LDExOS4zLDEyNy4yLDExOS4yCglMMTI3LjIsMTE5LjJ6Ii8+Cjwvc3ZnPgo=",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isHyperPay])}}nZ.__initStatic(),nZ.__initStatic2();class rZ extends qG{static __initStatic(){this.info={name:"MetaMask",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0nTGF5ZXJfMScgZGF0YS1uYW1lPSdMYXllciAxJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA0ODUuOTMgNDUwLjU2Jz48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6IzgyODQ4Nzt9LmNscy0ye2ZpbGw6I2UyNzcyNjtzdHJva2U6I2UyNzcyNjt9LmNscy0xMCwuY2xzLTExLC5jbHMtMiwuY2xzLTMsLmNscy00LC5jbHMtNSwuY2xzLTYsLmNscy03LC5jbHMtOCwuY2xzLTl7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2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jAxJy8+PC9zdmc+",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isMetaMask])&&1==Object.keys(window.ethereum).filter((t=>t.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/))).length}}rZ.__initStatic(),rZ.__initStatic2();class iZ extends qG{static __initStatic(){this.info={name:"Opera",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA3NS42IDc1LjYiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIHRyYW5zZm9ybT0ibWF0cml4KDEuMzMzMyAwIDAgLTEuMzMzMyAwIDEwNy4yKSI+CiAgCiAgPGxpbmVhckdyYWRpZW50IGlkPSJvcGVyYUxvZ28wMDAwMDAxMjM1MTEiIHgxPSItMTA3LjM0IiB4Mj0iLTEwNi4zNCIgeTE9Ii0xMzcuODUiIHkyPSItMTM3Ljg1IiBncmFkaWVudFRyYW5zZm9ybT0ibWF0cml4KDAgLTczLjI1NyAtNzMuMjU3IDAgLTEwMDc1IC03Nzg0LjEpIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRkYxQjJEIiBvZmZzZXQ9IjAiLz4KICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGRjFCMkQiIG9mZnNldD0iLjMiLz4KICAgIDxzdG9wIHN0b3AtY29sb3I9IiNG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MCAxNC45LTkuNCAxNC45LTIwLjlzLTYuNy0yMC45LTE0LjktMjAuOWMtMy43IDAtNyAxLjktOS42IDQuOSA0LjEtNS4zIDEwLjEtOC42IDE2LjktOC42IDQuMiAwIDggMS4zIDExLjQgMy41IDUuOCA1LjIgOS41IDEyLjcgOS41IDIxLjFzLTMuNyAxNS45LTkuNSAyMS4xYy0zLjMgMi4yLTcuMiAzLjUtMTEuNCAzLjUtNi44IDAuMS0xMi44LTMuMy0xNi45LTguNiIgZmlsbD0idXJsKCNiKSIvPgo8L2c+Cjwvc3ZnPgo=",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isOpera])}}function oZ(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}iZ.__initStatic(),iZ.__initStatic2();const aZ=({transaction:t,wallet:e})=>t.instructions?uZ({transaction:t,wallet:e}):sZ({transaction:t,wallet:e}),sZ=async({transaction:t,wallet:e})=>{let n=new lF(await e.account()),r=new lF(t.to);const i=await CG(t.blockchain);let o=(await i.getLatestBlockhash()).blockhash,a=new xF({recentBlockhash:o,feePayer:n});return a.add(VF.transfer({fromPubkey:n,toPubkey:r,lamports:parseInt(QG.bigNumberify(t.value,t.blockchain),10)})),window.solana.signAndSendTransaction(a)},uZ=async({transaction:t,wallet:e})=>{let n=new lF(await e.account());const r=await CG(t.blockchain);let i=(await r.getLatestBlockhash()).blockhash,o=new xF({recentBlockhash:i,feePayer:n});return t.instructions.forEach((t=>{o.add(t)})),window.solana.signAndSendTransaction(o)};function cZ(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}class lZ{static __initStatic(){this.info={name:"Wallet (Solana)",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0NDYuNCAzNzYuOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDQ2LjQgMzc2Ljg7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojODI4NDg3O30KCS5zdDF7ZmlsbDp1cmwoI1NWR0lEXzFfKTt9Cgkuc3Qye2ZpbGw6dXJsKCNTVkdJRF8wMDAwMDE2NTIzNDE5NTQ5NTc2MDU4MDgwMDAwMDAwNjMwMzAwNDA2OTM1MjExODk1MV8pO30KCS5zdDN7ZmlsbDp1cmwoI1NWR0lEXzAwMDAwMDkyNDIyMzgxNjc5OTg1OTI5MTcwMDAwMDA2ODU0NzIyMTYxOTE4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MywwLjMsMC43LDAuNSwxLjEsMC41aDM4LjhjMC43LDAsMS4xLTAuOSwwLjYtMS40TDE0NS42LDE4OS4xeiIvPgo8L3N2Zz4K",blockchains:WG.solana}}static __initStatic2(){this.isAvailable=async()=>cZ([window,"optionalAccess",t=>t.solana])&&!cZ([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.isPhantom])&&!window.coin98}constructor(){this.name=this.constructor.info.name,this.logo=this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.sendTransaction=t=>(async({transaction:t,wallet:e})=>(t=new QG(t),await t.prepare({wallet:e}),await aZ({transaction:t,wallet:e}).then((({signature:e})=>{if(!e)throw"Submitting transaction failed!";{t.id=e,t.url=Ch.findByName(t.blockchain).explorerUrlFor({transaction:t}),t.sent&&t.sent(t);let n=0;const r=setInterval((async()=>{if(n++,n>=240)return clearInterval(r);const i=await CG(t.blockchain),{value:o}=await i.getSignatureStatus(e),a=oZ([o,"optionalAccess",t=>t.confirmationStatus]);if(a&&("confirmed"===a||"finalized"===a)){if(o.err){t._failed=!0;const n=await i.getConfirmedTransaction(e),r=oZ([n,"optionalAccess",t=>t.meta,"optionalAccess",t=>t.logMessages])?n.meta.logMessages[n.meta.logMessages.length-1]:null;t.failed&&t.failed(t,r)}else t._succeeded=!0,t.succeeded&&t.succeeded(t);return clearInterval(r)}}),500)}})),t))({wallet:this,transaction:t})}async account(){if(null!=cZ([window,"optionalAccess",t=>t.solana])){if(cZ([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.publicKey]))return window.solana.publicKey.toString();if(1!=cZ([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.isBraveWallet])){let t;try{({publicKey:t}=await window.solana.connect({onlyIfTrusted:!0}))}catch(t){}if(t)return t.toString()}}}async connect(){if(!cZ([window,"optionalAccess",t=>t.solana]))return;let{publicKey:t}=await window.solana.connect();return t.toString()}on(t,e){let n;if("account"===t)n=t=>e(cZ([t,"optionalAccess",t=>t.toString,"call",t=>t()])),window.solana.on("accountChanged",n);return n}off(t,e){if("account"===t)console.log("removeListener"),window.solana.removeListener("accountChanged",e);return e}async connectedTo(t){return"solana"==t}switchTo(t){return new Promise(((t,e)=>{e({code:"NOT_SUPPORTED"})}))}addNetwork(t){return new Promise(((t,e)=>{e({code:"NOT_SUPPORTED"})}))}async sign(t){const e=(new TextEncoder).encode(t),n=await window.solana.signMessage(e,"utf8");return JSON.stringify(n.signature)}}lZ.__initStatic(),lZ.__initStatic2();class hZ extends lZ{static __initStatic(){this.info={name:"Phantom",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iNjQiIGN5PSI2NCIgcj0iNjQiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcikiLz48cGF0aCBkPSJNMTEwLjU4NCA2NC45MTQySDk5LjE0MkM5OS4xNDIgNDEuNzY1MSA4MC4xNzMgMjMgNTYuNzcyNCAyM0MzMy42NjEyIDIzIDE0Ljg3MTYgNDEuMzA1NyAxNC40MTE4IDY0LjA1ODNDMTMuOTM2IDg3LjU3NyAzNi4yNDEgMTA4IDYwLjAxODYgMTA4SDYzLjAwOTRDODMuOTcyMyAxMDggMTEyLjA2OSA5MS43NjY3IDExNi40NTkgNzEuOTg3NEMxMTcuMjcgNjguMzQxMyAxMTQuMzU4IDY0LjkxNDIgMTEwLjU4NCA2NC45MTQyWk0zOS43Njg5IDY1Ljk0NTRDMzkuNzY4OSA2OS4wNDExIDM3LjIwOTUgNzEuNTcyOSAzNC4wODAyIDcxLjU3MjlDMzAuOTUwOSA3MS41NzI5IDI4LjM5MTYgNjkuMDM5OSAyOC4zOTE2IDY1Ljk0NTRWNTYuODQxNEMyOC4zOTE2IDUzLjc0NTcgMzAuOTUwOSA1MS4yMTM5IDM0LjA4MDIgNTEuMjEzOUMzNy4yMDk1IDUxLjIxMzkgMzkuNzY4OSA1My43NDU3IDM5Ljc2ODkgNTYuODQxNFY2NS45NDU0Wk01OS41MjI0IDY1Ljk0NTRDNTkuNTIyNCA2OS4wNDExIDU2Ljk2MzEgNzEuNTcyOSA1My44MzM4IDcxLjU3MjlDNTAuNzA0NSA3MS41NzI5IDQ4LjE0NTEgNjkuMDM5OSA0OC4xNDUxIDY1Ljk0NTRWNTYuODQxNEM0OC4xNDUxIDUzLjc0NTcgNTAuNzA1NiA1MS4yMTM5IDUzLjgzMzggNTEuMjEzOUM1Ni45NjMxIDUxLjIxMzkgNTkuNTIyNCA1My43NDU3IDU5LjUyMjQgNTYuODQxNFY2NS45NDU0WiIgZmlsbD0idXJsKCNwYWludDFfbGluZWFyKSIvPjxkZWZzPjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhciIgeDE9IjY0IiB5MT0iMCIgeDI9IjY0IiB5Mj0iMTI4IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agc3RvcC1jb2xvcj0iIzUzNEJCMSIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzU1MUJGOSIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJwYWludDFfbGluZWFyIiB4MT0iNjUuNDk5OCIgeTE9IjIzIiB4Mj0iNjUuNDk5OCIgeTI9IjEwOCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IndoaXRlIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSJ3aGl0ZSIgc3RvcC1vcGFjaXR5PSIwLjgyIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PC9zdmc+Cg=",blockchains:["solana","ethereum","polygon"]}}static __initStatic2(){this.isAvailable=async()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.isPhantom])}}function dZ(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}hZ.__initStatic(),hZ.__initStatic2();class fZ extends qG{static __initStatic(){this.info={name:"Trust Wallet",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA5Ni41IDk2LjUiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDk2LjUgOTYuNSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgZmlsbD0iI0ZGRkZGRiIgd2lkdGg9Ijk2LjUiIGhlaWdodD0iOTYuNSIvPgo8cGF0aCBzdHJva2U9IiMzMzc1QkIiIHN0cm9rZS13aWR0aD0iNi4wNjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQgPSIxMCIgZmlsbD0ibm9uZSIgZD0ibTQ4LjUgMjAuMWM5LjYgOCAyMC42IDcuNSAyMy43IDcuNS0wLjcgNDUuNS01LjkgMzYuNS0yMy43IDQ5LjMtMTcuOC0xMi44LTIzLTMuNy0yMy43LTQ5LjMgMy4yIDAgMTQuMSAwLjUgMjMuNy03LjV6Ii8+Cjwvc3ZnPgo=",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>dZ([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isTrust])||dZ([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isTrustWallet])}}fZ.__initStatic(),fZ.__initStatic2();const pZ={ethereum:"mainnet",bsc:"bsc",polygon:"polygon"},mZ={ethereum:"eth",bsc:"bnb",polygon:"matic"};class gZ{constructor({address:t,blockchain:e}){this.address=t,this.blockchain=e}async transactionCount(){let t,e=await fetch(`https://safe-transaction-${pZ[this.blockchain]}.safe.global/api/v1/safes/${this.address}/all-transactions/`).then((t=>t.json())).catch((t=>{console.error("Error:",t)}));return t=e&&e.results&&e.results.length?e.results[0].nonce+1:parseInt((await RG({blockchain:this.blockchain,address:this.address,api:[{inputs:[],name:"nonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],method:"nonce"})).toString(),10),t}async retrieveTransaction({blockchain:t,tx:e}){const n=await CG(t);let r=await fetch(`https://safe-transaction-${pZ[t]}.safe.global/api/v1/multisig-transactions/${e}/`).then((t=>t.json())).catch((t=>{console.error("Error:",t)}));return r&&r.isExecuted&&r.transactionHash?await n.getTransaction(r.transactionHash):void 0}explorerUrlFor({transaction:t}){if(t)return`https://app.safe.global/${mZ[t.blockchain]}:${t.from}/transactions/tx?id=multisig_${t.from}_${t.id}`}}const yZ=async(t,e)=>{if(!await(async(t,e)=>{const n=await CG(t);return"0x"!=await n.getCode(e)})(t,e))return;const n=await(async(t,e)=>{let n;try{n=await RG({blockchain:t,address:e,api:[{constant:!0,inputs:[],name:"NAME",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"}],method:"NAME"})}catch(t){}if("Default Callback Handler"==n)return"Safe"})(t,e);if("Safe"==n)return new gZ({blockchain:t,address:e});if("Argent"==n)return new Argent({blockchain:t,address:e});if(smartContractWallet)throw{message:"Unrecognized smart contract wallet not supported!",code:"SMART_CONTRACT_WALLET_NOT_SUPPORTED"}},bZ=async({blockchain:t,tx:e,smartContractWallet:n})=>{const r=await CG(t);let i,o=async()=>{try{return n&&n.retrieveTransaction?await n.retrieveTransaction({blockchain:t,tx:e}):await r.getTransaction(e)}catch(t){}};for(i=await o();!i;)await new Promise((t=>setTimeout(t,3e3))),i=await o();return i},wZ=({transaction:t,wallet:e})=>t.method?vZ({transaction:t,wallet:e}):MZ({transaction:t,wallet:e}),vZ=async({transaction:t,wallet:e})=>{const n=await CG(t.blockchain),r=await n.getGasPrice(),i=await OG(t),o=await t.getData(),a=t.value?yd(kd.from(t.value)):void 0,s=yd(t.nonce);return e.connector.sendTransaction({from:t.from,to:t.to,value:a,data:o,gas:i.toHexString(),gasPrice:r.toHexString(),nonce:s})},MZ=async({transaction:t,wallet:e})=>{const n=await CG(t.blockchain),r=await n.getGasPrice(),i=await OG(t),o=yd(kd.from(t.value)),a=yd(t.nonce);return e.connector.sendTransaction({from:t.from,to:t.to,value:o,data:"0x",gas:i.toHexString(),gasPrice:r.toHexString(),nonce:a})};function LZ(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}const _Z="_DePayWeb3WalletsConnectedWalletConnectV1Instance";let NZ;const EZ=()=>NZ||(NZ=IZ((()=>{})),NZ),SZ=()=>new Promise((async(t,e)=>{if(setTimeout((()=>{t(!1)}),800),!localStorage.walletconnect||0==JSON.parse(localStorage.walletconnect).handshakeTopic.length)return delete localStorage.walletconnect,t(!1);let n,r=EZ();try{await r.sendCustomRequest({method:"eth_blockNumber"})?n=await r.sendCustomRequest({method:"eth_accounts"}):delete localStorage.walletconnect}catch(e){delete localStorage.walletconnect,t(!1)}return t(n&&n.length)})),xZ=async()=>window[_Z]?window[_Z]:await SZ()?new kZ:void 0,AZ=t=>{window[_Z]=t},IZ=t=>new UG({bridge:"https://walletconnect.depay.com",qrcodeModal:{open:async e=>t({uri:e}),close:()=>{}}});class kZ{static __initStatic(){this.info={name:"WalletConnect",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0ndXRmLTgnPz48IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMjUuNC4xLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAtLT48c3ZnIHZlcnNpb249JzEuMScgaWQ9J0xheWVyXzEnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZycgeG1sbnM6eGxpbms9J2h0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsnIHg9JzBweCcgeT0nMHB4JyB2aWV3Qm94PScwIDAgNTAwIDUwMCcgc3R5bGU9J2VuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTAwIDUwMDsnIHhtbDpzcGFjZT0ncHJlc2VydmUnPjxzdHlsZSB0eXBlPSd0ZXh0L2Nzcyc+IC5zdDB7ZmlsbDojNTk5MUNEO30KPC9zdHlsZT48ZyBpZD0nUGFnZS0xJz48ZyBpZD0nd2FsbGV0Y29ubmVjdC1sb2dvLWFsdCc+PHBhdGggaWQ9J1dhbGxldENvbm5lY3QnIGNsYXNzPSdzdDAnIGQ9J00xMDIuNywxNjJjODEuNS03OS44LDIxMy42LTc5LjgsMjk1LjEsMGw5LjgsOS42YzQuMSw0LDQuMSwxMC41LDAsMTQuNEwzNzQsMjE4LjkgYy0yLDItNS4zLDItNy40LDBsLTEzLjUtMTMuMmMtNTYuOC01NS43LTE0OS01NS43LTIwNS44LDBsLTE0LjUsMTQuMWMtMiwyLTUuMywyLTcuNCwwTDkxLjksMTg3Yy00LjEtNC00LjEtMTAuNSwwLTE0LjQgTDEwMi43LDE2MnogTTQ2Ny4xLDIyOS45bDI5LjksMjkuMmM0LjEsNCw0LjEsMTAuNSwwLDE0LjRMMzYyLjMsNDA1LjRjLTQuMSw0LTEwLjcsNC0xNC44LDBjMCwwLDAsMCwwLDBMMjUyLDMxMS45IGMtMS0xLTIuNy0xLTMuNywwaDBsLTk1LjUsOTMuNWMtNC4xLDQtMTAuNyw0LTE0LjgsMGMwLDAsMCwwLDAsMEwzLjQsMjczLjZjLTQuMS00LTQuMS0xMC41LDAtMTQuNGwyOS45LTI5LjIgYzQuMS00LDEwLjctNCwxNC44LDBsOTUuNSw5My41YzEsMSwyLjcsMSwzLjcsMGMwLDAsMCwwLDAsMGw5NS41LTkzLjVjNC4xLTQsMTAuNy00LDE0LjgsMGMwLDAsMCwwLDAsMGw5NS41LDkzLjUgYzEsMSwyLjcsMSwzLjcsMGw5NS41LTkzLjVDNDU2LjQsMjI1LjksNDYzLDIyNS45LDQ2Ny4xLDIyOS45eicvPjwvZz48L2c+PC9zdmc+Cg==",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>null!=await xZ()}constructor(){this.name=localStorage[_Z+"_name"]&&"undefined"!=localStorage[_Z+"_name"]?localStorage[_Z+"_name"]:this.constructor.info.name,this.logo=localStorage[_Z+"_logo"]&&"undefined"!=localStorage[_Z+"_logo"]?localStorage[_Z+"_logo"]:this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.sendTransaction=t=>(async({transaction:t,wallet:e})=>{if(t=new QG(t),0==await e.connectedTo(t.blockchain))throw{code:"WRONG_NETWORK"};await t.prepare({wallet:e});const n=await yZ(t.blockchain,t.from);let r=await e.transactionCount({blockchain:t.blockchain,address:t.from});return t.nonce=r,await wZ({transaction:t,wallet:e}).then((e=>{if(!e)throw"Submitting transaction failed!";{let i=Ch.findByName(t.blockchain);t.id=e,t.url=n&&n.explorerUrlFor?n.explorerUrlFor({transaction:t}):i.explorerUrlFor({transaction:t}),t.sent&&t.sent(t),bZ({blockchain:t.blockchain,tx:e,smartContractWallet:n}).then((e=>{t.id=e.hash||t.id,t.url=i.explorerUrlFor({transaction:t}),t.nonce=e.nonce||r,e.wait(1).then((()=>{t._succeeded=!0,t.succeeded&&t.succeeded(t)})).catch((e=>{e&&e.code&&"TRANSACTION_REPLACED"==e.code?e.replacement&&e.replacement.hash&&e.receipt&&1==e.receipt.status?(t.id=e.replacement.hash,t._succeeded=!0,t.succeeded&&t.succeeded(t)):e.replacement&&e.replacement.hash&&e.receipt&&0==e.receipt.status&&(t.id=e.replacement.hash,t._failed=!0,t.failed&&t.failed(t,e)):(t._failed=!0,t.failed&&t.failed(t,e))}))}))}})),t})({wallet:this,transaction:t})}disconnect(){AZ(void 0),localStorage[_Z+"_name"]=void 0,localStorage[_Z+"_logo"]=void 0,NZ=void 0}newWalletConnectInstance(t){let e=IZ(t);return e.on("disconnect",((t,e)=>{if(this.disconnect(),t)throw t})),e.on("modal_closed",(()=>{AZ(void 0),this.connector=void 0})),e}async account(){let t;this.connector||(this.connector=EZ());try{t=await this.connector.sendCustomRequest({method:"eth_accounts"})}catch(t){}if(t&&t.length)return Mp(t[0])}async connect(t){let e=t&&t.connect?t.connect:({uri:t})=>{};try{if(this.connector=kZ.instance,null==this.connector&&(this.connector=this.newWalletConnectInstance(e)),t&&t.reconnect&&this.connector){try{await this.connector.killSession()}catch(t){}this.disconnect()}if(await SZ())return await this.account();{let{accounts:e,chainId:n}=await this.connector.connect();return LZ([t,"optionalAccess",t=>t.name])&&(localStorage[_Z+"_name"]=this.name=t.name),LZ([t,"optionalAccess",t=>t.logo])&&(localStorage[_Z+"_logo"]=this.logo=t.logo),e instanceof Array&&e.length?(AZ(this),e=e.map((t=>Mp(t))),e[0]):void 0}}catch(t){return void console.log("WALLETCONNECT ERROR",t)}}async connectedTo(t){let e=await this.connector.sendCustomRequest({method:"eth_chainId"});const n=Ch.findById(e);return t?t===n.name:n.name}switchTo(t){return new Promise(((e,n)=>{let r,i;const o=Ch.findByName(t);setTimeout((async()=>{await this.connectedTo(t)||r||i?e():n({code:"NOT_SUPPORTED"})}),3e3),this.connector.sendCustomRequest({method:"wallet_switchEthereumChain",params:[{chainId:o.id}]}).then((()=>{r=!0,e()})).catch((o=>{o&&"string"==typeof o.message&&o.message.match("addEthereumChain")?this.addNetwork(t).then((()=>this.switchTo(t).then((()=>{r=!0,e()})))).catch((()=>{i=!0,n({code:"NOT_SUPPORTED"})})):(i=!0,n({code:"NOT_SUPPORTED"}))}))}))}addNetwork(t){return new Promise(((e,n)=>{const r=Ch.findByName(t);this.connector.sendCustomRequest({method:"wallet_addEthereumChain",params:[{chainId:r.id,chainName:r.fullName,nativeCurrency:{name:r.currency.name,symbol:r.currency.symbol,decimals:r.currency.decimals},rpcUrls:[r.rpc],blockExplorerUrls:[r.explorer],iconUrls:[r.logo]}]}).then(e).catch(n)}))}on(t,e){let n;if("account"===t)n=(t,n)=>{if(n&&n.params&&n.params[0].accounts&&n.params[0].accounts instanceof Array){const t=n.params[0].accounts.map((t=>Mp(t)));e(t[0])}},this.connector.on("session_update",n);return n}off(t,e){if("account"===t)this.connector.off("session_update")}async transactionCount({blockchain:t,address:e}){const n=await yZ(t,e);return n?await n.transactionCount():await RG({blockchain:t,method:"transactionCount",address:e})}async sign(t){let e=await this.connectedTo(),n=await this.account();if(await yZ(e,n))throw{message:"Smart contract wallets are not supported for signing!",code:"SMART_CONTRACT_WALLET_NOT_SUPPORTED"};var r=[Hp(t),n];return await this.connector.signPersonalMessage(r)}}kZ.__initStatic(),kZ.__initStatic2(),kZ.getConnectedInstance=xZ,kZ.setConnectedInstance=AZ;const jZ=({transaction:t,provider:e,signer:n})=>t.method?TZ({transaction:t,signer:n,provider:e}):CZ({transaction:t,signer:n}),TZ=({transaction:t,signer:e,provider:n})=>{let r=new Tv(t.to,t.api,n),i=t.getContractArguments({contract:r}),o=r.connect(e)[t.method];return i?o(...i,{value:QG.bigNumberify(t.value,t.blockchain)}):o({value:QG.bigNumberify(t.value,t.blockchain)})},CZ=({transaction:t,signer:e})=>e.sendTransaction({to:t.to,value:QG.bigNumberify(t.value,t.blockchain)}),DZ=()=>window._connectedWalletLinkInstance,OZ=t=>{window._connectedWalletLinkInstance=t};class zZ{static __initStatic(){this.info={name:"Coinbase",logo:tZ.info.logo,blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>null!=DZ()}constructor(){this.name=this.constructor.info.name,this.logo=this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.connector=zZ.instance||this.newWalletLinkInstance(),this.sendTransaction=t=>(async({transaction:t,wallet:e})=>{if(t=new QG(t),0==await e.connectedTo(t.blockchain)&&await e.switchTo(t.blockchain),0==await e.connectedTo(t.blockchain))throw{code:"WRONG_NETWORK"};await t.prepare({wallet:e});let n=new qM(e.connector,"any"),r=n.getSigner(0);return await jZ({transaction:t,provider:n,signer:r}).then((e=>{if(!e)throw"Submitting transaction failed!";t.id=e.hash,t.nonce=e.nonce,t.url=Ch.findByName(t.blockchain).explorerUrlFor({transaction:t}),t.sent&&t.sent(t),e.wait(1).then((()=>{t._succeeded=!0,t.succeeded&&t.succeeded(t)})).catch((e=>{e&&e.code&&"TRANSACTION_REPLACED"==e.code?(e.replacement&&e.replacement.hash&&(t.id=e.replacement.hash,t.url=Ch.findByName(t.blockchain).explorerUrlFor({transaction:t})),e.replacement&&e.replacement.hash&&e.receipt&&1==e.receipt.status?(t._succeeded=!0,t.succeeded&&t.succeeded(t)):e.replacement&&e.replacement.hash&&e.receipt&&0==e.receipt.status&&(t._failed=!0,t.failed&&t.failed(t,e))):(t._failed=!0,t.failed&&t.failed(t,e))}))})),t})({wallet:this,transaction:t})}newWalletLinkInstance(){return new FG({}).makeWeb3Provider()}async account(){if(null!=this.connectedAccounts)return Mp(this.connectedAccounts[0])}async connect(t){(await this.connector._relayProvider()).setConnectDisabled(!1);let e=await this.connector.enable();return e instanceof Array&&e.length&&OZ(this),e=e.map((t=>Mp(t))),this.connectedAccounts=e,this.connectedChainId=await this.connector.getChainId(),e[0]}async connectedTo(t){let e=await this.connector.getChainId();const n=Ch.findByNetworkId(e);return t?t===n.name:n.name}switchTo(t){return new Promise(((e,n)=>{const r=Ch.findByName(t);this.connector.request({method:"wallet_switchEthereumChain",params:[{chainId:r.id}]}).then(e).catch((r=>{4902===r.code?this.addNetwork(t).then((()=>this.switchTo(t).then(e))).catch(n):n(r)}))}))}addNetwork(t){return new Promise(((e,n)=>{const r=Ch.findByName(t);this.connector.request({method:"wallet_addEthereumChain",params:[{chainId:r.id,chainName:r.fullName,nativeCurrency:{name:r.currency.name,symbol:r.currency.symbol,decimals:r.currency.decimals},rpcUrls:[r.rpc],blockExplorerUrls:[r.explorer],iconUrls:[r.logo]}]}).then(e).catch(n)}))}on(t,e){let n;if("account"===t)n=t=>e(Mp(t[0])),this.connector.on("accountsChanged",n);return n}off(t,e){if("account"===t)this.connector.removeListener("accountsChanged",e);return e}transactionCount({blockchain:t,address:e}){return RG({blockchain:t,method:"transactionCount",address:e})}async sign(t){await this.account();let e=new qM(this.connector,"any").getSigner(0);return await e.signMessage(t)}}zZ.__initStatic(),zZ.__initStatic2(),zZ.getConnectedInstance=DZ,zZ.setConnectedInstance=OZ;var PZ={MetaMask:rZ,Phantom:hZ,Coinbase:tZ,Binance:JG,Trust:fZ,Brave:KG,Opera:iZ,Coin98:XG,CryptoCom:eZ,HyperPay:nZ,WindowEthereum:qG,WindowSolana:lZ,WalletConnectV1:kZ,WalletLink:zZ};const RZ=async()=>{let t=await Promise.all(Object.keys(PZ).map((async t=>{let e=PZ[t];if(await e.isAvailable()){let t;return e.getConnectedInstance?(t=await e.getConnectedInstance(),t):new e}})));return t.filter((t=>t))};PZ.MetaMask,PZ.Phantom,PZ.Coinbase,PZ.Binance,PZ.Trust,PZ.Brave,PZ.Opera,PZ.Coin98,PZ.CryptoCom,PZ.HyperPay,PZ.WalletConnectV1,PZ.WalletLink,PZ.WindowEthereum;var BZ=function(t){var n,r=Z.useRef(),i=d(Z.useState(),2),o=i[0],a=i[1],s=d(Z.useState(),2),u=s[0],l=s[1],h=d(Z.useState(),2),f=h[0],p=h[1],m=d(Z.useState(),2);m[0],m[1];var g=d(Z.useState(!1),2),y=g[0],b=g[1],w=d(Z.useState(!1),2),v=w[0],M=w[1],L=d(Z.useState(),2),_=L[0],N=L[1];Z.useContext(uh).navigate;var E=Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},(null===(n=t.wallet)||void 0===n?void 0:n.logo)&&Z.createElement("div",{className:"PaddingTopXS"},Z.createElement("div",{className:"LineHeightL FontSizeL PaddingTopS"},Z.createElement("span",{className:"CardImage rounded large"},Z.createElement("img",{className:"transparent",src:t.wallet.logo}))))),S=function(){switch(t.wallet.link){case"WalletConnectV1":if(null==_){var e=new PZ[t.wallet.link];e.connect({name:t.wallet.name,logo:t.wallet.logo,reconnect:!0,connect:function(t){var e=t.uri,n=new yh({width:340,height:340,type:"svg",dotsOptions:{type:"extra-rounded"},cornersSquareOptions:{type:"rounded"},backgroundOptions:{color:"transparent"}});n.update({data:e}),N(n)}}).then((function(n){t.resolve(n,e)}))}break;case"WalletLink":var n=new PZ[t.wallet.link];n.connect().then((function(e){t.resolve(e,n)}))}};return Z.useEffect((function(){e(c.mark((function e(){var n,r;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=a,null===(n=t.wallet)||void 0===n||!n.extension){e.next=10;break}return e.next=4,PZ[t.wallet.extension].isAvailable();case 4:if(e.t2=e.sent,e.t2){e.next=7;break}e.t2=!1;case 7:e.t1=e.t2,e.next=11;break;case 10:e.t1=!1;case 11:if(e.t3=e.t1,(0,e.t0)(e.t3),e.t4=p,null===(r=t.wallet)||void 0===r||!r.link){e.next=23;break}return e.next=17,PZ[t.wallet.link].isAvailable();case 17:if(e.t6=e.sent,e.t6){e.next=20;break}e.t6=!1;case 20:e.t5=e.t6,e.next=24;break;case 23:e.t5=!1;case 24:e.t7=e.t5,(0,e.t4)(e.t7),l(!!mh(t.wallet));case 27:case"end":return e.stop()}}),e)})))()}),[]),Z.useEffect((function(){var e,n;void 0!==f&&b(!(o||fh()||null!==(e=t.wallet)&&void 0!==e&&null!==(n=e.desktop)&&void 0!==n&&n.native))}),[o,f]),Z.useEffect((function(){y&&t.wallet.link&&S()}),[y]),Z.useEffect((function(){y&&_&&r&&r.current&&(r.current.innerHTML="",_.append(r.current))}),[_]),Z.createElement(dh,{stacked:!0,header:E,body:Z.createElement("div",{className:"TextCenter"},Z.createElement("div",{className:"PaddingLeftL PaddingRightL"},Z.createElement("h1",{className:"LineHeightL Text FontSizeL FontWeightBold"},"Connect ",t.wallet.name)),Z.createElement("div",{className:"PaddingTopS"},Z.createElement("div",{ref:r,className:"QRCode"}),y&&Z.createElement("div",{className:"Opacity05 PaddingBottomXS"},Z.createElement("small",null,"Scan QR code with your wallet"))),Z.createElement("div",{className:"PaddingLeftL PaddingRightL PaddingTopL"},o&&Z.createElement("div",{className:"PaddingBottomXS"},t.showConnectExtensionWarning&&Z.createElement("div",{className:"PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("div",{className:"Alert"},Z.createElement("span",{className:"FontWeightBold PaddingBottomXS"},"You wallet extension window is already asking to connect. It might be hidden."))),Z.createElement("button",{onClick:function(){return t.connectExtension(t.wallet)},className:"Card small PaddingTopS PaddingRightXS PaddingBottomS PaddingLeftXS"},Z.createElement("span",{className:"PaddingTopXS PaddingRightXS PaddingLeftS"},Z.createElement("img",{className:"transparent ",title:"Connect your wallet",style:{height:"26px"},src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Im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LjQtNS45bC0wLjEtMzUuNEwyMzMuMyw2OWwwLTAuOEwxNzIuOCw2OC4zeiIvPgo8L2c+Cjwvc3ZnPgo="})),Z.createElement("div",{className:"PaddingLeftS LineHeightXS"},Z.createElement("div",{className:"CardText FontWeightMedium"},"Connect extension")))),u&&Z.createElement("div",{className:"PaddingBottomXS"},Z.createElement("button",{onClick:function(){return t.connectViaRedirect(t.wallet)},className:"Card small PaddingTopS PaddingRightXS PaddingBottomS PaddingLeftXS"},Z.createElement("span",{className:"PaddingTopXS PaddingRightXS PaddingLeftS"},Z.createElement("img",{className:"transparent ",title:"Click to connect app",style:{height:"26px",width:"26px",borderRadius:"8px"},src:t.wallet.logo})),Z.createElement("div",{className:"PaddingLeftS LineHeightXS"},Z.createElement("div",{className:"CardText FontWeightMedium"},"Connect app")))),t.wallet.link&&(!y||"WalletLink"==t.wallet.link)&&Z.createElement("div",{className:"PaddingBottomXS"},Z.createElement("button",{onClick:function(){b(!0),t.wallet.link&&S()},className:"Card small PaddingTopS PaddingRightXS PaddingBottomS PaddingLeftXS"},Z.createElement("span",{className:"PaddingTopXS PaddingRightXS PaddingLeftS"},Z.createElement("img",{className:"transparent ",title:"Scan QR code to connect a mobile wallet",style:{height:"26px"},src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyAgUFVCTElDICctLy9XM0MvL0RURCBTVkcgMS4xLy9FTicgICdodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQnPgo8c3ZnIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDEwMDAgMTAwMCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMWUzIDFlMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPG1ldGFkYXRhP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MTEwNi40djExMDYuNGgtMTEwNi40di01NTN6bTMzMTkuMy0xMTA2LjV2LTU1My4yaC0xMTA2LjR2LTExMDYuNGgtMTEwNi40djExMDYuNGgxMTA2LjR2MTEwNi40aDExMDYuNHYtNTUzLjJ6Ii8+PC9nPgo8L3N2Zz4K"})),Z.createElement("div",{className:"PaddingLeftS LineHeightXS"},Z.createElement("div",{className:"CardText FontWeightMedium"},"Scan QR code")))),t.wallet.link&&"WalletConnectV1"==t.wallet.link&&Z.createElement("div",{className:"PaddingBottomXS TooltipWrapper"},Z.createElement("button",{onClick:function(){var e=new PZ[t.wallet.link];e.connect({name:t.wallet.name,logo:t.wallet.logo,reconnect:!0,connect:function(t){!
|
|
114
|
+
e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,h=n?i-1:0,d=n?-1:1,f=t[e+h];for(h+=d,o=f&(1<<-l)-1,f>>=-l,l+=s;l>0;o=256*o+t[e+h],h+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+h],h+=d,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+h>=1?d/u:d*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+f]=255&a,f+=p,a/=256,c-=8);t[n+f-p]|=128*m}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(87),i=n(103),o=n(88);function a(t,e){const[n,o]=u(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),o)}function s(t,e){const[n,o]=u(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),o)}function u(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){const{message:e,data:n}=t;if(e&&"string"!=typeof e)throw new Error("Must specify string message.");return[e||void 0,n]}}return[]}e.ethErrors={rpc:{parse:t=>a(o.errorCodes.rpc.parse,t),invalidRequest:t=>a(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>a(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>a(o.errorCodes.rpc.methodNotFound,t),internal:t=>a(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(e,t)},invalidInput:t=>a(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>a(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>a(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>a(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>a(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>a(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>s(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>s(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>s(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>s(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>s(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:n,data:i}=t;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(e,n,i)}}}},function(t,e,n){(e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n}).sha=n(136),e.sha1=n(137),e.sha224=n(138),e.sha256=n(104),e.sha384=n(139),e.sha512=n(105)},function(t,e,n){var r=n(24),i=n(45),o=n(37).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<30|t>>>2}function l(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,h=0;h<16;++h)n[h]=t.readInt32BE(4*h);for(;h<80;++h)n[h]=n[h-3]^n[h-8]^n[h-14]^n[h-16];for(var d=0;d<80;++d){var f=~~(d/20),p=0|((e=r)<<5|e>>>27)+l(f,i,o,s)+u+n[d]+a[f];u=s,s=o,o=c(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,n){var r=n(24),i=n(45),o=n(37).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function l(t){return t<<30|t>>>2}function h(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,d=0;d<16;++d)n[d]=t.readInt32BE(4*d);for(;d<80;++d)n[d]=(e=n[d-3]^n[d-8]^n[d-14]^n[d-16])<<1|e>>>31;for(var f=0;f<80;++f){var p=~~(f/20),m=c(r)+h(p,i,o,s)+u+n[f]+a[p]|0;u=s,s=o,o=l(i),i=r,r=m}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,n){var r=n(24),i=n(104),o=n(45),a=n(37).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}r(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,n){var r=n(24),i=n(105),o=n(45),a=n(37).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}r(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,n){var r=n(141),i=n(151),o=n(93);t.exports={formats:o,parse:i,stringify:r}},function(t,e,n){var r=n(142),i=n(106),o=n(93),a=Object.prototype.hasOwnProperty,s={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},u=Array.isArray,c=String.prototype.split,l=Array.prototype.push,h=function(t,e){l.apply(t,u(e)?e:[e])},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(t){return d.call(t)},skipNulls:!1,strictNullHandling:!1},m={},g=function t(e,n,o,a,s,l,d,f,g,y,b,w,v,M,L,_){for(var N,E=e,S=_,x=0,A=!1;void 0!==(S=S.get(m))&&!A;){var I=S.get(e);if(x+=1,void 0!==I){if(I===x)throw new RangeError("Cyclic object value");A=!0}void 0===S.get(m)&&(x=0)}if("function"==typeof f?E=f(n,E):E instanceof Date?E=b(E):"comma"===o&&u(E)&&(E=i.maybeMap(E,(function(t){return t instanceof Date?b(t):t}))),null===E){if(s)return d&&!M?d(n,p.encoder,L,"key",w):n;E=""}if("string"==typeof(N=E)||"number"==typeof N||"boolean"==typeof N||"symbol"==typeof N||"bigint"==typeof N||i.isBuffer(E)){if(d){var k=M?n:d(n,p.encoder,L,"key",w);if("comma"===o&&M){for(var j=c.call(String(E),","),T="",C=0;C<j.length;++C)T+=(0===C?"":",")+v(d(j[C],p.encoder,L,"value",w));return[v(k)+(a&&u(E)&&1===j.length?"[]":"")+"="+T]}return[v(k)+"="+v(d(E,p.encoder,L,"value",w))]}return[v(n)+"="+v(String(E))]}var D,O=[];if(void 0===E)return O;if("comma"===o&&u(E))D=[{value:E.length>0?E.join(",")||null:void 0}];else if(u(f))D=f;else{var z=Object.keys(E);D=g?z.sort(g):z}for(var P=a&&u(E)&&1===E.length?n+"[]":n,R=0;R<D.length;++R){var B=D[R],U="object"==typeof B&&void 0!==B.value?B.value:E[B];if(!l||null!==U){var Y=u(E)?"function"==typeof o?o(P,B):P:P+(y?"."+B:"["+B+"]");_.set(e,x);var F=r();F.set(m,_),h(O,t(U,Y,o,a,s,l,d,f,g,y,b,w,v,M,L,F))}}return O};t.exports=function(t,e){var n,i=t,c=function(t){if(!t)return p;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||p.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==t.format){if(!a.call(o.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=o.formatters[n],i=p.filter;return("function"==typeof t.filter||u(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===t.allowDots?p.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:p.charsetSentinel,delimiter:void 0===t.delimiter?p.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:p.encode,encoder:"function"==typeof t.encoder?t.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:p.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:p.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:p.strictNullHandling}}(e);"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=e&&e.arrayFormat in s?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var f=s[l];if(e&&"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var m="comma"===f&&e&&e.commaRoundTrip;n||(n=Object.keys(i)),c.sort&&n.sort(c.sort);for(var y=r(),b=0;b<n.length;++b){var w=n[b];c.skipNulls&&null===i[w]||h(d,g(i[w],w,f,m,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),M=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?M+="utf8=%26%2310003%3B&":M+="utf8=%E2%9C%93&"),v.length>0?M+v:""}},function(t,e,n){var r=n(91),i=n(147),o=n(149),a=r("%TypeError%"),s=r("%WeakMap%",!0),u=r("%Map%",!0),c=i("WeakMap.prototype.get",!0),l=i("WeakMap.prototype.set",!0),h=i("WeakMap.prototype.has",!0),d=i("Map.prototype.get",!0),f=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),m=function(t,e){for(var n,r=t;null!==(n=r.next);r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n};t.exports=function(){var t,e,n,r={assert:function(t){if(!r.has(t))throw new a("Side channel does not contain "+o(t))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(t)return c(t,r)}else if(u){if(e)return d(e,r)}else if(n)return function(t,e){var n=m(t,e);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(t)return h(t,r)}else if(u){if(e)return p(e,r)}else if(n)return function(t,e){return!!m(t,e)}(n,r);return!1},set:function(r,i){s&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new s),l(t,r,i)):u?(e||(e=new u),f(e,r,i)):(n||(n={key:{},next:null}),function(t,e,n){var r=m(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}}(n,r,i))}};return r}},function(t,e,n){var r="undefined"!=typeof Symbol&&Symbol,i=n(144);t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}},function(t,e,n){t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},function(t,e,n){var r=Array.prototype.slice,i=Object.prototype.toString;t.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==i.call(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n,o=r.call(arguments,1),a=Math.max(0,e.length-o.length),s=[],u=0;u<a;u++)s.push("$"+u);if(n=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof n){var i=e.apply(this,o.concat(r.call(arguments)));return Object(i)===i?i:this}return e.apply(t,o.concat(r.call(arguments)))})),e.prototype){var c=function(){};c.prototype=e.prototype,n.prototype=new c,c.prototype=null}return n}},function(t,e,n){var r=n(92);t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(t,e,n){var r=n(91),i=n(148),o=i(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&o(t,".prototype.")>-1?i(n):n}},function(t,e,n){var r=n(92),i=n(91),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||r.call(a,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(r,a,arguments);u&&c&&(u(e,"length").configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))}));return e};var h=function(){return s(r,o,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},function(t,e,n){var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"==typeof i.get?i.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,h="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,y=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,M=String.prototype.toLowerCase,L=RegExp.prototype.test,_=Array.prototype.concat,N=Array.prototype.join,E=Array.prototype.slice,S=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,k="function"==typeof Symbol&&"object"==typeof Symbol.iterator,j="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,C=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function D(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||L.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var r=t<0?-S(-t):S(t);if(r!==t){var i=String(r),o=b.call(e,i.length+1);return w.call(i,n,"$&_")+"."+w.call(w.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,n,"$&_")}var O=n(150),z=O.custom,P=F(z)?z:null;function R(t,e,n){var r="double"===(n.quoteStyle||e)?'"':"'";return r+t+r}function B(t){return w.call(String(t),/"/g,""")}function U(t){return!("[object Array]"!==H(t)||j&&"object"==typeof t&&j in t)}function Y(t){return!("[object RegExp]"!==H(t)||j&&"object"==typeof t&&j in t)}function F(t){if(k)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!I)return!1;try{return I.call(t),!0}catch(t){}return!1}t.exports=function t(e,n,r,i){var s=n||{};if(Q(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Q(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!Q(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Q(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Q(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return function t(e,n){if(e.length>n.maxStringLength){var r=e.length-n.maxStringLength,i="... "+r+" more character"+(r>1?"s":"");return t(b.call(e,0,n.maxStringLength),n)+i}return R(w.call(w.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Z),"single",n)}(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var v=String(e);return m?D(e,v):v}if("bigint"==typeof e){var L=String(e)+"n";return m?D(e,L):L}var S=void 0===s.depth?5:s.depth;if(void 0===r&&(r=0),r>=S&&S>0&&"object"==typeof e)return U(e)?"[Array]":"[Object]";var A=function(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;n=N.call(Array(t.indent+1)," ")}return{base:n,prev:N.call(Array(e+1),n)}}(s,r);if(void 0===i)i=[];else if(G(i,e)>=0)return"[Circular]";function z(e,n,o){if(n&&(i=E.call(i)).push(n),o){var a={depth:s.depth};return Q(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,r+1,i)}return t(e,s,r+1,i)}if("function"==typeof e&&!Y(e)){var W=function(t){if(t.name)return t.name;var e=y.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),$=X(e,z);return"[Function"+(W?": "+W:" (anonymous)")+"]"+($.length>0?" { "+N.call($,", ")+" }":"")}if(F(e)){var tt=k?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):I.call(e);return"object"!=typeof e||k?tt:V(tt)}if(function(t){return!(!t||"object"!=typeof t)&&("undefined"!=typeof HTMLElement&&t instanceof HTMLElement||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)}(e)){for(var et="<"+M.call(String(e.nodeName)),nt=e.attributes||[],rt=0;rt<nt.length;rt++)et+=" "+nt[rt].name+"="+R(B(nt[rt].value),"double",s);return et+=">",e.childNodes&&e.childNodes.length&&(et+="..."),et+"</"+M.call(String(e.nodeName))+">"}if(U(e)){if(0===e.length)return"[]";var it=X(e,z);return A&&!function(t){for(var e=0;e<t.length;e++)if(G(t[e],"\n")>=0)return!1;return!0}(it)?"["+K(it,A)+"]":"[ "+N.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||j&&"object"==typeof t&&j in t)}(e)){var ot=X(e,z);return"cause"in Error.prototype||!("cause"in e)||T.call(e,"cause")?0===ot.length?"["+String(e)+"]":"{ ["+String(e)+"] "+N.call(ot,", ")+" }":"{ ["+String(e)+"] "+N.call(_.call("[cause]: "+z(e.cause),ot),", ")+" }"}if("object"==typeof e&&u){if(P&&"function"==typeof e[P]&&O)return O(e,{depth:S-r});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!o||!t||"object"!=typeof t)return!1;try{o.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var at=[];return a.call(e,(function(t,n){at.push(z(n,e,!0)+" => "+z(t,e))})),J("Map",o.call(e),at,A)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var st=[];return l.call(e,(function(t){st.push(z(t,e))})),J("Set",c.call(e),st,A)}if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{h.call(t,h);try{d.call(t,d)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return q("WeakMap");if(function(t){if(!d||!t||"object"!=typeof t)return!1;try{d.call(t,d);try{h.call(t,h)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return q("WeakSet");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{return f.call(t),!0}catch(t){}return!1}(e))return q("WeakRef");if(function(t){return!("[object Number]"!==H(t)||j&&"object"==typeof t&&j in t)}(e))return V(z(Number(e)));if(function(t){if(!t||"object"!=typeof t||!x)return!1;try{return x.call(t),!0}catch(t){}return!1}(e))return V(z(x.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||j&&"object"==typeof t&&j in t)}(e))return V(p.call(e));if(function(t){return!("[object String]"!==H(t)||j&&"object"==typeof t&&j in t)}(e))return V(z(String(e)));if(!function(t){return!("[object Date]"!==H(t)||j&&"object"==typeof t&&j in t)}(e)&&!Y(e)){var ut=X(e,z),ct=C?C(e)===Object.prototype:e instanceof Object||e.constructor===Object,lt=e instanceof Object?"":"null prototype",ht=!ct&&j&&Object(e)===e&&j in e?b.call(H(e),8,-1):lt?"Object":"",dt=(ct||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(ht||lt?"["+N.call(_.call([],ht||[],lt||[]),": ")+"] ":"");return 0===ut.length?dt+"{}":A?dt+"{"+K(ut,A)+"}":dt+"{ "+N.call(ut,", ")+" }"}return String(e)};var W=Object.prototype.hasOwnProperty||function(t){return t in this};function Q(t,e){return W.call(t,e)}function H(t){return m.call(t)}function G(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function Z(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function V(t){return"Object("+t+")"}function q(t){return t+" { ? }"}function J(t,e,n,r){return t+" ("+e+") {"+(r?K(n,r):N.call(n,", "))+"}"}function K(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+N.call(t,","+n)+"\n"+e.prev}function X(t,e){var n=U(t),r=[];if(n){r.length=t.length;for(var i=0;i<t.length;i++)r[i]=Q(t,i)?e(t[i],t):""}var o,a="function"==typeof A?A(t):[];if(k){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var u in t)Q(t,u)&&(n&&String(Number(u))===u&&u<t.length||k&&o["$"+u]instanceof Symbol||(L.call(/[^\w$]/,u)?r.push(e(u,t)+": "+e(t[u],t)):r.push(u+": "+e(t[u],t))));if("function"==typeof A)for(var c=0;c<a.length;c++)T.call(t,a[c])&&r.push("["+e(a[c])+"]: "+e(t[a[c]],t));return r}},function(t,e){},function(t,e,n){var r=n(106),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={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},s=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},u=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},c=function(t,e,n,r){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.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!==(s=a.exec(o))&&h<n.depth;){if(h+=1,!n.plainObjects&&i.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+o.slice(s.index)+"]"),function(t,e,n,r){for(var i=r?e:u(e,n),o=t.length-1;o>=0;--o){var a,s=t[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);n.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(l,e,n,r)}};t.exports=function(t,e){var n=function(t){if(!t)return a;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?a.charset:t.charset;return{allowDots:void 0===t.allowDots?a.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:a.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling}}(e);if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var l="string"==typeof t?function(t,e){var n,c={},l=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,h=e.parameterLimit===1/0?void 0:e.parameterLimit,d=l.split(e.delimiter,h),f=-1,p=e.charset;if(e.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 m,g,y=d[n],b=y.indexOf("]="),w=-1===b?y.indexOf("="):b+1;-1===w?(m=e.decoder(y,a.decoder,p,"key"),g=e.strictNullHandling?null:""):(m=e.decoder(y.slice(0,w),a.decoder,p,"key"),g=r.maybeMap(u(y.slice(w+1),e),(function(t){return e.decoder(t,a.decoder,p,"value")}))),g&&e.interpretNumericEntities&&"iso-8859-1"===p&&(g=s(g)),y.indexOf("[]=")>-1&&(g=o(g)?[g]:g),i.call(c,m)?c[m]=r.combine(c[m],g):c[m]=g}return c}(t,n):t,h=n.plainObjects?Object.create(null):{},d=Object.keys(l),f=0;f<d.length;++f){var p=d[f],m=c(p,l[p],n,"string"==typeof t);h=r.merge(h,m,n)}return!0===n.allowSparse?h:r.compact(h)}},function(t,e,n){(function(e){const r=n(108),i=n(167),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"]},a={encodeData(t,n,o,a=!0){const s=["bytes32"],u=[this.hashType(t,o)];if(a){const c=(t,n,s)=>{if(void 0!==o[n])return["bytes32",null==s?"0x0000000000000000000000000000000000000000000000000000000000000000":r.keccak(this.encodeData(n,s,o,a))];if(void 0===s)throw new Error(`missing value for field ${t} of type ${n}`);if("bytes"===n)return["bytes32",r.keccak(s)];if("string"===n)return"string"==typeof s&&(s=e.from(s,"utf8")),["bytes32",r.keccak(s)];if(n.lastIndexOf("]")===n.length-1){const e=n.slice(0,n.lastIndexOf("[")),o=s.map((n=>c(t,e,n)));return["bytes32",r.keccak(i.rawEncode(o.map((([t])=>t)),o.map((([,t])=>t))))]}return[n,s]};for(const e of o[t]){const[t,r]=c(e.name,e.type,n[e.name]);s.push(t),u.push(r)}}else for(const i of o[t]){let t=n[i.name];if(void 0!==t)if("bytes"===i.type)s.push("bytes32"),t=r.keccak(t),u.push(t);else if("string"===i.type)s.push("bytes32"),"string"==typeof t&&(t=e.from(t,"utf8")),t=r.keccak(t),u.push(t);else if(void 0!==o[i.type])s.push("bytes32"),t=r.keccak(this.encodeData(i.type,t,o,a)),u.push(t);else{if(i.type.lastIndexOf("]")===i.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");s.push(i.type),u.push(t)}}return i.rawEncode(s,u)},encodeType(t,e){let n="",r=this.findTypeDependencies(t,e).filter((e=>e!==t));r=[t].concat(r.sort());for(const t of r){if(!e[t])throw new Error("No type definition specified: "+t);n+=t+"("+e[t].map((({name:t,type:e})=>e+" "+t)).join(",")+")"}return n},findTypeDependencies(t,e,n=[]){if(t=t.match(/^\w*/)[0],n.includes(t)||void 0===e[t])return n;n.push(t);for(const r of e[t])for(const t of this.findTypeDependencies(r.type,e,n))!n.includes(t)&&n.push(t);return n},hashStruct(t,e,n,i=!0){return r.keccak(this.encodeData(t,e,n,i))},hashType(t,e){return r.keccak(this.encodeType(t,e))},sanitizeData(t){const e={};for(const n in o.properties)t[n]&&(e[n]=t[n]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,n=!0){const i=this.sanitizeData(t),o=[e.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(e.concat(o))}};t.exports={TYPED_MESSAGE_SCHEMA:o,TypedDataUtils:a,hashForSignTypedDataLegacy:function(t){return function(t){const e=new Error("Expect argument to be non-empty array");if("object"!=typeof t||!t.length)throw e;const n=t.map((function(t){return"bytes"===t.type?r.toBuffer(t.value):t.value})),o=t.map((function(t){return t.type})),a=t.map((function(t){if(!t.name)throw e;return t.type+" "+t.name}));return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(new Array(t.length).fill("string"),a),i.soliditySHA3(o,n)])}(t.data)},hashForSignTypedData_v3:function(t){return a.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return a.hash(t.data)}}}).call(this,n(19).Buffer)},function(t,e,n){t.exports=n(154)(n(165))},function(t,e,n){const r=n(155),i=n(164);t.exports=function(t){const e=r(t),n=i(t);return function(t,r){switch("string"==typeof t?t.toLowerCase():t){case"keccak224":return new e(1152,448,null,224,r);case"keccak256":return new e(1088,512,null,256,r);case"keccak384":return new e(832,768,null,384,r);case"keccak512":return new e(576,1024,null,512,r);case"sha3-224":return new e(1152,448,6,224,r);case"sha3-256":return new e(1088,512,6,256,r);case"sha3-384":return new e(832,768,6,384,r);case"sha3-512":return new e(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: "+t)}}}},function(t,e,n){(function(e){const{Transform:r}=n(109);t.exports=t=>class n extends r{constructor(e,n,r,i,o){super(o),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=i,this._options=o,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(t,e,n){let r=null;try{this.update(t,e)}catch(t){r=t}n(r)}_flush(t){let e=null;try{this.push(this.digest())}catch(t){e=t}t(e)}update(t,n){if(!e.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return e.isBuffer(t)||(t=e.from(t,n)),this._state.absorb(t),this}digest(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let e=this._state.squeeze(this._hashBitLength/8);return void 0!==t&&(e=e.toString(t)),this._resetState(),e}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new n(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}}).call(this,n(19).Buffer)},function(t,e){},function(t,e,n){function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=n(19).Buffer,a=n(158).inspect,s=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e;return(e=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,n,r,i=o.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,n=i,r=s,o.prototype.copy.call(e,n,r),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(t,e){var n;return t<this.head.data.length?(n=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):n=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,n=1,r=e.data;for(t-=r.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?r+=i:r+=i.slice(0,t),0==(t-=o)){o===i.length?(++n,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),n=this.head,r=1;for(n.data.copy(e),t-=n.data.length;n=n.next;){var i=n.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,e}},{key:s,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(t.prototype,e),t}()},function(t,e){},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(63))},function(t,e,n){(function(e){var r;function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=n(94),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function f(t,e){return{value:t,done:e}}function p(t){var e=t[a];if(null!==e){var n=t[d].read();null!==n&&(t[l]=null,t[a]=null,t[s]=null,e(f(n,!1)))}}function m(t){e.nextTick(p,t)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(r={get stream(){return this[d]},next:function(){var t=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){e.nextTick((function(){t[u]?r(t[u]):n(f(void 0,!0))}))}));var r,i=this[l];if(i)r=new Promise(function(t,e){return function(n,r){t.then((function(){e[c]?n(f(void 0,!0)):e[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 t=this;return new Promise((function(e,n){t[d].destroy(null,(function(t){t?n(t):e(f(void 0,!0))}))}))})),r),g);t.exports=function(t){var e,n=Object.create(y,(i(e={},d,{value:t,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var r=n[d].read();r?(n[l]=null,n[a]=null,n[s]=null,t(f(r,!1))):(n[a]=t,n[s]=e)},writable:!0}),e));return n[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=n[s];return null!==e&&(n[l]=null,n[a]=null,n[s]=null,e(t)),void(n[u]=t)}var r=n[a];null!==r&&(n[l]=null,n[a]=null,n[s]=null,r(f(void 0,!0))),n[c]=!0})),t.on("readable",m.bind(null,n)),n}}).call(this,n(40))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,n){t.exports=i;var r=n(116);function i(t){if(!(this instanceof i))return new i(t);r.call(this,t)}n(24)(i,r),i.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){var r,i=n(46).codes,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===r&&(r=n(94)),r(t,{readable:e,writable:i},(function(t){if(t)return o(t);s=!0,o()}));var u=!1;return function(e){if(!s&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new a("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}t.exports=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=function(t){return t.length?"function"!=typeof t[t.length-1]?s:t.pop():s}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var a=e.map((function(t,n){var o=n<e.length-1;return u(t,o,n>0,(function(t){r||(r=t),t&&a.forEach(c),o||(a.forEach(c),i(r))}))}));return e.reduce(l)}},function(t,e,n){(function(e){const{Transform:r}=n(109);t.exports=t=>class n extends r{constructor(e,n,r,i){super(i),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._options=i,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(t,e,n){let r=null;try{this.update(t,e)}catch(t){r=t}n(r)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,n){if(!e.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return e.isBuffer(t)||(t=e.from(t,n)),this._state.absorb(t),this}squeeze(t,e){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let n=this._state.squeeze(t);return void 0!==e&&(n=n.toString(e)),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new n(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}}).call(this,n(19).Buffer)},function(t,e,n){(function(e){const r=n(166);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(t,e){for(let t=0;t<50;++t)this.state[t]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(r.p1600(this.state),this.count=0)},i.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,0!=(128&t)&&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(t){this.squeezing||this.absorbLastFewBits(1);const n=e.alloc(t);for(let e=0;e<t;++e)n[e]=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(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},t.exports=i}).call(this,n(19).Buffer)},function(t,e){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];e.p1600=function(t){for(let e=0;e<24;++e){const r=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],s=t[4]^t[14]^t[24]^t[34]^t[44],u=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],h=t[8]^t[18]^t[28]^t[38]^t[48],d=t[9]^t[19]^t[29]^t[39]^t[49];let f=h^(o<<1|a>>>31),p=d^(a<<1|o>>>31);const m=t[0]^f,g=t[1]^p,y=t[10]^f,b=t[11]^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=It^~jt&Wt,t[49]=kt^~Tt&Qt,t[0]^=n[2*e],t[1]^=n[2*e+1]}}},function(t,e,n){(function(e){const r=n(108),i=n(66);function o(t){return t.startsWith("int[")?"int256"+t.slice(3):"int"===t?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):"uint"===t?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):"fixed"===t?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):"ufixed"===t?"ufixed128x128":t}function a(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function s(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function u(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?""===e[2]?"dynamic":parseInt(e[2],10):null}function c(t){var e=typeof t;if("string"===e)return r.isHexString(t)?new i(r.stripHexPrefix(t),16):new i(t,10);if("number"===e)return new i(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function l(t,n){var o,h,d,f;if("address"===t)return l("uint160",c(n));if("bool"===t)return l("uint8",n?1:0);if("string"===t)return l("bytes",new e(n,"utf8"));if(function(t){return t.lastIndexOf("]")===t.length-1}(t)){if(void 0===n.length)throw new Error("Not an array?");if("dynamic"!==(o=u(t))&&0!==o&&n.length>o)throw new Error("Elements exceed array size: "+o);for(f in d=[],t=t.slice(0,t.lastIndexOf("[")),"string"==typeof n&&(n=JSON.parse(n)),n)d.push(l(t,n[f]));if("dynamic"===o){var p=l("uint256",n.length);d.unshift(p)}return e.concat(d)}if("bytes"===t)return n=new e(n),d=e.concat([l("uint256",n.length),n]),n.length%32!=0&&(d=e.concat([d,r.zeros(32-n.length%32)])),d;if(t.startsWith("bytes")){if((o=a(t))<1||o>32)throw new Error("Invalid bytes<N> width: "+o);return r.setLengthRight(n,32)}if(t.startsWith("uint")){if((o=a(t))%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(e,"be",32)}if(t.startsWith("int")){if((o=a(t))%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(e,"be",32)}if(t.startsWith("ufixed")){if(o=s(t),(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(t.startsWith("fixed"))return o=s(t),l("int256",c(n).mul(new i(2).pow(new i(o[1]))));throw new Error("Unsupported or invalid type: "+t)}function h(t){return"string"===t||"bytes"===t||"dynamic"===u(t)}function d(t,n){if(t.length!==n.length)throw new Error("Number of types are not matching the values");for(var i,s,u=[],l=0;l<t.length;l++){var h=o(t[l]),d=n[l];if("bytes"===h)u.push(d);else if("string"===h)u.push(new e(d,"utf8"));else if("bool"===h)u.push(new e(d?"01":"00","hex"));else if("address"===h)u.push(r.setLength(d,20));else if(h.startsWith("bytes")){if((i=a(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=a(h))%8||i<8||i>256)throw new Error("Invalid uint<N> width: "+i);if((s=c(d)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+s.bitLength());u.push(s.toArrayLike(e,"be",i/8))}else{if(!h.startsWith("int"))throw new Error("Unsupported or invalid type: "+h);if((i=a(h))%8||i<8||i>256)throw new Error("Invalid int<N> width: "+i);if((s=c(d)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+s.bitLength());u.push(s.toTwos(i).toArrayLike(e,"be",i/8))}}return e.concat(u)}t.exports={rawEncode:function(t,n){var r=[],i=[],a=32*t.length;for(var s in t){var u=o(t[s]),c=l(u,n[s]);h(u)?(r.push(l("uint256",a)),i.push(c),a+=c.length):r.push(c)}return e.concat(r.concat(i))},solidityPack:d,soliditySHA3:function(t,e){return r.keccak(d(t,e))}}}).call(this,n(19).Buffer)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.filterFromParam=e.FilterPolyfill=void 0;const r=n(68),i=n(38),o={jsonrpc:"2.0",id:0};function a(t){return{fromBlock:u(t.fromBlock),toBlock:u(t.toBlock),addresses:void 0===t.address?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}function s(t){const e={fromBlock:c(t.fromBlock),toBlock:c(t.toBlock),topics:t.topics};return null!==t.addresses&&(e.address=t.addresses),e}function u(t){if(void 0===t||"latest"===t||"pending"===t)return"latest";if("earliest"===t)return(0,r.IntNumber)(0);if((0,i.isHexString)(t))return(0,i.intNumberFromHexString)(t);throw new Error("Invalid block option: "+String(t))}function c(t){return"latest"===t?t:(0,i.hexStringFromIntNumber)(t)}function l(){return Object.assign(Object.assign({},o),{error:{code:-32e3,message:"filter not found"}})}function h(){return Object.assign(Object.assign({},o),{result:[]})}e.FilterPolyfill=class{constructor(t){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=t}async newFilter(t){const e=a(t),n=this.makeFilterId(),r=await this.setInitialCursorPosition(n,e.fromBlock);return console.log(`Installing new log filter(${n}):`,e,"initial cursor position:",r),this.logFilters.set(n,e),this.setFilterTimeout(n),(0,i.hexStringFromIntNumber)(n)}async newBlockFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log(`Installing new block filter (${t}) with initial cursor position:`,e),this.blockFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}async newPendingTransactionFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log(`Installing new block filter (${t}) with initial cursor position:`,e),this.pendingTransactionFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}uninstallFilter(t){const e=(0,i.intNumberFromHexString)(t);return console.log(`Uninstalling filter (${e})`),this.deleteFilter(e),!0}getFilterChanges(t){const e=(0,i.intNumberFromHexString)(t);return this.timeouts.has(e)&&this.setFilterTimeout(e),this.logFilters.has(e)?this.getLogFilterChanges(e):this.blockFilters.has(e)?this.getBlockFilterChanges(e):this.pendingTransactionFilters.has(e)?this.getPendingTransactionFilterChanges(e):Promise.resolve(l())}async getFilterLogs(t){const e=(0,i.intNumberFromHexString)(t),n=this.logFilters.get(e);return n?this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[s(n)]})):l()}makeFilterId(){return(0,r.IntNumber)(++this.nextFilterId)}sendAsyncPromise(t){return new Promise(((e,n)=>{this.provider.sendAsync(t,((t,r)=>t?n(t):Array.isArray(r)||null==r?n(new Error("unexpected response received: "+JSON.stringify(r))):void e(r)))}))}deleteFilter(t){console.log(`Deleting filter (${t})`),this.logFilters.delete(t),this.blockFilters.delete(t),this.pendingTransactionFilters.delete(t),this.cursors.delete(t),this.timeouts.delete(t)}async getLogFilterChanges(t){const e=this.logFilters.get(t),n=this.cursors.get(t);if(!n||!e)return l();const a=await this.getCurrentBlockHeight(),u="latest"===e.toBlock?a:e.toBlock;if(n>a)return h();if(n>e.toBlock)return h();console.log(`Fetching logs from ${n} to ${u} for filter ${t}`);const c=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[s(Object.assign(Object.assign({},e),{fromBlock:n,toBlock:u}))]}));if(Array.isArray(c.result)){const e=c.result.map((t=>(0,i.intNumberFromHexString)(t.blockNumber||"0x0"))),o=Math.max(...e);if(o&&o>n){const e=(0,r.IntNumber)(o+1);console.log(`Moving cursor position for filter (${t}) from ${n} to ${e}`),this.cursors.set(t,e)}}return c}async getBlockFilterChanges(t){const e=this.cursors.get(t);if(!e)return l();const n=await this.getCurrentBlockHeight();if(e>n)return h();console.log(`Fetching blocks from ${e} to ${n} for filter (${t})`);const a=(await Promise.all((0,i.range)(e,n+1).map((t=>this.getBlockHashByNumber((0,r.IntNumber)(t)))))).filter((t=>!!t)),s=(0,r.IntNumber)(e+a.length);return console.log(`Moving cursor position for filter (${t}) from ${e} to ${s}`),this.cursors.set(t,s),Object.assign(Object.assign({},o),{result:a})}async getPendingTransactionFilterChanges(t){return Promise.resolve(h())}async setInitialCursorPosition(t,e){const n=await this.getCurrentBlockHeight(),r="number"==typeof e&&e>n?e:n;return this.cursors.set(t,r),r}setFilterTimeout(t){const e=this.timeouts.get(t);e&&window.clearTimeout(e);const n=window.setTimeout((()=>{console.log(`Filter (${t}) timed out`),this.deleteFilter(t)}),3e5);this.timeouts.set(t,n)}async getCurrentBlockHeight(){const{result:t}=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_blockNumber",params:[]}));return(0,i.intNumberFromHexString)((0,i.ensureHexString)(t))}async getBlockHashByNumber(t){const e=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getBlockByNumber",params:[(0,i.hexStringFromIntNumber)(t),!1]}));return e.result&&"string"==typeof e.result.hash?(0,i.ensureHexString)(e.result.hash):null}},e.filterFromParam=a},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.JSONRPCMethod=void 0,function(t){t.eth_accounts="eth_accounts",t.eth_coinbase="eth_coinbase",t.net_version="net_version",t.eth_chainId="eth_chainId",t.eth_uninstallFilter="eth_uninstallFilter",t.eth_requestAccounts="eth_requestAccounts",t.eth_sign="eth_sign",t.eth_ecRecover="eth_ecRecover",t.personal_sign="personal_sign",t.personal_ecRecover="personal_ecRecover",t.eth_signTransaction="eth_signTransaction",t.eth_sendRawTransaction="eth_sendRawTransaction",t.eth_sendTransaction="eth_sendTransaction",t.eth_signTypedData_v1="eth_signTypedData_v1",t.eth_signTypedData_v2="eth_signTypedData_v2",t.eth_signTypedData_v3="eth_signTypedData_v3",t.eth_signTypedData_v4="eth_signTypedData_v4",t.eth_signTypedData="eth_signTypedData",t.cbWallet_arbitrary="walletlink_arbitrary",t.wallet_addEthereumChain="wallet_addEthereumChain",t.wallet_switchEthereumChain="wallet_switchEthereumChain",t.wallet_watchAsset="wallet_watchAsset",t.eth_subscribe="eth_subscribe",t.eth_unsubscribe="eth_unsubscribe",t.eth_newFilter="eth_newFilter",t.eth_newBlockFilter="eth_newBlockFilter",t.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",t.eth_getFilterChanges="eth_getFilterChanges",t.eth_getFilterLogs="eth_getFilterLogs"}(e.JSONRPCMethod||(e.JSONRPCMethod={}))},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionManager=void 0;const r=n(171),i=n(179),o=()=>{};e.SubscriptionManager=class{constructor(t){const e=new r({provider:t,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:o}=i({blockTracker:e,provider:t});this.events=n,this.subscriptionMiddleware=o}async handleRequest(t){const e={};return await this.subscriptionMiddleware(t,e,o,o),e}destroy(){this.subscriptionMiddleware.destroy()}}},function(t,e,n){const r=n(117),i=n(172);function o(t,e){return new Promise((n=>{const r=setTimeout(n,t);r.unref&&e&&r.unref()}))}t.exports=class extends i{constructor(t={}){if(!t.provider)throw new Error("PollingBlockTracker - no provider specified.");const e=t.pollingInterval||2e4,n=t.retryTimeout||e/10,r=void 0===t.keepEventLoopActive||t.keepEventLoopActive,i=t.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:e},t)),this._provider=t.provider,this._pollingInterval=e,this._retryTimeout=n,this._keepEventLoopActive=r,this._setSkipCacheFlag=i}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._performSync().catch((t=>this.emit("error",t)))}async _performSync(){for(;this._isRunning;)try{await this._updateLatestBlock(),await o(this._pollingInterval,!this._keepEventLoopActive)}catch(t){const e=new Error("PollingBlockTracker - encountered an error while attempting to update latest block:\n"+t.stack);try{this.emit("error",e)}catch(t){console.error(e)}await o(this._retryTimeout,!this._keepEventLoopActive)}}async _updateLatestBlock(){const t=await this._fetchLatestBlock();this._newPotentialLatest(t)}async _fetchLatestBlock(){const t={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(t.skipCache=!0);const e=await r((e=>this._provider.sendAsync(t,e)))();if(e.error)throw new Error("PollingBlockTracker - encountered error fetching block:\n"+e.error);return e.result}}},function(t,e,n){n(118),n(117);const r=n(175),i=(t,e)=>t+e,o=["sync","latest"];function a(t){return Number.parseInt(t,16)}t.exports=class extends r{constructor(t={}){super(),this._blockResetDuration=t.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(){return this._currentBlock?this._currentBlock:await new Promise((t=>this.once("latest",t)))}removeAllListeners(t){t?super.removeAllListeners(t):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(t,e){o.includes(t)&&this._maybeStart()}_onRemoveListener(t,e){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((t=>this.listenerCount(t))).reduce(i)}_newPotentialLatest(t){const e=this._currentBlock;e&&a(t)<=a(e)||this._setCurrentBlock(t)}_setCurrentBlock(t){const e=this._currentBlock;this._currentBlock=t,this.emit("latest",t),this.emit("sync",{oldBlock:e,newBlock:t})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}},function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var i in r)n.call(r,i)&&(t[i]=r[i])}return t};var n=Object.prototype.hasOwnProperty},function(t,e){t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,n=void 0!==t.start?t.start:Math.floor(Math.random()*e);return function(){return n%=e,n++}}},function(t,e,n){const r=n(176),i=n(65);var o="object"==typeof Reflect?Reflect:null,a=o&&"function"==typeof o.apply?o.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};function s(){i.call(this)}function u(t,e,n){try{a(t,e,n)}catch(t){setTimeout((()=>{throw t}))}}t.exports=s,r.inherits(s,i),s.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[t];if(void 0===s)return!1;if("function"==typeof s)u(s,this,e);else{var c=s.length,l=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}(s,c);for(n=0;n<c;++n)u(l[n],this,e)}return!0}},function(t,e,n){(function(t){var r=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},i=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(s(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(t).replace(i,(function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){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 t}})),u=r[n];n<o;u=r[++n])m(u)||!v(u)?a+=" "+u:a+=" "+s(u);return a},e.deprecate=function(n,r){if(void 0!==t&&!0===t.noDeprecation)return n;if(void 0===t)return function(){return e.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var o,a={};function s(t,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&&e._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,t,r.depth)}function u(t,e){var n=s.styles[e];return n?"["+s.colors[n][0]+"m"+t+"["+s.colors[n][1]+"m":t}function c(t,e){return t}function l(t,n,r){if(t.customInspect&&n&&_(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return y(i)||(i=l(t,i,r)),i}var o=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(y(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return g(e)?t.stylize(""+e,"number"):p(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}(t,n);if(o)return o;var a=Object.keys(n),s=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),L(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(n);if(0===a.length){if(_(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(M(n))return t.stylize(Date.prototype.toString.call(n),"date");if(L(n))return h(n)}var c,v="",N=!1,E=["{","}"];return f(n)&&(N=!0,E=["[","]"]),_(n)&&(v=" [Function"+(n.name?": "+n.name:"")+"]"),w(n)&&(v=" "+RegExp.prototype.toString.call(n)),M(n)&&(v=" "+Date.prototype.toUTCString.call(n)),L(n)&&(v=" "+h(n)),0!==a.length||N&&0!=n.length?r<0?w(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=N?function(t,e,n,r,i){for(var o=[],a=0,s=e.length;a<s;++a)x(e,String(a))?o.push(d(t,e,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(d(t,e,n,r,i,!0))})),o}(t,n,r,s,a):a.map((function(e){return d(t,n,r,s,e,N)})),t.seen.pop(),function(t,e,n){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}(c,v,E)):E[0]+v+E[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),x(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=m(n)?l(t,u.value,null):l(t,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function f(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function m(t){return null===t}function g(t){return"number"==typeof t}function y(t){return"string"==typeof t}function b(t){return void 0===t}function w(t){return v(t)&&"[object RegExp]"===N(t)}function v(t){return"object"==typeof t&&null!==t}function M(t){return v(t)&&"[object Date]"===N(t)}function L(t){return v(t)&&("[object Error]"===N(t)||t instanceof Error)}function _(t){return"function"==typeof t}function N(t){return Object.prototype.toString.call(t)}function E(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(b(o)&&(o=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=t.pid;a[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else a[n]=function(){};return a[n]},e.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=f,e.isBoolean=p,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=y,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=w,e.isObject=v,e.isDate=M,e.isError=L,e.isFunction=_,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(177);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function x(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",function(){var t=new Date,e=[E(t.getHours()),E(t.getMinutes()),E(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}(),e.format.apply(e,arguments))},e.inherits=n(178),e._extend=function(t,e){if(!e||!v(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var A="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function I(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(A&&t[A]){var e;if("function"!=typeof(e=t[A]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,A,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise((function(t,r){e=t,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,r){t?n(t):e(r)}));try{t.apply(this,i)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),A&&Object.defineProperty(e,A,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=A,e.callbackify=function(e){if("function"!=typeof e)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,a=function(){return i.apply(o,arguments)};e.apply(this,n).then((function(e){t.nextTick(a,null,e)}),(function(e){t.nextTick(I,e,a)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(40))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){const r=n(64).default,i=n(119),{createAsyncMiddleware:o}=n(120),a=n(187),{unsafeRandomBytes:s,incrementHexInt:u}=n(60),c=n(98);function l(t){return{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}t.exports=function({blockTracker:t,provider:e}){const n={},h=a({blockTracker:t,provider:e});let d=!1;const f=new r,p=i({eth_subscribe:o((async function(r,i){if(d)throw new Error("SubscriptionManager - attempting to use after destroying");const o=r.params[0],a=s(16);let f;switch(o){case"newHeads":f=function({subId:n}){const r={type:o,destroy:async()=>{t.removeListener("sync",r.update)},update:async({oldBlock:t,newBlock:r})=>{const i=r,o=u(t);(await c({provider:e,fromBlock:o,toBlock:i})).map(l).forEach((t=>{m(n,t)}))}};return t.on("sync",r.update),r}({subId:a});break;case"logs":const n=r.params[1];f=function({subId:t,filter:e}){return e.on("update",(e=>m(t,e))),{type:o,destroy:async()=>await h.uninstallFilter(e.idHex)}}({subId:a,filter:await h.newLogFilter(n)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${o}"`)}return n[a]=f,void(i.result=a)})),eth_unsubscribe:o((async function(t,e){if(d)throw new Error("SubscriptionManager - attempting to use after destroying");const r=t.params[0],i=n[r];i?(delete n[r],await i.destroy(),e.result=!0):e.result=!1}))});return p.destroy=function(){f.removeAllListeners();for(const t in n)n[t].destroy(),delete n[t];d=!0},{events:f,middleware:p};function m(t,e){f.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t,result:e}})}}},function(t,e){t.exports=function(t){return(e,n,r,i)=>{const o=t[e.method];return void 0===o?r():"function"==typeof o?o(e,n,r,i):(n.result=o,i())}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.createIdRemapMiddleware=void 0;const r=n(121);e.createIdRemapMiddleware=function(){return(t,e,n,i)=>{const o=t.id,a=r.getUniqueId();t.id=a,e.id=a,n((n=>{t.id=o,e.id=o,n()}))}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(t){return async(e,n,r,i)=>{let o;const a=new Promise((t=>{o=t}));let s=null,u=!1;const c=async()=>{u=!0,r((t=>{s=t,o()})),await a};try{await t(e,n,c),u?(await a,s(null)):i(null)}catch(t){s?s(t):i(t)}}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(t){return(e,n,r,i)=>{const o=t[e.method];return void 0===o?r():"function"==typeof o?o(e,n,r,i):(n.result=o,i())}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const r=n(95);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return r.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});const i=n(123);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=n(185);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const a=n(96);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(95),i=n(123),o=n(96);function a(t,e){const[n,o]=u(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),o)}function s(t,e){const[n,o]=u(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),o)}function u(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){const{message:e,data:n}=t;if(e&&"string"!=typeof e)throw new Error("Must specify string message.");return[e||void 0,n]}}return[]}e.ethErrors={rpc:{parse:t=>a(o.errorCodes.rpc.parse,t),invalidRequest:t=>a(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>a(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>a(o.errorCodes.rpc.methodNotFound,t),internal:t=>a(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(e,t)},invalidInput:t=>a(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>a(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>a(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>a(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>a(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>a(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>s(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>s(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>s(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>s(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>s(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:n,data:i}=t;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(e,n,i)}}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;const r=n(122);e.mergeMiddleware=function(t){const e=new r.JsonRpcEngine;return t.forEach((t=>e.push(t))),e.asMiddleware()}},function(t,e,n){const r=n(224).Mutex,{createAsyncMiddleware:i}=n(120),o=n(119),a=n(188),s=n(191),u=n(192),{intToHex:c,hexToInt:l}=n(60);function h(t){return d((async(...e)=>{const n=await t(...e);return c(n.id)}))}function d(t){return i((async(e,n)=>{const r=await t.apply(null,e.params);n.result=r}))}function f(t,e){const n=[];for(let e in t)n.push(t[e]);return n}t.exports=function({blockTracker:t,provider:e}){let n=0,i={};const p=new r,m=function({mutex:t}){return e=>async(n,r,i,o)=>{(await t.acquire())(),e(n,r,i,o)}}({mutex:p}),g=o({eth_newFilter:m(h(b)),eth_newBlockFilter:m(h(w)),eth_newPendingTransactionFilter:m(h(v)),eth_uninstallFilter:m(d(_)),eth_getFilterChanges:m(d(M)),eth_getFilterLogs:m(d(L))}),y=async({oldBlock:t,newBlock:e})=>{if(0===i.length)return;const n=await p.acquire();try{await Promise.all(f(i).map((async n=>{try{await n.update({oldBlock:t,newBlock:e})}catch(t){console.error(t)}})))}catch(t){console.error(t)}n()};return g.newLogFilter=b,g.newBlockFilter=w,g.newPendingTransactionFilter=v,g.uninstallFilter=_,g.getFilterChanges=M,g.getFilterLogs=L,g.destroy=()=>{!async function(){const t=f(i).length;i={},E({prevFilterCount:t,newFilterCount:0})}()},g;async function b(t){const n=new a({provider:e,params:t});return await N(n),n}async function w(){const t=new s({provider:e});return await N(t),t}async function v(){const t=new u({provider:e});return await N(t),t}async function M(t){const e=l(t),n=i[e];if(!n)throw new Error(`No filter for index "${e}"`);return n.getChangesAndClear()}async function L(t){const e=l(t),n=i[e];if(!n)throw new Error(`No filter for index "${e}"`);return"log"===n.type?results=n.getAllResults():results=[],results}async function _(t){const e=l(t),n=i[e],r=Boolean(n);return r&&await async function(t){const e=f(i).length;delete i[t];E({prevFilterCount:e,newFilterCount:f(i).length})}(e),r}async function N(e){const r=f(i).length,o=await t.getLatestBlock();return await e.initialize({currentBlock:o}),n++,i[n]=e,e.id=n,e.idHex=c(n),E({prevFilterCount:r,newFilterCount:f(i).length}),n}function E({prevFilterCount:e,newFilterCount:n}){0===e&&n>0?t.on("sync",y):e>0&&0===n&&t.removeListener("sync",y)}}},function(t,e,n){const r=n(118),i=n(189),o=n(190),{bnToHex:a,hexToInt:s,incrementHexInt:u,minBlockRef:c,blockRefIsNumber:l}=n(60);t.exports=class extends o{constructor({provider:t,params:e}){super(),this.type="log",this.ethQuery=new r(t),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},e),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map((t=>t.toLowerCase())))}async initialize({currentBlock:t}){let e=this.params.fromBlock;["latest","pending"].includes(e)&&(e=t),"earliest"===e&&(e="0x0"),this.params.fromBlock=e;const n=c(this.params.toBlock,t),r=Object.assign({},this.params,{toBlock:n}),i=await this._fetchLogs(r);this.addInitialResults(i)}async update({oldBlock:t,newBlock:e}){const n=e;let r;r=t?u(t):e;const i=Object.assign({},this.params,{fromBlock:r,toBlock:n}),o=(await this._fetchLogs(i)).filter((t=>this.matchLog(t)));this.addResults(o)}async _fetchLogs(t){return await i((e=>this.ethQuery.getLogs(t,e)))()}matchLog(t){if(s(this.params.fromBlock)>=s(t.blockNumber))return!1;if(l(this.params.toBlock)&&s(this.params.toBlock)<=s(t.blockNumber))return!1;const e=t.address&&t.address.toLowerCase();return!(this.params.address&&e&&!this.params.address.includes(e))&&this.params.topics.every(((e,n)=>{let r=t.topics[n];if(!r)return!1;r=r.toLowerCase();let i=Array.isArray(e)?e:[e];return!!i.includes(null)||(i=i.map((t=>t.toLowerCase())),i.includes(r))}))}}},function(t,e,n){const r=(t,e,n,r)=>function(...i){return new e.promiseModule(((o,a)=>{e.multiArgs?i.push(((...t)=>{e.errorFirst?t[0]?a(t):(t.shift(),o(t)):o(t)})):e.errorFirst?i.push(((t,e)=>{t?a(t):o(e)})):i.push(o);const s=this===n?r:this;Reflect.apply(t,s,i)}))},i=new WeakMap;t.exports=(t,e)=>{e={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...e};const n=typeof t;if(null===t||"object"!==n&&"function"!==n)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===t?"null":n}\``);const o=new WeakMap,a=new Proxy(t,{apply(t,n,i){const s=o.get(t);if(s)return Reflect.apply(s,n,i);const u=e.excludeMain?t:r(t,e,a,t);return o.set(t,u),Reflect.apply(u,n,i)},get(t,n){const s=t[n];if(!((t,n)=>{let r=i.get(t);if(r||(r={},i.set(t,r)),n in r)return r[n];const o=t=>"string"==typeof t||"symbol"==typeof n?n===t:t.test(n),a=Reflect.getOwnPropertyDescriptor(t,n),s=void 0===a||a.writable||a.configurable,u=(e.include?e.include.some(o):!e.exclude.some(o))&&s;return r[n]=u,u})(t,n)||s===Function.prototype[n])return s;const u=o.get(s);if(u)return u;if("function"==typeof s){const n=r(s,e,a,t);return o.set(s,n),n}return s}});return a}},function(t,e,n){const r=n(97);t.exports=class extends r{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(t){this.allResults=this.allResults.concat(t),super.addResults(t)}addInitialResults(t){this.allResults=this.allResults.concat(t),super.addInitialResults(t)}getAllResults(){return this.allResults}}},function(t,e,n){const r=n(97),i=n(98),{incrementHexInt:o}=n(60);t.exports=class extends r{constructor({provider:t,params:e}){super(),this.type="block",this.provider=t}async update({oldBlock:t,newBlock:e}){const n=e,r=o(t),a=(await i({provider:this.provider,fromBlock:r,toBlock:n})).map((t=>t.hash));this.addResults(a)}}},function(t,e,n){const r=n(97),i=n(98),{incrementHexInt:o}=n(60);t.exports=class extends r{constructor({provider:t}){super(),this.type="tx",this.provider=t}async update({oldBlock:t}){const e=t,n=o(t),r=await i({provider:this.provider,fromBlock:n,toBlock:e}),a=[];for(const t of r)a.push(...t.transactions);this.addResults(a)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKUI=void 0;const r=n(194),i=n(206),o=n(208);e.WalletSDKUI=class{constructor(t){this.standalone=null,this.attached=!1,this.snackbar=new i.Snackbar({darkMode:t.darkMode}),this.linkFlow=new r.LinkFlow({darkMode:t.darkMode,version:t.version,sessionId:t.session.id,sessionSecret:t.session.secret,linkAPIUrl:t.linkAPIUrl,connected$:t.connected$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const t=document.documentElement,e=document.createElement("div");e.className="-cbwsdk-css-reset",t.appendChild(e),this.linkFlow.attach(e),this.snackbar.attach(e),this.attached=!0,(0,o.injectCssReset)()}setConnectDisabled(t){this.linkFlow.setConnectDisabled(t)}addEthereumChain(t){}watchAsset(t){}switchEthereumChain(t){}requestEthereumAccounts(t){this.linkFlow.open({onCancel:t.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(t){}signEthereumTransaction(t){}submitEthereumTransaction(t){}ethereumAddressFromSignedMessage(t){}showConnecting(t){let e;return e=t.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:t.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:t.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:t.onResetConnection}]},this.snackbar.presentItem(e)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(t){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(t){this.standalone=t}isStandalone(){var t;return null!==(t=this.standalone)&&void 0!==t&&t}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkFlow=void 0;const r=n(8),i=n(48),o=n(195);e.LinkFlow=class{constructor(t){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=t.darkMode,this.version=t.version,this.sessionId=t.sessionId,this.sessionSecret=t.sessionSecret,this.linkAPIUrl=t.linkAPIUrl,this.isParentConnection=t.isParentConnection,this.connected$=t.connected$}attach(t){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",t.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe((t=>{this.isConnected!==t&&(this.isConnected=t,this.render())})))}detach(){var t;this.root&&(this.subscriptions.unsubscribe(),(0,r.render)(null,this.root),null===(t=this.root.parentElement)||void 0===t||t.removeChild(this.root))}setConnectDisabled(t){this.connectDisabled=t}open(t){this.isOpen=!0,this.onCancel=t.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){if(!this.root)return;const t=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(t)}}},function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.TryExtensionLinkDialog=void 0;const i=r(n(124)),o=n(8),a=n(99),s=n(38),u=n(196),c=r(n(197)),l=r(n(198)),h=r(n(199)),d=r(n(200)),f=n(201),p=n(203),m=r(n(205));e.TryExtensionLinkDialog=t=>{const{isOpen:e,darkMode:n}=t,[r,s]=(0,a.useState)(!e),[u,c]=(0,a.useState)(!e);(0,a.useEffect)((()=>{const t=[window.setTimeout((()=>{c(!e)}),10)];return e?s(!1):t.push(window.setTimeout((()=>{s(!0)}),360)),()=>{t.forEach(window.clearTimeout)}}),[t.isOpen]);const l=n?"dark":"light";return(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-container",r&&"-cbwsdk-extension-dialog-container-hidden")},(0,o.h)("style",null,m.default),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-backdrop",l,u&&"-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",u&&"-cbwsdk-extension-dialog-box-hidden")},(0,o.h)(g,{darkMode:n,onInstallClick:()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}}),t.connectDisabled?null:(0,o.h)(y,{darkMode:n,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,linkAPIUrl:t.linkAPIUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection}),t.onCancel&&(0,o.h)(w,{darkMode:n,onClick:t.onCancel}))))};const g=({darkMode:t,onInstallClick:e})=>{const[n,r]=(0,a.useState)(!1),s=(0,a.useCallback)((()=>{n?window.location.reload():(e(),r(!0))}),[e,n]),u=t?"dark":"light";return(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box-top",u)},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-install-region"},(0,o.h)("h2",{class:u},"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:s},n?"Refresh":"Install")),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box-top-info-region",u)},(0,o.h)(b,{darkMode:t,icon:l.default,text:"Connect to crypto apps with one click"}),(0,o.h)(b,{darkMode:t,icon:h.default,text:"Your private key is stored securely"}),(0,o.h)(b,{darkMode:t,icon:c.default,text:"Works with Ethereum, Polygon, and more"})))},y=t=>{const e=(0,s.createQrUrl)(t.sessionId,t.sessionSecret,t.linkAPIUrl,t.isParentConnection),n=t.darkMode?"dark":"light";return(0,o.h)("div",{"data-testid":"scan-qr-box",class:(0,i.default)("-cbwsdk-extension-dialog-box-bottom",n)},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-description-region"},(0,o.h)("h2",{class:n},"Or scan to connect"),(0,o.h)("body",{class:(0,i.default)("-cbwsdk-extension-dialog-box-bottom-description",n)},"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:e,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:e}),!t.isConnected&&(0,o.h)("div",{"data-testid":"connecting-spinner",class:(0,i.default)("-cbwsdk-extension-dialog-box-bottom-qr-connecting",n)},(0,o.h)(p.Spinner,{size:36,color:t.darkMode?"#FFF":"#000"}),(0,o.h)("p",null,"Connecting..."))))},b=t=>{const e=t.darkMode?"dark":"light";return(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:t.icon})),(0,o.h)("body",{class:(0,i.default)("-cbwsdk-extension-dialog-box-top-description-text",e)},t.text))},w=t=>{const e=t.darkMode?"dark":"light";return(0,o.h)("button",{type:"button",class:(0,i.default)("-cbwsdk-extension-dialog-box-cancel",e),onClick:t.onClick},(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box-cancel-x",e)}))}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.LIB_VERSION=void 0,e.LIB_VERSION="3.4.0"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOHMzLjU4IDggOCA4IDgtMy41OCA4LTgtMy41OC04LTgtOFptNS45MSA3aC0xLjk0Yy0uMS0xLjU3LS40Mi0zLS45MS00LjE1IDEuNDguODggMi41NSAyLjM4IDIuODUgNC4xNVpNOCAxNGMtLjQ1IDAtMS43Mi0xLjc3LTEuOTUtNWgzLjljLS4yMyAzL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cGF0aCBkPSJNMTEuMjcxIDcuNzQ1YTMuMTMgMy4xMyAwIDAgMC0uNTU0LS42OWwtLjYyLS42MjQtMS4xNDIgMS4xNDYuNjIxLjYyM2MuMjE4LjIyLjM4Ni40ODkuNDg3Ljc1OC4zMzUuODI2LjE2NyAxLjgyLS41MDQgMi40OTRsLTMuMjA1IDMuMjE5YTIuMjkzIDIuMjkzIDAgMCAxLTMuMjQgMCAyLjMxNiAyLjMxNiAwIDAgMSAwLTMuMjUybDEuNTI4LTEuNTM0YTQuODE1IDQuODE1IDAgMCAxLS4yODUtMi4wMDVsLTIuMzgzIDIuMzkzYTMuOTI3IDMuOTI3IDAgMCAwIDAgNS41NDQgMy45MDkgMy45MDkgMCAwIDAgNS41MzggMGwzLjIwNS0zLjIxOWEzLjk1OCAzLjk1OCAwIDAgMCAxLjA5MS0zLjQwNCA0LjIxMSA0LjIxMSAwIDAgMC0uNTM3LTEuNDQ5WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgN3Y5aDE0VjdIMVptNy41IDQuMzlWMTRoLTF2LTIuNjFjLS40NC0uMTktLjc1LS42My0uNzUtMS4xNGExLjI1IDEuMjUgMCAwIDEgMi41IDBjMCAuNTEtLjMxLjk1LS43NSAxLjE0Wk01LjY3IDZWNC4zM0M1LjY3IDMuMDUgNi43MSAyIDggMnMyLjMzIDEuMDUgMi4zMyAyLjMzVjZoMlY0LjMzQzEyLjMzIDEuOTQgMTAuMzkgMCA4IDBTMy42NyAxLjk0IDMuNjcgNC4zM1Y2aDJaIiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.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'},function(t,e,n){(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.QRCode=void 0;const i=n(8),o=n(99),a=r(n(202));e.QRCode=e=>{const[n,r]=(0,o.useState)("");return(0,o.useEffect)((()=>{var n,i;const o=new a.default({content:e.content,background:e.bgColor||"#ffffff",color:e.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(n=e.width)&&void 0!==n?n:256,height:null!==(i=e.height)&&void 0!==i?i:256,padding:0,image:e.image}),s=t.from(o.svg(),"utf8").toString("base64");r("data:image/svg+xml;base64,"+s)})),n?(0,i.h)("img",{src:n,alt:"QR Code"}):null}}).call(this,n(19).Buffer)},function(t,e){function n(t){this.mode=i.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,n=this.data.length;e<n;e++){var r=[],o=this.data.charCodeAt(e);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(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}n.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,n=this.parsedData.length;e<n;e++)t.put(this.parsedData[e],8)}},r.prototype={addData:function(t){var e=new n(t);this.dataList.push(e),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,e){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(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=r.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(var r=-1;r<=7;r++)e+r<=-1||this.moduleCount<=e+r||(this.modules[t+n][e+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 t=0,e=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=o.getLostPoint(this);(0==n||t>r)&&(t=r,e=n)}return e},createMovieClip:function(t,e,n){var r=t.createEmptyMovieClip(e,n);this.make();for(var i=0;i<this.modules.length;i++)for(var o=1*i,a=0;a<this.modules[i].length;a++){var s=1*a;this.modules[i][a]&&(r.beginFill(0,100),r.moveTo(s,o),r.lineTo(s+1,o),r.lineTo(s+1,o+1),r.lineTo(s,o+1),r.endFill())}return r},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=o.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var n=0;n<t.length;n++){var r=t[e],i=t[n];if(null==this.modules[r][i])for(var a=-2;a<=2;a++)for(var s=-2;s<=2;s++)this.modules[r+a][i+s]=-2==a||2==a||-2==s||2==s||0==a&&0==s}},setupTypeNumber:function(t){for(var e=o.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!t&&1==(e>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++)r=!t&&1==(e>>n&1),this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r},setupTypeInfo:function(t,e){for(var n=this.errorCorrectLevel<<3|e,r=o.getBCHTypeInfo(n),i=0;i<15;i++){var a=!t&&1==(r>>i&1);i<6?this.modules[i][8]=a:i<8?this.modules[i+1][8]=a:this.modules[this.moduleCount-15+i][8]=a}for(i=0;i<15;i++)a=!t&&1==(r>>i&1),i<8?this.modules[8][this.moduleCount-i-1]=a:i<9?this.modules[8][15-i-1+1]=a:this.modules[8][15-i-1]=a;this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var n=-1,r=this.moduleCount-1,i=7,a=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var u=0;u<2;u++)if(null==this.modules[r][s-u]){var c=!1;a<t.length&&(c=1==(t[a]>>>i&1)),o.getMask(e,r,s-u)&&(c=!c),this.modules[r][s-u]=c,-1==--i&&(a++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}}},r.PAD0=236,r.PAD1=17,r.createData=function(t,e,n){for(var i=c.getRSBlocks(t,e),a=new l,s=0;s<n.length;s++){var u=n[s];a.put(u.mode,4),a.put(u.getLength(),o.getLengthInBits(u.mode,t)),u.write(a)}var h=0;for(s=0;s<i.length;s++)h+=i[s].dataCount;if(a.getLengthInBits()>8*h)throw new Error("code length overflow. ("+a.getLengthInBits()+">"+8*h+")");for(a.getLengthInBits()+4<=8*h&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(!1);for(;!(a.getLengthInBits()>=8*h||(a.put(r.PAD0,8),a.getLengthInBits()>=8*h));)a.put(r.PAD1,8);return r.createBytes(a,i)},r.createBytes=function(t,e){for(var n=0,r=0,i=0,a=new Array(e.length),s=new Array(e.length),c=0;c<e.length;c++){var l=e[c].dataCount,h=e[c].totalCount-l;r=Math.max(r,l),i=Math.max(i,h),a[c]=new Array(l);for(var d=0;d<a[c].length;d++)a[c][d]=255&t.buffer[d+n];n+=l;var f=o.getErrorCorrectPolynomial(h),p=new u(a[c],f.getLength()-1).mod(f);for(s[c]=new Array(f.getLength()-1),d=0;d<s[c].length;d++){var m=d+p.getLength()-s[c].length;s[c][d]=m>=0?p.get(m):0}}var g=0;for(d=0;d<e.length;d++)g+=e[d].totalCount;var y=new Array(g),b=0;for(d=0;d<r;d++)for(c=0;c<e.length;c++)d<a[c].length&&(y[b++]=a[c][d]);for(d=0;d<i;d++)for(c=0;c<e.length;c++)d<s[c].length&&(y[b++]=s[c][d]);return y};for(var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},o={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(t){for(var e=t<<10;o.getBCHDigit(e)-o.getBCHDigit(o.G15)>=0;)e^=o.G15<<o.getBCHDigit(e)-o.getBCHDigit(o.G15);return(t<<10|e)^o.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;o.getBCHDigit(e)-o.getBCHDigit(o.G18)>=0;)e^=o.G18<<o.getBCHDigit(e)-o.getBCHDigit(o.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return o.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case 0:return(e+n)%2==0;case 1:return e%2==0;case 2:return n%3==0;case 3:return(e+n)%3==0;case 4:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case 5:return e*n%2+e*n%3==0;case 6:return(e*n%2+e*n%3)%2==0;case 7:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new u([1],0),n=0;n<t;n++)e=e.multiply(new u([1,a.gexp(n)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){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:"+t)}else if(e<27)switch(t){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:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){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:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),n=0,r=0;r<e;r++)for(var i=0;i<e;i++){for(var o=0,a=t.isDark(r,i),s=-1;s<=1;s++)if(!(r+s<0||e<=r+s))for(var u=-1;u<=1;u++)i+u<0||e<=i+u||0==s&&0==u||a==t.isDark(r+s,i+u)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<e-1;r++)for(i=0;i<e-1;i++){var c=0;t.isDark(r,i)&&c++,t.isDark(r+1,i)&&c++,t.isDark(r,i+1)&&c++,t.isDark(r+1,i+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<e;r++)for(i=0;i<e-6;i++)t.isDark(r,i)&&!t.isDark(r,i+1)&&t.isDark(r,i+2)&&t.isDark(r,i+3)&&t.isDark(r,i+4)&&!t.isDark(r,i+5)&&t.isDark(r,i+6)&&(n+=40);for(i=0;i<e;i++)for(r=0;r<e-6;r++)t.isDark(r,i)&&!t.isDark(r+1,i)&&t.isDark(r+2,i)&&t.isDark(r+3,i)&&t.isDark(r+4,i)&&!t.isDark(r+5,i)&&t.isDark(r+6,i)&&(n+=40);var l=0;for(i=0;i<e;i++)for(r=0;r<e;r++)t.isDark(r,i)&&l++;return n+Math.abs(100*l/e/e-50)/5*10}},a={glog:function(t){if(t<1)throw new Error("glog("+t+")");return a.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return a.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},s=0;s<8;s++)a.EXP_TABLE[s]=1<<s;for(s=8;s<256;s++)a.EXP_TABLE[s]=a.EXP_TABLE[s-4]^a.EXP_TABLE[s-5]^a.EXP_TABLE[s-6]^a.EXP_TABLE[s-8];for(s=0;s<255;s++)a.LOG_TABLE[a.EXP_TABLE[s]]=s;function u(t,e){if(null==t.length)throw new Error(t.length+"/"+e);for(var n=0;n<t.length&&0==t[n];)n++;this.num=new Array(t.length-n+e);for(var r=0;r<t.length-n;r++)this.num[r]=t[r+n]}function c(t,e){this.totalCount=t,this.dataCount=e}function l(){this.buffer=[],this.length=0}u.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),n=0;n<this.getLength();n++)for(var r=0;r<t.getLength();r++)e[n+r]^=a.gexp(a.glog(this.get(n))+a.glog(t.get(r)));return new u(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=a.glog(this.get(0))-a.glog(t.get(0)),n=new Array(this.getLength()),r=0;r<this.getLength();r++)n[r]=this.get(r);for(r=0;r<t.getLength();r++)n[r]^=a.gexp(a.glog(t.get(r))+e);return new u(n,0).mod(t)}},c.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]],c.getRSBlocks=function(t,e){var n=c.getRsBlockTable(t,e);if(null==n)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var r=n.length/3,i=[],o=0;o<r;o++)for(var a=n[3*o+0],s=n[3*o+1],u=n[3*o+2],l=0;l<a;l++)i.push(new c(s,u));return i},c.getRsBlockTable=function(t,e){switch(e){case 1:return c.RS_BLOCK_TABLE[4*(t-1)+0];case 0:return c.RS_BLOCK_TABLE[4*(t-1)+1];case 3:return c.RS_BLOCK_TABLE[4*(t-1)+2];case 2:return c.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},l.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var h=[[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 d(t){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 t&&(t={content:t}),t)for(var e in t)this.options[e]=t[e];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(t,e){for(var n=function(t){var e=encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return e.length+(e.length!=t?3:0)}(t),r=1,i=0,o=0,a=h.length;o<=a;o++){var s=h[o];if(!s)throw new Error("Content too long: expected "+i+" but got "+n);switch(e){case"L":i=s[0];break;case"M":i=s[1];break;case"Q":i=s[2];break;case"H":i=s[3];break;default:throw new Error("Unknwon error correction level: "+e)}if(n<=i)break;r++}if(r>h.length)throw new Error("Content too long");return r}(n,this.options.ecl),o=function(t){switch(t){case"L":return 1;case"M":return 0;case"Q":return 3;case"H":return 2;default:throw new Error("Unknwon error correction level: "+t)}}(this.options.ecl);this.qrcode=new r(i,o),this.qrcode.addData(n),this.qrcode.make()}d.prototype.svg=function(t){var e=this.options||{},n=this.qrcode.modules;void 0===t&&(t={container:e.container||"svg"});for(var r=void 0===e.pretty||!!e.pretty,i=r?" ":"",o=r?"\r\n":"",a=e.width,s=e.height,u=n.length,c=a/(u+2*e.padding),l=s/(u+2*e.padding),h=void 0!==e.join&&!!e.join,d=void 0!==e.swap&&!!e.swap,f=void 0===e.xmlDeclaration||!!e.xmlDeclaration,p=void 0!==e.predefined&&!!e.predefined,m=p?i+'<defs><path id="qrmodule" d="M0 0 h'+l+" v"+c+' H0 z" style="fill:'+e.color+';shape-rendering:crispEdges;" /></defs>'+o:"",g=i+'<rect x="0" y="0" width="'+a+'" height="'+s+'" style="fill:'+e.background+';shape-rendering:crispEdges;"/>'+o,y="",b="",w=0;w<u;w++)for(var v=0;v<u;v++)if(n[v][w]){var M=v*c+e.padding*c,L=w*l+e.padding*l;if(d){var _=M;M=L,L=_}if(h){var N=c+M,E=l+L;M=Number.isInteger(M)?Number(M):M.toFixed(2),L=Number.isInteger(L)?Number(L):L.toFixed(2),N=Number.isInteger(N)?Number(N):N.toFixed(2),b+="M"+M+","+L+" V"+(E=Number.isInteger(E)?Number(E):E.toFixed(2))+" H"+N+" V"+L+" H"+M+" Z "}else y+=p?i+'<use x="'+M.toString()+'" y="'+L.toString()+'" href="#qrmodule" />'+o:i+'<rect x="'+M.toString()+'" y="'+L.toString()+'" width="'+c+'" height="'+l+'" style="fill:'+e.color+';shape-rendering:crispEdges;"/>'+o}h&&(y=i+'<path x="0" y="0" style="fill:'+e.color+';shape-rendering:crispEdges;" d="'+b+'" />');let S="";if(void 0!==this.options.image&&this.options.image.svg){const t=a*this.options.image.width/100,e=s*this.options.image.height/100;S+=`<svg x="${a/2-t/2}" y="${s/2-e/2}" width="${t}" height="${e}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,S+=this.options.image.svg+o,S+="</svg>"}var x="";switch(t.container){case"svg":f&&(x+='<?xml version="1.0" standalone="yes"?>'+o),x+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+a+'" height="'+s+'">'+o,x+=m+g+y,x+=S,x+="</svg>";break;case"svg-viewbox":f&&(x+='<?xml version="1.0" standalone="yes"?>'+o),x+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+a+" "+s+'">'+o,x+=m+g+y,x+=S,x+="</svg>";break;case"g":x+='<g width="'+a+'" height="'+s+'">'+o,x+=m+g+y,x+=S,x+="</g>";break;default:x+=(m+g+y+S).replace(/^\s+/,"")}return x},t.exports=d},function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Spinner=void 0;const i=n(8),o=r(n(204));e.Spinner=t=>{var e;const n=null!==(e=t.size)&&void 0!==e?e:64,r=t.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}})))}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.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)}}"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.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;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-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;border-radius:8px;overflow:hidden;min-height:300px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top.dark{color:#fff;background-color:#000;box-shadow:0 4px 16px rgba(255,255,255,.05)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top.light{background-color:#fff}.-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-install-region button.dark{background-color:#3773f5}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region.light{background-color:#fafbfc}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region.dark{background-color:#141519}.-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;align-self:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-text.light{color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-text.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom{display:flex;flex-direction:row;overflow:hidden;border-radius:8px;margin-top:8px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom.light{background-color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom.dark{background-color:#000;box-shadow:0 4px 16px rgba(255,255,255,.05)}.-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.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description.dark a{color:#3773f5}.-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);background-color:#fff}.-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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.light>p{color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.dark{background-color:rgba(20,21,25,.9)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting>p{font-size:12px;font-weight:bold;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;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel.light{background-color:#fafbfc}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel.dark{background-color:#141519}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.light::before,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.light::after{background-color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.dark::before,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.dark::after{background-color:#fff}.-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;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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog h2.light{color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog h2.dark{color:#fff}'},function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;const i=r(n(124)),o=n(8),a=n(99),s=r(n(207));e.Snackbar=class{constructor(t){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=t.darkMode}attach(t){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",t.appendChild(this.root),this.render()}presentItem(t){const e=this.nextItemKey++;return this.items.set(e,t),this.render(),()=>{this.items.delete(e),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,o.render)((0,o.h)("div",null,(0,o.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((([t,n])=>(0,o.h)(e.SnackbarInstance,Object.assign({},n,{key:t})))))),this.root)}},e.SnackbarContainer=t=>(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-container")},(0,o.h)("style",null,s.default),(0,o.h)("div",{class:"-cbwsdk-snackbar"},t.children)),e.SnackbarInstance=({autoExpand:t,message:e,menuItems:n})=>{const[r,s]=(0,a.useState)(!0),[u,c]=(0,a.useState)(null!=t&&t);return(0,a.useEffect)((()=>{const t=[window.setTimeout((()=>{s(!1)}),1),window.setTimeout((()=>{c(!0)}),1e4)];return()=>{t.forEach(window.clearTimeout)}})),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance",r&&"-cbwsdk-snackbar-instance-hidden",u&&"-cbwsdk-snackbar-instance-expanded")},(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{c(!u)}},(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"},e),(0,o.h)("div",{class:"-gear-container"},!u&&(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"}))),n&&n.length>0&&(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},n.map(((t,e)=>(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item",t.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:t.onClick,key:e},(0,o.h)("svg",{width:t.svgWidth,height:t.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":t.defaultFillRule,"clip-rule":t.defaultClipRule,d:t.path,fill:"#AAAAAA"})),(0,o.h)("span",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item-info",t.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},t.info))))))}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.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}"},function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.injectCssReset=void 0;const i=r(n(209));e.injectCssReset=function(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(t)}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.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}'},function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelay=void 0;const u=s(n(211)),c=n(86),l=n(48),h=n(69),d=n(89),f=n(212),p=n(216),m=n(68),g=n(38),y=a(n(217)),b=n(90),w=n(107),v=n(125),M=n(218),L=n(219),_=n(220),N=n(221);class E extends w.WalletSDKRelayAbstract{constructor(t){var e;super(),this.accountsCallback=null,this.chainCallback=null,this.appName="",this.appLogoUrl=null,this.subscriptions=new l.Subscription,this.linkAPIUrl=t.linkAPIUrl,this.storage=t.storage,this.options=t;const{session:n,ui:r,connection:i}=this.subscribe();if(this._session=n,this.connection=i,this.relayEventManager=t.relayEventManager,t.diagnosticLogger&&t.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");t.eventListener?this.diagnostic={log:t.eventListener.onEvent}:this.diagnostic=t.diagnosticLogger,this._reloadOnDisconnect=null===(e=t.reloadOnDisconnect)||void 0===e||e,this.ui=r}subscribe(){const t=b.Session.load(this.storage)||new b.Session(this.storage).save(),e=new f.WalletSDKConnection(t.id,t.key,this.linkAPIUrl,this.diagnostic);this.subscriptions.add(e.sessionConfig$.subscribe({next:t=>{this.onSessionConfigChanged(t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),this.subscriptions.add(e.incomingEvent$.pipe((0,h.filter)((t=>"Web3Response"===t.event))).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(e.linked$.pipe((0,h.skip)(1),(0,h.tap)((t=>{var e;this.isLinked=t;const n=this.storage.getItem(w.LOCAL_STORAGE_ADDRESSES_KEY);if(t&&(this.session.linked=t),this.isUnlinkedErrorState=!1,n){const r=n.split(" "),i="true"===this.storage.getItem("IsStandaloneSigning");if(""!==r[0]&&!t&&this.session.linked&&!i){this.isUnlinkedErrorState=!0;const t=this.getSessionIdHash();null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:t})}}}))).subscribe()),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>!!t.metadata&&"1"===t.metadata.__destroyed))).subscribe((()=>{var t;const n=e.isDestroyed;return null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:n,sessionIdHash:this.getSessionIdHash()}),this.resetAndReload()}))),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.WalletUsername))).pipe((0,h.mergeMap)((e=>y.decrypt(e.metadata.WalletUsername,t.secret)))).subscribe({next:t=>{this.storage.setItem(w.WALLET_USER_NAME_KEY,t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.AppVersion))).pipe((0,h.mergeMap)((e=>y.decrypt(e.metadata.AppVersion,t.secret)))).subscribe({next:t=>{this.storage.setItem(w.APP_VERSION_KEY,t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.ChainId&&void 0!==t.metadata.JsonRpcUrl))).pipe((0,h.mergeMap)((e=>(0,l.zip)(y.decrypt(e.metadata.ChainId,t.secret),y.decrypt(e.metadata.JsonRpcUrl,t.secret))))).pipe((0,h.distinctUntilChanged)()).subscribe({next:([t,e])=>{this.chainCallback&&this.chainCallback(t,e)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.EthereumAddress))).pipe((0,h.mergeMap)((e=>y.decrypt(e.metadata.EthereumAddress,t.secret)))).subscribe({next:t=>{this.accountsCallback&&this.accountsCallback([t]),E.accountRequestCallbackIds.size>0&&(Array.from(E.accountRequestCallbackIds.values()).forEach((e=>{const n=(0,N.Web3ResponseMessage)({id:e,response:(0,_.RequestEthereumAccountsResponse)([t])});this.invokeCallback(Object.assign(Object.assign({},n),{id:e}))})),E.accountRequestCallbackIds.clear())},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}}));const n=this.options.uiConstructor({linkAPIUrl:this.options.linkAPIUrl,version:this.options.version,darkMode:this.options.darkMode,session:t,connected$:e.connected$});return e.connect(),{session:t,ui:n,connection:e}}attachUI(){this.ui.attach()}resetAndReload(){this.connection.setSessionMetadata("__destroyed","1").pipe((0,h.timeout)(1e3),(0,h.catchError)((t=>(0,l.of)(null)))).subscribe((t=>{var e,n,r;const i=this.ui.isStandalone();try{this.subscriptions.unsubscribe()}catch(t){null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(n=this.diagnostic)||void 0===n||n.log(d.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const o=b.Session.load(this.storage);if((null==o?void 0:o.id)===this._session.id?this.storage.clear():o&&(null===(r=this.diagnostic)||void 0===r||r.log(d.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:b.Session.hash(o.id)})),this._reloadOnDisconnect)return void this.ui.reloadUI();this.accountsCallback&&this.accountsCallback([],!0);const{session:a,ui:s,connection:u}=this.subscribe();this._session=a,this.connection=u,this.ui=s,i&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.attachUI()}),(t=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.FAILURE,{method:"relay::resetAndReload",message:"failed to reset and reload with "+t,sessionIdHash:this.getSessionIdHash()})}))}setAppInfo(t,e){this.appName=t,this.appLogoUrl=e}getStorageItem(t){return this.storage.getItem(t)}get session(){return this._session}setStorageItem(t,e){this.storage.setItem(t,e)}signEthereumMessage(t,e,n,r){return this.sendRequest({method:v.Web3Method.signEthereumMessage,params:{message:(0,g.hexStringFromBuffer)(t,!0),address:e,addPrefix:n,typedDataJson:r||null}})}ethereumAddressFromSignedMessage(t,e,n){return this.sendRequest({method:v.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,g.hexStringFromBuffer)(t,!0),signature:(0,g.hexStringFromBuffer)(e,!0),addPrefix:n}})}signEthereumTransaction(t){return this.sendRequest({method:v.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,g.bigIntStringFromBN)(t.weiValue),data:(0,g.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,g.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.gasPriceInWei?(0,g.bigIntStringFromBN)(t.gasPriceInWei):null,maxPriorityFeePerGas:t.gasPriceInWei?(0,g.bigIntStringFromBN)(t.gasPriceInWei):null,gasLimit:t.gasLimit?(0,g.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(t){return this.sendRequest({method:v.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,g.bigIntStringFromBN)(t.weiValue),data:(0,g.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,g.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.maxFeePerGas?(0,g.bigIntStringFromBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:t.maxPriorityFeePerGas?(0,g.bigIntStringFromBN)(t.maxPriorityFeePerGas):null,gasLimit:t.gasLimit?(0,g.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!0}})}submitEthereumTransaction(t,e){return this.sendRequest({method:v.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,g.hexStringFromBuffer)(t,!0),chainId:e}})}scanQRCode(t){return this.sendRequest({method:v.Web3Method.scanQRCode,params:{regExp:t}})}getQRCodeUrl(){return(0,g.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1)}genericRequest(t,e){return this.sendRequest({method:v.Web3Method.generic,params:{action:e,data:t}})}sendGenericMessage(t){return this.sendRequest(t)}sendRequest(t){let e=null;const n=(0,g.randomBytesHex)(8),r=r=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,t.method,r),null==e||e()};return{promise:new Promise(((i,o)=>{this.ui.isStandalone()||(e=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,(t=>{if(null==e||e(),t.errorMessage)return o(new Error(t.errorMessage));i(t)})),this.ui.isStandalone()?this.sendRequestStandalone(n,t):this.publishWeb3RequestEvent(n,t)})),cancel:r}}setConnectDisabled(t){this.ui.setConnectDisabled(t)}setAccountsCallback(t){this.accountsCallback=t}setChainCallback(t){this.chainCallback=t}publishWeb3RequestEvent(t,e){var n;const r=(0,L.Web3RequestMessage)({id:t,request:e}),i=b.Session.load(this.storage);null===(n=this.diagnostic)||void 0===n||n.log(d.EVENTS.WEB3_REQUEST,{eventId:r.id,method:"relay::"+r.request.method,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?b.Session.hash(i.id):"",isSessionMismatched:((null==i?void 0:i.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",r,!0).subscribe({next:t=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:r.id,method:"relay::"+r.request.method,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?b.Session.hash(i.id):"",isSessionMismatched:((null==i?void 0:i.id)!==this._session.id).toString()})},error:t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:r.id,response:{method:r.request.method,errorMessage:t.message}}))}}))}publishWeb3RequestCanceledEvent(t){const e=(0,M.Web3RequestCanceledMessage)(t);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",e,!1).subscribe())}publishEvent(t,e,n){const r=this.session.secret;return new l.Observable((t=>{y.encrypt(JSON.stringify(Object.assign(Object.assign({},e),{origin:location.origin})),r).then((e=>{t.next(e),t.complete()}))})).pipe((0,h.mergeMap)((e=>this.connection.publishEvent(t,e,n))))}handleIncomingEvent(t){try{this.subscriptions.add(y.decrypt(t.data,this.session.secret).pipe((0,h.map)((t=>JSON.parse(t)))).subscribe({next:t=>{const e=(0,N.isWeb3ResponseMessage)(t)?t:null;e&&this.handleWeb3ResponseMessage(e)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(t){return}}handleWeb3ResponseMessage(t){var e;const{response:n}=t;if(null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.WEB3_RESPONSE,{eventId:t.id,method:"relay::"+n.method,sessionIdHash:this.getSessionIdHash()}),(0,_.isRequestEthereumAccountsResponse)(n))return E.accountRequestCallbackIds.forEach((e=>this.invokeCallback(Object.assign(Object.assign({},t),{id:e})))),void E.accountRequestCallbackIds.clear();this.invokeCallback(t)}handleErrorResponse(t,e,n,r){this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:t,response:(0,_.ErrorResponse)(e,(null!=n?n:p.WalletUIError.UserRejectedRequest).message,r)}))}invokeCallback(t){const e=this.relayEventManager.callbacks.get(t.id);e&&(e(t.response),this.relayEventManager.callbacks.delete(t.id))}requestEthereumAccounts(){const t={method:v.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},e=(0,g.randomBytesHex)(8),n=n=>{this.publishWeb3RequestCanceledEvent(e),this.handleErrorResponse(e,t.method,n)};return{promise:new Promise(((r,i)=>{var o;this.relayEventManager.callbacks.set(e,(t=>{if(this.ui.hideRequestEthereumAccounts(),t.errorMessage)return i(new Error(t.errorMessage));r(t)}));const a=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)||null;if(a&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a))window.location.href="https://go.cb-w.com/xoXnYwQimhb?cb_url="+encodeURIComponent(window.location.href);else{if(this.ui.inlineAccountsResponse()){const t=t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:e,response:(0,_.RequestEthereumAccountsResponse)(t)}))};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:t})}else{const t=c.ethErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>n(t)})}E.accountRequestCallbackIds.add(e),this.ui.inlineAccountsResponse()||this.ui.isStandalone()||this.publishWeb3RequestEvent(e,t)}})),cancel:n}}selectProvider(t){const e={method:v.Web3Method.selectProvider,params:{providerOptions:t}},n=(0,g.randomBytesHex)(8);return{cancel:t=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,t)},promise:new Promise(((e,r)=>{this.relayEventManager.callbacks.set(n,(t=>{if(t.errorMessage)return r(new Error(t.errorMessage));e(t)})),this.ui.selectProvider&&this.ui.selectProvider({onApprove:t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:n,response:(0,_.SelectProviderResponse)(t)}))},onCancel:t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:n,response:(0,_.SelectProviderResponse)(m.ProviderType.Unselected)}))},providerOptions:t})}))}}watchAsset(t,e,n,r,i,o){const a={method:v.Web3Method.watchAsset,params:{type:t,options:{address:e,symbol:n,decimals:r,image:i},chainId:o}};let s=null;const u=(0,g.randomBytesHex)(8),c=t=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,t),null==s||s()};return this.ui.inlineWatchAsset()||(s=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload})),{cancel:c,promise:new Promise(((c,l)=>{this.relayEventManager.callbacks.set(u,(t=>{if(null==s||s(),t.errorMessage)return l(new Error(t.errorMessage));c(t)}));this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:()=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:u,response:(0,_.WatchAssetReponse)(!0)}))},onCancel:t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:u,response:(0,_.WatchAssetReponse)(!1)}))},type:t,address:e,symbol:n,decimals:r,image:i,chainId:o}),this.ui.inlineWatchAsset()||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,a)}))}}addEthereumChain(t,e,n,r,i,o){const a={method:v.Web3Method.addEthereumChain,params:{chainId:t,rpcUrls:e,blockExplorerUrls:r,chainName:i,iconUrls:n,nativeCurrency:o}};let s=null;const u=(0,g.randomBytesHex)(8),c=t=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,t),null==s||s()};return this.ui.inlineAddEthereumChain(t)||(s=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload})),{promise:new Promise(((e,n)=>{this.relayEventManager.callbacks.set(u,(t=>{if(null==s||s(),t.errorMessage)return n(new Error(t.errorMessage));e(t)}));this.ui.inlineAddEthereumChain(t)&&this.ui.addEthereumChain({onCancel:t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:u,response:(0,_.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:u,response:(0,_.AddEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))},chainId:a.params.chainId,rpcUrls:a.params.rpcUrls,blockExplorerUrls:a.params.blockExplorerUrls,chainName:a.params.chainName,iconUrls:a.params.iconUrls,nativeCurrency:a.params.nativeCurrency}),this.ui.inlineAddEthereumChain(t)||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,a)})),cancel:c}}switchEthereumChain(t){const e={method:v.Web3Method.switchEthereumChain,params:{chainId:t}};let n=null;const r=(0,g.randomBytesHex)(8),i=t=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,t),null==n||n()};return this.ui.inlineSwitchEthereumChain()||(n=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload})),{promise:new Promise(((t,i)=>{this.relayEventManager.callbacks.set(r,(e=>(null==n||n(),e.errorMessage&&e.errorCode?i(c.ethErrors.provider.custom({code:e.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):e.errorMessage?i(new Error(e.errorMessage)):void t(e)))),this.ui.switchEthereumChain({onCancel:t=>{if("number"==typeof t){const e=t;this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:r,response:(0,_.ErrorResponse)(v.Web3Method.switchEthereumChain,p.WalletUIError.SwitchEthereumChainUnsupportedChainId.message,e)}))}else t instanceof p.WalletUIError?this.handleErrorResponse(r,v.Web3Method.switchEthereumChain,t,t.errorCode):this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:r,response:(0,_.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:t=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:r,response:(0,_.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))},chainId:e.params.chainId}),this.ui.inlineSwitchEthereumChain()||this.ui.isStandalone()||this.publishWeb3RequestEvent(r,e)})),cancel:i}}inlineAddEthereumChain(t){return this.ui.inlineAddEthereumChain(t)}getSessionIdHash(){return b.Session.hash(this._session.id)}sendRequestStandalone(t,e){const n=n=>{this.handleErrorResponse(t,e.method,n)},r=e=>{this.handleWeb3ResponseMessage((0,N.Web3ResponseMessage)({id:t,response:e}))};switch(e.method){case v.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:e,onSuccess:r,onCancel:n});break;case v.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case v.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case v.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:e,onSuccess:r});break;default:n()}}onSessionConfigChanged(t){}}E.accountRequestCallbackIds=new Set,o([u.default],E.prototype,"resetAndReload",null),o([u.default],E.prototype,"handleIncomingEvent",null),e.WalletSDKRelay=E},function(t,e,n){var r;function i(t,e,n){if(!n||typeof n.value!==r.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+e+"> is not a method!");return{configurable:r.boolTrue,get:function(){var t=n.value.bind(this);return Object.defineProperty(this,e,{value:t,configurable:r.boolTrue,writable:r.boolTrue}),t}}}Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.typeOfFunction="function",t.boolTrue=!0}(r||(r={})),e.bind=i,e.default=i},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKConnection=void 0;const r=n(48),i=n(69),o=n(90),a=n(68),s=n(213),u=n(89),c=n(214),l=n(215);e.WalletSDKConnection=class{constructor(t,e,n,s,l=WebSocket){this.sessionId=t,this.sessionKey=e,this.diagnostic=s,this.subscriptions=new r.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,a.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)((e=>{var n;return null===(n=this.diagnostic)||void 0===n?void 0:n.log(u.EVENTS.CONNECTED_STATE_CHANGE,{state:e,sessionIdHash:o.Session.hash(t)})})),(0,i.skip)(1),(0,i.filter)((t=>t===c.ConnectionState.DISCONNECTED&&!this.destroyed)),(0,i.delay)(5e3),(0,i.filter)((t=>!this.destroyed)),(0,i.flatMap)((t=>h.connect())),(0,i.retry)()).subscribe()),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(2),(0,i.switchMap)((t=>(0,r.iif)((()=>t===c.ConnectionState.CONNECTED),this.authenticate().pipe((0,i.tap)((t=>this.sendIsLinked())),(0,i.tap)((t=>this.sendGetSessionConfig())),(0,i.map)((t=>!0))),(0,r.of)(!1)))),(0,i.distinctUntilChanged)(),(0,i.catchError)((t=>(0,r.of)(!1)))).subscribe((t=>this.connectedSubject.next(t)))),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(1),(0,i.switchMap)((t=>(0,r.iif)((()=>t===c.ConnectionState.CONNECTED),(0,r.timer)(0,1e4))))).subscribe((t=>0===t?this.updateLastHeartbeat():this.heartbeat()))),this.subscriptions.add(h.incomingData$.pipe((0,i.filter)((t=>"h"===t))).subscribe((t=>this.updateLastHeartbeat()))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((t=>["IsLinkedOK","Linked"].includes(t.type)))).subscribe((e=>{var n;const r=e;null===(n=this.diagnostic)||void 0===n||n.log(u.EVENTS.LINKED,{sessionIdHash:o.Session.hash(t),linked:r.linked,type:e.type,onlineGuests:r.onlineGuests}),this.linkedSubject.next(r.linked||r.onlineGuests>0)}))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((t=>["GetSessionConfigOK","SessionConfigUpdated"].includes(t.type)))).subscribe((e=>{var n;const r=e;null===(n=this.diagnostic)||void 0===n||n.log(u.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:o.Session.hash(t),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 t;if(this.destroyed)throw new Error("instance is destroyed");null===(t=this.diagnostic)||void 0===t||t.log(u.EVENTS.STARTED_CONNECTING,{sessionIdHash:o.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){var t;this.subscriptions.unsubscribe(),this.ws.disconnect(),null===(t=this.diagnostic)||void 0===t||t.log(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)((t=>t)),(0,i.take)(1),(0,i.map)((()=>{})))}get linked$(){return this.linkedSubject.asObservable()}get onceLinked$(){return this.linked$.pipe((0,i.filter)((t=>t)),(0,i.take)(1),(0,i.map)((()=>{})))}get sessionConfig$(){return this.sessionConfigSubject.asObservable()}get incomingEvent$(){return this.ws.incomingJSONData$.pipe((0,i.filter)((t=>{if("Event"!==t.type)return!1;const e=t;return"string"==typeof e.sessionId&&"string"==typeof e.eventId&&"string"==typeof e.event&&"string"==typeof e.data})),(0,i.map)((t=>t)))}setSessionMetadata(t,e){const n=(0,s.ClientMessageSetSessionConfig)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:{[t]:e}});return this.onceConnected$.pipe((0,i.flatMap)((t=>this.makeRequest(n))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to set session metadata")})))}publishEvent(t,e,n=!1){const r=(0,s.ClientMessagePublishEvent)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:t,data:e,callWebhook:n});return this.onceLinked$.pipe((0,i.flatMap)((t=>this.makeRequest(r))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to publish event");return t.eventId})))}sendData(t){this.ws.sendData(JSON.stringify(t))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(t){}}makeRequest(t,e=6e4){const n=t.id;try{this.sendData(t)}catch(t){return(0,r.throwError)(t)}return this.ws.incomingJSONData$.pipe((0,i.timeoutWith)(e,(0,r.throwError)(new Error(`request ${n} timed out`))),(0,i.filter)((t=>t.id===n)),(0,i.take)(1))}authenticate(){const t=(0,s.ClientMessageHostSession)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(t).pipe((0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to authentcate")})))}sendIsLinked(){const t=(0,s.ClientMessageIsLinked)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}sendGetSessionConfig(){const t=(0,s.ClientMessageGetSessionConfig)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ClientMessagePublishEvent=e.ClientMessageSetSessionConfig=e.ClientMessageGetSessionConfig=e.ClientMessageIsLinked=e.ClientMessageHostSession=void 0,e.ClientMessageHostSession=function(t){return Object.assign({type:"HostSession"},t)},e.ClientMessageIsLinked=function(t){return Object.assign({type:"IsLinked"},t)},e.ClientMessageGetSessionConfig=function(t){return Object.assign({type:"GetSessionConfig"},t)},e.ClientMessageSetSessionConfig=function(t){return Object.assign({type:"SetSessionConfig"},t)},e.ClientMessagePublishEvent=function(t){return Object.assign({type:"PublishEvent"},t)}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.RxWebSocket=e.ConnectionState=void 0;const r=n(48),i=n(69);var o;!function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"}(o=e.ConnectionState||(e.ConnectionState={})),e.RxWebSocket=class{constructor(t,e=WebSocket){this.WebSocketClass=e,this.webSocket=null,this.connectionStateSubject=new r.BehaviorSubject(o.DISCONNECTED),this.incomingDataSubject=new r.Subject,this.url=t.replace(/^http/,"ws")}connect(){return this.webSocket?(0,r.throwError)(new Error("webSocket object is not null")):new r.Observable((t=>{let e;try{this.webSocket=e=new this.WebSocketClass(this.url)}catch(e){return void t.error(e)}this.connectionStateSubject.next(o.CONNECTING),e.onclose=e=>{this.clearWebSocket(),t.error(new Error(`websocket error ${e.code}: ${e.reason}`)),this.connectionStateSubject.next(o.DISCONNECTED)},e.onopen=e=>{t.next(),t.complete(),this.connectionStateSubject.next(o.CONNECTED)},e.onmessage=t=>{this.incomingDataSubject.next(t.data)}})).pipe((0,i.take)(1))}disconnect(){const{webSocket:t}=this;if(t){this.clearWebSocket(),this.connectionStateSubject.next(o.DISCONNECTED);try{t.close()}catch(t){}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe((0,i.flatMap)((t=>{let e;try{e=JSON.parse(t)}catch(t){return(0,r.empty)()}return(0,r.of)(e)})))}sendData(t){const{webSocket:e}=this;if(!e)throw new Error("websocket is not connected");e.send(t)}clearWebSocket(){const{webSocket:t}=this;t&&(this.webSocket=null,t.onclose=null,t.onerror=null,t.onmessage=null,t.onopen=null)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.isServerMessageFail=void 0,e.isServerMessageFail=function(t){return t&&"Fail"===t.type&&"number"==typeof t.id&&"string"==typeof t.sessionId&&"string"==typeof t.error}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletUIError=void 0;class r extends Error{constructor(t,e){super(t),this.message=t,this.errorCode=e}}e.WalletUIError=r,r.UserRejectedRequest=new r("User rejected request"),r.SwitchEthereumChainUnsupportedChainId=new r("Unsupported chainId",4902)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.decrypt=e.encrypt=void 0;const r=n(48),i=n(38);e.encrypt=async function(t,e){if(64!==e.length)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.importKey("raw",(0,i.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=new TextEncoder,a=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},r,o.encode(t)),s=a.slice(a.byteLength-16),u=a.slice(0,a.byteLength-16),c=new Uint8Array(s),l=new Uint8Array(u),h=new Uint8Array([...n,...c,...l]);return(0,i.uint8ArrayToHex)(h)},e.decrypt=function(t,e){if(64!==e.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)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,i.hexStringToUint8Array)(t),a=o.slice(0,12),s=o.slice(12,28),u=o.slice(28),c=new Uint8Array([...u,...s]),l={name:"AES-GCM",iv:new Uint8Array(a)};try{const t=await window.crypto.subtle.decrypt(l,r,c),e=new TextDecoder;n.next(e.decode(t)),n.complete()}catch(t){n.error(t)}}()}))}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestCanceledMessage=void 0;const r=n(100);e.Web3RequestCanceledMessage=function(t){return{type:r.RelayMessageType.WEB3_REQUEST_CANCELED,id:t}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestMessage=void 0;const r=n(100);e.Web3RequestMessage=function(t){return Object.assign({type:r.RelayMessageType.WEB3_REQUEST},t)}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumAddressFromSignedMessageResponse=e.SubmitEthereumTransactionResponse=e.SignEthereumTransactionResponse=e.SignEthereumMessageResponse=e.isRequestEthereumAccountsResponse=e.SelectProviderResponse=e.WatchAssetReponse=e.RequestEthereumAccountsResponse=e.SwitchEthereumChainResponse=e.AddEthereumChainResponse=e.ErrorResponse=void 0;const r=n(125);e.ErrorResponse=function(t,e,n){return{method:t,errorMessage:e,errorCode:n}},e.AddEthereumChainResponse=function(t){return{method:r.Web3Method.addEthereumChain,result:t}},e.SwitchEthereumChainResponse=function(t){return{method:r.Web3Method.switchEthereumChain,result:t}},e.RequestEthereumAccountsResponse=function(t){return{method:r.Web3Method.requestEthereumAccounts,result:t}},e.WatchAssetReponse=function(t){return{method:r.Web3Method.watchAsset,result:t}},e.SelectProviderResponse=function(t){return{method:r.Web3Method.selectProvider,result:t}},e.isRequestEthereumAccountsResponse=function(t){return t&&t.method===r.Web3Method.requestEthereumAccounts},e.SignEthereumMessageResponse=function(t){return{method:r.Web3Method.signEthereumMessage,result:t}},e.SignEthereumTransactionResponse=function(t){return{method:r.Web3Method.signEthereumTransaction,result:t}},e.SubmitEthereumTransactionResponse=function(t){return{method:r.Web3Method.submitEthereumTransaction,result:t}},e.EthereumAddressFromSignedMessageResponse=function(t){return{method:r.Web3Method.ethereumAddressFromSignedMessage,result:t}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.isWeb3ResponseMessage=e.Web3ResponseMessage=void 0;const r=n(100);e.Web3ResponseMessage=function(t){return Object.assign({type:r.RelayMessageType.WEB3_RESPONSE},t)},e.isWeb3ResponseMessage=function(t){return t&&t.type===r.RelayMessageType.WEB3_RESPONSE}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelayEventManager=void 0;const r=n(38);e.WalletSDKRelayEventManager=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const t=this._nextRequestId,e=(0,r.prepend0x)(t.toString(16));return this.callbacks.get(e)&&this.callbacks.delete(e),t}}},function(t){t.exports=JSON.parse('{"name":"@coinbase/wallet-sdk","version":"3.4.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","buffer":"^6.0.3","clsx":"^1.1.0","eth-block-tracker":"4.4.3","eth-json-rpc-filters":"4.2.2","eth-rpc-errors":"4.0.2","json-rpc-engine":"6.1.0","keccak":"^3.0.1","preact":"^10.5.9","qs":"^6.10.3","rxjs":"^6.6.3","sha.js":"^2.4.11","stream-browserify":"^3.0.0","util":"^0.12.4"},"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","@types/sha.js":"^2.4.0","@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","jest-websocket-mock":"^2.3.0","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"}}')},function(t,e,n){function r(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function i(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}n.r(e),n.d(e,"Mutex",(function(){return a})),n.d(e,"Semaphore",(function(){return o})),n.d(e,"withTimeout",(function(){return s}));var o=function(){function t(t){if(this._maxConcurrency=t,this._queue=[],t<=0)throw new Error("semaphore must be initialized to a positive value");this._value=t}return t.prototype.acquire=function(){var t=this,e=this.isLocked(),n=new Promise((function(e){return t._queue.push(e)}));return e||this._dispatch(),n},t.prototype.runExclusive=function(t){return r(this,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.acquire()];case 1:e=i.sent(),n=e[0],r=e[1],i.label=2;case 2:return i.trys.push([2,,4,5]),[4,t(n)];case 3:return[2,i.sent()];case 4:return r(),[7];case 5:return[2]}}))}))},t.prototype.isLocked=function(){return this._value<=0},t.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 t=this._currentReleaser;this._currentReleaser=void 0,t()}},t.prototype._dispatch=function(){var t=this,e=this._queue.shift();if(e){var n=!1;this._currentReleaser=function(){n||(n=!0,t._value++,t._dispatch())},e([this._value--,this._currentReleaser])}},t}(),a=function(){function t(){this._semaphore=new o(1)}return t.prototype.acquire=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this._semaphore.acquire()];case 1:return[2,t.sent()[1]]}}))}))},t.prototype.runExclusive=function(t){return this._semaphore.runExclusive((function(){return t()}))},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();function s(t,e,n){var o=this;return void 0===n&&(n=new Error("timeout")),{acquire:function(){return new Promise((function(a,s){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,s(n)}),e),[4,t.acquire()];case 1:return o=i.sent(),r?(Array.isArray(o)?o[1]:o)():a(o),[2]}}))}))}))},runExclusive:function(t){return r(this,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:e=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)?(e=n[1],[4,t(n[0])]):[3,4];case 3:return[2,r.sent()];case 4:return e=n,[4,t()];case 5:return[2,r.sent()];case 6:return[3,8];case 7:return e(),[7];case 8:return[2]}}))}))},release:function(){t.release()},isLocked:function(){return t.isLocked()}}}}]);void 0===YG&&console.error("esm-webpack-plugin: nothing exported!"),YG.CoinbaseWalletProvider;const FG=YG.CoinbaseWalletSDK;let WG=["ethereum","bsc","polygon","solana","fantom","velas"];WG.evm=["ethereum","bsc","polygon","fantom","velas"],WG.solana=["solana"];class QG{constructor({blockchain:t,from:e,to:n,value:r,api:i,method:o,params:a,instructions:s,sent:u,succeeded:c,failed:l}){this.blockchain=t,this.from=e&&e.match("0x")?Mp(e):e,this.to=n&&n.match("0x")?Mp(n):n,this.value=function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([QG,"access",t=>t.bigNumberify,"call",e=>e(r,t),"optionalAccess",t=>t.toString,"call",t=>t()]),this.api=i,this.method=o,this.params=a,this.sent=u,this.succeeded=c,this.failed=l,this.instructions=s,this._succeeded=!1,this._failed=!1}async prepare({wallet:t}){this.from=await t.account()}static bigNumberify(t,e){return"number"==typeof t?$M(t.toString(),Ch[e].currency.decimals):t&&t.toString?kd.from(t.toString()):t}getContractArguments(){let t=this.getContract().interface.fragments.find((t=>t.name==this.method));return this.params instanceof Array?this.params:this.params instanceof Object?t.inputs.map((t=>this.params[t.name])):void 0}getContract(){return new Tv(this.to,this.api)}async getData(){let t,e=this.getContractArguments();return t=e?await this.getContract().populateTransaction[this.method].apply(null,e):await this.getContract().populateTransaction[this.method].apply(null),t.data}success(){return this._succeeded?Promise.resolve(this):new Promise(((t,e)=>{let n=this.succeeded;this.succeeded=e=>{n&&n(e),t(e)}}))}failure(){return this._failed?Promise.resolve(this):new Promise(((t,e)=>{let n=this.failed;this.failed=(e,r)=>{n&&n(e,r),t(e,r)}}))}}const HG=({transaction:t,provider:e,signer:n})=>t.method?GG({transaction:t,signer:n,provider:e}):ZG({transaction:t,signer:n}),GG=({transaction:t,signer:e,provider:n})=>{let r=new Tv(t.to,t.api,n),i=t.getContractArguments({contract:r}),o=r.connect(e)[t.method];return i?o(...i,{value:QG.bigNumberify(t.value,t.blockchain)}):o({value:QG.bigNumberify(t.value,t.blockchain)})},ZG=({transaction:t,signer:e})=>e.sendTransaction({to:t.to,value:QG.bigNumberify(t.value,t.blockchain)});function VG(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}class qG{static __initStatic(){this.info={name:"Wallet (Ethereum)",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0NDYuNCAzNzYuOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDQ2LjQgMzc2Ljg7IiB4bWw6c3BhY2U9In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c+Cjwvc3ZnPgo=",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>VG([window,"optionalAccess",t=>t.ethereum])&&1!=Object.keys(window.ethereum).filter((t=>t.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/))).length&&!VG([window,"optionalAccess",t=>t.coin98])&&!(VG([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isTrust])||VG([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isTrustWallet]))&&!VG([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isDeficonnectProvider])&&!VG([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isHyperPay])&&!VG([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isPhantom])&&!(VG([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isCoinbaseWallet])||VG([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isWalletLink]))}constructor(){this.name=this.constructor.info.name,this.logo=this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.sendTransaction=t=>(async({transaction:t,wallet:e})=>{if(t=new QG(t),0==await e.connectedTo(t.blockchain)&&await e.switchTo(t.blockchain),0==await e.connectedTo(t.blockchain))throw{code:"WRONG_NETWORK"};await t.prepare({wallet:e});let n=await RG({blockchain:t.blockchain,method:"transactionCount",address:t.from});t.nonce=n;let r=new qM(e.getProvider(),"any"),i=r.getSigner(0);return await HG({transaction:t,provider:r,signer:i}).then((e=>{if(!e)throw"Submitting transaction failed!";t.id=e.hash,t.nonce=e.nonce||n,t.url=Ch.findByName(t.blockchain).explorerUrlFor({transaction:t}),t.sent&&t.sent(t),e.wait(1).then((()=>{t._succeeded=!0,t.succeeded&&t.succeeded(t)})).catch((e=>{e&&e.code&&"TRANSACTION_REPLACED"==e.code?(e.replacement&&e.replacement.hash&&(t.id=e.replacement.hash,t.url=Ch.findByName(t.blockchain).explorerUrlFor({transaction:t})),e.replacement&&e.replacement.hash&&e.receipt&&1==e.receipt.status?(t._succeeded=!0,t.succeeded&&t.succeeded(t)):e.replacement&&e.replacement.hash&&e.receipt&&0==e.receipt.status&&(t._failed=!0,t.failed&&t.failed(t,e))):(t._failed=!0,t.failed&&t.failed(t,e))}))})),t})({wallet:this,transaction:t})}getProvider(){return window.ethereum}async account(){if(!this.getProvider())return;return(await this.getProvider().request({method:"eth_accounts"})).map((t=>Mp(t)))[0]}async connect(){if(!this.getProvider())return;return(await this.getProvider().request({method:"eth_requestAccounts"})).map((t=>Mp(t)))[0]}on(t,e){let n;if("account"===t)n=t=>e(Mp(t[0])),this.getProvider().on("accountsChanged",n);return n}off(t,e){if("account"===t)this.getProvider().removeListener("accountsChanged",e);return e}async connectedTo(t){const e=Ch.findById(await this.getProvider().request({method:"eth_chainId"}));return t?t===e.name:e.name}addNetwork(t){return new Promise(((e,n)=>{const r=Ch.findByName(t);this.getProvider().request({method:"wallet_addEthereumChain",params:[{chainId:r.id,chainName:r.fullName,nativeCurrency:{name:r.currency.name,symbol:r.currency.symbol,decimals:r.currency.decimals},rpcUrls:[r.rpc],blockExplorerUrls:[r.explorer],iconUrls:[r.logo]}]}).then(e).catch(n)}))}switchTo(t){return new Promise(((e,n)=>{const r=Ch.findByName(t);this.getProvider().request({method:"wallet_switchEthereumChain",params:[{chainId:r.id}]}).then(e).catch((r=>{4902===r.code?this.addNetwork(t).then((()=>this.switchTo(t).then(e))).catch(n):n(r)}))}))}transactionCount({blockchain:t,address:e}){return RG({blockchain:t,method:"transactionCount",address:e})}async sign(t){await this.account();let e=new qM(this.getProvider(),"any").getSigner(0);return await e.signMessage(t)}}qG.__initStatic(),qG.__initStatic2();class JG extends qG{static __initStatic(){this.info={name:"Binance Wallet",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9I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sPSIjZjBiOTBiIi8+PC9zdmc+",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.BinanceChain])&&!window.coin98}getProvider(){return window.BinanceChain}}JG.__initStatic(),JG.__initStatic2();class KG extends qG{static __initStatic(){this.info={name:"Brave",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNTYgMzAxIiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNTYgMzAxIiB4bWw6c3BhY2U9InByZXNlcnZlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgoKCTxwYXRoIGZpbGw9IiNGMTVBMjIiIGQ9Im0yMzYgMTA1LjQtNy44LTIxLjIgNS40LTEyLjJjMC43LTEuNiAwLjMtMy40LTAuOC00LjZsLTE0LjgtMTQuOWMtNi41LTYuNS0xNi4xLTguOC0yNC44LTUuN2wtNC4xIDEuNC0yMi42LTI0LjUtMzguMi0wLjNoLTAuM2wtMzguNSAwLjMtMjIuNiAyNC43LTQtMS40Yy04LjgtMy4xLTE4LjUtMC44LTI1IDUuOGwtMTUgMTUuMmMtMSAxLTEuMyAyLjQtMC44IDMuN2w1LjcgMTIuNy03LjggMjEuMiA1LjEgMTkuMiAyMyA4Ny4yYzIuNiAxMCA4LjcgMTguOCAxNy4yIDI0LjkgMCAwIDI3LjggMTkuNyA1NS4zIDM3LjUgMi40IDEuNiA1IDIuNyA3LjcgMi43czUuMi0xLjEgNy43LTIuN2MzMC45LTIwLjIgNTUuMy0zNy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EtMy41bC02LjgtMzcuOWMtMC4yLTEuMSAwLjUtMi4zIDEuNi0yLjVsMTkuOS01LjZjMS4xLTAuMyAyLjktMC40IDQtMC4zbDIyLjQgMi4xYzEuMSAwLjEgMS4yIDAuNSAwLjEgMC45bC0zNC43IDEzLjJjLTEgMC40LTIuMyAxLjUtMi43IDIuNmwtMS40IDMuM2MtMC40IDEtMC40IDIuNyAwLjIgMy42bDExLjkgMjIuM2MwLjUgMSAwLjIgMi4zLTAuOCAzbC0yNi45IDE4LjJjLTEuOCAxLjgtMS42IDQuNyAwLjMgNi40bDEyLjggMTEuNmMwLjggMC44IDIuNCAxLjggMy40IDIuMmwxOCA4LjVjMSAwLjUgMi41IDAuMyAzLjQtMC40bDUuNy00LjZjMy0yLjQgNS4zLTUuNyA2LjYtOS4zbDEuNi00LjNjMC40LTEgMC4zLTIuOC0wLjEtMy44bC01LjgtMTMuOGMtMC40LTEtMC4yLTIuNSAwLjYtMy40bDI3LjktMjkuN2MwLjgtMC44IDEuOS0yLjIgMi43LTMtMC40LTAuMyAxLjEtMi4xIDEuNi00LjF6Ii8+Cgo8L3N2Zz4K",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isBraveWallet])}}KG.__initStatic(),KG.__initStatic2();class XG extends qG{static __initStatic(){this.info={name:"Coin98",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA0MC43IDQwIiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA0MC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40LTYuMyAzLjUgMCA2LjMgMi44IDYuMyA2LjMgMC4xIDMuNC0yLjggNi4yLTYuMyA2LjJ6bTMuOC02LjNjMCAyLjEtMS43IDMuNy0zLjggMy43cy0zLjgtMS43LTMuOC0zLjdjMC0yLjEgMS43LTMuNyAzLjgtMy43IDIuMSAwLjEgMy44IDEuNyAzLjggMy43em0tMTMuNC03LjRjMCAyLjEtMS43IDMuNy0zLjggMy43cy0zLjgtMS43LTMuOC0zLjdjMC0yLjEgMS43LTMuNyAzLjgtMy43IDIuMiAwIDMuOCAxLjYgMy44IDMuN3oiLz4KPC9zdmc+Cg==",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.coin98])}}function $G(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}XG.__initStatic(),XG.__initStatic2();class tZ extends qG{static __initStatic(){this.info={name:"Coinbase",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0nTGF5ZXJfMScgZGF0YS1uYW1lPSdMYXllciAxJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHhtbG5zOnhsaW5rPSdodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rJyB2aWV3Qm94PScwIDAgNDg4Ljk2IDQ4OC45Nic+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50KTt9LmNscy0ye2ZpbGw6IzQzNjFhZDt9PC9zdHlsZT48bGluZWFyR3JhZGllbnQgaWQ9J2xpbmVhci1ncmFkaWVudCcgeDE9JzI1MCcgeTE9JzcuMzUnIHgyPScyNTAnIHkyPSc0OTYuMzInIGdyYWRpZW50VHJhbnNmb3JtPSdtYXRyaXgoMSwgMCwgMCwgLTEsIDAsIDUwMiknIGdyYWRpZW50VW5pdHM9J3VzZXJTcGFjZU9uVXNlJz48c3RvcCBvZmZzZXQ9JzAnIHN0b3AtY29sb3I9JyMzZDViYTknLz48c3RvcCBvZmZzZXQ9JzEnIHN0b3AtY29sb3I9JyM0ODY4YjEnLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cGF0aCBjbGFzcz0nY2xzLTEnIGQ9J00yNTAsNS42OEMxMTQuODcsNS42OCw1LjUyLDExNSw1LjUyLDI1MC4xN1MxMTQuODcsNDk0LjY1LDI1MCw0OTQuNjUsNDk0LjQ4LDM4NS4yOSw0OTQuNDgsMjUwLjE3LDM4NS4xMyw1LjY4LDI1MCw1LjY4Wm0wLDM4Ny41NEExNDMuMDYsMTQzLjA2LDAsMSwxLDM5My4wNSwyNTAuMTcsMTQzLjExLDE0My4xMSwwLDAsMSwyNTAsMzkzLjIyWicgdHJhbnNmb3JtPSd0cmFuc2xhdGUoLTUuNTIgLTUuNjgpJy8+PHBhdGggY2xhc3M9J2Nscy0yJyBkPSdNMjg0LjY5LDI5Ni4wOUgyMTUuMzFhMTEsMTEsMCwwLDEtMTAuOS0xMC45VjIxNS40OGExMSwxMSwwLDAsMSwxMC45LTEwLjkxSDI4NWExMSwxMSwwLDAsMSwxMC45LDEwLjkxdjY5LjcxQTExLjA3LDExLjA3LDAsMCwxLDI4NC42OSwyOTYuMDlaJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgtNS41MiAtNS42OCknLz48L3N2Zz4=",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>$G([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isCoinbaseWallet])||$G([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isWalletLink])}}tZ.__initStatic(),tZ.__initStatic2();class eZ extends qG{static __initStatic(){this.info={name:"Crypto.com | DeFi Wallet",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA4OS45IDEwMi44IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA4OS45IDEwMi44IiB4bWw6c3BhY2U9InByZXNlcnZlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiNGRkZGRkY7fQoJLnN0MXtmaWxsOiMwMzMxNkM7fQo8L3N0eWxlPgoKPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTUuMzc1MSAtMTEzLjYxKSI+Cgk8ZyB0cmFuc2Zvcm09Im1hdHJpeCguMzE3OTQgMCAwIC4zMTQ2NSAtMS4wNDczIDMwLjQ0NykiPgoJCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Im0xNjEuNiAyNjQuMy0xNDEuNCA4MS42djE2My4zbDE0MS40IDgxLjYgMTQxLjQtODEuNnYtMTYzLjNsLTE0MS40LTgxLjZ6bTAgMC0xNDEuNCA4MS42djE2My4zbDE0MS40IDgxLjYgMTQxLjQtODEuNnYtMTYzLjNsLTE0MS40LTgxLjZ6Ii8+CgkJPHBhdGggY2xhc3M9InN0MSIgZD0ibTIxNy41IDUyNy4xaC0yMC4xbC0yNC4xLTIyLjF2LTExLjNsMjQuOS0yMy44di0zNy43bDMyLjYtMjEuMyAzNy4xIDI4LjEtNTAuNCA4OC4xem0tODMuMy01OS42IDMuNy0zNS40LTEyLjItMzEuN2g3MmwtMTEuOSAzMS43IDMuNCAzNS40aC01NXptMTYuNCAzNy41LTI0LjEgMjIuNGgtMjAuNGwtNTAuNy04OC40IDM3LjQtMjcuOCAzMi45IDIxdjM3LjdsMjQuOSAyMy44djExLjN6bS00NC44LTE3MC4xaDExMS40bDEzLjMgNTYuN2gtMTM3LjdsMTMtNTYuN3ptNTUuOC03MC42LTE0MS40IDgxLjZ2MTYzLjNsMTQxLjQgODEuNiAxNDEuNC04MS42di0xNjMuM2wtMTQxLjQtODEuNnoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isDeficonnectProvider])}}eZ.__initStatic(),eZ.__initStatic2();class nZ extends qG{static __initStatic(){this.info={name:"HyperPay",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjA0LjcgMjAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyMDQuNyAyMDA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggZmlsbD0iIzFBNzJGRSIgZD0iTTEwMi41LDUuMkM1MC44LDUuMiw4LjgsNDcuMiw4LjgsOTlzNDIsOTMuNSw5My44LDkzLjVzOTMuOC00Miw5My44LTkzLjhTMTU0LjIsNS4yLDEwMi41LDUuMnogTTEyNy4yLDExOS4yCgljLTYuMiwwLTIxLjcsMC4zLTIxLjcsMC4zbC03LDI3aC0yOWw2LjgtMjYuNUgzMWw3LjItMjEuOGMwLDAsNzguOCwwLjIsODUuMiwwYzYuNS0wLjIsMTYuNS0xLjgsMTYuOC0xNC44YzAuMy0xNy44LTI3LTE2LjgtMjkuMi0xCgljLTEuNSwxMC0xLjUsMTIuNS0xLjUsMTIuNUg4My44bDUtMjMuNUg0N2w2LjMtMjJjMCwwLDYxLjIsMC4yLDcyLjgsMC4yczQyLjIsMyw0Mi4yLDMxLjJDMTY4LjIsMTEyLDEzOC41LDExOS4zLDEyNy4yLDExOS4yCglMMTI3LjIsMTE5LjJ6Ii8+Cjwvc3ZnPgo=",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isHyperPay])}}nZ.__initStatic(),nZ.__initStatic2();class rZ extends qG{static __initStatic(){this.info={name:"MetaMask",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0nTGF5ZXJfMScgZGF0YS1uYW1lPSdMYXllciAxJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA0ODUuOTMgNDUwLjU2Jz48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6IzgyODQ4Nzt9LmNscy0ye2ZpbGw6I2UyNzcyNjtzdHJva2U6I2UyNzcyNjt9LmNscy0xMCwuY2xzLTExLC5jbHMtMiwuY2xzLTMsLmNscy00LC5jbHMtNSwuY2xzLTYsLmNscy03LC5jbHMtOCwuY2xzLTl7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpb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jQ2LjAxJy8+PC9zdmc+",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isMetaMask])&&1==Object.keys(window.ethereum).filter((t=>t.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/))).length}}rZ.__initStatic(),rZ.__initStatic2();class iZ extends qG{static __initStatic(){this.info={name:"Opera",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA3NS42IDc1LjYiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIHRyYW5zZm9ybT0ibWF0cml4KDEuMzMzMyAwIDAgLTEuMzMzMyAwIDEwNy4yKSI+CiAgCiAgPGxpbmVhckdyYWRpZW50IGlkPSJvcGVyYUxvZ28wMDAwMDAxMjM1MTEiIHgxPSItMTA3LjM0IiB4Mj0iLTEwNi4zNCIgeTE9Ii0xMzcuODUiIHkyPSItMTM3Ljg1IiBncmFkaWVudFRyYW5zZm9ybT0ibWF0cml4KDAgLTczLjI1NyAtNzMuMjU3IDAgLTEwMDc1IC03Nzg0LjEpIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRkYxQjJEIiBvZmZzZXQ9IjAiLz4KICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGRjFCMkQiIG9mZnNldD0iLjMiLz4KICAgIDxzdG9wIHN0b3AtY29sb3I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4LjMgMCAxNC45LTkuNCAxNC45LTIwLjlzLTYuNy0yMC45LTE0LjktMjAuOWMtMy43IDAtNyAxLjktOS42IDQuOSA0LjEtNS4zIDEwLjEtOC42IDE2LjktOC42IDQuMiAwIDggMS4zIDExLjQgMy41IDUuOCA1LjIgOS41IDEyLjcgOS41IDIxLjFzLTMuNyAxNS45LTkuNSAyMS4xYy0zLjMgMi4yLTcuMiAzLjUtMTEuNCAzLjUtNi44IDAuMS0xMi44LTMuMy0xNi45LTguNiIgZmlsbD0idXJsKCNiKSIvPgo8L2c+Cjwvc3ZnPgo=",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isOpera])}}function oZ(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}iZ.__initStatic(),iZ.__initStatic2();const aZ=({transaction:t,wallet:e})=>t.instructions?uZ({transaction:t,wallet:e}):sZ({transaction:t,wallet:e}),sZ=async({transaction:t,wallet:e})=>{let n=new lF(await e.account()),r=new lF(t.to);const i=await CG(t.blockchain);let o=(await i.getLatestBlockhash()).blockhash,a=new xF({recentBlockhash:o,feePayer:n});return a.add(VF.transfer({fromPubkey:n,toPubkey:r,lamports:parseInt(QG.bigNumberify(t.value,t.blockchain),10)})),window.solana.signAndSendTransaction(a)},uZ=async({transaction:t,wallet:e})=>{let n=new lF(await e.account());const r=await CG(t.blockchain);let i=(await r.getLatestBlockhash()).blockhash,o=new xF({recentBlockhash:i,feePayer:n});return t.instructions.forEach((t=>{o.add(t)})),window.solana.signAndSendTransaction(o)};function cZ(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}class lZ{static __initStatic(){this.info={name:"Wallet (Solana)",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0NDYuNCAzNzYuOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDQ2LjQgMzc2Ljg7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojODI4NDg3O30KCS5zdDF7ZmlsbDp1cmwoI1NWR0lEXzFfKTt9Cgkuc3Qye2ZpbGw6dXJsKCNTVkdJRF8wMDAwMDE2NTIzNDE5NTQ5NTc2MDU4MDgwMDAwMDAwNjMwMzAwNDA2OTM1MjExODk1MV8pO30KCS5zdDN7ZmlsbDp1cmwoI1NWR0lEXzAwMDAwMDkyNDIyMzgxNjc5OTg1OTI5MTcwMDAwMDA2ODU0NzIyMTY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43YzAuMywwLjMsMC43LDAuNSwxLjEsMC41aDM4LjhjMC43LDAsMS4xLTAuOSwwLjYtMS40TDE0NS42LDE4OS4xeiIvPgo8L3N2Zz4K",blockchains:WG.solana}}static __initStatic2(){this.isAvailable=async()=>cZ([window,"optionalAccess",t=>t.solana])&&!cZ([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.isPhantom])&&!window.coin98}constructor(){this.name=this.constructor.info.name,this.logo=this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.sendTransaction=t=>(async({transaction:t,wallet:e})=>(t=new QG(t),await t.prepare({wallet:e}),await aZ({transaction:t,wallet:e}).then((({signature:e})=>{if(!e)throw"Submitting transaction failed!";{t.id=e,t.url=Ch.findByName(t.blockchain).explorerUrlFor({transaction:t}),t.sent&&t.sent(t);let n=0;const r=setInterval((async()=>{if(n++,n>=240)return clearInterval(r);const i=await CG(t.blockchain),{value:o}=await i.getSignatureStatus(e),a=oZ([o,"optionalAccess",t=>t.confirmationStatus]);if(a&&("confirmed"===a||"finalized"===a)){if(o.err){t._failed=!0;const n=await i.getConfirmedTransaction(e),r=oZ([n,"optionalAccess",t=>t.meta,"optionalAccess",t=>t.logMessages])?n.meta.logMessages[n.meta.logMessages.length-1]:null;t.failed&&t.failed(t,r)}else t._succeeded=!0,t.succeeded&&t.succeeded(t);return clearInterval(r)}}),500)}})),t))({wallet:this,transaction:t})}async account(){if(null!=cZ([window,"optionalAccess",t=>t.solana])){if(cZ([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.publicKey]))return window.solana.publicKey.toString();if(1!=cZ([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.isBraveWallet])){let t;try{({publicKey:t}=await window.solana.connect({onlyIfTrusted:!0}))}catch(t){}if(t)return t.toString()}}}async connect(){if(!cZ([window,"optionalAccess",t=>t.solana]))return;let{publicKey:t}=await window.solana.connect();return t.toString()}on(t,e){let n;if("account"===t)n=t=>e(cZ([t,"optionalAccess",t=>t.toString,"call",t=>t()])),window.solana.on("accountChanged",n);return n}off(t,e){if("account"===t)console.log("removeListener"),window.solana.removeListener("accountChanged",e);return e}async connectedTo(t){return"solana"==t}switchTo(t){return new Promise(((t,e)=>{e({code:"NOT_SUPPORTED"})}))}addNetwork(t){return new Promise(((t,e)=>{e({code:"NOT_SUPPORTED"})}))}async sign(t){const e=(new TextEncoder).encode(t),n=await window.solana.signMessage(e,"utf8");return JSON.stringify(n.signature)}}lZ.__initStatic(),lZ.__initStatic2();class hZ extends lZ{static __initStatic(){this.info={name:"Phantom",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iNjQiIGN5PSI2NCIgcj0iNjQiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcikiLz48cGF0aCBkPSJNMTEwLjU4NCA2NC45MTQySDk5LjE0MkM5OS4xNDIgNDEuNzY1MSA4MC4xNzMgMjMgNTYuNzcyNCAyM0MzMy42NjEyIDIzIDE0Ljg3MTYgNDEuMzA1NyAxNC40MTE4IDY0LjA1ODNDMTMuOTM2IDg3LjU3NyAzNi4yNDEgMTA4IDYwLjAxODYgMTA4SDYzLjAwOTRDODMuOTcyMyAxMDggMTEyLjA2OSA5MS43NjY3IDExNi40NTkgNzEuOTg3NEMxMTcuMjcgNjguMzQxMyAxMTQuMzU4IDY0LjkxNDIgMTEwLjU4NCA2NC45MTQyWk0zOS43Njg5IDY1Ljk0NTRDMzkuNzY4OSA2OS4wNDExIDM3LjIwOTUgNzEuNTcyOSAzNC4wODAyIDcxLjU3MjlDMzAuOTUwOSA3MS41NzI5IDI4LjM5MTYgNjkuMDM5OSAyOC4zOTE2IDY1Ljk0NTRWNTYuODQxNEMyOC4zOTE2IDUzLjc0NTcgMzAuOTUwOSA1MS4yMTM5IDM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;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.isPhantom])}}function dZ(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}hZ.__initStatic(),hZ.__initStatic2();class fZ extends qG{static __initStatic(){this.info={name:"Trust Wallet",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA5Ni41IDk2LjUiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDk2LjUgOTYuNSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgZmlsbD0iI0ZGRkZGRiIgd2lkdGg9Ijk2LjUiIGhlaWdodD0iOTYuNSIvPgo8cGF0aCBzdHJva2U9IiMzMzc1QkIiIHN0cm9rZS13aWR0aD0iNi4wNjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQgPSIxMCIgZmlsbD0ibm9uZSIgZD0ibTQ4LjUgMjAuMWM5LjYgOCAyMC42IDcuNSAyMy43IDcuNS0wLjcgNDUuNS01LjkgMzYuNS0yMy43IDQ5LjMtMTcuOC0xMi44LTIzLTMuNy0yMy43LTQ5LjMgMy4yIDAgMTQuMSAwLjUgMjMuNy03LjV6Ii8+Cjwvc3ZnPgo=",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>dZ([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isTrust])||dZ([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isTrustWallet])}}fZ.__initStatic(),fZ.__initStatic2();const pZ={ethereum:"mainnet",bsc:"bsc",polygon:"polygon"},mZ={ethereum:"eth",bsc:"bnb",polygon:"matic"};class gZ{constructor({address:t,blockchain:e}){this.address=t,this.blockchain=e}async transactionCount(){let t,e=await fetch(`https://safe-transaction-${pZ[this.blockchain]}.safe.global/api/v1/safes/${this.address}/all-transactions/`).then((t=>t.json())).catch((t=>{console.error("Error:",t)}));return t=e&&e.results&&e.results.length?e.results[0].nonce+1:parseInt((await RG({blockchain:this.blockchain,address:this.address,api:[{inputs:[],name:"nonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],method:"nonce"})).toString(),10),t}async retrieveTransaction({blockchain:t,tx:e}){const n=await CG(t);let r=await fetch(`https://safe-transaction-${pZ[t]}.safe.global/api/v1/multisig-transactions/${e}/`).then((t=>t.json())).catch((t=>{console.error("Error:",t)}));return r&&r.isExecuted&&r.transactionHash?await n.getTransaction(r.transactionHash):void 0}explorerUrlFor({transaction:t}){if(t)return`https://app.safe.global/${mZ[t.blockchain]}:${t.from}/transactions/tx?id=multisig_${t.from}_${t.id}`}}const yZ=async(t,e)=>{if(!await(async(t,e)=>{const n=await CG(t);return"0x"!=await n.getCode(e)})(t,e))return;const n=await(async(t,e)=>{let n;try{n=await RG({blockchain:t,address:e,api:[{constant:!0,inputs:[],name:"NAME",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"}],method:"NAME"})}catch(t){}if("Default Callback Handler"==n)return"Safe"})(t,e);if("Safe"==n)return new gZ({blockchain:t,address:e});if("Argent"==n)return new Argent({blockchain:t,address:e});if(smartContractWallet)throw{message:"Unrecognized smart contract wallet not supported!",code:"SMART_CONTRACT_WALLET_NOT_SUPPORTED"}},bZ=async({blockchain:t,tx:e,smartContractWallet:n})=>{const r=await CG(t);let i,o=async()=>{try{return n&&n.retrieveTransaction?await n.retrieveTransaction({blockchain:t,tx:e}):await r.getTransaction(e)}catch(t){}};for(i=await o();!i;)await new Promise((t=>setTimeout(t,3e3))),i=await o();return i},wZ=({transaction:t,wallet:e})=>t.method?vZ({transaction:t,wallet:e}):MZ({transaction:t,wallet:e}),vZ=async({transaction:t,wallet:e})=>{const n=await CG(t.blockchain),r=await n.getGasPrice();let i=await OG(t);const o=await t.getData(),a=t.value?yd(kd.from(t.value)):void 0,s=yd(t.nonce);return i=i.add(i.div(10)),e.connector.sendTransaction({from:t.from,to:t.to,value:a,data:o,gas:i.toHexString(),gasPrice:r.toHexString(),nonce:s})},MZ=async({transaction:t,wallet:e})=>{const n=await CG(t.blockchain),r=await n.getGasPrice(),i=await OG(t),o=yd(kd.from(t.value)),a=yd(t.nonce);return e.connector.sendTransaction({from:t.from,to:t.to,value:o,data:"0x",gas:i.toHexString(),gasPrice:r.toHexString(),nonce:a})};function LZ(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}const _Z="_DePayWeb3WalletsConnectedWalletConnectV1Instance";let NZ;const EZ=()=>NZ||(NZ=IZ((()=>{})),NZ),SZ=()=>new Promise((async(t,e)=>{if(setTimeout((()=>{t(!1)}),800),!localStorage.walletconnect||0==JSON.parse(localStorage.walletconnect).handshakeTopic.length)return delete localStorage.walletconnect,t(!1);let n,r=EZ();try{await r.sendCustomRequest({method:"eth_blockNumber"})?n=await r.sendCustomRequest({method:"eth_accounts"}):delete localStorage.walletconnect}catch(e){delete localStorage.walletconnect,t(!1)}return t(n&&n.length)})),xZ=async()=>window[_Z]?window[_Z]:await SZ()?new kZ:void 0,AZ=t=>{window[_Z]=t},IZ=t=>new UG({bridge:"https://walletconnect.depay.com",qrcodeModal:{open:async e=>t({uri:e}),close:()=>{}}});class kZ{static __initStatic(){this.info={name:"WalletConnect",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0ndXRmLTgnPz48IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMjUuNC4xLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAtLT48c3ZnIHZlcnNpb249JzEuMScgaWQ9J0xheWVyXzEnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZycgeG1sbnM6eGxpbms9J2h0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsnIHg9JzBweCcgeT0nMHB4JyB2aWV3Qm94PScwIDAgNTAwIDUwMCcgc3R5bGU9J2VuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTAwIDUwMDsnIHhtbDpzcGFjZT0ncHJlc2VydmUnPjxzdHlsZSB0eXBlPSd0ZXh0L2Nzcyc+IC5zdDB7ZmlsbDojNTk5MUNEO30KPC9zdHlsZT48ZyBpZD0nUGFnZS0xJz48ZyBpZD0nd2FsbGV0Y29ubmVjdC1sb2dvLWFsdCc+PHBhdGggaWQ9J1dhbGxldENvbm5lY3QnIGNsYXNzPSdzdDAnIGQ9J00xMDIuNywxNjJjODEuNS03OS44LDIxMy42LTc5LjgsMjk1LjEsMGw5LjgsOS42YzQuMSw0LDQuMSwxMC41LDAsMTQuNEwzNzQsMjE4LjkgYy0yLDItNS4zLDItNy40LDBsLTEzLjUtMTMuMmMtNTYuOC01NS43LTE0OS01NS43LTIwNS44LDBsLTE0LjUsMTQuMWMtMiwyLTUuMywyLTcuNCwwTDkxLjksMTg3Yy00LjEtNC00LjEtMTAuNSwwLTE0LjQgTDEwMi43LDE2MnogTTQ2Ny4xLDIyOS45bDI5LjksMjkuMmM0LjEsNCw0LjEsMTAuNSwwLDE0LjRMMzYyLjMsNDA1LjRjLTQuMSw0LTEwLjcsNC0xNC44LDBjMCwwLDAsMCwwLDBMMjUyLDMxMS45IGMtMS0xLTIuNy0xLTMuNywwaDBsLTk1LjUsOTMuNWMtNC4xLDQtMTAuNyw0LTE0LjgsMGMwLDAsMCwwLDAsMEwzLjQsMjczLjZjLTQuMS00LTQuMS0xMC41LDAtMTQuNGwyOS45LTI5LjIgYzQuMS00LDEwLjctNCwxNC44LDBsOTUuNSw5My41YzEsMSwyLjcsMSwzLjcsMGMwLDAsMCwwLDAsMGw5NS41LTkzLjVjNC4xLTQsMTAuNy00LDE0LjgsMGMwLDAsMCwwLDAsMGw5NS41LDkzLjUgYzEsMSwyLjcsMSwzLjcsMGw5NS41LTkzLjVDNDU2LjQsMjI1LjksNDYzLDIyNS45LDQ2Ny4xLDIyOS45eicvPjwvZz48L2c+PC9zdmc+Cg==",blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>null!=await xZ()}constructor(){this.name=localStorage[_Z+"_name"]&&"undefined"!=localStorage[_Z+"_name"]?localStorage[_Z+"_name"]:this.constructor.info.name,this.logo=localStorage[_Z+"_logo"]&&"undefined"!=localStorage[_Z+"_logo"]?localStorage[_Z+"_logo"]:this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.sendTransaction=t=>(async({transaction:t,wallet:e})=>{if(t=new QG(t),0==await e.connectedTo(t.blockchain))throw{code:"WRONG_NETWORK"};await t.prepare({wallet:e});const n=await yZ(t.blockchain,t.from);let r=await e.transactionCount({blockchain:t.blockchain,address:t.from});return t.nonce=r,await wZ({transaction:t,wallet:e}).then((e=>{if(!e)throw"Submitting transaction failed!";{let i=Ch.findByName(t.blockchain);t.id=e,t.url=n&&n.explorerUrlFor?n.explorerUrlFor({transaction:t}):i.explorerUrlFor({transaction:t}),t.sent&&t.sent(t),bZ({blockchain:t.blockchain,tx:e,smartContractWallet:n}).then((e=>{t.id=e.hash||t.id,t.url=i.explorerUrlFor({transaction:t}),t.nonce=e.nonce||r,e.wait(1).then((()=>{t._succeeded=!0,t.succeeded&&t.succeeded(t)})).catch((e=>{e&&e.code&&"TRANSACTION_REPLACED"==e.code?e.replacement&&e.replacement.hash&&e.receipt&&1==e.receipt.status?(t.id=e.replacement.hash,t._succeeded=!0,t.succeeded&&t.succeeded(t)):e.replacement&&e.replacement.hash&&e.receipt&&0==e.receipt.status&&(t.id=e.replacement.hash,t._failed=!0,t.failed&&t.failed(t,e)):(t._failed=!0,t.failed&&t.failed(t,e))}))}))}})),t})({wallet:this,transaction:t})}disconnect(){AZ(void 0),localStorage[_Z+"_name"]=void 0,localStorage[_Z+"_logo"]=void 0,NZ=void 0}newWalletConnectInstance(t){let e=IZ(t);return e.on("disconnect",((t,e)=>{if(this.disconnect(),t)throw t})),e.on("modal_closed",(()=>{AZ(void 0),this.connector=void 0})),e}async account(){let t;this.connector||(this.connector=EZ());try{t=await this.connector.sendCustomRequest({method:"eth_accounts"})}catch(t){}if(t&&t.length)return Mp(t[0])}async connect(t){let e=t&&t.connect?t.connect:({uri:t})=>{};try{if(this.connector=kZ.instance,null==this.connector&&(this.connector=this.newWalletConnectInstance(e)),t&&t.reconnect&&this.connector){try{await this.connector.killSession()}catch(t){}this.disconnect()}if(await SZ())return await this.account();{let{accounts:e,chainId:n}=await this.connector.connect();return LZ([t,"optionalAccess",t=>t.name])&&(localStorage[_Z+"_name"]=this.name=t.name),LZ([t,"optionalAccess",t=>t.logo])&&(localStorage[_Z+"_logo"]=this.logo=t.logo),e instanceof Array&&e.length?(AZ(this),e=e.map((t=>Mp(t))),e[0]):void 0}}catch(t){return void console.log("WALLETCONNECT ERROR",t)}}async connectedTo(t){let e=await this.connector.sendCustomRequest({method:"eth_chainId"});const n=Ch.findById(e);return t?t===n.name:n.name}switchTo(t){return new Promise(((e,n)=>{let r,i;const o=Ch.findByName(t);setTimeout((async()=>{await this.connectedTo(t)||r||i?e():n({code:"NOT_SUPPORTED"})}),3e3),this.connector.sendCustomRequest({method:"wallet_switchEthereumChain",params:[{chainId:o.id}]}).then((()=>{r=!0,e()})).catch((o=>{o&&"string"==typeof o.message&&o.message.match("addEthereumChain")?this.addNetwork(t).then((()=>this.switchTo(t).then((()=>{r=!0,e()})))).catch((()=>{i=!0,n({code:"NOT_SUPPORTED"})})):(i=!0,n({code:"NOT_SUPPORTED"}))}))}))}addNetwork(t){return new Promise(((e,n)=>{const r=Ch.findByName(t);this.connector.sendCustomRequest({method:"wallet_addEthereumChain",params:[{chainId:r.id,chainName:r.fullName,nativeCurrency:{name:r.currency.name,symbol:r.currency.symbol,decimals:r.currency.decimals},rpcUrls:[r.rpc],blockExplorerUrls:[r.explorer],iconUrls:[r.logo]}]}).then(e).catch(n)}))}on(t,e){let n;if("account"===t)n=(t,n)=>{if(n&&n.params&&n.params[0].accounts&&n.params[0].accounts instanceof Array){const t=n.params[0].accounts.map((t=>Mp(t)));e(t[0])}},this.connector.on("session_update",n);return n}off(t,e){if("account"===t)this.connector.off("session_update")}async transactionCount({blockchain:t,address:e}){const n=await yZ(t,e);return n?await n.transactionCount():await RG({blockchain:t,method:"transactionCount",address:e})}async sign(t){let e=await this.connectedTo(),n=await this.account();if(await yZ(e,n))throw{message:"Smart contract wallets are not supported for signing!",code:"SMART_CONTRACT_WALLET_NOT_SUPPORTED"};var r=[Hp(t),n];return await this.connector.signPersonalMessage(r)}}kZ.__initStatic(),kZ.__initStatic2(),kZ.getConnectedInstance=xZ,kZ.setConnectedInstance=AZ;const jZ=({transaction:t,provider:e,signer:n})=>t.method?TZ({transaction:t,signer:n,provider:e}):CZ({transaction:t,signer:n}),TZ=({transaction:t,signer:e,provider:n})=>{let r=new Tv(t.to,t.api,n),i=t.getContractArguments({contract:r}),o=r.connect(e)[t.method];return i?o(...i,{value:QG.bigNumberify(t.value,t.blockchain)}):o({value:QG.bigNumberify(t.value,t.blockchain)})},CZ=({transaction:t,signer:e})=>e.sendTransaction({to:t.to,value:QG.bigNumberify(t.value,t.blockchain)}),DZ=()=>window._connectedWalletLinkInstance,OZ=t=>{window._connectedWalletLinkInstance=t};class zZ{static __initStatic(){this.info={name:"Coinbase",logo:tZ.info.logo,blockchains:WG.evm}}static __initStatic2(){this.isAvailable=async()=>null!=DZ()}constructor(){this.name=this.constructor.info.name,this.logo=this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.connector=zZ.instance||this.newWalletLinkInstance(),this.sendTransaction=t=>(async({transaction:t,wallet:e})=>{if(t=new QG(t),0==await e.connectedTo(t.blockchain)&&await e.switchTo(t.blockchain),0==await e.connectedTo(t.blockchain))throw{code:"WRONG_NETWORK"};await t.prepare({wallet:e});let n=new qM(e.connector,"any"),r=n.getSigner(0);return await jZ({transaction:t,provider:n,signer:r}).then((e=>{if(!e)throw"Submitting transaction failed!";t.id=e.hash,t.nonce=e.nonce,t.url=Ch.findByName(t.blockchain).explorerUrlFor({transaction:t}),t.sent&&t.sent(t),e.wait(1).then((()=>{t._succeeded=!0,t.succeeded&&t.succeeded(t)})).catch((e=>{e&&e.code&&"TRANSACTION_REPLACED"==e.code?(e.replacement&&e.replacement.hash&&(t.id=e.replacement.hash,t.url=Ch.findByName(t.blockchain).explorerUrlFor({transaction:t})),e.replacement&&e.replacement.hash&&e.receipt&&1==e.receipt.status?(t._succeeded=!0,t.succeeded&&t.succeeded(t)):e.replacement&&e.replacement.hash&&e.receipt&&0==e.receipt.status&&(t._failed=!0,t.failed&&t.failed(t,e))):(t._failed=!0,t.failed&&t.failed(t,e))}))})),t})({wallet:this,transaction:t})}newWalletLinkInstance(){return new FG({}).makeWeb3Provider()}async account(){if(null!=this.connectedAccounts)return Mp(this.connectedAccounts[0])}async connect(t){(await this.connector._relayProvider()).setConnectDisabled(!1);let e=await this.connector.enable();return e instanceof Array&&e.length&&OZ(this),e=e.map((t=>Mp(t))),this.connectedAccounts=e,this.connectedChainId=await this.connector.getChainId(),e[0]}async connectedTo(t){let e=await this.connector.getChainId();const n=Ch.findByNetworkId(e);return t?t===n.name:n.name}switchTo(t){return new Promise(((e,n)=>{const r=Ch.findByName(t);this.connector.request({method:"wallet_switchEthereumChain",params:[{chainId:r.id}]}).then(e).catch((r=>{4902===r.code?this.addNetwork(t).then((()=>this.switchTo(t).then(e))).catch(n):n(r)}))}))}addNetwork(t){return new Promise(((e,n)=>{const r=Ch.findByName(t);this.connector.request({method:"wallet_addEthereumChain",params:[{chainId:r.id,chainName:r.fullName,nativeCurrency:{name:r.currency.name,symbol:r.currency.symbol,decimals:r.currency.decimals},rpcUrls:[r.rpc],blockExplorerUrls:[r.explorer],iconUrls:[r.logo]}]}).then(e).catch(n)}))}on(t,e){let n;if("account"===t)n=t=>e(Mp(t[0])),this.connector.on("accountsChanged",n);return n}off(t,e){if("account"===t)this.connector.removeListener("accountsChanged",e);return e}transactionCount({blockchain:t,address:e}){return RG({blockchain:t,method:"transactionCount",address:e})}async sign(t){await this.account();let e=new qM(this.connector,"any").getSigner(0);return await e.signMessage(t)}}zZ.__initStatic(),zZ.__initStatic2(),zZ.getConnectedInstance=DZ,zZ.setConnectedInstance=OZ;var PZ={MetaMask:rZ,Phantom:hZ,Coinbase:tZ,Binance:JG,Trust:fZ,Brave:KG,Opera:iZ,Coin98:XG,CryptoCom:eZ,HyperPay:nZ,WindowEthereum:qG,WindowSolana:lZ,WalletConnectV1:kZ,WalletLink:zZ};const RZ=async()=>{let t=await Promise.all(Object.keys(PZ).map((async t=>{let e=PZ[t];if(await e.isAvailable()){let t;return e.getConnectedInstance?(t=await e.getConnectedInstance(),t):new e}})));return t.filter((t=>t))};PZ.MetaMask,PZ.Phantom,PZ.Coinbase,PZ.Binance,PZ.Trust,PZ.Brave,PZ.Opera,PZ.Coin98,PZ.CryptoCom,PZ.HyperPay,PZ.WalletConnectV1,PZ.WalletLink,PZ.WindowEthereum;var BZ=function(t){var n,r=Z.useRef(),i=d(Z.useState(),2),o=i[0],a=i[1],s=d(Z.useState(),2),u=s[0],l=s[1],h=d(Z.useState(),2),f=h[0],p=h[1],m=d(Z.useState(),2);m[0],m[1];var g=d(Z.useState(!1),2),y=g[0],b=g[1],w=d(Z.useState(!1),2),v=w[0],M=w[1],L=d(Z.useState(),2),_=L[0],N=L[1];Z.useContext(uh).navigate;var E=Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},(null===(n=t.wallet)||void 0===n?void 0:n.logo)&&Z.createElement("div",{className:"PaddingTopXS"},Z.createElement("div",{className:"LineHeightL FontSizeL PaddingTopS"},Z.createElement("span",{className:"CardImage rounded large"},Z.createElement("img",{className:"transparent",src:t.wallet.logo}))))),S=function(){switch(t.wallet.link){case"WalletConnectV1":if(null==_){var e=new PZ[t.wallet.link];e.connect({name:t.wallet.name,logo:t.wallet.logo,reconnect:!0,connect:function(t){var e=t.uri,n=new yh({width:340,height:340,type:"svg",dotsOptions:{type:"extra-rounded"},cornersSquareOptions:{type:"rounded"},backgroundOptions:{color:"transparent"}});n.update({data:e}),N(n)}}).then((function(n){t.resolve(n,e)}))}break;case"WalletLink":var n=new PZ[t.wallet.link];n.connect().then((function(e){t.resolve(e,n)}))}};return Z.useEffect((function(){e(c.mark((function e(){var n,r;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=a,null===(n=t.wallet)||void 0===n||!n.extension){e.next=10;break}return e.next=4,PZ[t.wallet.extension].isAvailable();case 4:if(e.t2=e.sent,e.t2){e.next=7;break}e.t2=!1;case 7:e.t1=e.t2,e.next=11;break;case 10:e.t1=!1;case 11:if(e.t3=e.t1,(0,e.t0)(e.t3),e.t4=p,null===(r=t.wallet)||void 0===r||!r.link){e.next=23;break}return e.next=17,PZ[t.wallet.link].isAvailable();case 17:if(e.t6=e.sent,e.t6){e.next=20;break}e.t6=!1;case 20:e.t5=e.t6,e.next=24;break;case 23:e.t5=!1;case 24:e.t7=e.t5,(0,e.t4)(e.t7),l(!!mh(t.wallet));case 27:case"end":return e.stop()}}),e)})))()}),[]),Z.useEffect((function(){var e,n;void 0!==f&&b(!(o||fh()||null!==(e=t.wallet)&&void 0!==e&&null!==(n=e.desktop)&&void 0!==n&&n.native))}),[o,f]),Z.useEffect((function(){y&&t.wallet.link&&S()}),[y]),Z.useEffect((function(){y&&_&&r&&r.current&&(r.current.innerHTML="",_.append(r.current))}),[_]),Z.createElement(dh,{stacked:!0,header:E,body:Z.createElement("div",{className:"TextCenter"},Z.createElement("div",{className:"PaddingLeftL PaddingRightL"},Z.createElement("h1",{className:"LineHeightL Text FontSizeL FontWeightBold"},"Connect ",t.wallet.name)),Z.createElement("div",{className:"PaddingTopS"},Z.createElement("div",{ref:r,className:"QRCode"}),y&&Z.createElement("div",{className:"Opacity05 PaddingBottomXS"},Z.createElement("small",null,"Scan QR code with your wallet"))),Z.createElement("div",{className:"PaddingLeftL PaddingRightL PaddingTopL"},o&&Z.createElement("div",{className:"PaddingBottomXS"},t.showConnectExtensionWarning&&Z.createElement("div",{className:"PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("div",{className:"Alert"},Z.createElement("span",{className:"FontWeightBold PaddingBottomXS"},"You wallet extension window is already asking to connect. It might be hidden."))),Z.createElement("button",{onClick:function(){return t.connectExtension(t.wallet)},className:"Card small PaddingTopS PaddingRightXS PaddingBottomS PaddingLeftXS"},Z.createElement("span",{className:"PaddingTopXS PaddingRightXS PaddingLeftS"},Z.createElement("img",{className:"transparent ",title:"Connect your wallet",style:{height:"26px"},src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zy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sMy41LDEyLjksMC4yLDE0LjQtNS45bC0wLjEtMzUuNEwyMzMuMyw2OWwwLTAuOEwxNzIuOCw2OC4zeiIvPgo8L2c+Cjwvc3ZnPgo="})),Z.createElement("div",{className:"PaddingLeftS LineHeightXS"},Z.createElement("div",{className:"CardText FontWeightMedium"},"Connect extension")))),u&&Z.createElement("div",{className:"PaddingBottomXS"},Z.createElement("button",{onClick:function(){return t.connectViaRedirect(t.wallet)},className:"Card small PaddingTopS PaddingRightXS PaddingBottomS PaddingLeftXS"},Z.createElement("span",{className:"PaddingTopXS PaddingRightXS PaddingLeftS"},Z.createElement("img",{className:"transparent ",title:"Click to connect app",style:{height:"26px",width:"26px",borderRadius:"8px"},src:t.wallet.logo})),Z.createElement("div",{className:"PaddingLeftS LineHeightXS"},Z.createElement("div",{className:"CardText FontWeightMedium"},"Connect app")))),t.wallet.link&&(!y||"WalletLink"==t.wallet.link)&&Z.createElement("div",{className:"PaddingBottomXS"},Z.createElement("button",{onClick:function(){b(!0),t.wallet.link&&S()},className:"Card small PaddingTopS PaddingRightXS PaddingBottomS PaddingLeftXS"},Z.createElement("span",{className:"PaddingTopXS PaddingRightXS PaddingLeftS"},Z.createElement("img",{className:"transparent ",title:"Scan QR code to connect a mobile wallet",style:{height:"26px"},src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyAgUFVCTElDICctLy9XM0MvL0RURCBTVkcgMS4xLy9FTicgICdodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQnPgo8c3ZnIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDEwMDAgMTAwMCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMWUzIDFlMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3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MTA2LjR2LTExMDYuNGgtMTEwNi40djExMDYuNGgtMTEwNi40di01NTN6bTMzMTkuMy0xMTA2LjV2LTU1My4yaC0xMTA2LjR2LTExMDYuNGgtMTEwNi40djExMDYuNGgxMTA2LjR2MTEwNi40aDExMDYuNHYtNTUzLjJ6Ii8+PC9nPgo8L3N2Zz4K"})),Z.createElement("div",{className:"PaddingLeftS LineHeightXS"},Z.createElement("div",{className:"CardText FontWeightMedium"},"Scan QR code")))),t.wallet.link&&"WalletConnectV1"==t.wallet.link&&Z.createElement("div",{className:"PaddingBottomXS TooltipWrapper"},Z.createElement("button",{onClick:function(){var e=new PZ[t.wallet.link];e.connect({name:t.wallet.name,logo:t.wallet.logo,reconnect:!0,connect:function(t){!
|
|
115
115
|
/*!
|
|
116
116
|
* @uiw/copy-to-clipboard v1.0.12
|
|
117
117
|
* Copy to clipboard.
|
|
@@ -172,4 +172,4 @@ function FV(){return FV=Object.assign?Object.assign.bind():function(t){for(var e
|
|
|
172
172
|
* LICENSE.md file in the root directory of this source tree.
|
|
173
173
|
*
|
|
174
174
|
* @license MIT
|
|
175
|
-
*/var tq="undefined"!=typeof document?Z.useLayoutEffect:Z.useEffect;function eq(t){return function(t){var e=Z.useReducer((function(){return{}}),{})[1],n=FV({},t,{onChange:function(n){e(),null==t.onChange||t.onChange(n)}}),r=Z.useState((function(){return new XV(n)}))[0];return r.setOptions(n),Z.useEffect((function(){return r._didMount()}),[]),tq((function(){return r._willUpdate()})),r}(FV({observeElementRect:VV,observeElementOffset:qV,scrollToFn:KV},t))}function nq(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var rq=function(t){var e=Z.useRef(),n=new YV(K,{keys:["name"],threshold:.3,ignoreFieldNorm:!0}),r=d(Z.useState(K),2),i=r[0],o=r[1],a=eq({count:i.length,getScrollElement:function(){return e.current},estimateSize:function(){return 61}});return Z.useEffect((function(){var r=n.search(t.searchTerm).map((function(t){return t.item}));e.current&&e.current.scrollTo(0,0),t.searchTerm.length?o(r):o(K)}),[t.searchTerm]),Z.createElement("div",{ref:e,className:"DialogBody ScrollHeightM PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("div",{style:{height:"".concat(a.getTotalSize(),"px"),width:"100%",position:"relative"}},a.getVirtualItems().map((function(e){return Z.createElement("div",{key:e.key,style:{position:"absolute",top:0,left:0,width:"100%",height:"".concat(e.size,"px"),transform:"translateY(".concat(e.start,"px)")}},Z.createElement("div",{className:"PaddingBottomXS"},Z.createElement("button",{type:"button",className:"Card small",title:"Connect ".concat(i[e.key].name),onClick:function(){t.onClickWallet(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nq(Object(n),!0).forEach((function(e){HZ(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nq(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},i[e.key]))}},Z.createElement("div",{className:"CardImage"},Z.createElement("img",HZ({className:"transparent",src:i[e.key].logo},"className","WalletLogoS"))),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper PaddingLeftXS LineHeightXS"},Z.createElement("div",{className:"CardText"},i[e.key].name))))))}))))};function iq(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function oq(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?iq(Object(n),!0).forEach((function(e){HZ(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):iq(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var aq=function(t){var e=d(Z.useState(""),2),n=e[0],r=e[1],i=d(Z.useState(),2),o=i[0],a=i[1],s=d(Z.useState(!1),2),u=s[0],c=s[1],l=d(Z.useState(!1),2),h=l[0],f=l[1],p=Z.useRef(),m=Z.useContext(uh).navigate,g=function(e,n){"detected"==e.via?"app"==e.connectionType?(n.account().then((function(e){e&&t.resolve(e,n)})),t.setWallet(e),m("ConnectWallet")):"extension"==e.connectionType&&(t.setWallet(e),t.connectExtension(e),m("ConnectWallet")):(t.connectViaRedirect(e),t.setWallet(e),m("ConnectWallet"))};return Z.useEffect((function(){RZ().then((function(t){var e={},n=function(t,n,r,i){if(e[t.name]&&"previouslyConnected"==r)return null;e[t.name]=!0;var o="app";return i&&i.constructor&&![PZ.WalletConnectV1,PZ.WalletLink].includes(i.constructor)&&(o="extension"),Z.createElement("div",{key:n,className:"PaddingBottomXS"},Z.createElement("button",{type:"button",className:"Card small",title:"Connect ".concat(t.name),onClick:function(){return g(oq(oq({},t),{},{via:r,connectionType:o}),i)}},Z.createElement("div",{className:"CardImage"},Z.createElement("img",HZ({className:"transparent",src:t.logo},"className","WalletLogoS"))),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper PaddingLeftXS LineHeightXS"},Z.createElement("div",{className:"CardText FontWeightMedium"},t.name),"previouslyConnected"!=r&&Z.createElement("div",{className:"LightGreen"},Z.createElement("span",{className:"LightGreen",style:{fontSize:"70%",top:"-1px",position:"relative"}},"●")," Connect detected ",o),"previouslyConnected"==r&&Z.createElement("div",{className:"Opacity05"},Z.createElement("span",{style:{fontSize:"70%",top:"-1px",position:"relative"}},"●")," Previously connected")))))},r=t.map((function(t,e){if("Phantom"!=t.name){var r=K.find((function(e){return e.name==t.name}));return r?n(r,e,"detected",t):void 0}})).filter((function(t){return!!t})),i=localStorage[bh],o=K.find((function(t){return t.name==i}))||K.find((function(t){return t.name==i}));o&&o&&r.push(n(o,r.length+1,"previouslyConnected")),a(r)}))}),[]),Z.useEffect((function(){setTimeout((function(){f(!0),fh()||p.current&&(p.current.click(),p.current.focus())}),200)}),[]),Z.createElement(dh,{header:Z.createElement("div",null,Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Connect a wallet")),o&&Z.createElement("div",{className:"PaddingBottomXS PaddingLeftS PaddingRightS PaddingTopS"},o),Z.createElement("div",{className:"PaddingBottomXS PaddingLeftS PaddingRightS PaddingTopXS"},Z.createElement("div",{className:"Row"},Z.createElement("input",{className:"Search",value:n,onChange:function(t){r(t.target.value)},placeholder:"Search by name",ref:p})))),alternativeHeaderAction:Z.createElement("span",{className:"DropDownWrapper"},Z.createElement("button",{type:"button",onClick:function(){return c(!u)},className:"ButtonCircular",title:"More options"},Z.createElement(ZZ,null)),u&&Z.createElement(GZ,{hide:function(){return c(!1)},items:[{label:"What is a wallet?",action:function(){m("WhatIsAWallet")}}]})),bodyClassName:"PaddingBottomXS",body:Z.createElement("div",{className:"ScrollHeightM PaddingTopXS"},h&&Z.createElement(rq,{setWallet:t.setWallet,searchTerm:n,onClickWallet:g})),hideFooter:!0})},sq="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAHQCAMAAADgcCJ6AAAAXVBMVEVHcEwiGxq6jYEwExPTf2RKx+4uEhLSf2PSfmMvEhJKx+7UgWYvEhIvEhJOJyJrOzGHTkCdX023Y07Ab1bOd1/SgGPXhWhKx+7gm3roq5j/u6nx3mbu1MT37OL///+EeM1aAAAADXRSTlMADSZMUmqDg6y4udfdNJi0SgAAHCNJREFUeNrsndl6qjAUhU1KBIM4hej7v2lBxSBTgATF7PXflc+eVtfaY6BnAwAAAAAAAAAAAAAAAOBH4ELKW4GUgm8AMQr1bzXgAVpU6r97YANowO/ywwJUMfK3LYBCEDz8NgiSQOCImwW5AQFT6A8HEOapP6oAUQr94QDCiNtI2AYECHvKizaAKPI2GqwDAqRYACAFUKboAJACKPOUFoMAUXhvu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FIe0kdfFiiQUXkMemfY8WNA8g7K+1DdjumBTg35rz9xH6w6Cex6oFrQ3b+rfJITt8/E9Va0CbpZ97XYbfQn685FdbuXVQ5UzCvZf6vwfZIHK85Fdc3sglF0pTqNdgPp7qw/G6MNEvqg+xG9Wome+71LQBlBOeHedYHM0CmtFeNV/359ff2pX+MdBigWVlWjH0ZuS+4zy59dl1TfvD8FwfzVayK/dQVExb+AYxJwaFrvFh6TgEPjHeDMP0NARryX8dADHhtv/bwdBLLineDoAQ/O1MPl+zzIzDSC8yUIyMxcw7P1ECAzngrW6AEPzpzh2dYRQG4GRZtvJRFkZuoC8+0lgMxMIZ6ngIACmLvADB8GRTBrmGUSCUpgSvEcDQQogmkxN/1nQSG0gwI94GmZ63jy/gFkpW7avm/bhpGKu72jDl5XV2tghaPQ9PSyjMkAzf4esG7p3WuwwAFg08uTA7w0p/8WfUj88hXgyBjRa/ohzHsT2UAsHKC4wAcFwPS0gw7mfu160DvgPynfxwHM4hPNoKW2VMvuSgwuyAoz0A9aGqNc7GITJRQB8EBWTPrXg8EAZswGIMa/ggdywvYYoHU3QD/oqeGAvLAyEwAWSIVZNrthSzi3kz0MkJkN2UIFwG8R0MAAmXGWrZ81CxICDYMBMrOlWt2u1Tem//bF+lUvWTMYIDsWso37d2ozcBQ/AHUzXU5dDfoXAfPm8v0nwIWgfx6Cy8QukP9gOI/5KJeF9HmJqJAhEy7YEC6LtTzYsgcAAAAAAAAAAAAAAAAAAAAAAAD0/AOU5ijBfZTOtQAAAABJRU5ErkJggg==",uq=function(t){return Z.createElement(dh,{stacked:!0,header:Z.createElement("div",null,Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextCenter"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"What is a wallet?"))),body:Z.createElement("div",{className:"TextCenter PaddingLeftL PaddingRightL PaddingTopS"},Z.createElement("div",{className:"GraphicWrapper"},Z.createElement("img",{className:"Graphic",src:sq})),Z.createElement("p",{className:"FontSizeM PaddingTopS PaddingLeftM PaddingRightM"},"Wallets are used to send, receive, and store digital assets. Wallets come in many forms. They are either built into your browser, an extension added to your browser, a piece of hardware plugged into your computer or even an app on your phone."),Z.createElement("div",{className:"PaddingTopS"},Z.createElement("a",{className:"Link",href:"https://ethereum.org/wallets/",target:"_blank",rel:"noopener noreferrer"},"Learn more")))})},cq=function(t){var e=Z.useContext(V),n=e.open,r=e.close,i=d(Z.useState(),2),o=i[0],a=i[1],s=d(Z.useState({blockchain:void 0}),2),u=s[0];s[1];var c=d(Z.useState(!1),2),l=c[0],h=c[1],f=function(e,n){if(e&&n){var i=K.find((function(t){return t.extension==n.name}))||K.find((function(t){return t.name==n.name}));wh(i.name),t.autoClose&&r(),t.resolve&&t.resolve({account:e,wallet:n})}},p=function(t){h(!1),(t=new PZ[t.extension]).connect().then((function(e){f(e,t)})).catch((function(t){-32002==(null==t?void 0:t.code)&&h(!0)}))},m=function(t,e,n){if(t.universal){var r=function(t){return t.endsWith("/")&&(t=t.slice(0,-1)),t}(t.universal);return localStorage.setItem("WALLETCONNECT_DEEPLINK_CHOICE",JSON.stringify({href:r,name:n})),r="".concat(r,"/wc?uri=").concat(encodeURIComponent(e)),window.open(r,"_self","noreferrer noopener")}},g=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=mh(t);if(n)if("WalletConnectV1"==t.link){var r=new PZ[t.link];r.connect({name:t.name,logo:t.logo,reconnect:e,connect:function(e){var r=e.uri,i=ph()?"Android":t.name;UZ()?n.universal?m(n,r,i):ph()&&function(t,e,n){var r="wc://";localStorage.setItem("WALLETCONNECT_DEEPLINK_CHOICE",JSON.stringify({href:r,name:n})),r=!1!==t.encoded?"".concat(r,"wc?uri=").concat(encodeURIComponent(e)):"".concat(r,"wc?uri=").concat(e),window.open(r,"_self","noreferrer noopener")}(n,r,i):n.native?function(t,e,n){if(t.native){var r=function(t){return t.includes("://")||(t=t.replaceAll("/","").replaceAll(":",""),t="".concat(t,"://")),t}(t.native);localStorage.setItem("WALLETCONNECT_DEEPLINK_CHOICE",JSON.stringify({href:r,name:n})),r=!1!==t.encoded?"".concat(r,"wc?uri=").concat(encodeURIComponent(e)):"".concat(r,"wc?uri=").concat(e),window.open(r,"_self","noreferrer noopener")}}(n,r,i):m(n,r,i)}}).then((function(t){f(t,r)}))}else"WalletLink"==t.link&&(wh(t.name),ph()||UZ()?window.open("".concat(n.universal,"?cb_url=").concat(encodeURIComponent(window.location.toString())),"_self","noreferrer noopener"):window.open("".concat(n.native,"?url=").concat(encodeURIComponent(window.location.toString())),"_self","noreferrer noopener"))};return Z.createElement("div",null,Z.createElement(hh,{open:n,close:r,start:"SelectWallet",container:t.container,document:t.document,dialogs:{SelectWallet:Z.createElement(aq,{setWallet:a,resolve:f,connectViaRedirect:g,connectExtension:p}),WhatIsAWallet:Z.createElement(uq,null),ConnectWallet:Z.createElement(BZ,{selection:u,wallet:o,resolve:f,connectViaRedirect:g,connectExtension:p,showConnectExtensionWarning:l})}}),Z.createElement(YZ,null))},lq=function(t){return void 0===t?window.document:t};function hq(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,QZ(r.key),r)}}function dq(t,e){return dq=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dq(t,e)}function fq(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function pq(t){return pq=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pq(t)}var mq=Z.createContext(),gq="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAGHCAMAAADx+xo1AAAAeFBMVEVHcEweFhTcf2s2ERDegW3egWw1EBDbg2s1EBD/h4fSfWM1EBDTf2T/h4fTf2Q1EBDVgmYvE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kEgnApEqQHnIBDOiugKwXMQCOvHkWrA8/thy2jGmEoOYSG4FQRmFzC6GTEWgs9IZgKMXs3BqwErpJsQh4FOAUc7TkoDzgiiAvFtBpgRsqeLWgPOGN+QqDXgjPFdOdpC8AwF+4SE/9u7gxWHYRiKonkITMAL4///2XEndFzquEEhBJW5Z9GNQV3o2VEaaBrTMMx5h0fZow6Xgu/SXqJRN9menTx1+5jysw73A1/ESu3K78e50eG1TpT/4MdIi15ZHck9Aw6KSQspCEXd5/5Xc5ZNdVT6d0R5K8t/pplcd6S24DlI1rpjfayQghA0ZfVz75bBUYq6tkAGQtBgsnf7COdT6uQcIQMhhAoACbidYgWABNxN8s4AJp80mQFIQAhyHgHZ5JXKzgFAAKLwJKCsvf0elt/q0P84jrZvLlvP8toe5Jxnaf2r1NpPAAI5bp6ZrrFVov/B6KT5L4DXVcQ9Lm+UXHg2FMIlnfecCQt9D4jtCQAAAAAAAAAAAABvfgCECMuQGDaxMAAAAABJRU5ErkJggg==";function yq(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=pq(t);if(e){var i=pq(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return fq(this,n)}}var bq,wq=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dq(t,e)}(o,Z.Component);var e,n,r,i=yq(o);function o(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,t)}return e=o,n=[{key:"componentDidCatch",value:function(t,e){t.error&&(t=t.error),this.props.setError(t)}},{key:"render",value:function(){return this.props.children}}],n&&hq(e.prototype,n),r&&hq(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(),vq=function(t){var e=d(Z.useState(t.error),2),n=e[0],r=e[1],i=d(Z.useState(!0),2),o=i[0],a=i[1],s=function(e){e.error&&(e=e.error),r(e),t.errorCallback&&t.errorCallback(e.message||e.toString())},u=function(){a(!1),setTimeout(t.unmount,300)};return n?Z.createElement(ah,{container:t.container,close:u,open:o},Z.createElement("div",{className:"Dialog ReactDialogAnimation"},Z.createElement("div",{className:"DialogHeader"},Z.createElement("div",{className:"PaddingTopS PaddingLeftS PaddingRightS"})),Z.createElement("div",{className:"DialogBody TextCenter"},Z.createElement("div",{className:"GraphicWrapper PaddingTopS"},Z.createElement("img",{className:"Graphic",src:gq})),Z.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Oops, Something Went Wrong"),Z.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("div",{className:"PaddingLeftS PaddingRightS"},Z.createElement("pre",{className:"ErrorSnippetText"},n.message||n.toString())),Z.createElement("div",{className:"PaddingTopS PaddingBottomS"},Z.createElement("strong",{className:"FontSizeM PaddingTopS"},"If this keeps happening, please report it.")))),Z.createElement("div",{className:"DialogFooter"},Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:"ButtonPrimary",onClick:u},"Try again"))))):Z.createElement(mq.Provider,{value:{setError:s,errorCallback:t.errorCallback}},Z.createElement(wq,{setError:s},t.children))},Mq=function(t){return"\n\n .ButtonCircular {\n border-radius: 9999px;\n border: 1px solid transparent;\n cursor: pointer;\n height: 34px;\n opacity: 0.5;\n padding: 5px 4px 4px 4px;\n width: 34px;\n }\n\n .ButtonCircular:focus {\n border: 1px solid ".concat(t.colors.primary,";\n }\n\n .ButtonCircular:hover {\n background: rgba(0,0,0,0.1);\n opacity: 1;\n }\n\n .ButtonCircular:active {\n background: rgba(0,0,0,0.25);\n opacity: 1;\n }\n ")},Lq=function(t){return"\n\n .ButtonPrimary {\n align-items: center;\n align-self: center;\n background: ".concat(t.colors.primary,";\n border-radius: 13px;\n border: 1px solid transparent;\n box-shadow: 0 0 16px rgba(0,0,0,0.1);\n font-size: 22px;\n font-weight: 400;\n line-height: 40px;\n height: 58px;\n justify-content: center;\n width: 100%;\n overflow: hidden;\n padding: 7px 0;\n position: relative;\n text-align: center;\n text-decoration: none;\n text-overflow: ellipsis;\n transition: background 0.1s;\n vertical-align: middle;\n display: inline-block;\n }\n\n .ButtonPrimary, .ButtonPrimary * {\n color: ").concat(t.colors.buttonText,";\n }\n\n .ButtonPrimary.disabled {\n background: rgb(210,210,210);\n color: rgb(140,140,140);\n }\n\n .ButtonPrimary:not(.disabled){\n cursor: pointer;\n }\n .ButtonPrimary:not(.disabled):hover {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.1);\n }\n .ButtonPrimary:not(.disabled):active {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.2);\n }\n ")},_q=function(t){return"\n\n .Card {\n align-items: center;\n background: rgb(255,255,255);\n border: 1px solid transparent;\n border-radius: 13px;\n box-shadow: 0 0 8px rgba(0,0,0,0.03);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n margin-bottom: 8px;\n min-height: 76px;\n padding: 16px 10px;\n width: 100%;\n }\n\n .Card:focus {\n border: 1px solid ".concat(t.colors.primary,";\n }\n\n .Card.center {\n justify-content: center;\n }\n\n .Card.Row {\n border-radius: 0;\n margin-bottom: 0;\n box-shadow: none;\n min-height: 69px;\n padding: 7px 21px;\n border-top: 1px solid rgba(0,0,0,0.05);\n }\n\n .Card.Row .CardText {\n font-size: 19px;\n line-height: 40px;\n }\n\n .CardTokenSymbol {\n width: 40%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .CardTokenFullName {\n width: 100%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .CardTokenName {\n text-align: right;\n opacity: 0.5;\n width: 60%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n .Card.Row .CardTokenName .CardText {\n font-size: 17px;\n }\n\n .Card.Row .CardImage {\n width: 40px;\n }\n\n .Card.Row .CardImage img {\n height: 30px;\n width: 30px;\n }\n\n a.Card, a.Card * {\n color: inherit;\n text-decoration: none;\n }\n\n .Card.transparent {\n background: none;\n box-shadow: none;\n }\n\n .Card.small {\n min-height: auto;\n padding: 8px 8px;\n margin: 0;\n }\n\n .CardImage.small {\n width: 27px;\n }\n\n .CardImage.small img {\n height: 27px;\n width: 27px;\n }\n\n .CardImage.large {\n width: 58px;\n }\n\n .CardImage.large img {\n height: 58px;\n width: 58px;\n }\n\n .Card.disabled {\n cursor: default;\n }\n\n .Card:hover:not(.disabled) {\n background: rgb(240,240,240);\n box-shadow: 0 0 0 rgba(0,0,0,0); \n }\n\n .Card:active:not(.disabled) {\n background: rgb(235,235,235);\n box-shadow: inset 0 0 6px rgba(0,0,0,0.02);\n color: inherit;\n }\n\n .Card:hover:not(.disabled) .CardAction {\n opacity: 0.4;\n }\n\n .CardImage, .CardBody, .CardAction, .CardInfo {\n align-items: center;\n display: flex;\n min-width: 0;\n padding: 0 7px;\n }\n\n .CardImage {\n display: inline-flex;\n flex-basis: auto;\n flex-grow: 0;\n flex-shrink: 0;\n justify-content: center;\n position: relative;\n width: 58px;\n }\n\n .CardBody {\n flex-basis: auto;\n flex-grow: 1;\n flex-shrink: 1;\n line-height: 27px;\n padding-left: 10px;\n text-align: left;\n }\n\n .CardBodyWrapper {\n min-width: 0;\n }\n\n .CardAction {\n flex-basis: auto;\n flex-shrink: 0;\n flex-grow: 0;\n padding-right: 0;\n margin-left: auto;\n }\n\n .Card.disabled .CardAction {\n opacity: 0; \n }\n\n .CardInfo {\n display: flex;\n flex-basis: auto;\n flex-direction: column;\n flex-grow: 0;\n flex-shrink: 1;\n justify-content: center;\n margin-left: auto; \n padding-right: 0;\n }\n\n .CardImage img {\n background: white;\n border-radius: 9999px;\n border: 1px solid white;\n box-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n height: 45px;\n position: relative;\n vertical-align: middle;\n width: 45px;\n }\n\n .CardImage.rounded img {\n border-radius: 8px !important;\n }\n\n .CardImage.square img {\n border-radius: 0;\n }\n\n .CardImage img.transparent {\n border: none;\n background: none;\n box-shadow: none;\n }\n \n .CardImage .BlockchainLogo {\n position: absolute;\n bottom: 0;\n right: 0;\n }\n\n .CardTitle {\n font-size: 15px;\n color: rgb(150,150,150);\n line-height: 20px;\n }\n \n .CardText, a .CardText {\n color: ").concat(t.colors.text,";\n flex: 1;\n font-size: 21px;\n line-height: 26px;\n }\n\n .CardText strong {\n font-weight: 500;\n }\n\n .CardText.small, .CardText.small small {\n font-size: 18px;\n color: rgb(150,150,150);\n line-height: 20px;\n }\n\n .CardAction {\n opacity: 0.2;\n }\n\n .Card.More {\n display: inline-block;\n text-align: center;\n }\n ")},Nq=function(t){return"\n\n .DropDownWrapper {\n position: relative;\n }\n\n .DropDown {\n background: rgb(240,240,240);\n border-radius: 8px;\n border: 1px solid rgb(230,230,230);\n box-shadow: 0 0 12px rgba(0,0,0,0.1);\n display: block;\n padding: 8px 6px;\n position: absolute;\n right: 0;\n z-index: 1000;\n }\n\n .DropDownItem {\n border: 1px solid transparent;\n border-radius: 6px;\n cursor: pointer;\n font-size: 17px;\n font-weight: 500;\n min-width: 160px;\n padding: 6px 10px;\n text-align: left;\n white-space: nowrap;\n }\n\n .DropDownItem:focus {\n border: 1px solid ".concat(t.colors.primary,";\n }\n\n .DropDownItem:hover {\n background: rgba(0,0,0,0.1);\n }\n \n .DropDownItem:active {\n background: rgba(0,0,0,0.15);\n }\n \n ")},Eq=function(t){return"\n\n *, div, div * {\n font-family: ".concat(t.fontFamily,";\n }\n\n * {\n font-size: 15px;\n }\n\n .FontSizeS {\n font-size: 16px;\n }\n\n .FontSizeM {\n font-size: 19px;\n }\n\n .FontSizeL {\n font-size: 23px;\n }\n\n .FontSizeXL {\n font-size: 32px;\n }\n\n .FontSizeXXL {\n font-size: 42px;\n }\n\n .FontWeightMedium {\n font-weight: 500;\n }\n\n .FontWeightBold {\n font-weight: bold;\n }\n\n .FontItalic {\n font-style: italic;\n }\n ")},Sq=function(t){return"\n\n .Icon {\n fill: ".concat(t.colors.icons,";\n stroke: ").concat(t.colors.icons,";\n }\n\n .QuestionMarkIcon {\n fill: transparent;\n }\n\n .ChevronLeft, .ChevronRight {\n position: relative;\n top: 1px;\n }\n\n .Checkmark {\n height: 24px;\n position: relative;\n top: -1px;\n vertical-align: middle;\n width: 24px;\n }\n\n .AlertIcon {\n height: 20px;\n position: relative;\n top: -1px;\n vertical-align: middle;\n width: 20px;\n fill: #e42626;\n stroke: transparent;\n }\n\n .CheckMark.small {\n height: 16px;\n width: 16px;\n }\n\n .DigitalWalletIcon {\n height: 24px;\n position: relative;\n top: -1px;\n vertical-align: middle;\n width: 24px;\n }\n\n .ButtonPrimary .Icon {\n fill : ").concat(t.colors.buttonText,";\n stroke : ").concat(t.colors.buttonText,";\n }\n\n .Loading {\n border: 3px solid ").concat(t.colors.primary,";\n border-top: 3px solid rgba(0,0,0,0.1);\n border-radius: 100%;\n position: relative;\n left: -1px;\n width: 18px;\n height: 18px;\n animation: spin 1.5s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n ")},xq=function(t){return"\n\n .Link {\n color: ".concat(t.colors.primary,";\n cursor: pointer;\n text-decoration: none;\n }\n\n .Link:hover {\n filter: brightness(0.8);\n }\n\n .Link:active {\n filter: brightness(1.0);\n }\n ")},Aq=function(t){return"\n\n .LoadingText {\n color: ".concat(t.colors.buttonText,";\n display: inline-block;\n text-decoration: none;\n }\n\n @keyframes blink {\n 0% { opacity: .2; }\n 20% { opacity: 1; }\n 100% { opacity: .2; }\n }\n \n .LoadingText .dot {\n animation-name: blink;\n animation-duration: 1.4s;\n animation-iteration-count: infinite;\n animation-fill-mode: both;\n }\n \n .LoadingText .dot:nth-child(2) {\n animation-delay: .2s;\n }\n \n .LoadingText .dot:nth-child(3) {\n animation-delay: .4s;\n }\n ")},Iq=function(t){return"\n\n .rangeslider {\n margin: 20px 0;\n position: relative;\n background: #e6e6e6;\n -ms-touch-action: none;\n touch-action: none;\n }\n\n .rangeslider,\n .rangeslider__fill {\n display: block;\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);\n }\n\n .rangeslider__handle {\n outline: none;\n cursor: pointer;\n display: inline-block;\n position: absolute;\n border-radius: 50%;\n background-color: "+t.colors.primary+";\n border: 1px solid white;\n box-shadow: 0 0 8px rgba(0,0,0,0.1);\n }\n\n .rangeslider__handle:hover {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.2);\n }\n\n .rangeslider__handle:active {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.3);\n }\n\n .rangeslider__active {\n opacity: 1;\n }\n\n .rangeslider__handle-tooltip {\n display: none;\n }\n\n .rangeslider-horizontal {\n height: 12px;\n border-radius: 10px;\n }\n\n .rangeslider-horizontal .rangeslider__fill {\n height: 100%;\n background-color: "+t.colors.primary+";\n border-radius: 10px;\n top: 0;\n }\n .rangeslider-horizontal .rangeslider__handle {\n width: 18px;\n height: 18px;\n border-radius: 30px;\n top: 50%;\n transform: translate3d(-50%, -50%, 0);\n }\n\n\n .rangeslider-horizontal .rangeslider__handle-tooltip {\n top: -55px;\n }\n\n "},kq=function(t){return"\n\n .Search {\n border-radius: 13px;\n border: 1px solid rgba(0,0,0,0.2);\n background: white;\n outline: none !important;\n color: ".concat(t.colors.text,";\n font-size: 19px;\n padding: 13px;\n width: 100%;\n }\n\n .Search::placeholder {\n color: rgb(180,180,180);\n } \n\n .Search:focus, .Search:focus-visible {\n border: 1px solid ").concat(t.colors.primary,";\n }\n\n ")},jq=function(t){return"\n\n .TextButton {\n cursor: pointer;\n font-size: 16px;\n color: ".concat(t.colors.primary,"\n }\n\n .TextButton:hover * {\n opacity: 1.0;\n }\n ")},Tq=function(t){return"\n\n * {\n color: ".concat(t.colors.text,";\n }\n\n .LightGreen {\n color: rgba(50,160,60);\n }\n\n h1, h2, h3, h4, h5, h6 {\n display: block;\n }\n\n .Text {\n font-size: 16px;\n line-height: 24px\n }\n\n .TextLeft, .TextLeft * {\n text-align: left !important;\n }\n\n .TextCenter, .TextCenter * {\n text-align: center;\n }\n\n .LineHeightXS {\n line-height: 16px;\n }\n\n .LineHeightL {\n line-height: 32px;\n }\n\n .ErrorSnippetText {\n background: rgb(30, 30, 20);\n border-radius: 19px;\n border: 8px solid rgb(30, 30, 20);\n color: #00FF41;\n font-size: 15px;\n font-style: italic;\n max-height: 100px;\n padding: 6px;\n overflow-wrap: break-word;\n overflow-y: auto;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n ")},Cq=function(t){return"\n\n .TooltipWrapper {\n position: relative;\n }\n\n .Tooltip {\n background: ".concat(t.colors.primary,";\n border-radius: 10px;\n color: ").concat(t.colors.buttonText,";\n padding: 10px 13px;\n position: relative;\n box-shadow: 0 0 8px rgba(0,0,0,0.2);\n }\n\n .Tooltip.absolute {\n position: absolute;\n }\n\n .Tooltip.top {\n top: -40px;\n }\n\n .TooltipArrowUp {\n border-bottom: 10px solid ").concat(t.colors.primary,";\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n height: 0; \n left: 12px;\n position: absolute;\n top: -8px;\n width: 0; \n }\n\n .TooltipArrowDown {\n border-top: 10px solid ").concat(t.colors.primary,";\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n height: 0; \n left: 12px;\n position: absolute;\n bottom: -8px;\n width: 0; \n }\n ")};bq=rh.createRoot;const Dq="ReactShadowDOMInsideContainer";const Oq="ReactShadowDOMOutsideContainer";function zq(t){return t.replace(/\s*[\r\n]\s*/g,"")}function Pq({document:t,element:e,content:n,outsideStyle:r="",insideStyle:i="",insideClasses:o=[]}){const a=function({document:t,element:e,style:n}){const r=t.createElement("div");return r.setAttribute("class",Oq),r.setAttribute("style",n),e.appendChild(r),r}({document:t,element:e,style:zq(r)}),s=function({document:t,shadow:e,style:n,classes:r=[]}){const i=t.createElement("div");if(i.setAttribute("class",[Dq].concat(r).join(" ")),e.appendChild(i),n&&n.length){const r=t.createElement("style");r.type="text/css",r.appendChild(t.createTextNode(n)),e.appendChild(r)}return i}({document:t,shadow:function(t){let e;return e=t.shadowRoot?t.shadowRoot:t.attachShadow({mode:"open"}),e}(a),style:zq(i),classes:o});"function"==typeof n&&(n=n(s));const u=bq(s);return u.render(n),{content:n,unmount:()=>function({insideRoot:t,outsideContainer:e}){t.unmount(),e.remove()}({insideRoot:u,outsideContainer:a})}}var Rq=function(t,e){var n=t.style,r=t.container,i=t.document,o=t.closed,a=function(t){var e,n;return t={colors:Object.assign({primary:"#ea357a",buttonText:"#ffffff",icons:"#000000",text:"#212529"},(null===(e=t)||void 0===e?void 0:e.colors)||{}),fontFamily:(null===(n=t)||void 0===n?void 0:n.fontFamily)||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'},["\n\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n text-align: inherit;\n vertical-align: baseline;\n }\n\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n\n body {\n line-height: 1;\n }\n\n ol, ul {\n list-style: none;\n }\n\n blockquote, q {\n quotes: none;\n }\n\n blockquote:before, blockquote:after,\n q:before, q:after {\n content: '';\n content: none;\n }\n \n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n * {\n box-sizing: border-box;\n }\n\n button {\n border: 0;\n background: none;\n outline: none;\n }\n\n ","\n\n .ReactDialogBackground {\n z-index: -2;\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .contained .ReactDialog {\n position: absolute;\n height: 100%;\n min-height: 100%;\n width: 100%;\n min-width: 100%;\n }\n\n .contained .ReactDialogBackground {\n position: absolute;\n }\n\n .contained .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n top: 0;\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.2);\n border-radius: 13px;\n background: rgb(248,248,248);\n }\n\n @media (max-width: 450px) {\n\n .Dialog {\n border-radius: 0;\n width: 100%;\n }\n }\n\n @media (orientation: portrait) and (max-width: 800px) {\n\n .ReactDialogAnimation {\n width: 100%;\n }\n\n .ReactDialog {\n height: 100%;\n min-height: 100%;\n }\n\n .ReactDialogStack {\n align-items: flex-end;\n }\n\n .Dialog {\n align-content: stretch;\n border-radius: 13px;\n border-top-radius: 13px;\n display: flex;\n flex-direction: column;\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogAnimation {\n margin-bottom: -100px !important;\n top: inherit !important;\n position: relative;\n transition: opacity 0.4s ease, margin-bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n margin-bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n align-items: flex-end;\n }\n }\n\n .DialogBody {\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .ScrollHeightS {\n height: 180px !important;\n max-height: 180px !important;\n }\n\n .ScrollHeightM {\n height: 194px !important;\n max-height: 194px !important;\n }\n\n .DialogBody.MinHeight {\n height: 120px !important;\n max-height: 120px !important;\n }\n\n .DialogHeader {\n border-top-left-radius: 13px;\n border-top-right-radius: 13px;\n min-height: 54px;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 48px;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 48px;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 13px;\n border-bottom-right-radius: 13px;\n line-height: 24px;\n min-height: 32px;\n position: relative;\n text-align: center;\n }\n\n ",Mq(t),Lq(t),_q(t),'\n\n .PoweredByWrapper {\n display: block;\n left: 0;\n padding-top: 3px;\n position: fixed;\n right: 0;\n text-align: center;\n top: 0;\n }\n\n .contained .PoweredByWrapper {\n position: absolute;\n }\n\n .PoweredByLink {\n color: white;\n display: inline-block;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;\n font-size: 14px;\n font-style: italic;\n font-weight: bold;\n letter-spacing: -0.2px;\n margin-left: 8px;\n opacity: 0.5;\n text-decoration: none;\n text-shadow: black 0 0 2px;\n }\n\n .PoweredByLink:hover, .PoweredByLink:active {\n opacity: 1.0;\n }\n ',"\n\n .QRCode {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: -10px;\n }\n ","\n\n .GraphicWrapper {\n display: block;\n }\n\n .Graphic {\n width: 50%;\n position: relative;\n }\n ","\n\n .Row {\n overflow: hidden;\n }\n\n .Column {\n float: left;\n }\n\n .Column2 {\n width: 16.66%;\n }\n\n .Column10 {\n width: 83.33%;\n }\n ","\n \n .Skeleton {\n background: rgb(230,230,230) !important;\n border: 0px solid transparent !important;\n box-shadow: none !important;\n cursor: inherit !important;\n line-height: 0;\n overflow: hidden;\n position: relative;\n }\n\n @keyframes SkeletonBackgroundAnimation {\n from {\n left: -500px;\n }\n to {\n left: +120%;\n }\n }\n\n .SkeletonBackground {\n animation: 2s SkeletonBackgroundAnimation 0.2s ease infinite;\n background: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.1) 50%, transparent 100%);\n height: 100%;\n left: -140%;\n position: absolute;\n top: 0;\n width: 400px;\n }\n\n .SkeletonWrapper {\n line-height: 0;\n }\n ","\n \n .TokenAmountRow {\n min-width: 0;\n width: 100%;\n display: flex;\n flex-direction: row;\n }\n \n .TokenAmountRow.small {\n font-size: 17px;\n line-height: 17px;\n }\n\n .TokenAmountRow.grey {\n opacity: 0.5;\n }\n\n .TokenAmountCell {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .TokenSymbolCell {\n }\n ",Tq(t),Eq(t),Sq(t),"\n\n .Opacity05 {\n opacity: 0.5;\n }\n ","\n\n .PaddingTopXS {\n padding-top: 3px;\n }\n\n .PaddingRightXS {\n padding-right: 3px;\n }\n\n .PaddingBottomXS {\n padding-bottom: 3px;\n }\n\n .PaddingLeftXS {\n padding-left: 3px; \n }\n\n .PaddingTopS {\n padding-top: 13px;\n }\n\n .PaddingRightS {\n padding-right: 13px;\n }\n\n .PaddingBottomS {\n padding-bottom: 13px;\n }\n\n .PaddingLeftS {\n padding-left: 13px; \n }\n\n .PaddingTopM {\n padding-top: 19px;\n }\n\n .PaddingRightM {\n padding-right: 19px;\n }\n\n .PaddingBottomM {\n padding-bottom: 19px;\n }\n\n .PaddingLeftM {\n padding-left: 19px; \n }\n\n .PaddingTopL {\n padding-top: 29px;\n }\n\n .PaddingRightL {\n padding-right: 29px;\n }\n\n .PaddingBottomL {\n padding-bottom: 29px;\n }\n\n .PaddingLeftL {\n padding-left: 29px; \n }\n ","\n\n .MaxHeight {\n max-height: 320px;\n overflow-y: auto;\n }\n ",Aq(t),Iq(t),"\n\n .Input {\n background: none;\n border: 1px solid transparent;\n margin: 0;\n outline: none !important;\n padding: 0 0 0 14px;\n width: 100%;\n }\n\n .Input::placeholder {\n color: rgb(210,210,210);\n }\n \n ",jq(t),"\n\n .MaxAmountImage {\n display: inline-block;\n padding-right: 6px;\n }\n \n .MaxAmountImage img {\n height: 16px;\n width: 16px;\n position: relative;\n top: 3px;\n }\n ","\n\n .BlockchainLogo {\n border-radius: 999px;\n }\n\n .BlockchainLogo.small {\n height: 18px;\n width: 18px;\n }\n ",kq(t),"\n\n .TokenImage img {\n border-radius: 9999px;\n border: 1px solid white;\n background: white;\n box-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n height: 45px;\n position: relative;\n vertical-align: middle;\n width: 45px;\n }\n\n .TokenImage.medium img {\n height: 93px;\n width: 93px;\n }\n ","\n\n .Alert {\n background: rgba(0,0,0,0.08);\n border-radius: 7px;\n font-weight: 500;\n padding: 8px;\n }\n ","\n\n .Table {\n border-collapse: separate;\n border-radius: 7px;\n border-style: hidden;\n border: 1px solid rgba(0,0,0,0.1);\n width: 100%;\n }\n\n .Table tr.small td {\n font-size: 14px;\n }\n\n .Table tr td {\n border-bottom: 1px solid rgba(0,0,0,0.1);\n word-break: break-all;\n }\n \n .Table tr:last-child td {\n border-bottom: none;\n }\n \n .Table tr td {\n padding: 8px 15px;\n text-align: left;\n }\n \n .Table tr td:first-child {\n width: 30%\n }\n\n .Table tr td:last-child {\n width: 70%\n }\n \n .Table .TableSubTitle {\n font-weight: 300;\n opacity: 0.7;\n }\n\n .Table tr td:last-child {\n font-weight: 500;\n }\n ",xq(t),Cq(t),"\n\n .WalletLogoS {\n background: none !important;\n border-radius: 8px !important;\n border: 1px solid transparent !important;\n box-shadow: none !important;\n height: 40px !important;\n width: 40px !important;\n }\n ",Nq(t)].join("")}(n);n&&n.css&&(a=[a,n.css].join(" "));var s;s=r?"\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ":"\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ";var u=Pq({document:i,element:r||i.body,content:e((function(){setTimeout((function(){u(),"function"==typeof o&&o()}),300)})),outsideStyle:s,insideStyle:a,insideClasses:r?["contained"]:[]}).unmount;return u},Bq=function(){if(parseInt(Z.version.split(".")[0])<17)throw"depay/widgets require at least React v17"},Uq=function(t){var e=d(Z.useState({}),2),n=e[0],r=e[1];return Z.createElement(FZ.Provider,{value:{selection:n,setSelection:r}},t.children)},Yq=function(t){var e=d(Z.useState(!0),2),n=e[0],r=e[1];return Z.createElement(q.Provider,{value:{updatable:n,setUpdatable:r}},t.children)},Fq=Z.createContext(),Wq=Z.createContext(),Qq=Z.createContext();function Hq(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Gq,Zq,Vq=function(t){var e=Hq(t).sort((function(t,e){if("0"==t.fromBalance||"0"==t.fromAmount)return-1;if("0"==e.fromBalance||"0"==e.fromAmount)return 1;var n=kd.from(t.fromBalance).div(kd.from(t.fromAmount)),r=kd.from(e.fromBalance).div(kd.from(e.fromAmount));return n.lt(r)?-1:r.lt(n)?1:0}));return e[e.length-1]},qq=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"up",r=parseFloat(t),i=r.toString().match(/\d+\.0*(\d{4})/);if(null!==(e=i)&&void 0!==e&&e.length){var o,a,s=(i=i[0]).match(/\d{4}$/)[0];return s.match(/^0/)?(o=parseFloat("".concat(s[1],".").concat(s[2]).concat(s[3])),a=parseFloat(o).toFixed(2),a="0".concat(a).replace(".","")):(o="up"==n?parseFloat("".concat(s[0],".").concat(s[1]).concat(s[2],"9")):parseFloat("".concat(s[0],".").concat(s[1]).concat(s[2],"1")),a=parseFloat(o).toFixed(2).replace(".","")),"0999"==a&&0==parseInt(r.toFixed(0))?(a="up"==n?"1000":"0999",parseFloat(i.replace(/\d{4}$/,a))):"1000"==a&&0==parseInt(r.toFixed(0))?parseFloat(i.replace(/\d{5}$/,a)):"0"!=a.toString()[0]&&a.toString().length>3?parseInt(r.toFixed(0)):parseFloat(i.replace(/\d{4}$/,a))}return parseFloat(r.toFixed(3))},Jq=Z.createContext(),Kq=o((function(t,e){(function(){var n,i="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",s=16,u=32,c=64,l=128,h=256,d=1/0,f=9007199254740991,p=NaN,m=4294967295,g=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",u],["partialRight",c],["rearg",h]],y="[object Arguments]",b="[object Array]",w="[object Boolean]",v="[object Date]",M="[object Error]",L="[object Function]",_="[object GeneratorFunction]",N="[object Map]",E="[object Number]",S="[object Object]",x="[object Promise]",A="[object RegExp]",I="[object Set]",k="[object String]",j="[object Symbol]",T="[object WeakMap]",C="[object ArrayBuffer]",D="[object DataView]",O="[object Float32Array]",z="[object Float64Array]",P="[object Int8Array]",R="[object Int16Array]",B="[object Int32Array]",U="[object Uint8Array]",Y="[object Uint8ClampedArray]",F="[object Uint16Array]",W="[object Uint32Array]",Q=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Z=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,q=RegExp(Z.source),J=RegExp(V.source),K=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,et=/^\w*$/,nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rt=/[\\^$.*+?()[\]{}|]/g,it=RegExp(rt.source),ot=/^\s+/,at=/\s/,st=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ut=/\{\n\/\* \[wrapped with (.+)\] \*/,ct=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/[()=,{}\[\]\/\s]/,dt=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,mt=/^[-+]0x[0-9a-f]+$/i,gt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,wt=/^(?:0|[1-9]\d*)$/,vt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mt=/($^)/,Lt=/['\n\r\u2028\u2029\\]/g,_t="\\ud800-\\udfff",Nt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Et="\\u2700-\\u27bf",St="a-z\\xdf-\\xf6\\xf8-\\xff",xt="A-Z\\xc0-\\xd6\\xd8-\\xde",At="\\ufe0e\\ufe0f",It="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",kt="['’]",jt="["+_t+"]",Tt="["+It+"]",Ct="["+Nt+"]",Dt="\\d+",Ot="["+Et+"]",zt="["+St+"]",Pt="[^"+_t+It+Dt+Et+St+xt+"]",Rt="\\ud83c[\\udffb-\\udfff]",Bt="[^"+_t+"]",Ut="(?:\\ud83c[\\udde6-\\uddff]){2}",Yt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+xt+"]",Wt="\\u200d",Qt="(?:"+zt+"|"+Pt+")",Ht="(?:"+Ft+"|"+Pt+")",Gt="(?:['’](?:d|ll|m|re|s|t|ve))?",Zt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Vt="(?:"+Ct+"|"+Rt+")"+"?",qt="["+At+"]?",Jt=qt+Vt+("(?:"+Wt+"(?:"+[Bt,Ut,Yt].join("|")+")"+qt+Vt+")*"),Kt="(?:"+[Ot,Ut,Yt].join("|")+")"+Jt,Xt="(?:"+[Bt+Ct+"?",Ct,Ut,Yt,jt].join("|")+")",$t=RegExp(kt,"g"),te=RegExp(Ct,"g"),ee=RegExp(Rt+"(?="+Rt+")|"+Xt+Jt,"g"),ne=RegExp([Ft+"?"+zt+"+"+Gt+"(?="+[Tt,Ft,"$"].join("|")+")",Ht+"+"+Zt+"(?="+[Tt,Ft+Qt,"$"].join("|")+")",Ft+"?"+Qt+"+"+Gt,Ft+"+"+Zt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Dt,Kt].join("|"),"g"),re=RegExp("["+Wt+_t+Nt+At+"]"),ie=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,oe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ae=-1,se={};se[O]=se[z]=se[P]=se[R]=se[B]=se[U]=se[Y]=se[F]=se[W]=!0,se[y]=se[b]=se[C]=se[w]=se[D]=se[v]=se[M]=se[L]=se[N]=se[E]=se[S]=se[A]=se[I]=se[k]=se[T]=!1;var ue={};ue[y]=ue[b]=ue[C]=ue[D]=ue[w]=ue[v]=ue[O]=ue[z]=ue[P]=ue[R]=ue[B]=ue[N]=ue[E]=ue[S]=ue[A]=ue[I]=ue[k]=ue[j]=ue[U]=ue[Y]=ue[F]=ue[W]=!0,ue[M]=ue[L]=ue[T]=!1;var ce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},le=parseFloat,he=parseInt,de="object"==typeof r&&r&&r.Object===Object&&r,fe="object"==typeof self&&self&&self.Object===Object&&self,pe=de||fe||Function("return this")(),me=e&&!e.nodeType&&e,ge=me&&t&&!t.nodeType&&t,ye=ge&&ge.exports===me,be=ye&&de.process,we=function(){try{var t=ge&&ge.require&&ge.require("util").types;return t||be&&be.binding&&be.binding("util")}catch(t){}}(),ve=we&&we.isArrayBuffer,Me=we&&we.isDate,Le=we&&we.isMap,_e=we&&we.isRegExp,Ne=we&&we.isSet,Ee=we&&we.isTypedArray;function Se(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function Ae(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ie(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function ke(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Te(t,e){return!!(null==t?0:t.length)&&Fe(t,e,0)>-1}function Ce(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function De(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Oe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function ze(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Pe(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Re(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Be=Ge("length");function Ue(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Ye(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Fe(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Ye(t,Qe,n)}function We(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Qe(t){return t!=t}function He(t,e){var n=null==t?0:t.length;return n?qe(t,e)/n:p}function Ge(t){return function(e){return null==e?n:e[t]}}function Ze(t){return function(e){return null==t?n:t[e]}}function Ve(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function qe(t,e){for(var r,i=-1,o=t.length;++i<o;){var a=e(t[i]);a!==n&&(r=r===n?a:r+a)}return r}function Je(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ke(t){return t?t.slice(0,mn(t)+1).replace(ot,""):t}function Xe(t){return function(e){return t(e)}}function $e(t,e){return De(e,(function(e){return t[e]}))}function tn(t,e){return t.has(e)}function en(t,e){for(var n=-1,r=t.length;++n<r&&Fe(e,t[n],0)>-1;);return n}function nn(t,e){for(var n=t.length;n--&&Fe(e,t[n],0)>-1;);return n}var rn=Ze({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),on=Ze({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(t){return"\\"+ce[t]}function sn(t){return re.test(t)}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function cn(t,e){return function(n){return t(e(n))}}function ln(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n];s!==e&&s!==a||(t[n]=a,o[i++]=n)}return o}function hn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function dn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function fn(t){return sn(t)?function(t){var e=ee.lastIndex=0;for(;ee.test(t);)++e;return e}(t):Be(t)}function pn(t){return sn(t)?function(t){return t.match(ee)||[]}(t):function(t){return t.split("")}(t)}function mn(t){for(var e=t.length;e--&&at.test(t.charAt(e)););return e}var gn=Ze({"&":"&","<":"<",">":">",""":'"',"'":"'"});var yn=function t(e){var r,at=(e=null==e?pe:yn.defaults(pe.Object(),e,yn.pick(pe,oe))).Array,_t=e.Date,Nt=e.Error,Et=e.Function,St=e.Math,xt=e.Object,At=e.RegExp,It=e.String,kt=e.TypeError,jt=at.prototype,Tt=Et.prototype,Ct=xt.prototype,Dt=e["__core-js_shared__"],Ot=Tt.toString,zt=Ct.hasOwnProperty,Pt=0,Rt=(r=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Bt=Ct.toString,Ut=Ot.call(xt),Yt=pe._,Ft=At("^"+Ot.call(zt).replace(rt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wt=ye?e.Buffer:n,Qt=e.Symbol,Ht=e.Uint8Array,Gt=Wt?Wt.allocUnsafe:n,Zt=cn(xt.getPrototypeOf,xt),Vt=xt.create,qt=Ct.propertyIsEnumerable,Jt=jt.splice,Kt=Qt?Qt.isConcatSpreadable:n,Xt=Qt?Qt.iterator:n,ee=Qt?Qt.toStringTag:n,re=function(){try{var t=fo(xt,"defineProperty");return t({},"",{}),t}catch(t){}}(),ce=e.clearTimeout!==pe.clearTimeout&&e.clearTimeout,de=_t&&_t.now!==pe.Date.now&&_t.now,fe=e.setTimeout!==pe.setTimeout&&e.setTimeout,me=St.ceil,ge=St.floor,be=xt.getOwnPropertySymbols,we=Wt?Wt.isBuffer:n,Be=e.isFinite,Ze=jt.join,bn=cn(xt.keys,xt),wn=St.max,vn=St.min,Mn=_t.now,Ln=e.parseInt,_n=St.random,Nn=jt.reverse,En=fo(e,"DataView"),Sn=fo(e,"Map"),xn=fo(e,"Promise"),An=fo(e,"Set"),In=fo(e,"WeakMap"),kn=fo(xt,"create"),jn=In&&new In,Tn={},Cn=Bo(En),Dn=Bo(Sn),On=Bo(xn),zn=Bo(An),Pn=Bo(In),Rn=Qt?Qt.prototype:n,Bn=Rn?Rn.valueOf:n,Un=Rn?Rn.toString:n;function Yn(t){if(ns(t)&&!Ha(t)&&!(t instanceof Hn)){if(t instanceof Qn)return t;if(zt.call(t,"__wrapped__"))return Uo(t)}return new Qn(t)}var Fn=function(){function t(){}return function(e){if(!es(e))return{};if(Vt)return Vt(e);t.prototype=e;var r=new t;return t.prototype=n,r}}();function Wn(){}function Qn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}function Hn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Zn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Vn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function qn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Vn;++e<n;)this.add(t[e])}function Jn(t){var e=this.__data__=new Zn(t);this.size=e.size}function Kn(t,e){var n=Ha(t),r=!n&&Qa(t),i=!n&&!r&&qa(t),o=!n&&!r&&!i&&ls(t),a=n||r||i||o,s=a?Je(t.length,It):[],u=s.length;for(var c in t)!e&&!zt.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vo(c,u))||s.push(c);return s}function Xn(t){var e=t.length;return e?t[qr(0,e-1)]:n}function $n(t,e){return zo(ki(t),ur(e,0,t.length))}function tr(t){return zo(ki(t))}function er(t,e,r){(r!==n&&!Ya(t[e],r)||r===n&&!(e in t))&&ar(t,e,r)}function nr(t,e,r){var i=t[e];zt.call(t,e)&&Ya(i,r)&&(r!==n||e in t)||ar(t,e,r)}function rr(t,e){for(var n=t.length;n--;)if(Ya(t[n][0],e))return n;return-1}function ir(t,e,n,r){return fr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function or(t,e){return t&&ji(e,Ts(e),t)}function ar(t,e,n){"__proto__"==e&&re?re(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function sr(t,e){for(var r=-1,i=e.length,o=at(i),a=null==t;++r<i;)o[r]=a?n:xs(t,e[r]);return o}function ur(t,e,r){return t==t&&(r!==n&&(t=t<=r?t:r),e!==n&&(t=t>=e?t:e)),t}function cr(t,e,r,i,o,a){var s,u=1&e,c=2&e,l=4&e;if(r&&(s=o?r(t,i,o,a):r(t)),s!==n)return s;if(!es(t))return t;var h=Ha(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&zt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return ki(t,s)}else{var d=go(t),f=d==L||d==_;if(qa(t))return Ni(t,u);if(d==S||d==y||f&&!o){if(s=c||f?{}:bo(t),!u)return c?function(t,e){return ji(t,mo(t),e)}(t,function(t,e){return t&&ji(e,Cs(e),t)}(s,t)):function(t,e){return ji(t,po(t),e)}(t,or(s,t))}else{if(!ue[d])return o?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case C:return Ei(t);case w:case v:return new r(+t);case D:return function(t,e){var n=e?Ei(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case O:case z:case P:case R:case B:case U:case Y:case F:case W:return Si(t,n);case N:return new r;case E:case k:return new r(t);case A:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case I:return new r;case j:return i=t,Bn?xt(Bn.call(i)):{}}var i}(t,d,u)}}a||(a=new Jn);var p=a.get(t);if(p)return p;a.set(t,s),ss(t)?t.forEach((function(n){s.add(cr(n,e,r,n,t,a))})):rs(t)&&t.forEach((function(n,i){s.set(i,cr(n,e,r,i,t,a))}));var m=h?n:(l?c?oo:io:c?Cs:Ts)(t);return Ae(m||t,(function(n,i){m&&(n=t[i=n]),nr(s,i,cr(n,e,r,i,t,a))})),s}function lr(t,e,r){var i=r.length;if(null==t)return!i;for(t=xt(t);i--;){var o=r[i],a=e[o],s=t[o];if(s===n&&!(o in t)||!a(s))return!1}return!0}function hr(t,e,r){if("function"!=typeof t)throw new kt(i);return To((function(){t.apply(n,r)}),e)}function dr(t,e,n,r){var i=-1,o=Te,a=!0,s=t.length,u=[],c=e.length;if(!s)return u;n&&(e=De(e,Xe(n))),r?(o=Ce,a=!1):e.length>=200&&(o=tn,a=!1,e=new qn(e));t:for(;++i<s;){var l=t[i],h=null==n?l:n(l);if(l=r||0!==l?l:0,a&&h==h){for(var d=c;d--;)if(e[d]===h)continue t;u.push(l)}else o(e,h,r)||u.push(l)}return u}Yn.templateSettings={escape:K,evaluate:X,interpolate:$,variable:"",imports:{_:Yn}},Yn.prototype=Wn.prototype,Yn.prototype.constructor=Yn,Qn.prototype=Fn(Wn.prototype),Qn.prototype.constructor=Qn,Hn.prototype=Fn(Wn.prototype),Hn.prototype.constructor=Hn,Gn.prototype.clear=function(){this.__data__=kn?kn(null):{},this.size=0},Gn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Gn.prototype.get=function(t){var e=this.__data__;if(kn){var r=e[t];return r===o?n:r}return zt.call(e,t)?e[t]:n},Gn.prototype.has=function(t){var e=this.__data__;return kn?e[t]!==n:zt.call(e,t)},Gn.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=kn&&e===n?o:e,this},Zn.prototype.clear=function(){this.__data__=[],this.size=0},Zn.prototype.delete=function(t){var e=this.__data__,n=rr(e,t);return!(n<0)&&(n==e.length-1?e.pop():Jt.call(e,n,1),--this.size,!0)},Zn.prototype.get=function(t){var e=this.__data__,r=rr(e,t);return r<0?n:e[r][1]},Zn.prototype.has=function(t){return rr(this.__data__,t)>-1},Zn.prototype.set=function(t,e){var n=this.__data__,r=rr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(Sn||Zn),string:new Gn}},Vn.prototype.delete=function(t){var e=lo(this,t).delete(t);return this.size-=e?1:0,e},Vn.prototype.get=function(t){return lo(this,t).get(t)},Vn.prototype.has=function(t){return lo(this,t).has(t)},Vn.prototype.set=function(t,e){var n=lo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(t){return this.__data__.set(t,o),this},qn.prototype.has=function(t){return this.__data__.has(t)},Jn.prototype.clear=function(){this.__data__=new Zn,this.size=0},Jn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Jn.prototype.get=function(t){return this.__data__.get(t)},Jn.prototype.has=function(t){return this.__data__.has(t)},Jn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Zn){var r=n.__data__;if(!Sn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Vn(r)}return n.set(t,e),this.size=n.size,this};var fr=Di(Mr),pr=Di(Lr,!0);function mr(t,e){var n=!0;return fr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function gr(t,e,r){for(var i=-1,o=t.length;++i<o;){var a=t[i],s=e(a);if(null!=s&&(u===n?s==s&&!cs(s):r(s,u)))var u=s,c=a}return c}function yr(t,e){var n=[];return fr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function br(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=wo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?br(s,e-1,n,r,i):Oe(i,s):r||(i[i.length]=s)}return i}var wr=Oi(),vr=Oi(!0);function Mr(t,e){return t&&wr(t,e,Ts)}function Lr(t,e){return t&&vr(t,e,Ts)}function _r(t,e){return je(e,(function(e){return Xa(t[e])}))}function Nr(t,e){for(var r=0,i=(e=vi(e,t)).length;null!=t&&r<i;)t=t[Ro(e[r++])];return r&&r==i?t:n}function Er(t,e,n){var r=e(t);return Ha(t)?r:Oe(r,n(t))}function Sr(t){return null==t?t===n?"[object Undefined]":"[object Null]":ee&&ee in xt(t)?function(t){var e=zt.call(t,ee),r=t[ee];try{t[ee]=n;var i=!0}catch(t){}var o=Bt.call(t);i&&(e?t[ee]=r:delete t[ee]);return o}(t):function(t){return Bt.call(t)}(t)}function xr(t,e){return t>e}function Ar(t,e){return null!=t&&zt.call(t,e)}function Ir(t,e){return null!=t&&e in xt(t)}function kr(t,e,r){for(var i=r?Ce:Te,o=t[0].length,a=t.length,s=a,u=at(a),c=1/0,l=[];s--;){var h=t[s];s&&e&&(h=De(h,Xe(e))),c=vn(h.length,c),u[s]=!r&&(e||o>=120&&h.length>=120)?new qn(s&&h):n}h=t[0];var d=-1,f=u[0];t:for(;++d<o&&l.length<c;){var p=h[d],m=e?e(p):p;if(p=r||0!==p?p:0,!(f?tn(f,m):i(l,m,r))){for(s=a;--s;){var g=u[s];if(!(g?tn(g,m):i(t[s],m,r)))continue t}f&&f.push(m),l.push(p)}}return l}function jr(t,e,r){var i=null==(t=Io(t,e=vi(e,t)))?t:t[Ro(Ko(e))];return null==i?n:Se(i,t,r)}function Tr(t){return ns(t)&&Sr(t)==y}function Cr(t,e,r,i,o){return t===e||(null==t||null==e||!ns(t)&&!ns(e)?t!=t&&e!=e:function(t,e,r,i,o,a){var s=Ha(t),u=Ha(e),c=s?b:go(t),l=u?b:go(e),h=(c=c==y?S:c)==S,d=(l=l==y?S:l)==S,f=c==l;if(f&&qa(t)){if(!qa(e))return!1;s=!0,h=!1}if(f&&!h)return a||(a=new Jn),s||ls(t)?no(t,e,r,i,o,a):function(t,e,n,r,i,o,a){switch(n){case D:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case C:return!(t.byteLength!=e.byteLength||!o(new Ht(t),new Ht(e)));case w:case v:case E:return Ya(+t,+e);case M:return t.name==e.name&&t.message==e.message;case A:case k:return t==e+"";case N:var s=un;case I:var u=1&r;if(s||(s=hn),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=no(s(t),s(e),r,i,o,a);return a.delete(t),l;case j:if(Bn)return Bn.call(t)==Bn.call(e)}return!1}(t,e,c,r,i,o,a);if(!(1&r)){var p=h&&zt.call(t,"__wrapped__"),m=d&&zt.call(e,"__wrapped__");if(p||m){var g=p?t.value():t,L=m?e.value():e;return a||(a=new Jn),o(g,L,r,i,a)}}if(!f)return!1;return a||(a=new Jn),function(t,e,r,i,o,a){var s=1&r,u=io(t),c=u.length,l=io(e),h=l.length;if(c!=h&&!s)return!1;var d=c;for(;d--;){var f=u[d];if(!(s?f in e:zt.call(e,f)))return!1}var p=a.get(t),m=a.get(e);if(p&&m)return p==e&&m==t;var g=!0;a.set(t,e),a.set(e,t);var y=s;for(;++d<c;){var b=t[f=u[d]],w=e[f];if(i)var v=s?i(w,b,f,e,t,a):i(b,w,f,t,e,a);if(!(v===n?b===w||o(b,w,r,i,a):v)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var M=t.constructor,L=e.constructor;M==L||!("constructor"in t)||!("constructor"in e)||"function"==typeof M&&M instanceof M&&"function"==typeof L&&L instanceof L||(g=!1)}return a.delete(t),a.delete(e),g}(t,e,r,i,o,a)}(t,e,r,i,Cr,o))}function Dr(t,e,r,i){var o=r.length,a=o,s=!i;if(null==t)return!a;for(t=xt(t);o--;){var u=r[o];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=r[o])[0],l=t[c],h=u[1];if(s&&u[2]){if(l===n&&!(c in t))return!1}else{var d=new Jn;if(i)var f=i(l,h,c,t,e,d);if(!(f===n?Cr(h,l,3,i,d):f))return!1}}return!0}function Or(t){return!(!es(t)||(e=t,Rt&&Rt in e))&&(Xa(t)?Ft:yt).test(Bo(t));var e}function zr(t){return"function"==typeof t?t:null==t?iu:"object"==typeof t?Ha(t)?Fr(t[0],t[1]):Yr(t):fu(t)}function Pr(t){if(!Eo(t))return bn(t);var e=[];for(var n in xt(t))zt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Rr(t){if(!es(t))return function(t){var e=[];if(null!=t)for(var n in xt(t))e.push(n);return e}(t);var e=Eo(t),n=[];for(var r in t)("constructor"!=r||!e&&zt.call(t,r))&&n.push(r);return n}function Br(t,e){return t<e}function Ur(t,e){var n=-1,r=Za(t)?at(t.length):[];return fr(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Yr(t){var e=ho(t);return 1==e.length&&e[0][2]?xo(e[0][0],e[0][1]):function(n){return n===t||Dr(n,t,e)}}function Fr(t,e){return Lo(t)&&So(e)?xo(Ro(t),e):function(r){var i=xs(r,t);return i===n&&i===e?As(r,t):Cr(e,i,3)}}function Wr(t,e,r,i,o){t!==e&&wr(e,(function(a,s){if(o||(o=new Jn),es(a))!function(t,e,r,i,o,a,s){var u=ko(t,r),c=ko(e,r),l=s.get(c);if(l)return void er(t,r,l);var h=a?a(u,c,r+"",t,e,s):n,d=h===n;if(d){var f=Ha(c),p=!f&&qa(c),m=!f&&!p&&ls(c);h=c,f||p||m?Ha(u)?h=u:Va(u)?h=ki(u):p?(d=!1,h=Ni(c,!0)):m?(d=!1,h=Si(c,!0)):h=[]:os(c)||Qa(c)?(h=u,Qa(u)?h=bs(u):es(u)&&!Xa(u)||(h=bo(c))):d=!1}d&&(s.set(c,h),o(h,c,i,a,s),s.delete(c));er(t,r,h)}(t,e,s,r,Wr,i,o);else{var u=i?i(ko(t,s),a,s+"",t,e,o):n;u===n&&(u=a),er(t,s,u)}}),Cs)}function Qr(t,e){var r=t.length;if(r)return vo(e+=e<0?r:0,r)?t[e]:n}function Hr(t,e,n){e=e.length?De(e,(function(t){return Ha(t)?function(e){return Nr(e,1===t.length?t[0]:t)}:t})):[iu];var r=-1;e=De(e,Xe(co()));var i=Ur(t,(function(t,n,i){var o=De(e,(function(e){return e(t)}));return{criteria:o,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(i,(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;for(;++r<a;){var u=xi(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Gr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Nr(t,a);n(s,a)&&ti(o,vi(a,t),s)}return o}function Zr(t,e,n,r){var i=r?We:Fe,o=-1,a=e.length,s=t;for(t===e&&(e=ki(e)),n&&(s=De(t,Xe(n)));++o<a;)for(var u=0,c=e[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==t&&Jt.call(s,u,1),Jt.call(t,u,1);return t}function Vr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;vo(i)?Jt.call(t,i,1):di(t,i)}}return t}function qr(t,e){return t+ge(_n()*(e-t+1))}function Jr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Kr(t,e){return Co(Ao(t,e,iu),t+"")}function Xr(t){return Xn(Ys(t))}function $r(t,e){var n=Ys(t);return zo(n,ur(e,0,n.length))}function ti(t,e,r,i){if(!es(t))return t;for(var o=-1,a=(e=vi(e,t)).length,s=a-1,u=t;null!=u&&++o<a;){var c=Ro(e[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=s){var h=u[c];(l=i?i(h,c,u):n)===n&&(l=es(h)?h:vo(e[o+1])?[]:{})}nr(u,c,l),u=u[c]}return t}var ei=jn?function(t,e){return jn.set(t,e),t}:iu,ni=re?function(t,e){return re(t,"toString",{configurable:!0,enumerable:!1,value:eu(e),writable:!0})}:iu;function ri(t){return zo(Ys(t))}function ii(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=at(i);++r<i;)o[r]=t[r+e];return o}function oi(t,e){var n;return fr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ai(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!cs(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return si(t,e,iu,n)}function si(t,e,r,i){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(e=r(e))!=e,u=null===e,c=cs(e),l=e===n;o<a;){var h=ge((o+a)/2),d=r(t[h]),f=d!==n,p=null===d,m=d==d,g=cs(d);if(s)var y=i||m;else y=l?m&&(i||f):u?m&&f&&(i||!p):c?m&&f&&!p&&(i||!g):!p&&!g&&(i?d<=e:d<e);y?o=h+1:a=h}return vn(a,4294967294)}function ui(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!Ya(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ci(t){return"number"==typeof t?t:cs(t)?p:+t}function li(t){if("string"==typeof t)return t;if(Ha(t))return De(t,li)+"";if(cs(t))return Un?Un.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function hi(t,e,n){var r=-1,i=Te,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Ce;else if(o>=200){var c=e?null:Ji(t);if(c)return hn(c);a=!1,i=tn,u=new qn}else u=e?[]:s;t:for(;++r<o;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,a&&h==h){for(var d=u.length;d--;)if(u[d]===h)continue t;e&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}function di(t,e){return null==(t=Io(t,e=vi(e,t)))||delete t[Ro(Ko(e))]}function fi(t,e,n,r){return ti(t,e,n(Nr(t,e)),r)}function pi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?ii(t,r?0:o,r?o+1:i):ii(t,r?o+1:0,r?i:o)}function mi(t,e){var n=t;return n instanceof Hn&&(n=n.value()),ze(e,(function(t,e){return e.func.apply(e.thisArg,Oe([t],e.args))}),n)}function gi(t,e,n){var r=t.length;if(r<2)return r?hi(t[0]):[];for(var i=-1,o=at(r);++i<r;)for(var a=t[i],s=-1;++s<r;)s!=i&&(o[i]=dr(o[i]||a,t[s],e,n));return hi(br(o,1),e,n)}function yi(t,e,r){for(var i=-1,o=t.length,a=e.length,s={};++i<o;){var u=i<a?e[i]:n;r(s,t[i],u)}return s}function bi(t){return Va(t)?t:[]}function wi(t){return"function"==typeof t?t:iu}function vi(t,e){return Ha(t)?t:Lo(t,e)?[t]:Po(ws(t))}var Mi=Kr;function Li(t,e,r){var i=t.length;return r=r===n?i:r,!e&&r>=i?t:ii(t,e,r)}var _i=ce||function(t){return pe.clearTimeout(t)};function Ni(t,e){if(e)return t.slice();var n=t.length,r=Gt?Gt(n):new t.constructor(n);return t.copy(r),r}function Ei(t){var e=new t.constructor(t.byteLength);return new Ht(e).set(new Ht(t)),e}function Si(t,e){var n=e?Ei(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function xi(t,e){if(t!==e){var r=t!==n,i=null===t,o=t==t,a=cs(t),s=e!==n,u=null===e,c=e==e,l=cs(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!l&&t<e||l&&r&&o&&!i&&!a||u&&r&&o||!s&&o||!c)return-1}return 0}function Ai(t,e,n,r){for(var i=-1,o=t.length,a=n.length,s=-1,u=e.length,c=wn(o-a,0),l=at(u+c),h=!r;++s<u;)l[s]=e[s];for(;++i<a;)(h||i<o)&&(l[n[i]]=t[i]);for(;c--;)l[s++]=t[i++];return l}function Ii(t,e,n,r){for(var i=-1,o=t.length,a=-1,s=n.length,u=-1,c=e.length,l=wn(o-s,0),h=at(l+c),d=!r;++i<l;)h[i]=t[i];for(var f=i;++u<c;)h[f+u]=e[u];for(;++a<s;)(d||i<o)&&(h[f+n[a]]=t[i++]);return h}function ki(t,e){var n=-1,r=t.length;for(e||(e=at(r));++n<r;)e[n]=t[n];return e}function ji(t,e,r,i){var o=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var u=e[a],c=i?i(r[u],t[u],u,r,t):n;c===n&&(c=t[u]),o?ar(r,u,c):nr(r,u,c)}return r}function Ti(t,e){return function(n,r){var i=Ha(n)?xe:ir,o=e?e():{};return i(n,t,co(r,2),o)}}function Ci(t){return Kr((function(e,r){var i=-1,o=r.length,a=o>1?r[o-1]:n,s=o>2?r[2]:n;for(a=t.length>3&&"function"==typeof a?(o--,a):n,s&&Mo(r[0],r[1],s)&&(a=o<3?n:a,o=1),e=xt(e);++i<o;){var u=r[i];u&&t(e,u,i,a)}return e}))}function Di(t,e){return function(n,r){if(null==n)return n;if(!Za(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=xt(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Oi(t){return function(e,n,r){for(var i=-1,o=xt(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function zi(t){return function(e){var r=sn(e=ws(e))?pn(e):n,i=r?r[0]:e.charAt(0),o=r?Li(r,1).join(""):e.slice(1);return i[t]()+o}}function Pi(t){return function(e){return ze(Xs(Qs(e).replace($t,"")),t,"")}}function Ri(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Fn(t.prototype),r=t.apply(n,e);return es(r)?r:n}}function Bi(t){return function(e,r,i){var o=xt(e);if(!Za(e)){var a=co(r,3);e=Ts(e),r=function(t){return a(o[t],t,o)}}var s=t(e,r,i);return s>-1?o[a?e[s]:s]:n}}function Ui(t){return ro((function(e){var r=e.length,o=r,a=Qn.prototype.thru;for(t&&e.reverse();o--;){var s=e[o];if("function"!=typeof s)throw new kt(i);if(a&&!u&&"wrapper"==so(s))var u=new Qn([],!0)}for(o=u?o:r;++o<r;){var c=so(s=e[o]),l="wrapper"==c?ao(s):n;u=l&&_o(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[so(l[0])].apply(u,l[3]):1==s.length&&_o(s)?u[c]():u.thru(s)}return function(){var t=arguments,n=t[0];if(u&&1==t.length&&Ha(n))return u.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}}))}function Yi(t,e,r,i,o,a,s,u,c,h){var d=e&l,f=1&e,p=2&e,m=24&e,g=512&e,y=p?n:Ri(t);return function l(){for(var b=arguments.length,w=at(b),v=b;v--;)w[v]=arguments[v];if(m)var M=uo(l),L=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(w,M);if(i&&(w=Ai(w,i,o,m)),a&&(w=Ii(w,a,s,m)),b-=L,m&&b<h){var _=ln(w,M);return Vi(t,e,Yi,l.placeholder,r,w,_,u,c,h-b)}var N=f?r:this,E=p?N[t]:t;return b=w.length,u?w=function(t,e){var r=t.length,i=vn(e.length,r),o=ki(t);for(;i--;){var a=e[i];t[i]=vo(a,r)?o[a]:n}return t}(w,u):g&&b>1&&w.reverse(),d&&c<b&&(w.length=c),this&&this!==pe&&this instanceof l&&(E=y||Ri(E)),E.apply(N,w)}}function Fi(t,e){return function(n,r){return function(t,e,n,r){return Mr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Wi(t,e){return function(r,i){var o;if(r===n&&i===n)return e;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=li(r),i=li(i)):(r=ci(r),i=ci(i)),o=t(r,i)}return o}}function Qi(t){return ro((function(e){return e=De(e,Xe(co())),Kr((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function Hi(t,e){var r=(e=e===n?" ":li(e)).length;if(r<2)return r?Jr(e,t):e;var i=Jr(e,me(t/fn(e)));return sn(e)?Li(pn(i),0,t).join(""):i.slice(0,t)}function Gi(t){return function(e,r,i){return i&&"number"!=typeof i&&Mo(e,r,i)&&(r=i=n),e=ps(e),r===n?(r=e,e=0):r=ps(r),function(t,e,n,r){for(var i=-1,o=wn(me((e-t)/(n||1)),0),a=at(o);o--;)a[r?o:++i]=t,t+=n;return a}(e,r,i=i===n?e<r?1:-1:ps(i),t)}}function Zi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ys(e),n=ys(n)),t(e,n)}}function Vi(t,e,r,i,o,a,s,l,h,d){var f=8&e;e|=f?u:c,4&(e&=~(f?c:u))||(e&=-4);var p=[t,e,o,f?a:n,f?s:n,f?n:a,f?n:s,l,h,d],m=r.apply(n,p);return _o(t)&&jo(m,p),m.placeholder=i,Do(m,t,e)}function qi(t){var e=St[t];return function(t,n){if(t=ys(t),(n=null==n?0:vn(ms(n),292))&&Be(t)){var r=(ws(t)+"e").split("e");return+((r=(ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ji=An&&1/hn(new An([,-0]))[1]==d?function(t){return new An(t)}:cu;function Ki(t){return function(e){var n=go(e);return n==N?un(e):n==I?dn(e):function(t,e){return De(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Xi(t,e,r,o,d,f,p,m){var g=2&e;if(!g&&"function"!=typeof t)throw new kt(i);var y=o?o.length:0;if(y||(e&=-97,o=d=n),p=p===n?p:wn(ms(p),0),m=m===n?m:ms(m),y-=d?d.length:0,e&c){var b=o,w=d;o=d=n}var v=g?n:ao(t),M=[t,e,r,o,d,b,w,f,p,m];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,s=r==l&&8==n||r==l&&n==h&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!s)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var c=t[3];t[3]=c?Ai(c,u,e[4]):u,t[4]=c?ln(t[3],a):e[4]}(u=e[5])&&(c=t[5],t[5]=c?Ii(c,u,e[6]):u,t[6]=c?ln(t[5],a):e[6]);(u=e[7])&&(t[7]=u);r&l&&(t[8]=null==t[8]?e[8]:vn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(M,v),t=M[0],e=M[1],r=M[2],o=M[3],d=M[4],!(m=M[9]=M[9]===n?g?0:t.length:wn(M[9]-y,0))&&24&e&&(e&=-25),e&&1!=e)L=8==e||e==s?function(t,e,r){var i=Ri(t);return function o(){for(var a=arguments.length,s=at(a),u=a,c=uo(o);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:ln(s,c);return(a-=l.length)<r?Vi(t,e,Yi,o.placeholder,n,s,l,n,n,r-a):Se(this&&this!==pe&&this instanceof o?i:t,this,s)}}(t,e,m):e!=u&&33!=e||d.length?Yi.apply(n,M):function(t,e,n,r){var i=1&e,o=Ri(t);return function e(){for(var a=-1,s=arguments.length,u=-1,c=r.length,l=at(c+s),h=this&&this!==pe&&this instanceof e?o:t;++u<c;)l[u]=r[u];for(;s--;)l[u++]=arguments[++a];return Se(h,i?n:this,l)}}(t,e,r,o);else var L=function(t,e,n){var r=1&e,i=Ri(t);return function e(){return(this&&this!==pe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,r);return Do((v?ei:jo)(L,M),t,e)}function $i(t,e,r,i){return t===n||Ya(t,Ct[r])&&!zt.call(i,r)?e:t}function to(t,e,r,i,o,a){return es(t)&&es(e)&&(a.set(e,t),Wr(t,e,n,to,a),a.delete(e)),t}function eo(t){return os(t)?n:t}function no(t,e,r,i,o,a){var s=1&r,u=t.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(t),h=a.get(e);if(l&&h)return l==e&&h==t;var d=-1,f=!0,p=2&r?new qn:n;for(a.set(t,e),a.set(e,t);++d<u;){var m=t[d],g=e[d];if(i)var y=s?i(g,m,d,e,t,a):i(m,g,d,t,e,a);if(y!==n){if(y)continue;f=!1;break}if(p){if(!Re(e,(function(t,e){if(!tn(p,e)&&(m===t||o(m,t,r,i,a)))return p.push(e)}))){f=!1;break}}else if(m!==g&&!o(m,g,r,i,a)){f=!1;break}}return a.delete(t),a.delete(e),f}function ro(t){return Co(Ao(t,n,Go),t+"")}function io(t){return Er(t,Ts,po)}function oo(t){return Er(t,Cs,mo)}var ao=jn?function(t){return jn.get(t)}:cu;function so(t){for(var e=t.name+"",n=Tn[e],r=zt.call(Tn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function uo(t){return(zt.call(Yn,"placeholder")?Yn:t).placeholder}function co(){var t=Yn.iteratee||ou;return t=t===ou?zr:t,arguments.length?t(arguments[0],arguments[1]):t}function lo(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function ho(t){for(var e=Ts(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,So(i)]}return e}function fo(t,e){var r=function(t,e){return null==t?n:t[e]}(t,e);return Or(r)?r:n}var po=be?function(t){return null==t?[]:(t=xt(t),je(be(t),(function(e){return qt.call(t,e)})))}:gu,mo=be?function(t){for(var e=[];t;)Oe(e,po(t)),t=Zt(t);return e}:gu,go=Sr;function yo(t,e,n){for(var r=-1,i=(e=vi(e,t)).length,o=!1;++r<i;){var a=Ro(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&ts(i)&&vo(a,i)&&(Ha(t)||Qa(t))}function bo(t){return"function"!=typeof t.constructor||Eo(t)?{}:Fn(Zt(t))}function wo(t){return Ha(t)||Qa(t)||!!(Kt&&t&&t[Kt])}function vo(t,e){var n=typeof t;return!!(e=null==e?f:e)&&("number"==n||"symbol"!=n&&wt.test(t))&&t>-1&&t%1==0&&t<e}function Mo(t,e,n){if(!es(n))return!1;var r=typeof e;return!!("number"==r?Za(n)&&vo(e,n.length):"string"==r&&e in n)&&Ya(n[e],t)}function Lo(t,e){if(Ha(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!cs(t))||(et.test(t)||!tt.test(t)||null!=e&&t in xt(e))}function _o(t){var e=so(t),n=Yn[e];if("function"!=typeof n||!(e in Hn.prototype))return!1;if(t===n)return!0;var r=ao(n);return!!r&&t===r[0]}(En&&go(new En(new ArrayBuffer(1)))!=D||Sn&&go(new Sn)!=N||xn&&go(xn.resolve())!=x||An&&go(new An)!=I||In&&go(new In)!=T)&&(go=function(t){var e=Sr(t),r=e==S?t.constructor:n,i=r?Bo(r):"";if(i)switch(i){case Cn:return D;case Dn:return N;case On:return x;case zn:return I;case Pn:return T}return e});var No=Dt?Xa:yu;function Eo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ct)}function So(t){return t==t&&!es(t)}function xo(t,e){return function(r){return null!=r&&(r[t]===e&&(e!==n||t in xt(r)))}}function Ao(t,e,r){return e=wn(e===n?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=wn(n.length-e,0),a=at(o);++i<o;)a[i]=n[e+i];i=-1;for(var s=at(e+1);++i<e;)s[i]=n[i];return s[e]=r(a),Se(t,this,s)}}function Io(t,e){return e.length<2?t:Nr(t,ii(e,0,-1))}function ko(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var jo=Oo(ei),To=fe||function(t,e){return pe.setTimeout(t,e)},Co=Oo(ni);function Do(t,e,n){var r=e+"";return Co(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(st,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ae(g,(function(n){var r="_."+n[0];e&n[1]&&!Te(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(ut);return e?e[1].split(ct):[]}(r),n)))}function Oo(t){var e=0,r=0;return function(){var i=Mn(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(n,arguments)}}function zo(t,e){var r=-1,i=t.length,o=i-1;for(e=e===n?i:e;++r<e;){var a=qr(r,o),s=t[a];t[a]=t[r],t[r]=s}return t.length=e,t}var Po=function(t){var e=Oa(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(nt,(function(t,n,r,i){e.push(r?i.replace(dt,"$1"):n||t)})),e}));function Ro(t){if("string"==typeof t||cs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Bo(t){if(null!=t){try{return Ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Uo(t){if(t instanceof Hn)return t.clone();var e=new Qn(t.__wrapped__,t.__chain__);return e.__actions__=ki(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Yo=Kr((function(t,e){return Va(t)?dr(t,br(e,1,Va,!0)):[]})),Fo=Kr((function(t,e){var r=Ko(e);return Va(r)&&(r=n),Va(t)?dr(t,br(e,1,Va,!0),co(r,2)):[]})),Wo=Kr((function(t,e){var r=Ko(e);return Va(r)&&(r=n),Va(t)?dr(t,br(e,1,Va,!0),n,r):[]}));function Qo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=wn(r+i,0)),Ye(t,co(e,3),i)}function Ho(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==n&&(o=ms(r),o=r<0?wn(i+o,0):vn(o,i-1)),Ye(t,co(e,3),o,!0)}function Go(t){return(null==t?0:t.length)?br(t,1):[]}function Zo(t){return t&&t.length?t[0]:n}var Vo=Kr((function(t){var e=De(t,bi);return e.length&&e[0]===t[0]?kr(e):[]})),qo=Kr((function(t){var e=Ko(t),r=De(t,bi);return e===Ko(r)?e=n:r.pop(),r.length&&r[0]===t[0]?kr(r,co(e,2)):[]})),Jo=Kr((function(t){var e=Ko(t),r=De(t,bi);return(e="function"==typeof e?e:n)&&r.pop(),r.length&&r[0]===t[0]?kr(r,n,e):[]}));function Ko(t){var e=null==t?0:t.length;return e?t[e-1]:n}var Xo=Kr($o);function $o(t,e){return t&&t.length&&e&&e.length?Zr(t,e):t}var ta=ro((function(t,e){var n=null==t?0:t.length,r=sr(t,e);return Vr(t,De(e,(function(t){return vo(t,n)?+t:t})).sort(xi)),r}));function ea(t){return null==t?t:Nn.call(t)}var na=Kr((function(t){return hi(br(t,1,Va,!0))})),ra=Kr((function(t){var e=Ko(t);return Va(e)&&(e=n),hi(br(t,1,Va,!0),co(e,2))})),ia=Kr((function(t){var e=Ko(t);return e="function"==typeof e?e:n,hi(br(t,1,Va,!0),n,e)}));function oa(t){if(!t||!t.length)return[];var e=0;return t=je(t,(function(t){if(Va(t))return e=wn(t.length,e),!0})),Je(e,(function(e){return De(t,Ge(e))}))}function aa(t,e){if(!t||!t.length)return[];var r=oa(t);return null==e?r:De(r,(function(t){return Se(e,n,t)}))}var sa=Kr((function(t,e){return Va(t)?dr(t,e):[]})),ua=Kr((function(t){return gi(je(t,Va))})),ca=Kr((function(t){var e=Ko(t);return Va(e)&&(e=n),gi(je(t,Va),co(e,2))})),la=Kr((function(t){var e=Ko(t);return e="function"==typeof e?e:n,gi(je(t,Va),n,e)})),ha=Kr(oa);var da=Kr((function(t){var e=t.length,r=e>1?t[e-1]:n;return r="function"==typeof r?(t.pop(),r):n,aa(t,r)}));function fa(t){var e=Yn(t);return e.__chain__=!0,e}function pa(t,e){return e(t)}var ma=ro((function(t){var e=t.length,r=e?t[0]:0,i=this.__wrapped__,o=function(e){return sr(e,t)};return!(e>1||this.__actions__.length)&&i instanceof Hn&&vo(r)?((i=i.slice(r,+r+(e?1:0))).__actions__.push({func:pa,args:[o],thisArg:n}),new Qn(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(n),t}))):this.thru(o)}));var ga=Ti((function(t,e,n){zt.call(t,n)?++t[n]:ar(t,n,1)}));var ya=Bi(Qo),ba=Bi(Ho);function wa(t,e){return(Ha(t)?Ae:fr)(t,co(e,3))}function va(t,e){return(Ha(t)?Ie:pr)(t,co(e,3))}var Ma=Ti((function(t,e,n){zt.call(t,n)?t[n].push(e):ar(t,n,[e])}));var La=Kr((function(t,e,n){var r=-1,i="function"==typeof e,o=Za(t)?at(t.length):[];return fr(t,(function(t){o[++r]=i?Se(e,t,n):jr(t,e,n)})),o})),_a=Ti((function(t,e,n){ar(t,n,e)}));function Na(t,e){return(Ha(t)?De:Ur)(t,co(e,3))}var Ea=Ti((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var Sa=Kr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Mo(t,e[0],e[1])?e=[]:n>2&&Mo(e[0],e[1],e[2])&&(e=[e[0]]),Hr(t,br(e,1),[])})),xa=de||function(){return pe.Date.now()};function Aa(t,e,r){return e=r?n:e,e=t&&null==e?t.length:e,Xi(t,l,n,n,n,n,e)}function Ia(t,e){var r;if("function"!=typeof e)throw new kt(i);return t=ms(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=n),r}}var ka=Kr((function(t,e,n){var r=1;if(n.length){var i=ln(n,uo(ka));r|=u}return Xi(t,r,e,n,i)})),ja=Kr((function(t,e,n){var r=3;if(n.length){var i=ln(n,uo(ja));r|=u}return Xi(e,r,t,n,i)}));function Ta(t,e,r){var o,a,s,u,c,l,h=0,d=!1,f=!1,p=!0;if("function"!=typeof t)throw new kt(i);function m(e){var r=o,i=a;return o=a=n,h=e,u=t.apply(i,r)}function g(t){var r=t-l;return l===n||r>=e||r<0||f&&t-h>=s}function y(){var t=xa();if(g(t))return b(t);c=To(y,function(t){var n=e-(t-l);return f?vn(n,s-(t-h)):n}(t))}function b(t){return c=n,p&&o?m(t):(o=a=n,u)}function w(){var t=xa(),r=g(t);if(o=arguments,a=this,l=t,r){if(c===n)return function(t){return h=t,c=To(y,e),d?m(t):u}(l);if(f)return _i(c),c=To(y,e),m(l)}return c===n&&(c=To(y,e)),u}return e=ys(e)||0,es(r)&&(d=!!r.leading,s=(f="maxWait"in r)?wn(ys(r.maxWait)||0,e):s,p="trailing"in r?!!r.trailing:p),w.cancel=function(){c!==n&&_i(c),h=0,o=l=a=c=n},w.flush=function(){return c===n?u:b(xa())},w}var Ca=Kr((function(t,e){return hr(t,1,e)})),Da=Kr((function(t,e,n){return hr(t,ys(e)||0,n)}));function Oa(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new kt(i);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Oa.Cache||Vn),n}function za(t){if("function"!=typeof t)throw new kt(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Oa.Cache=Vn;var Pa=Mi((function(t,e){var n=(e=1==e.length&&Ha(e[0])?De(e[0],Xe(co())):De(br(e,1),Xe(co()))).length;return Kr((function(r){for(var i=-1,o=vn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return Se(t,this,r)}))})),Ra=Kr((function(t,e){var r=ln(e,uo(Ra));return Xi(t,u,n,e,r)})),Ba=Kr((function(t,e){var r=ln(e,uo(Ba));return Xi(t,c,n,e,r)})),Ua=ro((function(t,e){return Xi(t,h,n,n,n,e)}));function Ya(t,e){return t===e||t!=t&&e!=e}var Fa=Zi(xr),Wa=Zi((function(t,e){return t>=e})),Qa=Tr(function(){return arguments}())?Tr:function(t){return ns(t)&&zt.call(t,"callee")&&!qt.call(t,"callee")},Ha=at.isArray,Ga=ve?Xe(ve):function(t){return ns(t)&&Sr(t)==C};function Za(t){return null!=t&&ts(t.length)&&!Xa(t)}function Va(t){return ns(t)&&Za(t)}var qa=we||yu,Ja=Me?Xe(Me):function(t){return ns(t)&&Sr(t)==v};function Ka(t){if(!ns(t))return!1;var e=Sr(t);return e==M||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!os(t)}function Xa(t){if(!es(t))return!1;var e=Sr(t);return e==L||e==_||"[object AsyncFunction]"==e||"[object Proxy]"==e}function $a(t){return"number"==typeof t&&t==ms(t)}function ts(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function es(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ns(t){return null!=t&&"object"==typeof t}var rs=Le?Xe(Le):function(t){return ns(t)&&go(t)==N};function is(t){return"number"==typeof t||ns(t)&&Sr(t)==E}function os(t){if(!ns(t)||Sr(t)!=S)return!1;var e=Zt(t);if(null===e)return!0;var n=zt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ot.call(n)==Ut}var as=_e?Xe(_e):function(t){return ns(t)&&Sr(t)==A};var ss=Ne?Xe(Ne):function(t){return ns(t)&&go(t)==I};function us(t){return"string"==typeof t||!Ha(t)&&ns(t)&&Sr(t)==k}function cs(t){return"symbol"==typeof t||ns(t)&&Sr(t)==j}var ls=Ee?Xe(Ee):function(t){return ns(t)&&ts(t.length)&&!!se[Sr(t)]};var hs=Zi(Br),ds=Zi((function(t,e){return t<=e}));function fs(t){if(!t)return[];if(Za(t))return us(t)?pn(t):ki(t);if(Xt&&t[Xt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Xt]());var e=go(t);return(e==N?un:e==I?hn:Ys)(t)}function ps(t){return t?(t=ys(t))===d||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ms(t){var e=ps(t),n=e%1;return e==e?n?e-n:e:0}function gs(t){return t?ur(ms(t),0,m):0}function ys(t){if("number"==typeof t)return t;if(cs(t))return p;if(es(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=es(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ke(t);var n=gt.test(t);return n||bt.test(t)?he(t.slice(2),n?2:8):mt.test(t)?p:+t}function bs(t){return ji(t,Cs(t))}function ws(t){return null==t?"":li(t)}var vs=Ci((function(t,e){if(Eo(e)||Za(e))ji(e,Ts(e),t);else for(var n in e)zt.call(e,n)&&nr(t,n,e[n])})),Ms=Ci((function(t,e){ji(e,Cs(e),t)})),Ls=Ci((function(t,e,n,r){ji(e,Cs(e),t,r)})),_s=Ci((function(t,e,n,r){ji(e,Ts(e),t,r)})),Ns=ro(sr);var Es=Kr((function(t,e){t=xt(t);var r=-1,i=e.length,o=i>2?e[2]:n;for(o&&Mo(e[0],e[1],o)&&(i=1);++r<i;)for(var a=e[r],s=Cs(a),u=-1,c=s.length;++u<c;){var l=s[u],h=t[l];(h===n||Ya(h,Ct[l])&&!zt.call(t,l))&&(t[l]=a[l])}return t})),Ss=Kr((function(t){return t.push(n,to),Se(Os,n,t)}));function xs(t,e,r){var i=null==t?n:Nr(t,e);return i===n?r:i}function As(t,e){return null!=t&&yo(t,e,Ir)}var Is=Fi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),t[e]=n}),eu(iu)),ks=Fi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),zt.call(t,e)?t[e].push(n):t[e]=[n]}),co),js=Kr(jr);function Ts(t){return Za(t)?Kn(t):Pr(t)}function Cs(t){return Za(t)?Kn(t,!0):Rr(t)}var Ds=Ci((function(t,e,n){Wr(t,e,n)})),Os=Ci((function(t,e,n,r){Wr(t,e,n,r)})),zs=ro((function(t,e){var n={};if(null==t)return n;var r=!1;e=De(e,(function(e){return e=vi(e,t),r||(r=e.length>1),e})),ji(t,oo(t),n),r&&(n=cr(n,7,eo));for(var i=e.length;i--;)di(n,e[i]);return n}));var Ps=ro((function(t,e){return null==t?{}:function(t,e){return Gr(t,e,(function(e,n){return As(t,n)}))}(t,e)}));function Rs(t,e){if(null==t)return{};var n=De(oo(t),(function(t){return[t]}));return e=co(e),Gr(t,n,(function(t,n){return e(t,n[0])}))}var Bs=Ki(Ts),Us=Ki(Cs);function Ys(t){return null==t?[]:$e(t,Ts(t))}var Fs=Pi((function(t,e,n){return e=e.toLowerCase(),t+(n?Ws(e):e)}));function Ws(t){return Ks(ws(t).toLowerCase())}function Qs(t){return(t=ws(t))&&t.replace(vt,rn).replace(te,"")}var Hs=Pi((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Gs=Pi((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Zs=zi("toLowerCase");var Vs=Pi((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var qs=Pi((function(t,e,n){return t+(n?" ":"")+Ks(e)}));var Js=Pi((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ks=zi("toUpperCase");function Xs(t,e,r){return t=ws(t),(e=r?n:e)===n?function(t){return ie.test(t)}(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.match(lt)||[]}(t):t.match(e)||[]}var $s=Kr((function(t,e){try{return Se(t,n,e)}catch(t){return Ka(t)?t:new Nt(t)}})),tu=ro((function(t,e){return Ae(e,(function(e){e=Ro(e),ar(t,e,ka(t[e],t))})),t}));function eu(t){return function(){return t}}var nu=Ui(),ru=Ui(!0);function iu(t){return t}function ou(t){return zr("function"==typeof t?t:cr(t,1))}var au=Kr((function(t,e){return function(n){return jr(n,t,e)}})),su=Kr((function(t,e){return function(n){return jr(t,n,e)}}));function uu(t,e,n){var r=Ts(e),i=_r(e,r);null!=n||es(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=_r(e,Ts(e)));var o=!(es(n)&&"chain"in n&&!n.chain),a=Xa(t);return Ae(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ki(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Oe([this.value()],arguments))})})),t}function cu(){}var lu=Qi(De),hu=Qi(ke),du=Qi(Re);function fu(t){return Lo(t)?Ge(Ro(t)):function(t){return function(e){return Nr(e,t)}}(t)}var pu=Gi(),mu=Gi(!0);function gu(){return[]}function yu(){return!1}var bu=Wi((function(t,e){return t+e}),0),wu=qi("ceil"),vu=Wi((function(t,e){return t/e}),1),Mu=qi("floor");var Lu,_u=Wi((function(t,e){return t*e}),1),Nu=qi("round"),Eu=Wi((function(t,e){return t-e}),0);return Yn.after=function(t,e){if("function"!=typeof e)throw new kt(i);return t=ms(t),function(){if(--t<1)return e.apply(this,arguments)}},Yn.ary=Aa,Yn.assign=vs,Yn.assignIn=Ms,Yn.assignInWith=Ls,Yn.assignWith=_s,Yn.at=Ns,Yn.before=Ia,Yn.bind=ka,Yn.bindAll=tu,Yn.bindKey=ja,Yn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ha(t)?t:[t]},Yn.chain=fa,Yn.chunk=function(t,e,r){e=(r?Mo(t,e,r):e===n)?1:wn(ms(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,a=0,s=at(me(i/e));o<i;)s[a++]=ii(t,o,o+=e);return s},Yn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Yn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=at(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Oe(Ha(n)?ki(n):[n],br(e,1))},Yn.cond=function(t){var e=null==t?0:t.length,n=co();return t=e?De(t,(function(t){if("function"!=typeof t[1])throw new kt(i);return[n(t[0]),t[1]]})):[],Kr((function(n){for(var r=-1;++r<e;){var i=t[r];if(Se(i[0],this,n))return Se(i[1],this,n)}}))},Yn.conforms=function(t){return function(t){var e=Ts(t);return function(n){return lr(n,t,e)}}(cr(t,1))},Yn.constant=eu,Yn.countBy=ga,Yn.create=function(t,e){var n=Fn(t);return null==e?n:or(n,e)},Yn.curry=function t(e,r,i){var o=Xi(e,8,n,n,n,n,n,r=i?n:r);return o.placeholder=t.placeholder,o},Yn.curryRight=function t(e,r,i){var o=Xi(e,s,n,n,n,n,n,r=i?n:r);return o.placeholder=t.placeholder,o},Yn.debounce=Ta,Yn.defaults=Es,Yn.defaultsDeep=Ss,Yn.defer=Ca,Yn.delay=Da,Yn.difference=Yo,Yn.differenceBy=Fo,Yn.differenceWith=Wo,Yn.drop=function(t,e,r){var i=null==t?0:t.length;return i?ii(t,(e=r||e===n?1:ms(e))<0?0:e,i):[]},Yn.dropRight=function(t,e,r){var i=null==t?0:t.length;return i?ii(t,0,(e=i-(e=r||e===n?1:ms(e)))<0?0:e):[]},Yn.dropRightWhile=function(t,e){return t&&t.length?pi(t,co(e,3),!0,!0):[]},Yn.dropWhile=function(t,e){return t&&t.length?pi(t,co(e,3),!0):[]},Yn.fill=function(t,e,r,i){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&Mo(t,e,r)&&(r=0,i=o),function(t,e,r,i){var o=t.length;for((r=ms(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:ms(i))<0&&(i+=o),i=r>i?0:gs(i);r<i;)t[r++]=e;return t}(t,e,r,i)):[]},Yn.filter=function(t,e){return(Ha(t)?je:yr)(t,co(e,3))},Yn.flatMap=function(t,e){return br(Na(t,e),1)},Yn.flatMapDeep=function(t,e){return br(Na(t,e),d)},Yn.flatMapDepth=function(t,e,r){return r=r===n?1:ms(r),br(Na(t,e),r)},Yn.flatten=Go,Yn.flattenDeep=function(t){return(null==t?0:t.length)?br(t,d):[]},Yn.flattenDepth=function(t,e){return(null==t?0:t.length)?br(t,e=e===n?1:ms(e)):[]},Yn.flip=function(t){return Xi(t,512)},Yn.flow=nu,Yn.flowRight=ru,Yn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},Yn.functions=function(t){return null==t?[]:_r(t,Ts(t))},Yn.functionsIn=function(t){return null==t?[]:_r(t,Cs(t))},Yn.groupBy=Ma,Yn.initial=function(t){return(null==t?0:t.length)?ii(t,0,-1):[]},Yn.intersection=Vo,Yn.intersectionBy=qo,Yn.intersectionWith=Jo,Yn.invert=Is,Yn.invertBy=ks,Yn.invokeMap=La,Yn.iteratee=ou,Yn.keyBy=_a,Yn.keys=Ts,Yn.keysIn=Cs,Yn.map=Na,Yn.mapKeys=function(t,e){var n={};return e=co(e,3),Mr(t,(function(t,r,i){ar(n,e(t,r,i),t)})),n},Yn.mapValues=function(t,e){var n={};return e=co(e,3),Mr(t,(function(t,r,i){ar(n,r,e(t,r,i))})),n},Yn.matches=function(t){return Yr(cr(t,1))},Yn.matchesProperty=function(t,e){return Fr(t,cr(e,1))},Yn.memoize=Oa,Yn.merge=Ds,Yn.mergeWith=Os,Yn.method=au,Yn.methodOf=su,Yn.mixin=uu,Yn.negate=za,Yn.nthArg=function(t){return t=ms(t),Kr((function(e){return Qr(e,t)}))},Yn.omit=zs,Yn.omitBy=function(t,e){return Rs(t,za(co(e)))},Yn.once=function(t){return Ia(2,t)},Yn.orderBy=function(t,e,r,i){return null==t?[]:(Ha(e)||(e=null==e?[]:[e]),Ha(r=i?n:r)||(r=null==r?[]:[r]),Hr(t,e,r))},Yn.over=lu,Yn.overArgs=Pa,Yn.overEvery=hu,Yn.overSome=du,Yn.partial=Ra,Yn.partialRight=Ba,Yn.partition=Ea,Yn.pick=Ps,Yn.pickBy=Rs,Yn.property=fu,Yn.propertyOf=function(t){return function(e){return null==t?n:Nr(t,e)}},Yn.pull=Xo,Yn.pullAll=$o,Yn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Zr(t,e,co(n,2)):t},Yn.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Zr(t,e,n,r):t},Yn.pullAt=ta,Yn.range=pu,Yn.rangeRight=mu,Yn.rearg=Ua,Yn.reject=function(t,e){return(Ha(t)?je:yr)(t,za(co(e,3)))},Yn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=co(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Vr(t,i),n},Yn.rest=function(t,e){if("function"!=typeof t)throw new kt(i);return Kr(t,e=e===n?e:ms(e))},Yn.reverse=ea,Yn.sampleSize=function(t,e,r){return e=(r?Mo(t,e,r):e===n)?1:ms(e),(Ha(t)?$n:$r)(t,e)},Yn.set=function(t,e,n){return null==t?t:ti(t,e,n)},Yn.setWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:ti(t,e,r,i)},Yn.shuffle=function(t){return(Ha(t)?tr:ri)(t)},Yn.slice=function(t,e,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&Mo(t,e,r)?(e=0,r=i):(e=null==e?0:ms(e),r=r===n?i:ms(r)),ii(t,e,r)):[]},Yn.sortBy=Sa,Yn.sortedUniq=function(t){return t&&t.length?ui(t):[]},Yn.sortedUniqBy=function(t,e){return t&&t.length?ui(t,co(e,2)):[]},Yn.split=function(t,e,r){return r&&"number"!=typeof r&&Mo(t,e,r)&&(e=r=n),(r=r===n?m:r>>>0)?(t=ws(t))&&("string"==typeof e||null!=e&&!as(e))&&!(e=li(e))&&sn(t)?Li(pn(t),0,r):t.split(e,r):[]},Yn.spread=function(t,e){if("function"!=typeof t)throw new kt(i);return e=null==e?0:wn(ms(e),0),Kr((function(n){var r=n[e],i=Li(n,0,e);return r&&Oe(i,r),Se(t,this,i)}))},Yn.tail=function(t){var e=null==t?0:t.length;return e?ii(t,1,e):[]},Yn.take=function(t,e,r){return t&&t.length?ii(t,0,(e=r||e===n?1:ms(e))<0?0:e):[]},Yn.takeRight=function(t,e,r){var i=null==t?0:t.length;return i?ii(t,(e=i-(e=r||e===n?1:ms(e)))<0?0:e,i):[]},Yn.takeRightWhile=function(t,e){return t&&t.length?pi(t,co(e,3),!1,!0):[]},Yn.takeWhile=function(t,e){return t&&t.length?pi(t,co(e,3)):[]},Yn.tap=function(t,e){return e(t),t},Yn.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new kt(i);return es(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ta(t,e,{leading:r,maxWait:e,trailing:o})},Yn.thru=pa,Yn.toArray=fs,Yn.toPairs=Bs,Yn.toPairsIn=Us,Yn.toPath=function(t){return Ha(t)?De(t,Ro):cs(t)?[t]:ki(Po(ws(t)))},Yn.toPlainObject=bs,Yn.transform=function(t,e,n){var r=Ha(t),i=r||qa(t)||ls(t);if(e=co(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:es(t)&&Xa(o)?Fn(Zt(t)):{}}return(i?Ae:Mr)(t,(function(t,r,i){return e(n,t,r,i)})),n},Yn.unary=function(t){return Aa(t,1)},Yn.union=na,Yn.unionBy=ra,Yn.unionWith=ia,Yn.uniq=function(t){return t&&t.length?hi(t):[]},Yn.uniqBy=function(t,e){return t&&t.length?hi(t,co(e,2)):[]},Yn.uniqWith=function(t,e){return e="function"==typeof e?e:n,t&&t.length?hi(t,n,e):[]},Yn.unset=function(t,e){return null==t||di(t,e)},Yn.unzip=oa,Yn.unzipWith=aa,Yn.update=function(t,e,n){return null==t?t:fi(t,e,wi(n))},Yn.updateWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:fi(t,e,wi(r),i)},Yn.values=Ys,Yn.valuesIn=function(t){return null==t?[]:$e(t,Cs(t))},Yn.without=sa,Yn.words=Xs,Yn.wrap=function(t,e){return Ra(wi(e),t)},Yn.xor=ua,Yn.xorBy=ca,Yn.xorWith=la,Yn.zip=ha,Yn.zipObject=function(t,e){return yi(t||[],e||[],nr)},Yn.zipObjectDeep=function(t,e){return yi(t||[],e||[],ti)},Yn.zipWith=da,Yn.entries=Bs,Yn.entriesIn=Us,Yn.extend=Ms,Yn.extendWith=Ls,uu(Yn,Yn),Yn.add=bu,Yn.attempt=$s,Yn.camelCase=Fs,Yn.capitalize=Ws,Yn.ceil=wu,Yn.clamp=function(t,e,r){return r===n&&(r=e,e=n),r!==n&&(r=(r=ys(r))==r?r:0),e!==n&&(e=(e=ys(e))==e?e:0),ur(ys(t),e,r)},Yn.clone=function(t){return cr(t,4)},Yn.cloneDeep=function(t){return cr(t,5)},Yn.cloneDeepWith=function(t,e){return cr(t,5,e="function"==typeof e?e:n)},Yn.cloneWith=function(t,e){return cr(t,4,e="function"==typeof e?e:n)},Yn.conformsTo=function(t,e){return null==e||lr(t,e,Ts(e))},Yn.deburr=Qs,Yn.defaultTo=function(t,e){return null==t||t!=t?e:t},Yn.divide=vu,Yn.endsWith=function(t,e,r){t=ws(t),e=li(e);var i=t.length,o=r=r===n?i:ur(ms(r),0,i);return(r-=e.length)>=0&&t.slice(r,o)==e},Yn.eq=Ya,Yn.escape=function(t){return(t=ws(t))&&J.test(t)?t.replace(V,on):t},Yn.escapeRegExp=function(t){return(t=ws(t))&&it.test(t)?t.replace(rt,"\\$&"):t},Yn.every=function(t,e,r){var i=Ha(t)?ke:mr;return r&&Mo(t,e,r)&&(e=n),i(t,co(e,3))},Yn.find=ya,Yn.findIndex=Qo,Yn.findKey=function(t,e){return Ue(t,co(e,3),Mr)},Yn.findLast=ba,Yn.findLastIndex=Ho,Yn.findLastKey=function(t,e){return Ue(t,co(e,3),Lr)},Yn.floor=Mu,Yn.forEach=wa,Yn.forEachRight=va,Yn.forIn=function(t,e){return null==t?t:wr(t,co(e,3),Cs)},Yn.forInRight=function(t,e){return null==t?t:vr(t,co(e,3),Cs)},Yn.forOwn=function(t,e){return t&&Mr(t,co(e,3))},Yn.forOwnRight=function(t,e){return t&&Lr(t,co(e,3))},Yn.get=xs,Yn.gt=Fa,Yn.gte=Wa,Yn.has=function(t,e){return null!=t&&yo(t,e,Ar)},Yn.hasIn=As,Yn.head=Zo,Yn.identity=iu,Yn.includes=function(t,e,n,r){t=Za(t)?t:Ys(t),n=n&&!r?ms(n):0;var i=t.length;return n<0&&(n=wn(i+n,0)),us(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Fe(t,e,n)>-1},Yn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=wn(r+i,0)),Fe(t,e,i)},Yn.inRange=function(t,e,r){return e=ps(e),r===n?(r=e,e=0):r=ps(r),function(t,e,n){return t>=vn(e,n)&&t<wn(e,n)}(t=ys(t),e,r)},Yn.invoke=js,Yn.isArguments=Qa,Yn.isArray=Ha,Yn.isArrayBuffer=Ga,Yn.isArrayLike=Za,Yn.isArrayLikeObject=Va,Yn.isBoolean=function(t){return!0===t||!1===t||ns(t)&&Sr(t)==w},Yn.isBuffer=qa,Yn.isDate=Ja,Yn.isElement=function(t){return ns(t)&&1===t.nodeType&&!os(t)},Yn.isEmpty=function(t){if(null==t)return!0;if(Za(t)&&(Ha(t)||"string"==typeof t||"function"==typeof t.splice||qa(t)||ls(t)||Qa(t)))return!t.length;var e=go(t);if(e==N||e==I)return!t.size;if(Eo(t))return!Pr(t).length;for(var n in t)if(zt.call(t,n))return!1;return!0},Yn.isEqual=function(t,e){return Cr(t,e)},Yn.isEqualWith=function(t,e,r){var i=(r="function"==typeof r?r:n)?r(t,e):n;return i===n?Cr(t,e,n,r):!!i},Yn.isError=Ka,Yn.isFinite=function(t){return"number"==typeof t&&Be(t)},Yn.isFunction=Xa,Yn.isInteger=$a,Yn.isLength=ts,Yn.isMap=rs,Yn.isMatch=function(t,e){return t===e||Dr(t,e,ho(e))},Yn.isMatchWith=function(t,e,r){return r="function"==typeof r?r:n,Dr(t,e,ho(e),r)},Yn.isNaN=function(t){return is(t)&&t!=+t},Yn.isNative=function(t){if(No(t))throw new Nt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Or(t)},Yn.isNil=function(t){return null==t},Yn.isNull=function(t){return null===t},Yn.isNumber=is,Yn.isObject=es,Yn.isObjectLike=ns,Yn.isPlainObject=os,Yn.isRegExp=as,Yn.isSafeInteger=function(t){return $a(t)&&t>=-9007199254740991&&t<=f},Yn.isSet=ss,Yn.isString=us,Yn.isSymbol=cs,Yn.isTypedArray=ls,Yn.isUndefined=function(t){return t===n},Yn.isWeakMap=function(t){return ns(t)&&go(t)==T},Yn.isWeakSet=function(t){return ns(t)&&"[object WeakSet]"==Sr(t)},Yn.join=function(t,e){return null==t?"":Ze.call(t,e)},Yn.kebabCase=Hs,Yn.last=Ko,Yn.lastIndexOf=function(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=ms(r))<0?wn(i+o,0):vn(o,i-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):Ye(t,Qe,o,!0)},Yn.lowerCase=Gs,Yn.lowerFirst=Zs,Yn.lt=hs,Yn.lte=ds,Yn.max=function(t){return t&&t.length?gr(t,iu,xr):n},Yn.maxBy=function(t,e){return t&&t.length?gr(t,co(e,2),xr):n},Yn.mean=function(t){return He(t,iu)},Yn.meanBy=function(t,e){return He(t,co(e,2))},Yn.min=function(t){return t&&t.length?gr(t,iu,Br):n},Yn.minBy=function(t,e){return t&&t.length?gr(t,co(e,2),Br):n},Yn.stubArray=gu,Yn.stubFalse=yu,Yn.stubObject=function(){return{}},Yn.stubString=function(){return""},Yn.stubTrue=function(){return!0},Yn.multiply=_u,Yn.nth=function(t,e){return t&&t.length?Qr(t,ms(e)):n},Yn.noConflict=function(){return pe._===this&&(pe._=Yt),this},Yn.noop=cu,Yn.now=xa,Yn.pad=function(t,e,n){t=ws(t);var r=(e=ms(e))?fn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Hi(ge(i),n)+t+Hi(me(i),n)},Yn.padEnd=function(t,e,n){t=ws(t);var r=(e=ms(e))?fn(t):0;return e&&r<e?t+Hi(e-r,n):t},Yn.padStart=function(t,e,n){t=ws(t);var r=(e=ms(e))?fn(t):0;return e&&r<e?Hi(e-r,n)+t:t},Yn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Ln(ws(t).replace(ot,""),e||0)},Yn.random=function(t,e,r){if(r&&"boolean"!=typeof r&&Mo(t,e,r)&&(e=r=n),r===n&&("boolean"==typeof e?(r=e,e=n):"boolean"==typeof t&&(r=t,t=n)),t===n&&e===n?(t=0,e=1):(t=ps(t),e===n?(e=t,t=0):e=ps(e)),t>e){var i=t;t=e,e=i}if(r||t%1||e%1){var o=_n();return vn(t+o*(e-t+le("1e-"+((o+"").length-1))),e)}return qr(t,e)},Yn.reduce=function(t,e,n){var r=Ha(t)?ze:Ve,i=arguments.length<3;return r(t,co(e,4),n,i,fr)},Yn.reduceRight=function(t,e,n){var r=Ha(t)?Pe:Ve,i=arguments.length<3;return r(t,co(e,4),n,i,pr)},Yn.repeat=function(t,e,r){return e=(r?Mo(t,e,r):e===n)?1:ms(e),Jr(ws(t),e)},Yn.replace=function(){var t=arguments,e=ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Yn.result=function(t,e,r){var i=-1,o=(e=vi(e,t)).length;for(o||(o=1,t=n);++i<o;){var a=null==t?n:t[Ro(e[i])];a===n&&(i=o,a=r),t=Xa(a)?a.call(t):a}return t},Yn.round=Nu,Yn.runInContext=t,Yn.sample=function(t){return(Ha(t)?Xn:Xr)(t)},Yn.size=function(t){if(null==t)return 0;if(Za(t))return us(t)?fn(t):t.length;var e=go(t);return e==N||e==I?t.size:Pr(t).length},Yn.snakeCase=Vs,Yn.some=function(t,e,r){var i=Ha(t)?Re:oi;return r&&Mo(t,e,r)&&(e=n),i(t,co(e,3))},Yn.sortedIndex=function(t,e){return ai(t,e)},Yn.sortedIndexBy=function(t,e,n){return si(t,e,co(n,2))},Yn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ai(t,e);if(r<n&&Ya(t[r],e))return r}return-1},Yn.sortedLastIndex=function(t,e){return ai(t,e,!0)},Yn.sortedLastIndexBy=function(t,e,n){return si(t,e,co(n,2),!0)},Yn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=ai(t,e,!0)-1;if(Ya(t[n],e))return n}return-1},Yn.startCase=qs,Yn.startsWith=function(t,e,n){return t=ws(t),n=null==n?0:ur(ms(n),0,t.length),e=li(e),t.slice(n,n+e.length)==e},Yn.subtract=Eu,Yn.sum=function(t){return t&&t.length?qe(t,iu):0},Yn.sumBy=function(t,e){return t&&t.length?qe(t,co(e,2)):0},Yn.template=function(t,e,r){var i=Yn.templateSettings;r&&Mo(t,e,r)&&(e=n),t=ws(t),e=Ls({},e,i,$i);var o,a,s=Ls({},e.imports,i.imports,$i),u=Ts(s),c=$e(s,u),l=0,h=e.interpolate||Mt,d="__p += '",f=At((e.escape||Mt).source+"|"+h.source+"|"+(h===$?ft:Mt).source+"|"+(e.evaluate||Mt).source+"|$","g"),p="//# sourceURL="+(zt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ae+"]")+"\n";t.replace(f,(function(e,n,r,i,s,u){return r||(r=i),d+=t.slice(l,u).replace(Lt,an),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e})),d+="';\n";var m=zt.call(e,"variable")&&e.variable;if(m){if(ht.test(m))throw new Nt("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(Q,""):d).replace(H,"$1").replace(G,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=$s((function(){return Et(u,p+"return "+d).apply(n,c)}));if(g.source=d,Ka(g))throw g;return g},Yn.times=function(t,e){if((t=ms(t))<1||t>f)return[];var n=m,r=vn(t,m);e=co(e),t-=m;for(var i=Je(r,e);++n<t;)e(n);return i},Yn.toFinite=ps,Yn.toInteger=ms,Yn.toLength=gs,Yn.toLower=function(t){return ws(t).toLowerCase()},Yn.toNumber=ys,Yn.toSafeInteger=function(t){return t?ur(ms(t),-9007199254740991,f):0===t?t:0},Yn.toString=ws,Yn.toUpper=function(t){return ws(t).toUpperCase()},Yn.trim=function(t,e,r){if((t=ws(t))&&(r||e===n))return Ke(t);if(!t||!(e=li(e)))return t;var i=pn(t),o=pn(e);return Li(i,en(i,o),nn(i,o)+1).join("")},Yn.trimEnd=function(t,e,r){if((t=ws(t))&&(r||e===n))return t.slice(0,mn(t)+1);if(!t||!(e=li(e)))return t;var i=pn(t);return Li(i,0,nn(i,pn(e))+1).join("")},Yn.trimStart=function(t,e,r){if((t=ws(t))&&(r||e===n))return t.replace(ot,"");if(!t||!(e=li(e)))return t;var i=pn(t);return Li(i,en(i,pn(e))).join("")},Yn.truncate=function(t,e){var r=30,i="...";if(es(e)){var o="separator"in e?e.separator:o;r="length"in e?ms(e.length):r,i="omission"in e?li(e.omission):i}var a=(t=ws(t)).length;if(sn(t)){var s=pn(t);a=s.length}if(r>=a)return t;var u=r-fn(i);if(u<1)return i;var c=s?Li(s,0,u).join(""):t.slice(0,u);if(o===n)return c+i;if(s&&(u+=c.length-u),as(o)){if(t.slice(u).search(o)){var l,h=c;for(o.global||(o=At(o.source,ws(pt.exec(o))+"g")),o.lastIndex=0;l=o.exec(h);)var d=l.index;c=c.slice(0,d===n?u:d)}}else if(t.indexOf(li(o),u)!=u){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+i},Yn.unescape=function(t){return(t=ws(t))&&q.test(t)?t.replace(Z,gn):t},Yn.uniqueId=function(t){var e=++Pt;return ws(t)+e},Yn.upperCase=Js,Yn.upperFirst=Ks,Yn.each=wa,Yn.eachRight=va,Yn.first=Zo,uu(Yn,(Lu={},Mr(Yn,(function(t,e){zt.call(Yn.prototype,e)||(Lu[e]=t)})),Lu),{chain:!1}),Yn.VERSION="4.17.21",Ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Yn[t].placeholder=Yn})),Ae(["drop","take"],(function(t,e){Hn.prototype[t]=function(r){r=r===n?1:wn(ms(r),0);var i=this.__filtered__&&!e?new Hn(this):this.clone();return i.__filtered__?i.__takeCount__=vn(r,i.__takeCount__):i.__views__.push({size:vn(r,m),type:t+(i.__dir__<0?"Right":"")}),i},Hn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ae(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Hn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:co(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ae(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Hn.prototype[t]=function(){return this[n](1).value()[0]}})),Ae(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Hn.prototype[t]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(iu)},Hn.prototype.find=function(t){return this.filter(t).head()},Hn.prototype.findLast=function(t){return this.reverse().find(t)},Hn.prototype.invokeMap=Kr((function(t,e){return"function"==typeof t?new Hn(this):this.map((function(n){return jr(n,t,e)}))})),Hn.prototype.reject=function(t){return this.filter(za(co(t)))},Hn.prototype.slice=function(t,e){t=ms(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Hn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==n&&(r=(e=ms(e))<0?r.dropRight(-e):r.take(e-t)),r)},Hn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Hn.prototype.toArray=function(){return this.take(m)},Mr(Hn.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=Yn[i?"take"+("last"==e?"Right":""):e],a=i||/^find/.test(e);o&&(Yn.prototype[e]=function(){var e=this.__wrapped__,s=i?[1]:arguments,u=e instanceof Hn,c=s[0],l=u||Ha(e),h=function(t){var e=o.apply(Yn,Oe([t],s));return i&&d?e[0]:e};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var d=this.__chain__,f=!!this.__actions__.length,p=a&&!d,m=u&&!f;if(!a&&l){e=m?e:new Hn(this);var g=t.apply(e,s);return g.__actions__.push({func:pa,args:[h],thisArg:n}),new Qn(g,d)}return p&&m?t.apply(this,s):(g=this.thru(h),p?i?g.value()[0]:g.value():g)})})),Ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=jt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Yn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ha(i)?i:[],t)}return this[n]((function(n){return e.apply(Ha(n)?n:[],t)}))}})),Mr(Hn.prototype,(function(t,e){var n=Yn[e];if(n){var r=n.name+"";zt.call(Tn,r)||(Tn[r]=[]),Tn[r].push({name:e,func:n})}})),Tn[Yi(n,2).name]=[{name:"wrapper",func:n}],Hn.prototype.clone=function(){var t=new Hn(this.__wrapped__);return t.__actions__=ki(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ki(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ki(this.__views__),t},Hn.prototype.reverse=function(){if(this.__filtered__){var t=new Hn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Hn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ha(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=vn(e,t+a);break;case"takeRight":t=wn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,h=l.length,d=0,f=vn(u,this.__takeCount__);if(!n||!r&&i==u&&f==u)return mi(t,this.__actions__);var p=[];t:for(;u--&&d<f;){for(var m=-1,g=t[c+=e];++m<h;){var y=l[m],b=y.iteratee,w=y.type,v=b(g);if(2==w)g=v;else if(!v){if(1==w)continue t;break t}}p[d++]=g}return p},Yn.prototype.at=ma,Yn.prototype.chain=function(){return fa(this)},Yn.prototype.commit=function(){return new Qn(this.value(),this.__chain__)},Yn.prototype.next=function(){this.__values__===n&&(this.__values__=fs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?n:this.__values__[this.__index__++]}},Yn.prototype.plant=function(t){for(var e,r=this;r instanceof Wn;){var i=Uo(r);i.__index__=0,i.__values__=n,e?o.__wrapped__=i:e=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,e},Yn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Hn){var e=t;return this.__actions__.length&&(e=new Hn(this)),(e=e.reverse()).__actions__.push({func:pa,args:[ea],thisArg:n}),new Qn(e,this.__chain__)}return this.thru(ea)},Yn.prototype.toJSON=Yn.prototype.valueOf=Yn.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},Yn.prototype.first=Yn.prototype.head,Xt&&(Yn.prototype[Xt]=function(){return this}),Yn}();ge?((ge.exports=yn)._=yn,me._=yn):pe._=yn}).call(r)})),Xq=9e15,$q=1e9,tJ="0123456789abcdef",eJ="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",nJ="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",rJ={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Xq,maxE:Xq,crypto:!1},iJ=!0,oJ="[DecimalError] ",aJ=oJ+"Invalid argument: ",sJ=oJ+"Precision limit exceeded",uJ=oJ+"crypto unavailable",cJ="[object Decimal]",lJ=Math.floor,hJ=Math.pow,dJ=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,fJ=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,pJ=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,mJ=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,gJ=1e7,yJ=7,bJ=eJ.length-1,wJ=nJ.length-1,vJ={toStringTag:cJ};function MJ(t){var e,n,r,i=t.length-1,o="",a=t[0];if(i>0){for(o+=a,e=1;e<i;e++)r=t[e]+"",(n=yJ-r.length)&&(o+=TJ(n)),o+=r;a=t[e],(n=yJ-(r=a+"").length)&&(o+=TJ(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function LJ(t,e,n){if(t!==~~t||t<e||t>n)throw Error(aJ+t)}function _J(t,e,n,r){var i,o,a,s;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=yJ,i=0):(i=Math.ceil((e+1)/yJ),e%=yJ),o=hJ(10,yJ-e),s=t[i]%o|0,null==r?e<3?(0==e?s=s/100|0:1==e&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(t[i+1]/o/100|0)==hJ(10,e-2)-1||(s==o/2||0==s)&&0==(t[i+1]/o/100|0):e<4?(0==e?s=s/1e3|0:1==e?s=s/100|0:2==e&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(t[i+1]/o/1e3|0)==hJ(10,e-3)-1,a}function NJ(t,e,n){for(var r,i,o=[0],a=0,s=t.length;a<s;){for(i=o.length;i--;)o[i]*=e;for(o[0]+=tJ.indexOf(t.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}vJ.absoluteValue=vJ.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),SJ(t)},vJ.ceil=function(){return SJ(new this.constructor(this),this.e+1,2)},vJ.clampedTo=vJ.clamp=function(t,e){var n=this,r=n.constructor;if(t=new r(t),e=new r(e),!t.s||!e.s)return new r(NaN);if(t.gt(e))throw Error(aJ+e);return n.cmp(t)<0?t:n.cmp(e)>0?e:new r(n)},vJ.comparedTo=vJ.cmp=function(t){var e,n,r,i,o=this,a=o.d,s=(t=new o.constructor(t)).d,u=o.s,c=t.s;if(!a||!s)return u&&c?u!==c?u:a===s?0:!a^u<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?u:s[0]?-c:0;if(u!==c)return u;if(o.e!==t.e)return o.e>t.e^u<0?1:-1;for(e=0,n=(r=a.length)<(i=s.length)?r:i;e<n;++e)if(a[e]!==s[e])return a[e]>s[e]^u<0?1:-1;return r===i?0:r>i^u<0?1:-1},vJ.cosine=vJ.cos=function(){var t,e,n=this,r=n.constructor;return n.d?n.d[0]?(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+yJ,r.rounding=1,n=function(t,e){var n,r,i;if(e.isZero())return e;r=e.d.length,r<32?i=(1/FJ(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");t.precision+=n,e=YJ(t,1,e.times(i),new t(1));for(var o=n;o--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=n,e}(r,WJ(r,n)),r.precision=t,r.rounding=e,SJ(2==Zq||3==Zq?n.neg():n,t,e,!0)):new r(1):new r(NaN)},vJ.cubeRoot=vJ.cbrt=function(){var t,e,n,r,i,o,a,s,u,c,l=this,h=l.constructor;if(!l.isFinite()||l.isZero())return new h(l);for(iJ=!1,(o=l.s*hJ(l.s*l,1/3))&&Math.abs(o)!=1/0?r=new h(o.toString()):(n=MJ(l.d),(o=((t=l.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=hJ(n,1/3),t=lJ((t+1)/3)-(t%3==(t<0?-1:2)),(r=new h(n=o==1/0?"5e"+t:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+t)).s=l.s),a=(t=h.precision)+3;;)if(c=(u=(s=r).times(s).times(s)).plus(l),r=EJ(c.plus(l).times(s),c.plus(u),a+2,1),MJ(s.d).slice(0,a)===(n=MJ(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(SJ(r,t+1,1),e=!r.times(r).times(r).eq(l));break}if(!i&&(SJ(s,t+1,0),s.times(s).times(s).eq(l))){r=s;break}a+=4,i=1}return iJ=!0,SJ(r,t,h.rounding,e)},vJ.decimalPlaces=vJ.dp=function(){var t,e=this.d,n=NaN;if(e){if(n=((t=e.length-1)-lJ(this.e/yJ))*yJ,t=e[t])for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n},vJ.dividedBy=vJ.div=function(t){return EJ(this,new this.constructor(t))},vJ.dividedToIntegerBy=vJ.divToInt=function(t){var e=this.constructor;return SJ(EJ(this,new e(t),0,1,1),e.precision,e.rounding)},vJ.equals=vJ.eq=function(t){return 0===this.cmp(t)},vJ.floor=function(){return SJ(new this.constructor(this),this.e+1,3)},vJ.greaterThan=vJ.gt=function(t){return this.cmp(t)>0},vJ.greaterThanOrEqualTo=vJ.gte=function(t){var e=this.cmp(t);return 1==e||0===e},vJ.hyperbolicCosine=vJ.cosh=function(){var t,e,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?e=(1/FJ(4,t=Math.ceil(i/3))).toString():(t=16,e="2.3283064365386962890625e-10"),o=YJ(a,1,o.times(e),new a(1),!0);for(var u,c=t,l=new a(8);c--;)u=o.times(o),o=s.minus(u.times(l.minus(u.times(l))));return SJ(o,a.precision=n,a.rounding=r,!0)},vJ.hyperbolicSine=vJ.sinh=function(){var t,e,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(e=o.precision,n=o.rounding,o.precision=e+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=YJ(o,2,i,i,!0);else{t=(t=1.4*Math.sqrt(r))>16?16:0|t,i=YJ(o,2,i=i.times(1/FJ(5,t)),i,!0);for(var a,s=new o(5),u=new o(16),c=new o(20);t--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(c))))}return o.precision=e,o.rounding=n,SJ(i,e,n,!0)},vJ.hyperbolicTangent=vJ.tanh=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,EJ(n.sinh(),n.cosh(),r.precision=t,r.rounding=e)):new r(n.s)},vJ.inverseCosine=vJ.acos=function(){var t,e=this,n=e.constructor,r=e.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?e.isNeg()?kJ(n,i,o):new n(0):new n(NaN):e.isZero()?kJ(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,e=e.asin(),t=kJ(n,i+4,o).times(.5),n.precision=i,n.rounding=o,t.minus(e))},vJ.inverseHyperbolicCosine=vJ.acosh=function(){var t,e,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(t=r.precision,e=r.rounding,r.precision=t+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,iJ=!1,n=n.times(n).minus(1).sqrt().plus(n),iJ=!0,r.precision=t,r.rounding=e,n.ln()):new r(n)},vJ.inverseHyperbolicSine=vJ.asinh=function(){var t,e,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,iJ=!1,n=n.times(n).plus(1).sqrt().plus(n),iJ=!0,r.precision=t,r.rounding=e,n.ln())},vJ.inverseHyperbolicTangent=vJ.atanh=function(){var t,e,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=o.precision,e=o.rounding,r=i.sd(),Math.max(r,t)<2*-i.e-1?SJ(new o(i),t,e,!0):(o.precision=n=r-i.e,i=EJ(i.plus(1),new o(1).minus(i),n+t,1),o.precision=t+4,o.rounding=1,i=i.ln(),o.precision=t,o.rounding=e,i.times(.5))):new o(NaN)},vJ.inverseSine=vJ.asin=function(){var t,e,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(e=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==e?0===e?((t=kJ(o,n+4,r).times(.5)).s=i.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},vJ.inverseTangent=vJ.atan=function(){var t,e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&h+4<=wJ)return(a=kJ(l,h+4,d).times(.25)).s=c.s,a}else{if(!c.s)return new l(NaN);if(h+4<=wJ)return(a=kJ(l,h+4,d).times(.5)).s=c.s,a}for(l.precision=s=h+10,l.rounding=1,t=n=Math.min(28,s/yJ+2|0);t;--t)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(iJ=!1,e=Math.ceil(s/yJ),r=1,u=c.times(c),a=new l(c),i=c;-1!==t;)if(i=i.times(u),o=a.minus(i.div(r+=2)),i=i.times(u),void 0!==(a=o.plus(i.div(r+=2))).d[e])for(t=e;a.d[t]===o.d[t]&&t--;);return n&&(a=a.times(2<<n-1)),iJ=!0,SJ(a,l.precision=h,l.rounding=d,!0)},vJ.isFinite=function(){return!!this.d},vJ.isInteger=vJ.isInt=function(){return!!this.d&&lJ(this.e/yJ)>this.d.length-2},vJ.isNaN=function(){return!this.s},vJ.isNegative=vJ.isNeg=function(){return this.s<0},vJ.isPositive=vJ.isPos=function(){return this.s>0},vJ.isZero=function(){return!!this.d&&0===this.d[0]},vJ.lessThan=vJ.lt=function(t){return this.cmp(t)<0},vJ.lessThanOrEqualTo=vJ.lte=function(t){return this.cmp(t)<1},vJ.logarithm=vJ.log=function(t){var e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(null==t)t=new l(10),e=!0;else{if(n=(t=new l(t)).d,t.s<0||!n||!n[0]||t.eq(1))return new l(NaN);e=t.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new l(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(e)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(iJ=!1,a=PJ(c,s=h+5),r=e?IJ(l,s+10):PJ(t,s),_J((u=EJ(a,r,s,1)).d,i=h,d))do{if(a=PJ(c,s+=10),r=e?IJ(l,s+10):PJ(t,s),u=EJ(a,r,s,1),!o){+MJ(u.d).slice(i+1,i+15)+1==1e14&&(u=SJ(u,h+1,0));break}}while(_J(u.d,i+=10,d));return iJ=!0,SJ(u,h,d)},vJ.minus=vJ.sub=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.constructor;if(t=new p(t),!f.d||!t.d)return f.s&&t.s?f.d?t.s=-t.s:t=new p(t.d||f.s!==t.s?f:NaN):t=new p(NaN),t;if(f.s!=t.s)return t.s=-t.s,f.plus(t);if(c=f.d,d=t.d,s=p.precision,u=p.rounding,!c[0]||!d[0]){if(d[0])t.s=-t.s;else{if(!c[0])return new p(3===u?-0:0);t=new p(f)}return iJ?SJ(t,s,u):t}if(n=lJ(t.e/yJ),l=lJ(f.e/yJ),c=c.slice(),o=l-n){for((h=o<0)?(e=c,o=-o,a=d.length):(e=d,n=l,a=c.length),o>(r=Math.max(Math.ceil(s/yJ),a)+2)&&(o=r,e.length=1),e.reverse(),r=o;r--;)e.push(0);e.reverse()}else{for((h=(r=c.length)<(a=d.length))&&(a=r),r=0;r<a;r++)if(c[r]!=d[r]){h=c[r]<d[r];break}o=0}for(h&&(e=c,c=d,d=e,t.s=-t.s),a=c.length,r=d.length-a;r>0;--r)c[a++]=0;for(r=d.length;r>o;){if(c[--r]<d[r]){for(i=r;i&&0===c[--i];)c[i]=gJ-1;--c[i],c[r]+=gJ}c[r]-=d[r]}for(;0===c[--a];)c.pop();for(;0===c[0];c.shift())--n;return c[0]?(t.d=c,t.e=AJ(c,n),iJ?SJ(t,s,u):t):new p(3===u?-0:0)},vJ.modulo=vJ.mod=function(t){var e,n=this,r=n.constructor;return t=new r(t),!n.d||!t.s||t.d&&!t.d[0]?new r(NaN):!t.d||n.d&&!n.d[0]?SJ(new r(n),r.precision,r.rounding):(iJ=!1,9==r.modulo?(e=EJ(n,t.abs(),0,3,1)).s*=t.s:e=EJ(n,t,0,r.modulo,1),e=e.times(t),iJ=!0,n.minus(e))},vJ.naturalExponential=vJ.exp=function(){return zJ(this)},vJ.naturalLogarithm=vJ.ln=function(){return PJ(this)},vJ.negated=vJ.neg=function(){var t=new this.constructor(this);return t.s=-t.s,SJ(t)},vJ.plus=vJ.add=function(t){var e,n,r,i,o,a,s,u,c,l,h=this,d=h.constructor;if(t=new d(t),!h.d||!t.d)return h.s&&t.s?h.d||(t=new d(t.d||h.s===t.s?h:NaN)):t=new d(NaN),t;if(h.s!=t.s)return t.s=-t.s,h.minus(t);if(c=h.d,l=t.d,s=d.precision,u=d.rounding,!c[0]||!l[0])return l[0]||(t=new d(h)),iJ?SJ(t,s,u):t;if(o=lJ(h.e/yJ),r=lJ(t.e/yJ),c=c.slice(),i=o-r){for(i<0?(n=c,i=-i,a=l.length):(n=l,r=o,a=c.length),i>(a=(o=Math.ceil(s/yJ))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=c.length)-(i=l.length)<0&&(i=a,n=l,l=c,c=n),e=0;i;)e=(c[--i]=c[i]+l[i]+e)/gJ|0,c[i]%=gJ;for(e&&(c.unshift(e),++r),a=c.length;0==c[--a];)c.pop();return t.d=c,t.e=AJ(c,r),iJ?SJ(t,s,u):t},vJ.precision=vJ.sd=function(t){var e,n=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(aJ+t);return n.d?(e=jJ(n.d),t&&n.e+1>e&&(e=n.e+1)):e=NaN,e},vJ.round=function(){var t=this,e=t.constructor;return SJ(new e(t),t.e+1,e.rounding)},vJ.sine=vJ.sin=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+yJ,r.rounding=1,n=function(t,e){var n,r=e.d.length;if(r<3)return e.isZero()?e:YJ(t,2,e,e);n=1.4*Math.sqrt(r),n=n>16?16:0|n,e=e.times(1/FJ(5,n)),e=YJ(t,2,e,e);for(var i,o=new t(5),a=new t(16),s=new t(20);n--;)i=e.times(e),e=e.times(o.plus(i.times(a.times(i).minus(s))));return e}(r,WJ(r,n)),r.precision=t,r.rounding=e,SJ(Zq>2?n.neg():n,t,e,!0)):new r(NaN)},vJ.squareRoot=vJ.sqrt=function(){var t,e,n,r,i,o,a=this,s=a.d,u=a.e,c=a.s,l=a.constructor;if(1!==c||!s||!s[0])return new l(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);for(iJ=!1,0==(c=Math.sqrt(+a))||c==1/0?(((e=MJ(s)).length+u)%2==0&&(e+="0"),c=Math.sqrt(e),u=lJ((u+1)/2)-(u<0||u%2),r=new l(e=c==1/0?"5e"+u:(e=c.toExponential()).slice(0,e.indexOf("e")+1)+u)):r=new l(c.toString()),n=(u=l.precision)+3;;)if(r=(o=r).plus(EJ(a,o,n+2,1)).times(.5),MJ(o.d).slice(0,n)===(e=MJ(r.d)).slice(0,n)){if("9999"!=(e=e.slice(n-3,n+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(SJ(r,u+1,1),t=!r.times(r).eq(a));break}if(!i&&(SJ(o,u+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return iJ=!0,SJ(r,u,l.rounding,t)},vJ.tangent=vJ.tan=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+10,r.rounding=1,(n=n.sin()).s=1,n=EJ(n,new r(1).minus(n.times(n)).sqrt(),t+10,0),r.precision=t,r.rounding=e,SJ(2==Zq||4==Zq?n.neg():n,t,e,!0)):new r(NaN)},vJ.times=vJ.mul=function(t){var e,n,r,i,o,a,s,u,c,l=this,h=l.constructor,d=l.d,f=(t=new h(t)).d;if(t.s*=l.s,!(d&&d[0]&&f&&f[0]))return new h(!t.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:d&&f?0*t.s:t.s/0);for(n=lJ(l.e/yJ)+lJ(t.e/yJ),(u=d.length)<(c=f.length)&&(o=d,d=f,f=o,a=u,u=c,c=a),o=[],r=a=u+c;r--;)o.push(0);for(r=c;--r>=0;){for(e=0,i=u+r;i>r;)s=o[i]+f[r]*d[i-r-1]+e,o[i--]=s%gJ|0,e=s/gJ|0;o[i]=(o[i]+e)%gJ|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=AJ(o,n),iJ?SJ(t,h.precision,h.rounding):t},vJ.toBinary=function(t,e){return QJ(this,2,t,e)},vJ.toDecimalPlaces=vJ.toDP=function(t,e){var n=this,r=n.constructor;return n=new r(n),void 0===t?n:(LJ(t,0,$q),void 0===e?e=r.rounding:LJ(e,0,8),SJ(n,t+n.e+1,e))},vJ.toExponential=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=xJ(r,!0):(LJ(t,0,$q),void 0===e?e=i.rounding:LJ(e,0,8),n=xJ(r=SJ(new i(r),t+1,e),!0,t+1)),r.isNeg()&&!r.isZero()?"-"+n:n},vJ.toFixed=function(t,e){var n,r,i=this,o=i.constructor;return void 0===t?n=xJ(i):(LJ(t,0,$q),void 0===e?e=o.rounding:LJ(e,0,8),n=xJ(r=SJ(new o(i),t+i.e+1,e),!1,t+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},vJ.toFraction=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.d,m=f.constructor;if(!p)return new m(f);if(c=n=new m(1),r=u=new m(0),a=(o=(e=new m(r)).e=jJ(p)-f.e-1)%yJ,e.d[0]=hJ(10,a<0?yJ+a:a),null==t)t=o>0?e:c;else{if(!(s=new m(t)).isInt()||s.lt(c))throw Error(aJ+s);t=s.gt(e)?o>0?e:c:s}for(iJ=!1,s=new m(MJ(p)),l=m.precision,m.precision=o=p.length*yJ*2;h=EJ(s,e,0,1,1),1!=(i=n.plus(h.times(r))).cmp(t);)n=r,r=i,i=c,c=u.plus(h.times(i)),u=i,i=e,e=s.minus(h.times(i)),s=i;return i=EJ(t.minus(n),r,0,1,1),u=u.plus(i.times(c)),n=n.plus(i.times(r)),u.s=c.s=f.s,d=EJ(c,r,o,1).minus(f).abs().cmp(EJ(u,n,o,1).minus(f).abs())<1?[c,r]:[u,n],m.precision=l,iJ=!0,d},vJ.toHexadecimal=vJ.toHex=function(t,e){return QJ(this,16,t,e)},vJ.toNearest=function(t,e){var n=this,r=n.constructor;if(n=new r(n),null==t){if(!n.d)return n;t=new r(1),e=r.rounding}else{if(t=new r(t),void 0===e?e=r.rounding:LJ(e,0,8),!n.d)return t.s?n:t;if(!t.d)return t.s&&(t.s=n.s),t}return t.d[0]?(iJ=!1,n=EJ(n,t,0,e,1).times(t),iJ=!0,SJ(n)):(t.s=n.s,n=t),n},vJ.toNumber=function(){return+this},vJ.toOctal=function(t,e){return QJ(this,8,t,e)},vJ.toPower=vJ.pow=function(t){var e,n,r,i,o,a,s=this,u=s.constructor,c=+(t=new u(t));if(!(s.d&&t.d&&s.d[0]&&t.d[0]))return new u(hJ(+s,c));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,t.eq(1))return SJ(s,r,o);if((e=lJ(t.e/yJ))>=t.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=CJ(u,s,n,r),t.s<0?new u(1).div(i):SJ(i,r,o);if((a=s.s)<0){if(e<t.d.length-1)return new u(NaN);if(0==(1&t.d[e])&&(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(e=0!=(n=hJ(+s,c))&&isFinite(n)?new u(n+"").e:lJ(c*(Math.log("0."+MJ(s.d))/Math.LN10+s.e+1)))>u.maxE+1||e<u.minE-1?new u(e>0?a/0:0):(iJ=!1,u.rounding=s.s=1,n=Math.min(12,(e+"").length),(i=zJ(t.times(PJ(s,r+n)),r)).d&&_J((i=SJ(i,r+5,1)).d,r,o)&&(e=r+10,+MJ((i=SJ(zJ(t.times(PJ(s,e+n)),e),e+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=SJ(i,r+1,0))),i.s=a,iJ=!0,u.rounding=o,SJ(i,r,o))},vJ.toPrecision=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=xJ(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(LJ(t,1,$q),void 0===e?e=i.rounding:LJ(e,0,8),n=xJ(r=SJ(new i(r),t,e),t<=r.e||r.e<=i.toExpNeg,t)),r.isNeg()&&!r.isZero()?"-"+n:n},vJ.toSignificantDigits=vJ.toSD=function(t,e){var n=this.constructor;return void 0===t?(t=n.precision,e=n.rounding):(LJ(t,1,$q),void 0===e?e=n.rounding:LJ(e,0,8)),SJ(new n(this),t,e)},vJ.toString=function(){var t=this,e=t.constructor,n=xJ(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n},vJ.truncated=vJ.trunc=function(){return SJ(new this.constructor(this),this.e+1,1)},vJ.valueOf=vJ.toJSON=function(){var t=this,e=t.constructor,n=xJ(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};var EJ=function(){function t(t,e,n){var r,i=0,o=t.length;for(t=t.slice();o--;)r=t[o]*e+i,t[o]=r%n|0,i=r/n|0;return i&&t.unshift(i),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]<e[n]?1:0,t[n]=i*r+t[n]-e[n];for(;!t[0]&&t.length>1;)t.shift()}return function(r,i,o,a,s,u){var c,l,h,d,f,p,m,g,y,b,w,v,M,L,_,N,E,S,x,A,I=r.constructor,k=r.s==i.s?1:-1,j=r.d,T=i.d;if(!(j&&j[0]&&T&&T[0]))return new I(r.s&&i.s&&(j?!T||j[0]!=T[0]:T)?j&&0==j[0]||!T?0*k:k/0:NaN);for(u?(f=1,l=r.e-i.e):(u=gJ,f=yJ,l=lJ(r.e/f)-lJ(i.e/f)),x=T.length,E=j.length,b=(y=new I(k)).d=[],h=0;T[h]==(j[h]||0);h++);if(T[h]>(j[h]||0)&&l--,null==o?(L=o=I.precision,a=I.rounding):L=s?o+(r.e-i.e)+1:o,L<0)b.push(1),p=!0;else{if(L=L/f+2|0,h=0,1==x){for(d=0,T=T[0],L++;(h<E||d)&&L--;h++)_=d*u+(j[h]||0),b[h]=_/T|0,d=_%T|0;p=d||h<E}else{for((d=u/(T[0]+1)|0)>1&&(T=t(T,d,u),j=t(j,d,u),x=T.length,E=j.length),N=x,v=(w=j.slice(0,x)).length;v<x;)w[v++]=0;(A=T.slice()).unshift(0),S=T[0],T[1]>=u/2&&++S;do{d=0,(c=e(T,w,x,v))<0?(M=w[0],x!=v&&(M=M*u+(w[1]||0)),(d=M/S|0)>1?(d>=u&&(d=u-1),1==(c=e(m=t(T,d,u),w,g=m.length,v=w.length))&&(d--,n(m,x<g?A:T,g,u))):(0==d&&(c=d=1),m=T.slice()),(g=m.length)<v&&m.unshift(0),n(w,m,v,u),-1==c&&(c=e(T,w,x,v=w.length))<1&&(d++,n(w,x<v?A:T,v,u)),v=w.length):0===c&&(d++,w=[0]),b[h++]=d,c&&w[0]?w[v++]=j[N]||0:(w=[j[N]],v=1)}while((N++<E||void 0!==w[0])&&L--);p=void 0!==w[0]}b[0]||b.shift()}if(1==f)y.e=l,Gq=p;else{for(h=1,d=b[0];d>=10;d/=10)h++;y.e=h+l*f-1,SJ(y,s?o+y.e+1:o,a,p)}return y}}();function SJ(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor;t:if(null!=e){if(!(h=t.d))return t;for(i=1,s=h[0];s>=10;s/=10)i++;if((o=e-i)<0)o+=yJ,a=e,u=(l=h[d=0])/hJ(10,i-a-1)%10|0;else if((d=Math.ceil((o+1)/yJ))>=(s=h.length)){if(!r)break t;for(;s++<=d;)h.push(0);l=u=0,i=1,a=(o%=yJ)-yJ+1}else{for(l=s=h[d],i=1;s>=10;s/=10)i++;u=(a=(o%=yJ)-yJ+i)<0?0:l/hJ(10,i-a-1)%10|0}if(r=r||e<0||void 0!==h[d+1]||(a<0?l:l%hJ(10,i-a-1)),c=n<4?(u||r)&&(0==n||n==(t.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?l/hJ(10,i-a):0:h[d-1])%10&1||n==(t.s<0?8:7)),e<1||!h[0])return h.length=0,c?(e-=t.e+1,h[0]=hJ(10,(yJ-e%yJ)%yJ),t.e=-e||0):h[0]=t.e=0,t;if(0==o?(h.length=d,s=1,d--):(h.length=d+1,s=hJ(10,yJ-o),h[d]=a>0?(l/hJ(10,i-a)%hJ(10,a)|0)*s:0),c)for(;;){if(0==d){for(o=1,a=h[0];a>=10;a/=10)o++;for(a=h[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(t.e++,h[0]==gJ&&(h[0]=1));break}if(h[d]+=s,h[d]!=gJ)break;h[d--]=0,s=1}for(o=h.length;0===h[--o];)h.pop()}return iJ&&(t.e>f.maxE?(t.d=null,t.e=NaN):t.e<f.minE&&(t.e=0,t.d=[0])),t}function xJ(t,e,n){if(!t.isFinite())return RJ(t);var r,i=t.e,o=MJ(t.d),a=o.length;return e?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+TJ(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):i<0?(o="0."+TJ(-i-1)+o,n&&(r=n-a)>0&&(o+=TJ(r))):i>=a?(o+=TJ(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+TJ(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=TJ(r))),o}function AJ(t,e){var n=t[0];for(e*=yJ;n>=10;n/=10)e++;return e}function IJ(t,e,n){if(e>bJ)throw iJ=!0,n&&(t.precision=n),Error(sJ);return SJ(new t(eJ),e,1,!0)}function kJ(t,e,n){if(e>wJ)throw Error(sJ);return SJ(new t(nJ),e,n,!0)}function jJ(t){var e=t.length-1,n=e*yJ+1;if(e=t[e]){for(;e%10==0;e/=10)n--;for(e=t[0];e>=10;e/=10)n++}return n}function TJ(t){for(var e="";t--;)e+="0";return e}function CJ(t,e,n,r){var i,o=new t(1),a=Math.ceil(r/yJ+4);for(iJ=!1;;){if(n%2&&HJ((o=o.times(e)).d,a)&&(i=!0),0===(n=lJ(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}HJ((e=e.times(e)).d,a)}return iJ=!0,o}function DJ(t){return 1&t.d[t.d.length-1]}function OJ(t,e,n){for(var r,i=new t(e[0]),o=0;++o<e.length;){if(!(r=new t(e[o])).s){i=r;break}i[n](r)&&(i=r)}return i}function zJ(t,e){var n,r,i,o,a,s,u,c=0,l=0,h=0,d=t.constructor,f=d.rounding,p=d.precision;if(!t.d||!t.d[0]||t.e>17)return new d(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(iJ=!1,u=p):u=e,s=new d(.03125);t.e>-2;)t=t.times(s),h+=5;for(u+=r=Math.log(hJ(2,h))/Math.LN10*2+5|0,n=o=a=new d(1),d.precision=u;;){if(o=SJ(o.times(t),u,1),n=n.times(++l),MJ((s=a.plus(EJ(o,n,u,1))).d).slice(0,u)===MJ(a.d).slice(0,u)){for(i=h;i--;)a=SJ(a.times(a),u,1);if(null!=e)return d.precision=p,a;if(!(c<3&&_J(a.d,u-r,f,c)))return SJ(a,d.precision=p,f,iJ=!0);d.precision=u+=10,n=o=s=new d(1),l=0,c++}a=s}}function PJ(t,e){var n,r,i,o,a,s,u,c,l,h,d,f=1,p=t,m=p.d,g=p.constructor,y=g.rounding,b=g.precision;if(p.s<0||!m||!m[0]||!p.e&&1==m[0]&&1==m.length)return new g(m&&!m[0]?-1/0:1!=p.s?NaN:m?0:p);if(null==e?(iJ=!1,l=b):l=e,g.precision=l+=10,r=(n=MJ(m)).charAt(0),!(Math.abs(o=p.e)<15e14))return c=IJ(g,l+2,b).times(o+""),p=PJ(new g(r+"."+n.slice(1)),l-10).plus(c),g.precision=b,null==e?SJ(p,b,y,iJ=!0):p;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=MJ((p=p.times(t)).d)).charAt(0),f++;for(o=p.e,r>1?(p=new g("0."+n),o++):p=new g(r+"."+n.slice(1)),h=p,u=a=p=EJ(p.minus(1),p.plus(1),l,1),d=SJ(p.times(p),l,1),i=3;;){if(a=SJ(a.times(d),l,1),MJ((c=u.plus(EJ(a,new g(i),l,1))).d).slice(0,l)===MJ(u.d).slice(0,l)){if(u=u.times(2),0!==o&&(u=u.plus(IJ(g,l+2,b).times(o+""))),u=EJ(u,new g(f),l,1),null!=e)return g.precision=b,u;if(!_J(u.d,l-10,y,s))return SJ(u,g.precision=b,y,iJ=!0);g.precision=l+=10,c=a=p=EJ(h.minus(1),h.plus(1),l,1),d=SJ(p.times(p),l,1),i=s=1}u=c,i+=2}}function RJ(t){return String(t.s*t.s/0)}function BJ(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;48===e.charCodeAt(r);r++);for(i=e.length;48===e.charCodeAt(i-1);--i);if(e=e.slice(r,i)){if(i-=r,t.e=n=n-r-1,t.d=[],r=(n+1)%yJ,n<0&&(r+=yJ),r<i){for(r&&t.d.push(+e.slice(0,r)),i-=yJ;r<i;)t.d.push(+e.slice(r,r+=yJ));e=e.slice(r),r=yJ-e.length}else r-=i;for(;r--;)e+="0";t.d.push(+e),iJ&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function UJ(t,e){var n,r,i,o,a,s,u,c,l;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),mJ.test(e))return BJ(t,e)}else if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(fJ.test(e))n=16,e=e.toLowerCase();else if(dJ.test(e))n=2;else{if(!pJ.test(e))throw Error(aJ+e);n=8}for((o=e.search(/p/i))>0?(u=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),a=(o=e.indexOf("."))>=0,r=t.constructor,a&&(o=(s=(e=e.replace(".","")).length)-o,i=CJ(r,new r(n),o,2*o)),o=l=(c=NJ(e,n,gJ)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*t.s):(t.e=AJ(c,l),t.d=c,iJ=!1,a&&(t=EJ(t,i,4*s)),u&&(t=t.times(Math.abs(u)<54?hJ(2,u):TK.pow(2,u))),iJ=!0,t)}function YJ(t,e,n,r,i){var o,a,s,u,c=t.precision,l=Math.ceil(c/yJ);for(iJ=!1,u=n.times(n),s=new t(r);;){if(a=EJ(s.times(u),new t(e++*e++),c,1),s=i?r.plus(a):r.minus(a),r=EJ(a.times(u),new t(e++*e++),c,1),void 0!==(a=s.plus(r)).d[l]){for(o=l;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return iJ=!0,a.d.length=l+1,a}function FJ(t,e){for(var n=t;--e;)n*=t;return n}function WJ(t,e){var n,r=e.s<0,i=kJ(t,t.precision,1),o=i.times(.5);if((e=e.abs()).lte(o))return Zq=r?4:1,e;if((n=e.divToInt(i)).isZero())Zq=r?3:2;else{if((e=e.minus(n.times(i))).lte(o))return Zq=DJ(n)?r?2:3:r?4:1,e;Zq=DJ(n)?r?1:4:r?3:2}return e.minus(i).abs()}function QJ(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor,p=void 0!==n;if(p?(LJ(n,1,$q),void 0===r?r=f.rounding:LJ(r,0,8)):(n=f.precision,r=f.rounding),t.isFinite()){for(p?(i=2,16==e?n=4*n-3:8==e&&(n=3*n-2)):i=e,(a=(l=xJ(t)).indexOf("."))>=0&&(l=l.replace(".",""),(d=new f(1)).e=l.length-a,d.d=NJ(xJ(d),10,i),d.e=d.d.length),o=u=(h=NJ(l,10,i)).length;0==h[--u];)h.pop();if(h[0]){if(a<0?o--:((t=new f(t)).d=h,t.e=o,h=(t=EJ(t,d,n,r,0,i)).d,o=t.e,c=Gq),a=h[n],s=i/2,c=c||void 0!==h[n+1],c=r<4?(void 0!==a||c)&&(0===r||r===(t.s<0?3:2)):a>s||a===s&&(4===r||c||6===r&&1&h[n-1]||r===(t.s<0?8:7)),h.length=n,c)for(;++h[--n]>i-1;)h[n]=0,n||(++o,h.unshift(1));for(u=h.length;!h[u-1];--u);for(a=0,l="";a<u;a++)l+=tJ.charAt(h[a]);if(p){if(u>1)if(16==e||8==e){for(a=16==e?4:3,--u;u%a;u++)l+="0";for(u=(h=NJ(l,i,e)).length;!h[u-1];--u);for(a=1,l="1.";a<u;a++)l+=tJ.charAt(h[a])}else l=l.charAt(0)+"."+l.slice(1);l=l+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)l="0"+l;l="0."+l}else if(++o>u)for(o-=u;o--;)l+="0";else o<u&&(l=l.slice(0,o)+"."+l.slice(o))}else l=p?"0p+0":"0";l=(16==e?"0x":2==e?"0b":8==e?"0o":"")+l}else l=RJ(t);return t.s<0?"-"+l:l}function HJ(t,e){if(t.length>e)return t.length=e,!0}function GJ(t){return new this(t).abs()}function ZJ(t){return new this(t).acos()}function VJ(t){return new this(t).acosh()}function qJ(t,e){return new this(t).plus(e)}function JJ(t){return new this(t).asin()}function KJ(t){return new this(t).asinh()}function XJ(t){return new this(t).atan()}function $J(t){return new this(t).atanh()}function tK(t,e){t=new this(t),e=new this(e);var n,r=this.precision,i=this.rounding,o=r+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(n=e.s<0?kJ(this,r,i):new this(0)).s=t.s:!t.d||e.isZero()?(n=kJ(this,o,1).times(.5)).s=t.s:e.s<0?(this.precision=o,this.rounding=1,n=this.atan(EJ(t,e,o,1)),e=kJ(this,o,1),this.precision=r,this.rounding=i,n=t.s<0?n.minus(e):n.plus(e)):n=this.atan(EJ(t,e,o,1)):(n=kJ(this,o,1).times(e.s>0?.25:.75)).s=t.s:n=new this(NaN),n}function eK(t){return new this(t).cbrt()}function nK(t){return SJ(t=new this(t),t.e+1,2)}function rK(t,e,n){return new this(t).clamp(e,n)}function iK(t){if(!t||"object"!=typeof t)throw Error(oJ+"Object expected");var e,n,r,i=!0===t.defaults,o=["precision",1,$q,"rounding",0,8,"toExpNeg",-Xq,0,"toExpPos",0,Xq,"maxE",0,Xq,"minE",-Xq,0,"modulo",0,9];for(e=0;e<o.length;e+=3)if(n=o[e],i&&(this[n]=rJ[n]),void 0!==(r=t[n])){if(!(lJ(r)===r&&r>=o[e+1]&&r<=o[e+2]))throw Error(aJ+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=rJ[n]),void 0!==(r=t[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(aJ+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(uJ);this[n]=!0}else this[n]=!1}return this}function oK(t){return new this(t).cos()}function aK(t){return new this(t).cosh()}function sK(t,e){return new this(t).div(e)}function uK(t){return new this(t).exp()}function cK(t){return SJ(t=new this(t),t.e+1,3)}function lK(){var t,e,n=new this(0);for(iJ=!1,t=0;t<arguments.length;)if((e=new this(arguments[t++])).d)n.d&&(n=n.plus(e.times(e)));else{if(e.s)return iJ=!0,new this(1/0);n=e}return iJ=!0,n.sqrt()}function hK(t){return t instanceof TK||t&&t.toStringTag===cJ||!1}function dK(t){return new this(t).ln()}function fK(t,e){return new this(t).log(e)}function pK(t){return new this(t).log(2)}function mK(t){return new this(t).log(10)}function gK(){return OJ(this,arguments,"lt")}function yK(){return OJ(this,arguments,"gt")}function bK(t,e){return new this(t).mod(e)}function wK(t,e){return new this(t).mul(e)}function vK(t,e){return new this(t).pow(e)}function MK(t){var e,n,r,i,o=0,a=new this(1),s=[];if(void 0===t?t=this.precision:LJ(t,1,$q),r=Math.ceil(t/yJ),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=e[o])>=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(uJ);for(e=crypto.randomBytes(r*=4);o<r;)(i=e[o]+(e[o+1]<<8)+(e[o+2]<<16)+((127&e[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(e,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o<r;)s[o++]=1e7*Math.random()|0;for(r=s[--o],t%=yJ,r&&t&&(i=hJ(10,yJ-t),s[o]=(r/i|0)*i);0===s[o];o--)s.pop();if(o<0)n=0,s=[0];else{for(n=-1;0===s[0];n-=yJ)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<yJ&&(n-=yJ-r)}return a.e=n,a.d=s,a}function LK(t){return SJ(t=new this(t),t.e+1,this.rounding)}function _K(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function NK(t){return new this(t).sin()}function EK(t){return new this(t).sinh()}function SK(t){return new this(t).sqrt()}function xK(t,e){return new this(t).sub(e)}function AK(){var t=0,e=arguments,n=new this(e[t]);for(iJ=!1;n.s&&++t<e.length;)n=n.plus(e[t]);return iJ=!0,SJ(n,this.precision,this.rounding)}function IK(t){return new this(t).tan()}function kK(t){return new this(t).tanh()}function jK(t){return SJ(t=new this(t),t.e+1,1)}vJ[Symbol.for("nodejs.util.inspect.custom")]=vJ.toString,vJ[Symbol.toStringTag]="Decimal";var TK=vJ.constructor=function t(e){var n,r,i;function o(t){var e,n,r,i=this;if(!(i instanceof o))return new o(t);if(i.constructor=o,hK(t))return i.s=t.s,void(iJ?!t.d||t.e>o.maxE?(i.e=NaN,i.d=null):t.e<o.minE?(i.e=0,i.d=[0]):(i.e=t.e,i.d=t.d.slice()):(i.e=t.e,i.d=t.d?t.d.slice():t.d));if("number"===(r=typeof t)){if(0===t)return i.s=1/t<0?-1:1,i.e=0,void(i.d=[0]);if(t<0?(t=-t,i.s=-1):i.s=1,t===~~t&&t<1e7){for(e=0,n=t;n>=10;n/=10)e++;return void(iJ?e>o.maxE?(i.e=NaN,i.d=null):e<o.minE?(i.e=0,i.d=[0]):(i.e=e,i.d=[t]):(i.e=e,i.d=[t]))}return 0*t!=0?(t||(i.s=NaN),i.e=NaN,void(i.d=null)):BJ(i,t.toString())}if("string"!==r)throw Error(aJ+t);return 45===(n=t.charCodeAt(0))?(t=t.slice(1),i.s=-1):(43===n&&(t=t.slice(1)),i.s=1),mJ.test(t)?BJ(i,t):UJ(i,t)}if(o.prototype=vJ,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=iK,o.clone=t,o.isDecimal=hK,o.abs=GJ,o.acos=ZJ,o.acosh=VJ,o.add=qJ,o.asin=JJ,o.asinh=KJ,o.atan=XJ,o.atanh=$J,o.atan2=tK,o.cbrt=eK,o.ceil=nK,o.clamp=rK,o.cos=oK,o.cosh=aK,o.div=sK,o.exp=uK,o.floor=cK,o.hypot=lK,o.ln=dK,o.log=fK,o.log10=mK,o.log2=pK,o.max=gK,o.min=yK,o.mod=bK,o.mul=wK,o.pow=vK,o.random=MK,o.round=LK,o.sign=_K,o.sin=NK,o.sinh=EK,o.sqrt=SK,o.sub=xK,o.sum=AK,o.tan=IK,o.tanh=kK,o.trunc=jK,void 0===e&&(e={}),e&&!0!==e.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)e.hasOwnProperty(r=i[n++])||(e[r]=this[r]);return o.config(e),o}(rJ);eJ=new TK(eJ),nJ=new TK(nJ);var CK=[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}],DK=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],OK=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}],zK=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}],PK=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}];const RK=[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];var BK=({blockchain:t,address:e,api:n,id:r})=>r?new Promise((n=>{RG({blockchain:t,address:e,api:RK,method:"uri",params:[r]}).then((t=>{var e;t=t.match("0x{id}")?t.replace("0x{id}",r):t,(e=t,new Promise((t=>{e.match(/^ipfs/)&&(e=`https://ipfs.io/ipfs/${e.split("://")[1]}`),fetch(e).then((e=>{if(e.ok)return e.json();t()})).then((e=>{if(e){let n=e.name;n?t(n):t()}})).catch((()=>t()))}))).then(n)})).catch((t=>{console.log("error",t),n()}))})):RG({blockchain:t,address:e,api:n,method:"name",cache:864e5}),UK=[{name:"Approval",type:"event",inputs:[{name:"src",type:"address",indexed:!0,internalType:"address"},{name:"guy",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{name:"Deposit",type:"event",inputs:[{name:"dst",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{name:"Transfer",type:"event",inputs:[{name:"src",type:"address",indexed:!0,internalType:"address"},{name:"dst",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{name:"Withdrawal",type:"event",inputs:[{name:"src",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"fallback",stateMutability:"payable"},{name:"allowance",type:"function",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{name:"approve",type:"function",inputs:[{name:"guy",type:"address",internalType:"address"},{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"nonpayable"},{name:"balanceOf",type:"function",inputs:[{name:"",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{name:"decimals",type:"function",inputs:[],outputs:[{name:"",type:"uint8",internalType:"uint8"}],stateMutability:"view"},{name:"deposit",type:"function",inputs:[],outputs:[],stateMutability:"payable"},{name:"name",type:"function",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{name:"symbol",type:"function",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{name:"totalSupply",type:"function",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{name:"transfer",type:"function",inputs:[{name:"dst",type:"address",internalType:"address"},{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"nonpayable"},{name:"transferFrom",type:"function",inputs:[{name:"src",type:"address",internalType:"address"},{name:"dst",type:"address",internalType:"address"},{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"nonpayable"},{name:"withdraw",type:"function",inputs:[{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"}];const YK="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",FK="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";var WK=async({token:t,owner:e})=>{const[n]=await lF.findProgramAddress([new lF(e).toBuffer(),new lF(YK).toBuffer(),new lF(t).toBuffer()],new lF(FK));return function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([n,"optionalAccess",t=>t.toString,"call",t=>t()])};const QK=iG([sG("mintAuthorityOption"),eG("mintAuthority"),uG("supply"),cG("decimals"),$H("isInitialized"),sG("freezeAuthorityOption"),eG("freezeAuthority")]),HK=nG([iG([],"uninitialized"),iG([],"editionV1"),iG([],"masterEditionV1"),iG([],"reservationListV1"),iG([],"metadataV1"),iG([],"reservationListV2"),iG([],"masterEditionV2"),iG([],"editionMarker")]),GK=iG([eG("address"),$H("verified"),cG("share")]),ZK=iG([rG("name"),rG("symbol"),rG("uri"),aG("sellerFeeBasisPoints"),tG(lG(GK.replicate("creators")),"creators")]),VK=iG([HK.replicate("key"),eG("updateAuthority"),eG("mint"),ZK.replicate("data"),$H("primarySaleHappened"),$H("isMutable"),tG(cG(),"editionNonce")]),qK=iG([cG("instruction"),uG("amount")]),JK=iG([eG("mint"),eG("owner"),uG("amount"),sG("delegateOption"),eG("delegate"),cG("state"),sG("isNativeOption"),uG("isNative"),uG("delegatedAmount"),sG("closeAuthorityOption"),eG("closeAuthority")]),KK=iG([cG("instruction"),eG("owner")]),XK=iG([cG("instruction")]);var $K=Object.freeze({__proto__:null,createTransferInstruction:async({token:t,amount:e,from:n,to:r})=>{let i=await WK({token:t,owner:n}),o=await WK({token:t,owner:r});const a=[{pubkey:new lF(i),isSigner:!1,isWritable:!0},{pubkey:new lF(o),isSigner:!1,isWritable:!0},{pubkey:new lF(n),isSigner:!0,isWritable:!1}],s=JH.alloc(qK.span);return qK.encode({instruction:3,amount:new KH(e)},s),new SF({keys:a,programId:new lF(YK),data:s})},createAssociatedTokenAccountInstruction:async({token:t,owner:e,payer:n})=>{let r=await WK({token:t,owner:e});const i=[{pubkey:new lF(n),isSigner:!0,isWritable:!0},{pubkey:new lF(r),isSigner:!1,isWritable:!0},{pubkey:new lF(e),isSigner:!1,isWritable:!1},{pubkey:new lF(t),isSigner:!1,isWritable:!1},{pubkey:VF.programId,isSigner:!1,isWritable:!1},{pubkey:new lF(YK),isSigner:!1,isWritable:!1}];return new SF({keys:i,programId:FK,data:JH.alloc(0)})},initializeAccountInstruction:({account:t,token:e,owner:n})=>{const r=[{pubkey:new lF(t),isSigner:!1,isWritable:!0},{pubkey:new lF(e),isSigner:!1,isWritable:!1}],i=JH.alloc(KK.span);return KK.encode({instruction:18,owner:new lF(n)},i),new SF({keys:r,programId:new lF(YK),data:i})},closeAccountInstruction:({account:t,owner:e})=>{const n=[{pubkey:new lF(t),isSigner:!1,isWritable:!0},{pubkey:new lF(e),isSigner:!1,isWritable:!0},{pubkey:new lF(e),isSigner:!0,isWritable:!1}],r=JH.alloc(XK.span);return XK.encode({instruction:9},r),new SF({keys:n,programId:new lF(YK),data:r})}});function tX(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}const eX="metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",nX=new RegExp("\0","g"),rX=async({blockchain:t,address:e})=>{let n=new lF(e),r=new lF(eX),i=await(async({metaDataPublicKey:t,mintPublicKey:e})=>{let n=[JH.from("metadata"),t.toBuffer(),e.toBuffer()];return(await lF.findProgramAddress(n,t))[0]})({metaDataPublicKey:r,mintPublicKey:n}),o=await RG({blockchain:t,address:i.toString(),api:VK,cache:864e5});return{name:tX([o,"optionalAccess",t=>t.data,"optionalAccess",t=>t.name,"optionalAccess",t=>t.replace,"call",t=>t(nX,"")]),symbol:tX([o,"optionalAccess",t=>t.data,"optionalAccess",t=>t.symbol,"optionalAccess",t=>t.replace,"call",t=>t(nX,"")])}};let iX=["ethereum","bsc","polygon","solana","fantom","velas"];function oX(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}iX.evm=["ethereum","bsc","polygon","fantom","velas"],iX.solana=["solana"];class aX{constructor({blockchain:t,address:e}){this.blockchain=t,iX.evm.includes(this.blockchain)?this.address=Mp(e):iX.solana.includes(this.blockchain)&&(this.address=e)}async decimals(){if(this.address==Ch.findByName(this.blockchain).currency.address)return Ch.findByName(this.blockchain).currency.decimals;let t;try{iX.evm.includes(this.blockchain)?t=await(({blockchain:t,address:e,api:n})=>RG({blockchain:t,address:e,api:n,method:"decimals",cache:864e5}))({blockchain:this.blockchain,address:this.address,api:aX[this.blockchain].DEFAULT}):iX.solana.includes(this.blockchain)&&(t=await(async({blockchain:t,address:e})=>(await RG({blockchain:t,address:e,api:QK})).decimals)({blockchain:this.blockchain,address:this.address}))}catch(t){}return t}async symbol(){return this.address==Ch.findByName(this.blockchain).currency.address?Ch.findByName(this.blockchain).currency.symbol:iX.evm.includes(this.blockchain)?await(({blockchain:t,address:e,api:n})=>RG({blockchain:t,address:e,api:n,method:"symbol",cache:864e5}))({blockchain:this.blockchain,address:this.address,api:aX[this.blockchain].DEFAULT}):iX.solana.includes(this.blockchain)?await(async({blockchain:t,address:e})=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([await rX({blockchain:t,address:e}),"optionalAccess",t=>t.symbol]))({blockchain:this.blockchain,address:this.address}):void 0}async name(t){return this.address==Ch.findByName(this.blockchain).currency.address?Ch.findByName(this.blockchain).currency.name:iX.evm.includes(this.blockchain)?await BK({blockchain:this.blockchain,address:this.address,api:aX[this.blockchain].DEFAULT,id:oX([t,"optionalAccess",t=>t.id])}):iX.solana.includes(this.blockchain)?await(async({blockchain:t,address:e})=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([await rX({blockchain:t,address:e}),"optionalAccess",t=>t.name]))({blockchain:this.blockchain,address:this.address}):void 0}async balance(t,e){return iX.evm.includes(this.blockchain)?await(async({blockchain:t,address:e,account:n,api:r,id:i})=>e==Ch[t].currency.address?await RG({blockchain:t,address:n,method:"balance",cache:1e4}):await RG({blockchain:t,address:e,method:"balanceOf",api:r,params:i?[n,i]:[n],cache:1e4}))({blockchain:this.blockchain,account:t,address:this.address,api:e?aX[this.blockchain][1155]:aX[this.blockchain].DEFAULT,id:e}):iX.solana.includes(this.blockchain)?await(async({blockchain:t,address:e,account:n,api:r})=>{if(e==Ch[t].currency.address)return kd.from(await RG(`solana://${n}/balance`));{let t=[{dataSize:165},{memcmp:{offset:32,bytes:n}},{memcmp:{offset:0,bytes:e}}],r=await RG("solana://TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA/getProgramAccounts",{params:{filters:t}}),i=kd.from("0");return await Promise.all(r.map((t=>RG(`solana://${t.pubkey.toString()}/getTokenAccountBalance`)))).then((t=>{t.forEach((t=>{i=i.add(kd.from(t.value.amount))}))})),i}})({blockchain:this.blockchain,account:t,address:this.address,api:aX[this.blockchain].DEFAULT}):void 0}async allowance(t,e){return this.address==Ch.findByName(this.blockchain).currency.address?kd.from(Ch.findByName(this.blockchain).maxInt):iX.evm.includes(this.blockchain)?await(({blockchain:t,address:e,api:n,owner:r,spender:i})=>RG({blockchain:t,address:e,api:n,method:"allowance",params:[r,i],cache:5e3}))({blockchain:this.blockchain,address:this.address,api:aX[this.blockchain].DEFAULT,owner:t,spender:e}):iX.solana.includes(this.blockchain)?kd.from(Ch.findByName(this.blockchain).maxInt):void 0}async BigNumber(t){let e=await this.decimals();return $M(aX.safeAmount({amount:parseFloat(t),decimals:e}).toString(),e)}async readable(t){let e=await this.decimals(),n=XM(t.toString(),e);return n=n.replace(/0+$/,""),n=n.replace(/\.$/,""),n}}function sX(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}aX.BigNumber=async({amount:t,blockchain:e,address:n})=>new aX({blockchain:e,address:n}).BigNumber(t),aX.readable=async({amount:t,blockchain:e,address:n})=>new aX({blockchain:e,address:n}).readable(t),aX.safeAmount=({amount:t,decimals:e})=>parseFloat(t.toFixed(e)),aX.ethereum={DEFAULT:OK,ERC20:OK,20:OK,1155:[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}]},aX.bsc={DEFAULT:CK,BEP20:CK,20:CK,1155:DK},aX.polygon={DEFAULT:zK,ERC20:zK,20:zK,1155:DK},aX.fantom={DEFAULT:PK,FTM20:PK,20:PK,1155:[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}]},aX.velas={DEFAULT:UK,VRC20:UK,20:UK,1155:DK},aX.solana={MINT_LAYOUT:QK,METADATA_LAYOUT:VK,TRANSFER_LAYOUT:qK,METADATA_ACCOUNT:eX,TOKEN_PROGRAM:YK,TOKEN_LAYOUT:JK,ASSOCIATED_TOKEN_PROGRAM:FK,findProgramAddress:WK,findAccount:async({token:t,owner:e})=>{let n=(await RG(`solana://${YK}/getProgramAccounts`,{api:JK,params:{filters:[{dataSize:165},{memcmp:{offset:32,bytes:e}},{memcmp:{offset:0,bytes:t}}]}})).sort(((t,e)=>t.account.data.amount.lt(e.account.data.amount)?1:-1))[0];if(n)return n.pubkey.toString()},getMetaData:rX,...$K};class uX{constructor({tokenIn:t,tokenOut:e,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,exchange:s,getTransaction:u}){this.tokenIn=t,this.tokenOut=e,this.path=n,this.amountIn=sX([r,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOutMin=sX([a,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOut=sX([o,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountInMax=sX([i,"optionalAccess",t=>t.toString,"call",t=>t()]),this.exchange=s,this.getTransaction=u}}let cX=["ethereum","bsc","polygon","solana","fantom","velas"];cX.evm=["ethereum","bsc","polygon","fantom","velas"],cX.solana=["solana"];const lX=async({exchange:t,fixedPath:e,amountIn:n,amountOut:r})=>{let i=n.add(n.mul(100*parseFloat("0.5")).div(1e4));if(!cX.evm.includes(t.blockchain))return i;const o=await RG({blockchain:t.blockchain,method:"latestBlockNumber"});let a=[];for(var s=0;s<=2;s++)a.push(o-s);const u=await Promise.all(a.map((async n=>{let{amountIn:i}=await t.getAmounts({path:e,amountOut:r,block:n});return i})));if(!u[0]||!u[1]||!u[2])return i;let c;if(u[0].gt(u[1])&&u[1].gt(u[2])){const t=u[0].sub(u[1]),e=u[1].sub(u[2]),n=t.add(e).div(2);if(c=u[0].add(n),c.gt(i))return c}else if(!u[0].eq(u[1])&&!u[1].eq(u[2])){const t=u[0].sub(u[1]).abs(),e=u[1].sub(u[2]).abs();let n,r;if(n=t.lt(e)?t:e,r=u[0].gt(u[1])&&u[0].gt(u[2])?u[0]:u[1].gt(u[2])&&u[1].gt(u[0])?u[1]:u[2],c=r.add(n),c.gt(i))return c}return i},hX=async({exchange:t,fixedPath:e,amounts:n,tokenIn:r,tokenOut:i,amountIn:o,amountInMax:a,amountOut:s,amountOutMin:u,amountInInput:c,amountOutInput:l,amountInMaxInput:h,amountOutMinInput:d})=>{if(d||l){if(cX.evm.includes(t.blockchain))o=a=await lX({exchange:t,fixedPath:e,amountIn:o,amountOut:d||s});else if(cX.solana.includes(t.blockchain)){let r=[];await Promise.all(e.map(((i,o)=>{if(0!=o){let i=lX({exchange:t,fixedPath:[e[o-1],e[o]],amountIn:n[o-1],amountOut:n[o]});return i.then((t=>r.push(t))),i}}))),r.push(n[n.length-1]),o=a=(n=r)[0]}}else if((h||c)&&cX.solana.includes(t.blockchain)){let r=[];await Promise.all(e.map(((i,o)=>{if(0!==o&&o<e.length-1)r.unshift(n[o]);else if(o===e.length-1){let i=(async({exchange:t,fixedPath:e,amountOut:n,amountIn:r})=>n.sub(n.mul(100*parseFloat("0.5")).div(1e4)))({exchange:t,fixedPath:[e[o-1],e[o]],amountIn:n[o-1],amountOut:n[o]});return i.then((t=>(r.unshift(t),t))),i}}))),r.push(n[0]),s=u=(n=r.slice().reverse())[n.length-1]}return{amountIn:o,amountInMax:a,amountOut:s,amountOutMin:u,amounts:n}},dX=t=>t.match("0x")?Mp(t):t;let fX=async({amount:t,blockchain:e,address:n})=>await aX.BigNumber({amount:t,blockchain:e,address:n}),pX=async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{let u={exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s};return o&&"number"==typeof o&&(u.amountOut=await fX({amount:o,blockchain:t,address:r})),s&&"number"==typeof s&&(u.amountOutMin=await fX({amount:s,blockchain:t,address:r})),i&&"number"==typeof i&&(u.amountIn=await fX({amount:i,blockchain:t,address:n})),a&&"number"==typeof a&&(u.amountInMax=await fX({amount:a,blockchain:t,address:n})),u};class mX{constructor({name:t,blockchain:e,alternativeNames:n,label:r,logo:i,router:o,factory:a,wrapper:s,pair:u,market:c,findPath:l,pathExists:h,getAmounts:d,getTransaction:f,slippage:p,getPair:m}){this.name=t,this.blockchain=e,this.alternativeNames=n,this.label=r,this.logo=i,this.router=o,this.factory=a,this.wrapper=s,this.pair=u,this.market=c,this.findPath=l,this.pathExists=h,this.getAmounts=d,this.getTransaction=f,this.slippage=p,this.getPair=m}async route({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o,amountOutMax:a,amountInMin:s}){return t===e?Promise.resolve():((({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o,amountOutMax:a,amountInMin:s})=>{if(void 0!==a)throw"You cannot not set amountOutMax! Only amountInMax or amountOutMin!";if(void 0!==s)throw"You cannot not set amountInMin! Only amountInMax or amountOutMin!";if(void 0!==r&&void 0!==n)throw"You cannot set amountIn and amountOut at the same time, use amountInMax or amountOutMin to describe the non exact part of the swap!";if(void 0!==i&&void 0!==o)throw"You cannot set amountInMax and amountOutMin at the same time, use amountIn or amountOut to describe the part of the swap that needs to be exact!";if(void 0!==n&&void 0!==i)throw"Setting amountIn and amountInMax at the same time makes no sense. Decide if amountIn needs to be exact or not!";if(void 0!==r&&void 0!==o)throw"Setting amountOut and amountOutMin at the same time makes no sense. Decide if amountOut needs to be exact or not!"})({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o,amountOutMax:a,amountInMin:s}),await(({exchange:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a,findPath:s,getAmounts:u,getTransaction:c,slippage:l})=>(e=dX(e),n=dX(n),new Promise((async h=>{let{path:d,fixedPath:f}=await s({tokenIn:e,tokenOut:n});if(void 0===d||0==d.length)return h();let p,[m,g,y,b]=[r,i,o,a];if(({amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amounts:p}=await u({path:d,tokenIn:e,tokenOut:n,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a})),[r,o,i,a].every((t=>null==t)))return h();l&&({amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amounts:p}=await hX({exchange:t,fixedPath:f,amounts:p,tokenIn:e,tokenOut:n,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amountInInput:m,amountOutInput:g,amountInMaxInput:y,amountOutMinInput:b})),h(new uX({tokenIn:e,tokenOut:n,path:d,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,exchange:t,getTransaction:async({from:e})=>await c({exchange:t,path:d,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amounts:p,amountInInput:m,amountOutInput:g,amountInMaxInput:y,amountOutMinInput:b,fromAddress:e})}))}))))({...await pX({blockchain:this.blockchain,exchange:this,tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o}),findPath:this.findPath,getAmounts:this.getAmounts,getTransaction:this.getTransaction,slippage:this.slippage}))}}function gX(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}const yX=(t,e,n)=>{if(!n)return;let r=n.map(((e,r)=>e===t.currency.address&&n[r+1]!=t.wrapped.address&&n[r-1]!=t.wrapped.address?t.wrapped.address:e));return r[0]==t.currency.address&&r[1]==t.wrapped.address?r.splice(0,1):r[r.length-1]==t.currency.address&&r[r.length-2]==t.wrapped.address&&r.splice(r.length-1,1),r},bX=({reserves:t,min:e,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?t[0].gte($M(e.toString(),o)):i.toLowerCase()==n.toLowerCase()&&t[1].gte($M(e.toString(),o)),wX=async(t,e,n)=>{if(1==yX(t,0,n).length)return!1;let r=await RG({blockchain:t.name,address:e.factory.address,method:"getPair",api:e.factory.api,cache:36e5,params:yX(t,0,n)});if(r==t.zero)return!1;let[i,o,a]=await Promise.all([RG({blockchain:t.name,address:r,method:"getReserves",api:e.pair.api,cache:36e5}),RG({blockchain:t.name,address:r,method:"token0",api:e.pair.api,cache:36e5}),RG({blockchain:t.name,address:r,method:"token1",api:e.pair.api,cache:36e5})]);if(n.includes(t.wrapped.address))return bX({min:1,token:t.wrapped.address,decimals:t.currency.decimals,reserves:i,token0:o,token1:a});if(n.find((e=>t.stables.usd.includes(e)))){let e=n.find((e=>t.stables.usd.includes(e))),r=new aX({blockchain:t.name,address:e}),s=await r.decimals();return bX({min:1e3,token:e,decimals:s,reserves:i,token0:o,token1:a})}return!0};let vX=(t,e,{path:n,amountIn:r,tokenIn:i,tokenOut:o})=>new Promise((i=>{RG({blockchain:t.name,address:e.router.address,method:"getAmountsOut",api:e.router.api,params:{amountIn:r,path:yX(t,0,n)}}).then((t=>{i(t[t.length-1])})).catch((()=>i()))})),MX=(t,e,{path:n,amountOut:r,block:i})=>new Promise((o=>{RG({blockchain:t.name,address:e.router.address,method:"getAmountsIn",api:e.router.api,params:{amountOut:r,path:yX(t,0,n)},block:i}).then((t=>o(t[0]))).catch((()=>o()))}));var LX={findPath:async(t,e,{tokenIn:n,tokenOut:r})=>{if([n,r].includes(t.currency.address)&&[n,r].includes(t.wrapped.address))return{path:void 0,fixedPath:void 0};let i;if(await wX(t,e,[n,r]))i=[n,r];else if(n!=t.wrapped.address&&await wX(t,e,[n,t.wrapped.address])&&r!=t.wrapped.address&&await wX(t,e,[r,t.wrapped.address]))i=[n,t.wrapped.address,r];else if(!t.stables.usd.includes(n)&&(await Promise.all(t.stables.usd.map((r=>wX(t,e,[n,r]))))).filter(Boolean).length&&r!=t.wrapped.address&&await wX(t,e,[t.wrapped.address,r])){let o=(await Promise.all(t.stables.usd.map((async r=>await wX(t,e,[n,r])?r:void 0)))).find(Boolean);i=[n,o,t.wrapped.address,r]}else if(n!=t.wrapped.address&&await wX(t,e,[n,t.wrapped.address])&&!t.stables.usd.includes(r)&&(await Promise.all(t.stables.usd.map((n=>wX(t,e,[n,r]))))).filter(Boolean).length){let o=(await Promise.all(t.stables.usd.map((async n=>await wX(t,e,[n,r])?n:void 0)))).find(Boolean);i=[n,t.wrapped.address,o,r]}return gX([i,"optionalAccess",t=>t.length])&&i[0]==t.currency.address?i.splice(1,0,t.wrapped.address):gX([i,"optionalAccess",t=>t.length])&&i[i.length-1]==t.currency.address&&i.splice(i.length-1,0,t.wrapped.address),{path:i,fixedPath:yX(t,0,i)}},pathExists:wX,getAmounts:async(t,e,{path:n,block:r,tokenIn:i,tokenOut:o,amountOut:a,amountIn:s,amountInMax:u,amountOutMin:c})=>{if(a){if(null==(s=await MX(t,e,{block:r,path:n,amountOut:a,tokenIn:i,tokenOut:o}))||u&&s.gt(u))return{};void 0===u&&(u=s)}else if(s){if(null==(a=await vX(t,e,{path:n,amountIn:s,tokenIn:i,tokenOut:o}))||c&&a.lt(c))return{};void 0===c&&(c=a)}else if(c){if(null==(s=await MX(t,e,{block:r,path:n,amountOut:c,tokenIn:i,tokenOut:o}))||u&&s.gt(u))return{};void 0===u&&(u=s)}else if(u){if(null==(a=await vX(t,e,{path:n,amountIn:u,tokenIn:i,tokenOut:o}))||c&&a.lt(c))return{};void 0===c&&(c=a)}return{amountOut:a,amountIn:s,amountInMax:u,amountOutMin:c}},getTransaction:(t,e,{path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,fromAddress:h})=>{let d={blockchain:t.name,from:h,to:e.router.address,api:e.router.api};return n[0]===t.currency.address?s||l?(d.method="swapExactETHForTokens",d.value=r.toString(),d.params={amountOutMin:a.toString()}):(u||c)&&(d.method="swapETHForExactTokens",d.value=i.toString(),d.params={amountOut:o.toString()}):n[n.length-1]===t.currency.address?s||l?(d.method="swapExactTokensForETH",d.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(d.method="swapTokensForExactETH",d.params={amountInMax:i.toString(),amountOut:o.toString()}):s||l?(d.method="swapExactTokensForTokens",d.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(d.method="swapTokensForExactTokens",d.params={amountInMax:i.toString(),amountOut:o.toString()}),d.params=Object.assign({},d.params,{path:yX(t,0,n),to:h,deadline:Math.round(Date.now()/1e3)+1800}),d},ROUTER:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"amountADesired",type:"uint256"},{internalType:"uint256",name:"amountBDesired",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountTokenDesired",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountIn",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountOut",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsIn",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsOut",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"reserveA",type:"uint256"},{internalType:"uint256",name:"reserveB",type:"uint256"}],name:"quote",outputs:[{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETHSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermit",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityWithPermit",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETHSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!1,internalType:"address",name:"pair",type:"address"},{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"PairCreated",type:"event"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"allPairs",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"allPairsLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"}],name:"createPair",outputs:[{internalType:"address",name:"pair",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"feeTo",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"feeToSetter",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"getPair",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeTo",type:"address"}],name:"setFeeTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],name:"setFeeToSetter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}],PAIR:[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount0Out",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1Out",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint112",name:"reserve0",type:"uint112"},{indexed:!1,internalType:"uint112",name:"reserve1",type:"uint112"}],name:"Sync",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MINIMUM_LIQUIDITY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getReserves",outputs:[{internalType:"uint112",name:"_reserve0",type:"uint112"},{internalType:"uint112",name:"_reserve1",type:"uint112"},{internalType:"uint32",name:"_blockTimestampLast",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_token0",type:"address"},{internalType:"address",name:"_token1",type:"address"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"kLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"liquidity",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"price0CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"price1CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"skim",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount0Out",type:"uint256"},{internalType:"uint256",name:"amount1Out",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"sync",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]};const _X=Ch.bsc,NX={blockchain:"bsc",name:"pancakeswap",alternativeNames:["pancake"],label:"PancakeSwap",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTk4IiBoZWlnaHQ9IjE5OSIgdmlld0JveD0iMCAwIDE5OCAxOTkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTguNTUyIDE5OC42MDdDNjkuMDYxMyAxOTguNTg1IDQ1LjMwNiAxOTEuNTggMjguNzA3OSAxNzguOTk4QzExLjkxMDggMTY2LjI2NSAzIDE0OC4xOTUgMyAxMjcuNzQ4QzMgMTA4LjA0NyAxMS44OTEzIDkzLjg0MTEgMjEuOTUxNyA4NC4yM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IDEzMi42NzUgMTIxLjc3MyAxMjcuNjE0IDEyMS43NzMgMTE3Ljg5NkMxMjEuNzczIDEwOC4xNzggMTI2LjM2NSAxMDMuMTE3IDEzMi4wMzEgMTAzLjExN0MxMzcuNjk2IDEwMy4xMTcgMTQyLjI4OCAxMDguMTc4IDE0Mi4yODggMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPC9zdmc+Cg==",router:{address:"0x10ED43C718714eb63d5aA57B78B54704E256024E",api:LX.ROUTER},factory:{address:"0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73",api:LX.FACTORY},pair:{api:LX.PAIR},slippage:!0};var EX=new mX(Object.assign(NX,{findPath:({tokenIn:t,tokenOut:e})=>LX.findPath(_X,NX,{tokenIn:t,tokenOut:e}),pathExists:t=>LX.pathExists(_X,NX,t),getAmounts:({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>LX.getAmounts(_X,NX,{path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>LX.getTransaction(_X,NX,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const SX=Ch.polygon,xX={blockchain:"polygon",name:"quickswap",alternativeNames:[],label:"QuickSwap",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNzAyLjQ1IDcwMi40NyI+PGRlZnM+PGNsaXBQY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y0xMS43MS44My0xNy41Mi40Ni00LjUxLS4yOS05LjE0LDAtMTMuNTYtMS4zNyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIzLjc4IC0yMy43NykiIGZpbGw9IiMwZTFmNjYiLz48L2c+PC9zdmc+",router:{address:"0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff",api:LX.ROUTER},factory:{address:"0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",api:LX.FACTORY},pair:{api:LX.PAIR},slippage:!0};var AX=new mX(Object.assign(xX,{findPath:({tokenIn:t,tokenOut:e})=>LX.findPath(SX,xX,{tokenIn:t,tokenOut:e}),pathExists:t=>LX.pathExists(SX,xX,t),getAmounts:({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>LX.getAmounts(SX,xX,{path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>LX.getTransaction(SX,xX,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const IX=iG([uG("status"),uG("nonce"),uG("maxOrder"),uG("depth"),uG("baseDecimal"),uG("quoteDecimal"),uG("state"),uG("resetFlag"),uG("minSize"),uG("volMaxCutRatio"),uG("amountWaveRatio"),uG("baseLotSize"),uG("quoteLotSize"),uG("minPriceMultiplier"),uG("maxPriceMultiplier"),uG("systemDecimalValue"),uG("minSeparateNumerator"),uG("minSeparateDenominator"),uG("tradeFeeNumerator"),uG("tradeFeeDenominator"),uG("pnlNumerator"),uG("pnlDenominator"),uG("swapFeeNumerator"),uG("swapFeeDenominator"),uG("baseNeedTakePnl"),uG("quoteNeedTakePnl"),uG("quoteTotalPnl"),uG("baseTotalPnl"),oG("quoteTotalDeposited"),oG("baseTotalDeposited"),oG("swapBaseInAmount"),oG("swapQuoteOutAmount"),uG("swapBase2QuoteFee"),oG("swapQuoteInAmount"),oG("swapBaseOutAmount"),uG("swapQuote2BaseFee"),eG("baseVault"),eG("quoteVault"),eG("baseMint"),eG("quoteMint"),eG("lpMint"),eG("openOrders"),eG("marketId"),eG("marketProgramId"),eG("targetOrders"),eG("withdrawQueue"),eG("lpVault"),eG("owner"),uG("lpReserve"),HH(uG(),3,"padding")]),kX=iG([cG("instruction"),cG("simulateType")]),jX=iG([GH(5),GH(8),eG("ownAddress"),uG("vaultSignerNonce"),eG("baseMint"),eG("quoteMint"),eG("baseVault"),uG("baseDepositsTotal"),uG("baseFeesAccrued"),eG("quoteVault"),uG("quoteDepositsTotal"),uG("quoteFeesAccrued"),uG("quoteDustThreshold"),eG("requestQueue"),eG("eventQueue"),eG("bids"),eG("asks"),uG("baseLotSize"),uG("quoteLotSize"),uG("feeRateBps"),uG("referrerRebatesAccrued"),GH(7)]);var TX={blockchain:"solana",name:"raydium",alternativeNames:[],label:"Raydium",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNi4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4wIiBpZD0ia2F0bWFuXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNjAwIDQ1MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjAwIDQ1MDsiIHhtbD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Q5pge4j1",api:IX,LIQUIDITY_FEES_NUMERATOR:kd.from(25),LIQUIDITY_FEES_DENOMINATOR:kd.from(1e4)}},router:{v1:{address:"routeUGWgWzqBWFcrCfv8tritsqukccJPu3q5GPP3xS"}},market:{v3:{address:"srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX",api:jX}},slippage:!0};const CX=1,DX=6;let OX=async(t,e)=>await RG(`solana://${TX.pair.v4.address}/getProgramAccounts`,{params:{filters:[{dataSize:TX.pair.v4.api.span},{memcmp:{offset:400,bytes:t}},{memcmp:{offset:432,bytes:e}}]},api:TX.pair.v4.api,cache:36e5}),zX=async(t,e)=>{try{let n=await OX(t,e);return 0==n.length&&(n=await OX(e,t)),n}catch(t){return console.log(t),[]}},PX=async(t,e)=>{let n=await zX(t,e);return 1==n.length?n[0]:n.length<1?null:n.reduce(((t,e)=>{if(![CX,DX].includes(e.data.status.toNumber()))return;let n=e.data.lpReserve;return t.data.lpReserve.gte(n)?t:e}))},RX=async(t,e)=>(await zX(t,e)).length>0;function BX(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}const UX=Ch.solana,YX="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",FX="Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB";let WX=t=>{if(!t)return;let e=t.map(((e,n)=>e===UX.currency.address&&t[n+1]!=UX.wrapped.address&&t[n-1]!=UX.wrapped.address?UX.wrapped.address:e));return e[0]==UX.currency.address&&e[1]==UX.wrapped.address?e.splice(0,1):e[e.length-1]==UX.currency.address&&e[e.length-2]==UX.wrapped.address&&e.splice(e.length-1,1),e},QX=async t=>1!=t.length&&(t=WX(t),!(!await RX(t[0],t[1])&&!await RX(t[1],t[0])));const HX=async t=>await RG({blockchain:"solana",address:t,api:TX.market.v3.api,cache:36e5}),GX=async t=>{const e=JH.alloc(kX.span);kX.encode({instruction:12,simulateType:0},e);const n=await HX(t.data.marketId.toString()),r=[{pubkey:t.pubkey,isWritable:!1,isSigner:!1},{pubkey:new lF(TX.pair.v4.authority),isWritable:!1,isSigner:!1},{pubkey:t.data.openOrders,isWritable:!1,isSigner:!1},{pubkey:t.data.baseVault,isWritable:!1,isSigner:!1},{pubkey:t.data.quoteVault,isWritable:!1,isSigner:!1},{pubkey:t.data.lpMint,isWritable:!1,isSigner:!1},{pubkey:t.data.marketId,isWritable:!1,isSigner:!1},{pubkey:n.eventQueue,isWritable:!1,isSigner:!1}],i=new SF({programId:new lF(TX.pair.v4.address),keys:r,data:e}),o=new lF("RaydiumSimuLateTransaction11111111111111111");let a,s=new xF({feePayer:o});s.add(i);const u=await CG("solana");try{a=await u.simulateTransaction(s)}catch(t){}let c;if(a&&a.value&&a.value.logs){let t=a.value.logs.find((t=>t.match("GetPoolData:")));t&&(c=JSON.parse(t.replace(/.*GetPoolData:\s/,"")))}return c};let ZX=async({path:t,amountIn:e})=>{let n=[e],r=await Promise.all(t.map((async(e,r)=>{const i=t[r+1];if(null==i)return;const o=await PX(e,i),a=await GX(o);if(!a)return;const s=o.data.baseMint.toString(),u=[kd.from(a.pool_coin_amount.toString()),kd.from(a.pool_pc_amount.toString())],[c,l]=s==e?[u[0],u[1]]:[u[1],u[0]],h=n[r].mul(TX.pair.v4.LIQUIDITY_FEES_NUMERATOR).div(TX.pair.v4.LIQUIDITY_FEES_DENOMINATOR),d=n[r].sub(h),f=c.add(d),p=l.mul(d).div(f);n.push(p)})));if(r.length==t.length)return n},VX=async({path:t,amountOut:e})=>{t=t.slice().reverse();let n=[e],r=await Promise.all(t.map((async(e,r)=>{const i=t[r+1];if(null==i)return;const o=await PX(e,i),a=await GX(o);if(!a)return;o.pubkey.toString();const s=o.data.baseMint.toString();o.data.quoteMint.toString();const u=[kd.from(a.pool_coin_amount.toString()),kd.from(a.pool_pc_amount.toString())],[c,l]=s==e?[u[1],u[0]]:[u[0],u[1]],h=l.sub(n[r]),d=c.mul(n[r]).div(h).mul(TX.pair.v4.LIQUIDITY_FEES_DENOMINATOR).div(TX.pair.v4.LIQUIDITY_FEES_DENOMINATOR.sub(TX.pair.v4.LIQUIDITY_FEES_NUMERATOR));n.push(d)})));if(r.length==t.length)return n.slice().reverse()};const qX=Ch.solana,JX=({pair:t,amountIn:e,amountOutMin:n,amountOut:r,amountInMax:i,fix:o})=>{let a,s;return"in"===o?(a=iG([cG("instruction"),uG("amountIn"),uG("minAmountOut")]),s=JH.alloc(a.span),a.encode({instruction:9,amountIn:new KH(e.toString()),minAmountOut:new KH(n.toString())},s)):"out"===o&&(a=iG([cG("instruction"),uG("maxAmountIn"),uG("amountOut")]),s=JH.alloc(a.span),a.encode({instruction:11,maxAmountIn:new KH(i.toString()),amountOut:new KH(r.toString())},s)),s},KX=async({tokenIn:t,tokenInAccount:e,tokenOut:n,tokenOutAccount:r,pair:i,market:o,fromAddress:a})=>{e||(e=await aX.solana.findAccount({owner:a,token:t})),e||(e=await aX.solana.findProgramAddress({owner:a,token:t})),r||(r=await aX.solana.findAccount({owner:a,token:n})),r||(r=await aX.solana.findProgramAddress({owner:a,token:n}));let s=await(async(t,e)=>{const n=[e.toBuffer()];let r,i=0;for(;i<100;){try{const e=n.concat(JH.from([i]),JH.alloc(7));r=await lF.createProgramAddress(e,t)}catch(t){if(t instanceof TypeError)throw t;i++;continue}return r}})(i.data.marketProgramId,i.data.marketId);return[{pubkey:new lF(aX.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:i.pubkey,isWritable:!0,isSigner:!1},{pubkey:new lF(TX.pair.v4.authority),isWritable:!1,isSigner:!1},{pubkey:i.data.openOrders,isWritable:!0,isSigner:!1},{pubkey:i.data.targetOrders,isWritable:!0,isSigner:!1},{pubkey:i.data.baseVault,isWritable:!0,isSigner:!1},{pubkey:i.data.quoteVault,isWritable:!0,isSigner:!1},{pubkey:i.data.marketProgramId,isWritable:!1,isSigner:!1},{pubkey:i.data.marketId,isWritable:!0,isSigner:!1},{pubkey:o.bids,isWritable:!0,isSigner:!1},{pubkey:o.asks,isWritable:!0,isSigner:!1},{pubkey:o.eventQueue,isWritable:!0,isSigner:!1},{pubkey:o.baseVault,isWritable:!0,isSigner:!1},{pubkey:o.quoteVault,isWritable:!0,isSigner:!1},{pubkey:s,isWritable:!1,isSigner:!1},{pubkey:new lF(e),isWritable:!0,isSigner:!1},{pubkey:new lF(r),isWritable:!0,isSigner:!1},{pubkey:new lF(a),isWritable:!1,isSigner:!0}]};var XX=new mX(Object.assign(TX,{findPath:async({tokenIn:t,tokenOut:e})=>{if([t,e].includes(UX.currency.address)&&[t,e].includes(UX.wrapped.address))return{path:void 0,fixedPath:void 0};let n;return await QX([t,e])?n=[t,e]:t!=UX.wrapped.address&&t!=UX.currency.address&&await QX([t,UX.wrapped.address])&&e!=UX.wrapped.address&&e!=UX.currency.address&&await QX([e,UX.wrapped.address])?n=[t,UX.wrapped.address,e]:t!=YX&&await QX([t,YX])&&e!=YX&&await QX([e,YX])?n=[t,YX,e]:t!=FX&&await QX([t,FX])&&e!=FX&&await QX([e,FX])&&(n=[t,FX,e]),BX([n,"optionalAccess",t=>t.length])&&n[0]==UX.currency.address?n.splice(1,0,UX.wrapped.address):BX([n,"optionalAccess",t=>t.length])&&n[n.length-1]==UX.currency.address&&n.splice(n.length-1,0,UX.wrapped.address),{path:n,fixedPath:WX(n)}},getPair:PX,getAmounts:async({path:t,tokenIn:e,tokenOut:n,amountOut:r,amountIn:i,amountInMax:o,amountOutMin:a})=>{let s;if(t=WX(t),r){if(s=await VX({path:t,amountOut:r,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(i){if(s=await ZX({path:t,amountIn:i,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}else if(a){if(s=await VX({path:t,amountOut:a,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(o){if(s=await ZX({path:t,amountIn:o,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}return{amountOut:r||a,amountIn:i||o,amountInMax:o||i,amountOutMin:a||r,amounts:s}},getTransaction:async({exchange:t,path:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o,amounts:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,fromAddress:h})=>{let d={blockchain:"solana"},f=[];const p=WX(e);if(p.length>3)throw"Raydium can only handle fixed paths with a max length of 3!";const m=p[0],g=3==p.length?p[1]:void 0,y=p[p.length-1];let b,w,v;2==p.length?(b=[await PX(m,y)],w=[await HX(b[0].data.marketId.toString())]):(b=[await PX(m,g),await PX(g,y)],w=[await HX(b[0].data.marketId.toString()),await HX(b[1].data.marketId.toString())],v=a[1]);let M,L=e[0]===qX.currency.address&&p[0]===qX.wrapped.address,_=e[e.length-1]===qX.currency.address&&p[p.length-1]===qX.wrapped.address;const N=await CG("solana");if(L||_){const t=await N.getMinimumBalanceForRentExemption(aX.solana.TOKEN_LAYOUT.span);M=zQ.generate().publicKey.toString();const e=L?new KH(n.toString()).add(new KH(t)):new KH(t);f.push(VF.createAccount({fromPubkey:new lF(h),newAccountPubkey:new lF(M),programId:new lF(aX.solana.TOKEN_PROGRAM),space:aX.solana.TOKEN_LAYOUT.span,lamports:e})),f.push(aX.solana.initializeAccountInstruction({account:M,token:qX.wrapped.address,owner:h}))}let E=await Promise.all(b.map((async(t,e)=>{let a=w[e],u=m,c=y,d=n||r,f=r||n,p=i||o,N=o||i,E=s||l?"in":"out",S=L?M:void 0,x=_?M:void 0;return 2===b.length&&0===e?(u=m,c=g,p=N=v,E="out",M&&(x=M)):2===b.length&&1===e&&(u=g,c=y,d=f=v,E="in",M&&(S=M)),new SF({programId:new lF(TX.pair.v4.address),keys:await KX({tokenIn:u,tokenInAccount:S,tokenOut:c,tokenOutAccount:x,pair:t,market:a,fromAddress:h}),data:JX({pair:t,amountIn:d,amountOutMin:N,amountOut:p,amountInMax:f,fix:E})})})));return E.forEach((t=>f.push(t))),(L||_)&&f.push(aX.solana.closeAccountInstruction({account:M,owner:h})),d.instructions=f,d}}));const $X=Ch.fantom,t$={blockchain:"fantom",name:"spookyswap",alternativeNames:[],label:"SpookySwap",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNjQxIDY0MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjQxIDY0MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxwYXRoIGZpbGw9IiMxMjExMjIiIGQ9Ik0zNC4yLDMyMGMwLDE1OC41LDEyOC41LDI4Ni4zLDI4Ni4zLDI4Ni4zYzE1OC41LDAsMjg2LjMtMTI4LjUsMjg2LjMtMjg2LjNjMC0xNTguNS0xMjguNS0yODYuMy0yODYuMy0yODYuMwoJCUMxNjIuNywzMy43LDM0LjIsMTYyLjIsMzQuMiwzMjBMMzQuMiwzMjB6Ii8+Cgk8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iI0YyRjRGOCIgZD0iTTEyMC45LDI0Ny42Yy0zLjMsMjIuMiwwLjcsNDUuNyw0LjYsNjcuOGMyLDMuMyw1LjIsNS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41LDcuMi0yMS41LDEwLjQtNDguOSwxNS43CgkJYy0yNy40LDQuNi0xMjAuNyw3LjItMjEwLDcuOGMtODkuMywwLjctMTkzLjctMi42LTIxNi41LTUuOUM4My4xLDM0OS4zLDU3LjcsMzQyLjgsNjIuMiwzMzUuN0w2Mi4yLDMzNS43eiIvPgoJPHBhdGggZmlsbD0iI0ZGOTlBNSIgZD0iTTQ4My41LDI1Ni4xYzAsMC01OC43LTE1LTE2Mi40LTE1Yy0xMTEuNSwwLTE2NSwxNy0xNjUsMTdzLTYuNSwxMi40LTkuMSwxOC45Yy0yLjYsNy4yLTkuMSwyNS40LTkuMSwyNS40CgkJUzIxOC44LDI4OCwzMjIuNSwyODhjNjIuNiwwLDEyNC42LDUuMiwxODYuNSwxNS43YzAsMC05LjEtMjIuMi0xNS0zMS4zQzQ5MC43LDI2Ny4yLDQ4Ny41LDI2MS4zLDQ4My41LDI1Ni4xTDQ4My41LDI1Ni4xeiIvPgoJPHBhdGggZmlsbD0iI0ZGRTYwMCIgZD0iTTEzMy4zLDEzMS41YzYuNS0wLjcsMTUuNywxOS42LDE1LjcsMTkuNnMyMC45LTUuOSwyNC44LDBjMy4zLDUuOS0xNSwxOS42LTE1LDE5LjZzMTEuMSwxOS42LDcuMiwyMy41CgkJYy0zLjMsMy45LTIyLjgtOC41LTIyLjgtOC41cy0xNSwxNy0xOS42LDE0LjNjLTUuMi0yLjYsMC43LTI0LjgsMC43LTI0LjhzLTIxLjUtOS4xLTE5LjYtMTQuM2MxLjMtNS4yLDIzLjUtNy4yLDIzLjUtNy4yCgkJUzEyNi44LDEzMi44LDEzMy4zLDEzMS41TDEzMy4zLDEzMS41eiIvPgo8L2c+Cjwvc3ZnPgo=",router:{address:"0xF491e7B69E4244ad4002BC14e878a34207E38c29",api:LX.ROUTER},factory:{address:"0x152eE697f2E276fA89E96742e9bB9aB1F2E61bE3",api:LX.FACTORY},pair:{api:LX.PAIR},slippage:!0};var e$=new mX(Object.assign(t$,{findPath:({tokenIn:t,tokenOut:e})=>LX.findPath($X,t$,{tokenIn:t,tokenOut:e}),pathExists:t=>LX.pathExists($X,t$,t),getAmounts:({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>LX.getAmounts($X,t$,{path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>LX.getTransaction($X,t$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const n$=Ch.ethereum,r$={blockchain:"ethereum",name:"uniswap_v2",alternativeNames:[],label:"Uniswap v2",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQxIiBoZWlnaHQ9IjY0MCIgdmlld0JveD0iMCAwIDY0MSA2NDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0yMjQuNTM0IDEyMy4yMjZDMjE4LjY5MiAxMjIuMzIgMjE4LjQ0NSAxMjIuMjEzIDIyMS4xOTUgMTIxLjc5MUMyMjYuNDY0IDEyMC45OCAyMzguOTA1IDEyMi4wODUgMjQ3LjQ3OSAxMjQuMTIzQzI2Ny40OTQgMTI4Ljg4MSAyODUuNzA3IDE0MS4wNjkgMzA1LjE0OCAxNjIuNzE0TDMxMC4zMTMgMTY4LjQ2NUwzMTcuNzAxIDE2Ny4yNzdDMzQ4LjgyOCAxNjIuMjc1IDM4MC40OTMgMTY2LjI1IDQwNi45NzggMTc4LjQ4NUM0MTQuMjY0IDE4MS44NTEgNDI1Ljc1MiAxODguNTUyIDQyNy4xODcgMTkwLjI3NEM0MjcuNjQ1IDE5MC44MjIgNDI4LjQ4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BIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjQ4LjU1MiAyNjIuMjQ0QzI0MS44NjIgMjY0LjI5OSAyMzUuMzU4IDI3MS4zOSAyMzMuMzQ0IDI3OC44MjZDMjMyLjExNiAyODMuMzYyIDIzMi44MTMgMjkxLjMxOSAyMzQuNjUzIDI5My43NzZDMjM3LjYyNSAyOTcuNzQ1IDI0MC40OTkgMjk4Ljc5MSAyNDguMjgyIDI5OC43MzZDMjYzLjUxOCAyOTguNjMgMjc2Ljc2NCAyOTIuMDk1IDI3OC4zMDQgMjgzLjkyNUMyNzkuNTY3IDI3Ny4yMjkgMjczLjc0OSAyNjcuOTQ4IDI2NS43MzYgMjYzLjg3NEMyNjEuNjAxIDI2MS43NzIgMjUyLjgwNyAyNjAuOTM4IDI0OC41NTIgMjYyLjI0NFpNMjY2LjM2NCAyNzYuMTcyQzI2OC43MTQgMjcyLjgzNCAyNjcuNjg2IDI2OS4yMjUgMjYzLjY5IDI2Ni43ODVDMjU2LjA4IDI2Mi4xMzggMjQ0LjU3MSAyNjUuOTgzIDI0NC41NzEgMjczLjE3M0MyNDQuNTcxIDI3Ni43NTIgMjUwLjU3MiAyODAuNjU2IDI1Ni4wNzQgMjgwLjY1NkMyNTkuNzM1IDI4MC42NTYgMjY0Ljc0NiAyNzguNDczIDI2Ni4zNjQgMjc2LjE3MloiIGZpbGw9IiNGRjAwN0EiLz4KPC9zdmc+Cg==",router:{address:"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",api:LX.ROUTER},factory:{address:"0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",api:LX.FACTORY},pair:{api:LX.PAIR},slippage:!0};var i$=new mX(Object.assign(r$,{findPath:({tokenIn:t,tokenOut:e})=>LX.findPath(n$,r$,{tokenIn:t,tokenOut:e}),pathExists:t=>LX.pathExists(n$,r$,t),getAmounts:({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>LX.getAmounts(n$,r$,{path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>LX.getTransaction(n$,r$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const o$=Ch.velas,a$={blockchain:"velas",name:"wagyuswap",alternativeNames:[],label:"WagyuSwap",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5NC45MSAxMzAuMjYiPjxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPjxwYXRoIGQ9Ik0xMTcuMjgsOTYuNDVjMCwyNC42Mi0yMS4yNCw0NC42LTQ3LjQ1LDQ0LjZzLTQ3LjQ2LTIwLTQ3LjQ2LTQ0LjZjMC0zLjE5LDAtMTkuODUsNy40My0zMy40NSw3LjA4LTEzLDE5LjUyLTIxLjY5LDE5LjUyLTIxLjY5cy4xNywzLjgxLjY2LDcuODJhMjQuMSwyNC4xLDAsMCwwLDEsNGMuMDYtMy40NCwxLjM2LTExLjcsNi41Ny0yMS42Myw2LTExLjQ2LDE3LTIwLjcyLDE3LTIwLjcyYTEwOC41MSwxMDguNTEsMCwwLDAsLjMsMTYuOTFjLjg1LDcuNzIsNC4xNSwxNC45MSw1LjA3LDE1LjU5YTI1LjgyLDI1LjgyLDAsMCwxLC44Ni00Ljg1LDE3LjM0LDE3LjM0LDAsMCwxLDIuNTctNC42NWMuMi0uOC40Miw2LjE1LDIuODcsMTAuNDQsNS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dHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIyLjM3IC0xMC43OSkiIGZpbGw9IiNmNGVhZTYiLz48cGF0aCBkPSJNMTE3LjI4LDk2LjQ1Yy0uNDMsMy0zLjY4LDkuMzEtNy44OCwxMC4yOS03LjY3LDEuNzctMTAuNzktMy0xNS42NywyYTI5LjgyLDI5LjgyLDAsMCwxLTI5LjY2LDcuMTFjLTkuNDMtMi45NC0yMC4xOCw2LjQzLTI3LDQuMzksNS4yOSw2Ljg2LDE3LjUzLDEyLDE4LjkyLDEyLjQyLTEtMS4xNi00LjA4LTUuODQtMS4xMi03LjM3LDUuNjQtMi45MSwxNCwyLjc1LDIwLjA4LDEuMDYsNy4yMS0yLDEwLjI5LTgsMTQuMS0xMC4zNSwxLjktMS4xOSwxMi05LjMxLDI0LjExLTEuNDZBNDIuMDYsNDIuMDYsMCwwLDAsMTE3LjI4LDk2LjQ1WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIyLjM3IC0xMC43OSkiIGZpbGw9IiNmNGVhZTYiLz48L2c+PC9zdmc+",router:{address:"0x3D1c58B6d4501E34DF37Cf0f664A58059a188F00",api:LX.ROUTER},factory:{address:"0x69f3212344a38b35844cce4864c2af9c717f35e3",api:LX.FACTORY},pair:{api:LX.PAIR},slippage:!0};var s$=new mX(Object.assign(a$,{findPath:({tokenIn:t,tokenOut:e})=>LX.findPath(o$,a$,{tokenIn:t,tokenOut:e}),pathExists:t=>LX.pathExists(o$,a$,t),getAmounts:({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>LX.getAmounts(o$,a$,{path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>LX.getTransaction(o$,a$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));var u$={findPath:async(t,{tokenIn:e,tokenOut:n})=>{if(![e,n].includes(t.currency.address)||![e,n].includes(t.wrapped.address))return{path:void 0,fixedPath:void 0};let r=[e,n];return{path:r,fixedPath:r}},pathExists:async(t,e)=>!(e.length<=1)&&(!(e.length>=3)&&(e.includes(t.currency.address)&&e.includes(t.wrapped.address))),getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>(i?o=a=s=i:o?i=a=s=o:s?o=a=i=s:a&&(i=s=o=a),{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:(t,e,{path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,fromAddress:h})=>{let d={blockchain:t.name,from:h,to:e.wrapper.address,api:e.wrapper.api};return n[0]===t.currency.address&&n[1]===t.wrapped.address?(d.method="deposit",d.value=r.toString(),d):n[0]===t.wrapped.address&&n[1]===t.currency.address?(d.method="withdraw",d.value=0,d.params={wad:r},d):void 0},WETH:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]};const c$=Ch.bsc,l$={blockchain:"bsc",name:"wbnb",alternativeNames:[],label:"Wrapped BNB",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9Ik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YuNCw4MC42LDU2LjRMODAuNiw1Ni40eiBNNDMuMSw2NS40bDE1LjQtOWwtMTUuNC05bC0xNS40LDl2MThsMTUuNCw5TDQzLjEsNjUuNAoJTDQzLjEsNjUuNHogTTQzLjEsOTUuOUwyNy43LDg3djQ4LjVsNDIsMjQuMnYtMThsLTI2LjYtMTUuM1Y5NS45TDQzLjEsOTUuOXoiLz4KPC9zdmc+Cg==",wrapper:{address:c$.wrapped.address,api:u$.WETH},slippage:!1};var h$=new mX(Object.assign(l$,{findPath:({tokenIn:t,tokenOut:e})=>u$.findPath(c$,{tokenIn:t,tokenOut:e}),pathExists:t=>u$.pathExists(c$,t),getAmounts:u$.getAmounts,getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>u$.getTransaction(c$,l$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const d$=Ch.ethereum,f$={blockchain:"ethereum",name:"weth",alternativeNames:[],label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiB0ZXh0LXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIgoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2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H},slippage:!1};var p$=new mX(Object.assign(f$,{findPath:({tokenIn:t,tokenOut:e})=>u$.findPath(d$,{tokenIn:t,tokenOut:e}),pathExists:t=>u$.pathExists(d$,t),getAmounts:u$.getAmounts,getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>u$.getTransaction(d$,f$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const m$=Ch.fantom,g$={blockchain:"fantom",name:"wftm",alternativeNames:[],label:"Wrapped Fantom",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMTkyIDE5MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTkyIDE5MjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8ZyBpZD0iY2lyY2xlIj4KCTxnIGlkPSJGYW50b20tY2lyY2xlIj4KCQk8Y2lyY2xlIGlkPSJPdmFsIiBmaWxsUnVsZT0iZXZlbm9kZCIgY2xpcFJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiMxOTY5RkYiIGNsYXNzPSJzdDAiIGN4PSI5NiIgY3k9Ijk2IiByPSI4MC40Ii8+CgkJPHBhdGggaWQ9IlNoYXBlIiBmaWxsPSIjRkZGRkZGIiBkPSJNOTEuMSw0MS4yYzIuNy0xLjQsNi44LTEuNCw5LjUsMGwyNy42LDE0LjZjMS42LDAuOSwy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44LDEzbDI0LjgsMTNWNjQuNHogTTY1LjIsNjQuNHYyNi4xbDI0LjgtMTNMNjUuMiw2NC40eiBNOTguNyw0NS4xCgkJCWMtMS40LTAuOC00LTAuOC01LjUsMEw2NS42LDU5LjdjMCwwLTAuMSwwLTAuMSwwbDAsMGwwLDBsMC4xLDBsMjcuNiwxNC42YzEuNCwwLjgsNCwwLjgsNS41LDBsMjcuNi0xNC42YzAsMCwwLjEsMCwwLjEsMGwwLDBsMCwwCgkJCWwtMC4xLDBMOTguNyw0NS4xeiBNMTMwLjcsNDYuNWwxLjcsMS4xbDAuMywwLjJjMC41LDAuMywwLjksMC42LDEuMywwLjhjNC4yLDIuOCw1LjcsNS45LDUuNywxMi4zbDAsMC4yaC00LjNjMC0yLjgtMC4zLTQuNy0xLTYKCQkJYy0wLjUtMS4xLTEuMy0xLjktMi44LTIuOWwtMC4xLTAuMWMtMC4zLTAuMi0wLjctMC40LTEuMS0wLjdsLTAuNS0wLjNsLTEuNi0wLjlMMTMwLjcsNDYuNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",wrapper:{address:m$.wrapped.address,api:u$.WETH},slippage:!1};var y$=new mX(Object.assign(g$,{findPath:({tokenIn:t,tokenOut:e})=>u$.findPath(m$,{tokenIn:t,tokenOut:e}),pathExists:t=>u$.pathExists(m$,t),getAmounts:u$.getAmounts,getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>u$.getTransaction(m$,g$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const b$=Ch.polygon,w$={blockchain:"polygon",name:"wmatic",alternativeNames:[],label:"Wrapped MATIC",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcm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DEuMSwydjQuNmMwLDAuOS0wLjQsMS42LTEuMSwyCglsLTMuOSwyLjNjLTAuNywwLjQtMS41LDAuNC0yLjIsMGwtNC0yLjNjLTAuNy0wLjQtMS4xLTEuMS0xLjEtMnYtMi45TDIxLDI4Ljd2My4xYzAsMC45LDAuNCwxLjYsMS4xLDJsNy41LDQuNAoJYzAuNywwLjQsMS41LDAuNCwyLjIsMGw3LjUtNC40YzAuNy0wLjQsMS4xLTEuMSwxLjEtMlYyM2MwLTAuOS0wLjQtMS42LTEuMS0yQzM5LjIsMjEsMzEuOSwxNi42LDMxLjksMTYuNnoiLz4KPC9zdmc+Cg==",wrapper:{address:b$.wrapped.address,api:u$.WETH},slippage:!1};var v$=new mX(Object.assign(w$,{findPath:({tokenIn:t,tokenOut:e})=>u$.findPath(b$,{tokenIn:t,tokenOut:e}),pathExists:t=>u$.pathExists(b$,t),getAmounts:u$.getAmounts,getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>u$.getTransaction(b$,w$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const M$=Ch.velas,L$={blockchain:"velas",name:"wvlx",alternativeNames:[],label:"Wrapped Velas",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgdGV4dC1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iIGltYWdlLXJlbmRlcmluZz0ib3B0aW1pemVRdWFsaXR5IgoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDUuNCA0NS40IgoJIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ1LjQgNDUuNDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiMwMDM3QzE7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjguOCwyMi44bC02LjEsMTAuNmwtNi4xLTEwLjdMMjguOCwyMi44TDI4LjgsMjIuOHogTTM0LjksMTkuMkgxMC41bDEyLjIsMjEuNEwzNC45LDE5LjJ6IE02LjUsMTIuMWwyLDMuNgoJaDI4LjNsMi4xLTMuNkg2LjV6Ii8+Cjwvc3ZnPgo=",wrapper:{address:M$.wrapped.address,api:u$.WETH},slippage:!1};let _$={ethereum:[i$,p$],bsc:[EX,h$],polygon:[AX,v$],solana:[XX],fantom:[e$,y$],velas:[s$,new mX(Object.assign(L$,{findPath:({tokenIn:t,tokenOut:e})=>u$.findPath(M$,{tokenIn:t,tokenOut:e}),pathExists:t=>u$.pathExists(M$,t),getAmounts:u$.getAmounts,getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>u$.getTransaction(M$,L$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}))]},N$=({blockchain:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a,amountOutMax:s,amountInMin:u})=>Promise.all(_$[t].map((t=>t.route({tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a,amountOutMax:s,amountInMin:u})))).then((t=>t.filter(Boolean)));var E$=function(t){var e=function(t){return!t.every((function(t){return void 0!==t.amount||void 0!==t.fromAmount}))},r=Z.useContext(Wq),i=r.amount;r.toAmount;var o,a=r.recover,s=d(Z.useState(null==a&&e(t.accept)),2),u=s[0],c=s[1],l=Z.useContext(Jq).account,h=Z.useContext(Qq),f=h.conversionRate,p=h.fixedCurrencyConversionRate,m=Z.useContext(mq).setError,g=d(Z.useState(),2),y=g[0],b=g[1],w=d(Z.useState("object"==n(i)&&i.fix&&i.currency?i.fix:null),1)[0],v=d(Z.useState("object"==n(i)&&i.fix&&i.currency?i.currency:null),1)[0];u&&(o="object"==n(i)&&i.start&&i.start?i.start:"object"==n(i)&&i.fix?i.fix:1);var M=d(Z.useState(o),2),L=M[0],_=M[1],N=d(Z.useState(),2),E=N[0],S=N[1],x=d(Z.useState(),2),A=x[0],I=x[1];Z.useEffect((function(){a||c(e(t.accept))}),[t.accept,a]);var k=function(e){var n=e.amount,r=e.conversionRate,o=e.fixedCurrencyConversionRate;return new Promise((function(e,a){i&&i.token?e(t.accept.map((function(){return n}))):Promise.all(t.accept.map((function(t){return w?Ch[t.blockchain].stables.usd[0]==t.token?1/o*w:N$({blockchain:t.blockchain,tokenIn:Ch[t.blockchain].stables.usd[0],amountIn:1/o*w,tokenOut:t.token,fromAddress:l,toAddress:l}):Ch[t.blockchain].stables.usd[0]==t.token?1/r*n:N$({blockchain:t.blockchain,tokenIn:Ch[t.blockchain].stables.usd[0],amountIn:1/r*n,tokenOut:t.token,fromAddress:l,toAddress:l})}))).then((function(n){Promise.all(n.map((function(e,n){return"number"==typeof e?e:null==e[0]?void 0:aX.readable({blockchain:t.accept[n].blockchain,amount:e[0].amountOut,address:e[0].tokenOut})}))).then(e).catch(m)})).catch(m)}))},j=Z.useCallback(Kq.debounce((function(e){var n=e.account,r=e.amount,i=e.conversionRate,o=e.fixedCurrencyConversionRate;k({amount:r,conversionRate:i,fixedCurrencyConversionRate:o}).then((function(e){b(t.accept.map((function(t,r){if(null!=e[r])return{blockchain:t.blockchain,amount:qq(e[r]),token:t.token,receiver:t.receiver||n}})).filter((function(t){return!!t})))})).catch(m)}),500),[]);return Z.useEffect((function(){a||u&&l&&f&&(!w||p)&&j({account:l,amount:L,conversionRate:f,fixedCurrencyConversionRate:p})}),[u,l,f,w,p,L,a]),Z.useEffect((function(){u&&E?E.fromToken.readable(E.fromBalance).then((function(t){if(i&&i.token)N$({blockchain:E.blockchain,tokenIn:E.fromToken.address,tokenOut:E.toToken.address,amountIn:parseFloat(t),fromAddress:l,toAddress:l}).then((function(t){null!=t[0]?aX.readable({amount:t[0].amountOut,blockchain:E.blockchain,address:E.toToken.address}).then((function(t){var e=parseFloat(new TK(t).div(1.01).mul(f).toString());I(e>10?Math.round(e-1):qq(e-1))})).catch(m):aX.readable({amount:E.fromBalance,blockchain:E.blockchain,address:E.fromToken.address}).then(I)})).catch(m);else if(E.fromToken.address==Ch[E.blockchain].stables.usd[0]){var e=parseFloat(new TK(t).mul(f).toString());I(e>10?Math.round(e-1):e-1)}else N$({blockchain:E.blockchain,tokenIn:E.fromToken.address,tokenOut:Ch[E.blockchain].stables.usd[0],amountIn:parseFloat(t),fromAddress:l,toAddress:l}).then((function(t){null!=t[0]&&aX.readable({amount:t[0].amountOut,blockchain:E.blockchain,address:Ch[E.blockchain].stables.usd[0]}).then((function(t){var e=parseFloat(new TK(t).div(1.01).mul(f).toString());I(e>10?Math.round(e):qq(e))})).catch(m)})).catch(m)})).catch(m):I(100)}),[l,E]),Z.createElement(Fq.Provider,{value:{amountsMissing:u,fixedAmount:w,fixedCurrency:v,acceptWithAmount:y,amount:L,setAmount:_,setMaxRoute:S,maxAmount:A}},t.children)},S$={"Pacific/Midway":"USD","Pacific/Niue":"NZD","Pacific/Pago_Pago":"USD","America/Adak":"USD","Pacific/Honolulu":"USD","Pacific/Rarotonga":"NZD","Pacific/Tahiti":"XPF","Pacific/Marquesas":"XPF","America/Anchorage":"USD","America/Juneau":"USD","America/Metlakatla":"USD","America/Nome":"USD","America/Sitka":"USD","America/Yakutat":"USD","Pacific/Gambier":"XPF","America/Los_Angeles":"USD","America/Tijuana":"MXN","America/Vancouver":"CAD","Pacific/Pitcairn":"NZD","America/Boise":"USD","America/Cambridge_Bay":"CAD","America/Chihuahua":"MXN","America/Creston":"CAD","America/Dawson":"CAD","America/Dawson_Creek":"CAD","America/Denver":"USD","America/Edmonton":"CAD","America/Fort_Nelson":"CAD","America/Hermosillo":"MXN","America/Inuvik":"CAD","America/Mazatlan":"MXN","America/Ojinaga":"MXN","America/Phoenix":"USD","America/Whitehorse":"CAD","America/Yellowknife":"CAD","America/Bahia_Banderas":"MXN","America/Belize":"BZD","America/Chicago":"USD","America/Costa_Rica":"CRC","America/El_Salvador":"USD","America/Guatemala":"GTQ","America/Indiana/Knox":"USD","America/Indiana/Tell_City":"USD","America/Managua":"NIO","America/Matamoros":"MXN","America/Menominee":"USD","America/Merida":"MXN","America/Mexico_City":"MXN","America/Monterrey":"MXN","America/North_Dakota/Beulah":"USD","America/North_Dakota/Center":"USD","America/North_Dakota/New_Salem":"USD","America/Rainy_River":"CAD","America/Rankin_Inlet":"CAD","America/Regina":"CAD","America/Resolute":"CAD","America/Swift_Current":"CAD","America/Tegucigalpa":"HNL","America/Winnipeg":"CAD","Pacific/Easter":"CLP","Pacific/Galapagos":"USD","America/Atikokan":"CAD","America/Bogota":"COP","America/Cancun":"MXN","America/Cayman":"KYD","America/Detroit":"USD","America/Eirunepe":"BRL","America/Grand_Turk":"USD","America/Guayaquil":"USD","America/Havana":"CUP","America/Indiana/Indianapolis":"USD","America/Indiana/Marengo":"USD","America/Indiana/Petersburg":"USD","America/Indiana/Vevay":"USD","America/Indiana/Vincennes":"USD","America/Indiana/Winamac":"USD","America/Iqaluit":"CAD","America/Jamaica":"JMD","America/Kentucky/Louisville":"USD","America/Kentucky/Monticello":"USD","America/Lima":"PEN","America/Nassau":"BSD","America/New_York":"USD","America/Nipigon":"CAD","America/Panama":"PAB","America/Pangnirtung":"CAD","America/Port-au-Prince":"HTG","America/Rio_Branco":"BRL","America/Thunder_Bay":"CAD","America/Toronto":"CAD","America/AnguillaSandy Hill":"XCD","America/Antigua":"XCD","America/Aruba":"AWG","America/Asuncion":"PYG","America/Barbados":"BBD","America/Blanc-Sablon":"CAD","America/Boa_Vista":"BRL","America/Campo_Grande":"BRL","America/Caracas":"VEB","America/Cuiaba":"BRL","America/Curacao":"ANG","America/Dominica":"DOP","America/Glace_Bay":"CAD","America/Goose_Bay":"CAD","America/Grenada":"XCD","America/Guadeloupe":"EUR","America/Guyana":"GYD","America/Halifax":"CAD","America/Kralendijk":"USD","America/La_Paz":"BOB","America/Lower_Princes":"USD","America/Manaus":"BRL","America/Marigot":"EUR","America/Martinique":"EUR","America/Moncton":"CAD","America/Montserrat":"XCD","America/Porto_Velho":"BRL","America/Port_of_Spain":"BZD","America/Puerto_Rico":"USD","America/Santiago":"CLP","America/Santo_Domingo":"DOP","America/St_Barthelemy":"EUR","America/St_Kitts":"XCD","America/St_Lucia":"XCD","America/St_Thomas":"USD","America/St_Vincent":"XCD","America/Thule":"DKK","America/Tortola":"USD","Atlantic/Bermuda":"BMD","America/St_Johns":"CAD","America/Araguaina":"BRL","America/Argentina/Buenos_Aires":"ARS","America/Argentina/Catamarca":"ARS","America/Argentina/Cordoba":"ARS","America/Argentina/Jujuy":"ARS","America/Argentina/La_Rioja":"ARS","America/Argentina/Mendoza":"ARS","America/Argentina/Rio_Gallegos":"ARS","America/Argentina/Salta":"ARS","America/Argentina/San_Juan":"ARS","America/Argentina/San_Luis":"ARS","America/Argentina/Tucuman":"ARS","America/Argentina/Ushuaia":"ARS","America/Bahia":"BRL","America/Belem":"BRL","America/Cayenne":"EUR","America/Fortaleza":"BRL","America/Godthab":"DKK","America/Maceio":"BRL","America/Miquelon":"EUR","America/Montevideo":"UYU","America/Paramaribo":"SRD","America/Punta_Arenas":"CLP","America/Recife":"BRL","America/Santarem":"BRL","America/Sao_Paulo":"BRL","Antarctica/Palmer":"USD","Antarctica/Rothera":"USD","Atlantic/Stanley":"FKP","America/Noronha":"BRL","Atlantic/South_Georgia":"GBP","America/Scoresbysund":"DKK","Atlantic/Azores":"EUR","Atlantic/Cape_Verde":"CVE","Africa/Abidjan":"XOF","Africa/Accra":"GHC","Africa/Bamako":"XOF","Africa/Banjul":"GMD","Africa/Bissau":"XOF","Africa/Casablanca":"MAD","Africa/Conakry":"GNF","Africa/Dakar":"XOF","Africa/El_Aaiun":"MAD","Africa/Freetown":"SLL","Africa/Lome":"XOF","Africa/Monrovia":"LRD","Africa/Nouakchott":"MRU","Africa/Ouagadougou":"XOF","Africa/Sao_Tome":"STD","America/Danmarkshavn":"DKK","Antarctica/Troll":"NOK","Atlantic/Canary":"EUR","Atlantic/Faroe":"DKK","Atlantic/Madeira":"EUR","Atlantic/Reykjavik":"ISK","Atlantic/St_Helena":"SHP","Europe/Dublin":"EUR","Europe/Guernsey":"GBP","Europe/Isle_of_Man":"IMP","Europe/Jersey":"GBP","Europe/Lisbon":"EUR","Europe/London":"GBP","Africa/Algiers":"DZD","Africa/Bangui":"XAF","Africa/Brazzaville":"XAF","Africa/Ceuta":"EUR","Africa/Douala":"XAF","Africa/Kinshasa":"CDF","Africa/Lagos":"NGN","Africa/Libreville":"XAF","Africa/Luanda":"AOA","Africa/Malabo":"XAF","Africa/Ndjamena":"XAF","Africa/Niamey":"XOF","Africa/Porto-Novo":"XOF","Africa/Tunis":"TND","Africa/Windhoek":"NAD","Arctic/Longyearbyen":"NOK","Europe/Amsterdam":"EUR","Europe/Andorra":"EUR","Europe/Belgrade":"RSD","Europe/Berlin":"EUR","Europe/Bratislava":"EUR","Europe/Brussels":"EUR","Europe/Budapest":"HUF","Europe/Copenhagen":"DKK","Europe/Gibraltar":"GIP","Europe/Ljubljana":"EUR","Europe/Luxembourg":"EUR","Europe/Madrid":"EUR","Europe/Malta":"EUR","Europe/Monaco":"EUR","Europe/Oslo":"NOK","Europe/Paris":"EUR","Europe/Podgorica":"EUR","Europe/Prague":"CZK","Europe/Rome":"EUR","Europe/San_Marino":"EUR","Europe/Sarajevo":"BAM","Europe/Skopje":"MKD","Europe/Stockholm":"SEK","Europe/Tirane":"ALL","Europe/Vaduz":"CHF","Europe/Vatican":"EUR","Europe/Vienna":"EUR","Europe/Warsaw":"PLN","Europe/Zagreb":"HRK","Europe/Zurich":"CHF","Africa/Blantyre":"MWK","Africa/Bujumbura":"BIF","Africa/Cairo":"EGP","Africa/Gaborone":"BWP","Africa/Harare":"ZWL","Africa/Johannesburg":"ZAR","Africa/Juba":"SSP","Africa/Khartoum":"SDG","Africa/Kigali":"RWF","Africa/Lubumbashi":"CDF","Africa/Lusaka":"ZMW","Africa/Maputo":"MZM","Africa/Maseru":"LSL","Africa/Mbabane":"SZL","Africa/Tripoli":"LYD","Asia/Amman":"JOD","Asia/Beirut":"LBP","Asia/Damascus":"SYP","Asia/Famagusta":"TRY","Asia/Gaza":"ILS","Asia/Hebron":"ILS","Asia/Jerusalem":"ILS","Asia/Nicosia":"EUR","Europe/Athens":"EUR","Europe/Bucharest":"RON","Europe/Chisinau":"MDL","Europe/Helsinki":"EUR","Europe/Kaliningrad":"RUB","Europe/Kiev":"UAH","Europe/Mariehamn":"EUR","Europe/Riga":"EUR","Europe/Sofia":"BGN","Europe/Tallinn":"EUR","Europe/Uzhgorod":"UAH","Europe/Vilnius":"EUR","Europe/Zaporozhye":"UAH","Africa/Addis_Ababa":"ETB","Africa/Asmara":"ERN","Africa/Dar_es_Salaam":"TZS","Africa/Djibouti":"DJF","Africa/Kampala":"UGX","Africa/Mogadishu":"SOS","Africa/Nairobi":"KES","Antarctica/Syowa":"EUR","Asia/Aden":"YER","Asia/Baghdad":"IQD","Asia/Bahrain":"BHD","Asia/Kuwait":"KWD","Asia/Qatar":"QAR","Asia/Riyadh":"SAR","Europe/Istanbul":"TRY","Europe/Kirov":"RUB","Europe/Minsk":"BYN","Europe/Moscow":"RUB","Europe/Simferopol":"RUB","Europe/Volgograd":"RUB","Indian/Antananarivo":"MGA","Indian/Comoro":"USD","Indian/Mayotte":"EUR","Asia/Tehran":"IRR","Asia/Baku":"AZN","Asia/Dubai":"AED","Asia/Muscat":"OMR","Asia/Tbilisi":"GEL","Asia/Yerevan":"AMD","Europe/Astrakhan":"RUB","Europe/Samara":"RUB","Europe/Saratov":"RUB","Europe/Ulyanovsk":"RUB","Indian/Mahe":"SCR","Indian/Mauritius":"MUR","Indian/Reunion":"EUR","Asia/Kabul":"AFN","Antarctica/Mawson":"USD","Asia/Aqtau":"KZT","Asia/Aqtobe":"KZT","Asia/Ashgabat":"TMM","Asia/Atyrau":"KZT","Asia/Dushanbe":"TJS","Asia/Karachi":"PKR","Asia/Oral":"KZT","Asia/Qyzylorda":"KZT","Asia/Samarkand":"UZS","Asia/Tashkent":"UZS","Asia/Yekaterinburg":"RUB","Indian/Kerguelen":"EUR","Indian/Maldives":"MVR","Asia/Colombo":"LKR","Asia/Kolkata":"INR","Asia/Kathmandu":"NPR","Antarctica/Vostok":"USD","Asia/Almaty":"KZT","Asia/Bishkek":"KGS","Asia/Dhaka":"BDT","Asia/Omsk":"RUB","Asia/Qostanay":"KZT","Asia/Thimphu":"BTN","Asia/Urumqi":"CNY","Indian/Chagos":"USD","Asia/Yangon":"MMK","Indian/Cocos":"AUD","Antarctica/Davis":"USD","Asia/Bangkok":"THB","Asia/Barnaul":"RUB","Asia/Hovd":"MNT","Asia/Ho_Chi_Minh":"VND","Asia/Jakarta":"IDR","Asia/Krasnoyarsk":"RUB","Asia/Novokuznetsk":"RUB","Asia/Novosibirsk":"RUB","Asia/Phnom_Penh":"KHR","Asia/Pontianak":"IDR","Asia/Tomsk":"RUB","Asia/Vientiane":"LAK","Indian/Christmas":"AUD","Asia/Brunei":"BND","Asia/Choibalsan":"MNT","Asia/Hong_Kong":"HKD","Asia/Irkutsk":"RUB","Asia/Kuala_Lumpur":"MYR","Asia/Kuching":"MYR","Asia/Macau":"MOP","Asia/Makassar":"IDR","Asia/Manila":"PHP","Asia/Shanghai":"CNY","Asia/Singapore":"SGD","Asia/Taipei":"TWD","Asia/Ulaanbaatar":"MNT","Australia/Perth":"AUD","Australia/Eucla":"AUD","Asia/Chita":"RUB","Asia/Dili":"USD","Asia/Jayapura":"IDR","Asia/Khandyga":"RUB","Asia/Pyongyang":"KPW","Asia/Seoul":"KRW","Asia/Tokyo":"JPY","Asia/Yakutsk":"RUB","Pacific/Palau":"USD","Australia/Adelaide":"AUD","Australia/Broken_Hill":"AUD","Australia/Darwin":"AUD","Antarctica/DumontDUrville":"USD","Antarctica/Macquarie":"USD","Asia/Ust-Nera":"RUB","Asia/Vladivostok":"RUB","Australia/Brisbane":"AUD","Australia/Currie":"AUD","Australia/Hobart":"AUD","Australia/Lindeman":"AUD","Australia/Melbourne":"AUD","Australia/Sydney":"AUD","Pacific/Chuuk":"USD","Pacific/GuamVillage":"USD","Pacific/Port_Moresby":"PGK","Pacific/Saipan":"USD","Australia/Lord_Howe":"AUD","Antarctica/Casey":"USD","Asia/Magadan":"RUB","Asia/Sakhalin":"RUB","Asia/Srednekolymsk":"RUB","Pacific/Bougainville":"PGK","Pacific/Efate":"VUV","Pacific/Guadalcanal":"SBD","Pacific/Kosrae":"USD","Pacific/Norfolk":"USD","Pacific/Noumea":"XPF","Pacific/Pohnpei":"USD","Antarctica/McMurdo":"USD","Asia/Anadyr":"RUB","Asia/Kamchatka":"RUB","Pacific/Auckland":"NZD","Pacific/Fiji":"FJD","Pacific/Funafuti":"AUD","Pacific/Kwajalein":"USD","Pacific/Majuro":"USD","Pacific/Nauru":"AUD","Pacific/Tarawa":"AUD","Pacific/Wake":"USD","Pacific/Wallis":"XPF","Pacific/Chatham":"CAD","Pacific/Apia":"NGN","Pacific/Enderbury":"USD","Pacific/Fakaofo":"NZD","Pacific/Tongatapu":"TOP","Pacific/Kiritimati":"AUD"};class x${constructor({amount:t,code:e,timeZone:n=x$.timeZone()}){this.amount=t,this.code=e||window._LocalCurrencyCode||x$.getCode(n),this.timeZone=n}static getCode(t){return window._LocalCurrencyCode||S$[t||x$.timeZone()]||"USD"}static async rate({from:t,to:e}){null==e&&(e=x$.getCode());let n=await x$.fromUSD({amount:1,code:t}),r=await x$.fromUSD({amount:1,code:e});return n.amount/r.amount}static async fromUSD({amount:t,code:e,timeZone:n}){let r=new x$({amount:t,code:e,timeZone:n}),i=await fetch("https://public.depay.com/currencies/"+r.code).then((t=>t.json())).then((t=>parseFloat(t))).catch((()=>(r.code="USD",1)));return r.amount=r.amount*i,r}static timeZone(){return Intl.DateTimeFormat().resolvedOptions().timeZone}toString(t={}){return null==t.minimumFractionDigits&&this.amount%1==0&&this.amount>=100?t.minimumFractionDigits=0:null==t.minimumFractionDigits&&(t.minimumFractionDigits=2),new Intl.NumberFormat(navigator.language,{...t,style:"currency",currency:this.code}).format(this.amount)}}var A$=function(t){var e=new x$({code:t.configuration.currency}).code;return Z.useEffect((function(){null!=t.configuration.providers&&Object.entries(t.configuration.providers).forEach((function(t){((t,e)=>{if(kG(),xG.evm.includes(t))return wG(t,e);if(xG.solana.includes(t))return SG(t,e);throw"Unknown blockchain: "+t})(t[0],t[1])}))}),[t.configuration]),Z.createElement(Wq.Provider,{value:Object.assign({},t.configuration,{currencyCode:e})},t.children)},I$=function(t){Z.useContext(mq).setError;var e=Z.useContext(Wq),r=e.amount,i=e.currency,o=d(Z.useState(),2),a=o[0],s=o[1],u=d(Z.useState(),2),c=u[0],l=u[1];return Z.useEffect((function(){"object"==n(r)&&r.currency&&x$.fromUSD({amount:1,code:r.currency}).then((function(t){return l(t.amount)})),x$.fromUSD({amount:1,code:i}).then((function(t){return s(t.amount)})).catch(s(1))}),[]),Z.createElement(Qq.Provider,{value:{conversionRate:a,fixedCurrencyConversionRate:c}},t.children)},k$=Z.createContext(),j$=Z.createContext(),T$=function(){var t=Z.useContext(V).close;return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:Z.createElement("div",{className:"TextCenter"},Z.createElement("div",{className:"GraphicWrapper"},Z.createElement("img",{className:"Graphic",src:sq})),Z.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Insufficient Balance"),Z.createElement("div",{className:"Text PaddingTopS PaddingBottomM PaddingLeftM PaddingRightM"},Z.createElement("strong",{className:"FontSizeM"},"We were not able to find any asset with enough value in your wallet. Please top up your account in order to proceed with this payment."))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:"ButtonPrimary",onClick:t},"Ok"))})},C$=Z.createContext(),D$=Z.createContext(),O$=Z.createContext(),z$=Z.createContext(),P$=function(t){var n=Z.useContext(mq).setError,r=Z.useContext(Wq),i=r.sent,o=r.succeeded,a=r.failed,s=r.recover,u=r.before,l=Z.useContext(D$),h=l.selectedRoute,f=l.refreshPaymentRoutes,p=Z.useContext(V),m=p.open,g=p.close,y=p.setClosable,b=Z.useContext(D$).allRoutes,w=Z.useContext(q).setUpdatable,v=Z.useContext(j$),M=v.navigate,L=v.set,_=Z.useContext(Jq).wallet,N=Z.useContext(O$),E=N.release,S=N.synchronousTracking,x=N.asynchronousTracking,A=N.trackingInitialized,I=N.initializeTracking,k=N.preTrack,j=Z.useContext(z$),T=j.foundTransaction,C=j.initializeTracking,D=d(Z.useState(),2),O=D[0],z=D[1],P=d(Z.useState(),2),R=P[0],B=P[1],U=d(Z.useState(),2),Y=U[0],F=U[1],W=d(Z.useState("initialized"),2),Q=W[0],H=W[1],G=function(t){0!=S||0!=x&&1!=A||y(!0),H("success"),o&&setTimeout((function(){return o(t)}),200)},J=function(t,e){0!=x&&1!=A||y(!0),L(["PaymentFailed"]),H("failed"),a&&a(t,e)},K=function(){var t=e(c.mark((function t(){var e;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!u){t.next=6;break}return t.next=3,u(O.route.transaction);case 3:if(!1!==t.sent){t.next=6;break}return t.abrupt("return");case 6:return y(!1),H("paying"),w(!1),t.next=11,RG({blockchain:O.route.transaction.blockchain,method:"latestBlockNumber"});case 11:return e=t.sent,t.next=14,k(e,O.route).then((function(){_.sendTransaction(Object.assign({},O.route.transaction,{sent:function(t){C(t,e),i&&i(t)},succeeded:G,failed:J})).then((function(t){B(t),I(t,e,O.route)})).catch((function(t){console.log("error",t),H("initialized"),y(!0),w(!0),"WRONG_NETWORK"!=(null==t?void 0:t.code)&&"NOT_SUPPORTED"!=(null==t?void 0:t.code)||M("WrongNetwork")}))})).catch((function(t){console.log(t),H("initialized"),y(!0),w(!0),M("PreTrackingFailed")}));case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return Z.useEffect((function(){E&&H("success")}),[E]),Z.useEffect((function(){x&&A&&("success"==Q||"failed"==Q)&&y(!0)}),[A,Q]),Z.useEffect((function(){if(s){y(!1),w(!1),H("paying"),B({blockchain:s.blockchain,id:s.transaction,url:Ch.findByName(s.blockchain).explorerUrlFor({transaction:{id:s.transaction}})});var t=new aX({blockchain:s.blockchain,address:s.token});Promise.all([t.name(),t.symbol()]).then((function(t){var e=d(t,2),n=e[0],r=e[1];z({blockchain:s.blockchain,token:s.token,name:n,symbol:r.toUpperCase(),amount:s.amount})})).catch(n)}}),[s]),Z.useEffect((function(){var t;T&&T.id&&T.status&&(T.id!=R.id&&(t=Object.assign({},R,{id:T.id,url:Ch.findByName(R.blockchain).explorerUrlFor({transaction:T})}),B(t)),"success"==T.status?G(t||R):"failed"==T.status&&J(t||R))}),[T,R]),Z.useEffect((function(){if(h){var t=h.fromToken;Promise.all([t.name(),t.symbol(),t.readable(h.fromAmount)]).then((function(e){var n=d(e,3),r=n[0],i=n[1],o=n[2];z({blockchain:h.blockchain,route:h,token:t.address,name:r,symbol:i.toUpperCase(),amount:o})})).catch(n)}else z(void 0)}),[h]),Z.useEffect((function(){b&&0==b.length?w(!1):b&&b.length>0&&w(!0)}),[b]),b instanceof Array&&0==b.length?Z.createElement(hh,{open:m,close:g,start:"NoPaymentMethodFound",container:t.container,document:t.document,dialogs:{NoPaymentMethodFound:Z.createElement(T$,null)}}):Z.createElement(C$.Provider,{value:{payment:O,paymentState:Q,pay:K,transaction:R,approve:function(){y(!1),w(!1),H("approving"),_.sendTransaction(Object.assign({},O.route.approvalTransaction,{succeeded:function(){w(!0),y(!0),f().then((function(){H("initialized")}))}})).then((function(t){F(t)})).catch((function(t){console.log("error",t),"WRONG_NETWORK"!=(null==t?void 0:t.code)&&"NOT_SUPPORTED"!=(null==t?void 0:t.code)||M("WrongNetwork"),H("initialized"),y(!0)}))},approvalTransaction:Y}},t.children)};const R$=({assets:t,blockchain:e,options:n})=>n.only?t.filter((t=>(n.only[e]||[]).find((e=>e.toLowerCase()==t.address.toLowerCase())))):n.exclude?t.filter((t=>(n.exclude[e]||[]).find((e=>e.toLowerCase()!=t.address.toLowerCase())))):t;var B$=async t=>{void 0===t&&(t={accounts:{}});let e=Promise.all(Object.keys(t.accounts).map((e=>new Promise(((n,r)=>{const i=t.accounts[e],o=new AbortController;setTimeout((()=>o.abort()),1e4),fetch(`https://public.depay.com/accounts/${e}/${i}/assets`,{signal:o.signal}).catch((t=>{console.log(t),n([])})).then((t=>{if(t&&t.ok)return t.json();n([])})).then((async r=>{if(r&&r.length)return await(async({address:t,options:e,assets:n,blockchain:r})=>{if(e.only&&e.only[r]&&!e.only[r].find((t=>t.toLowerCase()==Ch[r].currency.address.toLowerCase())))return n;if(e.exclude&&e.exclude[r]&&e.exclude[r].find((t=>t.toLowerCase()==Ch[r].currency.address.toLowerCase())))return n;if(!n.find((t=>t.address.toLowerCase()==Ch[r].currency.address.toLowerCase()))){let e=await RG({blockchain:r,address:t,method:"balance"},{cache:3e4});n=[{name:Ch[r].currency.name,symbol:Ch[r].currency.symbol,address:Ch[r].currency.address,type:"NATIVE",blockchain:r,balance:e.toString()},...n]}return n})({address:i,options:t,assets:R$({assets:r,blockchain:e,options:t}).map((t=>Object.assign(t,{blockchain:e}))),blockchain:e});n([])})).then(n).catch((t=>{console.log(t),n([])}))}))))).then((t=>t.flat()));return e};const U$=(t,e)=>Object.assign({},{address:t.address,symbol:t.symbol,name:t.name,decimals:t.decimals,type:t.type,blockchain:t.blockchain},{balance:e.toString()}),Y$=({assets:t,asset:e})=>!!t.find((t=>t.blockchain==e.blockchain&&t.address.toLowerCase()==e.address.toLowerCase())),F$=({options:t,address:e,blockchain:n})=>!(!(t&&t.only&&t.only[n])||t.only[n].find((t=>t.toLowerCase()==e.toLowerCase())))||!!(t&&t.exclude&&t.exclude[n]&&t.exclude[n].find((t=>t.toLowerCase()==e.toLowerCase())));const W$=t=>(t.params.path=t.params.path.filter(((e,n,r)=>(1!=n||e!=Ch[t.blockchain].wrapped.address||r[0]!=Ch[t.blockchain].currency.address)&&(n!=r.length-2||e!=Ch[t.blockchain].wrapped.address||r[r.length-1]!=Ch[t.blockchain].currency.address))),t);var Q$={ethereum:{payment:{address:"0x99F3F4685a7178F26EB4F4Ca8B75a1724F1577B9"},weth:{wrap:{address:"0xF4cc97D00dD0639c3e383D7CafB3d815616cbB2C"},unwrap:{address:"0xcA575c6C5305e8127F3D376bb22776eAD370De4a"}},uniswap_v2:{address:"0xe04b08Dfc6CaA0F4Ec523a3Ae283Ece7efE00019",prepareTransaction:W$},paymentWithEvent:{address:"0xD8fBC10787b019fE4059Eb5AA5fB11a5862229EF"},paymentFee:{address:"0x874Cb669D7BFff79d4A6A30F4ea52c5e413BD6A7"},paymentFeeWithEvent:{address:"0x981cAd45c768d56136FDBb2C5E115F33D971bE6C"}},bsc:{payment:{address:"0x8B127D169D232D5F3ebE1C3D06CE343FD7C1AA11"},wbnb:{wrap:{address:"0xf361888459a4C863a8498ee344C2688C9196Be51"},unwrap:{address:"0x65693291C20271f5e5030261766D1D6b3AC9d44E"}},pancakeswap:{address:"0xAC3Ec4e420DD78bA86d932501E1f3867dbbfb77B",prepareTransaction:W$},paymentWithEvent:{address:"0x1869E236c03eE67B9FfEd3aCA139f4AeBA79Dc21"},paymentFee:{address:"0xae33f10AD57A38113f74FCdc1ffA6B1eC47B94E3"},paymentFeeWithEvent:{address:"0xF1a05D715AaBFA380543719F7bA8754d0331c5A9"}},polygon:{payment:{address:"0x78C0F1c712A9AA2004C1F401A7307d8bCB62abBd"},wmatic:{wrap:{address:"0x8B62F604499c1204573664447D445690E0A0011b"},unwrap:{address:"0x2fd0a07a4F73285d0eBa8176426BF9B8c0121206"}},quickswap:{address:"0x0Dfb7137bC64b63F7a0de7Cb9CDa178702666220",prepareTransaction:W$},paymentWithEvent:{address:"0xfAD2F276D464EAdB71435127BA2c2e9dDefb93a4"},paymentFee:{address:"0xd625c7087E940b2A91ed8bD8db45cB24D3526B56"},paymentFeeWithEvent:{address:"0xBC56ED8E32b64a33f64Ed7A5fF9EACdFC117e07a"}}},H$={ethereum:{address:"0xae60aC8e69414C2Dc362D0e6a03af643d1D85b92",api:[{inputs:[{internalType:"address",name:"_configuration",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"configuration",outputs:[{internalType:"contract DePayRouterV1Configuration",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pluginAddress",type:"address"}],name:"isApproved",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"address[]",name:"plugins",type:"address[]"},{internalType:"string[]",name:"data",type:"string[]"}],name:"route",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},bsc:{address:"0x0Dfb7137bC64b63F7a0de7Cb9CDa178702666220",api:[{inputs:[{internalType:"address",name:"_configuration",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"configuration",outputs:[{internalType:"contract DePayRouterV1Configuration",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pluginAddress",type:"address"}],name:"isApproved",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"address[]",name:"plugins",type:"address[]"},{internalType:"string[]",name:"data",type:"string[]"}],name:"route",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},polygon:{address:"0x2CA727BC33915823e3D05fe043d310B8c5b2dC5b",api:[{inputs:[{internalType:"address",name:"_configuration",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"configuration",outputs:[{internalType:"contract DePayRouterV1Configuration",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pluginAddress",type:"address"}],name:"isApproved",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"address[]",name:"plugins",type:"address[]"},{internalType:"string[]",name:"data",type:"string[]"}],name:"route",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]}};var G$=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Z$="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==Df?Df:"undefined"!=typeof self?self:{},V$="object"==typeof Z$&&Z$&&Z$.Object===Object&&Z$,q$="object"==typeof self&&self&&self.Object===Object&&self,J$=V$||q$||Function("return this")(),K$=function(){return J$.Date.now()},X$=/\s/;var $$=function(t){for(var e=t.length;e--&&X$.test(t.charAt(e)););return e},t0=/^\s+/;var e0=function(t){return t?t.slice(0,$$(t)+1).replace(t0,""):t},n0=J$.Symbol,r0=Object.prototype,i0=r0.hasOwnProperty,o0=r0.toString,a0=n0?n0.toStringTag:void 0;var s0=function(t){var e=i0.call(t,a0),n=t[a0];try{t[a0]=void 0;var r=!0}catch(t){}var i=o0.call(t);return r&&(e?t[a0]=n:delete t[a0]),i},u0=Object.prototype.toString;var c0=function(t){return u0.call(t)},l0=n0?n0.toStringTag:void 0;var h0=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":l0&&l0 in Object(t)?s0(t):c0(t)};var d0=function(t){return null!=t&&"object"==typeof t};var f0=function(t){return"symbol"==typeof t||d0(t)&&"[object Symbol]"==h0(t)},p0=/^[-+]0x[0-9a-f]+$/i,m0=/^0b[01]+$/i,g0=/^0o[0-7]+$/i,y0=parseInt;var b0=function(t){if("number"==typeof t)return t;if(f0(t))return NaN;if(G$(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=G$(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=e0(t);var n=m0.test(t);return n||g0.test(t)?y0(t.slice(2),n?2:8):p0.test(t)?NaN:+t},w0=Math.max,v0=Math.min;var M0=function(t,e,n){var r,i,o,a,s,u,c=0,l=!1,h=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function p(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-c>=o}function m(){var t=K$();if(p(t))return g(t);s=setTimeout(m,function(t){var n=e-(t-u);return h?v0(n,o-(t-c)):n}(t))}function g(t){return s=void 0,d&&r?f(t):(r=i=void 0,a)}function y(){var t=K$(),n=p(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return function(t){return c=t,s=setTimeout(m,e),l?f(t):a}(u);if(h)return clearTimeout(s),s=setTimeout(m,e),f(u)}return void 0===s&&(s=setTimeout(m,e)),a}return e=b0(e)||0,G$(n)&&(l=!!n.leading,o=(h="maxWait"in n)?w0(b0(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?a:g(K$())},y};var L0=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return G$(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),M0(t,e,{leading:r,maxWait:e,trailing:i})};let _0=({paymentRoute:t,fee:e})=>t.directTransfer&&!e?t.toToken.address==Ch[t.blockchain].currency.address?t.toAddress:t.toToken.address:H$[t.blockchain].address,N0=({paymentRoute:t,fee:e})=>t.directTransfer&&!e?t.toToken.address==Ch[t.blockchain].currency.address?void 0:aX[t.blockchain].DEFAULT:H$[t.blockchain].api,E0=({paymentRoute:t,fee:e})=>t.directTransfer&&!e?t.toToken.address==Ch[t.blockchain].currency.address?void 0:"transfer":"route",S0=({paymentRoute:t,exchangeRoute:e,event:n,fee:r})=>t.directTransfer&&!r?t.toToken.address==Ch[t.blockchain].currency.address?void 0:[t.toAddress,t.toAmount]:{path:x0({paymentRoute:t,exchangeRoute:e}),amounts:A0({paymentRoute:t,exchangeRoute:e,fee:r}),addresses:j0({paymentRoute:t,fee:r}),plugins:T0({paymentRoute:t,exchangeRoute:e,event:n,fee:r}),data:[]},x0=({paymentRoute:t,exchangeRoute:e})=>e?e.path:[t.toToken.address],A0=({paymentRoute:t,exchangeRoute:e,fee:n})=>{let r;r=e?e&&e.exchange.wrapper?[e.amountIn.toString(),I0({amount:e.amountOutMin.toString(),paymentRoute:t,fee:n})]:[e.amountIn.toString(),I0({amount:e.amountOutMin.toString(),paymentRoute:t,fee:n}),Math.round(Date.now()/1e3)+1800]:[t.toAmount,I0({amount:t.toAmount,paymentRoute:t,fee:n})],n&&(r[4]=k0({paymentRoute:t,fee:n}));for(var i=0;i<r.length;i++)null==r[i]&&(r[i]="0");return r},I0=({amount:t,paymentRoute:e,fee:n})=>{if(n){let r=k0({paymentRoute:e,fee:n});return kd.from(t).sub(r).toString()}return t},k0=({paymentRoute:t,fee:e})=>{if("string"==typeof e.amount&&e.amount.match("%"))return kd.from(t.toAmount).mul(10*parseFloat(e.amount)).div(1e3).toString();if("string"==typeof e.amount)return e.amount;if("number"==typeof e.amount)return $M(e.amount.toString(),t.toDecimals).toString();throw"Unknown fee amount type!"},j0=({paymentRoute:t,fee:e})=>e?[t.fromAddress,e.receiver,t.toAddress]:[t.fromAddress,t.toAddress],T0=({paymentRoute:t,exchangeRoute:e,event:n,fee:r})=>{let i=[];return e&&(t.exchangePlugin=Q$[t.blockchain][e.exchange.name],t.exchangePlugin.wrap&&t.fromToken.address==Ch[t.blockchain].currency.address?i.push(t.exchangePlugin.wrap.address):t.exchangePlugin.wrap&&t.fromToken.address==Ch[t.blockchain].wrapped.address?i.push(t.exchangePlugin.unwrap.address):i.push(t.exchangePlugin.address)),("ifSwapped"!=n||t.directTransfer)&&("ifRoutedAndNative"!=n||t.directTransfer||t.toToken.address!=Ch[t.blockchain].currency.address)?i.push(Q$[t.blockchain].payment.address):i.push(Q$[t.blockchain].paymentWithEvent.address),r&&("ifRoutedAndNative"!=n||t.directTransfer||t.toToken.address!=Ch[t.blockchain].currency.address?i.push(Q$[t.blockchain].paymentFee.address):i.push(Q$[t.blockchain].paymentFeeWithEvent.address)),i},C0=({paymentRoute:t,exchangeRoute:e})=>t.fromToken.address==Ch[t.blockchain].currency.address?e?e.amountIn.toString():t.toAmount.toString():kd.from("0").toString();function D0(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}class O0{constructor({blockchain:t,fromAddress:e,fromToken:n,fromDecimals:r,fromAmount:i,fromBalance:o,toToken:a,toDecimals:s,toAmount:u,toAddress:c}){this.blockchain=t,this.fromAddress=e,this.fromToken=n,this.fromAmount=D0([i,"optionalAccess",t=>t.toString,"call",t=>t()]),this.fromDecimals=r,this.fromBalance=o,this.toToken=a,this.toAmount=D0([u,"optionalAccess",t=>t.toString,"call",t=>t()]),this.toDecimals=s,this.toAddress=c,this.exchangeRoutes=[],this.transaction=void 0,this.approvalRequired=void 0,this.approvalTransaction=void 0,this.directTransfer=void 0}}function z0({assets:t,blacklist:e,accept:n,from:r,event:i,fee:o}){return Promise.resolve(R0({assets:t,blacklist:e})).then((t=>function({assets:t,accept:e,from:n}){return Promise.all(t.map((async t=>{let r=e.filter((e=>e.blockchain==t.blockchain)),i=new aX(t);return Promise.all(r.map((async e=>{if(e.token&&e.amount){let r=e.blockchain,o=t.decimals,a=new aX({blockchain:r,address:e.token}),s=await a.decimals(),u=(await a.BigNumber(e.amount)).toString();return new O0({blockchain:r,fromToken:i,fromDecimals:o,toToken:a,toAmount:u,toDecimals:s,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress})}if(e.fromToken&&e.fromAmount&&i.address.toLowerCase()==e.fromToken.toLowerCase()){let r=e.blockchain,o=(await i.BigNumber(e.fromAmount)).toString(),a=t.decimals,s=new aX({blockchain:r,address:e.toToken}),u=await s.decimals();return new O0({blockchain:r,fromToken:i,fromDecimals:a,fromAmount:o,toToken:s,toDecimals:u,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress})}})))}))).then((t=>t.flat().filter((t=>t))))}({assets:t,accept:n,from:r}))).then((t=>Q0({routes:t,fee:o}))).then(B0).then(U0).then(Y0).then(F0).then((t=>q0({routes:t,event:i,fee:o}))).then(H0).then(W0).then(V0).then(G0)}function P0({accept:t,from:e,whitelist:n,blacklist:r,event:i,fee:o,update:a}){if(o&&o.amount&&"string"==typeof o.amount&&o.amount.match(/\.\d\d+\%/))throw"Only up to 1 decimal is supported for fee amounts!";return new Promise((async(s,u)=>{let c,l=[];if(n)for(const t in n)(n[t]||[]).forEach((e=>{l.push({blockchain:t,address:e})}));else t.forEach((t=>{l.push({blockchain:t.blockchain,address:t.token||t.toToken})}));a&&(c=L0((async({assets:t,blacklist:e,accept:n,from:r,event:i,fee:o})=>{a.callback(await z0({assets:t,blacklist:e,accept:n,from:r,event:i,fee:o}))}),a.every));let h=[];const d=await(async t=>{void 0===t&&(t={accounts:{},priority:[]});let e=[],n=[];n=n.concat((t.priority||[]).map((n=>new Promise((async(r,i)=>{try{let i=new aX(n),o=Object.assign({},n,{name:await i.name(),symbol:await i.symbol(),decimals:await i.decimals(),balance:(await i.balance(t.accounts[n.blockchain])).toString()});if("0"!=o.balance){if(Y$({assets:e,asset:n}))return r();e.push(o),"function"==typeof t.drip&&t.drip(o),r(o)}else r()}catch(t){r()}})))));let r=[];for(var i in t.accounts)Ch.findByName(i).tokens.forEach((e=>{F$({options:t,address:e.address,blockchain:i})||r.push(Object.assign({},e,{blockchain:i}))}));if(n=n.concat(r.map((n=>new Promise(((r,i)=>{new aX(n).balance(t.accounts[n.blockchain]).then((i=>{if(Y$({assets:e,asset:n}))return r();const o=U$(n,i);"0"!=o.balance?(e.push(o),"function"==typeof t.drip&&t.drip(o),r(o)):r()})).catch((t=>{console.log(t),r()}))}))))),null==t.only||Object.keys(t.only).every((t=>0==t.length))){let r=await B$(t);n=n.concat(r.map((n=>new Promise(((r,i)=>new aX(n).balance(t.accounts[n.blockchain]).then((i=>{if(Y$({assets:e,asset:n}))return r();const o=U$(n,i);"0"!=o.balance?(e.push(o),"function"==typeof t.drip&&t.drip(o),r(o)):r()})).catch((t=>{console.log(t),r()})))))))}return await Promise.all(n),e})({accounts:e,priority:l,only:n,exclude:r,drip:n=>{a&&(h.push(n),c({assets:h,blacklist:r,accept:t,from:e,event:i,fee:o}))}});s(await z0({assets:d,blacklist:r,accept:t,from:e,event:i,fee:o}))}))}let R0=({assets:t,blacklist:e})=>null==e?t:t.filter((t=>null==e[t.blockchain]||!e[t.blockchain].find((e=>e.toLowerCase()==t.address.toLowerCase())))),B0=async t=>await Promise.all(t.map((t=>t.directTransfer?[]:t.toToken&&t.toAmount?N$({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountOutMin:t.toAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):t.fromToken&&t.fromAmount?N$({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountIn:t.fromAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):void 0))).then((e=>t.map(((t,n)=>(t.exchangeRoutes=e[n],t))))),U0=t=>t.filter((t=>0==t.exchangeRoutes.length||null!=Q$[t.blockchain][t.exchangeRoutes[0].exchange.name])),Y0=t=>t.filter((t=>0!=t.exchangeRoutes.length||t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase())),F0=async t=>t.filter((t=>t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()?kd.from(t.fromBalance).gte(kd.from(t.toAmount)):t.fromAmount&&t.toAmount?kd.from(t.fromBalance).gte(kd.from(t.exchangeRoutes[0].amountInMax)):t.exchangeRoutes[0]&&t.exchangeRoutes[0].amountIn?kd.from(t.fromBalance).gte(kd.from(t.exchangeRoutes[0].amountIn)):void 0)),W0=t=>Promise.all(t.map((t=>t.fromToken.allowance(t.fromAddress,H$[t.blockchain].address)))).then((e=>(t.forEach(((n,r)=>{n.directTransfer||n.fromToken.address.toLowerCase()==Ch[n.blockchain].currency.address.toLowerCase()?t[r].approvalRequired=!1:(t[r].approvalRequired=kd.from(n.fromAmount).gte(kd.from(e[r])),t[r].approvalRequired&&(t[r].approvalTransaction={blockchain:n.blockchain,to:n.fromToken.address,api:aX[n.blockchain].DEFAULT,method:"approve",params:[H$[n.blockchain].address,Ch[n.blockchain].maxInt]}))})),t))),Q0=({routes:t,fee:e})=>t.map((t=>(t.directTransfer=t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()&&null==e,t))),H0=t=>t.map((t=>(t.directTransfer&&!t.fee?t.fromToken.address.toLowerCase()==Ch[t.blockchain].currency.address.toLowerCase()?(t.fromAmount=t.transaction.value,t.toAmount=t.transaction.value):(t.fromAmount=t.transaction.params[1],t.toAmount=t.transaction.params[1]):(t.fromAmount=t.transaction.params.amounts[0],t.toAmount=t.transaction.params.amounts[1],t.fee&&(t.feeAmount=t.transaction.params.amounts[4])),t))),G0=t=>t.filter(((e,n)=>null==t.find(((t,r)=>e.fromToken.address==t.fromToken.address&&(e.fromToken.blockchain==t.fromToken.blockchain&&(!(!t.directTransfer||e.directTransfer)||(!(!kd.from(t.fromAmount).lt(kd.from(e.fromAmount))||e.directTransfer)||(t.fromAmount==e.fromAmount&&r<n||void 0)))))))),Z0=t=>{switch(t){case"polygon":return 50;case"bsc":return 90;case"ethereum":return 99;default:return 100}},V0=t=>t.sort(((t,e)=>Z0(t.fromToken.blockchain)<Z0(e.fromToken.blockchain)?-1:Z0(e.fromToken.blockchain)<Z0(t.fromToken.blockchain)?1:t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()?-1:e.fromToken.address.toLowerCase()==e.toToken.address.toLowerCase()||t.approvalRequired&&!e.approvalRequired?1:e.approvalRequired&&!t.approvalRequired||JSON.stringify([t.fromToken.address.toLowerCase(),t.toToken.address.toLowerCase()].sort())==JSON.stringify([Ch[t.blockchain].currency.address.toLowerCase(),Ch[t.blockchain].wrapped.address.toLowerCase()].sort())?-1:JSON.stringify([e.fromToken.address.toLowerCase(),e.toToken.address.toLowerCase()].sort())==JSON.stringify([Ch[e.blockchain].currency.address.toLowerCase(),Ch[e.blockchain].wrapped.address.toLowerCase()].sort())?1:t.fromToken.address.toLowerCase()==Ch[t.blockchain].currency.address.toLowerCase()?-1:e.fromToken.address.toLowerCase()==Ch[e.blockchain].currency.address.toLowerCase()?1:0)),q0=({routes:t,event:e,fee:n})=>Promise.all(t.map((async t=>(t.transaction=await(async({paymentRoute:t,event:e,fee:n})=>{let r=t.exchangeRoutes[0],i={blockchain:t.blockchain,to:_0({paymentRoute:t,fee:n}),api:N0({paymentRoute:t,fee:n}),method:E0({paymentRoute:t,fee:n}),params:S0({paymentRoute:t,exchangeRoute:r,event:e,fee:n}),value:C0({paymentRoute:t,exchangeRoute:r})};return r&&t.exchangePlugin&&t.exchangePlugin.prepareTransaction&&(i=t.exchangePlugin.prepareTransaction(i)),i})({paymentRoute:t,event:e,fee:n}),t.fee=!!n,t))));function J0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function K0(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J0(Object(n),!0).forEach((function(e){HZ(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J0(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var X0=function(t){var e="object"==n(t.receiver)?t.receiver.address:t.receiver,r="object"==n(t.receiver)?t.receiver:void 0;return K0(K0({},t),{},{toAddress:e,toContract:r})},$0=function(t,e){var n={};return t.forEach((function(t){n[t.blockchain]=e})),n},t1=function(t){var e=t.accept,n=t.account,r=t.whitelist,i=t.blacklist,o=t.fee;return P0({accept:e.map(X0),from:$0(e,n),whitelist:r,blacklist:i,event:"ifRoutedAndNative",fee:o})};function e1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function n1(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?e1(Object(n),!0).forEach((function(e){HZ(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e1(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var r1=function(t){var n=d(Z.useState(),2),r=n[0],i=n[1],o=d(Z.useState(),2),a=o[0],s=o[1],u=d(Z.useState(),2),l=u[0],h=u[1],f=d(Z.useState(!1),2),p=f[0],m=f[1],g=d(Z.useState(0),2),y=g[0],b=g[1],w=Z.useContext(Jq).account,v=Z.useContext(q).updatable,M=Z.useContext(Wq).recover,L=function(){var n=e(c.mark((function n(r){return c.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:0==r.length?(i([]),t.setMaxRoute&&t.setMaxRoute(null)):S(r).then(function(){var n=e(c.mark((function e(n){var r,o;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:void 0===l?(r=n[0],h(r)):(o=n[n.findIndex((function(t){return t.fromToken.address==l.fromToken.address&&t.blockchain==l.blockchain}))],o?l.fromAmount!=o.fromAmount?s(o):l.approvalRequired!=o.approvalRequired&&h(o):h(n[0])),i(n),t.setMaxRoute&&t.setMaxRoute(Vq(n));case 3:case"end":return e.stop()}}),e)})));return function(t){return n.apply(this,arguments)}}());case 1:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}(),_=function(){var n=e(c.mark((function e(n){var r;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.allRoutes,n.selectedRoute,0!=n.updatable&&t.accept&&w){e.next=3;break}return e.abrupt("return");case 3:return r=setTimeout((function(){m(!0)}),4e3),e.next=6,t1(Object.assign({},t,{account:w})).then((function(t){clearInterval(r),L(t)}));case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})));return function(t){return n.apply(this,arguments)}}(),N=function(t,e){t.fromAmount=e.toString(),t.transaction.params.amounts[0]=e.toString(),t.transaction.value&&"0"!=t.transaction.value.toString()&&(t.transaction.value=e.toString())},E=function(){var t=e(c.mark((function t(e,n){var r,i;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.directTransfer){t.next=2;break}return t.abrupt("return",e);case 2:return t.next=4,e.fromToken.readable(n||e.transaction.params.amounts[0]);case 4:return r=t.sent,t.next=7,e.fromToken.BigNumber(qq(r));case 7:return i=t.sent,N(e,i),t.abrupt("return",e);case 10:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),S=function(){var t=e(c.mark((function t(e){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.all(e.map((function(t){return E(t)}))));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),x=function(){var t=e(c.mark((function t(){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:h(n1({},a)),s(null);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return Z.useEffect((function(){var t=setTimeout((function(){b(y+1),_({allRoutes:r,selectedRoute:l,updatable:v})}),15e3);return function(){return clearTimeout(t)}}),[y,r,l,v]),Z.useEffect((function(){w&&t.accept&&null==M&&_({})}),[w,t.accept]),Z.createElement(D$.Provider,{value:{selectedRoute:l,setSelectedRoute:h,refreshPaymentRoutes:function(){return _({allRoutes:r,selectedRoute:l,updatable:v})},allRoutes:r,setAllRoutes:i,slowRouting:p,updatedRouteWithNewPrice:a,updateRouteWithNewPrice:x}},t.children)},i1=Z.createContext(),o1=function(t){var e=Z.useContext(mq).setError,n=Z.useContext(Jq).account,r=Z.useContext(q).updatable,i=Z.useContext(Wq),o=i.amount,a=i.currencyCode,s=Z.useContext(Fq).amount,u=Z.useContext(C$).payment,c=d(Z.useState(),2),l=c[0],h=c[1],f=d(Z.useState(),2),p=f[0],m=f[1],g=d(Z.useState(),2),y=g[0],b=g[1],w=Z.useContext(Wq).currency,v=d(Z.useState(0),2),M=v[0],L=v[1],_=function(t){var r=t.updatable,i=t.payment;0!=r&&null!=(null==i?void 0:i.route)&&(h(null),b(null),Promise.all([Promise.all(Ch[i.route.blockchain].stables.usd.map((function(t){return N$({blockchain:i.route.blockchain,tokenIn:i.route.fromToken.address,tokenOut:t,amountIn:i.route.fromAmount,fromAddress:n,toAddress:n})}))),i.route.directTransfer?Promise.resolve([]):N$({blockchain:i.route.blockchain,tokenIn:i.route.toToken.address,tokenOut:i.route.fromToken.address,amountIn:i.route.toAmount,fromAddress:n,toAddress:n})]).then((function(t){var e,n=d(t,2),r=n[0],o=n[1][0];if(o){var a=kd.from(o.amountOut),s=kd.from(i.route.fromAmount),u=100-a.mul(kd.from("100")).div(s).abs().toString();b(u>=10?u:null)}if(Ch[i.route.blockchain].stables.usd.includes(i.route.fromToken.address)){var c=Ch[i.route.blockchain].tokens.find((function(t){return t.address===i.route.fromToken.address})).decimals;e=XM(i.route.fromAmount.toString(),c)}else{var l=r.map((function(t){return t?t[0]:void 0})).filter(Boolean);if(0==l.length)return void h("");var f=l.map((function(t){var e=Ch[i.route.blockchain].tokens.find((function(e){return e.address===t.tokenOut})).decimals;return parseFloat(XM(t.amountOut,e))})),p=f.reduce((function(t,e){return t+e}))/f.length;f=f.filter((function(t){return t<p+.1*p&&t>p-.1*p})),e=f.reduce((function(t,e){return t+e}))/f.length}x$.fromUSD({amount:e,code:w}).then(h)})).catch(e))};return Z.useEffect((function(){l&&s&&o&&o.currency&&o.fix?m(l.toString()):!s||null!=o&&1==(null==o?void 0:o.token)?l&&l.toString().length&&1!=(null==o?void 0:o.token)?m(l.toString()):u&&m("".concat(u.symbol," ").concat(u.amount)):m(new x$({amount:s.toFixed(2),code:a}).toString())}),[l,u,s,o]),Z.useEffect((function(){n&&u&&_({updatable:r,payment:u})}),[u,n]),Z.useEffect((function(){var t=setTimeout((function(){L(M+1),_({updatable:r})}),15e3);return function(){return clearTimeout(t)}}),[M,r]),Z.createElement(i1.Provider,{value:{paymentValue:l,paymentValueLoss:y,displayedPaymentValue:p}},t.children)},a1=function(t){var e=Z.useContext(Fq),n=e.acceptWithAmount,r=e.setMaxRoute,i=Z.useContext(Wq),o=i.blacklist,a=i.whitelist,s=i.fee;return Z.createElement(k$.Provider,{value:{}},Z.createElement(r1,{accept:n,whitelist:a,blacklist:o,setMaxRoute:r,fee:s},Z.createElement(P$,{container:t.container,document:t.document},Z.createElement(o1,null,t.children))))},s1=function(t){var e=qq(t),n=e.toString();if(new RegExp(/\./).test(n)){var r=n.split(".");return(new Intl.NumberFormat).format(parseInt(r[0]))+"."+r[1]}return(new Intl.NumberFormat).format(e)};let u1=["ethereum","bsc","polygon","solana","fantom","velas"];u1.evm=["ethereum","bsc","polygon","fantom","velas"],u1.solana=["solana"];const c1=[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],l1=[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];let h1=function(t){const[e,n]=Z.useState(),[r,i]=Z.useState("repository"),o=t.blockchain.toLowerCase(),a=Ch.findByName(o).currency.address,s=t.address,u=t.id;Z.useEffect((()=>{a.toLowerCase()==s.toLowerCase()?n(Ch.findByName(o).logo):n(c({blockchain:o,address:s}))}),[o,s]);const c=({blockchain:t,address:e})=>["ethereum","bsc","polygon","fantom","solana"].includes(t)?`https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/${l(t)}/assets/${e}/logo.png`:"velas"==t?`https://raw.githubusercontent.com/wagyuswapapp/assets/master/blockchains/velas/assets/${e.toLowerCase()}/logo.png`:void 0,l=t=>{switch(t){case"ethereum":return"ethereum";case"bsc":return"smartchain";case"polygon":return"polygon";case"solana":return"solana";case"fantom":return"fantom";default:throw"DePayReactTokenImage: Unknown blockchain"}},h=()=>{i("unknown"),n("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjgzLjUgMjgzLjUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDI4My41IDI4My41OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxjaXJjbGUgZmlsbD0iI0YwRUZFRiIgY3g9IjE0MS43IiBjeT0iMTQxLjciIHI9IjE0MS43Ii8+CjxnPgoJPHBhdGggZmlsbD0iI0FCQUJBQiIgZD0iTTEyNywxNzUuMXYtNC40YzAtOC40LDEuMS0xNS4zLDMuNC0yMC43YzIuMy01LjQsNS4xLTEwLDguNC0xMy44YzMuMy0zLjcsNi42LTcsMTAuMS05LjdzNi4zLTUuNiw4LjYtOC41CgkJYzIuMy0yLjksMy40LTYuNCwzLjQtMTAuNWMwLTUtMS4xLTguNy0zLjMtMTEuMWMtMi4yLTIuNC01LTQtOC40LTQuOGMtMy40LTAuOC02LjktMS4zLTEwLjUtMS4zYy01LjgsMC0xMS44LDEtMTcuOSwyLjkKCQljLTYuMSwxLjktMTEuNSw0LjctMTYsOC40Vjc0YzIuMy0xLjcsNS40LTMuMyw5LjQtNC45YzQtMS42LDguNC0yLjksMTMuNC00YzUtMS4xLDEwLjEtMS42LDE1LjUtMS42YzguMSwwLDE1LjEsMS4xLDIxLjEsMy40CgkJYzYsMi4zLDEwLjgsNS41LDE0LjcsOS41YzMuOCw0LDYuNyw4LjcsOC42LDE0LjFjMS45LDUuMywyLjksMTEuMSwyLjksMTcuMmMwLDYuNi0xLjEsMTItMy40LDE2LjNjLTIuMyw0LjMtNS4xLDgtOC41LDExLjIKCQljLTMuNCwzLjItNi44LDYuNC0xMC4yLDkuNWMtMy40LDMuMS02LjMsNi44LTguNiwxMWMtMi4zLDQuMi0zLjQsOS41LTMuNCwxNS45djMuNEgxMjd6IE0xMjUuMiwyMTguMnYtMjcuN2gzM3YyNy43SDEyNS4yeiIvPgo8L2c+Cjwvc3ZnPgo=")},d=t=>{t.match(/^ipfs/)&&(t=`https://ipfs.io/ipfs/${t.split("://")[1]}`),fetch(t).then((t=>{if(t.ok)return t.json();h()})).then((t=>{if(t){let e=t.image;e?(e.match(/^ipfs/)&&(e=`https://ipfs.io/ipfs/${e.split("://")[1]}`),i("meta"),n(e)):h()}})).catch(h)};return null==e?null:Z.createElement("img",{className:t.className,src:e,onError:t=>{"repository"==r?(i("depay"),n(`https://integrate.depay.com/tokens/${o}/${s}/image`)):"depay"==r&&u1.evm.includes(o)?u?RG({blockchain:o,address:s,api:l1,method:"uri",params:[u]}).then((t=>{t=t.match("0x{id}")?t.replace("0x{id}",u):t,d(t)})).catch(h):RG({blockchain:o,address:s,api:c1,method:"tokenURI",params:[1]}).then(d).catch(h):h()},__self:this,__source:{fileName:"/Users/sebastian/Work/DePay/react-token-image/src/index.js",lineNumber:112}})};var d1=function(t){var e=Z.useContext(uh).navigate;Z.useContext(mq).setError,Z.useContext(Jq).account;var r=Z.useContext(Fq),i=r.amount,o=r.setAmount,a=r.maxAmount;Z.useContext(i1).displayedPaymentValue;var s=d(Z.useState(i),2),u=s[0],c=s[1],l=Z.useContext(Wq),h=l.currencyCode,f=l.amount,p=Z.useContext(D$);p.allRoutes;var m=p.setSelectedRoute,g="object"==n(f)&&f.min?f.min:1,y="object"==n(f)&&f.step?f.step:1,b=null!=f&&f.token?null:h,w=function(t){Number.isNaN(t)||c(t)},v=function(t){return y&&(t=parseFloat(new TK(Math.floor(new TK(t).div(y))).mul(y).toString())),t},M=function(t){return t=v(t),a&&(t=Math.max(g,Math.min(t,a))),t=v(t)};return Z.createElement(dh,{stacked:!0,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomS"},Z.createElement("h1",{className:"LineHeightL FontSizeL TextCenter"},"Change Amount"),Z.createElement("div",{className:"FontSizeL TextCenter FontWeightBold"},Z.createElement("strong",null,b))),body:Z.createElement("div",{className:"MaxHeight PaddingTopXS"},Z.createElement("div",{className:"PaddingLeftM PaddingRightM"},Z.createElement("div",{className:"PaddingTopS TextCenter PaddingBottomL"},Z.createElement("div",{className:"PaddingBottomM"},Z.createElement("input",{max:a?parseFloat(a):null,min:g,step:y,className:"Input FontSizeXXL TextAlignCenter",type:"number",name:"amount",value:parseFloat(u),onChange:function(t){w(t.target.value)},onBlur:function(t){var e;e=t.target.value,c(M(e))}})),a&&Z.createElement("div",{style:{height:"40px"}},Z.createElement("div",{className:"FontSizeS"},s1(v(a)),Z.createElement("div",null,Z.createElement("button",{className:"TextButton",onClick:function(){w(M(a))}},"(Max)"))))))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:"ButtonPrimary",onClick:function(){var t=M(parseFloat(u));t!=i&&(m(void 0),o(t)),e("back")}},"Done"))})},f1=function(t){var e=Z.useContext(i1).paymentValue;return Z.createElement(dh,{stacked:!0,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomS"},Z.createElement("h1",{className:"LineHeightL FontSizeL TextCenter"},"Change Payment"),null!=e&&Z.createElement("div",{className:"FontSizeL TextCenter FontWeightBold"},Z.createElement("strong",null,e.toString()))),body:Z.createElement("div",{className:"MaxHeight PaddingTopXS"},Z.createElement("div",{className:"PaddingLeftM PaddingRightM"},Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"})),Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"})),Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))))})},p1=function(t){var e=Z.useContext(mq).setError,n=Z.useContext(D$),r=n.allRoutes,i=n.setSelectedRoute,o=Z.useContext(i1);o.paymentValue;var a=o.displayedPaymentValue,s=Z.useContext(uh).navigate,u=d(Z.useState([]),2),c=u[0],l=u[1],h=d(Z.useState([]),2),f=h[0],p=h[1];return Z.useEffect((function(){null!=r&&Promise.all(r.map((function(t){return t.exchangeRoutes[0],t.fromToken,Promise.all([t.fromToken.name(),t.fromToken.symbol(),t.fromToken.decimals(),t.fromToken.readable(t.fromAmount)])}))).then((function(t){l(r.map((function(e,n){return{name:t[n][0],symbol:t[n][1].toUpperCase(),decimals:t[n][2],amount:t[n][3],route:e}})))})).catch(e)}),[r]),Z.useEffect((function(){p(c.map((function(t,e){var n=Ch.findByName(t.route.blockchain);return Z.createElement("div",{key:e,className:"Card",title:"Select ".concat(t.symbol," as payment"),onClick:function(){i(t.route),s("back")}},Z.createElement("div",{className:"CardImage"},Z.createElement(h1,{blockchain:t.route.blockchain,address:t.route.fromToken.address}),Z.createElement("img",{className:"BlockchainLogo small",src:n.logo,alt:n.label,title:n.label})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("h2",{className:"CardText"},Z.createElement("div",{className:"TokenAmountRow"},Z.createElement("span",{className:"TokenSymbolCell"},t.symbol),Z.createElement("span",null," "),Z.createElement("span",{className:"TokenAmountCell"},s1(t.amount)))),Z.createElement("h3",{className:"CardText small"},Z.createElement("small",null,s1(qq(parseFloat(t.route.fromBalance.toString())/Math.pow(10,t.decimals),"down")))))))})))}),[c]),0==c.length||0==f.length?Z.createElement(f1,null):Z.createElement(dh,{stacked:!0,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomS"},Z.createElement("h1",{className:"LineHeightL FontSizeL TextCenter"},"Change Payment"),null!=a&&Z.createElement("div",{className:"FontSizeL TextCenter FontWeightBold"},Z.createElement("strong",null,a.toString()))),body:Z.createElement("div",{className:"MaxHeight PaddingTopXS"},Z.createElement("div",{className:"PaddingLeftM PaddingRightM"},f)),footer:Z.createElement("div",null)})},m1=function(){return Z.createElement("svg",{className:"ChevronRight Icon",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16"},Z.createElement("path",{strokeWidth:"1",fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"}))},g1=function(t){var e=Z.useContext(Wq).title;return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},e||"Donation")),body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"})),Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("div",{className:"SkeletonWrapper"},Z.createElement("div",{className:"ButtonPrimary Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))))})},y1=function(t){return Z.createElement("svg",{className:"Checkmark Icon "+t.className,version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 24 24"},Z.createElement("path",{d:"M20,4.9L9.2,16l-5.4-3.9c-0.7-0.5-1.6-0.3-2.1,0.3c-0.5,0.7-0.3,1.6,0.3,2.1l6.4,4.7c0.3,0.2,0.6,0.3,0.9,0.3 c0.4,0,0.8-0.2,1.1-0.5l11.7-12c0.6-0.6,0.6-1.6,0-2.2C21.6,4.3,20.6,4.3,20,4.9z"}))},b1=function(t){return Z.createElement("svg",{className:"DigitalWalletIcon Icon "+t.className,version:"1.1",xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",viewBox:"0 0 24 24"},Z.createElement("path",{d:"M8.51,4.84l-.39-.53,4-2.89a2.2,2.2,0,0,1,3.06.48l.4.56-.53.39-.4-.56A1.54,1.54,0,0,0,12.5,2Z",transform:"translate(-0.81 -1)"}),Z.createElement("path",{d:"M9.77,4.89l-.21-.62,6.31-2.13h0a2.18,2.18,0,0,1,.67-.1h0a2.21,2.21,0,0,1,2.08,1.49l.32.95-.63.21L18,3.73a1.53,1.53,0,0,0-1.45-1h0a1.61,1.61,0,0,0-.48.08h0Z",transform:"translate(-0.81 -1)"}),Z.createElement("path",{d:"M19.72,16.2H18.27a3.28,3.28,0,1,1,0-6.56h1.45a3.21,3.21,0,0,1,1.33.28h0a3.28,3.28,0,0,1,0,6A3.21,3.21,0,0,1,19.72,16.2Zm-1.45-5.9a2.63,2.63,0,0,0,0,5.25h1.45a2.56,2.56,0,0,0,1.06-.23,2.62,2.62,0,0,0,0-4.8,2.55,2.55,0,0,0-1.06-.22ZM19,14.53a1.61,1.61,0,1,1,1.61-1.61A1.62,1.62,0,0,1,19,14.53ZM19,12a1,1,0,1,0,.95.95A1,1,0,0,0,19,12Z",transform:"translate(-0.81 -1)"}),Z.createElement("path",{d:"M10.49,19.69a1.58,1.58,0,1,1,1.58-1.57A1.57,1.57,0,0,1,10.49,19.69Zm0-2.49a.92.92,0,1,0,.92.92A.92.92,0,0,0,10.49,17.2Z",transform:"translate(-0.81 -1)"}),Z.createElement("path",{d:"M19.09,22.14H2.79a2,2,0,0,1-2-2V6.25a2.1,2.1,0,0,1,0-.43,2,2,0,0,1,.48-.92,2,2,0,0,1,1.48-.65H19.09a2,2,0,0,1,.64.1,2,2,0,0,1,1.36,1.79v0a.28.28,0,0,1,0,.09v3.91h-.66v-4a1.49,1.49,0,0,0-.23-.69A1.35,1.35,0,0,0,19.52,5a1.26,1.26,0,0,0-.43-.08H2.82a1.34,1.34,0,0,0-1,.44A1.49,1.49,0,0,0,1.5,6a1.5,1.5,0,0,0,0,.29V20.13a1.36,1.36,0,0,0,1.34,1.35H19.09a1.35,1.35,0,0,0,1.35-1.35V15.68h.66v4.45A2,2,0,0,1,19.09,22.14Z",transform:"translate(-0.81 -1)"}),Z.createElement("path",{d:"M9.27,9.31a1.58,1.58,0,1,1,0-3.15,1.58,1.58,0,0,1,0,3.15Zm0-2.5a.92.92,0,1,0,.92.92A.92.92,0,0,0,9.27,6.81Z",transform:"translate(-0.81 -1)"}),Z.createElement("path",{d:"M7.11,14.67A1.58,1.58,0,1,1,8.69,13.1,1.57,1.57,0,0,1,7.11,14.67Zm0-2.49A.92.92,0,1,0,8,13.1.92.92,0,0,0,7.11,12.18Z",transform:"translate(-0.81 -1)"}),Z.createElement("rect",{x:"0.33",y:"11.77",width:"4.72",height:"0.66"}),Z.createElement("polygon",{points:"2.08 9.53 0.33 9.53 0.33 8.87 1.8 8.87 4.28 6.39 7.21 6.39 7.21 7.05 4.55 7.05 2.08 9.53"}),Z.createElement("polygon",{points:"8.43 17.45 4.53 17.45 2.63 15.55 0.33 15.55 0.33 14.89 2.9 14.89 4.8 16.79 8.43 16.79 8.43 17.45"}))},w1={ethereum:13,bsc:4,polygon:3},v1=function(t){return Z.createElement("div",{className:"LoadingText"},t.children,Z.createElement("span",{className:"dot"},"."),Z.createElement("span",{className:"dot"},"."),Z.createElement("span",{className:"dot"},"."))},M1=function(){var t=Z.useContext(Fq);t.amount,t.amountsMissing;var e=Z.useContext(O$),n=e.synchronousTracking,r=e.asynchronousTracking,i=e.trackingInitialized,o=e.release,a=e.forwardTo,s=e.confirmationsRequired,u=e.confirmationsPassed,c=Z.useContext(C$),l=c.payment,h=c.paymentState,f=c.pay,p=c.transaction,m=c.approve,g=c.approvalTransaction,y=Z.useContext(i1).paymentValueLoss,b=Z.useContext(D$),w=b.updatedRouteWithNewPrice,v=b.updateRouteWithNewPrice;Z.useContext(uh).navigate;var M=Z.useContext(V).close,L=d(Z.useState(),2),_=L[0],N=L[1],E=d(Z.useState(0),2),S=E[0],x=E[1];Z.useEffect((function(){if(s){var t=setInterval((function(){x(S+1)}),1e3);return function(){clearInterval(t)}}}),[s,S]),Z.useEffect((function(){u&&N(function(t,e,n){return(e-n)*w1[t]}(l.blockchain,s,u)-S)}),[u,S]),Z.useEffect((function(){u&&x(0)}),[u]);return Z.createElement("div",null,null==l.route||!l.route.approvalRequired||l.route.directTransfer||w?null:"initialized"==h?Z.createElement("div",{className:"PaddingBottomXS"},Z.createElement("button",{disabled:y,className:"ButtonPrimary",onClick:m,title:"Allow ".concat(l.symbol," to be used as payment")},"Approve use of ",l.symbol)):"approving"==h?Z.createElement("div",{className:"PaddingBottomXS"},Z.createElement("a",{className:"ButtonPrimary",title:"Approving payment token - please wait",href:null==g?void 0:g.url,target:"_blank",rel:"noopener noreferrer"},Z.createElement(v1,null,"Approving"))):void 0,"paying"==h&&null==p?Z.createElement("div",{className:"PaddingBottomS"},Z.createElement("div",{className:"Card transparent disabled small"},Z.createElement("div",{className:"CardImage"},Z.createElement("div",{className:"TextCenter Opacity05"},Z.createElement(b1,{className:"small"}))),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("div",{className:"Opacity05"},"Confirm transaction in your wallet"))))):"success"==h?Z.createElement("div",{className:"PaddingBottomS"},Z.createElement("div",null,Z.createElement("a",{className:"Card transparent small",title:"Transaction has been confirmed by the network",href:null==p?void 0:p.url,target:"_blank",rel:"noopener noreferrer"},Z.createElement("div",{className:"CardImage"},Z.createElement("div",{className:"TextCenter Opacity05"},Z.createElement(y1,{className:"small"}))),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("div",{className:"Opacity05"},"Transaction confirmed"))))),0==n&&0==r||r&&i?null:r&&0==i?Z.createElement("div",null,Z.createElement("div",{className:"Card transparent small disabled"},Z.createElement("div",{className:"CardImage"},Z.createElement("div",{className:"TextCenter"},Z.createElement("div",{className:"Loading Icon"}))),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("div",{className:"Opacity05"},"Initializing tracking"))))):o?Z.createElement("div",null,Z.createElement("div",{className:"Card transparent small disabled"},Z.createElement("div",{className:"CardImage"},Z.createElement("div",{className:"TextCenter Opacity05"},Z.createElement(y1,{className:"small"}))),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("div",{className:"Opacity05"},"Payment validated"))))):Z.createElement("div",null,Z.createElement("div",{className:"Card transparent small disabled"},Z.createElement("div",{className:"CardImage"},Z.createElement("div",{className:"TextCenter"},Z.createElement("div",{className:"Loading Icon"}))),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("div",{className:"Opacity05"},"Validating payment",s&&_>0&&Z.createElement("span",{title:"".concat(u,"/").concat(s," required confirmations")}," ",_,"s"))))))):void 0,w?Z.createElement("div",null,Z.createElement("div",{className:"PaddingBottomXS"},Z.createElement("div",{className:"Alert"},Z.createElement("strong",null,"Price updated!"))),Z.createElement("button",{className:"ButtonPrimary",onClick:function(){v()}},"Reload")):y?Z.createElement("div",null,Z.createElement("div",{className:"PaddingBottomXS"},Z.createElement("div",{className:"Alert"},Z.createElement("strong",null,"Payment would lose ",y,"% of its value!"))),Z.createElement("button",{className:"ButtonPrimary disabled",onClick:function(){}},"Pay")):"initialized"!=h&&"approving"!=h||!l.route?"paying"==h?Z.createElement("a",{className:"ButtonPrimary",title:"Performing the payment - please wait",href:null==p?void 0:p.url,target:"_blank",rel:"noopener noreferrer"},Z.createElement(v1,null,"Paying")):"success"==h?1==n?o?a?Z.createElement("a",{className:"ButtonPrimary",href:a,rel:"noopener noreferrer"},"Continue"):Z.createElement("button",{className:"ButtonPrimary",onClick:M},"Continue"):Z.createElement("button",{className:"ButtonPrimary disabled",onClick:function(){}},"Continue"):1==r&&0==i?Z.createElement("button",{className:"ButtonPrimary disabled",onClick:function(){}},"Close"):Z.createElement("button",{className:"ButtonPrimary",onClick:M},"Close"):void 0:Z.createElement("button",{className:["ButtonPrimary",l.route.approvalRequired&&!l.route.directTransfer?"disabled":""].join(" "),onClick:function(){l.route.approvalRequired&&!l.route.directTransfer||f()}},"Pay"))},L1=function(t){var e=Z.useContext(Wq);e.currencyCode;var n=e.title;Z.useContext(Fq).amount;var r=Z.useContext(C$),i=r.payment,o=r.paymentState,a=Z.useContext(i1).displayedPaymentValue,s=Z.useContext(uh).navigate;if(null==i)return Z.createElement(g1,null);var u=Ch.findByName(i.blockchain);return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},n||"Donation")),body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},Z.createElement("div",{className:["Card","initialized"==o?"":"disabled"].join(" "),title:"initialized"==o?"Change amount":void 0,onClick:function(){"initialized"==o&&s("ChangeAmount")}},Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("h4",{className:"CardTitle"},"Amount"),Z.createElement("h2",{className:"CardText"},Z.createElement("div",{className:"TokenAmountRow"},a)))),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null))),Z.createElement("div",{className:["Card","initialized"==o?"":"disabled"].join(" "),title:"initialized"==o?"Change payment":void 0,onClick:function(){"initialized"==o&&s("ChangePayment")}},Z.createElement("div",{className:"CardImage",title:i.name},Z.createElement(h1,{blockchain:i.route.blockchain,address:i.token}),Z.createElement("img",{className:"BlockchainLogo small",src:u.logo,alt:u.label,title:u.label})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("h4",{className:"CardTitle"},"Payment"),Z.createElement("h2",{className:"CardText"},Z.createElement("div",{className:"TokenAmountRow"},Z.createElement("span",{className:"TokenSymbolCell"},i.symbol),Z.createElement("span",null," "),Z.createElement("span",{className:"TokenAmountCell"},s1(i.amount)))))),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null)))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement(M1,null))})},_1=function(){var t=Z.useContext(V).close,e=Z.useContext(C$).transaction;return Z.createElement(dh,{stacked:!1,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:Z.createElement("div",{className:"TextCenter"},Z.createElement("div",{className:"GraphicWrapper"},Z.createElement("img",{className:"Graphic",src:gq})),Z.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Payment Failed"),Z.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("strong",{className:"FontSizeM"},"Unfortunately executing your payment failed, but you can try again."),e&&Z.createElement("div",{className:"PaddingTopS"},Z.createElement("a",{className:"Link",title:"Check your transaction on a block explorer",href:null==e?void 0:e.url,target:"_blank",rel:"noopener noreferrer"},"View on explorer")))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:"ButtonPrimary",onClick:function(){return t()}},"Try again"))})},N1=function(t){var e=Z.useContext(C$).payment,n=Z.useContext(Jq).wallet,r=Z.useContext(uh).navigate,i=d(Z.useState(!1),2);i[0],i[1];var o=Ch.findByName(e.route.blockchain);return Z.createElement(dh,{stacked:!0,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Wrong Network")),body:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomXS TextCenter"},Z.createElement("div",{className:"GraphicWrapper"},Z.createElement("img",{className:"Graphic",src:o.logo})),Z.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Connect to ",o.label),Z.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("strong",{className:"FontSizeM"},"Please make sure you connect your wallet to the correct network before you try again!"))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{type:"button",className:"ButtonPrimary",onClick:function(){n.switchTo(e.blockchain),r("back")}},"Switch Network"))})},E1=function(t){var e=Z.useContext(V),n=e.open,r=e.close,i=Z.useContext(j$).setNavigator;return Z.createElement(hh,{setNavigator:i,open:n,close:r,start:"DonationOverview",container:t.container,document:t.document,dialogs:{DonationOverview:Z.createElement(L1,null),ChangeAmount:Z.createElement(d1,null),ChangePayment:Z.createElement(p1,null),PaymentFailed:Z.createElement(_1,null),WrongNetwork:Z.createElement(N1,null)}})},S1=function(t){var e;return Z.createElement(j$.Provider,{value:{navigate:function(t){e&&e.navigate(t)},set:function(t){e&&e.set(t)},setNavigator:function(t){e=t}}},t.children)},x1=function(t){Z.useContext(mq).errorCallback;var n=Z.useContext(Wq),r=n.track,i=n.validated;n.failed;var o=n.integration,a=n.link,s=n.type,u=Z.useContext(Jq),l=u.account,h=u.wallet,f=d(Z.useState(),2),p=f[0],m=f[1],g=d(Z.useState(),2),y=g[0],b=g[1],w=d(Z.useState(),2),v=w[0],M=w[1],L=d(Z.useState(),2),_=L[0],N=L[1],E=d(Z.useState(),2);E[0],E[1];var S=d(Z.useState(),2),x=S[0],A=S[1],I=d(Z.useState(!1),2),k=I[0],j=I[1],T=d(Z.useState(!(!r||!r.endpoint&&"function"!=typeof r.method||1==r.async)),1)[0],C=d(Z.useState(!(!r||1!=r.async)),1)[0],D=d(Z.useState(!(!r||!r.poll||!r.poll.endpoint&&"function"!=typeof r.poll.method||1==r.async)),1)[0],O=d(Z.useState(!1),2),z=O[0],P=O[1],R=d(Z.useState(),2),B=R[0],U=R[1],Y=Z.useContext(V).setClosable,F=Z.useContext(j$),W=F.navigate,Q=F.set,H=function e(n){var r=new WebSocket("wss://integrate.depay.com/cable");r.onopen=function(t){var e,i={command:"subscribe",identifier:JSON.stringify({blockchain:n.blockchain,sender:n.from,nonce:null==n||null===(e=n.nonce)||void 0===e?void 0:e.toString(),channel:"PaymentChannel"})};r.send(JSON.stringify(i))},r.onclose=function(t){t&&1e3==t.code||e(n)},r.onmessage=function(e){var n=JSON.parse(e.data);if("ping"!==n.type&&n.message){var o="success"==n.message.status;i&&setTimeout((function(){return i(o)}),200),n.message.release?(r.close(1e3),o?(P(!0),Y(!0),U(n.message.forward_to),n.message.forward_to&&setTimeout((function(){t.document.location.href=n.message.forward_to}),200)):0==o&&(Y(!0),Q(["PaymentFailed"]))):n.message.confirmations&&(b(n.message.confirmations.required),M(n.message.confirmations.passed))}},r.onerror=function(t){console.log("WebSocket Error: "+t)}},G=function(t,e,n,i){(i=parseInt(i||1,10))<((null==r?void 0:r.attempts)||40)?setTimeout((function(){q(t,e,n,i+1)}),3e3):W("TrackingFailed")},q=function(t,e,n,i){var o,a;console.log("START TRACKING!",t),function(t){if(r.endpoint)return fetch(r.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((function(t){if(200==t.status||201==t.status)return t;throw t}));if(r.method)return r.method(t);throw"No tracking defined!"}({blockchain:t.blockchain,transaction:t.id,sender:t.from,nonce:null==t||null===(o=t.nonce)||void 0===o?void 0:o.toString(),after_block:e.toString(),from_token:n.fromToken.address,from_amount:n.fromAmount.toString(),from_decimals:n.fromDecimals,to_token:n.toToken.address,to_amount:n.toAmount.toString(),to_decimals:n.toDecimals,fee_amount:null==n||null===(a=n.feeAmount)||void 0===a?void 0:a.toString()}).then((function(t){j(!0),console.log("PAYMENT TRACKING INITIALIZED")})).catch((function(r){console.log("PAYMENT TRACKING FAILED",r),G(t,e,n,i)}))};Z.useEffect((function(){if(D&&T){var e=setInterval((function(){return function(e,n,o,a,s){var u;if(e&&null!=n&&null!=o&&null!=a){var c={blockchain:n.blockchain,transaction:n.id,sender:n.from,nonce:null==n||null===(u=n.nonce)||void 0===u?void 0:u.toString(),after_block:o.toString(),to_token:a.toToken.address},l=function(e){e&&(e&&e.forward_to?(Y(!0),U(e.forward_to),setTimeout((function(){t.document.location.href=e.forward_to}),200)):Y(!0),clearInterval(s),i&&i(!0),P(!0))};r.poll.endpoint?fetch(r.poll.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}).then((function(t){return 200==t.status||201==t.status?t.json().catch((function(){Y(!0)})):void 0})).then(l):r.poll.method&&r.poll.method(c).then(l)}}(D,p,_,x,e)}),5e3);return function(){clearInterval(e)}}}),[D,p,_,x]);var J=function t(e,n,r,i){var u;fetch("https://public.depay.com/payments",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({blockchain:e.blockchain,transaction:e.id,sender:e.from,nonce:null==e||null===(u=e.nonce)||void 0===u?void 0:u.toString(),receiver:r.toAddress,token:r.toToken.address,amount:r.fee?XM(r.transaction.params.amounts[1],r.toDecimals):XM(r.toAmount,r.toDecimals),confirmations:1,after_block:n.toString(),uuid:e.id,payload:{sender_id:e.from,sender_token_id:r.fromToken.address,sender_amount:XM(r.fromAmount,r.fromDecimals),integration:o,link:a,type:s},fee_amount:r.fee?XM(r.transaction.params.amounts[4],r.toDecimals):null,fee_receiver:r.fee?r.transaction.params.addresses[1]:null})}).then((function(i){200==i.status||201==i.status||setTimeout((function(){t(e,n,r)}),3e3)})).catch((function(i){setTimeout((function(){t(e,n,r)}),3e3)}))};return Z.createElement(O$.Provider,{value:{synchronousTracking:T,asynchronousTracking:C,initializeTracking:function(t,e,n){console.log("initializeTracking"),J(t,e,n),(T||r&&1==r.async)&&q(t,e,n),0!=T&&(m(t),N(e),A(n),H(t))},preTrack:function(t,n){return T||C?new Promise(function(){var i=e(c.mark((function e(i,o){var a,s;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=n.blockchain,e.t1=l,e.next=4,h.transactionCount({blockchain:n.blockchain,address:l});case 4:if(e.t2=e.sent.toString(),e.t3=t.toString(),e.t4=n.fromToken.address,e.t5=n.fromAmount.toString(),e.t6=n.fromDecimals,e.t7=n.toToken.address,e.t8=n.toAmount.toString(),e.t9=n.toDecimals,e.t10=null==n||null===(a=n.feeAmount)||void 0===a?void 0:a.toString(),s={blockchain:e.t0,sender:e.t1,nonce:e.t2,after_block:e.t3,from_token:e.t4,from_amount:e.t5,from_decimals:e.t6,to_token:e.t7,to_amount:e.t8,to_decimals:e.t9,fee_amount:e.t10},!r.endpoint){e.next=18;break}return e.abrupt("return",fetch(r.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then((function(t){return 200==t.status||201==t.status?i():o("PRETRACKING REQUEST FAILED")})));case 18:r.method?r.method(s).then(i).catch(o):o("No tracking defined!");case 19:case"end":return e.stop()}}),e)})));return function(t,e){return i.apply(this,arguments)}}()):Promise.resolve()},trackingInitialized:k,continueTryTracking:function(){G(p,_,x,1)},release:z,forwardTo:B,confirmationsRequired:y,confirmationsPassed:v}},t.children)},A1=function(t){var e=d(Z.useState(),2),n=e[0],r=e[1],i=d(Z.useState(),2),o=i[0],a=i[1],s=d(Z.useState(!1),2),u=s[0],c=s[1];Z.useContext(mq).errorCallback;var l=Z.useContext(Wq).recover;Z.useEffect((function(){if(u){var t=function(){fetch("https://public.depay.com/transactions/".concat(n.blockchain,"/").concat(n.from,"/").concat(n.nonce)).then((function(t){200==t.status&&t.json().then((function(t){"pending"!=t.status&&(a({id:t.external_id,status:t.status}),c(!1))}))}))},e=setInterval(t,5e3);return t(),function(){clearInterval(e)}}}),[u]);var h=function t(e,n,r){var i;r>3?console.log("TRANSACTION TRACKING FAILED AFTER 3 ATTEMPTS!"):fetch("https://public.depay.com/transactions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id,after_block:n.toString(),blockchain:e.blockchain,sender:e.from,nonce:null==e||null===(i=e.nonce)||void 0===i?void 0:i.toString()})}).then((function(i){200==i.status||201==i.status?console.log("TRANSACTION TRACKING INITIALIZED"):(console.log("TRANSACTION TRACKING FAILED",i),setTimeout((function(){t(e,n,r+1)}),3e3))})).catch((function(i){console.log("TRANSACTION TRACKING FAILED",i),setTimeout((function(){t(e,n,r+1)}),3e3)}))},f=function t(e){var n=new WebSocket("wss://integrate.depay.com/cable");n.onopen=function(t){var r,i={command:"subscribe",identifier:JSON.stringify({blockchain:e.blockchain,sender:e.from,nonce:null==e||null===(r=e.nonce)||void 0===r?void 0:r.toString(),channel:"TransactionChannel"})};n.send(JSON.stringify(i))},n.onclose=function(n){n&&1e3==n.code||t(e)},n.onmessage=function(t){var e=JSON.parse(t.data);"ping"!==e.type&&e.message&&e.message.status&&"pending"!=e.message.status&&(a(e.message),n.close(1e3))},n.onerror=function(t){console.log("WebSocket Error: "+t)}},p=function(t,e){r(t),null==l&&h(t,e,1),f(t),c(!0)};return Z.useEffect((function(){l&&p({blockchain:l.blockchain,id:l.transaction,from:l.sender,nonce:l.nonce},l.afterBlock)}),[l]),Z.createElement(z$.Provider,{value:{initializeTracking:p,foundTransaction:o}},t.children)},I1=function(t){var n=Z.useContext(Wq),r=n.recover,i=n.wallet;Z.useContext(mq).setError;var o=d(Z.useState(i),2),a=o[0],s=o[1],u=d(Z.useState(),2),l=u[0],h=u[1],f=d(Z.useState(i?"connected":void 0),2),p=f[0],m=f[1];return Z.useEffect((function(){e(c.mark((function t(){var e;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!i){t.next=5;break}return t.next=3,i.account();case 3:(e=t.sent)?h(e):(s(),m());case 5:case"end":return t.stop()}}),t)})))()}),[]),"connected"==p||null!=r?Z.createElement(Jq.Provider,{value:{account:l,wallet:a,disconnect:function(){h(),s(),m()}}},t.children):Z.createElement(cq,{document:t.document,container:t.container,resolve:function(e){var n=e.account,r=e.wallet;h(n),s(r),setTimeout((function(){m("connected"),t.connected&&t.connected(n)}),200)}})},k1=function(){var t=e(c.mark((function t(e){var n;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.accept)instanceof Array&&0!=n.length){t.next=3;break}throw"You need to set the tokens you accept as donation!";case 3:n.forEach((function(t){if(void 0===t.blockchain)throw"You need to set the blockchain you want to receive the donation on!";if(!["ethereum","bsc","polygon"].includes(t.blockchain))throw"You need to set a supported blockchain!";if(void 0===t.token)throw"You need to set the token you want to receive as donation!";if(void 0===t.receiver)throw"You need to set the receiver address that you want to receive the donation!"}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),j1=function(){var t=e(c.mark((function t(e){var n,r,i,o,a,s,u,l,h,d,f,p,m,g,y,b,w,v,M,L,_,N,E,S,x,A;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.amount,r=e.accept,i=e.event,o=e.sent,a=e.succeeded,s=e.validated,u=e.failed,l=e.error,h=e.critical,d=e.style,f=e.whitelist,p=e.blacklist,m=e.providers,g=e.currency,y=e.connected,b=e.closed,w=e.track,v=e.fee,M=e.closable,L=e.integration,_=e.link,N=e.container,E=e.title,S=e.wallet,x=e.document,Bq(),t.prev=2,t.next=5,k1({accept:r});case 5:return A=Rq({style:d,container:N,document:lq(x),closed:b},(function(t){return function(e){return Z.createElement(vq,{errorCallback:l,container:e,unmount:t},Z.createElement(A$,{configuration:{type:"donation",amount:n,accept:r,currency:g,event:i,track:w,fee:v,sent:o,succeeded:a,validated:s,failed:u,blacklist:p,whitelist:f,providers:m,integration:L,link:_,title:E,wallet:S}},Z.createElement(Yq,null,Z.createElement(J,{unmount:t,closable:M},Z.createElement(I1,{container:e,connected:y,unmount:t},Z.createElement(S1,null,Z.createElement(I$,null,Z.createElement(E$,{accept:r},Z.createElement(A1,null,Z.createElement(x1,{document:lq(x)},Z.createElement(a1,{container:e,document:x},Z.createElement(E1,{document:x,container:e}),Z.createElement(YZ,null))))))))))))}})),t.abrupt("return",{unmount:A});case 9:t.prev=9,t.t0=t.catch(2),console.log("critical error",t.t0),null!=h&&h(t.t0);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}(),T1=function(t){var e=Z.useContext(Wq).text;return Z.createElement(dh,{closable:!1,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Payment")),body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomS"},Z.createElement("div",{className:"SkeletonWrapper"},Z.createElement("div",{className:"ButtonPrimary Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))),Z.createElement("div",{className:"TextCenter Opacity05 PaddingTopS"},Z.createElement("strong",null,e)))})},C1=function(t){var e=Z.useContext(V),n=e.open,r=e.close,i=Z.useContext(j$).setNavigator;return Z.createElement(hh,{setNavigator:i,open:n,close:r,start:"Loading",container:t.container,document:t.document,dialogs:{Loading:Z.createElement(T1,null)}})},D1=function(){var t=e(c.mark((function t(e){var n,r,i,o,a,s,u;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.text,r=e.style,i=e.error,o=e.critical,a=e.container,e.before,s=e.document,Bq(),t.prev=2,u=Rq({style:r,container:a,document:lq(s),closed:closed},(function(t){return function(e){return Z.createElement(vq,{errorCallback:i,container:e,unmount:t},Z.createElement(A$,{configuration:{text:n}},Z.createElement(Yq,null,Z.createElement(J,{unmount:t,closable:!1},Z.createElement(S1,null,Z.createElement(C1,{document:s,container:e}),Z.createElement(YZ,null))))))}})),window._depayUnmountLoading=u,t.abrupt("return",{unmount:u});case 8:t.prev=8,t.t0=t.catch(2),console.log("critical error",t.t0),null!=o&&o(t.t0);case 12:case"end":return t.stop()}}),t,null,[[2,8]])})));return function(e){return t.apply(this,arguments)}}(),O1=function(t){var e=Z.useContext(mq).setError,n=Z.useContext(Wq),r=n.message,i=n.endpoint,o=Z.useContext(Wq).recoverSignature,a=Z.useContext(Jq),s=a.wallet,u=a.account;if(!s)return null;null==s||!s.name||s.name;var c=null!=s&&s.logo?s.logo:void 0;"function"!=typeof o&&(o=function(t){var n=t.message,r=t.signature;return new Promise((function(t,o){fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:n,signature:r})}).then((function(n){200==n.status?n.text().then((function(e){t(e)})).catch(e):n.text().then((function(t){e(t||"Recovering login signature failed!")}))}))}))});return Z.createElement(dh,{body:Z.createElement("div",{className:"TextCenter"},c&&Z.createElement("div",{className:"GraphicWrapper PaddingTopS PaddingBottomS"},Z.createElement("img",{className:"Graphic",src:c})),Z.createElement("h1",{className:"LineHeightL Text FontSizeL FontWeightBold PaddingTopS"},"Wallet Login"),Z.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("p",{className:"FontSizeM PaddingLeftM PaddingRightM PaddingBottomS"},'Please click "Log in" and sign the message with your connected wallet.'))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:"ButtonPrimary",onClick:function(){var n;n="function"==typeof r?r(u):r,s.sign(n).then((function(r){o({message:n,signature:r}).then((function(e){t.resolve({account:e,wallet:s})})).catch(e)})).catch((function(t){t&&t.code&&4001==t.code||e(t)}))}},"Log in"))})},z1=function(t){var e=Z.useContext(V),n=e.open,r=e.close;return Z.createElement(hh,{open:n,close:r,start:"SignLogin",container:t.container,document:t.document,dialogs:{SignLogin:Z.createElement(O1,{resolve:t.resolve,userClosedDialog:t.userClosedDialog})}})},P1=["all","xcd","eur","bbd","btn","bnd","xaf","cup","usd","fkp","gip","huf","irr","jmd","aud","lak","lyd","mkd","xof","nzd","omr","pgk","rwf","wst","rsd","sek","tzs","amd","bsd","bam","cve","cny","crc","czk","ern","gel","htg","inr","jod","krw","lbp","mwk","mru","mzn","ang","pen","qar","std","sll","sos","sdg","syp","aoa","awg","bhd","bzd","bwp","bif","kyd","cop","dkk","gtq","hnl","idr","ils","kzt","kwd","lsl","myr","mur","mnt","mmk","ngn","pab","php","ron","sar","sgd","zar","srd","twd","top","vef","dzd","ars","azn","bob","bgn","cad","clp","cdf","dop","fjd","gmd","gyd","isk","iqd","jpy","kpw","chf","mga","mdl","mad","npr","nio","pkr","pyg","shp","scr","sbd","lkr","thb","try","aed","vuv","yer","afn","bdt","brl","khr","kmf","hrk","djf","egp","etb","xpf","ghs","gnf","hkd","xdr","kes","kgs","lrd","mop","mvr","mxn","nad","nok","pln","rub","szl","tjs","ttd","ugx","uyu","vnd","tnd","uah","uzs","tmt","gbp","zmw","byn","bmd","ggp","clf","cuc","imp","jep","svc","xag","zwl"],R1=Z.createContext(),B1=function(t){var e=Z.useContext(Fq),n=e.amountsMissing,r=e.acceptWithAmount,i=e.setMaxRoute,o=d(Z.useState(),2),a=o[0],s=o[1];return Z.useEffect((function(){n?r&&s(r):s(t.accept)}),[n,r]),Z.createElement(R1.Provider,{value:{}},Z.createElement(r1,{accept:a,whitelist:t.whitelist,blacklist:t.blacklist,event:t.event,setMaxRoute:i,fee:t.fee},t.children))},U1=function(t){var e=Z.useContext(Fq),n=e.amountsMissing,r=e.fixedAmount,i=Z.useContext(D$),o=i.slowRouting,a=i.selectedRoute;return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Payment")),alternativeHeaderAction:t.alternativeHeaderAction,body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},n&&!r&&Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"})),Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))),footer:Z.createElement("div",{className:["PaddingTopXS PaddingRightM PaddingLeftM",null==a&&o?"PaddingBottomS":"PaddingBottomM"].join(" ")},Z.createElement("div",{className:"SkeletonWrapper"},Z.createElement("div",{className:"ButtonPrimary Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))),null==a&&o&&Z.createElement("div",{className:"TextCenter Opacity05 PaddingTopS"},Z.createElement("strong",null,"Loading payment options...")))})},Y1=function(t){var e=Z.useContext(Wq),n=e.currencyCode,r=e.recover,i=e.amount,o=e.currency,a=Z.useContext(C$),s=a.payment,u=a.paymentState,c=Z.useContext(Fq),l=c.amount,h=c.amountsMissing,f=c.fixedAmount,p=c.fixedCurrency,m=Z.useContext(Jq).disconnect,g=Z.useContext(i1),y=g.paymentValue,b=g.displayedPaymentValue,w=Z.useContext(uh).navigate,v=d(Z.useState(!1),2),M=v[0],L=v[1],_=null!=i&&i.token?null:n,N=Z.createElement("span",{className:"DropDownWrapper"},Z.createElement("button",{type:"button",onClick:function(){return L(!M)},className:"ButtonCircular",title:"Disconnect connected wallet"},Z.createElement(ZZ,null)),M&&Z.createElement(GZ,{hide:function(){return L(!1)},items:[{label:"Disconnect wallet",action:m}]}));if(null==s||null==r&&null==y)return Z.createElement(U1,{alternativeHeaderAction:N});var E=Ch.findByName(s.blockchain);return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Payment")),alternativeHeaderAction:N,body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},h&&!f&&Z.createElement("div",{className:["Card","initialized"==u?"":"disabled"].join(" "),title:"initialized"==u?"Change amount":void 0,onClick:function(){"initialized"==u&&w("ChangeAmount")}},Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("h4",{className:"CardTitle"},"Amount"),Z.createElement("h2",{className:"CardText"},_&&Z.createElement("div",{className:"TokenAmountRow"},new x$({amount:l.toFixed(2),code:n}).toString()),!_&&Z.createElement("div",{className:"TokenAmountRow"},l)))),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null))),Z.createElement("div",{className:["Card","initialized"==u?"":"disabled"].join(" "),title:"initialized"==u?"Change payment":void 0,onClick:function(){"initialized"==u&&w("ChangePayment")}},Z.createElement("div",{className:"CardImage",title:s.name},Z.createElement(h1,{blockchain:s.blockchain,address:s.token}),Z.createElement("img",{className:"BlockchainLogo small",src:E.logo,alt:E.label,title:E.label})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},h&&!p&&Z.createElement("h4",{className:"CardTitle"},"Payment"),Z.createElement("h2",{className:"CardText"},Z.createElement("div",{className:"TokenAmountRow"},Z.createElement("span",{className:"TokenSymbolCell"},s.symbol),Z.createElement("span",null," "),Z.createElement("span",{className:"TokenAmountCell"},s1(s.amount))),b!="".concat(s.symbol," ").concat(s1(s.amount))&&!(h&&!p)&&!1!==o&&Z.createElement("div",{className:"TokenAmountRow small grey"},Z.createElement("span",{className:"TokenAmountCell"},b))))),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null)))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement(M1,null))})},F1=function(){Z.useContext(C$).transaction;var t=Z.useContext(uh).navigate;return Z.createElement(dh,{stacked:!1,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:Z.createElement("div",{className:"TextCenter"},Z.createElement("div",{className:"GraphicWrapper"},Z.createElement("img",{className:"Graphic",src:gq})),Z.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Tracking payment failed"),Z.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("strong",{className:"FontSizeM"},'Please ensure you are connected to the internet, then click "Try again".'),Z.createElement("div",{className:"PaddingTopS"},Z.createElement("span",null,"If this keeps happening, please report it.")))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:"ButtonPrimary",onClick:function(){t("back")}},"Try again"))})},W1=function(){var t=Z.useContext(O$).continueTryTracking;Z.useContext(C$).transaction;var e=Z.useContext(uh).navigate;return Z.createElement(dh,{stacked:!1,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:Z.createElement("div",{className:"TextCenter"},Z.createElement("div",{className:"GraphicWrapper"},Z.createElement("img",{className:"Graphic",src:gq})),Z.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Tracking payment failed"),Z.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("strong",{className:"FontSizeM"},'Please ensure you are connected to the internet, then click "Try again".'),Z.createElement("div",{className:"PaddingTopS"},Z.createElement("span",null,"If this keeps happening, please report it.")))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:"ButtonPrimary",onClick:function(){t(),e("back")}},"Try again"))})},Q1=function(t){var e=Z.useContext(V),n=e.open,r=e.close,i=Z.useContext(j$).setNavigator;return Z.createElement(hh,{setNavigator:i,open:n,close:r,start:"PaymentOverview",container:t.container,document:t.document,dialogs:{PaymentOverview:Z.createElement(Y1,null),ChangeAmount:Z.createElement(d1,null),ChangePayment:Z.createElement(p1,null),PaymentFailed:Z.createElement(_1,null),WrongNetwork:Z.createElement(N1,null),TrackingFailed:Z.createElement(W1,null),PreTrackingFailed:Z.createElement(F1,null)}})},H1=function(){var t=e(c.mark((function t(e){var n;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.accept,!e.recover){t.next=3;break}return t.abrupt("return");case 3:n.forEach((function(t){if(void 0===t.blockchain)throw"You need to set the blockchain your want to receive the payment on!";if(!["ethereum","bsc","polygon"].includes(t.blockchain))throw"You need to set a supported blockchain!";if(void 0===t.token&&void 0===t.fromToken&&void 0===t.fromAmount&&void 0===t.toToken)throw"You need to set the token you want to receive as payment!";if(void 0===t.token&&void 0!==t.fromToken&&void 0===t.fromAmount&&void 0===t.toToken)throw"You need to set the fromToken, fromAmount and toToken!";if(void 0===t.receiver)throw"You need to set the receiver address that you want to receive the payment!"}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),G1=function(){var t=e(c.mark((function t(e){var n,r,i,o,a,s,u,l,h,d,f,p,m,g,y,b,w,v,M,L,_,N,E,S,x,A;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.accept,r=e.amount,i=e.sent,o=e.succeeded,a=e.validated,s=e.failed,u=e.error,l=e.critical,h=e.style,d=e.whitelist,f=e.blacklist,p=e.providers,m=e.currency,g=e.connected,y=e.closed,b=e.track,w=e.fee,v=e.recover,M=e.closable,L=e.integration,_=e.link,N=e.container,E=e.before,S=e.wallet,x=e.document,Bq(),m&&!P1.includes(m.toLowerCase())&&(m=!1),t.prev=3,t.next=6,H1({accept:n,recover:v});case 6:return"function"==typeof window._depayUnmountLoading&&window._depayUnmountLoading(),A=Rq({style:h,container:N,document:lq(x),closed:y},(function(t){return function(e){return Z.createElement(vq,{errorCallback:u,container:e,unmount:t},Z.createElement(A$,{configuration:{type:"payment",before:E,amount:r,accept:n,currency:m,event:event,sent:i,succeeded:o,validated:a,failed:s,whitelist:d,blacklist:f,providers:p,track:b,fee:w,recover:v,integration:L,link:_,wallet:S}},Z.createElement(Yq,null,Z.createElement(J,{unmount:t,closable:M},Z.createElement(I1,{document:x,container:e,connected:g,unmount:t},Z.createElement(S1,null,Z.createElement(I$,null,Z.createElement(E$,{accept:n},Z.createElement(B1,{accept:n,whitelist:d,blacklist:f,event:event,fee:w},Z.createElement(A1,null,Z.createElement(x1,{document:lq(x)},Z.createElement(P$,{container:e,document:x},Z.createElement(o1,null,Z.createElement(Q1,{document:x,container:e}),Z.createElement(YZ,null))))))))))))))}})),t.abrupt("return",{unmount:A});case 11:t.prev=11,t.t0=t.catch(3),console.log("critical error",t.t0),null!=l&&l(t.t0);case 15:case"end":return t.stop()}}),t,null,[[3,11]])})));return function(e){return t.apply(this,arguments)}}();G1.preload=function(t){var e=t.account,n=t.accept,r=t.whitelist,i=t.blacklist;t.event;var o=t.fee;t1({account:e,accept:n,whitelist:r,blacklist:i,fee:o})};var Z1=Z.createContext(),V1=Z.createContext(),q1=function(t){var e=Z.useContext(C$).payment,n=d(Z.useState(),2),r=n[0],i=n[1],o=d(Z.useState(),2),a=o[0],s=o[1];return Z.useEffect((function(){e&&Promise.all([e.route.toToken.symbol(),e.route.toToken.readable(e.route.toAmount)]).then((function(t){var n=d(t,2),r=n[0],o=n[1];i({address:e.route.toToken.address,symbol:r}),s(o)}))}),[e]),Z.createElement(V1.Provider,{value:{toToken:r,toTokenReadableAmount:a}},t.children)},J1=function(t){var e=Z.useContext(Fq),n=e.acceptWithAmount,r=e.setMaxRoute,i=Z.useContext(Wq).sell,o=Z.useContext(Wq).blacklist;for(var a in null==o&&(o={}),i){var s=i[a];o[a]instanceof Array?o[a].push(s):o[a]=[s]}return Z.createElement(Z1.Provider,{value:{}},Z.createElement(r1,{accept:n,blacklist:o,setMaxRoute:r},Z.createElement(P$,{container:t.container,document:t.document},Z.createElement(o1,null,Z.createElement(q1,null,t.children)))))},K1=function(t){return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Purchase")),body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},Z.createElement("div",{className:"Card Skeleton",style:{height:"100px"}},Z.createElement("div",{className:"SkeletonBackground"})),Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("div",{className:"SkeletonWrapper"},Z.createElement("div",{className:"ButtonPrimary Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))))})},X1=function(t){Z.useContext(Fq).amount;var e,n=Z.useContext(Wq),r=n.tokenImage,i=n.amount,o=Z.useContext(i1).paymentValue,a=Z.useContext(C$),s=a.payment,u=a.paymentState,c=Z.useContext(uh).navigate,l=Z.useContext(V1),h=l.toToken,f=l.toTokenReadableAmount,p=d(Z.useState(),2),m=p[0],g=p[1];if(Z.useEffect((function(){if(o&&(null==i||1!=i.token)&&f){var t=o.amount/parseFloat(f),e=new x$({amount:t,code:o.code}).toString();e!=new x$({amount:0,code:o.code}).toString()&&g(e)}}),[o,f]),null==h||null==f||null==s||null==o)return Z.createElement(K1,null);e=r?Z.createElement("img",{src:r}):Z.createElement(h1,{blockchain:s.route.blockchain,address:h.address});var y=Ch.findByName(s.blockchain);return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Purchase")),body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},Z.createElement("div",{className:["Card","initialized"==u?"":"disabled"].join(" "),title:"initialized"==u?"Change amount":void 0,onClick:function(){"initialized"==u&&c("ChangeAmount")}},Z.createElement("div",{className:"CardImage",title:s.name},e,Z.createElement("img",{className:"BlockchainLogo small",src:y.logo,alt:y.label,title:y.label})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("h4",{className:"CardTitle"},"Amount"),Z.createElement("h2",{className:"CardText"},Z.createElement("div",{className:"TokenAmountRow"},Z.createElement("span",{className:"TokenSymbolCell"},h.symbol),Z.createElement("span",null," "),Z.createElement("span",{className:"TokenAmountCell"},s1(f)))),m&&Z.createElement("h3",{className:"CardText small"},Z.createElement("small",null,m," per token")))),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null))),Z.createElement("div",{className:["Card","initialized"==u?"":"disabled"].join(" "),title:"initialized"==u?"Change payment":void 0,onClick:function(){"initialized"==u&&c("ChangePayment")}},Z.createElement("div",{className:"CardImage",title:s.name},Z.createElement(h1,{blockchain:s.route.blockchain,address:s.token})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("h4",{className:"CardTitle"},"Payment"),Z.createElement("h2",{className:"CardText"},Z.createElement("div",{className:"TokenAmountRow"},Z.createElement("span",{className:"TokenSymbolCell"},s.symbol),Z.createElement("span",null," "),Z.createElement("span",{className:"TokenAmountCell"},s1(s.amount)))))),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null)))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement(M1,null))})},$1=function(t){var e=Z.useContext(V),n=e.open,r=e.close,i=Z.useContext(j$).setNavigator;return Z.createElement(hh,{setNavigator:i,open:n,close:r,start:"SaleOverview",container:t.container,document:t.document,dialogs:{SaleOverview:Z.createElement(X1,null),ChangeAmount:Z.createElement(d1,null),ChangePayment:Z.createElement(p1,null),NoPaymentMethodFound:Z.createElement(T$,null),PaymentFailed:Z.createElement(_1,null),WrongNetwork:Z.createElement(N1,null)}})},t2=function(){var t=e(c.mark((function t(e){var r;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("object"==n(r=e.sell)){t.next=3;break}throw'You need to configure at least 1 "blockchain": "token"';case 3:if(0!=Object.keys(r).length){t.next=5;break}throw'You need to configure at least 1 "blockchain": "token"';case 5:if(0!=Object.values(r).length){t.next=7;break}throw'You need to configure at least 1 "blockchain": "token"';case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e2=function(){var t=e(c.mark((function t(e){var n,r,i,o,a,s,u,l,h,d,f,p,m,g,y,b,w,v,M,L;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.amount,r=e.sell,i=e.sent,o=e.succeeded,a=e.failed,s=e.error,u=e.critical,l=e.style,h=e.blacklist,d=e.providers,f=e.currency,p=e.connected,m=e.closed,g=e.tokenImage,y=e.closable,b=e.integration,w=e.wallet,v=e.document,Bq(),t.prev=2,t.next=5,t2({sell:r});case 5:return M=Object.keys(r).map((function(t){return{blockchain:t,token:r[t]}})),L=Rq({style:l,document:lq(v),closed:m},(function(t){return function(e){return Z.createElement(vq,{errorCallback:s,container:e,unmount:t},Z.createElement(A$,{configuration:{type:"sale",tokenImage:g,amount:n,sell:r,currency:f,sent:i,succeeded:o,failed:a,blacklist:h,providers:d,integration:b,wallet:w}},Z.createElement(Yq,null,Z.createElement(J,{unmount:t,closable:y},Z.createElement(I1,{container:e,connected:p,unmount:t},Z.createElement(S1,null,Z.createElement(I$,null,Z.createElement(E$,{accept:M},Z.createElement(A1,null,Z.createElement(x1,{document:lq(v)},Z.createElement(J1,{container:e,document:v},Z.createElement($1,{document:v,container:e}),Z.createElement(YZ,null))))))))))))}})),t.abrupt("return",{unmount:L});case 10:t.prev=10,t.t0=t.catch(2),console.log("critical error",t.t0),null!=u&&u(t.t0);case 14:case"end":return t.stop()}}),t,null,[[2,10]])})));return function(e){return t.apply(this,arguments)}}();function n2(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(void 0===t)return t;var n="";return n+=t.slice(0,e+2),n+="...",n+=t.slice(t.length-e,t.length)}var r2=function(t){var e,n,r,i,o;return o=Math.floor(t/1e3),i=Math.floor(o/60),o%=60,r=Math.floor(i/60),i%=60,n=Math.floor(r/24),r%=24,e=Math.floor(n/30),n%=30,{year:Math.floor(e/12),month:e%=12,day:n,hour:r,minute:i,second:o}};function i2(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o2(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i2(Object(n),!0).forEach((function(e){HZ(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i2(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var a2=function(t){var e,n,r=Z.useContext(FZ),i=r.selection;r.setSelection;var o,a,s=Z.useContext(V).setOpen,u=Z.useContext(uh).navigate;i.nft.createdAt&&(o=[(o=r2(new Date-new Date(i.nft.createdAt))).year&&o.year>=1?o.year>=2?"".concat(o.year," years"):"1 year":void 0,o.month&&o.month>=1?o.month>=2?"".concat(o.month," months"):"1 month":void 0,o.day&&o.day>=1&&o.month<=1&&o.year<1?o.day>=2?"".concat(o.day," days !!!"):"1 day !!!":void 0].filter((function(t){return t})).join(" ")),i.nft.holders&&(a=i.nft.holders>1e6?"Millions":i.nft.holders>1e5?"Hundreds of Thousands":i.nft.holders>2e3?"Thousands":i.nft.holders>100?"Hundreds":"Only a Few!!!");var c=(null===(e=i.nft)||void 0===e?void 0:e.blockchain)||(null===(n=i.blockchain)||void 0===n?void 0:n.name);if(null==c)return u("SelectBlockchain"),null;return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("div",null,Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Confirm Selection"))),stacked:!0,body:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("div",{className:"TokenImage medium TextCenter"},i.nft.image&&Z.createElement("img",{src:i.nft.image})),Z.createElement("div",{className:"PaddingTopS TextCenter"},Z.createElement("div",{className:"Alert FontSizeS"},Z.createElement("strong",null,"Please review this information"))),Z.createElement("div",{className:"PaddingTopXS"},Z.createElement("table",{className:"Table TextLeft FontSizeS"},Z.createElement("tbody",null,Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Address")),Z.createElement("td",null,Z.createElement("div",null,Z.createElement("a",{className:"Link",title:i.nft.address,href:Ch.findByName(c).explorerUrlFor({token:i.nft.address}),target:"_blank",rel:"noopener noreferrer"},n2(i.nft.address,6))))),i.nft.id&&Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Token ID")),Z.createElement("td",null,Z.createElement("div",null,i.nft.id))),Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Blockchain")),Z.createElement("td",null,Z.createElement("div",null,Ch.findByName(c).label))),Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Name")),Z.createElement("td",null,Z.createElement("a",{className:"Link",href:i.nft.link,target:"_blank",rel:"noopener noreferrer"},i.nft.name))),o&&Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Age")),Z.createElement("td",null,Z.createElement("div",null,o))),a&&Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Holders")),Z.createElement("td",null,Z.createElement("div",null,a))))))),footer:Z.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomS"},Z.createElement("button",{className:"ButtonPrimary",onClick:function(){s(!1),t.resolve(o2(o2({},i.nft),{},{blockchain:c})),setTimeout(t.unmount,300)}},"Confirm"))})},s2="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iNjMuMjUwODg5bW0iIGhlaWdodD0iNjMuMjUwODg5bW0iIHZpZXdCb3g9IjAgMCA2My4yNTA4ODYgNjMuMjUwODg4Ij4KICA8ZyBmaWxsPSJub25lIiB0cmFuc2Zvcm09InNjYWxlKC42MzI1KSI+CiAgICA8cGF0aCBmaWxsPSIjMjA4MWUyIiBkPSJNMTAwIDUwYzAgMjcuNjEyNy0yMi4zODczIDUwLTUwIDUwUzAgNzcuNjEyNyAwIDUwIDIyLjM4NzMgMCA1MCAwYzI3LjYxODUgMCA1MCAyMi4zODczIDUwIDUweiIvPgogICAgPHBhdGggZmlsbD0iI2ZmZiIgZD0ibTI0LjY2NzkgNTEuNjgwMS4yMTU3LS4zMzk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2NS0uNDQ2OS40Njc0LS42NTI0LjY3MjktLjM0NDEuMzQ0Mi0uNjMxOC42MTEzLS44NzMzLjgzMjJsLS41NjUuNTE4OWMtLjA4MjIuMDcxOS0uMTkwMS4xMTMtLjMwMzEuMTEzaC00LjM3Njh2NS42MTQ4aDUuNTA2OWMxLjIzMjkgMCAyLjQwNDItLjQzNjcgMy4zNDk0LTEuMjM4MS4zMjM2LS4yODI1IDEuNzM2My0xLjUwNTEgMy40MDU4LTMuMzQ5My4wNTY1LS4wNjE3LjEyODUtLjEwNzkuMjEwNy0uMTI4NGwxNS4yMTA3LTQuMzk3M2MuMjgyNi0uMDgyMi41NzAyLjEzMzUuNTcwMi40MzE1eiIvPgogIDwvZz4KPC9zdmc+",u2=function(t){var n,r,i,o,a,s,u=Z.useContext(uh).navigate,l=Z.useContext(FZ),h=l.selection,f=l.setSelection,p=d(Z.useState(""),2),m=p[0],g=p[1],y=d(Z.useState(""),2),b=y[0],w=y[1],v=d(Z.useState(""),2),M=v[0],L=v[1],_=d(Z.useState(""),2),N=_[0],E=_[1],S=d(Z.useState(!1),2),x=S[0],A=S[1];return Z.useEffect((function(){var t,n,r=(null==h||null===(t=h.blockchain)||void 0===t?void 0:t.name)||(null==h?void 0:h.blockchain)||(null==h||null===(n=h.collection)||void 0===n?void 0:n.blockchain),i=function(){var t=e(c.mark((function t(){var e;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r){t.next=10;break}return t.prev=1,t.next=4,RG({blockchain:r,address:h.nft.address,method:"balanceOf",api:aX[r][1155],params:["0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02","1"]});case 4:e=t.sent,t.next=9;break;case 7:t.prev=7,t.t0=t.catch(1);case 9:e&&A(!0);case 10:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(){return t.apply(this,arguments)}}();i()}),[h.blockchain]),Z.createElement(dh,{stacked:!0,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("div",null,Z.createElement("div",{className:"LineHeightL FontSizeL PaddingTopXS"},Z.createElement("span",{className:"CardImage small"},Z.createElement("img",{className:"transparent",src:s2}))))),body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM"},Z.createElement("div",null,Z.createElement("div",{className:"PaddingTopXS TextLeft"},Z.createElement("label",{htmlFor:"DePayWidgetsEnterNFTBlockchain"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Select Blockchain"))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS"},Z.createElement("div",{className:"Card small",onClick:function(){return u("SelectBlockchain")}},Z.createElement("div",{className:"CardImage small"},Z.createElement("img",{className:"transparent",src:null===(n=Ch.findByName((null==h||null===(r=h.blockchain)||void 0===r?void 0:r.name)||(null==h?void 0:h.blockchain)||(null==h||null===(i=h.collection)||void 0===i?void 0:i.blockchain)))||void 0===n?void 0:n.logo})),Z.createElement("div",{className:"CardBody FontSizeM"},null===(o=Ch.findByName((null==h||null===(a=h.blockchain)||void 0===a?void 0:a.name)||(null==h?void 0:h.blockchain)||(null==h||null===(s=h.collection)||void 0===s?void 0:s.blockchain)))||void 0===o?void 0:o.label),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null))))),x&&Z.createElement("div",null,Z.createElement("div",{className:"PaddingTopXS TextLeft"},Z.createElement("label",{htmlFor:"DePayWidgetsEnterNFTTokenId"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Enter Token ID"))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},Z.createElement("input",{id:"DePayWidgetsEnterNFTTokenId",name:"DePayWidgetsEnterNFTTokenId",value:m,onChange:function(t){return g(t.target.value)},className:"Search"}))),Z.createElement("div",null,Z.createElement("div",{className:"PaddingTopXS TextLeft"},Z.createElement("label",{htmlFor:"DePayWidgetsEnterNFTName"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Enter NFT Name"))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},Z.createElement("input",{id:"DePayWidgetsEnterNFTName",name:"DePayWidgetsEnterNFTName",value:N,onChange:function(t){return E(t.target.value)},placeholder:"CryptoPunks",className:"Search"}))),Z.createElement("div",null,Z.createElement("div",{className:"PaddingTopXS TextLeft"},Z.createElement("label",{htmlFor:"DePayWidgetsEnterNFTImage"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Enter Image URL"))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},Z.createElement("input",{id:"DePayWidgetsEnterNFTImage",name:"DePayWidgetsEnterNFTImage",value:b,onChange:function(t){return w(t.target.value)},placeholder:"https://i.seadn.io/gae/BdxvLseXcfl57BiuQcQYdJ64v-aI8din7WPk0Pgo3qQFhAUH-B6i-dCqqc_mCkRIzULmwzwecnohLhrcH8A9mpWIZqA7ygc52Sr81hE?auto=format&w=128",className:"Search"}))),Z.createElement("div",null,Z.createElement("div",{className:"PaddingTopXS TextLeft"},Z.createElement("label",{htmlFor:"DePayWidgetsEnterNFTLink"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Enter Link URL"))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},Z.createElement("input",{id:"DePayWidgetsEnterNFTLink",name:"DePayWidgetsEnterNFTLink",value:M,onChange:function(t){return L(t.target.value)},placeholder:"https://opensea.io/collection/cryptopunks",className:"Search"})))),footer:Z.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:["ButtonPrimary",b.length&&M.length&&N.length&&(!x||m.length)?"":"disabled"].join(" "),onClick:function(){b.length&&M.length&&N.length&&(!x||m.length)&&function(){var e,n,r=(null==h||null===(e=h.blockchain)||void 0===e?void 0:e.name)||(null==h?void 0:h.blockchain)||(null==h||null===(n=h.collection)||void 0===n?void 0:n.blockchain);f(Object.assign(t.selection,{nft:{blockchain:r,id:m,image:b,name:N,link:M,address:h.nft.address,type:x?"1155":"721"}})),u("ConfirmNFTSelection")}()}},"Continue"))})},c2={ethereum:"ethereum",matic:"polygon,"},l2=function(t){var n,r=Z.useContext(uh).navigate,i=d(Z.useState(""),2),o=i[0],a=i[1],s=d(Z.useState(!1),2),u=s[0],l=s[1],h=d(Z.useState([]),2),f=h[0],p=h[1],m=Z.useContext(FZ).setSelection,g=function(e){m(Object.assign(t.selection,{nft:e})),r("ConfirmNFTSelection")},y=function(t){return new Promise((function(e,n){fetch("https://api.opensea.io/api/v1/assets?asset_contract_address=".concat(t)).then((function(t){if(200!=t.status)return e();t.json().then((function(t){return e(t.assets?t.assets[0]:void 0)})).catch((function(){return e()}))})).catch((function(){return e()}))}))},b=Z.useCallback(Kq.debounce((function(n){fetch("https://api.opensea.io/api/v1/asset_contract/".concat(n)).then((function(i){200==i.status?i.json().then(function(){var i=e(c.mark((function e(i){var o,s,u,h,d,f,b,w,v,M;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("non-fungible"!=i.asset_contract_type){e.next=8;break}return e.next=3,y(n);case 3:(h=e.sent)&&(s=null!=h&&h.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?c2[h.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0,u=null==h||null===(d=h.collection)||void 0===d||null===(f=d.stats)||void 0===f?void 0:f.num_owners),o={blockchain:s,holders:u,createdAt:i.created_date,image:i.image_url,name:i.collection?i.collection.name:void 0,link:i.collection?"https://opensea.io/collection/".concat(i.collection.slug):void 0,address:Mp(i.address),type:"721"},e.next=22;break;case 8:if("semi-fungible"!=i.asset_contract_type){e.next=21;break}if("OPENSTORE"!=i.symbol||"OpenSea Collection"!=i.name){e.next=13;break}o={id:null,address:Mp(i.address),type:"1155"},e.next=19;break;case 13:return e.next=15,y(n);case 15:v=e.sent,M=null!=v&&v.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?c2[v.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0,null==v||null===(b=v.collection)||void 0===b||null===(w=b.stats)||void 0===w||w.num_owners,o={blockchain:M,id:null,createdAt:i.created_date,image:i.image_url,name:i.collection?i.collection.name:void 0,link:i.collection?"https://opensea.io/collection/".concat(i.collection.slug):void 0,address:Mp(i.address),type:"1155"};case 19:e.next=22;break;case 21:i.address&&(o={address:Mp(i.address)});case 22:o&&(null==o.type?(m(Object.assign(t.selection,{nft:o,blockchain:o.blockchain||"polygon"})),r("EnterNFTDataForOpenSea"),a("")):null!==o.id?(g(o),p([o]),r("ConfirmNFTSelection")):(m(Object.assign(t.selection,{nft:o})),r("SelectNFTIdOnOpenSea"),a(""))),l(!1);case 24:case"end":return e.stop()}}),e)})));return function(t){return i.apply(this,arguments)}}()).catch((function(){l(!1)})):l(!1)})).catch((function(){l(!1)}))}),500),[]);return n=u?[Z.createElement("div",{className:"SkeletonWrapper",key:"loading"},Z.createElement("div",{className:"Skeleton",style:{height:"69px",width:"100%"}},Z.createElement("div",{className:"SkeletonBackground"})))]:f.map((function(t,e){return Z.createElement("div",{key:e,className:"Card Row",onClick:function(){return g(t)}},Z.createElement("div",{className:"CardImage"},Z.createElement("img",{src:t.image})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardTokenFullName",title:t.name},Z.createElement("span",{className:"CardText"},t.name))))})),Z.createElement(dh,{stacked:!0,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("div",null,Z.createElement("div",{className:"LineHeightL FontSizeL PaddingTopXS"},Z.createElement("span",{className:"CardImage small"},Z.createElement("img",{className:"transparent",src:s2})))),Z.createElement("div",{className:"PaddingTopS PaddingBottomXS TextLeft"},Z.createElement("label",{htmlFor:"DePayWidgetsEnterContractAddress"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Enter contract address"))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},Z.createElement("input",{id:"DePayWidgetsEnterContractAddress",name:"DePayWidgetsEnterContractAddress",value:o,onChange:function(t){l(!0),p([]);var e=t.target.value;a(e),e&&e.length?b(e):l(!1)},className:"Search",autoFocus:!0,placeholder:"0x495f947276749ce646f68ac8c248420045cb7b5e"}))),bodyClassName:"ScrollHeight",body:Z.createElement("div",null,n)})};function h2(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d2(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h2(Object(n),!0).forEach((function(e){HZ(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h2(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var f2={ethereum:"ethereum",matic:"polygon,"},p2=function(t){var n,r=Z.useContext(uh).navigate,i=d(Z.useState(""),2),o=i[0],a=i[1],s=d(Z.useState(!1),2),u=s[0],l=s[1],h=d(Z.useState([]),2),f=h[0],p=h[1],m=Z.useContext(FZ),g=m.selection,y=m.setSelection,b=function(e){y(Object.assign(t.selection,{nft:e})),r("ConfirmNFTSelection")},w=Z.useCallback(Kq.debounce((function(t){fetch("https://api.opensea.io/api/v1/asset/".concat(g.nft.address,"/").concat(t)).then((function(t){if(200!=t.status)return resolve();t.json().then(function(){var t=e(c.mark((function t(e){var n,r;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=null!=e&&e.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?f2[e.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0,r=d2(d2({},g.nft),{},{blockchain:n,id:e.token_id,image:e.image_url,name:e.name,link:e.permalink}),p([r]),b(r),l(!1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(){l(!1)}))})).catch((function(){l(!1)}))}),500),[]);return Z.useEffect((function(){fetch("https://api.opensea.io/api/v1/assets?asset_contract_address=".concat(g.nft.address)).then((function(t){if(200!=t.status)return resolve();t.json().then((function(t){if(t.assets.length<=6){var e=t.assets.map((function(t){var e=null!=t&&t.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?f2[t.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0;return d2(d2({},g.nft),{},{blockchain:e,id:t.token_id,image:t.image_url,name:t.name,link:t.permalink})}));p(e),1==e.length&&b(e[0])}}))}))}),[]),n=u?[Z.createElement("div",{className:"SkeletonWrapper",key:"loading"},Z.createElement("div",{className:"Skeleton",style:{height:"69px",width:"100%"}},Z.createElement("div",{className:"SkeletonBackground"})))]:f.map((function(t,e){return Z.createElement("div",{key:e,className:"Card Row",onClick:function(){return b(t)}},Z.createElement("div",{className:"CardImage"},Z.createElement("img",{src:t.image})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardTokenFullName",title:t.name},Z.createElement("span",{className:"CardText"},t.name))))})),Z.createElement(dh,{stacked:!0,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("div",null,Z.createElement("div",{className:"LineHeightL FontSizeL PaddingTopXS"},Z.createElement("span",{className:"CardImage small"},Z.createElement("img",{className:"transparent",src:s2})))),Z.createElement("div",{className:"PaddingTopS PaddingBottomXS TextLeft"},Z.createElement("label",{htmlFor:"DePayWidgetsEnterCollectionId"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Enter Token ID"))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},Z.createElement("input",{id:"DePayWidgetsEnterCollectionId",name:"DePayWidgetsEnterCollectionId",value:o,onChange:function(t){l(!0),p([]);var e=t.target.value;a(e),e&&e.length?w(e):l(!1)},className:"Search",placeholder:"35347623114821255323888368639026081793120226253597860997754787918389704654849"}))),bodyClassName:"ScrollHeight",body:Z.createElement("div",null,n)})},m2=function(t){var e=Z.useContext(uh).navigate,n=[{name:"OpenSea",navigate:"SelectNFTContractOnOpenSea",logo:s2}].map((function(t,n){return Z.createElement("div",{key:n,className:"Card Row",onClick:function(){return function(t){e(t.navigate)}(t)}},Z.createElement("div",{className:"CardImage"},Z.createElement("img",{src:t.logo})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardTokenSymbol",title:t.name},Z.createElement("span",{className:"CardText"},t.name)),Z.createElement("div",{className:"CardTokenName PaddingTopXS"},Z.createElement(m1,null))))}));return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("div",null,Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Select NFT")),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Choose which marketplace"))),bodyClassName:"ScrollHeight",body:Z.createElement("div",{className:""},n)})},g2=function(t){Z.useContext(Wq).what;var e=Z.useContext(V),n=e.open,r=e.close,i=Z.useContext(FZ),o=i.selection;i.setSelection;var a=d(Z.useState(),2);a[0];var s,u=a[1];return s="SelectMarketplace",Z.createElement(hh,{open:n,close:r,start:s,container:t.container,document:t.document,setNavigator:function(t){u(t)},dialogs:{SelectMarketplace:Z.createElement(m2,{selection:o,resolve:t.resolve,unmount:t.unmount}),SelectNFTContractOnOpenSea:Z.createElement(l2,{selection:o,resolve:t.resolve,unmount:t.unmount}),SelectNFTIdOnOpenSea:Z.createElement(p2,{selection:o,resolve:t.resolve,unmount:t.unmount}),EnterNFTDataForOpenSea:Z.createElement(u2,{selection:o,resolve:t.resolve,unmount:t.unmount}),SelectBlockchain:Z.createElement(WZ,{selection:o,stacked:!0,resolve:t.resolve,unmount:t.unmount}),ConfirmNFTSelection:Z.createElement(a2,{selection:o,resolve:t.resolve,unmount:t.unmount})}})},y2=function(t){var e=Z.useContext(FZ).selection,n=Z.useContext(V).setOpen,r=e.token,i=r.address||r.external_id,o=r.logo||r.image,a=Ch.findByName(r.blockchain),s=r.first_transfer?r2(new Date-new Date(r.first_transfer)):void 0;s&&(s=[s.year&&s.year>=1?s.year>=2?"".concat(s.year," years"):"1 year":void 0,s.month&&s.month>=1?s.month>=2?"".concat(s.month," months"):"1 month":void 0,s.day&&s.day>=1&&s.month<=1&&s.year<1?s.day>=2?"".concat(s.day," days !!!"):"1 day !!!":void 0].filter((function(t){return t})).join(" "));var u=r.unique_senders?r.unique_senders:void 0;u&&(u=u>1e6?"Millions":u>1e5?"Hundreds of Thousands":u>2e3?"Thousands":u>100?"Hundreds":"Only a Few!!!");return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("div",null,Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Confirm Selection"))),stacked:!0,body:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("div",{className:"TokenImage medium TextCenter"},o&&Z.createElement("img",{src:o}),!o&&Z.createElement(h1,{blockchain:r.blockchain,address:i})),Z.createElement("div",{className:"PaddingTopS TextCenter"},Z.createElement("div",{className:"Alert FontSizeS"},Z.createElement("strong",null,"Please review this information"))),Z.createElement("div",{className:"PaddingTopXS"},Z.createElement("table",{className:"Table TextLeft FontSizeS"},Z.createElement("tbody",null,Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Address")),Z.createElement("td",null,Z.createElement("div",null,Z.createElement("a",{className:"Link",title:i,href:a.explorerUrlFor({token:i}),target:"_blank",rel:"noopener noreferrer"},n2(i,8))))),Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Blockchain")),Z.createElement("td",null,Z.createElement("div",null,a.label))),Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Symbol")),Z.createElement("td",null,Z.createElement("div",null,r.symbol))),Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Name")),Z.createElement("td",null,Z.createElement("div",null,r.name))),s&&Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Age")),Z.createElement("td",null,Z.createElement("div",null,s))),u&&Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Holders")),Z.createElement("td",null,Z.createElement("div",null,u))))))),footer:Z.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomS"},Z.createElement("button",{className:"ButtonPrimary",onClick:function(){n(!1),t.resolve({blockchain:r.blockchain,address:r.external_id||r.address,symbol:r.symbol,name:r.name,decimals:r.decimals,logo:r.image||r.logo,routable:r.routable}),setTimeout(t.unmount,300)}},"Confirm"))})},b2=function(t){var e=Z.useContext(uh).navigate,n=Z.useContext(V).setOpen,r=Z.useContext(FZ).setSelection,i=d(Z.useState(!1),2),o=i[0],a=i[1],s=d(Z.useState(""),2),u=s[0],c=s[1],l=d(Z.useState(),2),h=l[0],f=l[1],p=d(Z.useState(!1),2),m=p[0],g=p[1],y=d(Z.useState([]),2),b=y[0],w=y[1],v=d(Z.useState(),2);v[0],v[1];var M=Z.useRef(),L=RZ()[0],_=function(e){var n=Ch.findByName(e);f(n),r(Object.assign(t.selection,{blockchain:n,token:void 0})),w(n.tokens)};Z.useEffect((function(){L?L.connectedTo().then((function(t){var e=Ch.findByName(t);window._depay_token_selection_selected_blockchain?_(window._depay_token_selection_selected_blockchain):t&&t.length&&e&&e.tokens&&e.tokens.length?_(t):_("ethereum")})).catch((function(){return _("ethereum")})):_("ethereum")}),[]),Z.useEffect((function(){t.selection.blockchain&&(f(t.selection.blockchain),w(t.selection.blockchain.tokens),M.current&&(M.current.value="",M.current.focus()))}),[t.selection,t.selection.blockchain]);var N,E=Z.useCallback(Kq.debounce((function(t,e){fetch("https://public.depay.com/tokens/search?blockchain=".concat(e,"&term=").concat(t)).then((function(t){200==t.status?t.json().then((function(t){w(t),a(!1)})).catch((function(){return reject})):reject()})).catch((function(){return reject}))}),500),[]);return N=o?[Z.createElement("div",{className:"SkeletonWrapper",key:"loading"},Z.createElement("div",{className:"Skeleton",style:{height:"69px",width:"100%"}},Z.createElement("div",{className:"SkeletonBackground"})))]:b.map((function(i,o){return Z.createElement("div",{key:"".concat(o,"-").concat(i.address),className:"Card Row",onClick:function(){return function(i){i.address&&(i.address=Mp(i.address)),i.external_id&&(i.external_id=Mp(i.external_id)),h.tokens.find((function(t){return t.address==(i.address||i.external_id)}))?(n(!1),t.resolve({blockchain:h.name,address:i.address||i.external_id,logo:i.logo||i.image,name:i.name,symbol:i.symbol,decimals:i.decimals,routable:!0}),setTimeout(t.unmount,300)):(r(Object.assign(t.selection,{token:i})),e("ConfirmTokenSelection"))}(i)}},Z.createElement("div",{className:"CardImage"},i.logo&&Z.createElement("img",{src:i.logo}),i.image&&Z.createElement("img",{src:i.image}),!(i.logo||i.image)&&Z.createElement(h1,{blockchain:i.blockchain,address:i.external_id||i.address})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardTokenSymbol",title:i.symbol},Z.createElement("span",{className:"CardText"},i.symbol)),Z.createElement("div",{className:"CardTokenName",title:i.name},Z.createElement("span",{className:"CardText"},i.name))))})),null==h?null:Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("div",null,Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Select Token")),Z.createElement("div",{className:"PaddingTopS PaddingBottomXS"},Z.createElement("div",{className:"Card small",onClick:function(){e("SelectBlockchain")}},Z.createElement("div",{className:"CardImage small"},Z.createElement("img",{className:"transparent",src:h.logo})),Z.createElement("div",{className:"CardBody FontSizeM"},h.label),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null)))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS"},Z.createElement("input",{value:u,onBlur:function(){return g(!1)},onChange:function(t){g(!1),a(!0);var e=t.target.value;if(c(e),e.match(/^0x/)){var n;w([]);try{n=new aX({blockchain:h.name,address:e})}catch(t){}if(null==n)return void a(!1);Promise.all([n.name(),n.symbol(),n.decimals(),fetch("https://public.depay.com/tokens/routable/".concat(h.name,"/").concat(e)).then((function(t){if(200==t.status)return t.json()}))]).then((function(t){var n=d(t,4),r=n[0],i=n[1],o=n[2],s=n[3];w([{name:r,symbol:i,decimals:o,address:e,blockchain:h.name,routable:!!s}]),a(!1)}))}else e&&e.length?(w([]),E(e,h.name)):(w(h.tokens),a(!1))},className:"Search",autoFocus:!0,placeholder:"Search name or paste address",ref:M}),m&&Z.createElement("div",{className:"PaddingTopXS PaddingRightXS PaddingLeftXS"},Z.createElement("div",{className:"Tooltip"},Z.createElement("span",{className:"TooltipArrowUp"}),"Enter token address here")))),bodyClassName:"ScrollHeight",body:Z.createElement("div",{className:""},N),footer:Z.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomS"},Z.createElement("div",{className:"PaddingTopXS PaddingBottomXS"},Z.createElement("div",{className:"Link FontSizeS",onClick:function(){g(!0),M.current&&(M.current.value="",M.current.focus())}},"Token missing? Add it.")))})},w2=function(t){Z.useContext(Wq).what;var e,n=Z.useContext(V),r=n.open,i=n.close,o=Z.useContext(FZ).selection;return e="SelectToken",Z.createElement(hh,{open:r,close:i,start:e,container:t.container,document:t.document,dialogs:{SelectToken:Z.createElement(b2,{selection:o,resolve:t.resolve,unmount:t.unmount}),SelectBlockchain:Z.createElement(WZ,{selection:o,resolve:t.resolve}),ConfirmTokenSelection:Z.createElement(y2,{selection:o,resolve:t.resolve,unmount:t.unmount})}})},v2={Connect:function(t){var r,i,o;return Bq(),"object"==n(t)&&(r=t.style,i=t.error,o=t.document),new Promise(function(){var t=e(c.mark((function t(e,n){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Rq({style:r,document:lq(o)},(function(t){var r=function(){n("USER_CLOSED_DIALOG"),t()};return function(a){return Z.createElement(vq,{errorCallback:i,container:a,unmount:t},Z.createElement(Yq,null,Z.createElement(J,{unmount:r},Z.createElement(Uq,null,Z.createElement(cq,{document:o,container:a,resolve:e,reject:n,autoClose:!0}),Z.createElement(YZ,null)))))}}));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())},Donation:j1,Login:function(t){var r,i,o,a,s,u,l;return Bq(),"object"==n(t)&&(r=t.style,i=t.error,o=t.document,a=t.message,s=t.endpoint,u=t.recover,l=t.wallet),new Promise(function(){var t=e(c.mark((function t(e,n){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Rq({style:r,document:lq(o)},(function(t){var r=function(){n("USER_CLOSED_DIALOG"),t()};return function(n){return Z.createElement(vq,{errorCallback:i,container:n,unmount:t},Z.createElement(A$,{configuration:{message:a,endpoint:s||"/login",recoverSignature:u,wallet:l}},Z.createElement(Yq,null,Z.createElement(J,{unmount:r},Z.createElement(I1,{container:n,unmount:t},Z.createElement(z1,{document:o,container:n,resolve:function(n){var r=n.account,i=n.wallet;t(),e({account:r,wallet:i})}}),Z.createElement(YZ,null))))))}}));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())},Payment:G1,Sale:e2,Select:function(t){var r,i,o,a,s;return Bq(),"object"==n(t)&&(r=t.style,i=t.error,o=t.document,a=t.what),null==a?s='"what" needs to be configured!':["token","nft"].indexOf(a)<0&&(s='Unknown "what" configured: '.concat(a,"!")),new Promise(function(){var t=e(c.mark((function t(e,n){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Rq({style:r,document:lq(o)},(function(t){var r=function(){n("USER_CLOSED_DIALOG"),t()};return function(n){return Z.createElement(vq,{error:s,errorCallback:i,container:n,unmount:t},Z.createElement(A$,{configuration:{what:a}},Z.createElement(Yq,null,Z.createElement(J,{unmount:r},Z.createElement(Uq,null,"token"==a&&Z.createElement(w2,{document:o,container:n,unmount:t,resolve:e}),"nft"==a&&Z.createElement(g2,{document:o,container:n,unmount:t,resolve:e})),Z.createElement(YZ,null)))))}}));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())},Loading:D1};export{v2 as default};
|
|
175
|
+
*/var tq="undefined"!=typeof document?Z.useLayoutEffect:Z.useEffect;function eq(t){return function(t){var e=Z.useReducer((function(){return{}}),{})[1],n=FV({},t,{onChange:function(n){e(),null==t.onChange||t.onChange(n)}}),r=Z.useState((function(){return new XV(n)}))[0];return r.setOptions(n),Z.useEffect((function(){return r._didMount()}),[]),tq((function(){return r._willUpdate()})),r}(FV({observeElementRect:VV,observeElementOffset:qV,scrollToFn:KV},t))}function nq(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var rq=function(t){var e=Z.useRef(),n=new YV(K,{keys:["name"],threshold:.3,ignoreFieldNorm:!0}),r=d(Z.useState(K),2),i=r[0],o=r[1],a=eq({count:i.length,getScrollElement:function(){return e.current},estimateSize:function(){return 61}});return Z.useEffect((function(){var r=n.search(t.searchTerm).map((function(t){return t.item}));e.current&&e.current.scrollTo(0,0),t.searchTerm.length?o(r):o(K)}),[t.searchTerm]),Z.createElement("div",{ref:e,className:"DialogBody ScrollHeightM PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("div",{style:{height:"".concat(a.getTotalSize(),"px"),width:"100%",position:"relative"}},a.getVirtualItems().map((function(e){return Z.createElement("div",{key:e.key,style:{position:"absolute",top:0,left:0,width:"100%",height:"".concat(e.size,"px"),transform:"translateY(".concat(e.start,"px)")}},Z.createElement("div",{className:"PaddingBottomXS"},Z.createElement("button",{type:"button",className:"Card small",title:"Connect ".concat(i[e.key].name),onClick:function(){t.onClickWallet(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nq(Object(n),!0).forEach((function(e){HZ(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nq(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},i[e.key]))}},Z.createElement("div",{className:"CardImage"},Z.createElement("img",HZ({className:"transparent",src:i[e.key].logo},"className","WalletLogoS"))),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper PaddingLeftXS LineHeightXS"},Z.createElement("div",{className:"CardText"},i[e.key].name))))))}))))};function iq(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function oq(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?iq(Object(n),!0).forEach((function(e){HZ(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):iq(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var aq=function(t){var e=d(Z.useState(""),2),n=e[0],r=e[1],i=d(Z.useState(),2),o=i[0],a=i[1],s=d(Z.useState(!1),2),u=s[0],c=s[1],l=d(Z.useState(!1),2),h=l[0],f=l[1],p=Z.useRef(),m=Z.useContext(uh).navigate,g=function(e,n){"detected"==e.via?"app"==e.connectionType?(n.account().then((function(e){e&&t.resolve(e,n)})),t.setWallet(e),m("ConnectWallet")):"extension"==e.connectionType&&(t.setWallet(e),t.connectExtension(e),m("ConnectWallet")):(t.connectViaRedirect(e),t.setWallet(e),m("ConnectWallet"))};return Z.useEffect((function(){RZ().then((function(t){var e={},n=function(t,n,r,i){if(e[t.name]&&"previouslyConnected"==r)return null;e[t.name]=!0;var o="app";return i&&i.constructor&&![PZ.WalletConnectV1,PZ.WalletLink].includes(i.constructor)&&(o="extension"),Z.createElement("div",{key:n,className:"PaddingBottomXS"},Z.createElement("button",{type:"button",className:"Card small",title:"Connect ".concat(t.name),onClick:function(){return g(oq(oq({},t),{},{via:r,connectionType:o}),i)}},Z.createElement("div",{className:"CardImage"},Z.createElement("img",HZ({className:"transparent",src:t.logo},"className","WalletLogoS"))),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper PaddingLeftXS LineHeightXS"},Z.createElement("div",{className:"CardText FontWeightMedium"},t.name),"previouslyConnected"!=r&&Z.createElement("div",{className:"LightGreen"},Z.createElement("span",{className:"LightGreen",style:{fontSize:"70%",top:"-1px",position:"relative"}},"●")," Connect detected ",o),"previouslyConnected"==r&&Z.createElement("div",{className:"Opacity05"},Z.createElement("span",{style:{fontSize:"70%",top:"-1px",position:"relative"}},"●")," Previously connected")))))},r=t.map((function(t,e){if("Phantom"!=t.name){var r=K.find((function(e){return e.name==t.name}));return r?n(r,e,"detected",t):void 0}})).filter((function(t){return!!t})),i=localStorage[bh],o=K.find((function(t){return t.name==i}))||K.find((function(t){return t.name==i}));o&&o&&r.push(n(o,r.length+1,"previouslyConnected")),a(r)}))}),[]),Z.useEffect((function(){setTimeout((function(){f(!0),fh()||p.current&&(p.current.click(),p.current.focus())}),200)}),[]),Z.createElement(dh,{header:Z.createElement("div",null,Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Connect a wallet")),o&&Z.createElement("div",{className:"PaddingBottomXS PaddingLeftS PaddingRightS PaddingTopS"},o),Z.createElement("div",{className:"PaddingBottomXS PaddingLeftS PaddingRightS PaddingTopXS"},Z.createElement("div",{className:"Row"},Z.createElement("input",{className:"Search",value:n,onChange:function(t){r(t.target.value)},placeholder:"Search by name",ref:p})))),alternativeHeaderAction:Z.createElement("span",{className:"DropDownWrapper"},Z.createElement("button",{type:"button",onClick:function(){return c(!u)},className:"ButtonCircular",title:"More options"},Z.createElement(ZZ,null)),u&&Z.createElement(GZ,{hide:function(){return c(!1)},items:[{label:"What is a wallet?",action:function(){m("WhatIsAWallet")}}]})),bodyClassName:"PaddingBottomXS",body:Z.createElement("div",{className:"ScrollHeightM PaddingTopXS"},h&&Z.createElement(rq,{setWallet:t.setWallet,searchTerm:n,onClickWallet:g})),hideFooter:!0})},sq="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA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OlWt2u1Tem//bF+lUvWTMYIDsWso37d2ozcBQ/AHUzXU5dDfoXAfPm8v0nwIWgfx6Cy8QukP9gOI/5KJeF9HmJqJAhEy7YEC6LtTzYsgcAAAAAAAAAAAAAAAAAAAAAAAD0/AOU5ijBfZTOtQAAAABJRU5ErkJggg==",uq=function(t){return Z.createElement(dh,{stacked:!0,header:Z.createElement("div",null,Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextCenter"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"What is a wallet?"))),body:Z.createElement("div",{className:"TextCenter PaddingLeftL PaddingRightL PaddingTopS"},Z.createElement("div",{className:"GraphicWrapper"},Z.createElement("img",{className:"Graphic",src:sq})),Z.createElement("p",{className:"FontSizeM PaddingTopS PaddingLeftM PaddingRightM"},"Wallets are used to send, receive, and store digital assets. Wallets come in many forms. They are either built into your browser, an extension added to your browser, a piece of hardware plugged into your computer or even an app on your phone."),Z.createElement("div",{className:"PaddingTopS"},Z.createElement("a",{className:"Link",href:"https://ethereum.org/wallets/",target:"_blank",rel:"noopener noreferrer"},"Learn more")))})},cq=function(t){var e=Z.useContext(V),n=e.open,r=e.close,i=d(Z.useState(),2),o=i[0],a=i[1],s=d(Z.useState({blockchain:void 0}),2),u=s[0];s[1];var c=d(Z.useState(!1),2),l=c[0],h=c[1],f=function(e,n){if(e&&n){var i=K.find((function(t){return t.extension==n.name}))||K.find((function(t){return t.name==n.name}));wh(i.name),t.autoClose&&r(),t.resolve&&t.resolve({account:e,wallet:n})}},p=function(t){h(!1),(t=new PZ[t.extension]).connect().then((function(e){f(e,t)})).catch((function(t){-32002==(null==t?void 0:t.code)&&h(!0)}))},m=function(t,e,n){if(t.universal){var r=function(t){return t.endsWith("/")&&(t=t.slice(0,-1)),t}(t.universal);return localStorage.setItem("WALLETCONNECT_DEEPLINK_CHOICE",JSON.stringify({href:r,name:n})),r="".concat(r,"/wc?uri=").concat(encodeURIComponent(e)),window.open(r,"_self","noreferrer noopener")}},g=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=mh(t);if(n)if("WalletConnectV1"==t.link){var r=new PZ[t.link];r.connect({name:t.name,logo:t.logo,reconnect:e,connect:function(e){var r=e.uri,i=ph()?"Android":t.name;UZ()?n.universal?m(n,r,i):ph()&&function(t,e,n){var r="wc://";localStorage.setItem("WALLETCONNECT_DEEPLINK_CHOICE",JSON.stringify({href:r,name:n})),r=!1!==t.encoded?"".concat(r,"wc?uri=").concat(encodeURIComponent(e)):"".concat(r,"wc?uri=").concat(e),window.open(r,"_self","noreferrer noopener")}(n,r,i):n.native?function(t,e,n){if(t.native){var r=function(t){return t.includes("://")||(t=t.replaceAll("/","").replaceAll(":",""),t="".concat(t,"://")),t}(t.native);localStorage.setItem("WALLETCONNECT_DEEPLINK_CHOICE",JSON.stringify({href:r,name:n})),r=!1!==t.encoded?"".concat(r,"wc?uri=").concat(encodeURIComponent(e)):"".concat(r,"wc?uri=").concat(e),window.open(r,"_self","noreferrer noopener")}}(n,r,i):m(n,r,i)}}).then((function(t){f(t,r)}))}else"WalletLink"==t.link&&(wh(t.name),ph()||UZ()?window.open("".concat(n.universal,"?cb_url=").concat(encodeURIComponent(window.location.toString())),"_self","noreferrer noopener"):window.open("".concat(n.native,"?url=").concat(encodeURIComponent(window.location.toString())),"_self","noreferrer noopener"))};return Z.createElement("div",null,Z.createElement(hh,{open:n,close:r,start:"SelectWallet",container:t.container,document:t.document,dialogs:{SelectWallet:Z.createElement(aq,{setWallet:a,resolve:f,connectViaRedirect:g,connectExtension:p}),WhatIsAWallet:Z.createElement(uq,null),ConnectWallet:Z.createElement(BZ,{selection:u,wallet:o,resolve:f,connectViaRedirect:g,connectExtension:p,showConnectExtensionWarning:l})}}),Z.createElement(YZ,null))},lq=function(t){return void 0===t?window.document:t};function hq(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,QZ(r.key),r)}}function dq(t,e){return dq=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dq(t,e)}function fq(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function pq(t){return pq=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pq(t)}var mq=Z.createContext(),gq="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAGHCAMAAADx+xo1AAAAeFBMVEVHcEweFhTcf2s2ERDegW3egWw1EBDbg2s1EBD/h4fSfWM1EBDTf2T/h4fTf2Q1EBDVgmYvEhI8EhJWLCV1QTWWV0a3Y07Ab1fOd1/PfWLXhWjUlH3/h4e8pZ3br12tub3ppI6hyNaY1Or+u6nx3mbO6/b14M3///8kXrGSAAAAEXRSTlMADSI/RWdshpqipsDG1OPj/QoziQ8AAB1ySURBVHja7J3bkqIwEIYBQTwLEUxgvNiqqZp5/zdczkFDEhCiPaa/q11WZcf+6f67ExgHQRAEQRAEQbSszmTlIPZyJmTvINayJoRsHMRaigRwdh3EVlZFAlg7iLVsCgFgArAXl6AFtJo1VgC72ROCUwCLKSvA2UHshZQK2KxXK9ddFaAdtI0N6YHlwD7ccy/6OBO0EHe97zSAHYGl1PV/TXAmZDV7rABWsyG4KmQzG+wBrAbjbzdr7ACsZoXxtxq3ir9bdIPrzX6/wUpgG5UBwGmQvdyNg3GHiH3cZQBcILYQtxgEr9elAzhjBrCcd94m4HolfkEQBGHBruRQc+qIWnKBaJjurc1nlR9bfn5xmuJk1VldC4agQeCNCIJpE1hGuQ1xHd46qDkAIjnZidOKqFaQ5zl/g+Ptdtv62vgsORF0q1h3oT6dQIR5vkqyAtbndNiFhRRAZxH/VnEMXO1MyH063s2V/TnRViuBy4ALIfCBZgSvFoAuDWymNwGeH4RlxHMrKWTAHmWwC32A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V6ElzYSoc/0nyGTfAhcHdAfCSDZMOD6QQZ6ZfS8sMu+o4gsBnzCsggyZDUZNgiJsNWGj7UTJYJB4FengEPGYg0ezi7P1kQ6EsGKRqCsmFbG11afVw/b0USaPTbI2FxDBTSOVSEGEpGCg7b9dHg9dCtwCvdxPx088RBoDcjFi80k0gkL05YdmLVfEiPSCrEEi+7ChEuJMv3gNMfHxy7Cte3xV53EqhKqskm8PjPB8fHTuL1+l02OwlUXbXL8a+zChzZgjV/MO2tipXxl6ETj4fEjT78cyeBamPFpjb+EC2l50Ct4q5ujC92Fe6W6j1LI2hMnEx4F/qMg2euAQZ34viSgLkGGFTG4UsCnrERdMc04BNbEjAHAX8vfkMYX+zQJQFzEPDWcTeoQJSF4LkRFK4YjFIDzkEgnApEqQHnIBDOiugKwXMQCOvHkWrA8/thy2jGmEoOYSG4FQRmFzC6GTEWgs9IZgKMXs3BqwErpJsQh4FOAUc7TkoDzgiiAvFtBpgRsqeLWgPOGN+QqDXgjPFdOdpC8AwF+4SE/9u7gxWHYRiKonkITMAL4///2XEndFzquEEhBJW5Z9GNQV3o2VEaaBrTMMx5h0fZow6Xgu/SXqJRN9menTx1+5jysw73A1/ESu3K78e50eG1TpT/4MdIi15ZHck9Aw6KSQspCEXd5/5Xc5ZNdVT6d0R5K8t/pplcd6S24DlI1rpjfayQghA0ZfVz75bBUYq6tkAGQtBgsnf7COdT6uQcIQMhhAoACbidYgWABNxN8s4AJp80mQFIQAhyHgHZ5JXKzgFAAKLwJKCsvf0elt/q0P84jrZvLlvP8toe5Jxnaf2r1NpPAAI5bp6ZrrFVov/B6KT5L4DXVcQ9Lm+UXHg2FMIlnfecCQt9D4jtCQAAAAAAAAAAAABvfgCECMuQGDaxMAAAAABJRU5ErkJggg==";function yq(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=pq(t);if(e){var i=pq(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return fq(this,n)}}var bq,wq=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dq(t,e)}(o,Z.Component);var e,n,r,i=yq(o);function o(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,t)}return e=o,n=[{key:"componentDidCatch",value:function(t,e){t.error&&(t=t.error),this.props.setError(t)}},{key:"render",value:function(){return this.props.children}}],n&&hq(e.prototype,n),r&&hq(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(),vq=function(t){var e=d(Z.useState(t.error),2),n=e[0],r=e[1],i=d(Z.useState(!0),2),o=i[0],a=i[1],s=function(e){e.error&&(e=e.error),r(e),t.errorCallback&&t.errorCallback(e.message||e.toString())},u=function(){a(!1),setTimeout(t.unmount,300)};return n?Z.createElement(ah,{container:t.container,close:u,open:o},Z.createElement("div",{className:"Dialog ReactDialogAnimation"},Z.createElement("div",{className:"DialogHeader"},Z.createElement("div",{className:"PaddingTopS PaddingLeftS PaddingRightS"})),Z.createElement("div",{className:"DialogBody TextCenter"},Z.createElement("div",{className:"GraphicWrapper PaddingTopS"},Z.createElement("img",{className:"Graphic",src:gq})),Z.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Oops, Something Went Wrong"),Z.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("div",{className:"PaddingLeftS PaddingRightS"},Z.createElement("pre",{className:"ErrorSnippetText"},n.message||n.toString())),Z.createElement("div",{className:"PaddingTopS PaddingBottomS"},Z.createElement("strong",{className:"FontSizeM PaddingTopS"},"If this keeps happening, please report it.")))),Z.createElement("div",{className:"DialogFooter"},Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:"ButtonPrimary",onClick:u},"Try again"))))):Z.createElement(mq.Provider,{value:{setError:s,errorCallback:t.errorCallback}},Z.createElement(wq,{setError:s},t.children))},Mq=function(t){return"\n\n .ButtonCircular {\n border-radius: 9999px;\n border: 1px solid transparent;\n cursor: pointer;\n height: 34px;\n opacity: 0.5;\n padding: 5px 4px 4px 4px;\n width: 34px;\n }\n\n .ButtonCircular:focus {\n border: 1px solid ".concat(t.colors.primary,";\n }\n\n .ButtonCircular:hover {\n background: rgba(0,0,0,0.1);\n opacity: 1;\n }\n\n .ButtonCircular:active {\n background: rgba(0,0,0,0.25);\n opacity: 1;\n }\n ")},Lq=function(t){return"\n\n .ButtonPrimary {\n align-items: center;\n align-self: center;\n background: ".concat(t.colors.primary,";\n border-radius: 13px;\n border: 1px solid transparent;\n box-shadow: 0 0 16px rgba(0,0,0,0.1);\n font-size: 22px;\n font-weight: 400;\n line-height: 40px;\n height: 58px;\n justify-content: center;\n width: 100%;\n overflow: hidden;\n padding: 7px 0;\n position: relative;\n text-align: center;\n text-decoration: none;\n text-overflow: ellipsis;\n transition: background 0.1s;\n vertical-align: middle;\n display: inline-block;\n }\n\n .ButtonPrimary, .ButtonPrimary * {\n color: ").concat(t.colors.buttonText,";\n }\n\n .ButtonPrimary.disabled {\n background: rgb(210,210,210);\n color: rgb(140,140,140);\n }\n\n .ButtonPrimary:not(.disabled){\n cursor: pointer;\n }\n .ButtonPrimary:not(.disabled):hover {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.1);\n }\n .ButtonPrimary:not(.disabled):active {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.2);\n }\n ")},_q=function(t){return"\n\n .Card {\n align-items: center;\n background: rgb(255,255,255);\n border: 1px solid transparent;\n border-radius: 13px;\n box-shadow: 0 0 8px rgba(0,0,0,0.03);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n margin-bottom: 8px;\n min-height: 76px;\n padding: 16px 10px;\n width: 100%;\n }\n\n .Card:focus {\n border: 1px solid ".concat(t.colors.primary,";\n }\n\n .Card.center {\n justify-content: center;\n }\n\n .Card.Row {\n border-radius: 0;\n margin-bottom: 0;\n box-shadow: none;\n min-height: 69px;\n padding: 7px 21px;\n border-top: 1px solid rgba(0,0,0,0.05);\n }\n\n .Card.Row .CardText {\n font-size: 19px;\n line-height: 40px;\n }\n\n .CardTokenSymbol {\n width: 40%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .CardTokenFullName {\n width: 100%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .CardTokenName {\n text-align: right;\n opacity: 0.5;\n width: 60%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n .Card.Row .CardTokenName .CardText {\n font-size: 17px;\n }\n\n .Card.Row .CardImage {\n width: 40px;\n }\n\n .Card.Row .CardImage img {\n height: 30px;\n width: 30px;\n }\n\n a.Card, a.Card * {\n color: inherit;\n text-decoration: none;\n }\n\n .Card.transparent {\n background: none;\n box-shadow: none;\n }\n\n .Card.small {\n min-height: auto;\n padding: 8px 8px;\n margin: 0;\n }\n\n .CardImage.small {\n width: 27px;\n }\n\n .CardImage.small img {\n height: 27px;\n width: 27px;\n }\n\n .CardImage.large {\n width: 58px;\n }\n\n .CardImage.large img {\n height: 58px;\n width: 58px;\n }\n\n .Card.disabled {\n cursor: default;\n }\n\n .Card:hover:not(.disabled) {\n background: rgb(240,240,240);\n box-shadow: 0 0 0 rgba(0,0,0,0); \n }\n\n .Card:active:not(.disabled) {\n background: rgb(235,235,235);\n box-shadow: inset 0 0 6px rgba(0,0,0,0.02);\n color: inherit;\n }\n\n .Card:hover:not(.disabled) .CardAction {\n opacity: 0.4;\n }\n\n .CardImage, .CardBody, .CardAction, .CardInfo {\n align-items: center;\n display: flex;\n min-width: 0;\n padding: 0 7px;\n }\n\n .CardImage {\n display: inline-flex;\n flex-basis: auto;\n flex-grow: 0;\n flex-shrink: 0;\n justify-content: center;\n position: relative;\n width: 58px;\n }\n\n .CardBody {\n flex-basis: auto;\n flex-grow: 1;\n flex-shrink: 1;\n line-height: 27px;\n padding-left: 10px;\n text-align: left;\n }\n\n .CardBodyWrapper {\n min-width: 0;\n }\n\n .CardAction {\n flex-basis: auto;\n flex-shrink: 0;\n flex-grow: 0;\n padding-right: 0;\n margin-left: auto;\n }\n\n .Card.disabled .CardAction {\n opacity: 0; \n }\n\n .CardInfo {\n display: flex;\n flex-basis: auto;\n flex-direction: column;\n flex-grow: 0;\n flex-shrink: 1;\n justify-content: center;\n margin-left: auto; \n padding-right: 0;\n }\n\n .CardImage img {\n background: white;\n border-radius: 9999px;\n border: 1px solid white;\n box-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n height: 45px;\n position: relative;\n vertical-align: middle;\n width: 45px;\n }\n\n .CardImage.rounded img {\n border-radius: 8px !important;\n }\n\n .CardImage.square img {\n border-radius: 0;\n }\n\n .CardImage img.transparent {\n border: none;\n background: none;\n box-shadow: none;\n }\n \n .CardImage .BlockchainLogo {\n position: absolute;\n bottom: 0;\n right: 0;\n }\n\n .CardTitle {\n font-size: 15px;\n color: rgb(150,150,150);\n line-height: 20px;\n }\n \n .CardText, a .CardText {\n color: ").concat(t.colors.text,";\n flex: 1;\n font-size: 21px;\n line-height: 26px;\n }\n\n .CardText strong {\n font-weight: 500;\n }\n\n .CardText.small, .CardText.small small {\n font-size: 18px;\n color: rgb(150,150,150);\n line-height: 20px;\n }\n\n .CardAction {\n opacity: 0.2;\n }\n\n .Card.More {\n display: inline-block;\n text-align: center;\n }\n ")},Nq=function(t){return"\n\n .DropDownWrapper {\n position: relative;\n }\n\n .DropDown {\n background: rgb(240,240,240);\n border-radius: 8px;\n border: 1px solid rgb(230,230,230);\n box-shadow: 0 0 12px rgba(0,0,0,0.1);\n display: block;\n padding: 8px 6px;\n position: absolute;\n right: 0;\n z-index: 1000;\n }\n\n .DropDownItem {\n border: 1px solid transparent;\n border-radius: 6px;\n cursor: pointer;\n font-size: 17px;\n font-weight: 500;\n min-width: 160px;\n padding: 6px 10px;\n text-align: left;\n white-space: nowrap;\n }\n\n .DropDownItem:focus {\n border: 1px solid ".concat(t.colors.primary,";\n }\n\n .DropDownItem:hover {\n background: rgba(0,0,0,0.1);\n }\n \n .DropDownItem:active {\n background: rgba(0,0,0,0.15);\n }\n \n ")},Eq=function(t){return"\n\n *, div, div * {\n font-family: ".concat(t.fontFamily,";\n }\n\n * {\n font-size: 15px;\n }\n\n .FontSizeS {\n font-size: 16px;\n }\n\n .FontSizeM {\n font-size: 19px;\n }\n\n .FontSizeL {\n font-size: 23px;\n }\n\n .FontSizeXL {\n font-size: 32px;\n }\n\n .FontSizeXXL {\n font-size: 42px;\n }\n\n .FontWeightMedium {\n font-weight: 500;\n }\n\n .FontWeightBold {\n font-weight: bold;\n }\n\n .FontItalic {\n font-style: italic;\n }\n ")},Sq=function(t){return"\n\n .Icon {\n fill: ".concat(t.colors.icons,";\n stroke: ").concat(t.colors.icons,";\n }\n\n .QuestionMarkIcon {\n fill: transparent;\n }\n\n .ChevronLeft, .ChevronRight {\n position: relative;\n top: 1px;\n }\n\n .Checkmark {\n height: 24px;\n position: relative;\n top: -1px;\n vertical-align: middle;\n width: 24px;\n }\n\n .AlertIcon {\n height: 20px;\n position: relative;\n top: -1px;\n vertical-align: middle;\n width: 20px;\n fill: #e42626;\n stroke: transparent;\n }\n\n .CheckMark.small {\n height: 16px;\n width: 16px;\n }\n\n .DigitalWalletIcon {\n height: 24px;\n position: relative;\n top: -1px;\n vertical-align: middle;\n width: 24px;\n }\n\n .ButtonPrimary .Icon {\n fill : ").concat(t.colors.buttonText,";\n stroke : ").concat(t.colors.buttonText,";\n }\n\n .Loading {\n border: 3px solid ").concat(t.colors.primary,";\n border-top: 3px solid rgba(0,0,0,0.1);\n border-radius: 100%;\n position: relative;\n left: -1px;\n width: 18px;\n height: 18px;\n animation: spin 1.5s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n ")},xq=function(t){return"\n\n .Link {\n color: ".concat(t.colors.primary,";\n cursor: pointer;\n text-decoration: none;\n }\n\n .Link:hover {\n filter: brightness(0.8);\n }\n\n .Link:active {\n filter: brightness(1.0);\n }\n ")},Aq=function(t){return"\n\n .LoadingText {\n color: ".concat(t.colors.buttonText,";\n display: inline-block;\n text-decoration: none;\n }\n\n @keyframes blink {\n 0% { opacity: .2; }\n 20% { opacity: 1; }\n 100% { opacity: .2; }\n }\n \n .LoadingText .dot {\n animation-name: blink;\n animation-duration: 1.4s;\n animation-iteration-count: infinite;\n animation-fill-mode: both;\n }\n \n .LoadingText .dot:nth-child(2) {\n animation-delay: .2s;\n }\n \n .LoadingText .dot:nth-child(3) {\n animation-delay: .4s;\n }\n ")},Iq=function(t){return"\n\n .rangeslider {\n margin: 20px 0;\n position: relative;\n background: #e6e6e6;\n -ms-touch-action: none;\n touch-action: none;\n }\n\n .rangeslider,\n .rangeslider__fill {\n display: block;\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);\n }\n\n .rangeslider__handle {\n outline: none;\n cursor: pointer;\n display: inline-block;\n position: absolute;\n border-radius: 50%;\n background-color: "+t.colors.primary+";\n border: 1px solid white;\n box-shadow: 0 0 8px rgba(0,0,0,0.1);\n }\n\n .rangeslider__handle:hover {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.2);\n }\n\n .rangeslider__handle:active {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.3);\n }\n\n .rangeslider__active {\n opacity: 1;\n }\n\n .rangeslider__handle-tooltip {\n display: none;\n }\n\n .rangeslider-horizontal {\n height: 12px;\n border-radius: 10px;\n }\n\n .rangeslider-horizontal .rangeslider__fill {\n height: 100%;\n background-color: "+t.colors.primary+";\n border-radius: 10px;\n top: 0;\n }\n .rangeslider-horizontal .rangeslider__handle {\n width: 18px;\n height: 18px;\n border-radius: 30px;\n top: 50%;\n transform: translate3d(-50%, -50%, 0);\n }\n\n\n .rangeslider-horizontal .rangeslider__handle-tooltip {\n top: -55px;\n }\n\n "},kq=function(t){return"\n\n .Search {\n border-radius: 13px;\n border: 1px solid rgba(0,0,0,0.2);\n background: white;\n outline: none !important;\n color: ".concat(t.colors.text,";\n font-size: 19px;\n padding: 13px;\n width: 100%;\n }\n\n .Search::placeholder {\n color: rgb(180,180,180);\n } \n\n .Search:focus, .Search:focus-visible {\n border: 1px solid ").concat(t.colors.primary,";\n }\n\n ")},jq=function(t){return"\n\n .TextButton {\n cursor: pointer;\n font-size: 16px;\n color: ".concat(t.colors.primary,"\n }\n\n .TextButton:hover * {\n opacity: 1.0;\n }\n ")},Tq=function(t){return"\n\n * {\n color: ".concat(t.colors.text,";\n }\n\n .LightGreen {\n color: rgba(50,160,60);\n }\n\n h1, h2, h3, h4, h5, h6 {\n display: block;\n }\n\n .Text {\n font-size: 16px;\n line-height: 24px\n }\n\n .TextLeft, .TextLeft * {\n text-align: left !important;\n }\n\n .TextCenter, .TextCenter * {\n text-align: center;\n }\n\n .LineHeightXS {\n line-height: 16px;\n }\n\n .LineHeightL {\n line-height: 32px;\n }\n\n .ErrorSnippetText {\n background: rgb(30, 30, 20);\n border-radius: 19px;\n border: 8px solid rgb(30, 30, 20);\n color: #00FF41;\n font-size: 15px;\n font-style: italic;\n max-height: 100px;\n padding: 6px;\n overflow-wrap: break-word;\n overflow-y: auto;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n ")},Cq=function(t){return"\n\n .TooltipWrapper {\n position: relative;\n }\n\n .Tooltip {\n background: ".concat(t.colors.primary,";\n border-radius: 10px;\n color: ").concat(t.colors.buttonText,";\n padding: 10px 13px;\n position: relative;\n box-shadow: 0 0 8px rgba(0,0,0,0.2);\n }\n\n .Tooltip.absolute {\n position: absolute;\n }\n\n .Tooltip.top {\n top: -40px;\n }\n\n .TooltipArrowUp {\n border-bottom: 10px solid ").concat(t.colors.primary,";\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n height: 0; \n left: 12px;\n position: absolute;\n top: -8px;\n width: 0; \n }\n\n .TooltipArrowDown {\n border-top: 10px solid ").concat(t.colors.primary,";\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n height: 0; \n left: 12px;\n position: absolute;\n bottom: -8px;\n width: 0; \n }\n ")};bq=rh.createRoot;const Dq="ReactShadowDOMInsideContainer";const Oq="ReactShadowDOMOutsideContainer";function zq(t){return t.replace(/\s*[\r\n]\s*/g,"")}function Pq({document:t,element:e,content:n,outsideStyle:r="",insideStyle:i="",insideClasses:o=[]}){const a=function({document:t,element:e,style:n}){const r=t.createElement("div");return r.setAttribute("class",Oq),r.setAttribute("style",n),e.appendChild(r),r}({document:t,element:e,style:zq(r)}),s=function({document:t,shadow:e,style:n,classes:r=[]}){const i=t.createElement("div");if(i.setAttribute("class",[Dq].concat(r).join(" ")),e.appendChild(i),n&&n.length){const r=t.createElement("style");r.type="text/css",r.appendChild(t.createTextNode(n)),e.appendChild(r)}return i}({document:t,shadow:function(t){let e;return e=t.shadowRoot?t.shadowRoot:t.attachShadow({mode:"open"}),e}(a),style:zq(i),classes:o});"function"==typeof n&&(n=n(s));const u=bq(s);return u.render(n),{content:n,unmount:()=>function({insideRoot:t,outsideContainer:e}){t.unmount(),e.remove()}({insideRoot:u,outsideContainer:a})}}var Rq=function(t,e){var n=t.style,r=t.container,i=t.document,o=t.closed,a=function(t){var e,n;return t={colors:Object.assign({primary:"#ea357a",buttonText:"#ffffff",icons:"#000000",text:"#212529"},(null===(e=t)||void 0===e?void 0:e.colors)||{}),fontFamily:(null===(n=t)||void 0===n?void 0:n.fontFamily)||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'},["\n\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n text-align: inherit;\n vertical-align: baseline;\n }\n\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n\n body {\n line-height: 1;\n }\n\n ol, ul {\n list-style: none;\n }\n\n blockquote, q {\n quotes: none;\n }\n\n blockquote:before, blockquote:after,\n q:before, q:after {\n content: '';\n content: none;\n }\n \n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n * {\n box-sizing: border-box;\n }\n\n button {\n border: 0;\n background: none;\n outline: none;\n }\n\n ","\n\n .ReactDialogBackground {\n z-index: -2;\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .contained .ReactDialog {\n position: absolute;\n height: 100%;\n min-height: 100%;\n width: 100%;\n min-width: 100%;\n }\n\n .contained .ReactDialogBackground {\n position: absolute;\n }\n\n .contained .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n top: 0;\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.2);\n border-radius: 13px;\n background: rgb(248,248,248);\n }\n\n @media (max-width: 450px) {\n\n .Dialog {\n border-radius: 0;\n width: 100%;\n }\n }\n\n @media (orientation: portrait) and (max-width: 800px) {\n\n .ReactDialogAnimation {\n width: 100%;\n }\n\n .ReactDialog {\n height: 100%;\n min-height: 100%;\n }\n\n .ReactDialogStack {\n align-items: flex-end;\n }\n\n .Dialog {\n align-content: stretch;\n border-radius: 13px;\n border-top-radius: 13px;\n display: flex;\n flex-direction: column;\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogAnimation {\n margin-bottom: -100px !important;\n top: inherit !important;\n position: relative;\n transition: opacity 0.4s ease, margin-bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n margin-bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n align-items: flex-end;\n }\n }\n\n .DialogBody {\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .ScrollHeightS {\n height: 180px !important;\n max-height: 180px !important;\n }\n\n .ScrollHeightM {\n height: 194px !important;\n max-height: 194px !important;\n }\n\n .DialogBody.MinHeight {\n height: 120px !important;\n max-height: 120px !important;\n }\n\n .DialogHeader {\n border-top-left-radius: 13px;\n border-top-right-radius: 13px;\n min-height: 54px;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 48px;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 48px;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 13px;\n border-bottom-right-radius: 13px;\n line-height: 24px;\n min-height: 32px;\n position: relative;\n text-align: center;\n }\n\n ",Mq(t),Lq(t),_q(t),'\n\n .PoweredByWrapper {\n display: block;\n left: 0;\n padding-top: 3px;\n position: fixed;\n right: 0;\n text-align: center;\n top: 0;\n }\n\n .contained .PoweredByWrapper {\n position: absolute;\n }\n\n .PoweredByLink {\n color: white;\n display: inline-block;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;\n font-size: 14px;\n font-style: italic;\n font-weight: bold;\n letter-spacing: -0.2px;\n margin-left: 8px;\n opacity: 0.5;\n text-decoration: none;\n text-shadow: black 0 0 2px;\n }\n\n .PoweredByLink:hover, .PoweredByLink:active {\n opacity: 1.0;\n }\n ',"\n\n .QRCode {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: -10px;\n }\n ","\n\n .GraphicWrapper {\n display: block;\n }\n\n .Graphic {\n width: 50%;\n position: relative;\n }\n ","\n\n .Row {\n overflow: hidden;\n }\n\n .Column {\n float: left;\n }\n\n .Column2 {\n width: 16.66%;\n }\n\n .Column10 {\n width: 83.33%;\n }\n ","\n \n .Skeleton {\n background: rgb(230,230,230) !important;\n border: 0px solid transparent !important;\n box-shadow: none !important;\n cursor: inherit !important;\n line-height: 0;\n overflow: hidden;\n position: relative;\n }\n\n @keyframes SkeletonBackgroundAnimation {\n from {\n left: -500px;\n }\n to {\n left: +120%;\n }\n }\n\n .SkeletonBackground {\n animation: 2s SkeletonBackgroundAnimation 0.2s ease infinite;\n background: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.1) 50%, transparent 100%);\n height: 100%;\n left: -140%;\n position: absolute;\n top: 0;\n width: 400px;\n }\n\n .SkeletonWrapper {\n line-height: 0;\n }\n ","\n \n .TokenAmountRow {\n min-width: 0;\n width: 100%;\n display: flex;\n flex-direction: row;\n }\n \n .TokenAmountRow.small {\n font-size: 17px;\n line-height: 17px;\n }\n\n .TokenAmountRow.grey {\n opacity: 0.5;\n }\n\n .TokenAmountCell {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .TokenSymbolCell {\n }\n ",Tq(t),Eq(t),Sq(t),"\n\n .Opacity05 {\n opacity: 0.5;\n }\n ","\n\n .PaddingTopXS {\n padding-top: 3px;\n }\n\n .PaddingRightXS {\n padding-right: 3px;\n }\n\n .PaddingBottomXS {\n padding-bottom: 3px;\n }\n\n .PaddingLeftXS {\n padding-left: 3px; \n }\n\n .PaddingTopS {\n padding-top: 13px;\n }\n\n .PaddingRightS {\n padding-right: 13px;\n }\n\n .PaddingBottomS {\n padding-bottom: 13px;\n }\n\n .PaddingLeftS {\n padding-left: 13px; \n }\n\n .PaddingTopM {\n padding-top: 19px;\n }\n\n .PaddingRightM {\n padding-right: 19px;\n }\n\n .PaddingBottomM {\n padding-bottom: 19px;\n }\n\n .PaddingLeftM {\n padding-left: 19px; \n }\n\n .PaddingTopL {\n padding-top: 29px;\n }\n\n .PaddingRightL {\n padding-right: 29px;\n }\n\n .PaddingBottomL {\n padding-bottom: 29px;\n }\n\n .PaddingLeftL {\n padding-left: 29px; \n }\n ","\n\n .MaxHeight {\n max-height: 320px;\n overflow-y: auto;\n }\n ",Aq(t),Iq(t),"\n\n .Input {\n background: none;\n border: 1px solid transparent;\n margin: 0;\n outline: none !important;\n padding: 0 0 0 14px;\n width: 100%;\n }\n\n .Input::placeholder {\n color: rgb(210,210,210);\n }\n \n ",jq(t),"\n\n .MaxAmountImage {\n display: inline-block;\n padding-right: 6px;\n }\n \n .MaxAmountImage img {\n height: 16px;\n width: 16px;\n position: relative;\n top: 3px;\n }\n ","\n\n .BlockchainLogo {\n border-radius: 999px;\n }\n\n .BlockchainLogo.small {\n height: 18px;\n width: 18px;\n }\n ",kq(t),"\n\n .TokenImage img {\n border-radius: 9999px;\n border: 1px solid white;\n background: white;\n box-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n height: 45px;\n position: relative;\n vertical-align: middle;\n width: 45px;\n }\n\n .TokenImage.medium img {\n height: 93px;\n width: 93px;\n }\n ","\n\n .Alert {\n background: rgba(0,0,0,0.08);\n border-radius: 7px;\n font-weight: 500;\n padding: 8px;\n }\n ","\n\n .Table {\n border-collapse: separate;\n border-radius: 7px;\n border-style: hidden;\n border: 1px solid rgba(0,0,0,0.1);\n width: 100%;\n }\n\n .Table tr.small td {\n font-size: 14px;\n }\n\n .Table tr td {\n border-bottom: 1px solid rgba(0,0,0,0.1);\n word-break: break-all;\n }\n \n .Table tr:last-child td {\n border-bottom: none;\n }\n \n .Table tr td {\n padding: 8px 15px;\n text-align: left;\n }\n \n .Table tr td:first-child {\n width: 30%\n }\n\n .Table tr td:last-child {\n width: 70%\n }\n \n .Table .TableSubTitle {\n font-weight: 300;\n opacity: 0.7;\n }\n\n .Table tr td:last-child {\n font-weight: 500;\n }\n ",xq(t),Cq(t),"\n\n .WalletLogoS {\n background: none !important;\n border-radius: 8px !important;\n border: 1px solid transparent !important;\n box-shadow: none !important;\n height: 40px !important;\n width: 40px !important;\n }\n ",Nq(t)].join("")}(n);n&&n.css&&(a=[a,n.css].join(" "));var s;s=r?"\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ":"\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ";var u=Pq({document:i,element:r||i.body,content:e((function(){setTimeout((function(){u(),"function"==typeof o&&o()}),300)})),outsideStyle:s,insideStyle:a,insideClasses:r?["contained"]:[]}).unmount;return u},Bq=function(){if(parseInt(Z.version.split(".")[0])<17)throw"depay/widgets require at least React v17"},Uq=function(t){var e=d(Z.useState({}),2),n=e[0],r=e[1];return Z.createElement(FZ.Provider,{value:{selection:n,setSelection:r}},t.children)},Yq=function(t){var e=d(Z.useState(!0),2),n=e[0],r=e[1];return Z.createElement(q.Provider,{value:{updatable:n,setUpdatable:r}},t.children)},Fq=Z.createContext(),Wq=Z.createContext(),Qq=Z.createContext();function Hq(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Gq,Zq,Vq=function(t){var e=Hq(t).sort((function(t,e){if("0"==t.fromBalance||"0"==t.fromAmount)return-1;if("0"==e.fromBalance||"0"==e.fromAmount)return 1;var n=kd.from(t.fromBalance).div(kd.from(t.fromAmount)),r=kd.from(e.fromBalance).div(kd.from(e.fromAmount));return n.lt(r)?-1:r.lt(n)?1:0}));return e[e.length-1]},qq=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"up",r=parseFloat(t),i=r.toString().match(/\d+\.0*(\d{4})/);if(null!==(e=i)&&void 0!==e&&e.length){var o,a,s=(i=i[0]).match(/\d{4}$/)[0];return s.match(/^0/)?(o=parseFloat("".concat(s[1],".").concat(s[2]).concat(s[3])),a=parseFloat(o).toFixed(2),a="0".concat(a).replace(".","")):(o="up"==n?parseFloat("".concat(s[0],".").concat(s[1]).concat(s[2],"9")):parseFloat("".concat(s[0],".").concat(s[1]).concat(s[2],"1")),a=parseFloat(o).toFixed(2).replace(".","")),"0999"==a&&0==parseInt(r.toFixed(0))?(a="up"==n?"1000":"0999",parseFloat(i.replace(/\d{4}$/,a))):"1000"==a&&0==parseInt(r.toFixed(0))?parseFloat(i.replace(/\d{5}$/,a)):"0"!=a.toString()[0]&&a.toString().length>3?parseInt(r.toFixed(0)):parseFloat(i.replace(/\d{4}$/,a))}return parseFloat(r.toFixed(3))},Jq=Z.createContext(),Kq=o((function(t,e){(function(){var n,i="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",s=16,u=32,c=64,l=128,h=256,d=1/0,f=9007199254740991,p=NaN,m=4294967295,g=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",u],["partialRight",c],["rearg",h]],y="[object Arguments]",b="[object Array]",w="[object Boolean]",v="[object Date]",M="[object Error]",L="[object Function]",_="[object GeneratorFunction]",N="[object Map]",E="[object Number]",S="[object Object]",x="[object Promise]",A="[object RegExp]",I="[object Set]",k="[object String]",j="[object Symbol]",T="[object WeakMap]",C="[object ArrayBuffer]",D="[object DataView]",O="[object Float32Array]",z="[object Float64Array]",P="[object Int8Array]",R="[object Int16Array]",B="[object Int32Array]",U="[object Uint8Array]",Y="[object Uint8ClampedArray]",F="[object Uint16Array]",W="[object Uint32Array]",Q=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Z=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,q=RegExp(Z.source),J=RegExp(V.source),K=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,et=/^\w*$/,nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rt=/[\\^$.*+?()[\]{}|]/g,it=RegExp(rt.source),ot=/^\s+/,at=/\s/,st=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ut=/\{\n\/\* \[wrapped with (.+)\] \*/,ct=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/[()=,{}\[\]\/\s]/,dt=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,mt=/^[-+]0x[0-9a-f]+$/i,gt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,wt=/^(?:0|[1-9]\d*)$/,vt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mt=/($^)/,Lt=/['\n\r\u2028\u2029\\]/g,_t="\\ud800-\\udfff",Nt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Et="\\u2700-\\u27bf",St="a-z\\xdf-\\xf6\\xf8-\\xff",xt="A-Z\\xc0-\\xd6\\xd8-\\xde",At="\\ufe0e\\ufe0f",It="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",kt="['’]",jt="["+_t+"]",Tt="["+It+"]",Ct="["+Nt+"]",Dt="\\d+",Ot="["+Et+"]",zt="["+St+"]",Pt="[^"+_t+It+Dt+Et+St+xt+"]",Rt="\\ud83c[\\udffb-\\udfff]",Bt="[^"+_t+"]",Ut="(?:\\ud83c[\\udde6-\\uddff]){2}",Yt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+xt+"]",Wt="\\u200d",Qt="(?:"+zt+"|"+Pt+")",Ht="(?:"+Ft+"|"+Pt+")",Gt="(?:['’](?:d|ll|m|re|s|t|ve))?",Zt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Vt="(?:"+Ct+"|"+Rt+")"+"?",qt="["+At+"]?",Jt=qt+Vt+("(?:"+Wt+"(?:"+[Bt,Ut,Yt].join("|")+")"+qt+Vt+")*"),Kt="(?:"+[Ot,Ut,Yt].join("|")+")"+Jt,Xt="(?:"+[Bt+Ct+"?",Ct,Ut,Yt,jt].join("|")+")",$t=RegExp(kt,"g"),te=RegExp(Ct,"g"),ee=RegExp(Rt+"(?="+Rt+")|"+Xt+Jt,"g"),ne=RegExp([Ft+"?"+zt+"+"+Gt+"(?="+[Tt,Ft,"$"].join("|")+")",Ht+"+"+Zt+"(?="+[Tt,Ft+Qt,"$"].join("|")+")",Ft+"?"+Qt+"+"+Gt,Ft+"+"+Zt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Dt,Kt].join("|"),"g"),re=RegExp("["+Wt+_t+Nt+At+"]"),ie=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,oe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ae=-1,se={};se[O]=se[z]=se[P]=se[R]=se[B]=se[U]=se[Y]=se[F]=se[W]=!0,se[y]=se[b]=se[C]=se[w]=se[D]=se[v]=se[M]=se[L]=se[N]=se[E]=se[S]=se[A]=se[I]=se[k]=se[T]=!1;var ue={};ue[y]=ue[b]=ue[C]=ue[D]=ue[w]=ue[v]=ue[O]=ue[z]=ue[P]=ue[R]=ue[B]=ue[N]=ue[E]=ue[S]=ue[A]=ue[I]=ue[k]=ue[j]=ue[U]=ue[Y]=ue[F]=ue[W]=!0,ue[M]=ue[L]=ue[T]=!1;var ce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},le=parseFloat,he=parseInt,de="object"==typeof r&&r&&r.Object===Object&&r,fe="object"==typeof self&&self&&self.Object===Object&&self,pe=de||fe||Function("return this")(),me=e&&!e.nodeType&&e,ge=me&&t&&!t.nodeType&&t,ye=ge&&ge.exports===me,be=ye&&de.process,we=function(){try{var t=ge&&ge.require&&ge.require("util").types;return t||be&&be.binding&&be.binding("util")}catch(t){}}(),ve=we&&we.isArrayBuffer,Me=we&&we.isDate,Le=we&&we.isMap,_e=we&&we.isRegExp,Ne=we&&we.isSet,Ee=we&&we.isTypedArray;function Se(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function Ae(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ie(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function ke(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Te(t,e){return!!(null==t?0:t.length)&&Fe(t,e,0)>-1}function Ce(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function De(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Oe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function ze(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Pe(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Re(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Be=Ge("length");function Ue(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Ye(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Fe(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Ye(t,Qe,n)}function We(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Qe(t){return t!=t}function He(t,e){var n=null==t?0:t.length;return n?qe(t,e)/n:p}function Ge(t){return function(e){return null==e?n:e[t]}}function Ze(t){return function(e){return null==t?n:t[e]}}function Ve(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function qe(t,e){for(var r,i=-1,o=t.length;++i<o;){var a=e(t[i]);a!==n&&(r=r===n?a:r+a)}return r}function Je(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ke(t){return t?t.slice(0,mn(t)+1).replace(ot,""):t}function Xe(t){return function(e){return t(e)}}function $e(t,e){return De(e,(function(e){return t[e]}))}function tn(t,e){return t.has(e)}function en(t,e){for(var n=-1,r=t.length;++n<r&&Fe(e,t[n],0)>-1;);return n}function nn(t,e){for(var n=t.length;n--&&Fe(e,t[n],0)>-1;);return n}var rn=Ze({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),on=Ze({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(t){return"\\"+ce[t]}function sn(t){return re.test(t)}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function cn(t,e){return function(n){return t(e(n))}}function ln(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n];s!==e&&s!==a||(t[n]=a,o[i++]=n)}return o}function hn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function dn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function fn(t){return sn(t)?function(t){var e=ee.lastIndex=0;for(;ee.test(t);)++e;return e}(t):Be(t)}function pn(t){return sn(t)?function(t){return t.match(ee)||[]}(t):function(t){return t.split("")}(t)}function mn(t){for(var e=t.length;e--&&at.test(t.charAt(e)););return e}var gn=Ze({"&":"&","<":"<",">":">",""":'"',"'":"'"});var yn=function t(e){var r,at=(e=null==e?pe:yn.defaults(pe.Object(),e,yn.pick(pe,oe))).Array,_t=e.Date,Nt=e.Error,Et=e.Function,St=e.Math,xt=e.Object,At=e.RegExp,It=e.String,kt=e.TypeError,jt=at.prototype,Tt=Et.prototype,Ct=xt.prototype,Dt=e["__core-js_shared__"],Ot=Tt.toString,zt=Ct.hasOwnProperty,Pt=0,Rt=(r=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Bt=Ct.toString,Ut=Ot.call(xt),Yt=pe._,Ft=At("^"+Ot.call(zt).replace(rt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wt=ye?e.Buffer:n,Qt=e.Symbol,Ht=e.Uint8Array,Gt=Wt?Wt.allocUnsafe:n,Zt=cn(xt.getPrototypeOf,xt),Vt=xt.create,qt=Ct.propertyIsEnumerable,Jt=jt.splice,Kt=Qt?Qt.isConcatSpreadable:n,Xt=Qt?Qt.iterator:n,ee=Qt?Qt.toStringTag:n,re=function(){try{var t=fo(xt,"defineProperty");return t({},"",{}),t}catch(t){}}(),ce=e.clearTimeout!==pe.clearTimeout&&e.clearTimeout,de=_t&&_t.now!==pe.Date.now&&_t.now,fe=e.setTimeout!==pe.setTimeout&&e.setTimeout,me=St.ceil,ge=St.floor,be=xt.getOwnPropertySymbols,we=Wt?Wt.isBuffer:n,Be=e.isFinite,Ze=jt.join,bn=cn(xt.keys,xt),wn=St.max,vn=St.min,Mn=_t.now,Ln=e.parseInt,_n=St.random,Nn=jt.reverse,En=fo(e,"DataView"),Sn=fo(e,"Map"),xn=fo(e,"Promise"),An=fo(e,"Set"),In=fo(e,"WeakMap"),kn=fo(xt,"create"),jn=In&&new In,Tn={},Cn=Bo(En),Dn=Bo(Sn),On=Bo(xn),zn=Bo(An),Pn=Bo(In),Rn=Qt?Qt.prototype:n,Bn=Rn?Rn.valueOf:n,Un=Rn?Rn.toString:n;function Yn(t){if(ns(t)&&!Ha(t)&&!(t instanceof Hn)){if(t instanceof Qn)return t;if(zt.call(t,"__wrapped__"))return Uo(t)}return new Qn(t)}var Fn=function(){function t(){}return function(e){if(!es(e))return{};if(Vt)return Vt(e);t.prototype=e;var r=new t;return t.prototype=n,r}}();function Wn(){}function Qn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}function Hn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Zn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Vn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function qn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Vn;++e<n;)this.add(t[e])}function Jn(t){var e=this.__data__=new Zn(t);this.size=e.size}function Kn(t,e){var n=Ha(t),r=!n&&Qa(t),i=!n&&!r&&qa(t),o=!n&&!r&&!i&&ls(t),a=n||r||i||o,s=a?Je(t.length,It):[],u=s.length;for(var c in t)!e&&!zt.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vo(c,u))||s.push(c);return s}function Xn(t){var e=t.length;return e?t[qr(0,e-1)]:n}function $n(t,e){return zo(ki(t),ur(e,0,t.length))}function tr(t){return zo(ki(t))}function er(t,e,r){(r!==n&&!Ya(t[e],r)||r===n&&!(e in t))&&ar(t,e,r)}function nr(t,e,r){var i=t[e];zt.call(t,e)&&Ya(i,r)&&(r!==n||e in t)||ar(t,e,r)}function rr(t,e){for(var n=t.length;n--;)if(Ya(t[n][0],e))return n;return-1}function ir(t,e,n,r){return fr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function or(t,e){return t&&ji(e,Ts(e),t)}function ar(t,e,n){"__proto__"==e&&re?re(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function sr(t,e){for(var r=-1,i=e.length,o=at(i),a=null==t;++r<i;)o[r]=a?n:xs(t,e[r]);return o}function ur(t,e,r){return t==t&&(r!==n&&(t=t<=r?t:r),e!==n&&(t=t>=e?t:e)),t}function cr(t,e,r,i,o,a){var s,u=1&e,c=2&e,l=4&e;if(r&&(s=o?r(t,i,o,a):r(t)),s!==n)return s;if(!es(t))return t;var h=Ha(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&zt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return ki(t,s)}else{var d=go(t),f=d==L||d==_;if(qa(t))return Ni(t,u);if(d==S||d==y||f&&!o){if(s=c||f?{}:bo(t),!u)return c?function(t,e){return ji(t,mo(t),e)}(t,function(t,e){return t&&ji(e,Cs(e),t)}(s,t)):function(t,e){return ji(t,po(t),e)}(t,or(s,t))}else{if(!ue[d])return o?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case C:return Ei(t);case w:case v:return new r(+t);case D:return function(t,e){var n=e?Ei(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case O:case z:case P:case R:case B:case U:case Y:case F:case W:return Si(t,n);case N:return new r;case E:case k:return new r(t);case A:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case I:return new r;case j:return i=t,Bn?xt(Bn.call(i)):{}}var i}(t,d,u)}}a||(a=new Jn);var p=a.get(t);if(p)return p;a.set(t,s),ss(t)?t.forEach((function(n){s.add(cr(n,e,r,n,t,a))})):rs(t)&&t.forEach((function(n,i){s.set(i,cr(n,e,r,i,t,a))}));var m=h?n:(l?c?oo:io:c?Cs:Ts)(t);return Ae(m||t,(function(n,i){m&&(n=t[i=n]),nr(s,i,cr(n,e,r,i,t,a))})),s}function lr(t,e,r){var i=r.length;if(null==t)return!i;for(t=xt(t);i--;){var o=r[i],a=e[o],s=t[o];if(s===n&&!(o in t)||!a(s))return!1}return!0}function hr(t,e,r){if("function"!=typeof t)throw new kt(i);return To((function(){t.apply(n,r)}),e)}function dr(t,e,n,r){var i=-1,o=Te,a=!0,s=t.length,u=[],c=e.length;if(!s)return u;n&&(e=De(e,Xe(n))),r?(o=Ce,a=!1):e.length>=200&&(o=tn,a=!1,e=new qn(e));t:for(;++i<s;){var l=t[i],h=null==n?l:n(l);if(l=r||0!==l?l:0,a&&h==h){for(var d=c;d--;)if(e[d]===h)continue t;u.push(l)}else o(e,h,r)||u.push(l)}return u}Yn.templateSettings={escape:K,evaluate:X,interpolate:$,variable:"",imports:{_:Yn}},Yn.prototype=Wn.prototype,Yn.prototype.constructor=Yn,Qn.prototype=Fn(Wn.prototype),Qn.prototype.constructor=Qn,Hn.prototype=Fn(Wn.prototype),Hn.prototype.constructor=Hn,Gn.prototype.clear=function(){this.__data__=kn?kn(null):{},this.size=0},Gn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Gn.prototype.get=function(t){var e=this.__data__;if(kn){var r=e[t];return r===o?n:r}return zt.call(e,t)?e[t]:n},Gn.prototype.has=function(t){var e=this.__data__;return kn?e[t]!==n:zt.call(e,t)},Gn.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=kn&&e===n?o:e,this},Zn.prototype.clear=function(){this.__data__=[],this.size=0},Zn.prototype.delete=function(t){var e=this.__data__,n=rr(e,t);return!(n<0)&&(n==e.length-1?e.pop():Jt.call(e,n,1),--this.size,!0)},Zn.prototype.get=function(t){var e=this.__data__,r=rr(e,t);return r<0?n:e[r][1]},Zn.prototype.has=function(t){return rr(this.__data__,t)>-1},Zn.prototype.set=function(t,e){var n=this.__data__,r=rr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(Sn||Zn),string:new Gn}},Vn.prototype.delete=function(t){var e=lo(this,t).delete(t);return this.size-=e?1:0,e},Vn.prototype.get=function(t){return lo(this,t).get(t)},Vn.prototype.has=function(t){return lo(this,t).has(t)},Vn.prototype.set=function(t,e){var n=lo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(t){return this.__data__.set(t,o),this},qn.prototype.has=function(t){return this.__data__.has(t)},Jn.prototype.clear=function(){this.__data__=new Zn,this.size=0},Jn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Jn.prototype.get=function(t){return this.__data__.get(t)},Jn.prototype.has=function(t){return this.__data__.has(t)},Jn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Zn){var r=n.__data__;if(!Sn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Vn(r)}return n.set(t,e),this.size=n.size,this};var fr=Di(Mr),pr=Di(Lr,!0);function mr(t,e){var n=!0;return fr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function gr(t,e,r){for(var i=-1,o=t.length;++i<o;){var a=t[i],s=e(a);if(null!=s&&(u===n?s==s&&!cs(s):r(s,u)))var u=s,c=a}return c}function yr(t,e){var n=[];return fr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function br(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=wo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?br(s,e-1,n,r,i):Oe(i,s):r||(i[i.length]=s)}return i}var wr=Oi(),vr=Oi(!0);function Mr(t,e){return t&&wr(t,e,Ts)}function Lr(t,e){return t&&vr(t,e,Ts)}function _r(t,e){return je(e,(function(e){return Xa(t[e])}))}function Nr(t,e){for(var r=0,i=(e=vi(e,t)).length;null!=t&&r<i;)t=t[Ro(e[r++])];return r&&r==i?t:n}function Er(t,e,n){var r=e(t);return Ha(t)?r:Oe(r,n(t))}function Sr(t){return null==t?t===n?"[object Undefined]":"[object Null]":ee&&ee in xt(t)?function(t){var e=zt.call(t,ee),r=t[ee];try{t[ee]=n;var i=!0}catch(t){}var o=Bt.call(t);i&&(e?t[ee]=r:delete t[ee]);return o}(t):function(t){return Bt.call(t)}(t)}function xr(t,e){return t>e}function Ar(t,e){return null!=t&&zt.call(t,e)}function Ir(t,e){return null!=t&&e in xt(t)}function kr(t,e,r){for(var i=r?Ce:Te,o=t[0].length,a=t.length,s=a,u=at(a),c=1/0,l=[];s--;){var h=t[s];s&&e&&(h=De(h,Xe(e))),c=vn(h.length,c),u[s]=!r&&(e||o>=120&&h.length>=120)?new qn(s&&h):n}h=t[0];var d=-1,f=u[0];t:for(;++d<o&&l.length<c;){var p=h[d],m=e?e(p):p;if(p=r||0!==p?p:0,!(f?tn(f,m):i(l,m,r))){for(s=a;--s;){var g=u[s];if(!(g?tn(g,m):i(t[s],m,r)))continue t}f&&f.push(m),l.push(p)}}return l}function jr(t,e,r){var i=null==(t=Io(t,e=vi(e,t)))?t:t[Ro(Ko(e))];return null==i?n:Se(i,t,r)}function Tr(t){return ns(t)&&Sr(t)==y}function Cr(t,e,r,i,o){return t===e||(null==t||null==e||!ns(t)&&!ns(e)?t!=t&&e!=e:function(t,e,r,i,o,a){var s=Ha(t),u=Ha(e),c=s?b:go(t),l=u?b:go(e),h=(c=c==y?S:c)==S,d=(l=l==y?S:l)==S,f=c==l;if(f&&qa(t)){if(!qa(e))return!1;s=!0,h=!1}if(f&&!h)return a||(a=new Jn),s||ls(t)?no(t,e,r,i,o,a):function(t,e,n,r,i,o,a){switch(n){case D:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case C:return!(t.byteLength!=e.byteLength||!o(new Ht(t),new Ht(e)));case w:case v:case E:return Ya(+t,+e);case M:return t.name==e.name&&t.message==e.message;case A:case k:return t==e+"";case N:var s=un;case I:var u=1&r;if(s||(s=hn),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=no(s(t),s(e),r,i,o,a);return a.delete(t),l;case j:if(Bn)return Bn.call(t)==Bn.call(e)}return!1}(t,e,c,r,i,o,a);if(!(1&r)){var p=h&&zt.call(t,"__wrapped__"),m=d&&zt.call(e,"__wrapped__");if(p||m){var g=p?t.value():t,L=m?e.value():e;return a||(a=new Jn),o(g,L,r,i,a)}}if(!f)return!1;return a||(a=new Jn),function(t,e,r,i,o,a){var s=1&r,u=io(t),c=u.length,l=io(e),h=l.length;if(c!=h&&!s)return!1;var d=c;for(;d--;){var f=u[d];if(!(s?f in e:zt.call(e,f)))return!1}var p=a.get(t),m=a.get(e);if(p&&m)return p==e&&m==t;var g=!0;a.set(t,e),a.set(e,t);var y=s;for(;++d<c;){var b=t[f=u[d]],w=e[f];if(i)var v=s?i(w,b,f,e,t,a):i(b,w,f,t,e,a);if(!(v===n?b===w||o(b,w,r,i,a):v)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var M=t.constructor,L=e.constructor;M==L||!("constructor"in t)||!("constructor"in e)||"function"==typeof M&&M instanceof M&&"function"==typeof L&&L instanceof L||(g=!1)}return a.delete(t),a.delete(e),g}(t,e,r,i,o,a)}(t,e,r,i,Cr,o))}function Dr(t,e,r,i){var o=r.length,a=o,s=!i;if(null==t)return!a;for(t=xt(t);o--;){var u=r[o];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=r[o])[0],l=t[c],h=u[1];if(s&&u[2]){if(l===n&&!(c in t))return!1}else{var d=new Jn;if(i)var f=i(l,h,c,t,e,d);if(!(f===n?Cr(h,l,3,i,d):f))return!1}}return!0}function Or(t){return!(!es(t)||(e=t,Rt&&Rt in e))&&(Xa(t)?Ft:yt).test(Bo(t));var e}function zr(t){return"function"==typeof t?t:null==t?iu:"object"==typeof t?Ha(t)?Fr(t[0],t[1]):Yr(t):fu(t)}function Pr(t){if(!Eo(t))return bn(t);var e=[];for(var n in xt(t))zt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Rr(t){if(!es(t))return function(t){var e=[];if(null!=t)for(var n in xt(t))e.push(n);return e}(t);var e=Eo(t),n=[];for(var r in t)("constructor"!=r||!e&&zt.call(t,r))&&n.push(r);return n}function Br(t,e){return t<e}function Ur(t,e){var n=-1,r=Za(t)?at(t.length):[];return fr(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Yr(t){var e=ho(t);return 1==e.length&&e[0][2]?xo(e[0][0],e[0][1]):function(n){return n===t||Dr(n,t,e)}}function Fr(t,e){return Lo(t)&&So(e)?xo(Ro(t),e):function(r){var i=xs(r,t);return i===n&&i===e?As(r,t):Cr(e,i,3)}}function Wr(t,e,r,i,o){t!==e&&wr(e,(function(a,s){if(o||(o=new Jn),es(a))!function(t,e,r,i,o,a,s){var u=ko(t,r),c=ko(e,r),l=s.get(c);if(l)return void er(t,r,l);var h=a?a(u,c,r+"",t,e,s):n,d=h===n;if(d){var f=Ha(c),p=!f&&qa(c),m=!f&&!p&&ls(c);h=c,f||p||m?Ha(u)?h=u:Va(u)?h=ki(u):p?(d=!1,h=Ni(c,!0)):m?(d=!1,h=Si(c,!0)):h=[]:os(c)||Qa(c)?(h=u,Qa(u)?h=bs(u):es(u)&&!Xa(u)||(h=bo(c))):d=!1}d&&(s.set(c,h),o(h,c,i,a,s),s.delete(c));er(t,r,h)}(t,e,s,r,Wr,i,o);else{var u=i?i(ko(t,s),a,s+"",t,e,o):n;u===n&&(u=a),er(t,s,u)}}),Cs)}function Qr(t,e){var r=t.length;if(r)return vo(e+=e<0?r:0,r)?t[e]:n}function Hr(t,e,n){e=e.length?De(e,(function(t){return Ha(t)?function(e){return Nr(e,1===t.length?t[0]:t)}:t})):[iu];var r=-1;e=De(e,Xe(co()));var i=Ur(t,(function(t,n,i){var o=De(e,(function(e){return e(t)}));return{criteria:o,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(i,(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;for(;++r<a;){var u=xi(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Gr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Nr(t,a);n(s,a)&&ti(o,vi(a,t),s)}return o}function Zr(t,e,n,r){var i=r?We:Fe,o=-1,a=e.length,s=t;for(t===e&&(e=ki(e)),n&&(s=De(t,Xe(n)));++o<a;)for(var u=0,c=e[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==t&&Jt.call(s,u,1),Jt.call(t,u,1);return t}function Vr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;vo(i)?Jt.call(t,i,1):di(t,i)}}return t}function qr(t,e){return t+ge(_n()*(e-t+1))}function Jr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Kr(t,e){return Co(Ao(t,e,iu),t+"")}function Xr(t){return Xn(Ys(t))}function $r(t,e){var n=Ys(t);return zo(n,ur(e,0,n.length))}function ti(t,e,r,i){if(!es(t))return t;for(var o=-1,a=(e=vi(e,t)).length,s=a-1,u=t;null!=u&&++o<a;){var c=Ro(e[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=s){var h=u[c];(l=i?i(h,c,u):n)===n&&(l=es(h)?h:vo(e[o+1])?[]:{})}nr(u,c,l),u=u[c]}return t}var ei=jn?function(t,e){return jn.set(t,e),t}:iu,ni=re?function(t,e){return re(t,"toString",{configurable:!0,enumerable:!1,value:eu(e),writable:!0})}:iu;function ri(t){return zo(Ys(t))}function ii(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=at(i);++r<i;)o[r]=t[r+e];return o}function oi(t,e){var n;return fr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ai(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!cs(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return si(t,e,iu,n)}function si(t,e,r,i){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(e=r(e))!=e,u=null===e,c=cs(e),l=e===n;o<a;){var h=ge((o+a)/2),d=r(t[h]),f=d!==n,p=null===d,m=d==d,g=cs(d);if(s)var y=i||m;else y=l?m&&(i||f):u?m&&f&&(i||!p):c?m&&f&&!p&&(i||!g):!p&&!g&&(i?d<=e:d<e);y?o=h+1:a=h}return vn(a,4294967294)}function ui(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!Ya(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ci(t){return"number"==typeof t?t:cs(t)?p:+t}function li(t){if("string"==typeof t)return t;if(Ha(t))return De(t,li)+"";if(cs(t))return Un?Un.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function hi(t,e,n){var r=-1,i=Te,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Ce;else if(o>=200){var c=e?null:Ji(t);if(c)return hn(c);a=!1,i=tn,u=new qn}else u=e?[]:s;t:for(;++r<o;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,a&&h==h){for(var d=u.length;d--;)if(u[d]===h)continue t;e&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}function di(t,e){return null==(t=Io(t,e=vi(e,t)))||delete t[Ro(Ko(e))]}function fi(t,e,n,r){return ti(t,e,n(Nr(t,e)),r)}function pi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?ii(t,r?0:o,r?o+1:i):ii(t,r?o+1:0,r?i:o)}function mi(t,e){var n=t;return n instanceof Hn&&(n=n.value()),ze(e,(function(t,e){return e.func.apply(e.thisArg,Oe([t],e.args))}),n)}function gi(t,e,n){var r=t.length;if(r<2)return r?hi(t[0]):[];for(var i=-1,o=at(r);++i<r;)for(var a=t[i],s=-1;++s<r;)s!=i&&(o[i]=dr(o[i]||a,t[s],e,n));return hi(br(o,1),e,n)}function yi(t,e,r){for(var i=-1,o=t.length,a=e.length,s={};++i<o;){var u=i<a?e[i]:n;r(s,t[i],u)}return s}function bi(t){return Va(t)?t:[]}function wi(t){return"function"==typeof t?t:iu}function vi(t,e){return Ha(t)?t:Lo(t,e)?[t]:Po(ws(t))}var Mi=Kr;function Li(t,e,r){var i=t.length;return r=r===n?i:r,!e&&r>=i?t:ii(t,e,r)}var _i=ce||function(t){return pe.clearTimeout(t)};function Ni(t,e){if(e)return t.slice();var n=t.length,r=Gt?Gt(n):new t.constructor(n);return t.copy(r),r}function Ei(t){var e=new t.constructor(t.byteLength);return new Ht(e).set(new Ht(t)),e}function Si(t,e){var n=e?Ei(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function xi(t,e){if(t!==e){var r=t!==n,i=null===t,o=t==t,a=cs(t),s=e!==n,u=null===e,c=e==e,l=cs(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!l&&t<e||l&&r&&o&&!i&&!a||u&&r&&o||!s&&o||!c)return-1}return 0}function Ai(t,e,n,r){for(var i=-1,o=t.length,a=n.length,s=-1,u=e.length,c=wn(o-a,0),l=at(u+c),h=!r;++s<u;)l[s]=e[s];for(;++i<a;)(h||i<o)&&(l[n[i]]=t[i]);for(;c--;)l[s++]=t[i++];return l}function Ii(t,e,n,r){for(var i=-1,o=t.length,a=-1,s=n.length,u=-1,c=e.length,l=wn(o-s,0),h=at(l+c),d=!r;++i<l;)h[i]=t[i];for(var f=i;++u<c;)h[f+u]=e[u];for(;++a<s;)(d||i<o)&&(h[f+n[a]]=t[i++]);return h}function ki(t,e){var n=-1,r=t.length;for(e||(e=at(r));++n<r;)e[n]=t[n];return e}function ji(t,e,r,i){var o=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var u=e[a],c=i?i(r[u],t[u],u,r,t):n;c===n&&(c=t[u]),o?ar(r,u,c):nr(r,u,c)}return r}function Ti(t,e){return function(n,r){var i=Ha(n)?xe:ir,o=e?e():{};return i(n,t,co(r,2),o)}}function Ci(t){return Kr((function(e,r){var i=-1,o=r.length,a=o>1?r[o-1]:n,s=o>2?r[2]:n;for(a=t.length>3&&"function"==typeof a?(o--,a):n,s&&Mo(r[0],r[1],s)&&(a=o<3?n:a,o=1),e=xt(e);++i<o;){var u=r[i];u&&t(e,u,i,a)}return e}))}function Di(t,e){return function(n,r){if(null==n)return n;if(!Za(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=xt(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Oi(t){return function(e,n,r){for(var i=-1,o=xt(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function zi(t){return function(e){var r=sn(e=ws(e))?pn(e):n,i=r?r[0]:e.charAt(0),o=r?Li(r,1).join(""):e.slice(1);return i[t]()+o}}function Pi(t){return function(e){return ze(Xs(Qs(e).replace($t,"")),t,"")}}function Ri(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Fn(t.prototype),r=t.apply(n,e);return es(r)?r:n}}function Bi(t){return function(e,r,i){var o=xt(e);if(!Za(e)){var a=co(r,3);e=Ts(e),r=function(t){return a(o[t],t,o)}}var s=t(e,r,i);return s>-1?o[a?e[s]:s]:n}}function Ui(t){return ro((function(e){var r=e.length,o=r,a=Qn.prototype.thru;for(t&&e.reverse();o--;){var s=e[o];if("function"!=typeof s)throw new kt(i);if(a&&!u&&"wrapper"==so(s))var u=new Qn([],!0)}for(o=u?o:r;++o<r;){var c=so(s=e[o]),l="wrapper"==c?ao(s):n;u=l&&_o(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[so(l[0])].apply(u,l[3]):1==s.length&&_o(s)?u[c]():u.thru(s)}return function(){var t=arguments,n=t[0];if(u&&1==t.length&&Ha(n))return u.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}}))}function Yi(t,e,r,i,o,a,s,u,c,h){var d=e&l,f=1&e,p=2&e,m=24&e,g=512&e,y=p?n:Ri(t);return function l(){for(var b=arguments.length,w=at(b),v=b;v--;)w[v]=arguments[v];if(m)var M=uo(l),L=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(w,M);if(i&&(w=Ai(w,i,o,m)),a&&(w=Ii(w,a,s,m)),b-=L,m&&b<h){var _=ln(w,M);return Vi(t,e,Yi,l.placeholder,r,w,_,u,c,h-b)}var N=f?r:this,E=p?N[t]:t;return b=w.length,u?w=function(t,e){var r=t.length,i=vn(e.length,r),o=ki(t);for(;i--;){var a=e[i];t[i]=vo(a,r)?o[a]:n}return t}(w,u):g&&b>1&&w.reverse(),d&&c<b&&(w.length=c),this&&this!==pe&&this instanceof l&&(E=y||Ri(E)),E.apply(N,w)}}function Fi(t,e){return function(n,r){return function(t,e,n,r){return Mr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Wi(t,e){return function(r,i){var o;if(r===n&&i===n)return e;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=li(r),i=li(i)):(r=ci(r),i=ci(i)),o=t(r,i)}return o}}function Qi(t){return ro((function(e){return e=De(e,Xe(co())),Kr((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function Hi(t,e){var r=(e=e===n?" ":li(e)).length;if(r<2)return r?Jr(e,t):e;var i=Jr(e,me(t/fn(e)));return sn(e)?Li(pn(i),0,t).join(""):i.slice(0,t)}function Gi(t){return function(e,r,i){return i&&"number"!=typeof i&&Mo(e,r,i)&&(r=i=n),e=ps(e),r===n?(r=e,e=0):r=ps(r),function(t,e,n,r){for(var i=-1,o=wn(me((e-t)/(n||1)),0),a=at(o);o--;)a[r?o:++i]=t,t+=n;return a}(e,r,i=i===n?e<r?1:-1:ps(i),t)}}function Zi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ys(e),n=ys(n)),t(e,n)}}function Vi(t,e,r,i,o,a,s,l,h,d){var f=8&e;e|=f?u:c,4&(e&=~(f?c:u))||(e&=-4);var p=[t,e,o,f?a:n,f?s:n,f?n:a,f?n:s,l,h,d],m=r.apply(n,p);return _o(t)&&jo(m,p),m.placeholder=i,Do(m,t,e)}function qi(t){var e=St[t];return function(t,n){if(t=ys(t),(n=null==n?0:vn(ms(n),292))&&Be(t)){var r=(ws(t)+"e").split("e");return+((r=(ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ji=An&&1/hn(new An([,-0]))[1]==d?function(t){return new An(t)}:cu;function Ki(t){return function(e){var n=go(e);return n==N?un(e):n==I?dn(e):function(t,e){return De(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Xi(t,e,r,o,d,f,p,m){var g=2&e;if(!g&&"function"!=typeof t)throw new kt(i);var y=o?o.length:0;if(y||(e&=-97,o=d=n),p=p===n?p:wn(ms(p),0),m=m===n?m:ms(m),y-=d?d.length:0,e&c){var b=o,w=d;o=d=n}var v=g?n:ao(t),M=[t,e,r,o,d,b,w,f,p,m];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,s=r==l&&8==n||r==l&&n==h&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!s)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var c=t[3];t[3]=c?Ai(c,u,e[4]):u,t[4]=c?ln(t[3],a):e[4]}(u=e[5])&&(c=t[5],t[5]=c?Ii(c,u,e[6]):u,t[6]=c?ln(t[5],a):e[6]);(u=e[7])&&(t[7]=u);r&l&&(t[8]=null==t[8]?e[8]:vn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(M,v),t=M[0],e=M[1],r=M[2],o=M[3],d=M[4],!(m=M[9]=M[9]===n?g?0:t.length:wn(M[9]-y,0))&&24&e&&(e&=-25),e&&1!=e)L=8==e||e==s?function(t,e,r){var i=Ri(t);return function o(){for(var a=arguments.length,s=at(a),u=a,c=uo(o);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:ln(s,c);return(a-=l.length)<r?Vi(t,e,Yi,o.placeholder,n,s,l,n,n,r-a):Se(this&&this!==pe&&this instanceof o?i:t,this,s)}}(t,e,m):e!=u&&33!=e||d.length?Yi.apply(n,M):function(t,e,n,r){var i=1&e,o=Ri(t);return function e(){for(var a=-1,s=arguments.length,u=-1,c=r.length,l=at(c+s),h=this&&this!==pe&&this instanceof e?o:t;++u<c;)l[u]=r[u];for(;s--;)l[u++]=arguments[++a];return Se(h,i?n:this,l)}}(t,e,r,o);else var L=function(t,e,n){var r=1&e,i=Ri(t);return function e(){return(this&&this!==pe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,r);return Do((v?ei:jo)(L,M),t,e)}function $i(t,e,r,i){return t===n||Ya(t,Ct[r])&&!zt.call(i,r)?e:t}function to(t,e,r,i,o,a){return es(t)&&es(e)&&(a.set(e,t),Wr(t,e,n,to,a),a.delete(e)),t}function eo(t){return os(t)?n:t}function no(t,e,r,i,o,a){var s=1&r,u=t.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(t),h=a.get(e);if(l&&h)return l==e&&h==t;var d=-1,f=!0,p=2&r?new qn:n;for(a.set(t,e),a.set(e,t);++d<u;){var m=t[d],g=e[d];if(i)var y=s?i(g,m,d,e,t,a):i(m,g,d,t,e,a);if(y!==n){if(y)continue;f=!1;break}if(p){if(!Re(e,(function(t,e){if(!tn(p,e)&&(m===t||o(m,t,r,i,a)))return p.push(e)}))){f=!1;break}}else if(m!==g&&!o(m,g,r,i,a)){f=!1;break}}return a.delete(t),a.delete(e),f}function ro(t){return Co(Ao(t,n,Go),t+"")}function io(t){return Er(t,Ts,po)}function oo(t){return Er(t,Cs,mo)}var ao=jn?function(t){return jn.get(t)}:cu;function so(t){for(var e=t.name+"",n=Tn[e],r=zt.call(Tn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function uo(t){return(zt.call(Yn,"placeholder")?Yn:t).placeholder}function co(){var t=Yn.iteratee||ou;return t=t===ou?zr:t,arguments.length?t(arguments[0],arguments[1]):t}function lo(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function ho(t){for(var e=Ts(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,So(i)]}return e}function fo(t,e){var r=function(t,e){return null==t?n:t[e]}(t,e);return Or(r)?r:n}var po=be?function(t){return null==t?[]:(t=xt(t),je(be(t),(function(e){return qt.call(t,e)})))}:gu,mo=be?function(t){for(var e=[];t;)Oe(e,po(t)),t=Zt(t);return e}:gu,go=Sr;function yo(t,e,n){for(var r=-1,i=(e=vi(e,t)).length,o=!1;++r<i;){var a=Ro(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&ts(i)&&vo(a,i)&&(Ha(t)||Qa(t))}function bo(t){return"function"!=typeof t.constructor||Eo(t)?{}:Fn(Zt(t))}function wo(t){return Ha(t)||Qa(t)||!!(Kt&&t&&t[Kt])}function vo(t,e){var n=typeof t;return!!(e=null==e?f:e)&&("number"==n||"symbol"!=n&&wt.test(t))&&t>-1&&t%1==0&&t<e}function Mo(t,e,n){if(!es(n))return!1;var r=typeof e;return!!("number"==r?Za(n)&&vo(e,n.length):"string"==r&&e in n)&&Ya(n[e],t)}function Lo(t,e){if(Ha(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!cs(t))||(et.test(t)||!tt.test(t)||null!=e&&t in xt(e))}function _o(t){var e=so(t),n=Yn[e];if("function"!=typeof n||!(e in Hn.prototype))return!1;if(t===n)return!0;var r=ao(n);return!!r&&t===r[0]}(En&&go(new En(new ArrayBuffer(1)))!=D||Sn&&go(new Sn)!=N||xn&&go(xn.resolve())!=x||An&&go(new An)!=I||In&&go(new In)!=T)&&(go=function(t){var e=Sr(t),r=e==S?t.constructor:n,i=r?Bo(r):"";if(i)switch(i){case Cn:return D;case Dn:return N;case On:return x;case zn:return I;case Pn:return T}return e});var No=Dt?Xa:yu;function Eo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ct)}function So(t){return t==t&&!es(t)}function xo(t,e){return function(r){return null!=r&&(r[t]===e&&(e!==n||t in xt(r)))}}function Ao(t,e,r){return e=wn(e===n?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=wn(n.length-e,0),a=at(o);++i<o;)a[i]=n[e+i];i=-1;for(var s=at(e+1);++i<e;)s[i]=n[i];return s[e]=r(a),Se(t,this,s)}}function Io(t,e){return e.length<2?t:Nr(t,ii(e,0,-1))}function ko(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var jo=Oo(ei),To=fe||function(t,e){return pe.setTimeout(t,e)},Co=Oo(ni);function Do(t,e,n){var r=e+"";return Co(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(st,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ae(g,(function(n){var r="_."+n[0];e&n[1]&&!Te(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(ut);return e?e[1].split(ct):[]}(r),n)))}function Oo(t){var e=0,r=0;return function(){var i=Mn(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(n,arguments)}}function zo(t,e){var r=-1,i=t.length,o=i-1;for(e=e===n?i:e;++r<e;){var a=qr(r,o),s=t[a];t[a]=t[r],t[r]=s}return t.length=e,t}var Po=function(t){var e=Oa(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(nt,(function(t,n,r,i){e.push(r?i.replace(dt,"$1"):n||t)})),e}));function Ro(t){if("string"==typeof t||cs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Bo(t){if(null!=t){try{return Ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Uo(t){if(t instanceof Hn)return t.clone();var e=new Qn(t.__wrapped__,t.__chain__);return e.__actions__=ki(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Yo=Kr((function(t,e){return Va(t)?dr(t,br(e,1,Va,!0)):[]})),Fo=Kr((function(t,e){var r=Ko(e);return Va(r)&&(r=n),Va(t)?dr(t,br(e,1,Va,!0),co(r,2)):[]})),Wo=Kr((function(t,e){var r=Ko(e);return Va(r)&&(r=n),Va(t)?dr(t,br(e,1,Va,!0),n,r):[]}));function Qo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=wn(r+i,0)),Ye(t,co(e,3),i)}function Ho(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==n&&(o=ms(r),o=r<0?wn(i+o,0):vn(o,i-1)),Ye(t,co(e,3),o,!0)}function Go(t){return(null==t?0:t.length)?br(t,1):[]}function Zo(t){return t&&t.length?t[0]:n}var Vo=Kr((function(t){var e=De(t,bi);return e.length&&e[0]===t[0]?kr(e):[]})),qo=Kr((function(t){var e=Ko(t),r=De(t,bi);return e===Ko(r)?e=n:r.pop(),r.length&&r[0]===t[0]?kr(r,co(e,2)):[]})),Jo=Kr((function(t){var e=Ko(t),r=De(t,bi);return(e="function"==typeof e?e:n)&&r.pop(),r.length&&r[0]===t[0]?kr(r,n,e):[]}));function Ko(t){var e=null==t?0:t.length;return e?t[e-1]:n}var Xo=Kr($o);function $o(t,e){return t&&t.length&&e&&e.length?Zr(t,e):t}var ta=ro((function(t,e){var n=null==t?0:t.length,r=sr(t,e);return Vr(t,De(e,(function(t){return vo(t,n)?+t:t})).sort(xi)),r}));function ea(t){return null==t?t:Nn.call(t)}var na=Kr((function(t){return hi(br(t,1,Va,!0))})),ra=Kr((function(t){var e=Ko(t);return Va(e)&&(e=n),hi(br(t,1,Va,!0),co(e,2))})),ia=Kr((function(t){var e=Ko(t);return e="function"==typeof e?e:n,hi(br(t,1,Va,!0),n,e)}));function oa(t){if(!t||!t.length)return[];var e=0;return t=je(t,(function(t){if(Va(t))return e=wn(t.length,e),!0})),Je(e,(function(e){return De(t,Ge(e))}))}function aa(t,e){if(!t||!t.length)return[];var r=oa(t);return null==e?r:De(r,(function(t){return Se(e,n,t)}))}var sa=Kr((function(t,e){return Va(t)?dr(t,e):[]})),ua=Kr((function(t){return gi(je(t,Va))})),ca=Kr((function(t){var e=Ko(t);return Va(e)&&(e=n),gi(je(t,Va),co(e,2))})),la=Kr((function(t){var e=Ko(t);return e="function"==typeof e?e:n,gi(je(t,Va),n,e)})),ha=Kr(oa);var da=Kr((function(t){var e=t.length,r=e>1?t[e-1]:n;return r="function"==typeof r?(t.pop(),r):n,aa(t,r)}));function fa(t){var e=Yn(t);return e.__chain__=!0,e}function pa(t,e){return e(t)}var ma=ro((function(t){var e=t.length,r=e?t[0]:0,i=this.__wrapped__,o=function(e){return sr(e,t)};return!(e>1||this.__actions__.length)&&i instanceof Hn&&vo(r)?((i=i.slice(r,+r+(e?1:0))).__actions__.push({func:pa,args:[o],thisArg:n}),new Qn(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(n),t}))):this.thru(o)}));var ga=Ti((function(t,e,n){zt.call(t,n)?++t[n]:ar(t,n,1)}));var ya=Bi(Qo),ba=Bi(Ho);function wa(t,e){return(Ha(t)?Ae:fr)(t,co(e,3))}function va(t,e){return(Ha(t)?Ie:pr)(t,co(e,3))}var Ma=Ti((function(t,e,n){zt.call(t,n)?t[n].push(e):ar(t,n,[e])}));var La=Kr((function(t,e,n){var r=-1,i="function"==typeof e,o=Za(t)?at(t.length):[];return fr(t,(function(t){o[++r]=i?Se(e,t,n):jr(t,e,n)})),o})),_a=Ti((function(t,e,n){ar(t,n,e)}));function Na(t,e){return(Ha(t)?De:Ur)(t,co(e,3))}var Ea=Ti((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var Sa=Kr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Mo(t,e[0],e[1])?e=[]:n>2&&Mo(e[0],e[1],e[2])&&(e=[e[0]]),Hr(t,br(e,1),[])})),xa=de||function(){return pe.Date.now()};function Aa(t,e,r){return e=r?n:e,e=t&&null==e?t.length:e,Xi(t,l,n,n,n,n,e)}function Ia(t,e){var r;if("function"!=typeof e)throw new kt(i);return t=ms(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=n),r}}var ka=Kr((function(t,e,n){var r=1;if(n.length){var i=ln(n,uo(ka));r|=u}return Xi(t,r,e,n,i)})),ja=Kr((function(t,e,n){var r=3;if(n.length){var i=ln(n,uo(ja));r|=u}return Xi(e,r,t,n,i)}));function Ta(t,e,r){var o,a,s,u,c,l,h=0,d=!1,f=!1,p=!0;if("function"!=typeof t)throw new kt(i);function m(e){var r=o,i=a;return o=a=n,h=e,u=t.apply(i,r)}function g(t){var r=t-l;return l===n||r>=e||r<0||f&&t-h>=s}function y(){var t=xa();if(g(t))return b(t);c=To(y,function(t){var n=e-(t-l);return f?vn(n,s-(t-h)):n}(t))}function b(t){return c=n,p&&o?m(t):(o=a=n,u)}function w(){var t=xa(),r=g(t);if(o=arguments,a=this,l=t,r){if(c===n)return function(t){return h=t,c=To(y,e),d?m(t):u}(l);if(f)return _i(c),c=To(y,e),m(l)}return c===n&&(c=To(y,e)),u}return e=ys(e)||0,es(r)&&(d=!!r.leading,s=(f="maxWait"in r)?wn(ys(r.maxWait)||0,e):s,p="trailing"in r?!!r.trailing:p),w.cancel=function(){c!==n&&_i(c),h=0,o=l=a=c=n},w.flush=function(){return c===n?u:b(xa())},w}var Ca=Kr((function(t,e){return hr(t,1,e)})),Da=Kr((function(t,e,n){return hr(t,ys(e)||0,n)}));function Oa(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new kt(i);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Oa.Cache||Vn),n}function za(t){if("function"!=typeof t)throw new kt(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Oa.Cache=Vn;var Pa=Mi((function(t,e){var n=(e=1==e.length&&Ha(e[0])?De(e[0],Xe(co())):De(br(e,1),Xe(co()))).length;return Kr((function(r){for(var i=-1,o=vn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return Se(t,this,r)}))})),Ra=Kr((function(t,e){var r=ln(e,uo(Ra));return Xi(t,u,n,e,r)})),Ba=Kr((function(t,e){var r=ln(e,uo(Ba));return Xi(t,c,n,e,r)})),Ua=ro((function(t,e){return Xi(t,h,n,n,n,e)}));function Ya(t,e){return t===e||t!=t&&e!=e}var Fa=Zi(xr),Wa=Zi((function(t,e){return t>=e})),Qa=Tr(function(){return arguments}())?Tr:function(t){return ns(t)&&zt.call(t,"callee")&&!qt.call(t,"callee")},Ha=at.isArray,Ga=ve?Xe(ve):function(t){return ns(t)&&Sr(t)==C};function Za(t){return null!=t&&ts(t.length)&&!Xa(t)}function Va(t){return ns(t)&&Za(t)}var qa=we||yu,Ja=Me?Xe(Me):function(t){return ns(t)&&Sr(t)==v};function Ka(t){if(!ns(t))return!1;var e=Sr(t);return e==M||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!os(t)}function Xa(t){if(!es(t))return!1;var e=Sr(t);return e==L||e==_||"[object AsyncFunction]"==e||"[object Proxy]"==e}function $a(t){return"number"==typeof t&&t==ms(t)}function ts(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function es(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ns(t){return null!=t&&"object"==typeof t}var rs=Le?Xe(Le):function(t){return ns(t)&&go(t)==N};function is(t){return"number"==typeof t||ns(t)&&Sr(t)==E}function os(t){if(!ns(t)||Sr(t)!=S)return!1;var e=Zt(t);if(null===e)return!0;var n=zt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ot.call(n)==Ut}var as=_e?Xe(_e):function(t){return ns(t)&&Sr(t)==A};var ss=Ne?Xe(Ne):function(t){return ns(t)&&go(t)==I};function us(t){return"string"==typeof t||!Ha(t)&&ns(t)&&Sr(t)==k}function cs(t){return"symbol"==typeof t||ns(t)&&Sr(t)==j}var ls=Ee?Xe(Ee):function(t){return ns(t)&&ts(t.length)&&!!se[Sr(t)]};var hs=Zi(Br),ds=Zi((function(t,e){return t<=e}));function fs(t){if(!t)return[];if(Za(t))return us(t)?pn(t):ki(t);if(Xt&&t[Xt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Xt]());var e=go(t);return(e==N?un:e==I?hn:Ys)(t)}function ps(t){return t?(t=ys(t))===d||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ms(t){var e=ps(t),n=e%1;return e==e?n?e-n:e:0}function gs(t){return t?ur(ms(t),0,m):0}function ys(t){if("number"==typeof t)return t;if(cs(t))return p;if(es(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=es(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ke(t);var n=gt.test(t);return n||bt.test(t)?he(t.slice(2),n?2:8):mt.test(t)?p:+t}function bs(t){return ji(t,Cs(t))}function ws(t){return null==t?"":li(t)}var vs=Ci((function(t,e){if(Eo(e)||Za(e))ji(e,Ts(e),t);else for(var n in e)zt.call(e,n)&&nr(t,n,e[n])})),Ms=Ci((function(t,e){ji(e,Cs(e),t)})),Ls=Ci((function(t,e,n,r){ji(e,Cs(e),t,r)})),_s=Ci((function(t,e,n,r){ji(e,Ts(e),t,r)})),Ns=ro(sr);var Es=Kr((function(t,e){t=xt(t);var r=-1,i=e.length,o=i>2?e[2]:n;for(o&&Mo(e[0],e[1],o)&&(i=1);++r<i;)for(var a=e[r],s=Cs(a),u=-1,c=s.length;++u<c;){var l=s[u],h=t[l];(h===n||Ya(h,Ct[l])&&!zt.call(t,l))&&(t[l]=a[l])}return t})),Ss=Kr((function(t){return t.push(n,to),Se(Os,n,t)}));function xs(t,e,r){var i=null==t?n:Nr(t,e);return i===n?r:i}function As(t,e){return null!=t&&yo(t,e,Ir)}var Is=Fi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),t[e]=n}),eu(iu)),ks=Fi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),zt.call(t,e)?t[e].push(n):t[e]=[n]}),co),js=Kr(jr);function Ts(t){return Za(t)?Kn(t):Pr(t)}function Cs(t){return Za(t)?Kn(t,!0):Rr(t)}var Ds=Ci((function(t,e,n){Wr(t,e,n)})),Os=Ci((function(t,e,n,r){Wr(t,e,n,r)})),zs=ro((function(t,e){var n={};if(null==t)return n;var r=!1;e=De(e,(function(e){return e=vi(e,t),r||(r=e.length>1),e})),ji(t,oo(t),n),r&&(n=cr(n,7,eo));for(var i=e.length;i--;)di(n,e[i]);return n}));var Ps=ro((function(t,e){return null==t?{}:function(t,e){return Gr(t,e,(function(e,n){return As(t,n)}))}(t,e)}));function Rs(t,e){if(null==t)return{};var n=De(oo(t),(function(t){return[t]}));return e=co(e),Gr(t,n,(function(t,n){return e(t,n[0])}))}var Bs=Ki(Ts),Us=Ki(Cs);function Ys(t){return null==t?[]:$e(t,Ts(t))}var Fs=Pi((function(t,e,n){return e=e.toLowerCase(),t+(n?Ws(e):e)}));function Ws(t){return Ks(ws(t).toLowerCase())}function Qs(t){return(t=ws(t))&&t.replace(vt,rn).replace(te,"")}var Hs=Pi((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Gs=Pi((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Zs=zi("toLowerCase");var Vs=Pi((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var qs=Pi((function(t,e,n){return t+(n?" ":"")+Ks(e)}));var Js=Pi((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ks=zi("toUpperCase");function Xs(t,e,r){return t=ws(t),(e=r?n:e)===n?function(t){return ie.test(t)}(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.match(lt)||[]}(t):t.match(e)||[]}var $s=Kr((function(t,e){try{return Se(t,n,e)}catch(t){return Ka(t)?t:new Nt(t)}})),tu=ro((function(t,e){return Ae(e,(function(e){e=Ro(e),ar(t,e,ka(t[e],t))})),t}));function eu(t){return function(){return t}}var nu=Ui(),ru=Ui(!0);function iu(t){return t}function ou(t){return zr("function"==typeof t?t:cr(t,1))}var au=Kr((function(t,e){return function(n){return jr(n,t,e)}})),su=Kr((function(t,e){return function(n){return jr(t,n,e)}}));function uu(t,e,n){var r=Ts(e),i=_r(e,r);null!=n||es(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=_r(e,Ts(e)));var o=!(es(n)&&"chain"in n&&!n.chain),a=Xa(t);return Ae(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ki(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Oe([this.value()],arguments))})})),t}function cu(){}var lu=Qi(De),hu=Qi(ke),du=Qi(Re);function fu(t){return Lo(t)?Ge(Ro(t)):function(t){return function(e){return Nr(e,t)}}(t)}var pu=Gi(),mu=Gi(!0);function gu(){return[]}function yu(){return!1}var bu=Wi((function(t,e){return t+e}),0),wu=qi("ceil"),vu=Wi((function(t,e){return t/e}),1),Mu=qi("floor");var Lu,_u=Wi((function(t,e){return t*e}),1),Nu=qi("round"),Eu=Wi((function(t,e){return t-e}),0);return Yn.after=function(t,e){if("function"!=typeof e)throw new kt(i);return t=ms(t),function(){if(--t<1)return e.apply(this,arguments)}},Yn.ary=Aa,Yn.assign=vs,Yn.assignIn=Ms,Yn.assignInWith=Ls,Yn.assignWith=_s,Yn.at=Ns,Yn.before=Ia,Yn.bind=ka,Yn.bindAll=tu,Yn.bindKey=ja,Yn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ha(t)?t:[t]},Yn.chain=fa,Yn.chunk=function(t,e,r){e=(r?Mo(t,e,r):e===n)?1:wn(ms(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,a=0,s=at(me(i/e));o<i;)s[a++]=ii(t,o,o+=e);return s},Yn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Yn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=at(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Oe(Ha(n)?ki(n):[n],br(e,1))},Yn.cond=function(t){var e=null==t?0:t.length,n=co();return t=e?De(t,(function(t){if("function"!=typeof t[1])throw new kt(i);return[n(t[0]),t[1]]})):[],Kr((function(n){for(var r=-1;++r<e;){var i=t[r];if(Se(i[0],this,n))return Se(i[1],this,n)}}))},Yn.conforms=function(t){return function(t){var e=Ts(t);return function(n){return lr(n,t,e)}}(cr(t,1))},Yn.constant=eu,Yn.countBy=ga,Yn.create=function(t,e){var n=Fn(t);return null==e?n:or(n,e)},Yn.curry=function t(e,r,i){var o=Xi(e,8,n,n,n,n,n,r=i?n:r);return o.placeholder=t.placeholder,o},Yn.curryRight=function t(e,r,i){var o=Xi(e,s,n,n,n,n,n,r=i?n:r);return o.placeholder=t.placeholder,o},Yn.debounce=Ta,Yn.defaults=Es,Yn.defaultsDeep=Ss,Yn.defer=Ca,Yn.delay=Da,Yn.difference=Yo,Yn.differenceBy=Fo,Yn.differenceWith=Wo,Yn.drop=function(t,e,r){var i=null==t?0:t.length;return i?ii(t,(e=r||e===n?1:ms(e))<0?0:e,i):[]},Yn.dropRight=function(t,e,r){var i=null==t?0:t.length;return i?ii(t,0,(e=i-(e=r||e===n?1:ms(e)))<0?0:e):[]},Yn.dropRightWhile=function(t,e){return t&&t.length?pi(t,co(e,3),!0,!0):[]},Yn.dropWhile=function(t,e){return t&&t.length?pi(t,co(e,3),!0):[]},Yn.fill=function(t,e,r,i){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&Mo(t,e,r)&&(r=0,i=o),function(t,e,r,i){var o=t.length;for((r=ms(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:ms(i))<0&&(i+=o),i=r>i?0:gs(i);r<i;)t[r++]=e;return t}(t,e,r,i)):[]},Yn.filter=function(t,e){return(Ha(t)?je:yr)(t,co(e,3))},Yn.flatMap=function(t,e){return br(Na(t,e),1)},Yn.flatMapDeep=function(t,e){return br(Na(t,e),d)},Yn.flatMapDepth=function(t,e,r){return r=r===n?1:ms(r),br(Na(t,e),r)},Yn.flatten=Go,Yn.flattenDeep=function(t){return(null==t?0:t.length)?br(t,d):[]},Yn.flattenDepth=function(t,e){return(null==t?0:t.length)?br(t,e=e===n?1:ms(e)):[]},Yn.flip=function(t){return Xi(t,512)},Yn.flow=nu,Yn.flowRight=ru,Yn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},Yn.functions=function(t){return null==t?[]:_r(t,Ts(t))},Yn.functionsIn=function(t){return null==t?[]:_r(t,Cs(t))},Yn.groupBy=Ma,Yn.initial=function(t){return(null==t?0:t.length)?ii(t,0,-1):[]},Yn.intersection=Vo,Yn.intersectionBy=qo,Yn.intersectionWith=Jo,Yn.invert=Is,Yn.invertBy=ks,Yn.invokeMap=La,Yn.iteratee=ou,Yn.keyBy=_a,Yn.keys=Ts,Yn.keysIn=Cs,Yn.map=Na,Yn.mapKeys=function(t,e){var n={};return e=co(e,3),Mr(t,(function(t,r,i){ar(n,e(t,r,i),t)})),n},Yn.mapValues=function(t,e){var n={};return e=co(e,3),Mr(t,(function(t,r,i){ar(n,r,e(t,r,i))})),n},Yn.matches=function(t){return Yr(cr(t,1))},Yn.matchesProperty=function(t,e){return Fr(t,cr(e,1))},Yn.memoize=Oa,Yn.merge=Ds,Yn.mergeWith=Os,Yn.method=au,Yn.methodOf=su,Yn.mixin=uu,Yn.negate=za,Yn.nthArg=function(t){return t=ms(t),Kr((function(e){return Qr(e,t)}))},Yn.omit=zs,Yn.omitBy=function(t,e){return Rs(t,za(co(e)))},Yn.once=function(t){return Ia(2,t)},Yn.orderBy=function(t,e,r,i){return null==t?[]:(Ha(e)||(e=null==e?[]:[e]),Ha(r=i?n:r)||(r=null==r?[]:[r]),Hr(t,e,r))},Yn.over=lu,Yn.overArgs=Pa,Yn.overEvery=hu,Yn.overSome=du,Yn.partial=Ra,Yn.partialRight=Ba,Yn.partition=Ea,Yn.pick=Ps,Yn.pickBy=Rs,Yn.property=fu,Yn.propertyOf=function(t){return function(e){return null==t?n:Nr(t,e)}},Yn.pull=Xo,Yn.pullAll=$o,Yn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Zr(t,e,co(n,2)):t},Yn.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Zr(t,e,n,r):t},Yn.pullAt=ta,Yn.range=pu,Yn.rangeRight=mu,Yn.rearg=Ua,Yn.reject=function(t,e){return(Ha(t)?je:yr)(t,za(co(e,3)))},Yn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=co(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Vr(t,i),n},Yn.rest=function(t,e){if("function"!=typeof t)throw new kt(i);return Kr(t,e=e===n?e:ms(e))},Yn.reverse=ea,Yn.sampleSize=function(t,e,r){return e=(r?Mo(t,e,r):e===n)?1:ms(e),(Ha(t)?$n:$r)(t,e)},Yn.set=function(t,e,n){return null==t?t:ti(t,e,n)},Yn.setWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:ti(t,e,r,i)},Yn.shuffle=function(t){return(Ha(t)?tr:ri)(t)},Yn.slice=function(t,e,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&Mo(t,e,r)?(e=0,r=i):(e=null==e?0:ms(e),r=r===n?i:ms(r)),ii(t,e,r)):[]},Yn.sortBy=Sa,Yn.sortedUniq=function(t){return t&&t.length?ui(t):[]},Yn.sortedUniqBy=function(t,e){return t&&t.length?ui(t,co(e,2)):[]},Yn.split=function(t,e,r){return r&&"number"!=typeof r&&Mo(t,e,r)&&(e=r=n),(r=r===n?m:r>>>0)?(t=ws(t))&&("string"==typeof e||null!=e&&!as(e))&&!(e=li(e))&&sn(t)?Li(pn(t),0,r):t.split(e,r):[]},Yn.spread=function(t,e){if("function"!=typeof t)throw new kt(i);return e=null==e?0:wn(ms(e),0),Kr((function(n){var r=n[e],i=Li(n,0,e);return r&&Oe(i,r),Se(t,this,i)}))},Yn.tail=function(t){var e=null==t?0:t.length;return e?ii(t,1,e):[]},Yn.take=function(t,e,r){return t&&t.length?ii(t,0,(e=r||e===n?1:ms(e))<0?0:e):[]},Yn.takeRight=function(t,e,r){var i=null==t?0:t.length;return i?ii(t,(e=i-(e=r||e===n?1:ms(e)))<0?0:e,i):[]},Yn.takeRightWhile=function(t,e){return t&&t.length?pi(t,co(e,3),!1,!0):[]},Yn.takeWhile=function(t,e){return t&&t.length?pi(t,co(e,3)):[]},Yn.tap=function(t,e){return e(t),t},Yn.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new kt(i);return es(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ta(t,e,{leading:r,maxWait:e,trailing:o})},Yn.thru=pa,Yn.toArray=fs,Yn.toPairs=Bs,Yn.toPairsIn=Us,Yn.toPath=function(t){return Ha(t)?De(t,Ro):cs(t)?[t]:ki(Po(ws(t)))},Yn.toPlainObject=bs,Yn.transform=function(t,e,n){var r=Ha(t),i=r||qa(t)||ls(t);if(e=co(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:es(t)&&Xa(o)?Fn(Zt(t)):{}}return(i?Ae:Mr)(t,(function(t,r,i){return e(n,t,r,i)})),n},Yn.unary=function(t){return Aa(t,1)},Yn.union=na,Yn.unionBy=ra,Yn.unionWith=ia,Yn.uniq=function(t){return t&&t.length?hi(t):[]},Yn.uniqBy=function(t,e){return t&&t.length?hi(t,co(e,2)):[]},Yn.uniqWith=function(t,e){return e="function"==typeof e?e:n,t&&t.length?hi(t,n,e):[]},Yn.unset=function(t,e){return null==t||di(t,e)},Yn.unzip=oa,Yn.unzipWith=aa,Yn.update=function(t,e,n){return null==t?t:fi(t,e,wi(n))},Yn.updateWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:fi(t,e,wi(r),i)},Yn.values=Ys,Yn.valuesIn=function(t){return null==t?[]:$e(t,Cs(t))},Yn.without=sa,Yn.words=Xs,Yn.wrap=function(t,e){return Ra(wi(e),t)},Yn.xor=ua,Yn.xorBy=ca,Yn.xorWith=la,Yn.zip=ha,Yn.zipObject=function(t,e){return yi(t||[],e||[],nr)},Yn.zipObjectDeep=function(t,e){return yi(t||[],e||[],ti)},Yn.zipWith=da,Yn.entries=Bs,Yn.entriesIn=Us,Yn.extend=Ms,Yn.extendWith=Ls,uu(Yn,Yn),Yn.add=bu,Yn.attempt=$s,Yn.camelCase=Fs,Yn.capitalize=Ws,Yn.ceil=wu,Yn.clamp=function(t,e,r){return r===n&&(r=e,e=n),r!==n&&(r=(r=ys(r))==r?r:0),e!==n&&(e=(e=ys(e))==e?e:0),ur(ys(t),e,r)},Yn.clone=function(t){return cr(t,4)},Yn.cloneDeep=function(t){return cr(t,5)},Yn.cloneDeepWith=function(t,e){return cr(t,5,e="function"==typeof e?e:n)},Yn.cloneWith=function(t,e){return cr(t,4,e="function"==typeof e?e:n)},Yn.conformsTo=function(t,e){return null==e||lr(t,e,Ts(e))},Yn.deburr=Qs,Yn.defaultTo=function(t,e){return null==t||t!=t?e:t},Yn.divide=vu,Yn.endsWith=function(t,e,r){t=ws(t),e=li(e);var i=t.length,o=r=r===n?i:ur(ms(r),0,i);return(r-=e.length)>=0&&t.slice(r,o)==e},Yn.eq=Ya,Yn.escape=function(t){return(t=ws(t))&&J.test(t)?t.replace(V,on):t},Yn.escapeRegExp=function(t){return(t=ws(t))&&it.test(t)?t.replace(rt,"\\$&"):t},Yn.every=function(t,e,r){var i=Ha(t)?ke:mr;return r&&Mo(t,e,r)&&(e=n),i(t,co(e,3))},Yn.find=ya,Yn.findIndex=Qo,Yn.findKey=function(t,e){return Ue(t,co(e,3),Mr)},Yn.findLast=ba,Yn.findLastIndex=Ho,Yn.findLastKey=function(t,e){return Ue(t,co(e,3),Lr)},Yn.floor=Mu,Yn.forEach=wa,Yn.forEachRight=va,Yn.forIn=function(t,e){return null==t?t:wr(t,co(e,3),Cs)},Yn.forInRight=function(t,e){return null==t?t:vr(t,co(e,3),Cs)},Yn.forOwn=function(t,e){return t&&Mr(t,co(e,3))},Yn.forOwnRight=function(t,e){return t&&Lr(t,co(e,3))},Yn.get=xs,Yn.gt=Fa,Yn.gte=Wa,Yn.has=function(t,e){return null!=t&&yo(t,e,Ar)},Yn.hasIn=As,Yn.head=Zo,Yn.identity=iu,Yn.includes=function(t,e,n,r){t=Za(t)?t:Ys(t),n=n&&!r?ms(n):0;var i=t.length;return n<0&&(n=wn(i+n,0)),us(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Fe(t,e,n)>-1},Yn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=wn(r+i,0)),Fe(t,e,i)},Yn.inRange=function(t,e,r){return e=ps(e),r===n?(r=e,e=0):r=ps(r),function(t,e,n){return t>=vn(e,n)&&t<wn(e,n)}(t=ys(t),e,r)},Yn.invoke=js,Yn.isArguments=Qa,Yn.isArray=Ha,Yn.isArrayBuffer=Ga,Yn.isArrayLike=Za,Yn.isArrayLikeObject=Va,Yn.isBoolean=function(t){return!0===t||!1===t||ns(t)&&Sr(t)==w},Yn.isBuffer=qa,Yn.isDate=Ja,Yn.isElement=function(t){return ns(t)&&1===t.nodeType&&!os(t)},Yn.isEmpty=function(t){if(null==t)return!0;if(Za(t)&&(Ha(t)||"string"==typeof t||"function"==typeof t.splice||qa(t)||ls(t)||Qa(t)))return!t.length;var e=go(t);if(e==N||e==I)return!t.size;if(Eo(t))return!Pr(t).length;for(var n in t)if(zt.call(t,n))return!1;return!0},Yn.isEqual=function(t,e){return Cr(t,e)},Yn.isEqualWith=function(t,e,r){var i=(r="function"==typeof r?r:n)?r(t,e):n;return i===n?Cr(t,e,n,r):!!i},Yn.isError=Ka,Yn.isFinite=function(t){return"number"==typeof t&&Be(t)},Yn.isFunction=Xa,Yn.isInteger=$a,Yn.isLength=ts,Yn.isMap=rs,Yn.isMatch=function(t,e){return t===e||Dr(t,e,ho(e))},Yn.isMatchWith=function(t,e,r){return r="function"==typeof r?r:n,Dr(t,e,ho(e),r)},Yn.isNaN=function(t){return is(t)&&t!=+t},Yn.isNative=function(t){if(No(t))throw new Nt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Or(t)},Yn.isNil=function(t){return null==t},Yn.isNull=function(t){return null===t},Yn.isNumber=is,Yn.isObject=es,Yn.isObjectLike=ns,Yn.isPlainObject=os,Yn.isRegExp=as,Yn.isSafeInteger=function(t){return $a(t)&&t>=-9007199254740991&&t<=f},Yn.isSet=ss,Yn.isString=us,Yn.isSymbol=cs,Yn.isTypedArray=ls,Yn.isUndefined=function(t){return t===n},Yn.isWeakMap=function(t){return ns(t)&&go(t)==T},Yn.isWeakSet=function(t){return ns(t)&&"[object WeakSet]"==Sr(t)},Yn.join=function(t,e){return null==t?"":Ze.call(t,e)},Yn.kebabCase=Hs,Yn.last=Ko,Yn.lastIndexOf=function(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=ms(r))<0?wn(i+o,0):vn(o,i-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):Ye(t,Qe,o,!0)},Yn.lowerCase=Gs,Yn.lowerFirst=Zs,Yn.lt=hs,Yn.lte=ds,Yn.max=function(t){return t&&t.length?gr(t,iu,xr):n},Yn.maxBy=function(t,e){return t&&t.length?gr(t,co(e,2),xr):n},Yn.mean=function(t){return He(t,iu)},Yn.meanBy=function(t,e){return He(t,co(e,2))},Yn.min=function(t){return t&&t.length?gr(t,iu,Br):n},Yn.minBy=function(t,e){return t&&t.length?gr(t,co(e,2),Br):n},Yn.stubArray=gu,Yn.stubFalse=yu,Yn.stubObject=function(){return{}},Yn.stubString=function(){return""},Yn.stubTrue=function(){return!0},Yn.multiply=_u,Yn.nth=function(t,e){return t&&t.length?Qr(t,ms(e)):n},Yn.noConflict=function(){return pe._===this&&(pe._=Yt),this},Yn.noop=cu,Yn.now=xa,Yn.pad=function(t,e,n){t=ws(t);var r=(e=ms(e))?fn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Hi(ge(i),n)+t+Hi(me(i),n)},Yn.padEnd=function(t,e,n){t=ws(t);var r=(e=ms(e))?fn(t):0;return e&&r<e?t+Hi(e-r,n):t},Yn.padStart=function(t,e,n){t=ws(t);var r=(e=ms(e))?fn(t):0;return e&&r<e?Hi(e-r,n)+t:t},Yn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Ln(ws(t).replace(ot,""),e||0)},Yn.random=function(t,e,r){if(r&&"boolean"!=typeof r&&Mo(t,e,r)&&(e=r=n),r===n&&("boolean"==typeof e?(r=e,e=n):"boolean"==typeof t&&(r=t,t=n)),t===n&&e===n?(t=0,e=1):(t=ps(t),e===n?(e=t,t=0):e=ps(e)),t>e){var i=t;t=e,e=i}if(r||t%1||e%1){var o=_n();return vn(t+o*(e-t+le("1e-"+((o+"").length-1))),e)}return qr(t,e)},Yn.reduce=function(t,e,n){var r=Ha(t)?ze:Ve,i=arguments.length<3;return r(t,co(e,4),n,i,fr)},Yn.reduceRight=function(t,e,n){var r=Ha(t)?Pe:Ve,i=arguments.length<3;return r(t,co(e,4),n,i,pr)},Yn.repeat=function(t,e,r){return e=(r?Mo(t,e,r):e===n)?1:ms(e),Jr(ws(t),e)},Yn.replace=function(){var t=arguments,e=ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Yn.result=function(t,e,r){var i=-1,o=(e=vi(e,t)).length;for(o||(o=1,t=n);++i<o;){var a=null==t?n:t[Ro(e[i])];a===n&&(i=o,a=r),t=Xa(a)?a.call(t):a}return t},Yn.round=Nu,Yn.runInContext=t,Yn.sample=function(t){return(Ha(t)?Xn:Xr)(t)},Yn.size=function(t){if(null==t)return 0;if(Za(t))return us(t)?fn(t):t.length;var e=go(t);return e==N||e==I?t.size:Pr(t).length},Yn.snakeCase=Vs,Yn.some=function(t,e,r){var i=Ha(t)?Re:oi;return r&&Mo(t,e,r)&&(e=n),i(t,co(e,3))},Yn.sortedIndex=function(t,e){return ai(t,e)},Yn.sortedIndexBy=function(t,e,n){return si(t,e,co(n,2))},Yn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ai(t,e);if(r<n&&Ya(t[r],e))return r}return-1},Yn.sortedLastIndex=function(t,e){return ai(t,e,!0)},Yn.sortedLastIndexBy=function(t,e,n){return si(t,e,co(n,2),!0)},Yn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=ai(t,e,!0)-1;if(Ya(t[n],e))return n}return-1},Yn.startCase=qs,Yn.startsWith=function(t,e,n){return t=ws(t),n=null==n?0:ur(ms(n),0,t.length),e=li(e),t.slice(n,n+e.length)==e},Yn.subtract=Eu,Yn.sum=function(t){return t&&t.length?qe(t,iu):0},Yn.sumBy=function(t,e){return t&&t.length?qe(t,co(e,2)):0},Yn.template=function(t,e,r){var i=Yn.templateSettings;r&&Mo(t,e,r)&&(e=n),t=ws(t),e=Ls({},e,i,$i);var o,a,s=Ls({},e.imports,i.imports,$i),u=Ts(s),c=$e(s,u),l=0,h=e.interpolate||Mt,d="__p += '",f=At((e.escape||Mt).source+"|"+h.source+"|"+(h===$?ft:Mt).source+"|"+(e.evaluate||Mt).source+"|$","g"),p="//# sourceURL="+(zt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ae+"]")+"\n";t.replace(f,(function(e,n,r,i,s,u){return r||(r=i),d+=t.slice(l,u).replace(Lt,an),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e})),d+="';\n";var m=zt.call(e,"variable")&&e.variable;if(m){if(ht.test(m))throw new Nt("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(Q,""):d).replace(H,"$1").replace(G,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=$s((function(){return Et(u,p+"return "+d).apply(n,c)}));if(g.source=d,Ka(g))throw g;return g},Yn.times=function(t,e){if((t=ms(t))<1||t>f)return[];var n=m,r=vn(t,m);e=co(e),t-=m;for(var i=Je(r,e);++n<t;)e(n);return i},Yn.toFinite=ps,Yn.toInteger=ms,Yn.toLength=gs,Yn.toLower=function(t){return ws(t).toLowerCase()},Yn.toNumber=ys,Yn.toSafeInteger=function(t){return t?ur(ms(t),-9007199254740991,f):0===t?t:0},Yn.toString=ws,Yn.toUpper=function(t){return ws(t).toUpperCase()},Yn.trim=function(t,e,r){if((t=ws(t))&&(r||e===n))return Ke(t);if(!t||!(e=li(e)))return t;var i=pn(t),o=pn(e);return Li(i,en(i,o),nn(i,o)+1).join("")},Yn.trimEnd=function(t,e,r){if((t=ws(t))&&(r||e===n))return t.slice(0,mn(t)+1);if(!t||!(e=li(e)))return t;var i=pn(t);return Li(i,0,nn(i,pn(e))+1).join("")},Yn.trimStart=function(t,e,r){if((t=ws(t))&&(r||e===n))return t.replace(ot,"");if(!t||!(e=li(e)))return t;var i=pn(t);return Li(i,en(i,pn(e))).join("")},Yn.truncate=function(t,e){var r=30,i="...";if(es(e)){var o="separator"in e?e.separator:o;r="length"in e?ms(e.length):r,i="omission"in e?li(e.omission):i}var a=(t=ws(t)).length;if(sn(t)){var s=pn(t);a=s.length}if(r>=a)return t;var u=r-fn(i);if(u<1)return i;var c=s?Li(s,0,u).join(""):t.slice(0,u);if(o===n)return c+i;if(s&&(u+=c.length-u),as(o)){if(t.slice(u).search(o)){var l,h=c;for(o.global||(o=At(o.source,ws(pt.exec(o))+"g")),o.lastIndex=0;l=o.exec(h);)var d=l.index;c=c.slice(0,d===n?u:d)}}else if(t.indexOf(li(o),u)!=u){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+i},Yn.unescape=function(t){return(t=ws(t))&&q.test(t)?t.replace(Z,gn):t},Yn.uniqueId=function(t){var e=++Pt;return ws(t)+e},Yn.upperCase=Js,Yn.upperFirst=Ks,Yn.each=wa,Yn.eachRight=va,Yn.first=Zo,uu(Yn,(Lu={},Mr(Yn,(function(t,e){zt.call(Yn.prototype,e)||(Lu[e]=t)})),Lu),{chain:!1}),Yn.VERSION="4.17.21",Ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Yn[t].placeholder=Yn})),Ae(["drop","take"],(function(t,e){Hn.prototype[t]=function(r){r=r===n?1:wn(ms(r),0);var i=this.__filtered__&&!e?new Hn(this):this.clone();return i.__filtered__?i.__takeCount__=vn(r,i.__takeCount__):i.__views__.push({size:vn(r,m),type:t+(i.__dir__<0?"Right":"")}),i},Hn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ae(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Hn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:co(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ae(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Hn.prototype[t]=function(){return this[n](1).value()[0]}})),Ae(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Hn.prototype[t]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(iu)},Hn.prototype.find=function(t){return this.filter(t).head()},Hn.prototype.findLast=function(t){return this.reverse().find(t)},Hn.prototype.invokeMap=Kr((function(t,e){return"function"==typeof t?new Hn(this):this.map((function(n){return jr(n,t,e)}))})),Hn.prototype.reject=function(t){return this.filter(za(co(t)))},Hn.prototype.slice=function(t,e){t=ms(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Hn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==n&&(r=(e=ms(e))<0?r.dropRight(-e):r.take(e-t)),r)},Hn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Hn.prototype.toArray=function(){return this.take(m)},Mr(Hn.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=Yn[i?"take"+("last"==e?"Right":""):e],a=i||/^find/.test(e);o&&(Yn.prototype[e]=function(){var e=this.__wrapped__,s=i?[1]:arguments,u=e instanceof Hn,c=s[0],l=u||Ha(e),h=function(t){var e=o.apply(Yn,Oe([t],s));return i&&d?e[0]:e};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var d=this.__chain__,f=!!this.__actions__.length,p=a&&!d,m=u&&!f;if(!a&&l){e=m?e:new Hn(this);var g=t.apply(e,s);return g.__actions__.push({func:pa,args:[h],thisArg:n}),new Qn(g,d)}return p&&m?t.apply(this,s):(g=this.thru(h),p?i?g.value()[0]:g.value():g)})})),Ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=jt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Yn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ha(i)?i:[],t)}return this[n]((function(n){return e.apply(Ha(n)?n:[],t)}))}})),Mr(Hn.prototype,(function(t,e){var n=Yn[e];if(n){var r=n.name+"";zt.call(Tn,r)||(Tn[r]=[]),Tn[r].push({name:e,func:n})}})),Tn[Yi(n,2).name]=[{name:"wrapper",func:n}],Hn.prototype.clone=function(){var t=new Hn(this.__wrapped__);return t.__actions__=ki(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ki(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ki(this.__views__),t},Hn.prototype.reverse=function(){if(this.__filtered__){var t=new Hn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Hn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ha(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=vn(e,t+a);break;case"takeRight":t=wn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,h=l.length,d=0,f=vn(u,this.__takeCount__);if(!n||!r&&i==u&&f==u)return mi(t,this.__actions__);var p=[];t:for(;u--&&d<f;){for(var m=-1,g=t[c+=e];++m<h;){var y=l[m],b=y.iteratee,w=y.type,v=b(g);if(2==w)g=v;else if(!v){if(1==w)continue t;break t}}p[d++]=g}return p},Yn.prototype.at=ma,Yn.prototype.chain=function(){return fa(this)},Yn.prototype.commit=function(){return new Qn(this.value(),this.__chain__)},Yn.prototype.next=function(){this.__values__===n&&(this.__values__=fs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?n:this.__values__[this.__index__++]}},Yn.prototype.plant=function(t){for(var e,r=this;r instanceof Wn;){var i=Uo(r);i.__index__=0,i.__values__=n,e?o.__wrapped__=i:e=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,e},Yn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Hn){var e=t;return this.__actions__.length&&(e=new Hn(this)),(e=e.reverse()).__actions__.push({func:pa,args:[ea],thisArg:n}),new Qn(e,this.__chain__)}return this.thru(ea)},Yn.prototype.toJSON=Yn.prototype.valueOf=Yn.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},Yn.prototype.first=Yn.prototype.head,Xt&&(Yn.prototype[Xt]=function(){return this}),Yn}();ge?((ge.exports=yn)._=yn,me._=yn):pe._=yn}).call(r)})),Xq=9e15,$q=1e9,tJ="0123456789abcdef",eJ="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",nJ="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",rJ={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Xq,maxE:Xq,crypto:!1},iJ=!0,oJ="[DecimalError] ",aJ=oJ+"Invalid argument: ",sJ=oJ+"Precision limit exceeded",uJ=oJ+"crypto unavailable",cJ="[object Decimal]",lJ=Math.floor,hJ=Math.pow,dJ=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,fJ=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,pJ=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,mJ=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,gJ=1e7,yJ=7,bJ=eJ.length-1,wJ=nJ.length-1,vJ={toStringTag:cJ};function MJ(t){var e,n,r,i=t.length-1,o="",a=t[0];if(i>0){for(o+=a,e=1;e<i;e++)r=t[e]+"",(n=yJ-r.length)&&(o+=TJ(n)),o+=r;a=t[e],(n=yJ-(r=a+"").length)&&(o+=TJ(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function LJ(t,e,n){if(t!==~~t||t<e||t>n)throw Error(aJ+t)}function _J(t,e,n,r){var i,o,a,s;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=yJ,i=0):(i=Math.ceil((e+1)/yJ),e%=yJ),o=hJ(10,yJ-e),s=t[i]%o|0,null==r?e<3?(0==e?s=s/100|0:1==e&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(t[i+1]/o/100|0)==hJ(10,e-2)-1||(s==o/2||0==s)&&0==(t[i+1]/o/100|0):e<4?(0==e?s=s/1e3|0:1==e?s=s/100|0:2==e&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(t[i+1]/o/1e3|0)==hJ(10,e-3)-1,a}function NJ(t,e,n){for(var r,i,o=[0],a=0,s=t.length;a<s;){for(i=o.length;i--;)o[i]*=e;for(o[0]+=tJ.indexOf(t.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}vJ.absoluteValue=vJ.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),SJ(t)},vJ.ceil=function(){return SJ(new this.constructor(this),this.e+1,2)},vJ.clampedTo=vJ.clamp=function(t,e){var n=this,r=n.constructor;if(t=new r(t),e=new r(e),!t.s||!e.s)return new r(NaN);if(t.gt(e))throw Error(aJ+e);return n.cmp(t)<0?t:n.cmp(e)>0?e:new r(n)},vJ.comparedTo=vJ.cmp=function(t){var e,n,r,i,o=this,a=o.d,s=(t=new o.constructor(t)).d,u=o.s,c=t.s;if(!a||!s)return u&&c?u!==c?u:a===s?0:!a^u<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?u:s[0]?-c:0;if(u!==c)return u;if(o.e!==t.e)return o.e>t.e^u<0?1:-1;for(e=0,n=(r=a.length)<(i=s.length)?r:i;e<n;++e)if(a[e]!==s[e])return a[e]>s[e]^u<0?1:-1;return r===i?0:r>i^u<0?1:-1},vJ.cosine=vJ.cos=function(){var t,e,n=this,r=n.constructor;return n.d?n.d[0]?(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+yJ,r.rounding=1,n=function(t,e){var n,r,i;if(e.isZero())return e;r=e.d.length,r<32?i=(1/FJ(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");t.precision+=n,e=YJ(t,1,e.times(i),new t(1));for(var o=n;o--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=n,e}(r,WJ(r,n)),r.precision=t,r.rounding=e,SJ(2==Zq||3==Zq?n.neg():n,t,e,!0)):new r(1):new r(NaN)},vJ.cubeRoot=vJ.cbrt=function(){var t,e,n,r,i,o,a,s,u,c,l=this,h=l.constructor;if(!l.isFinite()||l.isZero())return new h(l);for(iJ=!1,(o=l.s*hJ(l.s*l,1/3))&&Math.abs(o)!=1/0?r=new h(o.toString()):(n=MJ(l.d),(o=((t=l.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=hJ(n,1/3),t=lJ((t+1)/3)-(t%3==(t<0?-1:2)),(r=new h(n=o==1/0?"5e"+t:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+t)).s=l.s),a=(t=h.precision)+3;;)if(c=(u=(s=r).times(s).times(s)).plus(l),r=EJ(c.plus(l).times(s),c.plus(u),a+2,1),MJ(s.d).slice(0,a)===(n=MJ(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(SJ(r,t+1,1),e=!r.times(r).times(r).eq(l));break}if(!i&&(SJ(s,t+1,0),s.times(s).times(s).eq(l))){r=s;break}a+=4,i=1}return iJ=!0,SJ(r,t,h.rounding,e)},vJ.decimalPlaces=vJ.dp=function(){var t,e=this.d,n=NaN;if(e){if(n=((t=e.length-1)-lJ(this.e/yJ))*yJ,t=e[t])for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n},vJ.dividedBy=vJ.div=function(t){return EJ(this,new this.constructor(t))},vJ.dividedToIntegerBy=vJ.divToInt=function(t){var e=this.constructor;return SJ(EJ(this,new e(t),0,1,1),e.precision,e.rounding)},vJ.equals=vJ.eq=function(t){return 0===this.cmp(t)},vJ.floor=function(){return SJ(new this.constructor(this),this.e+1,3)},vJ.greaterThan=vJ.gt=function(t){return this.cmp(t)>0},vJ.greaterThanOrEqualTo=vJ.gte=function(t){var e=this.cmp(t);return 1==e||0===e},vJ.hyperbolicCosine=vJ.cosh=function(){var t,e,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?e=(1/FJ(4,t=Math.ceil(i/3))).toString():(t=16,e="2.3283064365386962890625e-10"),o=YJ(a,1,o.times(e),new a(1),!0);for(var u,c=t,l=new a(8);c--;)u=o.times(o),o=s.minus(u.times(l.minus(u.times(l))));return SJ(o,a.precision=n,a.rounding=r,!0)},vJ.hyperbolicSine=vJ.sinh=function(){var t,e,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(e=o.precision,n=o.rounding,o.precision=e+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=YJ(o,2,i,i,!0);else{t=(t=1.4*Math.sqrt(r))>16?16:0|t,i=YJ(o,2,i=i.times(1/FJ(5,t)),i,!0);for(var a,s=new o(5),u=new o(16),c=new o(20);t--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(c))))}return o.precision=e,o.rounding=n,SJ(i,e,n,!0)},vJ.hyperbolicTangent=vJ.tanh=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,EJ(n.sinh(),n.cosh(),r.precision=t,r.rounding=e)):new r(n.s)},vJ.inverseCosine=vJ.acos=function(){var t,e=this,n=e.constructor,r=e.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?e.isNeg()?kJ(n,i,o):new n(0):new n(NaN):e.isZero()?kJ(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,e=e.asin(),t=kJ(n,i+4,o).times(.5),n.precision=i,n.rounding=o,t.minus(e))},vJ.inverseHyperbolicCosine=vJ.acosh=function(){var t,e,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(t=r.precision,e=r.rounding,r.precision=t+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,iJ=!1,n=n.times(n).minus(1).sqrt().plus(n),iJ=!0,r.precision=t,r.rounding=e,n.ln()):new r(n)},vJ.inverseHyperbolicSine=vJ.asinh=function(){var t,e,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,iJ=!1,n=n.times(n).plus(1).sqrt().plus(n),iJ=!0,r.precision=t,r.rounding=e,n.ln())},vJ.inverseHyperbolicTangent=vJ.atanh=function(){var t,e,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=o.precision,e=o.rounding,r=i.sd(),Math.max(r,t)<2*-i.e-1?SJ(new o(i),t,e,!0):(o.precision=n=r-i.e,i=EJ(i.plus(1),new o(1).minus(i),n+t,1),o.precision=t+4,o.rounding=1,i=i.ln(),o.precision=t,o.rounding=e,i.times(.5))):new o(NaN)},vJ.inverseSine=vJ.asin=function(){var t,e,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(e=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==e?0===e?((t=kJ(o,n+4,r).times(.5)).s=i.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},vJ.inverseTangent=vJ.atan=function(){var t,e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&h+4<=wJ)return(a=kJ(l,h+4,d).times(.25)).s=c.s,a}else{if(!c.s)return new l(NaN);if(h+4<=wJ)return(a=kJ(l,h+4,d).times(.5)).s=c.s,a}for(l.precision=s=h+10,l.rounding=1,t=n=Math.min(28,s/yJ+2|0);t;--t)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(iJ=!1,e=Math.ceil(s/yJ),r=1,u=c.times(c),a=new l(c),i=c;-1!==t;)if(i=i.times(u),o=a.minus(i.div(r+=2)),i=i.times(u),void 0!==(a=o.plus(i.div(r+=2))).d[e])for(t=e;a.d[t]===o.d[t]&&t--;);return n&&(a=a.times(2<<n-1)),iJ=!0,SJ(a,l.precision=h,l.rounding=d,!0)},vJ.isFinite=function(){return!!this.d},vJ.isInteger=vJ.isInt=function(){return!!this.d&&lJ(this.e/yJ)>this.d.length-2},vJ.isNaN=function(){return!this.s},vJ.isNegative=vJ.isNeg=function(){return this.s<0},vJ.isPositive=vJ.isPos=function(){return this.s>0},vJ.isZero=function(){return!!this.d&&0===this.d[0]},vJ.lessThan=vJ.lt=function(t){return this.cmp(t)<0},vJ.lessThanOrEqualTo=vJ.lte=function(t){return this.cmp(t)<1},vJ.logarithm=vJ.log=function(t){var e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(null==t)t=new l(10),e=!0;else{if(n=(t=new l(t)).d,t.s<0||!n||!n[0]||t.eq(1))return new l(NaN);e=t.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new l(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(e)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(iJ=!1,a=PJ(c,s=h+5),r=e?IJ(l,s+10):PJ(t,s),_J((u=EJ(a,r,s,1)).d,i=h,d))do{if(a=PJ(c,s+=10),r=e?IJ(l,s+10):PJ(t,s),u=EJ(a,r,s,1),!o){+MJ(u.d).slice(i+1,i+15)+1==1e14&&(u=SJ(u,h+1,0));break}}while(_J(u.d,i+=10,d));return iJ=!0,SJ(u,h,d)},vJ.minus=vJ.sub=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.constructor;if(t=new p(t),!f.d||!t.d)return f.s&&t.s?f.d?t.s=-t.s:t=new p(t.d||f.s!==t.s?f:NaN):t=new p(NaN),t;if(f.s!=t.s)return t.s=-t.s,f.plus(t);if(c=f.d,d=t.d,s=p.precision,u=p.rounding,!c[0]||!d[0]){if(d[0])t.s=-t.s;else{if(!c[0])return new p(3===u?-0:0);t=new p(f)}return iJ?SJ(t,s,u):t}if(n=lJ(t.e/yJ),l=lJ(f.e/yJ),c=c.slice(),o=l-n){for((h=o<0)?(e=c,o=-o,a=d.length):(e=d,n=l,a=c.length),o>(r=Math.max(Math.ceil(s/yJ),a)+2)&&(o=r,e.length=1),e.reverse(),r=o;r--;)e.push(0);e.reverse()}else{for((h=(r=c.length)<(a=d.length))&&(a=r),r=0;r<a;r++)if(c[r]!=d[r]){h=c[r]<d[r];break}o=0}for(h&&(e=c,c=d,d=e,t.s=-t.s),a=c.length,r=d.length-a;r>0;--r)c[a++]=0;for(r=d.length;r>o;){if(c[--r]<d[r]){for(i=r;i&&0===c[--i];)c[i]=gJ-1;--c[i],c[r]+=gJ}c[r]-=d[r]}for(;0===c[--a];)c.pop();for(;0===c[0];c.shift())--n;return c[0]?(t.d=c,t.e=AJ(c,n),iJ?SJ(t,s,u):t):new p(3===u?-0:0)},vJ.modulo=vJ.mod=function(t){var e,n=this,r=n.constructor;return t=new r(t),!n.d||!t.s||t.d&&!t.d[0]?new r(NaN):!t.d||n.d&&!n.d[0]?SJ(new r(n),r.precision,r.rounding):(iJ=!1,9==r.modulo?(e=EJ(n,t.abs(),0,3,1)).s*=t.s:e=EJ(n,t,0,r.modulo,1),e=e.times(t),iJ=!0,n.minus(e))},vJ.naturalExponential=vJ.exp=function(){return zJ(this)},vJ.naturalLogarithm=vJ.ln=function(){return PJ(this)},vJ.negated=vJ.neg=function(){var t=new this.constructor(this);return t.s=-t.s,SJ(t)},vJ.plus=vJ.add=function(t){var e,n,r,i,o,a,s,u,c,l,h=this,d=h.constructor;if(t=new d(t),!h.d||!t.d)return h.s&&t.s?h.d||(t=new d(t.d||h.s===t.s?h:NaN)):t=new d(NaN),t;if(h.s!=t.s)return t.s=-t.s,h.minus(t);if(c=h.d,l=t.d,s=d.precision,u=d.rounding,!c[0]||!l[0])return l[0]||(t=new d(h)),iJ?SJ(t,s,u):t;if(o=lJ(h.e/yJ),r=lJ(t.e/yJ),c=c.slice(),i=o-r){for(i<0?(n=c,i=-i,a=l.length):(n=l,r=o,a=c.length),i>(a=(o=Math.ceil(s/yJ))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=c.length)-(i=l.length)<0&&(i=a,n=l,l=c,c=n),e=0;i;)e=(c[--i]=c[i]+l[i]+e)/gJ|0,c[i]%=gJ;for(e&&(c.unshift(e),++r),a=c.length;0==c[--a];)c.pop();return t.d=c,t.e=AJ(c,r),iJ?SJ(t,s,u):t},vJ.precision=vJ.sd=function(t){var e,n=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(aJ+t);return n.d?(e=jJ(n.d),t&&n.e+1>e&&(e=n.e+1)):e=NaN,e},vJ.round=function(){var t=this,e=t.constructor;return SJ(new e(t),t.e+1,e.rounding)},vJ.sine=vJ.sin=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+yJ,r.rounding=1,n=function(t,e){var n,r=e.d.length;if(r<3)return e.isZero()?e:YJ(t,2,e,e);n=1.4*Math.sqrt(r),n=n>16?16:0|n,e=e.times(1/FJ(5,n)),e=YJ(t,2,e,e);for(var i,o=new t(5),a=new t(16),s=new t(20);n--;)i=e.times(e),e=e.times(o.plus(i.times(a.times(i).minus(s))));return e}(r,WJ(r,n)),r.precision=t,r.rounding=e,SJ(Zq>2?n.neg():n,t,e,!0)):new r(NaN)},vJ.squareRoot=vJ.sqrt=function(){var t,e,n,r,i,o,a=this,s=a.d,u=a.e,c=a.s,l=a.constructor;if(1!==c||!s||!s[0])return new l(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);for(iJ=!1,0==(c=Math.sqrt(+a))||c==1/0?(((e=MJ(s)).length+u)%2==0&&(e+="0"),c=Math.sqrt(e),u=lJ((u+1)/2)-(u<0||u%2),r=new l(e=c==1/0?"5e"+u:(e=c.toExponential()).slice(0,e.indexOf("e")+1)+u)):r=new l(c.toString()),n=(u=l.precision)+3;;)if(r=(o=r).plus(EJ(a,o,n+2,1)).times(.5),MJ(o.d).slice(0,n)===(e=MJ(r.d)).slice(0,n)){if("9999"!=(e=e.slice(n-3,n+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(SJ(r,u+1,1),t=!r.times(r).eq(a));break}if(!i&&(SJ(o,u+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return iJ=!0,SJ(r,u,l.rounding,t)},vJ.tangent=vJ.tan=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+10,r.rounding=1,(n=n.sin()).s=1,n=EJ(n,new r(1).minus(n.times(n)).sqrt(),t+10,0),r.precision=t,r.rounding=e,SJ(2==Zq||4==Zq?n.neg():n,t,e,!0)):new r(NaN)},vJ.times=vJ.mul=function(t){var e,n,r,i,o,a,s,u,c,l=this,h=l.constructor,d=l.d,f=(t=new h(t)).d;if(t.s*=l.s,!(d&&d[0]&&f&&f[0]))return new h(!t.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:d&&f?0*t.s:t.s/0);for(n=lJ(l.e/yJ)+lJ(t.e/yJ),(u=d.length)<(c=f.length)&&(o=d,d=f,f=o,a=u,u=c,c=a),o=[],r=a=u+c;r--;)o.push(0);for(r=c;--r>=0;){for(e=0,i=u+r;i>r;)s=o[i]+f[r]*d[i-r-1]+e,o[i--]=s%gJ|0,e=s/gJ|0;o[i]=(o[i]+e)%gJ|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=AJ(o,n),iJ?SJ(t,h.precision,h.rounding):t},vJ.toBinary=function(t,e){return QJ(this,2,t,e)},vJ.toDecimalPlaces=vJ.toDP=function(t,e){var n=this,r=n.constructor;return n=new r(n),void 0===t?n:(LJ(t,0,$q),void 0===e?e=r.rounding:LJ(e,0,8),SJ(n,t+n.e+1,e))},vJ.toExponential=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=xJ(r,!0):(LJ(t,0,$q),void 0===e?e=i.rounding:LJ(e,0,8),n=xJ(r=SJ(new i(r),t+1,e),!0,t+1)),r.isNeg()&&!r.isZero()?"-"+n:n},vJ.toFixed=function(t,e){var n,r,i=this,o=i.constructor;return void 0===t?n=xJ(i):(LJ(t,0,$q),void 0===e?e=o.rounding:LJ(e,0,8),n=xJ(r=SJ(new o(i),t+i.e+1,e),!1,t+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},vJ.toFraction=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.d,m=f.constructor;if(!p)return new m(f);if(c=n=new m(1),r=u=new m(0),a=(o=(e=new m(r)).e=jJ(p)-f.e-1)%yJ,e.d[0]=hJ(10,a<0?yJ+a:a),null==t)t=o>0?e:c;else{if(!(s=new m(t)).isInt()||s.lt(c))throw Error(aJ+s);t=s.gt(e)?o>0?e:c:s}for(iJ=!1,s=new m(MJ(p)),l=m.precision,m.precision=o=p.length*yJ*2;h=EJ(s,e,0,1,1),1!=(i=n.plus(h.times(r))).cmp(t);)n=r,r=i,i=c,c=u.plus(h.times(i)),u=i,i=e,e=s.minus(h.times(i)),s=i;return i=EJ(t.minus(n),r,0,1,1),u=u.plus(i.times(c)),n=n.plus(i.times(r)),u.s=c.s=f.s,d=EJ(c,r,o,1).minus(f).abs().cmp(EJ(u,n,o,1).minus(f).abs())<1?[c,r]:[u,n],m.precision=l,iJ=!0,d},vJ.toHexadecimal=vJ.toHex=function(t,e){return QJ(this,16,t,e)},vJ.toNearest=function(t,e){var n=this,r=n.constructor;if(n=new r(n),null==t){if(!n.d)return n;t=new r(1),e=r.rounding}else{if(t=new r(t),void 0===e?e=r.rounding:LJ(e,0,8),!n.d)return t.s?n:t;if(!t.d)return t.s&&(t.s=n.s),t}return t.d[0]?(iJ=!1,n=EJ(n,t,0,e,1).times(t),iJ=!0,SJ(n)):(t.s=n.s,n=t),n},vJ.toNumber=function(){return+this},vJ.toOctal=function(t,e){return QJ(this,8,t,e)},vJ.toPower=vJ.pow=function(t){var e,n,r,i,o,a,s=this,u=s.constructor,c=+(t=new u(t));if(!(s.d&&t.d&&s.d[0]&&t.d[0]))return new u(hJ(+s,c));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,t.eq(1))return SJ(s,r,o);if((e=lJ(t.e/yJ))>=t.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=CJ(u,s,n,r),t.s<0?new u(1).div(i):SJ(i,r,o);if((a=s.s)<0){if(e<t.d.length-1)return new u(NaN);if(0==(1&t.d[e])&&(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(e=0!=(n=hJ(+s,c))&&isFinite(n)?new u(n+"").e:lJ(c*(Math.log("0."+MJ(s.d))/Math.LN10+s.e+1)))>u.maxE+1||e<u.minE-1?new u(e>0?a/0:0):(iJ=!1,u.rounding=s.s=1,n=Math.min(12,(e+"").length),(i=zJ(t.times(PJ(s,r+n)),r)).d&&_J((i=SJ(i,r+5,1)).d,r,o)&&(e=r+10,+MJ((i=SJ(zJ(t.times(PJ(s,e+n)),e),e+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=SJ(i,r+1,0))),i.s=a,iJ=!0,u.rounding=o,SJ(i,r,o))},vJ.toPrecision=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=xJ(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(LJ(t,1,$q),void 0===e?e=i.rounding:LJ(e,0,8),n=xJ(r=SJ(new i(r),t,e),t<=r.e||r.e<=i.toExpNeg,t)),r.isNeg()&&!r.isZero()?"-"+n:n},vJ.toSignificantDigits=vJ.toSD=function(t,e){var n=this.constructor;return void 0===t?(t=n.precision,e=n.rounding):(LJ(t,1,$q),void 0===e?e=n.rounding:LJ(e,0,8)),SJ(new n(this),t,e)},vJ.toString=function(){var t=this,e=t.constructor,n=xJ(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n},vJ.truncated=vJ.trunc=function(){return SJ(new this.constructor(this),this.e+1,1)},vJ.valueOf=vJ.toJSON=function(){var t=this,e=t.constructor,n=xJ(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};var EJ=function(){function t(t,e,n){var r,i=0,o=t.length;for(t=t.slice();o--;)r=t[o]*e+i,t[o]=r%n|0,i=r/n|0;return i&&t.unshift(i),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]<e[n]?1:0,t[n]=i*r+t[n]-e[n];for(;!t[0]&&t.length>1;)t.shift()}return function(r,i,o,a,s,u){var c,l,h,d,f,p,m,g,y,b,w,v,M,L,_,N,E,S,x,A,I=r.constructor,k=r.s==i.s?1:-1,j=r.d,T=i.d;if(!(j&&j[0]&&T&&T[0]))return new I(r.s&&i.s&&(j?!T||j[0]!=T[0]:T)?j&&0==j[0]||!T?0*k:k/0:NaN);for(u?(f=1,l=r.e-i.e):(u=gJ,f=yJ,l=lJ(r.e/f)-lJ(i.e/f)),x=T.length,E=j.length,b=(y=new I(k)).d=[],h=0;T[h]==(j[h]||0);h++);if(T[h]>(j[h]||0)&&l--,null==o?(L=o=I.precision,a=I.rounding):L=s?o+(r.e-i.e)+1:o,L<0)b.push(1),p=!0;else{if(L=L/f+2|0,h=0,1==x){for(d=0,T=T[0],L++;(h<E||d)&&L--;h++)_=d*u+(j[h]||0),b[h]=_/T|0,d=_%T|0;p=d||h<E}else{for((d=u/(T[0]+1)|0)>1&&(T=t(T,d,u),j=t(j,d,u),x=T.length,E=j.length),N=x,v=(w=j.slice(0,x)).length;v<x;)w[v++]=0;(A=T.slice()).unshift(0),S=T[0],T[1]>=u/2&&++S;do{d=0,(c=e(T,w,x,v))<0?(M=w[0],x!=v&&(M=M*u+(w[1]||0)),(d=M/S|0)>1?(d>=u&&(d=u-1),1==(c=e(m=t(T,d,u),w,g=m.length,v=w.length))&&(d--,n(m,x<g?A:T,g,u))):(0==d&&(c=d=1),m=T.slice()),(g=m.length)<v&&m.unshift(0),n(w,m,v,u),-1==c&&(c=e(T,w,x,v=w.length))<1&&(d++,n(w,x<v?A:T,v,u)),v=w.length):0===c&&(d++,w=[0]),b[h++]=d,c&&w[0]?w[v++]=j[N]||0:(w=[j[N]],v=1)}while((N++<E||void 0!==w[0])&&L--);p=void 0!==w[0]}b[0]||b.shift()}if(1==f)y.e=l,Gq=p;else{for(h=1,d=b[0];d>=10;d/=10)h++;y.e=h+l*f-1,SJ(y,s?o+y.e+1:o,a,p)}return y}}();function SJ(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor;t:if(null!=e){if(!(h=t.d))return t;for(i=1,s=h[0];s>=10;s/=10)i++;if((o=e-i)<0)o+=yJ,a=e,u=(l=h[d=0])/hJ(10,i-a-1)%10|0;else if((d=Math.ceil((o+1)/yJ))>=(s=h.length)){if(!r)break t;for(;s++<=d;)h.push(0);l=u=0,i=1,a=(o%=yJ)-yJ+1}else{for(l=s=h[d],i=1;s>=10;s/=10)i++;u=(a=(o%=yJ)-yJ+i)<0?0:l/hJ(10,i-a-1)%10|0}if(r=r||e<0||void 0!==h[d+1]||(a<0?l:l%hJ(10,i-a-1)),c=n<4?(u||r)&&(0==n||n==(t.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?l/hJ(10,i-a):0:h[d-1])%10&1||n==(t.s<0?8:7)),e<1||!h[0])return h.length=0,c?(e-=t.e+1,h[0]=hJ(10,(yJ-e%yJ)%yJ),t.e=-e||0):h[0]=t.e=0,t;if(0==o?(h.length=d,s=1,d--):(h.length=d+1,s=hJ(10,yJ-o),h[d]=a>0?(l/hJ(10,i-a)%hJ(10,a)|0)*s:0),c)for(;;){if(0==d){for(o=1,a=h[0];a>=10;a/=10)o++;for(a=h[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(t.e++,h[0]==gJ&&(h[0]=1));break}if(h[d]+=s,h[d]!=gJ)break;h[d--]=0,s=1}for(o=h.length;0===h[--o];)h.pop()}return iJ&&(t.e>f.maxE?(t.d=null,t.e=NaN):t.e<f.minE&&(t.e=0,t.d=[0])),t}function xJ(t,e,n){if(!t.isFinite())return RJ(t);var r,i=t.e,o=MJ(t.d),a=o.length;return e?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+TJ(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):i<0?(o="0."+TJ(-i-1)+o,n&&(r=n-a)>0&&(o+=TJ(r))):i>=a?(o+=TJ(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+TJ(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=TJ(r))),o}function AJ(t,e){var n=t[0];for(e*=yJ;n>=10;n/=10)e++;return e}function IJ(t,e,n){if(e>bJ)throw iJ=!0,n&&(t.precision=n),Error(sJ);return SJ(new t(eJ),e,1,!0)}function kJ(t,e,n){if(e>wJ)throw Error(sJ);return SJ(new t(nJ),e,n,!0)}function jJ(t){var e=t.length-1,n=e*yJ+1;if(e=t[e]){for(;e%10==0;e/=10)n--;for(e=t[0];e>=10;e/=10)n++}return n}function TJ(t){for(var e="";t--;)e+="0";return e}function CJ(t,e,n,r){var i,o=new t(1),a=Math.ceil(r/yJ+4);for(iJ=!1;;){if(n%2&&HJ((o=o.times(e)).d,a)&&(i=!0),0===(n=lJ(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}HJ((e=e.times(e)).d,a)}return iJ=!0,o}function DJ(t){return 1&t.d[t.d.length-1]}function OJ(t,e,n){for(var r,i=new t(e[0]),o=0;++o<e.length;){if(!(r=new t(e[o])).s){i=r;break}i[n](r)&&(i=r)}return i}function zJ(t,e){var n,r,i,o,a,s,u,c=0,l=0,h=0,d=t.constructor,f=d.rounding,p=d.precision;if(!t.d||!t.d[0]||t.e>17)return new d(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(iJ=!1,u=p):u=e,s=new d(.03125);t.e>-2;)t=t.times(s),h+=5;for(u+=r=Math.log(hJ(2,h))/Math.LN10*2+5|0,n=o=a=new d(1),d.precision=u;;){if(o=SJ(o.times(t),u,1),n=n.times(++l),MJ((s=a.plus(EJ(o,n,u,1))).d).slice(0,u)===MJ(a.d).slice(0,u)){for(i=h;i--;)a=SJ(a.times(a),u,1);if(null!=e)return d.precision=p,a;if(!(c<3&&_J(a.d,u-r,f,c)))return SJ(a,d.precision=p,f,iJ=!0);d.precision=u+=10,n=o=s=new d(1),l=0,c++}a=s}}function PJ(t,e){var n,r,i,o,a,s,u,c,l,h,d,f=1,p=t,m=p.d,g=p.constructor,y=g.rounding,b=g.precision;if(p.s<0||!m||!m[0]||!p.e&&1==m[0]&&1==m.length)return new g(m&&!m[0]?-1/0:1!=p.s?NaN:m?0:p);if(null==e?(iJ=!1,l=b):l=e,g.precision=l+=10,r=(n=MJ(m)).charAt(0),!(Math.abs(o=p.e)<15e14))return c=IJ(g,l+2,b).times(o+""),p=PJ(new g(r+"."+n.slice(1)),l-10).plus(c),g.precision=b,null==e?SJ(p,b,y,iJ=!0):p;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=MJ((p=p.times(t)).d)).charAt(0),f++;for(o=p.e,r>1?(p=new g("0."+n),o++):p=new g(r+"."+n.slice(1)),h=p,u=a=p=EJ(p.minus(1),p.plus(1),l,1),d=SJ(p.times(p),l,1),i=3;;){if(a=SJ(a.times(d),l,1),MJ((c=u.plus(EJ(a,new g(i),l,1))).d).slice(0,l)===MJ(u.d).slice(0,l)){if(u=u.times(2),0!==o&&(u=u.plus(IJ(g,l+2,b).times(o+""))),u=EJ(u,new g(f),l,1),null!=e)return g.precision=b,u;if(!_J(u.d,l-10,y,s))return SJ(u,g.precision=b,y,iJ=!0);g.precision=l+=10,c=a=p=EJ(h.minus(1),h.plus(1),l,1),d=SJ(p.times(p),l,1),i=s=1}u=c,i+=2}}function RJ(t){return String(t.s*t.s/0)}function BJ(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;48===e.charCodeAt(r);r++);for(i=e.length;48===e.charCodeAt(i-1);--i);if(e=e.slice(r,i)){if(i-=r,t.e=n=n-r-1,t.d=[],r=(n+1)%yJ,n<0&&(r+=yJ),r<i){for(r&&t.d.push(+e.slice(0,r)),i-=yJ;r<i;)t.d.push(+e.slice(r,r+=yJ));e=e.slice(r),r=yJ-e.length}else r-=i;for(;r--;)e+="0";t.d.push(+e),iJ&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function UJ(t,e){var n,r,i,o,a,s,u,c,l;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),mJ.test(e))return BJ(t,e)}else if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(fJ.test(e))n=16,e=e.toLowerCase();else if(dJ.test(e))n=2;else{if(!pJ.test(e))throw Error(aJ+e);n=8}for((o=e.search(/p/i))>0?(u=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),a=(o=e.indexOf("."))>=0,r=t.constructor,a&&(o=(s=(e=e.replace(".","")).length)-o,i=CJ(r,new r(n),o,2*o)),o=l=(c=NJ(e,n,gJ)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*t.s):(t.e=AJ(c,l),t.d=c,iJ=!1,a&&(t=EJ(t,i,4*s)),u&&(t=t.times(Math.abs(u)<54?hJ(2,u):TK.pow(2,u))),iJ=!0,t)}function YJ(t,e,n,r,i){var o,a,s,u,c=t.precision,l=Math.ceil(c/yJ);for(iJ=!1,u=n.times(n),s=new t(r);;){if(a=EJ(s.times(u),new t(e++*e++),c,1),s=i?r.plus(a):r.minus(a),r=EJ(a.times(u),new t(e++*e++),c,1),void 0!==(a=s.plus(r)).d[l]){for(o=l;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return iJ=!0,a.d.length=l+1,a}function FJ(t,e){for(var n=t;--e;)n*=t;return n}function WJ(t,e){var n,r=e.s<0,i=kJ(t,t.precision,1),o=i.times(.5);if((e=e.abs()).lte(o))return Zq=r?4:1,e;if((n=e.divToInt(i)).isZero())Zq=r?3:2;else{if((e=e.minus(n.times(i))).lte(o))return Zq=DJ(n)?r?2:3:r?4:1,e;Zq=DJ(n)?r?1:4:r?3:2}return e.minus(i).abs()}function QJ(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor,p=void 0!==n;if(p?(LJ(n,1,$q),void 0===r?r=f.rounding:LJ(r,0,8)):(n=f.precision,r=f.rounding),t.isFinite()){for(p?(i=2,16==e?n=4*n-3:8==e&&(n=3*n-2)):i=e,(a=(l=xJ(t)).indexOf("."))>=0&&(l=l.replace(".",""),(d=new f(1)).e=l.length-a,d.d=NJ(xJ(d),10,i),d.e=d.d.length),o=u=(h=NJ(l,10,i)).length;0==h[--u];)h.pop();if(h[0]){if(a<0?o--:((t=new f(t)).d=h,t.e=o,h=(t=EJ(t,d,n,r,0,i)).d,o=t.e,c=Gq),a=h[n],s=i/2,c=c||void 0!==h[n+1],c=r<4?(void 0!==a||c)&&(0===r||r===(t.s<0?3:2)):a>s||a===s&&(4===r||c||6===r&&1&h[n-1]||r===(t.s<0?8:7)),h.length=n,c)for(;++h[--n]>i-1;)h[n]=0,n||(++o,h.unshift(1));for(u=h.length;!h[u-1];--u);for(a=0,l="";a<u;a++)l+=tJ.charAt(h[a]);if(p){if(u>1)if(16==e||8==e){for(a=16==e?4:3,--u;u%a;u++)l+="0";for(u=(h=NJ(l,i,e)).length;!h[u-1];--u);for(a=1,l="1.";a<u;a++)l+=tJ.charAt(h[a])}else l=l.charAt(0)+"."+l.slice(1);l=l+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)l="0"+l;l="0."+l}else if(++o>u)for(o-=u;o--;)l+="0";else o<u&&(l=l.slice(0,o)+"."+l.slice(o))}else l=p?"0p+0":"0";l=(16==e?"0x":2==e?"0b":8==e?"0o":"")+l}else l=RJ(t);return t.s<0?"-"+l:l}function HJ(t,e){if(t.length>e)return t.length=e,!0}function GJ(t){return new this(t).abs()}function ZJ(t){return new this(t).acos()}function VJ(t){return new this(t).acosh()}function qJ(t,e){return new this(t).plus(e)}function JJ(t){return new this(t).asin()}function KJ(t){return new this(t).asinh()}function XJ(t){return new this(t).atan()}function $J(t){return new this(t).atanh()}function tK(t,e){t=new this(t),e=new this(e);var n,r=this.precision,i=this.rounding,o=r+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(n=e.s<0?kJ(this,r,i):new this(0)).s=t.s:!t.d||e.isZero()?(n=kJ(this,o,1).times(.5)).s=t.s:e.s<0?(this.precision=o,this.rounding=1,n=this.atan(EJ(t,e,o,1)),e=kJ(this,o,1),this.precision=r,this.rounding=i,n=t.s<0?n.minus(e):n.plus(e)):n=this.atan(EJ(t,e,o,1)):(n=kJ(this,o,1).times(e.s>0?.25:.75)).s=t.s:n=new this(NaN),n}function eK(t){return new this(t).cbrt()}function nK(t){return SJ(t=new this(t),t.e+1,2)}function rK(t,e,n){return new this(t).clamp(e,n)}function iK(t){if(!t||"object"!=typeof t)throw Error(oJ+"Object expected");var e,n,r,i=!0===t.defaults,o=["precision",1,$q,"rounding",0,8,"toExpNeg",-Xq,0,"toExpPos",0,Xq,"maxE",0,Xq,"minE",-Xq,0,"modulo",0,9];for(e=0;e<o.length;e+=3)if(n=o[e],i&&(this[n]=rJ[n]),void 0!==(r=t[n])){if(!(lJ(r)===r&&r>=o[e+1]&&r<=o[e+2]))throw Error(aJ+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=rJ[n]),void 0!==(r=t[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(aJ+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(uJ);this[n]=!0}else this[n]=!1}return this}function oK(t){return new this(t).cos()}function aK(t){return new this(t).cosh()}function sK(t,e){return new this(t).div(e)}function uK(t){return new this(t).exp()}function cK(t){return SJ(t=new this(t),t.e+1,3)}function lK(){var t,e,n=new this(0);for(iJ=!1,t=0;t<arguments.length;)if((e=new this(arguments[t++])).d)n.d&&(n=n.plus(e.times(e)));else{if(e.s)return iJ=!0,new this(1/0);n=e}return iJ=!0,n.sqrt()}function hK(t){return t instanceof TK||t&&t.toStringTag===cJ||!1}function dK(t){return new this(t).ln()}function fK(t,e){return new this(t).log(e)}function pK(t){return new this(t).log(2)}function mK(t){return new this(t).log(10)}function gK(){return OJ(this,arguments,"lt")}function yK(){return OJ(this,arguments,"gt")}function bK(t,e){return new this(t).mod(e)}function wK(t,e){return new this(t).mul(e)}function vK(t,e){return new this(t).pow(e)}function MK(t){var e,n,r,i,o=0,a=new this(1),s=[];if(void 0===t?t=this.precision:LJ(t,1,$q),r=Math.ceil(t/yJ),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=e[o])>=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(uJ);for(e=crypto.randomBytes(r*=4);o<r;)(i=e[o]+(e[o+1]<<8)+(e[o+2]<<16)+((127&e[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(e,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o<r;)s[o++]=1e7*Math.random()|0;for(r=s[--o],t%=yJ,r&&t&&(i=hJ(10,yJ-t),s[o]=(r/i|0)*i);0===s[o];o--)s.pop();if(o<0)n=0,s=[0];else{for(n=-1;0===s[0];n-=yJ)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<yJ&&(n-=yJ-r)}return a.e=n,a.d=s,a}function LK(t){return SJ(t=new this(t),t.e+1,this.rounding)}function _K(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function NK(t){return new this(t).sin()}function EK(t){return new this(t).sinh()}function SK(t){return new this(t).sqrt()}function xK(t,e){return new this(t).sub(e)}function AK(){var t=0,e=arguments,n=new this(e[t]);for(iJ=!1;n.s&&++t<e.length;)n=n.plus(e[t]);return iJ=!0,SJ(n,this.precision,this.rounding)}function IK(t){return new this(t).tan()}function kK(t){return new this(t).tanh()}function jK(t){return SJ(t=new this(t),t.e+1,1)}vJ[Symbol.for("nodejs.util.inspect.custom")]=vJ.toString,vJ[Symbol.toStringTag]="Decimal";var TK=vJ.constructor=function t(e){var n,r,i;function o(t){var e,n,r,i=this;if(!(i instanceof o))return new o(t);if(i.constructor=o,hK(t))return i.s=t.s,void(iJ?!t.d||t.e>o.maxE?(i.e=NaN,i.d=null):t.e<o.minE?(i.e=0,i.d=[0]):(i.e=t.e,i.d=t.d.slice()):(i.e=t.e,i.d=t.d?t.d.slice():t.d));if("number"===(r=typeof t)){if(0===t)return i.s=1/t<0?-1:1,i.e=0,void(i.d=[0]);if(t<0?(t=-t,i.s=-1):i.s=1,t===~~t&&t<1e7){for(e=0,n=t;n>=10;n/=10)e++;return void(iJ?e>o.maxE?(i.e=NaN,i.d=null):e<o.minE?(i.e=0,i.d=[0]):(i.e=e,i.d=[t]):(i.e=e,i.d=[t]))}return 0*t!=0?(t||(i.s=NaN),i.e=NaN,void(i.d=null)):BJ(i,t.toString())}if("string"!==r)throw Error(aJ+t);return 45===(n=t.charCodeAt(0))?(t=t.slice(1),i.s=-1):(43===n&&(t=t.slice(1)),i.s=1),mJ.test(t)?BJ(i,t):UJ(i,t)}if(o.prototype=vJ,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=iK,o.clone=t,o.isDecimal=hK,o.abs=GJ,o.acos=ZJ,o.acosh=VJ,o.add=qJ,o.asin=JJ,o.asinh=KJ,o.atan=XJ,o.atanh=$J,o.atan2=tK,o.cbrt=eK,o.ceil=nK,o.clamp=rK,o.cos=oK,o.cosh=aK,o.div=sK,o.exp=uK,o.floor=cK,o.hypot=lK,o.ln=dK,o.log=fK,o.log10=mK,o.log2=pK,o.max=gK,o.min=yK,o.mod=bK,o.mul=wK,o.pow=vK,o.random=MK,o.round=LK,o.sign=_K,o.sin=NK,o.sinh=EK,o.sqrt=SK,o.sub=xK,o.sum=AK,o.tan=IK,o.tanh=kK,o.trunc=jK,void 0===e&&(e={}),e&&!0!==e.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)e.hasOwnProperty(r=i[n++])||(e[r]=this[r]);return o.config(e),o}(rJ);eJ=new TK(eJ),nJ=new TK(nJ);var CK=[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}],DK=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],OK=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}],zK=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}],PK=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}];const RK=[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];var BK=({blockchain:t,address:e,api:n,id:r})=>r?new Promise((n=>{RG({blockchain:t,address:e,api:RK,method:"uri",params:[r]}).then((t=>{var e;t=t.match("0x{id}")?t.replace("0x{id}",r):t,(e=t,new Promise((t=>{e.match(/^ipfs/)&&(e=`https://ipfs.io/ipfs/${e.split("://")[1]}`),fetch(e).then((e=>{if(e.ok)return e.json();t()})).then((e=>{if(e){let n=e.name;n?t(n):t()}})).catch((()=>t()))}))).then(n)})).catch((t=>{console.log("error",t),n()}))})):RG({blockchain:t,address:e,api:n,method:"name",cache:864e5}),UK=[{name:"Approval",type:"event",inputs:[{name:"src",type:"address",indexed:!0,internalType:"address"},{name:"guy",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{name:"Deposit",type:"event",inputs:[{name:"dst",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{name:"Transfer",type:"event",inputs:[{name:"src",type:"address",indexed:!0,internalType:"address"},{name:"dst",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{name:"Withdrawal",type:"event",inputs:[{name:"src",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"fallback",stateMutability:"payable"},{name:"allowance",type:"function",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{name:"approve",type:"function",inputs:[{name:"guy",type:"address",internalType:"address"},{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"nonpayable"},{name:"balanceOf",type:"function",inputs:[{name:"",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{name:"decimals",type:"function",inputs:[],outputs:[{name:"",type:"uint8",internalType:"uint8"}],stateMutability:"view"},{name:"deposit",type:"function",inputs:[],outputs:[],stateMutability:"payable"},{name:"name",type:"function",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{name:"symbol",type:"function",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{name:"totalSupply",type:"function",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{name:"transfer",type:"function",inputs:[{name:"dst",type:"address",internalType:"address"},{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"nonpayable"},{name:"transferFrom",type:"function",inputs:[{name:"src",type:"address",internalType:"address"},{name:"dst",type:"address",internalType:"address"},{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"nonpayable"},{name:"withdraw",type:"function",inputs:[{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"}];const YK="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",FK="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";var WK=async({token:t,owner:e})=>{const[n]=await lF.findProgramAddress([new lF(e).toBuffer(),new lF(YK).toBuffer(),new lF(t).toBuffer()],new lF(FK));return function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([n,"optionalAccess",t=>t.toString,"call",t=>t()])};const QK=iG([sG("mintAuthorityOption"),eG("mintAuthority"),uG("supply"),cG("decimals"),$H("isInitialized"),sG("freezeAuthorityOption"),eG("freezeAuthority")]),HK=nG([iG([],"uninitialized"),iG([],"editionV1"),iG([],"masterEditionV1"),iG([],"reservationListV1"),iG([],"metadataV1"),iG([],"reservationListV2"),iG([],"masterEditionV2"),iG([],"editionMarker")]),GK=iG([eG("address"),$H("verified"),cG("share")]),ZK=iG([rG("name"),rG("symbol"),rG("uri"),aG("sellerFeeBasisPoints"),tG(lG(GK.replicate("creators")),"creators")]),VK=iG([HK.replicate("key"),eG("updateAuthority"),eG("mint"),ZK.replicate("data"),$H("primarySaleHappened"),$H("isMutable"),tG(cG(),"editionNonce")]),qK=iG([cG("instruction"),uG("amount")]),JK=iG([eG("mint"),eG("owner"),uG("amount"),sG("delegateOption"),eG("delegate"),cG("state"),sG("isNativeOption"),uG("isNative"),uG("delegatedAmount"),sG("closeAuthorityOption"),eG("closeAuthority")]),KK=iG([cG("instruction"),eG("owner")]),XK=iG([cG("instruction")]);var $K=Object.freeze({__proto__:null,createTransferInstruction:async({token:t,amount:e,from:n,to:r})=>{let i=await WK({token:t,owner:n}),o=await WK({token:t,owner:r});const a=[{pubkey:new lF(i),isSigner:!1,isWritable:!0},{pubkey:new lF(o),isSigner:!1,isWritable:!0},{pubkey:new lF(n),isSigner:!0,isWritable:!1}],s=JH.alloc(qK.span);return qK.encode({instruction:3,amount:new KH(e)},s),new SF({keys:a,programId:new lF(YK),data:s})},createAssociatedTokenAccountInstruction:async({token:t,owner:e,payer:n})=>{let r=await WK({token:t,owner:e});const i=[{pubkey:new lF(n),isSigner:!0,isWritable:!0},{pubkey:new lF(r),isSigner:!1,isWritable:!0},{pubkey:new lF(e),isSigner:!1,isWritable:!1},{pubkey:new lF(t),isSigner:!1,isWritable:!1},{pubkey:VF.programId,isSigner:!1,isWritable:!1},{pubkey:new lF(YK),isSigner:!1,isWritable:!1}];return new SF({keys:i,programId:FK,data:JH.alloc(0)})},initializeAccountInstruction:({account:t,token:e,owner:n})=>{const r=[{pubkey:new lF(t),isSigner:!1,isWritable:!0},{pubkey:new lF(e),isSigner:!1,isWritable:!1}],i=JH.alloc(KK.span);return KK.encode({instruction:18,owner:new lF(n)},i),new SF({keys:r,programId:new lF(YK),data:i})},closeAccountInstruction:({account:t,owner:e})=>{const n=[{pubkey:new lF(t),isSigner:!1,isWritable:!0},{pubkey:new lF(e),isSigner:!1,isWritable:!0},{pubkey:new lF(e),isSigner:!0,isWritable:!1}],r=JH.alloc(XK.span);return XK.encode({instruction:9},r),new SF({keys:n,programId:new lF(YK),data:r})}});function tX(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}const eX="metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",nX=new RegExp("\0","g"),rX=async({blockchain:t,address:e})=>{let n=new lF(e),r=new lF(eX),i=await(async({metaDataPublicKey:t,mintPublicKey:e})=>{let n=[JH.from("metadata"),t.toBuffer(),e.toBuffer()];return(await lF.findProgramAddress(n,t))[0]})({metaDataPublicKey:r,mintPublicKey:n}),o=await RG({blockchain:t,address:i.toString(),api:VK,cache:864e5});return{name:tX([o,"optionalAccess",t=>t.data,"optionalAccess",t=>t.name,"optionalAccess",t=>t.replace,"call",t=>t(nX,"")]),symbol:tX([o,"optionalAccess",t=>t.data,"optionalAccess",t=>t.symbol,"optionalAccess",t=>t.replace,"call",t=>t(nX,"")])}};let iX=["ethereum","bsc","polygon","solana","fantom","velas"];function oX(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}iX.evm=["ethereum","bsc","polygon","fantom","velas"],iX.solana=["solana"];class aX{constructor({blockchain:t,address:e}){this.blockchain=t,iX.evm.includes(this.blockchain)?this.address=Mp(e):iX.solana.includes(this.blockchain)&&(this.address=e)}async decimals(){if(this.address==Ch.findByName(this.blockchain).currency.address)return Ch.findByName(this.blockchain).currency.decimals;let t;try{iX.evm.includes(this.blockchain)?t=await(({blockchain:t,address:e,api:n})=>RG({blockchain:t,address:e,api:n,method:"decimals",cache:864e5}))({blockchain:this.blockchain,address:this.address,api:aX[this.blockchain].DEFAULT}):iX.solana.includes(this.blockchain)&&(t=await(async({blockchain:t,address:e})=>(await RG({blockchain:t,address:e,api:QK})).decimals)({blockchain:this.blockchain,address:this.address}))}catch(t){}return t}async symbol(){return this.address==Ch.findByName(this.blockchain).currency.address?Ch.findByName(this.blockchain).currency.symbol:iX.evm.includes(this.blockchain)?await(({blockchain:t,address:e,api:n})=>RG({blockchain:t,address:e,api:n,method:"symbol",cache:864e5}))({blockchain:this.blockchain,address:this.address,api:aX[this.blockchain].DEFAULT}):iX.solana.includes(this.blockchain)?await(async({blockchain:t,address:e})=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([await rX({blockchain:t,address:e}),"optionalAccess",t=>t.symbol]))({blockchain:this.blockchain,address:this.address}):void 0}async name(t){return this.address==Ch.findByName(this.blockchain).currency.address?Ch.findByName(this.blockchain).currency.name:iX.evm.includes(this.blockchain)?await BK({blockchain:this.blockchain,address:this.address,api:aX[this.blockchain].DEFAULT,id:oX([t,"optionalAccess",t=>t.id])}):iX.solana.includes(this.blockchain)?await(async({blockchain:t,address:e})=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([await rX({blockchain:t,address:e}),"optionalAccess",t=>t.name]))({blockchain:this.blockchain,address:this.address}):void 0}async balance(t,e){return iX.evm.includes(this.blockchain)?await(async({blockchain:t,address:e,account:n,api:r,id:i})=>e==Ch[t].currency.address?await RG({blockchain:t,address:n,method:"balance",cache:1e4}):await RG({blockchain:t,address:e,method:"balanceOf",api:r,params:i?[n,i]:[n],cache:1e4}))({blockchain:this.blockchain,account:t,address:this.address,api:e?aX[this.blockchain][1155]:aX[this.blockchain].DEFAULT,id:e}):iX.solana.includes(this.blockchain)?await(async({blockchain:t,address:e,account:n,api:r})=>{if(e==Ch[t].currency.address)return kd.from(await RG(`solana://${n}/balance`));{let t=[{dataSize:165},{memcmp:{offset:32,bytes:n}},{memcmp:{offset:0,bytes:e}}],r=await RG("solana://TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA/getProgramAccounts",{params:{filters:t}}),i=kd.from("0");return await Promise.all(r.map((t=>RG(`solana://${t.pubkey.toString()}/getTokenAccountBalance`)))).then((t=>{t.forEach((t=>{i=i.add(kd.from(t.value.amount))}))})),i}})({blockchain:this.blockchain,account:t,address:this.address,api:aX[this.blockchain].DEFAULT}):void 0}async allowance(t,e){return this.address==Ch.findByName(this.blockchain).currency.address?kd.from(Ch.findByName(this.blockchain).maxInt):iX.evm.includes(this.blockchain)?await(({blockchain:t,address:e,api:n,owner:r,spender:i})=>RG({blockchain:t,address:e,api:n,method:"allowance",params:[r,i],cache:5e3}))({blockchain:this.blockchain,address:this.address,api:aX[this.blockchain].DEFAULT,owner:t,spender:e}):iX.solana.includes(this.blockchain)?kd.from(Ch.findByName(this.blockchain).maxInt):void 0}async BigNumber(t){let e=await this.decimals();return $M(aX.safeAmount({amount:parseFloat(t),decimals:e}).toString(),e)}async readable(t){let e=await this.decimals(),n=XM(t.toString(),e);return n=n.replace(/\.0+$/,""),n}}function sX(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}aX.BigNumber=async({amount:t,blockchain:e,address:n})=>new aX({blockchain:e,address:n}).BigNumber(t),aX.readable=async({amount:t,blockchain:e,address:n})=>new aX({blockchain:e,address:n}).readable(t),aX.safeAmount=({amount:t,decimals:e})=>parseFloat(t.toFixed(e)),aX.ethereum={DEFAULT:OK,ERC20:OK,20:OK,1155:[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}]},aX.bsc={DEFAULT:CK,BEP20:CK,20:CK,1155:DK},aX.polygon={DEFAULT:zK,ERC20:zK,20:zK,1155:DK},aX.fantom={DEFAULT:PK,FTM20:PK,20:PK,1155:[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}]},aX.velas={DEFAULT:UK,VRC20:UK,20:UK,1155:DK},aX.solana={MINT_LAYOUT:QK,METADATA_LAYOUT:VK,TRANSFER_LAYOUT:qK,METADATA_ACCOUNT:eX,TOKEN_PROGRAM:YK,TOKEN_LAYOUT:JK,ASSOCIATED_TOKEN_PROGRAM:FK,findProgramAddress:WK,findAccount:async({token:t,owner:e})=>{let n=(await RG(`solana://${YK}/getProgramAccounts`,{api:JK,params:{filters:[{dataSize:165},{memcmp:{offset:32,bytes:e}},{memcmp:{offset:0,bytes:t}}]}})).sort(((t,e)=>t.account.data.amount.lt(e.account.data.amount)?1:-1))[0];if(n)return n.pubkey.toString()},getMetaData:rX,...$K};class uX{constructor({tokenIn:t,tokenOut:e,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,exchange:s,getTransaction:u}){this.tokenIn=t,this.tokenOut=e,this.path=n,this.amountIn=sX([r,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOutMin=sX([a,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOut=sX([o,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountInMax=sX([i,"optionalAccess",t=>t.toString,"call",t=>t()]),this.exchange=s,this.getTransaction=u}}let cX=["ethereum","bsc","polygon","solana","fantom","velas"];cX.evm=["ethereum","bsc","polygon","fantom","velas"],cX.solana=["solana"];const lX=async({exchange:t,fixedPath:e,amountIn:n,amountOut:r})=>{let i=n.add(n.mul(100*parseFloat("0.5")).div(1e4));if(!cX.evm.includes(t.blockchain))return i;const o=await RG({blockchain:t.blockchain,method:"latestBlockNumber"});let a=[];for(var s=0;s<=2;s++)a.push(o-s);const u=await Promise.all(a.map((async n=>{let{amountIn:i}=await t.getAmounts({path:e,amountOut:r,block:n});return i})));if(!u[0]||!u[1]||!u[2])return i;let c;if(u[0].gt(u[1])&&u[1].gt(u[2])){const t=u[0].sub(u[1]),e=u[1].sub(u[2]),n=t.add(e).div(2);if(c=u[0].add(n),c.gt(i))return c}else if(!u[0].eq(u[1])&&!u[1].eq(u[2])){const t=u[0].sub(u[1]).abs(),e=u[1].sub(u[2]).abs();let n,r;if(n=t.lt(e)?t:e,r=u[0].gt(u[1])&&u[0].gt(u[2])?u[0]:u[1].gt(u[2])&&u[1].gt(u[0])?u[1]:u[2],c=r.add(n),c.gt(i))return c}return i},hX=async({exchange:t,fixedPath:e,amounts:n,tokenIn:r,tokenOut:i,amountIn:o,amountInMax:a,amountOut:s,amountOutMin:u,amountInInput:c,amountOutInput:l,amountInMaxInput:h,amountOutMinInput:d})=>{if(d||l){if(cX.evm.includes(t.blockchain))o=a=await lX({exchange:t,fixedPath:e,amountIn:o,amountOut:d||s});else if(cX.solana.includes(t.blockchain)){let r=[];await Promise.all(e.map(((i,o)=>{if(0!=o){let i=lX({exchange:t,fixedPath:[e[o-1],e[o]],amountIn:n[o-1],amountOut:n[o]});return i.then((t=>r.push(t))),i}}))),r.push(n[n.length-1]),o=a=(n=r)[0]}}else if((h||c)&&cX.solana.includes(t.blockchain)){let r=[];await Promise.all(e.map(((i,o)=>{if(0!==o&&o<e.length-1)r.unshift(n[o]);else if(o===e.length-1){let i=(async({exchange:t,fixedPath:e,amountOut:n,amountIn:r})=>n.sub(n.mul(100*parseFloat("0.5")).div(1e4)))({exchange:t,fixedPath:[e[o-1],e[o]],amountIn:n[o-1],amountOut:n[o]});return i.then((t=>(r.unshift(t),t))),i}}))),r.push(n[0]),s=u=(n=r.slice().reverse())[n.length-1]}return{amountIn:o,amountInMax:a,amountOut:s,amountOutMin:u,amounts:n}},dX=t=>t.match("0x")?Mp(t):t;let fX=async({amount:t,blockchain:e,address:n})=>await aX.BigNumber({amount:t,blockchain:e,address:n}),pX=async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{let u={exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s};return o&&"number"==typeof o&&(u.amountOut=await fX({amount:o,blockchain:t,address:r})),s&&"number"==typeof s&&(u.amountOutMin=await fX({amount:s,blockchain:t,address:r})),i&&"number"==typeof i&&(u.amountIn=await fX({amount:i,blockchain:t,address:n})),a&&"number"==typeof a&&(u.amountInMax=await fX({amount:a,blockchain:t,address:n})),u};class mX{constructor({name:t,blockchain:e,alternativeNames:n,label:r,logo:i,router:o,factory:a,wrapper:s,pair:u,market:c,findPath:l,pathExists:h,getAmounts:d,getTransaction:f,slippage:p,getPair:m}){this.name=t,this.blockchain=e,this.alternativeNames=n,this.label=r,this.logo=i,this.router=o,this.factory=a,this.wrapper=s,this.pair=u,this.market=c,this.findPath=l,this.pathExists=h,this.getAmounts=d,this.getTransaction=f,this.slippage=p,this.getPair=m}async route({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o,amountOutMax:a,amountInMin:s}){return t===e?Promise.resolve():((({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o,amountOutMax:a,amountInMin:s})=>{if(void 0!==a)throw"You cannot not set amountOutMax! Only amountInMax or amountOutMin!";if(void 0!==s)throw"You cannot not set amountInMin! Only amountInMax or amountOutMin!";if(void 0!==r&&void 0!==n)throw"You cannot set amountIn and amountOut at the same time, use amountInMax or amountOutMin to describe the non exact part of the swap!";if(void 0!==i&&void 0!==o)throw"You cannot set amountInMax and amountOutMin at the same time, use amountIn or amountOut to describe the part of the swap that needs to be exact!";if(void 0!==n&&void 0!==i)throw"Setting amountIn and amountInMax at the same time makes no sense. Decide if amountIn needs to be exact or not!";if(void 0!==r&&void 0!==o)throw"Setting amountOut and amountOutMin at the same time makes no sense. Decide if amountOut needs to be exact or not!"})({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o,amountOutMax:a,amountInMin:s}),await(({exchange:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a,findPath:s,getAmounts:u,getTransaction:c,slippage:l})=>(e=dX(e),n=dX(n),new Promise((async h=>{let{path:d,fixedPath:f}=await s({tokenIn:e,tokenOut:n});if(void 0===d||0==d.length)return h();let p,[m,g,y,b]=[r,i,o,a];if(({amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amounts:p}=await u({path:d,tokenIn:e,tokenOut:n,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a})),[r,o,i,a].every((t=>null==t)))return h();l&&({amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amounts:p}=await hX({exchange:t,fixedPath:f,amounts:p,tokenIn:e,tokenOut:n,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amountInInput:m,amountOutInput:g,amountInMaxInput:y,amountOutMinInput:b})),h(new uX({tokenIn:e,tokenOut:n,path:d,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,exchange:t,getTransaction:async({from:e})=>await c({exchange:t,path:d,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amounts:p,amountInInput:m,amountOutInput:g,amountInMaxInput:y,amountOutMinInput:b,fromAddress:e})}))}))))({...await pX({blockchain:this.blockchain,exchange:this,tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o}),findPath:this.findPath,getAmounts:this.getAmounts,getTransaction:this.getTransaction,slippage:this.slippage}))}}function gX(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}const yX=(t,e,n)=>{if(!n)return;let r=n.map(((e,r)=>e===t.currency.address&&n[r+1]!=t.wrapped.address&&n[r-1]!=t.wrapped.address?t.wrapped.address:e));return r[0]==t.currency.address&&r[1]==t.wrapped.address?r.splice(0,1):r[r.length-1]==t.currency.address&&r[r.length-2]==t.wrapped.address&&r.splice(r.length-1,1),r},bX=({reserves:t,min:e,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?t[0].gte($M(e.toString(),o)):i.toLowerCase()==n.toLowerCase()&&t[1].gte($M(e.toString(),o)),wX=async(t,e,n)=>{if(1==yX(t,0,n).length)return!1;let r=await RG({blockchain:t.name,address:e.factory.address,method:"getPair",api:e.factory.api,cache:36e5,params:yX(t,0,n)});if(r==t.zero)return!1;let[i,o,a]=await Promise.all([RG({blockchain:t.name,address:r,method:"getReserves",api:e.pair.api,cache:36e5}),RG({blockchain:t.name,address:r,method:"token0",api:e.pair.api,cache:36e5}),RG({blockchain:t.name,address:r,method:"token1",api:e.pair.api,cache:36e5})]);if(n.includes(t.wrapped.address))return bX({min:1,token:t.wrapped.address,decimals:t.currency.decimals,reserves:i,token0:o,token1:a});if(n.find((e=>t.stables.usd.includes(e)))){let e=n.find((e=>t.stables.usd.includes(e))),r=new aX({blockchain:t.name,address:e}),s=await r.decimals();return bX({min:1e3,token:e,decimals:s,reserves:i,token0:o,token1:a})}return!0};let vX=(t,e,{path:n,amountIn:r,tokenIn:i,tokenOut:o})=>new Promise((i=>{RG({blockchain:t.name,address:e.router.address,method:"getAmountsOut",api:e.router.api,params:{amountIn:r,path:yX(t,0,n)}}).then((t=>{i(t[t.length-1])})).catch((()=>i()))})),MX=(t,e,{path:n,amountOut:r,block:i})=>new Promise((o=>{RG({blockchain:t.name,address:e.router.address,method:"getAmountsIn",api:e.router.api,params:{amountOut:r,path:yX(t,0,n)},block:i}).then((t=>o(t[0]))).catch((()=>o()))}));var LX={findPath:async(t,e,{tokenIn:n,tokenOut:r})=>{if([n,r].includes(t.currency.address)&&[n,r].includes(t.wrapped.address))return{path:void 0,fixedPath:void 0};let i;if(await wX(t,e,[n,r]))i=[n,r];else if(n!=t.wrapped.address&&await wX(t,e,[n,t.wrapped.address])&&r!=t.wrapped.address&&await wX(t,e,[r,t.wrapped.address]))i=[n,t.wrapped.address,r];else if(!t.stables.usd.includes(n)&&(await Promise.all(t.stables.usd.map((r=>wX(t,e,[n,r]))))).filter(Boolean).length&&r!=t.wrapped.address&&await wX(t,e,[t.wrapped.address,r])){let o=(await Promise.all(t.stables.usd.map((async r=>await wX(t,e,[n,r])?r:void 0)))).find(Boolean);i=[n,o,t.wrapped.address,r]}else if(n!=t.wrapped.address&&await wX(t,e,[n,t.wrapped.address])&&!t.stables.usd.includes(r)&&(await Promise.all(t.stables.usd.map((n=>wX(t,e,[n,r]))))).filter(Boolean).length){let o=(await Promise.all(t.stables.usd.map((async n=>await wX(t,e,[n,r])?n:void 0)))).find(Boolean);i=[n,t.wrapped.address,o,r]}return gX([i,"optionalAccess",t=>t.length])&&i[0]==t.currency.address?i.splice(1,0,t.wrapped.address):gX([i,"optionalAccess",t=>t.length])&&i[i.length-1]==t.currency.address&&i.splice(i.length-1,0,t.wrapped.address),{path:i,fixedPath:yX(t,0,i)}},pathExists:wX,getAmounts:async(t,e,{path:n,block:r,tokenIn:i,tokenOut:o,amountOut:a,amountIn:s,amountInMax:u,amountOutMin:c})=>{if(a){if(null==(s=await MX(t,e,{block:r,path:n,amountOut:a,tokenIn:i,tokenOut:o}))||u&&s.gt(u))return{};void 0===u&&(u=s)}else if(s){if(null==(a=await vX(t,e,{path:n,amountIn:s,tokenIn:i,tokenOut:o}))||c&&a.lt(c))return{};void 0===c&&(c=a)}else if(c){if(null==(s=await MX(t,e,{block:r,path:n,amountOut:c,tokenIn:i,tokenOut:o}))||u&&s.gt(u))return{};void 0===u&&(u=s)}else if(u){if(null==(a=await vX(t,e,{path:n,amountIn:u,tokenIn:i,tokenOut:o}))||c&&a.lt(c))return{};void 0===c&&(c=a)}return{amountOut:a,amountIn:s,amountInMax:u,amountOutMin:c}},getTransaction:(t,e,{path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,fromAddress:h})=>{let d={blockchain:t.name,from:h,to:e.router.address,api:e.router.api};return n[0]===t.currency.address?s||l?(d.method="swapExactETHForTokens",d.value=r.toString(),d.params={amountOutMin:a.toString()}):(u||c)&&(d.method="swapETHForExactTokens",d.value=i.toString(),d.params={amountOut:o.toString()}):n[n.length-1]===t.currency.address?s||l?(d.method="swapExactTokensForETH",d.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(d.method="swapTokensForExactETH",d.params={amountInMax:i.toString(),amountOut:o.toString()}):s||l?(d.method="swapExactTokensForTokens",d.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(d.method="swapTokensForExactTokens",d.params={amountInMax:i.toString(),amountOut:o.toString()}),d.params=Object.assign({},d.params,{path:yX(t,0,n),to:h,deadline:Math.round(Date.now()/1e3)+1800}),d},ROUTER:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"amountADesired",type:"uint256"},{internalType:"uint256",name:"amountBDesired",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountTokenDesired",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountIn",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountOut",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsIn",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsOut",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"reserveA",type:"uint256"},{internalType:"uint256",name:"reserveB",type:"uint256"}],name:"quote",outputs:[{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETHSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermit",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityWithPermit",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETHSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!1,internalType:"address",name:"pair",type:"address"},{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"PairCreated",type:"event"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"allPairs",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"allPairsLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"}],name:"createPair",outputs:[{internalType:"address",name:"pair",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"feeTo",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"feeToSetter",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"getPair",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeTo",type:"address"}],name:"setFeeTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],name:"setFeeToSetter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}],PAIR:[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount0Out",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1Out",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint112",name:"reserve0",type:"uint112"},{indexed:!1,internalType:"uint112",name:"reserve1",type:"uint112"}],name:"Sync",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MINIMUM_LIQUIDITY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getReserves",outputs:[{internalType:"uint112",name:"_reserve0",type:"uint112"},{internalType:"uint112",name:"_reserve1",type:"uint112"},{internalType:"uint32",name:"_blockTimestampLast",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_token0",type:"address"},{internalType:"address",name:"_token1",type:"address"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"kLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"liquidity",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"price0CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"price1CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"skim",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount0Out",type:"uint256"},{internalType:"uint256",name:"amount1Out",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"sync",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]};const _X=Ch.bsc,NX={blockchain:"bsc",name:"pancakeswap",alternativeNames:["pancake"],label:"PancakeSwap",logo:"data:image/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qzc1LjYxMzUgMTI3LjYxNCA3MS4wMjEgMTMyLjY3NSA2NS4zNTU4IDEzMi42NzVDNTkuNjkwNyAxMzIuNjc1IDU1LjA5ODEgMTI3LjYxNCA1NS4wOTgxIDExNy44OTZDNTUuMDk4MSAxMDguMTc4IDU5LjY5MDcgMTAzLjExNyA2NS4zNTU4IDEwMy4xMTdDNzEuMDIxIDEwMy4xMTcgNzUuNjEzNSAxMDguMTc4IDc1LjYxMzUgMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPHBhdGggZD0iTTE0Mi4yODggMTE3Ljg5NkMxNDIuMjg4IDEyNy42MTQgMTM3LjY5NiAxMzIuNjc1IDEzMi4wMzEgMTMyLjY3NUMxMjYuMzY1IDEzMi42NzUgMTIxLjc3MyAxMjcuNjE0IDEyMS43NzMgMTE3Ljg5NkMxMjEuNzczIDEwOC4xNzggMTI2LjM2NSAxMDMuMTE3IDEzMi4wMzEgMTAzLjExN0MxMzcuNjk2IDEwMy4xMTcgMTQyLjI4OCAxMDguMTc4IDE0Mi4yODggMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPC9zdmc+Cg==",router:{address:"0x10ED43C718714eb63d5aA57B78B54704E256024E",api:LX.ROUTER},factory:{address:"0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73",api:LX.FACTORY},pair:{api:LX.PAIR},slippage:!0};var EX=new mX(Object.assign(NX,{findPath:({tokenIn:t,tokenOut:e})=>LX.findPath(_X,NX,{tokenIn:t,tokenOut:e}),pathExists:t=>LX.pathExists(_X,NX,t),getAmounts:({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>LX.getAmounts(_X,NX,{path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>LX.getTransaction(_X,NX,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const SX=Ch.polygon,xX={blockchain:"polygon",name:"quickswap",alternativeNames:[],label:"QuickSwap",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNzAyLjQ1IDcwMi40NyI+PGRlZnM+PGNsaXBQYXRoIGlkPSJjbGlwLXBhdGgiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMy43OCAtMjMuNzcpIj48cmVjdCB3aWR0aD0iNzUwIiBoZWlnaHQ9Ijc1MCIgZmlsbD0ibm9uZSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwLXBhdGgpIj48cGF0aCBkPSJNMzU0Ljc0LDI0LjM3YTM1MS4yNywzNTEuMjcsMCwwLDEsMzYzLjc0LDI3NywzNTQsMzU0LDAsMCwxLDEuMjMsMTQxLjI2QTM1MS43NiwzNTEuNzYsMCwwLDEsNTEwLjEyLDY5OS4zYy03My43NywzMS0xNTguMjUsMzUuMzUtMjM0LjkxLDEyLjU0QTM1MiwzNTIsMCwwLDEsNDYuNTEsNDk5LjU2Yy0yOC03My40NS0zMC4xNi0xNTYuMzgtNi4yNC0yMzEuMjVBMzUwLjg4LDM1MC44OCwwLDAsMSwzNTQuNzQsMjQuMzciIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMy43OCAtMjMuNzcpIiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTE1OC44MSwzNDkuNThjMS4zOSw2LjQxLDIuMjMsMTIuOTIsMy42MSwxOS4zN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4zNC0yLjYxLDIuNzItMy44LDQuMTEtNS42Myw1LjM4LTcuMDcsOS4zNS0xNC42OSwxMS0yMy40NmEyNy40MywyNy40MywwLDAsMSwxLjIxLTMuNDMsMTExLDExMSwwLDAsMSw4LDIxLjE2YzIuNjMsMTAuMzEsNC4xMSwyMC44LDMuMzMsMzEuNGExMjMuMzEsMTIzLjMxLDAsMCwxLTE2LjA2LDUyLjMyYy05LjE2LDE2LjE1LTIxLDMwLTM0LjYsNDIuMzdhMTk5Ljg5LDE5OS44OSwwLDAsMS0zOS4zNywyNy41NCwyMTkuNSwyMTkuNSwwLDAsMS01NC4yNiwyMC43MSwyMDkuMjcsMjA5LjI3LDAsMCwxLTM2LjA1LDUuMmMtNS44NS4zMy0xMS43MS44My0xNy41Mi40Ni00LjUxLS4yOS05LjE0LDAtMTMuNTYtMS4zNyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIzLjc4IC0yMy43NykiIGZpbGw9IiMwZTFmNjYiLz48L2c+PC9zdmc+",router:{address:"0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff",api:LX.ROUTER},factory:{address:"0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",api:LX.FACTORY},pair:{api:LX.PAIR},slippage:!0};var AX=new mX(Object.assign(xX,{findPath:({tokenIn:t,tokenOut:e})=>LX.findPath(SX,xX,{tokenIn:t,tokenOut:e}),pathExists:t=>LX.pathExists(SX,xX,t),getAmounts:({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>LX.getAmounts(SX,xX,{path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>LX.getTransaction(SX,xX,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const IX=iG([uG("status"),uG("nonce"),uG("maxOrder"),uG("depth"),uG("baseDecimal"),uG("quoteDecimal"),uG("state"),uG("resetFlag"),uG("minSize"),uG("volMaxCutRatio"),uG("amountWaveRatio"),uG("baseLotSize"),uG("quoteLotSize"),uG("minPriceMultiplier"),uG("maxPriceMultiplier"),uG("systemDecimalValue"),uG("minSeparateNumerator"),uG("minSeparateDenominator"),uG("tradeFeeNumerator"),uG("tradeFeeDenominator"),uG("pnlNumerator"),uG("pnlDenominator"),uG("swapFeeNumerator"),uG("swapFeeDenominator"),uG("baseNeedTakePnl"),uG("quoteNeedTakePnl"),uG("quoteTotalPnl"),uG("baseTotalPnl"),oG("quoteTotalDeposited"),oG("baseTotalDeposited"),oG("swapBaseInAmount"),oG("swapQuoteOutAmount"),uG("swapBase2QuoteFee"),oG("swapQuoteInAmount"),oG("swapBaseOutAmount"),uG("swapQuote2BaseFee"),eG("baseVault"),eG("quoteVault"),eG("baseMint"),eG("quoteMint"),eG("lpMint"),eG("openOrders"),eG("marketId"),eG("marketProgramId"),eG("targetOrders"),eG("withdrawQueue"),eG("lpVault"),eG("owner"),uG("lpReserve"),HH(uG(),3,"padding")]),kX=iG([cG("instruction"),cG("simulateType")]),jX=iG([GH(5),GH(8),eG("ownAddress"),uG("vaultSignerNonce"),eG("baseMint"),eG("quoteMint"),eG("baseVault"),uG("baseDepositsTotal"),uG("baseFeesAccrued"),eG("quoteVault"),uG("quoteDepositsTotal"),uG("quoteFeesAccrued"),uG("quoteDustThreshold"),eG("requestQueue"),eG("eventQueue"),eG("bids"),eG("asks"),uG("baseLotSize"),uG("quoteLotSize"),uG("feeRateBps"),uG("referrerRebatesAccrued"),GH(7)]);var TX={blockchain:"solana",name:"raydium",alternativeNames:[],label:"Raydium",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2V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T0ic3RvcC1jb2xvcjojNjBCRkJCIi8+DQoJPC9saW5lYXJHcmFkaWVudD4NCgk8cGF0aCBzdHlsZT0iZmlsbDp1cmwoI1NWR0lEXzAwMDAwMTY5NTIwMTM4MjI0NjMyODE5MDMwMDAwMDE1MjkzNzI3NDI2MjcxODEyMjUyXyk7IiBkPSJNNDI3LjMsMTUxLjdMNDQ0LDE2MWwxNi42LTkuMnYtMTkuNQ0KCQlsLTE2LjYtOS42bC0xNi42LDkuNlYxNTEuN3oiLz4NCjwvZz4NCjwvc3ZnPg0K",pair:{v4:{address:"675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8",authority:"5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1",api:IX,LIQUIDITY_FEES_NUMERATOR:kd.from(25),LIQUIDITY_FEES_DENOMINATOR:kd.from(1e4)}},router:{v1:{address:"routeUGWgWzqBWFcrCfv8tritsqukccJPu3q5GPP3xS"}},market:{v3:{address:"srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX",api:jX}},slippage:!0};const CX=1,DX=6;let OX=async(t,e)=>await RG(`solana://${TX.pair.v4.address}/getProgramAccounts`,{params:{filters:[{dataSize:TX.pair.v4.api.span},{memcmp:{offset:400,bytes:t}},{memcmp:{offset:432,bytes:e}}]},api:TX.pair.v4.api,cache:36e5}),zX=async(t,e)=>{try{let n=await OX(t,e);return 0==n.length&&(n=await OX(e,t)),n}catch(t){return console.log(t),[]}},PX=async(t,e)=>{let n=await zX(t,e);return 1==n.length?n[0]:n.length<1?null:n.reduce(((t,e)=>{if(![CX,DX].includes(e.data.status.toNumber()))return;let n=e.data.lpReserve;return t.data.lpReserve.gte(n)?t:e}))},RX=async(t,e)=>(await zX(t,e)).length>0;function BX(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}const UX=Ch.solana,YX="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",FX="Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB";let WX=t=>{if(!t)return;let e=t.map(((e,n)=>e===UX.currency.address&&t[n+1]!=UX.wrapped.address&&t[n-1]!=UX.wrapped.address?UX.wrapped.address:e));return e[0]==UX.currency.address&&e[1]==UX.wrapped.address?e.splice(0,1):e[e.length-1]==UX.currency.address&&e[e.length-2]==UX.wrapped.address&&e.splice(e.length-1,1),e},QX=async t=>1!=t.length&&(t=WX(t),!(!await RX(t[0],t[1])&&!await RX(t[1],t[0])));const HX=async t=>await RG({blockchain:"solana",address:t,api:TX.market.v3.api,cache:36e5}),GX=async t=>{const e=JH.alloc(kX.span);kX.encode({instruction:12,simulateType:0},e);const n=await HX(t.data.marketId.toString()),r=[{pubkey:t.pubkey,isWritable:!1,isSigner:!1},{pubkey:new lF(TX.pair.v4.authority),isWritable:!1,isSigner:!1},{pubkey:t.data.openOrders,isWritable:!1,isSigner:!1},{pubkey:t.data.baseVault,isWritable:!1,isSigner:!1},{pubkey:t.data.quoteVault,isWritable:!1,isSigner:!1},{pubkey:t.data.lpMint,isWritable:!1,isSigner:!1},{pubkey:t.data.marketId,isWritable:!1,isSigner:!1},{pubkey:n.eventQueue,isWritable:!1,isSigner:!1}],i=new SF({programId:new lF(TX.pair.v4.address),keys:r,data:e}),o=new lF("RaydiumSimuLateTransaction11111111111111111");let a,s=new xF({feePayer:o});s.add(i);const u=await CG("solana");try{a=await u.simulateTransaction(s)}catch(t){}let c;if(a&&a.value&&a.value.logs){let t=a.value.logs.find((t=>t.match("GetPoolData:")));t&&(c=JSON.parse(t.replace(/.*GetPoolData:\s/,"")))}return c};let ZX=async({path:t,amountIn:e})=>{let n=[e],r=await Promise.all(t.map((async(e,r)=>{const i=t[r+1];if(null==i)return;const o=await PX(e,i),a=await GX(o);if(!a)return;const s=o.data.baseMint.toString(),u=[kd.from(a.pool_coin_amount.toString()),kd.from(a.pool_pc_amount.toString())],[c,l]=s==e?[u[0],u[1]]:[u[1],u[0]],h=n[r].mul(TX.pair.v4.LIQUIDITY_FEES_NUMERATOR).div(TX.pair.v4.LIQUIDITY_FEES_DENOMINATOR),d=n[r].sub(h),f=c.add(d),p=l.mul(d).div(f);n.push(p)})));if(r.length==t.length)return n},VX=async({path:t,amountOut:e})=>{t=t.slice().reverse();let n=[e],r=await Promise.all(t.map((async(e,r)=>{const i=t[r+1];if(null==i)return;const o=await PX(e,i),a=await GX(o);if(!a)return;o.pubkey.toString();const s=o.data.baseMint.toString();o.data.quoteMint.toString();const u=[kd.from(a.pool_coin_amount.toString()),kd.from(a.pool_pc_amount.toString())],[c,l]=s==e?[u[1],u[0]]:[u[0],u[1]],h=l.sub(n[r]),d=c.mul(n[r]).div(h).mul(TX.pair.v4.LIQUIDITY_FEES_DENOMINATOR).div(TX.pair.v4.LIQUIDITY_FEES_DENOMINATOR.sub(TX.pair.v4.LIQUIDITY_FEES_NUMERATOR));n.push(d)})));if(r.length==t.length)return n.slice().reverse()};const qX=Ch.solana,JX=({pair:t,amountIn:e,amountOutMin:n,amountOut:r,amountInMax:i,fix:o})=>{let a,s;return"in"===o?(a=iG([cG("instruction"),uG("amountIn"),uG("minAmountOut")]),s=JH.alloc(a.span),a.encode({instruction:9,amountIn:new KH(e.toString()),minAmountOut:new KH(n.toString())},s)):"out"===o&&(a=iG([cG("instruction"),uG("maxAmountIn"),uG("amountOut")]),s=JH.alloc(a.span),a.encode({instruction:11,maxAmountIn:new KH(i.toString()),amountOut:new KH(r.toString())},s)),s},KX=async({tokenIn:t,tokenInAccount:e,tokenOut:n,tokenOutAccount:r,pair:i,market:o,fromAddress:a})=>{e||(e=await aX.solana.findAccount({owner:a,token:t})),e||(e=await aX.solana.findProgramAddress({owner:a,token:t})),r||(r=await aX.solana.findAccount({owner:a,token:n})),r||(r=await aX.solana.findProgramAddress({owner:a,token:n}));let s=await(async(t,e)=>{const n=[e.toBuffer()];let r,i=0;for(;i<100;){try{const e=n.concat(JH.from([i]),JH.alloc(7));r=await lF.createProgramAddress(e,t)}catch(t){if(t instanceof TypeError)throw t;i++;continue}return r}})(i.data.marketProgramId,i.data.marketId);return[{pubkey:new lF(aX.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:i.pubkey,isWritable:!0,isSigner:!1},{pubkey:new lF(TX.pair.v4.authority),isWritable:!1,isSigner:!1},{pubkey:i.data.openOrders,isWritable:!0,isSigner:!1},{pubkey:i.data.targetOrders,isWritable:!0,isSigner:!1},{pubkey:i.data.baseVault,isWritable:!0,isSigner:!1},{pubkey:i.data.quoteVault,isWritable:!0,isSigner:!1},{pubkey:i.data.marketProgramId,isWritable:!1,isSigner:!1},{pubkey:i.data.marketId,isWritable:!0,isSigner:!1},{pubkey:o.bids,isWritable:!0,isSigner:!1},{pubkey:o.asks,isWritable:!0,isSigner:!1},{pubkey:o.eventQueue,isWritable:!0,isSigner:!1},{pubkey:o.baseVault,isWritable:!0,isSigner:!1},{pubkey:o.quoteVault,isWritable:!0,isSigner:!1},{pubkey:s,isWritable:!1,isSigner:!1},{pubkey:new lF(e),isWritable:!0,isSigner:!1},{pubkey:new lF(r),isWritable:!0,isSigner:!1},{pubkey:new lF(a),isWritable:!1,isSigner:!0}]};var XX=new mX(Object.assign(TX,{findPath:async({tokenIn:t,tokenOut:e})=>{if([t,e].includes(UX.currency.address)&&[t,e].includes(UX.wrapped.address))return{path:void 0,fixedPath:void 0};let n;return await QX([t,e])?n=[t,e]:t!=UX.wrapped.address&&t!=UX.currency.address&&await QX([t,UX.wrapped.address])&&e!=UX.wrapped.address&&e!=UX.currency.address&&await QX([e,UX.wrapped.address])?n=[t,UX.wrapped.address,e]:t!=YX&&await QX([t,YX])&&e!=YX&&await QX([e,YX])?n=[t,YX,e]:t!=FX&&await QX([t,FX])&&e!=FX&&await QX([e,FX])&&(n=[t,FX,e]),BX([n,"optionalAccess",t=>t.length])&&n[0]==UX.currency.address?n.splice(1,0,UX.wrapped.address):BX([n,"optionalAccess",t=>t.length])&&n[n.length-1]==UX.currency.address&&n.splice(n.length-1,0,UX.wrapped.address),{path:n,fixedPath:WX(n)}},getPair:PX,getAmounts:async({path:t,tokenIn:e,tokenOut:n,amountOut:r,amountIn:i,amountInMax:o,amountOutMin:a})=>{let s;if(t=WX(t),r){if(s=await VX({path:t,amountOut:r,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(i){if(s=await ZX({path:t,amountIn:i,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}else if(a){if(s=await VX({path:t,amountOut:a,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(o){if(s=await ZX({path:t,amountIn:o,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}return{amountOut:r||a,amountIn:i||o,amountInMax:o||i,amountOutMin:a||r,amounts:s}},getTransaction:async({exchange:t,path:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o,amounts:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,fromAddress:h})=>{let d={blockchain:"solana"},f=[];const p=WX(e);if(p.length>3)throw"Raydium can only handle fixed paths with a max length of 3!";const m=p[0],g=3==p.length?p[1]:void 0,y=p[p.length-1];let b,w,v;2==p.length?(b=[await PX(m,y)],w=[await HX(b[0].data.marketId.toString())]):(b=[await PX(m,g),await PX(g,y)],w=[await HX(b[0].data.marketId.toString()),await HX(b[1].data.marketId.toString())],v=a[1]);let M,L=e[0]===qX.currency.address&&p[0]===qX.wrapped.address,_=e[e.length-1]===qX.currency.address&&p[p.length-1]===qX.wrapped.address;const N=await CG("solana");if(L||_){const t=await N.getMinimumBalanceForRentExemption(aX.solana.TOKEN_LAYOUT.span);M=zQ.generate().publicKey.toString();const e=L?new KH(n.toString()).add(new KH(t)):new KH(t);f.push(VF.createAccount({fromPubkey:new lF(h),newAccountPubkey:new lF(M),programId:new lF(aX.solana.TOKEN_PROGRAM),space:aX.solana.TOKEN_LAYOUT.span,lamports:e})),f.push(aX.solana.initializeAccountInstruction({account:M,token:qX.wrapped.address,owner:h}))}let E=await Promise.all(b.map((async(t,e)=>{let a=w[e],u=m,c=y,d=n||r,f=r||n,p=i||o,N=o||i,E=s||l?"in":"out",S=L?M:void 0,x=_?M:void 0;return 2===b.length&&0===e?(u=m,c=g,p=N=v,E="out",M&&(x=M)):2===b.length&&1===e&&(u=g,c=y,d=f=v,E="in",M&&(S=M)),new SF({programId:new lF(TX.pair.v4.address),keys:await KX({tokenIn:u,tokenInAccount:S,tokenOut:c,tokenOutAccount:x,pair:t,market:a,fromAddress:h}),data:JX({pair:t,amountIn:d,amountOutMin:N,amountOut:p,amountInMax:f,fix:E})})})));return E.forEach((t=>f.push(t))),(L||_)&&f.push(aX.solana.closeAccountInstruction({account:M,owner:h})),d.instructions=f,d}}));const $X=Ch.fantom,t$={blockchain:"fantom",name:"spookyswap",alternativeNames:[],label:"SpookySwap",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNjQxIDY0MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjQxIDY0MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxwYXRoIGZp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cuMiwyMy41CgkJYy0zLjMsMy45LTIyLjgtOC41LTIyLjgtOC41cy0xNSwxNy0xOS42LDE0LjNjLTUuMi0yLjYsMC43LTI0LjgsMC43LTI0LjhzLTIxLjUtOS4xLTE5LjYtMTQuM2MxLjMtNS4yLDIzLjUtNy4yLDIzLjUtNy4yCgkJUzEyNi44LDEzMi44LDEzMy4zLDEzMS41TDEzMy4zLDEzMS41eiIvPgo8L2c+Cjwvc3ZnPgo=",router:{address:"0xF491e7B69E4244ad4002BC14e878a34207E38c29",api:LX.ROUTER},factory:{address:"0x152eE697f2E276fA89E96742e9bB9aB1F2E61bE3",api:LX.FACTORY},pair:{api:LX.PAIR},slippage:!0};var e$=new mX(Object.assign(t$,{findPath:({tokenIn:t,tokenOut:e})=>LX.findPath($X,t$,{tokenIn:t,tokenOut:e}),pathExists:t=>LX.pathExists($X,t$,t),getAmounts:({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>LX.getAmounts($X,t$,{path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>LX.getTransaction($X,t$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const n$=Ch.ethereum,r$={blockchain:"ethereum",name:"uniswap_v2",alternativeNames:[],label:"Uniswap v2",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQxIiBoZWlnaHQ9IjY0MCIgdmlld0JveD0iMCAwIDY0MSA2NDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0yMjQuNTM0IDEyMy4yMjZDMjE4LjY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AyODAuNjU2IDI1Ni4wNzQgMjgwLjY1NkMyNTkuNzM1IDI4MC42NTYgMjY0Ljc0NiAyNzguNDczIDI2Ni4zNjQgMjc2LjE3MloiIGZpbGw9IiNGRjAwN0EiLz4KPC9zdmc+Cg==",router:{address:"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",api:LX.ROUTER},factory:{address:"0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",api:LX.FACTORY},pair:{api:LX.PAIR},slippage:!0};var i$=new mX(Object.assign(r$,{findPath:({tokenIn:t,tokenOut:e})=>LX.findPath(n$,r$,{tokenIn:t,tokenOut:e}),pathExists:t=>LX.pathExists(n$,r$,t),getAmounts:({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>LX.getAmounts(n$,r$,{path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>LX.getTransaction(n$,r$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const o$=Ch.velas,a$={blockchain:"velas",name:"wagyuswap",alternativeNames:[],label:"WagyuSwap",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5NC45MSAxMzAuMjYiPjxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPjxwYXRoIGQ9Ik0xMTcuMjgsOTYuNDVjMCwyNC42Mi0yMS4yNCw0NC42LTQ3LjQ1LDQ0LjZzLTQ3LjQ2LTIwLTQ3LjQ2LTQ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ACTORY},pair:{api:LX.PAIR},slippage:!0};var s$=new mX(Object.assign(a$,{findPath:({tokenIn:t,tokenOut:e})=>LX.findPath(o$,a$,{tokenIn:t,tokenOut:e}),pathExists:t=>LX.pathExists(o$,a$,t),getAmounts:({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>LX.getAmounts(o$,a$,{path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>LX.getTransaction(o$,a$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));var u$={findPath:async(t,{tokenIn:e,tokenOut:n})=>{if(![e,n].includes(t.currency.address)||![e,n].includes(t.wrapped.address))return{path:void 0,fixedPath:void 0};let r=[e,n];return{path:r,fixedPath:r}},pathExists:async(t,e)=>!(e.length<=1)&&(!(e.length>=3)&&(e.includes(t.currency.address)&&e.includes(t.wrapped.address))),getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>(i?o=a=s=i:o?i=a=s=o:s?o=a=i=s:a&&(i=s=o=a),{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:(t,e,{path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,fromAddress:h})=>{let d={blockchain:t.name,from:h,to:e.wrapper.address,api:e.wrapper.api};return n[0]===t.currency.address&&n[1]===t.wrapped.address?(d.method="deposit",d.value=r.toString(),d):n[0]===t.wrapped.address&&n[1]===t.currency.address?(d.method="withdraw",d.value=0,d.params={wad:r},d):void 0},WETH:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]};const c$=Ch.bsc,l$={blockchain:"bsc",name:"wbnb",alternativeNames:[],label:"Wrapped BNB",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxOTIgMTkyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxOTIgMTkyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0YwQjkwQjt9Cjwvc3R5bGU+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik01NCw0MS4xbDQyLTI0LjJsNDIsMjQuMmwtMTUuNCw4LjlMOTYsMzQuOUw2OS40LDUwTDU0LDQxLjF6IE0xMzgsNzEuN2wtMTUuNC04LjlMOTYsNzhMNjkuNCw2Mi43bC0xNS40LDl2MTgKCUw4MC42LDEwNXYzMC41bDE1LjQsOWwxNS40LTlWMTA1TDEzOCw4OS43VjcxLjd6IE0xMzgsMTIwLjN2LTE4bC0xNS40LDguOXYxOEMxMjIuNiwxMjkuMSwxMzgsMTIwLjMsMTM4LDEyMC4zeiBNMTQ4LjksMTI2LjQKCWwtMjYuNiwxNS4zdjE4bDQyLTI0LjJWODdsLTE1LjQsOUMxNDguOSw5NiwxNDguOSwxMjYuNCwxNDguOSwxMjYuNHogTTEzMy41LDU2LjRsMTUuNCw5djE4bDE1LjQtOXYtMThsLTE1LjQtOUwxMzMuNSw1Ni40CglMMTMzLjUsNTYuNHogTTgwLjYsMTQ4LjN2MThsMTUuNCw5bDE1LjQtOXYtMThMOTYsMTU3LjFMODAuNiwxNDguM3ogTTU0LDEyMC4zbDE1LjQsOXYtMTguMUw1NCwxMDIuM0w1NCwxMjAuM0w1NCwxMjAuM3oKCSBNODAuNiw1Ni40bDE1LjQsOWwxNS40LTlMOTYsNDcuNUM5Niw0Ny40LDgwLjYsNTYuNCw4MC42LDU2LjRMODAuNiw1Ni40eiBNNDMuMSw2NS40bDE1LjQtOWwtMTUuNC05bC0xNS40LDl2MThsMTUuNCw5TDQzLjEsNjUuNAoJTDQzLjEsNjUuNHogTTQzLjEsOTUuOUwyNy43LDg3djQ4LjVsNDIsMjQuMnYtMThsLTI2LjYtMTUuM1Y5NS45TDQzLjEsOTUuOXoiLz4KPC9zdmc+Cg==",wrapper:{address:c$.wrapped.address,api:u$.WETH},slippage:!1};var h$=new mX(Object.assign(l$,{findPath:({tokenIn:t,tokenOut:e})=>u$.findPath(c$,{tokenIn:t,tokenOut:e}),pathExists:t=>u$.pathExists(c$,t),getAmounts:u$.getAmounts,getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>u$.getTransaction(c$,l$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const d$=Ch.ethereum,f$={blockchain:"ethereum",name:"weth",alternativeNames:[],label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBl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0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",wrapper:{address:d$.wrapped.address,api:u$.WETH},slippage:!1};var p$=new mX(Object.assign(f$,{findPath:({tokenIn:t,tokenOut:e})=>u$.findPath(d$,{tokenIn:t,tokenOut:e}),pathExists:t=>u$.pathExists(d$,t),getAmounts:u$.getAmounts,getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>u$.getTransaction(d$,f$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const m$=Ch.fantom,g$={blockchain:"fantom",name:"wftm",alternativeNames:[],label:"Wrapped Fantom",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMTkyIDE5MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ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{tokenIn:t,tokenOut:e}),pathExists:t=>u$.pathExists(m$,t),getAmounts:u$.getAmounts,getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>u$.getTransaction(m$,g$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const b$=Ch.polygon,w$={blockchain:"polygon",name:"wmatic",alternativeNames:[],label:"Wrapped MATIC",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0NS40IDQ1LjQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ1LjQgNDUuNDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM4MjQ3RTU7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMzEuOSwxNi42Yy0wLjctMC40LTEuNi0wLjQtMi4yLDBsLTUuMywzLjFsLTMuNSwybC01LjEsMy4xYy0wLjcsMC40LTEuNiwwLjQtMi4yLDBsLTQtMi40CgljLTAuNi0wLjQtMS4xLTEuMS0xLjEtMnYtNC42YzAtMC45LDAuNS0xLjYsMS4xLTJsNC0yLjNjMC43LTAuNCwxLjUtMC40LDIuMiwwbDQsMi40YzAuNywwLjQsMS4xLDEuMSwxLjEsMnYzLjFsMy41LTIuMXYtMy4yCgljMC0wLjktMC40LTEuNi0xLjEtMmwtNy41LTQuNGMtMC43LTAuNC0xLjUtMC40LTIuMiwwTDYsMTEuN2MtMC43LDAuNC0xLjEsMS4xLTEuMSwxLjh2OC43YzAsMC45LDAuNCwxLjYsMS4xLDJsNy42LDQuNAoJYzAuNywwLjQsMS41LDAuNCwyLjIsMGw1LjEtMi45bDMuNS0yLjFsNS4xLTIuOWMwLjctMC40LDEuNi0wLjQsMi4yLDBsNCwyLjNjMC43LDAuNCwxLjEsMS4xLDEuMSwydjQuNmMwLDAuOS0wLjQsMS42LTEuMSwyCglsLTMuOSwyLjNjLTAuNywwLjQtMS41LDAuNC0yLjIsMGwtNC0yLjNjLTAuNy0wLjQtMS4xLTEuMS0xLjEtMnYtMi45TDIxLDI4Ljd2My4xYzAsMC45LDAuNCwxLjYsMS4xLDJsNy41LDQuNAoJYzAuNywwLjQsMS41LDAuNCwyLjIsMGw3LjUtNC40YzAuNy0wLjQsMS4xLTEuMSwxLjEtMlYyM2MwLTAuOS0wLjQtMS42LTEuMS0yQzM5LjIsMjEsMzEuOSwxNi42LDMxLjksMTYuNnoiLz4KPC9zdmc+Cg==",wrapper:{address:b$.wrapped.address,api:u$.WETH},slippage:!1};var v$=new mX(Object.assign(w$,{findPath:({tokenIn:t,tokenOut:e})=>u$.findPath(b$,{tokenIn:t,tokenOut:e}),pathExists:t=>u$.pathExists(b$,t),getAmounts:u$.getAmounts,getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>u$.getTransaction(b$,w$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}));const M$=Ch.velas,L$={blockchain:"velas",name:"wvlx",alternativeNames:[],label:"Wrapped Velas",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgdGV4dC1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iIGltYWdlLXJlbmRlcmluZz0ib3B0aW1pemVRdWFsaXR5IgoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDUuNCA0NS40IgoJIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ1LjQgNDUuNDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiMwMDM3QzE7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjguOCwyMi44bC02LjEsMTAuNmwtNi4xLTEwLjdMMjguOCwyMi44TDI4LjgsMjIuOHogTTM0LjksMTkuMkgxMC41bDEyLjIsMjEuNEwzNC45LDE5LjJ6IE02LjUsMTIuMWwyLDMuNgoJaDI4LjNsMi4xLTMuNkg2LjV6Ii8+Cjwvc3ZnPgo=",wrapper:{address:M$.wrapped.address,api:u$.WETH},slippage:!1};let _$={ethereum:[i$,p$],bsc:[EX,h$],polygon:[AX,v$],solana:[XX],fantom:[e$,y$],velas:[s$,new mX(Object.assign(L$,{findPath:({tokenIn:t,tokenOut:e})=>u$.findPath(M$,{tokenIn:t,tokenOut:e}),pathExists:t=>u$.pathExists(M$,t),getAmounts:u$.getAmounts,getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>u$.getTransaction(M$,L$,{path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})}))]},N$=({blockchain:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a,amountOutMax:s,amountInMin:u})=>Promise.all(_$[t].map((t=>t.route({tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a,amountOutMax:s,amountInMin:u})))).then((t=>t.filter(Boolean)));var E$=function(t){var e=function(t){return!t.every((function(t){return void 0!==t.amount||void 0!==t.fromAmount}))},r=Z.useContext(Wq),i=r.amount;r.toAmount;var o,a=r.recover,s=d(Z.useState(null==a&&e(t.accept)),2),u=s[0],c=s[1],l=Z.useContext(Jq).account,h=Z.useContext(Qq),f=h.conversionRate,p=h.fixedCurrencyConversionRate,m=Z.useContext(mq).setError,g=d(Z.useState(),2),y=g[0],b=g[1],w=d(Z.useState("object"==n(i)&&i.fix&&i.currency?i.fix:null),1)[0],v=d(Z.useState("object"==n(i)&&i.fix&&i.currency?i.currency:null),1)[0];u&&(o="object"==n(i)&&i.start&&i.start?i.start:"object"==n(i)&&i.fix?i.fix:1);var M=d(Z.useState(o),2),L=M[0],_=M[1],N=d(Z.useState(),2),E=N[0],S=N[1],x=d(Z.useState(),2),A=x[0],I=x[1];Z.useEffect((function(){a||c(e(t.accept))}),[t.accept,a]);var k=function(e){var n=e.amount,r=e.conversionRate,o=e.fixedCurrencyConversionRate;return new Promise((function(e,a){i&&i.token?e(t.accept.map((function(){return n}))):Promise.all(t.accept.map((function(t){return w?Ch[t.blockchain].stables.usd[0]==t.token?1/o*w:N$({blockchain:t.blockchain,tokenIn:Ch[t.blockchain].stables.usd[0],amountIn:1/o*w,tokenOut:t.token,fromAddress:l,toAddress:l}):Ch[t.blockchain].stables.usd[0]==t.token?1/r*n:N$({blockchain:t.blockchain,tokenIn:Ch[t.blockchain].stables.usd[0],amountIn:1/r*n,tokenOut:t.token,fromAddress:l,toAddress:l})}))).then((function(n){Promise.all(n.map((function(e,n){return"number"==typeof e?e:null==e[0]?void 0:aX.readable({blockchain:t.accept[n].blockchain,amount:e[0].amountOut,address:e[0].tokenOut})}))).then(e).catch(m)})).catch(m)}))},j=Z.useCallback(Kq.debounce((function(e){var n=e.account,r=e.amount,i=e.conversionRate,o=e.fixedCurrencyConversionRate;k({amount:r,conversionRate:i,fixedCurrencyConversionRate:o}).then((function(e){b(t.accept.map((function(t,r){if(null!=e[r])return{blockchain:t.blockchain,amount:qq(e[r]),token:t.token,receiver:t.receiver||n}})).filter((function(t){return!!t})))})).catch(m)}),500),[]);return Z.useEffect((function(){a||u&&l&&f&&(!w||p)&&j({account:l,amount:L,conversionRate:f,fixedCurrencyConversionRate:p})}),[u,l,f,w,p,L,a]),Z.useEffect((function(){u&&E?E.fromToken.readable(E.fromBalance).then((function(t){if(i&&i.token)N$({blockchain:E.blockchain,tokenIn:E.fromToken.address,tokenOut:E.toToken.address,amountIn:parseFloat(t),fromAddress:l,toAddress:l}).then((function(t){null!=t[0]?aX.readable({amount:t[0].amountOut,blockchain:E.blockchain,address:E.toToken.address}).then((function(t){var e=parseFloat(new TK(t).div(1.01).mul(f).toString());I(e>10?Math.round(e-1):qq(e-1))})).catch(m):aX.readable({amount:E.fromBalance,blockchain:E.blockchain,address:E.fromToken.address}).then(I)})).catch(m);else if(E.fromToken.address==Ch[E.blockchain].stables.usd[0]){var e=parseFloat(new TK(t).mul(f).toString());I(e>10?Math.round(e-1):e-1)}else N$({blockchain:E.blockchain,tokenIn:E.fromToken.address,tokenOut:Ch[E.blockchain].stables.usd[0],amountIn:parseFloat(t),fromAddress:l,toAddress:l}).then((function(t){null!=t[0]&&aX.readable({amount:t[0].amountOut,blockchain:E.blockchain,address:Ch[E.blockchain].stables.usd[0]}).then((function(t){var e=parseFloat(new TK(t).div(1.01).mul(f).toString());I(e>10?Math.round(e):qq(e))})).catch(m)})).catch(m)})).catch(m):I(100)}),[l,E]),Z.createElement(Fq.Provider,{value:{amountsMissing:u,fixedAmount:w,fixedCurrency:v,acceptWithAmount:y,amount:L,setAmount:_,setMaxRoute:S,maxAmount:A}},t.children)},S$={"Pacific/Midway":"USD","Pacific/Niue":"NZD","Pacific/Pago_Pago":"USD","America/Adak":"USD","Pacific/Honolulu":"USD","Pacific/Rarotonga":"NZD","Pacific/Tahiti":"XPF","Pacific/Marquesas":"XPF","America/Anchorage":"USD","America/Juneau":"USD","America/Metlakatla":"USD","America/Nome":"USD","America/Sitka":"USD","America/Yakutat":"USD","Pacific/Gambier":"XPF","America/Los_Angeles":"USD","America/Tijuana":"MXN","America/Vancouver":"CAD","Pacific/Pitcairn":"NZD","America/Boise":"USD","America/Cambridge_Bay":"CAD","America/Chihuahua":"MXN","America/Creston":"CAD","America/Dawson":"CAD","America/Dawson_Creek":"CAD","America/Denver":"USD","America/Edmonton":"CAD","America/Fort_Nelson":"CAD","America/Hermosillo":"MXN","America/Inuvik":"CAD","America/Mazatlan":"MXN","America/Ojinaga":"MXN","America/Phoenix":"USD","America/Whitehorse":"CAD","America/Yellowknife":"CAD","America/Bahia_Banderas":"MXN","America/Belize":"BZD","America/Chicago":"USD","America/Costa_Rica":"CRC","America/El_Salvador":"USD","America/Guatemala":"GTQ","America/Indiana/Knox":"USD","America/Indiana/Tell_City":"USD","America/Managua":"NIO","America/Matamoros":"MXN","America/Menominee":"USD","America/Merida":"MXN","America/Mexico_City":"MXN","America/Monterrey":"MXN","America/North_Dakota/Beulah":"USD","America/North_Dakota/Center":"USD","America/North_Dakota/New_Salem":"USD","America/Rainy_River":"CAD","America/Rankin_Inlet":"CAD","America/Regina":"CAD","America/Resolute":"CAD","America/Swift_Current":"CAD","America/Tegucigalpa":"HNL","America/Winnipeg":"CAD","Pacific/Easter":"CLP","Pacific/Galapagos":"USD","America/Atikokan":"CAD","America/Bogota":"COP","America/Cancun":"MXN","America/Cayman":"KYD","America/Detroit":"USD","America/Eirunepe":"BRL","America/Grand_Turk":"USD","America/Guayaquil":"USD","America/Havana":"CUP","America/Indiana/Indianapolis":"USD","America/Indiana/Marengo":"USD","America/Indiana/Petersburg":"USD","America/Indiana/Vevay":"USD","America/Indiana/Vincennes":"USD","America/Indiana/Winamac":"USD","America/Iqaluit":"CAD","America/Jamaica":"JMD","America/Kentucky/Louisville":"USD","America/Kentucky/Monticello":"USD","America/Lima":"PEN","America/Nassau":"BSD","America/New_York":"USD","America/Nipigon":"CAD","America/Panama":"PAB","America/Pangnirtung":"CAD","America/Port-au-Prince":"HTG","America/Rio_Branco":"BRL","America/Thunder_Bay":"CAD","America/Toronto":"CAD","America/AnguillaSandy Hill":"XCD","America/Antigua":"XCD","America/Aruba":"AWG","America/Asuncion":"PYG","America/Barbados":"BBD","America/Blanc-Sablon":"CAD","America/Boa_Vista":"BRL","America/Campo_Grande":"BRL","America/Caracas":"VEB","America/Cuiaba":"BRL","America/Curacao":"ANG","America/Dominica":"DOP","America/Glace_Bay":"CAD","America/Goose_Bay":"CAD","America/Grenada":"XCD","America/Guadeloupe":"EUR","America/Guyana":"GYD","America/Halifax":"CAD","America/Kralendijk":"USD","America/La_Paz":"BOB","America/Lower_Princes":"USD","America/Manaus":"BRL","America/Marigot":"EUR","America/Martinique":"EUR","America/Moncton":"CAD","America/Montserrat":"XCD","America/Porto_Velho":"BRL","America/Port_of_Spain":"BZD","America/Puerto_Rico":"USD","America/Santiago":"CLP","America/Santo_Domingo":"DOP","America/St_Barthelemy":"EUR","America/St_Kitts":"XCD","America/St_Lucia":"XCD","America/St_Thomas":"USD","America/St_Vincent":"XCD","America/Thule":"DKK","America/Tortola":"USD","Atlantic/Bermuda":"BMD","America/St_Johns":"CAD","America/Araguaina":"BRL","America/Argentina/Buenos_Aires":"ARS","America/Argentina/Catamarca":"ARS","America/Argentina/Cordoba":"ARS","America/Argentina/Jujuy":"ARS","America/Argentina/La_Rioja":"ARS","America/Argentina/Mendoza":"ARS","America/Argentina/Rio_Gallegos":"ARS","America/Argentina/Salta":"ARS","America/Argentina/San_Juan":"ARS","America/Argentina/San_Luis":"ARS","America/Argentina/Tucuman":"ARS","America/Argentina/Ushuaia":"ARS","America/Bahia":"BRL","America/Belem":"BRL","America/Cayenne":"EUR","America/Fortaleza":"BRL","America/Godthab":"DKK","America/Maceio":"BRL","America/Miquelon":"EUR","America/Montevideo":"UYU","America/Paramaribo":"SRD","America/Punta_Arenas":"CLP","America/Recife":"BRL","America/Santarem":"BRL","America/Sao_Paulo":"BRL","Antarctica/Palmer":"USD","Antarctica/Rothera":"USD","Atlantic/Stanley":"FKP","America/Noronha":"BRL","Atlantic/South_Georgia":"GBP","America/Scoresbysund":"DKK","Atlantic/Azores":"EUR","Atlantic/Cape_Verde":"CVE","Africa/Abidjan":"XOF","Africa/Accra":"GHC","Africa/Bamako":"XOF","Africa/Banjul":"GMD","Africa/Bissau":"XOF","Africa/Casablanca":"MAD","Africa/Conakry":"GNF","Africa/Dakar":"XOF","Africa/El_Aaiun":"MAD","Africa/Freetown":"SLL","Africa/Lome":"XOF","Africa/Monrovia":"LRD","Africa/Nouakchott":"MRU","Africa/Ouagadougou":"XOF","Africa/Sao_Tome":"STD","America/Danmarkshavn":"DKK","Antarctica/Troll":"NOK","Atlantic/Canary":"EUR","Atlantic/Faroe":"DKK","Atlantic/Madeira":"EUR","Atlantic/Reykjavik":"ISK","Atlantic/St_Helena":"SHP","Europe/Dublin":"EUR","Europe/Guernsey":"GBP","Europe/Isle_of_Man":"IMP","Europe/Jersey":"GBP","Europe/Lisbon":"EUR","Europe/London":"GBP","Africa/Algiers":"DZD","Africa/Bangui":"XAF","Africa/Brazzaville":"XAF","Africa/Ceuta":"EUR","Africa/Douala":"XAF","Africa/Kinshasa":"CDF","Africa/Lagos":"NGN","Africa/Libreville":"XAF","Africa/Luanda":"AOA","Africa/Malabo":"XAF","Africa/Ndjamena":"XAF","Africa/Niamey":"XOF","Africa/Porto-Novo":"XOF","Africa/Tunis":"TND","Africa/Windhoek":"NAD","Arctic/Longyearbyen":"NOK","Europe/Amsterdam":"EUR","Europe/Andorra":"EUR","Europe/Belgrade":"RSD","Europe/Berlin":"EUR","Europe/Bratislava":"EUR","Europe/Brussels":"EUR","Europe/Budapest":"HUF","Europe/Copenhagen":"DKK","Europe/Gibraltar":"GIP","Europe/Ljubljana":"EUR","Europe/Luxembourg":"EUR","Europe/Madrid":"EUR","Europe/Malta":"EUR","Europe/Monaco":"EUR","Europe/Oslo":"NOK","Europe/Paris":"EUR","Europe/Podgorica":"EUR","Europe/Prague":"CZK","Europe/Rome":"EUR","Europe/San_Marino":"EUR","Europe/Sarajevo":"BAM","Europe/Skopje":"MKD","Europe/Stockholm":"SEK","Europe/Tirane":"ALL","Europe/Vaduz":"CHF","Europe/Vatican":"EUR","Europe/Vienna":"EUR","Europe/Warsaw":"PLN","Europe/Zagreb":"HRK","Europe/Zurich":"CHF","Africa/Blantyre":"MWK","Africa/Bujumbura":"BIF","Africa/Cairo":"EGP","Africa/Gaborone":"BWP","Africa/Harare":"ZWL","Africa/Johannesburg":"ZAR","Africa/Juba":"SSP","Africa/Khartoum":"SDG","Africa/Kigali":"RWF","Africa/Lubumbashi":"CDF","Africa/Lusaka":"ZMW","Africa/Maputo":"MZM","Africa/Maseru":"LSL","Africa/Mbabane":"SZL","Africa/Tripoli":"LYD","Asia/Amman":"JOD","Asia/Beirut":"LBP","Asia/Damascus":"SYP","Asia/Famagusta":"TRY","Asia/Gaza":"ILS","Asia/Hebron":"ILS","Asia/Jerusalem":"ILS","Asia/Nicosia":"EUR","Europe/Athens":"EUR","Europe/Bucharest":"RON","Europe/Chisinau":"MDL","Europe/Helsinki":"EUR","Europe/Kaliningrad":"RUB","Europe/Kiev":"UAH","Europe/Mariehamn":"EUR","Europe/Riga":"EUR","Europe/Sofia":"BGN","Europe/Tallinn":"EUR","Europe/Uzhgorod":"UAH","Europe/Vilnius":"EUR","Europe/Zaporozhye":"UAH","Africa/Addis_Ababa":"ETB","Africa/Asmara":"ERN","Africa/Dar_es_Salaam":"TZS","Africa/Djibouti":"DJF","Africa/Kampala":"UGX","Africa/Mogadishu":"SOS","Africa/Nairobi":"KES","Antarctica/Syowa":"EUR","Asia/Aden":"YER","Asia/Baghdad":"IQD","Asia/Bahrain":"BHD","Asia/Kuwait":"KWD","Asia/Qatar":"QAR","Asia/Riyadh":"SAR","Europe/Istanbul":"TRY","Europe/Kirov":"RUB","Europe/Minsk":"BYN","Europe/Moscow":"RUB","Europe/Simferopol":"RUB","Europe/Volgograd":"RUB","Indian/Antananarivo":"MGA","Indian/Comoro":"USD","Indian/Mayotte":"EUR","Asia/Tehran":"IRR","Asia/Baku":"AZN","Asia/Dubai":"AED","Asia/Muscat":"OMR","Asia/Tbilisi":"GEL","Asia/Yerevan":"AMD","Europe/Astrakhan":"RUB","Europe/Samara":"RUB","Europe/Saratov":"RUB","Europe/Ulyanovsk":"RUB","Indian/Mahe":"SCR","Indian/Mauritius":"MUR","Indian/Reunion":"EUR","Asia/Kabul":"AFN","Antarctica/Mawson":"USD","Asia/Aqtau":"KZT","Asia/Aqtobe":"KZT","Asia/Ashgabat":"TMM","Asia/Atyrau":"KZT","Asia/Dushanbe":"TJS","Asia/Karachi":"PKR","Asia/Oral":"KZT","Asia/Qyzylorda":"KZT","Asia/Samarkand":"UZS","Asia/Tashkent":"UZS","Asia/Yekaterinburg":"RUB","Indian/Kerguelen":"EUR","Indian/Maldives":"MVR","Asia/Colombo":"LKR","Asia/Kolkata":"INR","Asia/Kathmandu":"NPR","Antarctica/Vostok":"USD","Asia/Almaty":"KZT","Asia/Bishkek":"KGS","Asia/Dhaka":"BDT","Asia/Omsk":"RUB","Asia/Qostanay":"KZT","Asia/Thimphu":"BTN","Asia/Urumqi":"CNY","Indian/Chagos":"USD","Asia/Yangon":"MMK","Indian/Cocos":"AUD","Antarctica/Davis":"USD","Asia/Bangkok":"THB","Asia/Barnaul":"RUB","Asia/Hovd":"MNT","Asia/Ho_Chi_Minh":"VND","Asia/Jakarta":"IDR","Asia/Krasnoyarsk":"RUB","Asia/Novokuznetsk":"RUB","Asia/Novosibirsk":"RUB","Asia/Phnom_Penh":"KHR","Asia/Pontianak":"IDR","Asia/Tomsk":"RUB","Asia/Vientiane":"LAK","Indian/Christmas":"AUD","Asia/Brunei":"BND","Asia/Choibalsan":"MNT","Asia/Hong_Kong":"HKD","Asia/Irkutsk":"RUB","Asia/Kuala_Lumpur":"MYR","Asia/Kuching":"MYR","Asia/Macau":"MOP","Asia/Makassar":"IDR","Asia/Manila":"PHP","Asia/Shanghai":"CNY","Asia/Singapore":"SGD","Asia/Taipei":"TWD","Asia/Ulaanbaatar":"MNT","Australia/Perth":"AUD","Australia/Eucla":"AUD","Asia/Chita":"RUB","Asia/Dili":"USD","Asia/Jayapura":"IDR","Asia/Khandyga":"RUB","Asia/Pyongyang":"KPW","Asia/Seoul":"KRW","Asia/Tokyo":"JPY","Asia/Yakutsk":"RUB","Pacific/Palau":"USD","Australia/Adelaide":"AUD","Australia/Broken_Hill":"AUD","Australia/Darwin":"AUD","Antarctica/DumontDUrville":"USD","Antarctica/Macquarie":"USD","Asia/Ust-Nera":"RUB","Asia/Vladivostok":"RUB","Australia/Brisbane":"AUD","Australia/Currie":"AUD","Australia/Hobart":"AUD","Australia/Lindeman":"AUD","Australia/Melbourne":"AUD","Australia/Sydney":"AUD","Pacific/Chuuk":"USD","Pacific/GuamVillage":"USD","Pacific/Port_Moresby":"PGK","Pacific/Saipan":"USD","Australia/Lord_Howe":"AUD","Antarctica/Casey":"USD","Asia/Magadan":"RUB","Asia/Sakhalin":"RUB","Asia/Srednekolymsk":"RUB","Pacific/Bougainville":"PGK","Pacific/Efate":"VUV","Pacific/Guadalcanal":"SBD","Pacific/Kosrae":"USD","Pacific/Norfolk":"USD","Pacific/Noumea":"XPF","Pacific/Pohnpei":"USD","Antarctica/McMurdo":"USD","Asia/Anadyr":"RUB","Asia/Kamchatka":"RUB","Pacific/Auckland":"NZD","Pacific/Fiji":"FJD","Pacific/Funafuti":"AUD","Pacific/Kwajalein":"USD","Pacific/Majuro":"USD","Pacific/Nauru":"AUD","Pacific/Tarawa":"AUD","Pacific/Wake":"USD","Pacific/Wallis":"XPF","Pacific/Chatham":"CAD","Pacific/Apia":"NGN","Pacific/Enderbury":"USD","Pacific/Fakaofo":"NZD","Pacific/Tongatapu":"TOP","Pacific/Kiritimati":"AUD"};class x${constructor({amount:t,code:e,timeZone:n=x$.timeZone()}){this.amount=t,this.code=e||window._LocalCurrencyCode||x$.getCode(n),this.timeZone=n}static getCode(t){return window._LocalCurrencyCode||S$[t||x$.timeZone()]||"USD"}static async rate({from:t,to:e}){null==e&&(e=x$.getCode());let n=await x$.fromUSD({amount:1,code:t}),r=await x$.fromUSD({amount:1,code:e});return n.amount/r.amount}static async fromUSD({amount:t,code:e,timeZone:n}){let r=new x$({amount:t,code:e,timeZone:n}),i=await fetch("https://public.depay.com/currencies/"+r.code).then((t=>t.json())).then((t=>parseFloat(t))).catch((()=>(r.code="USD",1)));return r.amount=r.amount*i,r}static timeZone(){return Intl.DateTimeFormat().resolvedOptions().timeZone}toString(t={}){return null==t.minimumFractionDigits&&this.amount%1==0&&this.amount>=100?t.minimumFractionDigits=0:null==t.minimumFractionDigits&&(t.minimumFractionDigits=2),new Intl.NumberFormat(navigator.language,{...t,style:"currency",currency:this.code}).format(this.amount)}}var A$=function(t){var e=new x$({code:t.configuration.currency}).code;return Z.useEffect((function(){null!=t.configuration.providers&&Object.entries(t.configuration.providers).forEach((function(t){((t,e)=>{if(kG(),xG.evm.includes(t))return wG(t,e);if(xG.solana.includes(t))return SG(t,e);throw"Unknown blockchain: "+t})(t[0],t[1])}))}),[t.configuration]),Z.createElement(Wq.Provider,{value:Object.assign({},t.configuration,{currencyCode:e})},t.children)},I$=function(t){Z.useContext(mq).setError;var e=Z.useContext(Wq),r=e.amount,i=e.currency,o=d(Z.useState(),2),a=o[0],s=o[1],u=d(Z.useState(),2),c=u[0],l=u[1];return Z.useEffect((function(){"object"==n(r)&&r.currency&&x$.fromUSD({amount:1,code:r.currency}).then((function(t){return l(t.amount)})),x$.fromUSD({amount:1,code:i}).then((function(t){return s(t.amount)})).catch(s(1))}),[]),Z.createElement(Qq.Provider,{value:{conversionRate:a,fixedCurrencyConversionRate:c}},t.children)},k$=Z.createContext(),j$=Z.createContext(),T$=function(){var t=Z.useContext(V).close;return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:Z.createElement("div",{className:"TextCenter"},Z.createElement("div",{className:"GraphicWrapper"},Z.createElement("img",{className:"Graphic",src:sq})),Z.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Insufficient Balance"),Z.createElement("div",{className:"Text PaddingTopS PaddingBottomM PaddingLeftM PaddingRightM"},Z.createElement("strong",{className:"FontSizeM"},"We were not able to find any asset with enough value in your wallet. Please top up your account in order to proceed with this payment."))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:"ButtonPrimary",onClick:t},"Ok"))})},C$=Z.createContext(),D$=Z.createContext(),O$=Z.createContext(),z$=Z.createContext(),P$=function(t){var n=Z.useContext(mq).setError,r=Z.useContext(Wq),i=r.sent,o=r.succeeded,a=r.failed,s=r.recover,u=r.before,l=Z.useContext(D$),h=l.selectedRoute,f=l.refreshPaymentRoutes,p=Z.useContext(V),m=p.open,g=p.close,y=p.setClosable,b=Z.useContext(D$).allRoutes,w=Z.useContext(q).setUpdatable,v=Z.useContext(j$),M=v.navigate,L=v.set,_=Z.useContext(Jq).wallet,N=Z.useContext(O$),E=N.release,S=N.synchronousTracking,x=N.asynchronousTracking,A=N.trackingInitialized,I=N.initializeTracking,k=N.preTrack,j=Z.useContext(z$),T=j.foundTransaction,C=j.initializeTracking,D=d(Z.useState(),2),O=D[0],z=D[1],P=d(Z.useState(),2),R=P[0],B=P[1],U=d(Z.useState(),2),Y=U[0],F=U[1],W=d(Z.useState("initialized"),2),Q=W[0],H=W[1],G=function(t){0!=S||0!=x&&1!=A||y(!0),H("success"),o&&setTimeout((function(){return o(t)}),200)},J=function(t,e){0!=x&&1!=A||y(!0),L(["PaymentFailed"]),H("failed"),a&&a(t,e)},K=function(){var t=e(c.mark((function t(){var e;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!u){t.next=6;break}return t.next=3,u(O.route.transaction);case 3:if(!1!==t.sent){t.next=6;break}return t.abrupt("return");case 6:return y(!1),H("paying"),w(!1),t.next=11,RG({blockchain:O.route.transaction.blockchain,method:"latestBlockNumber"});case 11:return e=t.sent,t.next=14,k(e,O.route).then((function(){_.sendTransaction(Object.assign({},O.route.transaction,{sent:function(t){C(t,e),i&&i(t)},succeeded:G,failed:J})).then((function(t){B(t),I(t,e,O.route)})).catch((function(t){console.log("error",t),H("initialized"),y(!0),w(!0),"WRONG_NETWORK"!=(null==t?void 0:t.code)&&"NOT_SUPPORTED"!=(null==t?void 0:t.code)||M("WrongNetwork")}))})).catch((function(t){console.log(t),H("initialized"),y(!0),w(!0),M("PreTrackingFailed")}));case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return Z.useEffect((function(){E&&H("success")}),[E]),Z.useEffect((function(){x&&A&&("success"==Q||"failed"==Q)&&y(!0)}),[A,Q]),Z.useEffect((function(){if(s){y(!1),w(!1),H("paying"),B({blockchain:s.blockchain,id:s.transaction,url:Ch.findByName(s.blockchain).explorerUrlFor({transaction:{id:s.transaction}})});var t=new aX({blockchain:s.blockchain,address:s.token});Promise.all([t.name(),t.symbol()]).then((function(t){var e=d(t,2),n=e[0],r=e[1];z({blockchain:s.blockchain,token:s.token,name:n,symbol:r.toUpperCase(),amount:s.amount})})).catch(n)}}),[s]),Z.useEffect((function(){var t;T&&T.id&&T.status&&(T.id!=R.id&&(t=Object.assign({},R,{id:T.id,url:Ch.findByName(R.blockchain).explorerUrlFor({transaction:T})}),B(t)),"success"==T.status?G(t||R):"failed"==T.status&&J(t||R))}),[T,R]),Z.useEffect((function(){if(h){var t=h.fromToken;Promise.all([t.name(),t.symbol(),t.readable(h.fromAmount)]).then((function(e){var n=d(e,3),r=n[0],i=n[1],o=n[2];z({blockchain:h.blockchain,route:h,token:t.address,name:r,symbol:i.toUpperCase(),amount:o})})).catch(n)}else z(void 0)}),[h]),Z.useEffect((function(){b&&0==b.length?w(!1):b&&b.length>0&&w(!0)}),[b]),b instanceof Array&&0==b.length?Z.createElement(hh,{open:m,close:g,start:"NoPaymentMethodFound",container:t.container,document:t.document,dialogs:{NoPaymentMethodFound:Z.createElement(T$,null)}}):Z.createElement(C$.Provider,{value:{payment:O,paymentState:Q,pay:K,transaction:R,approve:function(){y(!1),w(!1),H("approving"),_.sendTransaction(Object.assign({},O.route.approvalTransaction,{succeeded:function(){w(!0),y(!0),f().then((function(){H("initialized")}))}})).then((function(t){F(t)})).catch((function(t){console.log("error",t),"WRONG_NETWORK"!=(null==t?void 0:t.code)&&"NOT_SUPPORTED"!=(null==t?void 0:t.code)||M("WrongNetwork"),H("initialized"),y(!0)}))},approvalTransaction:Y}},t.children)};const R$=({assets:t,blockchain:e,options:n})=>n.only?t.filter((t=>(n.only[e]||[]).find((e=>e.toLowerCase()==t.address.toLowerCase())))):n.exclude?t.filter((t=>(n.exclude[e]||[]).find((e=>e.toLowerCase()!=t.address.toLowerCase())))):t;var B$=async t=>{void 0===t&&(t={accounts:{}});let e=Promise.all(Object.keys(t.accounts).map((e=>new Promise(((n,r)=>{const i=t.accounts[e],o=new AbortController;setTimeout((()=>o.abort()),1e4),fetch(`https://public.depay.com/accounts/${e}/${i}/assets`,{signal:o.signal}).catch((t=>{console.log(t),n([])})).then((t=>{if(t&&t.ok)return t.json();n([])})).then((async r=>{if(r&&r.length)return await(async({address:t,options:e,assets:n,blockchain:r})=>{if(e.only&&e.only[r]&&!e.only[r].find((t=>t.toLowerCase()==Ch[r].currency.address.toLowerCase())))return n;if(e.exclude&&e.exclude[r]&&e.exclude[r].find((t=>t.toLowerCase()==Ch[r].currency.address.toLowerCase())))return n;if(!n.find((t=>t.address.toLowerCase()==Ch[r].currency.address.toLowerCase()))){let e=await RG({blockchain:r,address:t,method:"balance"},{cache:3e4});n=[{name:Ch[r].currency.name,symbol:Ch[r].currency.symbol,address:Ch[r].currency.address,type:"NATIVE",blockchain:r,balance:e.toString()},...n]}return n})({address:i,options:t,assets:R$({assets:r,blockchain:e,options:t}).map((t=>Object.assign(t,{blockchain:e}))),blockchain:e});n([])})).then(n).catch((t=>{console.log(t),n([])}))}))))).then((t=>t.flat()));return e};const U$=(t,e)=>Object.assign({},{address:t.address,symbol:t.symbol,name:t.name,decimals:t.decimals,type:t.type,blockchain:t.blockchain},{balance:e.toString()}),Y$=({assets:t,asset:e})=>!!t.find((t=>t.blockchain==e.blockchain&&t.address.toLowerCase()==e.address.toLowerCase())),F$=({options:t,address:e,blockchain:n})=>!(!(t&&t.only&&t.only[n])||t.only[n].find((t=>t.toLowerCase()==e.toLowerCase())))||!!(t&&t.exclude&&t.exclude[n]&&t.exclude[n].find((t=>t.toLowerCase()==e.toLowerCase())));const W$=t=>(t.params.path=t.params.path.filter(((e,n,r)=>(1!=n||e!=Ch[t.blockchain].wrapped.address||r[0]!=Ch[t.blockchain].currency.address)&&(n!=r.length-2||e!=Ch[t.blockchain].wrapped.address||r[r.length-1]!=Ch[t.blockchain].currency.address))),t);var Q$={ethereum:{payment:{address:"0x99F3F4685a7178F26EB4F4Ca8B75a1724F1577B9"},weth:{wrap:{address:"0xF4cc97D00dD0639c3e383D7CafB3d815616cbB2C"},unwrap:{address:"0xcA575c6C5305e8127F3D376bb22776eAD370De4a"}},uniswap_v2:{address:"0xe04b08Dfc6CaA0F4Ec523a3Ae283Ece7efE00019",prepareTransaction:W$},paymentWithEvent:{address:"0xD8fBC10787b019fE4059Eb5AA5fB11a5862229EF"},paymentFee:{address:"0x874Cb669D7BFff79d4A6A30F4ea52c5e413BD6A7"},paymentFeeWithEvent:{address:"0x981cAd45c768d56136FDBb2C5E115F33D971bE6C"}},bsc:{payment:{address:"0x8B127D169D232D5F3ebE1C3D06CE343FD7C1AA11"},wbnb:{wrap:{address:"0xf361888459a4C863a8498ee344C2688C9196Be51"},unwrap:{address:"0x65693291C20271f5e5030261766D1D6b3AC9d44E"}},pancakeswap:{address:"0xAC3Ec4e420DD78bA86d932501E1f3867dbbfb77B",prepareTransaction:W$},paymentWithEvent:{address:"0x1869E236c03eE67B9FfEd3aCA139f4AeBA79Dc21"},paymentFee:{address:"0xae33f10AD57A38113f74FCdc1ffA6B1eC47B94E3"},paymentFeeWithEvent:{address:"0xF1a05D715AaBFA380543719F7bA8754d0331c5A9"}},polygon:{payment:{address:"0x78C0F1c712A9AA2004C1F401A7307d8bCB62abBd"},wmatic:{wrap:{address:"0x8B62F604499c1204573664447D445690E0A0011b"},unwrap:{address:"0x2fd0a07a4F73285d0eBa8176426BF9B8c0121206"}},quickswap:{address:"0x0Dfb7137bC64b63F7a0de7Cb9CDa178702666220",prepareTransaction:W$},paymentWithEvent:{address:"0xfAD2F276D464EAdB71435127BA2c2e9dDefb93a4"},paymentFee:{address:"0xd625c7087E940b2A91ed8bD8db45cB24D3526B56"},paymentFeeWithEvent:{address:"0xBC56ED8E32b64a33f64Ed7A5fF9EACdFC117e07a"}}},H$={ethereum:{address:"0xae60aC8e69414C2Dc362D0e6a03af643d1D85b92",api:[{inputs:[{internalType:"address",name:"_configuration",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"configuration",outputs:[{internalType:"contract DePayRouterV1Configuration",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pluginAddress",type:"address"}],name:"isApproved",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"address[]",name:"plugins",type:"address[]"},{internalType:"string[]",name:"data",type:"string[]"}],name:"route",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},bsc:{address:"0x0Dfb7137bC64b63F7a0de7Cb9CDa178702666220",api:[{inputs:[{internalType:"address",name:"_configuration",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"configuration",outputs:[{internalType:"contract DePayRouterV1Configuration",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pluginAddress",type:"address"}],name:"isApproved",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"address[]",name:"plugins",type:"address[]"},{internalType:"string[]",name:"data",type:"string[]"}],name:"route",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},polygon:{address:"0x2CA727BC33915823e3D05fe043d310B8c5b2dC5b",api:[{inputs:[{internalType:"address",name:"_configuration",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"configuration",outputs:[{internalType:"contract DePayRouterV1Configuration",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pluginAddress",type:"address"}],name:"isApproved",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"address[]",name:"plugins",type:"address[]"},{internalType:"string[]",name:"data",type:"string[]"}],name:"route",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]}};var G$=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Z$="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==Df?Df:"undefined"!=typeof self?self:{},V$="object"==typeof Z$&&Z$&&Z$.Object===Object&&Z$,q$="object"==typeof self&&self&&self.Object===Object&&self,J$=V$||q$||Function("return this")(),K$=function(){return J$.Date.now()},X$=/\s/;var $$=function(t){for(var e=t.length;e--&&X$.test(t.charAt(e)););return e},t0=/^\s+/;var e0=function(t){return t?t.slice(0,$$(t)+1).replace(t0,""):t},n0=J$.Symbol,r0=Object.prototype,i0=r0.hasOwnProperty,o0=r0.toString,a0=n0?n0.toStringTag:void 0;var s0=function(t){var e=i0.call(t,a0),n=t[a0];try{t[a0]=void 0;var r=!0}catch(t){}var i=o0.call(t);return r&&(e?t[a0]=n:delete t[a0]),i},u0=Object.prototype.toString;var c0=function(t){return u0.call(t)},l0=n0?n0.toStringTag:void 0;var h0=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":l0&&l0 in Object(t)?s0(t):c0(t)};var d0=function(t){return null!=t&&"object"==typeof t};var f0=function(t){return"symbol"==typeof t||d0(t)&&"[object Symbol]"==h0(t)},p0=/^[-+]0x[0-9a-f]+$/i,m0=/^0b[01]+$/i,g0=/^0o[0-7]+$/i,y0=parseInt;var b0=function(t){if("number"==typeof t)return t;if(f0(t))return NaN;if(G$(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=G$(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=e0(t);var n=m0.test(t);return n||g0.test(t)?y0(t.slice(2),n?2:8):p0.test(t)?NaN:+t},w0=Math.max,v0=Math.min;var M0=function(t,e,n){var r,i,o,a,s,u,c=0,l=!1,h=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function p(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-c>=o}function m(){var t=K$();if(p(t))return g(t);s=setTimeout(m,function(t){var n=e-(t-u);return h?v0(n,o-(t-c)):n}(t))}function g(t){return s=void 0,d&&r?f(t):(r=i=void 0,a)}function y(){var t=K$(),n=p(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return function(t){return c=t,s=setTimeout(m,e),l?f(t):a}(u);if(h)return clearTimeout(s),s=setTimeout(m,e),f(u)}return void 0===s&&(s=setTimeout(m,e)),a}return e=b0(e)||0,G$(n)&&(l=!!n.leading,o=(h="maxWait"in n)?w0(b0(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?a:g(K$())},y};var L0=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return G$(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),M0(t,e,{leading:r,maxWait:e,trailing:i})};let _0=({paymentRoute:t,fee:e})=>t.directTransfer&&!e?t.toToken.address==Ch[t.blockchain].currency.address?t.toAddress:t.toToken.address:H$[t.blockchain].address,N0=({paymentRoute:t,fee:e})=>t.directTransfer&&!e?t.toToken.address==Ch[t.blockchain].currency.address?void 0:aX[t.blockchain].DEFAULT:H$[t.blockchain].api,E0=({paymentRoute:t,fee:e})=>t.directTransfer&&!e?t.toToken.address==Ch[t.blockchain].currency.address?void 0:"transfer":"route",S0=({paymentRoute:t,exchangeRoute:e,event:n,fee:r})=>t.directTransfer&&!r?t.toToken.address==Ch[t.blockchain].currency.address?void 0:[t.toAddress,t.toAmount]:{path:x0({paymentRoute:t,exchangeRoute:e}),amounts:A0({paymentRoute:t,exchangeRoute:e,fee:r}),addresses:j0({paymentRoute:t,fee:r}),plugins:T0({paymentRoute:t,exchangeRoute:e,event:n,fee:r}),data:[]},x0=({paymentRoute:t,exchangeRoute:e})=>e?e.path:[t.toToken.address],A0=({paymentRoute:t,exchangeRoute:e,fee:n})=>{let r;r=e?e&&e.exchange.wrapper?[e.amountIn.toString(),I0({amount:e.amountOutMin.toString(),paymentRoute:t,fee:n})]:[e.amountIn.toString(),I0({amount:e.amountOutMin.toString(),paymentRoute:t,fee:n}),Math.round(Date.now()/1e3)+1800]:[t.toAmount,I0({amount:t.toAmount,paymentRoute:t,fee:n})],n&&(r[4]=k0({paymentRoute:t,fee:n}));for(var i=0;i<r.length;i++)null==r[i]&&(r[i]="0");return r},I0=({amount:t,paymentRoute:e,fee:n})=>{if(n){let r=k0({paymentRoute:e,fee:n});return kd.from(t).sub(r).toString()}return t},k0=({paymentRoute:t,fee:e})=>{if("string"==typeof e.amount&&e.amount.match("%"))return kd.from(t.toAmount).mul(10*parseFloat(e.amount)).div(1e3).toString();if("string"==typeof e.amount)return e.amount;if("number"==typeof e.amount)return $M(e.amount.toString(),t.toDecimals).toString();throw"Unknown fee amount type!"},j0=({paymentRoute:t,fee:e})=>e?[t.fromAddress,e.receiver,t.toAddress]:[t.fromAddress,t.toAddress],T0=({paymentRoute:t,exchangeRoute:e,event:n,fee:r})=>{let i=[];return e&&(t.exchangePlugin=Q$[t.blockchain][e.exchange.name],t.exchangePlugin.wrap&&t.fromToken.address==Ch[t.blockchain].currency.address?i.push(t.exchangePlugin.wrap.address):t.exchangePlugin.wrap&&t.fromToken.address==Ch[t.blockchain].wrapped.address?i.push(t.exchangePlugin.unwrap.address):i.push(t.exchangePlugin.address)),("ifSwapped"!=n||t.directTransfer)&&("ifRoutedAndNative"!=n||t.directTransfer||t.toToken.address!=Ch[t.blockchain].currency.address)?i.push(Q$[t.blockchain].payment.address):i.push(Q$[t.blockchain].paymentWithEvent.address),r&&("ifRoutedAndNative"!=n||t.directTransfer||t.toToken.address!=Ch[t.blockchain].currency.address?i.push(Q$[t.blockchain].paymentFee.address):i.push(Q$[t.blockchain].paymentFeeWithEvent.address)),i},C0=({paymentRoute:t,exchangeRoute:e})=>t.fromToken.address==Ch[t.blockchain].currency.address?e?e.amountIn.toString():t.toAmount.toString():kd.from("0").toString();function D0(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}class O0{constructor({blockchain:t,fromAddress:e,fromToken:n,fromDecimals:r,fromAmount:i,fromBalance:o,toToken:a,toDecimals:s,toAmount:u,toAddress:c}){this.blockchain=t,this.fromAddress=e,this.fromToken=n,this.fromAmount=D0([i,"optionalAccess",t=>t.toString,"call",t=>t()]),this.fromDecimals=r,this.fromBalance=o,this.toToken=a,this.toAmount=D0([u,"optionalAccess",t=>t.toString,"call",t=>t()]),this.toDecimals=s,this.toAddress=c,this.exchangeRoutes=[],this.transaction=void 0,this.approvalRequired=void 0,this.approvalTransaction=void 0,this.directTransfer=void 0}}function z0({assets:t,blacklist:e,accept:n,from:r,event:i,fee:o}){return Promise.resolve(R0({assets:t,blacklist:e})).then((t=>function({assets:t,accept:e,from:n}){return Promise.all(t.map((async t=>{let r=e.filter((e=>e.blockchain==t.blockchain)),i=new aX(t);return Promise.all(r.map((async e=>{if(e.token&&e.amount){let r=e.blockchain,o=t.decimals,a=new aX({blockchain:r,address:e.token}),s=await a.decimals(),u=(await a.BigNumber(e.amount)).toString();return new O0({blockchain:r,fromToken:i,fromDecimals:o,toToken:a,toAmount:u,toDecimals:s,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress})}if(e.fromToken&&e.fromAmount&&i.address.toLowerCase()==e.fromToken.toLowerCase()){let r=e.blockchain,o=(await i.BigNumber(e.fromAmount)).toString(),a=t.decimals,s=new aX({blockchain:r,address:e.toToken}),u=await s.decimals();return new O0({blockchain:r,fromToken:i,fromDecimals:a,fromAmount:o,toToken:s,toDecimals:u,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress})}})))}))).then((t=>t.flat().filter((t=>t))))}({assets:t,accept:n,from:r}))).then((t=>Q0({routes:t,fee:o}))).then(B0).then(U0).then(Y0).then(F0).then((t=>q0({routes:t,event:i,fee:o}))).then(H0).then(W0).then(V0).then(G0)}function P0({accept:t,from:e,whitelist:n,blacklist:r,event:i,fee:o,update:a}){if(o&&o.amount&&"string"==typeof o.amount&&o.amount.match(/\.\d\d+\%/))throw"Only up to 1 decimal is supported for fee amounts!";return new Promise((async(s,u)=>{let c,l=[];if(n)for(const t in n)(n[t]||[]).forEach((e=>{l.push({blockchain:t,address:e})}));else t.forEach((t=>{l.push({blockchain:t.blockchain,address:t.token||t.toToken})}));a&&(c=L0((async({assets:t,blacklist:e,accept:n,from:r,event:i,fee:o})=>{a.callback(await z0({assets:t,blacklist:e,accept:n,from:r,event:i,fee:o}))}),a.every));let h=[];const d=await(async t=>{void 0===t&&(t={accounts:{},priority:[]});let e=[],n=[];n=n.concat((t.priority||[]).map((n=>new Promise((async(r,i)=>{try{let i=new aX(n),o=Object.assign({},n,{name:await i.name(),symbol:await i.symbol(),decimals:await i.decimals(),balance:(await i.balance(t.accounts[n.blockchain])).toString()});if("0"!=o.balance){if(Y$({assets:e,asset:n}))return r();e.push(o),"function"==typeof t.drip&&t.drip(o),r(o)}else r()}catch(t){r()}})))));let r=[];for(var i in t.accounts)Ch.findByName(i).tokens.forEach((e=>{F$({options:t,address:e.address,blockchain:i})||r.push(Object.assign({},e,{blockchain:i}))}));if(n=n.concat(r.map((n=>new Promise(((r,i)=>{new aX(n).balance(t.accounts[n.blockchain]).then((i=>{if(Y$({assets:e,asset:n}))return r();const o=U$(n,i);"0"!=o.balance?(e.push(o),"function"==typeof t.drip&&t.drip(o),r(o)):r()})).catch((t=>{console.log(t),r()}))}))))),null==t.only||Object.keys(t.only).every((t=>0==t.length))){let r=await B$(t);n=n.concat(r.map((n=>new Promise(((r,i)=>new aX(n).balance(t.accounts[n.blockchain]).then((i=>{if(Y$({assets:e,asset:n}))return r();const o=U$(n,i);"0"!=o.balance?(e.push(o),"function"==typeof t.drip&&t.drip(o),r(o)):r()})).catch((t=>{console.log(t),r()})))))))}return await Promise.all(n),e})({accounts:e,priority:l,only:n,exclude:r,drip:n=>{a&&(h.push(n),c({assets:h,blacklist:r,accept:t,from:e,event:i,fee:o}))}});s(await z0({assets:d,blacklist:r,accept:t,from:e,event:i,fee:o}))}))}let R0=({assets:t,blacklist:e})=>null==e?t:t.filter((t=>null==e[t.blockchain]||!e[t.blockchain].find((e=>e.toLowerCase()==t.address.toLowerCase())))),B0=async t=>await Promise.all(t.map((t=>t.directTransfer?[]:t.toToken&&t.toAmount?N$({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountOutMin:t.toAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):t.fromToken&&t.fromAmount?N$({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountIn:t.fromAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):void 0))).then((e=>t.map(((t,n)=>(t.exchangeRoutes=e[n],t))))),U0=t=>t.filter((t=>0==t.exchangeRoutes.length||null!=Q$[t.blockchain][t.exchangeRoutes[0].exchange.name])),Y0=t=>t.filter((t=>0!=t.exchangeRoutes.length||t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase())),F0=async t=>t.filter((t=>t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()?kd.from(t.fromBalance).gte(kd.from(t.toAmount)):t.fromAmount&&t.toAmount?kd.from(t.fromBalance).gte(kd.from(t.exchangeRoutes[0].amountInMax)):t.exchangeRoutes[0]&&t.exchangeRoutes[0].amountIn?kd.from(t.fromBalance).gte(kd.from(t.exchangeRoutes[0].amountIn)):void 0)),W0=t=>Promise.all(t.map((t=>t.fromToken.allowance(t.fromAddress,H$[t.blockchain].address)))).then((e=>(t.forEach(((n,r)=>{n.directTransfer||n.fromToken.address.toLowerCase()==Ch[n.blockchain].currency.address.toLowerCase()?t[r].approvalRequired=!1:(t[r].approvalRequired=kd.from(n.fromAmount).gte(kd.from(e[r])),t[r].approvalRequired&&(t[r].approvalTransaction={blockchain:n.blockchain,to:n.fromToken.address,api:aX[n.blockchain].DEFAULT,method:"approve",params:[H$[n.blockchain].address,Ch[n.blockchain].maxInt]}))})),t))),Q0=({routes:t,fee:e})=>t.map((t=>(t.directTransfer=t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()&&null==e,t))),H0=t=>t.map((t=>(t.directTransfer&&!t.fee?t.fromToken.address.toLowerCase()==Ch[t.blockchain].currency.address.toLowerCase()?(t.fromAmount=t.transaction.value,t.toAmount=t.transaction.value):(t.fromAmount=t.transaction.params[1],t.toAmount=t.transaction.params[1]):(t.fromAmount=t.transaction.params.amounts[0],t.toAmount=t.transaction.params.amounts[1],t.fee&&(t.feeAmount=t.transaction.params.amounts[4])),t))),G0=t=>t.filter(((e,n)=>null==t.find(((t,r)=>e.fromToken.address==t.fromToken.address&&(e.fromToken.blockchain==t.fromToken.blockchain&&(!(!t.directTransfer||e.directTransfer)||(!(!kd.from(t.fromAmount).lt(kd.from(e.fromAmount))||e.directTransfer)||(t.fromAmount==e.fromAmount&&r<n||void 0)))))))),Z0=t=>{switch(t){case"polygon":return 50;case"bsc":return 90;case"ethereum":return 99;default:return 100}},V0=t=>t.sort(((t,e)=>Z0(t.fromToken.blockchain)<Z0(e.fromToken.blockchain)?-1:Z0(e.fromToken.blockchain)<Z0(t.fromToken.blockchain)?1:t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()?-1:e.fromToken.address.toLowerCase()==e.toToken.address.toLowerCase()||t.approvalRequired&&!e.approvalRequired?1:e.approvalRequired&&!t.approvalRequired||JSON.stringify([t.fromToken.address.toLowerCase(),t.toToken.address.toLowerCase()].sort())==JSON.stringify([Ch[t.blockchain].currency.address.toLowerCase(),Ch[t.blockchain].wrapped.address.toLowerCase()].sort())?-1:JSON.stringify([e.fromToken.address.toLowerCase(),e.toToken.address.toLowerCase()].sort())==JSON.stringify([Ch[e.blockchain].currency.address.toLowerCase(),Ch[e.blockchain].wrapped.address.toLowerCase()].sort())?1:t.fromToken.address.toLowerCase()==Ch[t.blockchain].currency.address.toLowerCase()?-1:e.fromToken.address.toLowerCase()==Ch[e.blockchain].currency.address.toLowerCase()?1:0)),q0=({routes:t,event:e,fee:n})=>Promise.all(t.map((async t=>(t.transaction=await(async({paymentRoute:t,event:e,fee:n})=>{let r=t.exchangeRoutes[0],i={blockchain:t.blockchain,to:_0({paymentRoute:t,fee:n}),api:N0({paymentRoute:t,fee:n}),method:E0({paymentRoute:t,fee:n}),params:S0({paymentRoute:t,exchangeRoute:r,event:e,fee:n}),value:C0({paymentRoute:t,exchangeRoute:r})};return r&&t.exchangePlugin&&t.exchangePlugin.prepareTransaction&&(i=t.exchangePlugin.prepareTransaction(i)),i})({paymentRoute:t,event:e,fee:n}),t.fee=!!n,t))));function J0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function K0(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J0(Object(n),!0).forEach((function(e){HZ(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J0(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var X0=function(t){var e="object"==n(t.receiver)?t.receiver.address:t.receiver,r="object"==n(t.receiver)?t.receiver:void 0;return K0(K0({},t),{},{toAddress:e,toContract:r})},$0=function(t,e){var n={};return t.forEach((function(t){n[t.blockchain]=e})),n},t1=function(t){var e=t.accept,n=t.account,r=t.whitelist,i=t.blacklist,o=t.fee;return P0({accept:e.map(X0),from:$0(e,n),whitelist:r,blacklist:i,event:"ifRoutedAndNative",fee:o})};function e1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function n1(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?e1(Object(n),!0).forEach((function(e){HZ(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e1(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var r1=function(t){var n=d(Z.useState(),2),r=n[0],i=n[1],o=d(Z.useState(),2),a=o[0],s=o[1],u=d(Z.useState(),2),l=u[0],h=u[1],f=d(Z.useState(!1),2),p=f[0],m=f[1],g=d(Z.useState(0),2),y=g[0],b=g[1],w=Z.useContext(Jq).account,v=Z.useContext(q).updatable,M=Z.useContext(Wq).recover,L=function(){var n=e(c.mark((function n(r){return c.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:0==r.length?(i([]),t.setMaxRoute&&t.setMaxRoute(null)):S(r).then(function(){var n=e(c.mark((function e(n){var r,o;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:void 0===l?(r=n[0],h(r)):(o=n[n.findIndex((function(t){return t.fromToken.address==l.fromToken.address&&t.blockchain==l.blockchain}))],o?l.fromAmount!=o.fromAmount?s(o):l.approvalRequired!=o.approvalRequired&&h(o):h(n[0])),i(n),t.setMaxRoute&&t.setMaxRoute(Vq(n));case 3:case"end":return e.stop()}}),e)})));return function(t){return n.apply(this,arguments)}}());case 1:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}(),_=function(){var n=e(c.mark((function e(n){var r;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.allRoutes,n.selectedRoute,0!=n.updatable&&t.accept&&w){e.next=3;break}return e.abrupt("return");case 3:return r=setTimeout((function(){m(!0)}),4e3),e.next=6,t1(Object.assign({},t,{account:w})).then((function(t){clearInterval(r),L(t)}));case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})));return function(t){return n.apply(this,arguments)}}(),N=function(t,e){t.fromAmount=e.toString(),t.transaction.params.amounts[0]=e.toString(),t.transaction.value&&"0"!=t.transaction.value.toString()&&(t.transaction.value=e.toString())},E=function(){var t=e(c.mark((function t(e,n){var r,i;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.directTransfer){t.next=2;break}return t.abrupt("return",e);case 2:return t.next=4,e.fromToken.readable(n||e.transaction.params.amounts[0]);case 4:return r=t.sent,t.next=7,e.fromToken.BigNumber(qq(r));case 7:return i=t.sent,N(e,i),t.abrupt("return",e);case 10:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),S=function(){var t=e(c.mark((function t(e){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.all(e.map((function(t){return E(t)}))));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),x=function(){var t=e(c.mark((function t(){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:h(n1({},a)),s(null);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return Z.useEffect((function(){var t=setTimeout((function(){b(y+1),_({allRoutes:r,selectedRoute:l,updatable:v})}),15e3);return function(){return clearTimeout(t)}}),[y,r,l,v]),Z.useEffect((function(){w&&t.accept&&null==M&&_({})}),[w,t.accept]),Z.createElement(D$.Provider,{value:{selectedRoute:l,setSelectedRoute:h,refreshPaymentRoutes:function(){return _({allRoutes:r,selectedRoute:l,updatable:v})},allRoutes:r,setAllRoutes:i,slowRouting:p,updatedRouteWithNewPrice:a,updateRouteWithNewPrice:x}},t.children)},i1=Z.createContext(),o1=function(t){var e=Z.useContext(mq).setError,n=Z.useContext(Jq).account,r=Z.useContext(q).updatable,i=Z.useContext(Wq),o=i.amount,a=i.currencyCode,s=Z.useContext(Fq).amount,u=Z.useContext(C$).payment,c=d(Z.useState(),2),l=c[0],h=c[1],f=d(Z.useState(),2),p=f[0],m=f[1],g=d(Z.useState(),2),y=g[0],b=g[1],w=Z.useContext(Wq).currency,v=d(Z.useState(0),2),M=v[0],L=v[1],_=function(t){var r=t.updatable,i=t.payment;0!=r&&null!=(null==i?void 0:i.route)&&(h(null),b(null),Promise.all([Promise.all(Ch[i.route.blockchain].stables.usd.map((function(t){return N$({blockchain:i.route.blockchain,tokenIn:i.route.fromToken.address,tokenOut:t,amountIn:i.route.fromAmount,fromAddress:n,toAddress:n})}))),i.route.directTransfer?Promise.resolve([]):N$({blockchain:i.route.blockchain,tokenIn:i.route.toToken.address,tokenOut:i.route.fromToken.address,amountIn:i.route.toAmount,fromAddress:n,toAddress:n})]).then((function(t){var e,n=d(t,2),r=n[0],o=n[1][0];if(o){var a=kd.from(o.amountOut),s=kd.from(i.route.fromAmount),u=100-a.mul(kd.from("100")).div(s).abs().toString();b(u>=10?u:null)}if(Ch[i.route.blockchain].stables.usd.includes(i.route.fromToken.address)){var c=Ch[i.route.blockchain].tokens.find((function(t){return t.address===i.route.fromToken.address})).decimals;e=XM(i.route.fromAmount.toString(),c)}else{var l=r.map((function(t){return t?t[0]:void 0})).filter(Boolean);if(0==l.length)return void h("");var f=l.map((function(t){var e=Ch[i.route.blockchain].tokens.find((function(e){return e.address===t.tokenOut})).decimals;return parseFloat(XM(t.amountOut,e))})),p=f.reduce((function(t,e){return t+e}))/f.length;f=f.filter((function(t){return t<p+.1*p&&t>p-.1*p})),e=f.reduce((function(t,e){return t+e}))/f.length}x$.fromUSD({amount:e,code:w}).then(h)})).catch(e))};return Z.useEffect((function(){l&&s&&o&&o.currency&&o.fix?m(l.toString()):!s||null!=o&&1==(null==o?void 0:o.token)?l&&l.toString().length&&1!=(null==o?void 0:o.token)?m(l.toString()):u&&m("".concat(u.symbol," ").concat(u.amount)):m(new x$({amount:s.toFixed(2),code:a}).toString())}),[l,u,s,o]),Z.useEffect((function(){n&&u&&_({updatable:r,payment:u})}),[u,n]),Z.useEffect((function(){var t=setTimeout((function(){L(M+1),_({updatable:r})}),15e3);return function(){return clearTimeout(t)}}),[M,r]),Z.createElement(i1.Provider,{value:{paymentValue:l,paymentValueLoss:y,displayedPaymentValue:p}},t.children)},a1=function(t){var e=Z.useContext(Fq),n=e.acceptWithAmount,r=e.setMaxRoute,i=Z.useContext(Wq),o=i.blacklist,a=i.whitelist,s=i.fee;return Z.createElement(k$.Provider,{value:{}},Z.createElement(r1,{accept:n,whitelist:a,blacklist:o,setMaxRoute:r,fee:s},Z.createElement(P$,{container:t.container,document:t.document},Z.createElement(o1,null,t.children))))},s1=function(t){var e=qq(t),n=e.toString();if(new RegExp(/\./).test(n)){var r=n.split(".");return(new Intl.NumberFormat).format(parseInt(r[0]))+"."+r[1]}return(new Intl.NumberFormat).format(e)};let u1=["ethereum","bsc","polygon","solana","fantom","velas"];u1.evm=["ethereum","bsc","polygon","fantom","velas"],u1.solana=["solana"];const c1=[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],l1=[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];let h1=function(t){const[e,n]=Z.useState(),[r,i]=Z.useState("repository"),o=t.blockchain.toLowerCase(),a=Ch.findByName(o).currency.address,s=t.address,u=t.id;Z.useEffect((()=>{a.toLowerCase()==s.toLowerCase()?n(Ch.findByName(o).logo):n(c({blockchain:o,address:s}))}),[o,s]);const c=({blockchain:t,address:e})=>["ethereum","bsc","polygon","fantom","solana"].includes(t)?`https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/${l(t)}/assets/${e}/logo.png`:"velas"==t?`https://raw.githubusercontent.com/wagyuswapapp/assets/master/blockchains/velas/assets/${e.toLowerCase()}/logo.png`:void 0,l=t=>{switch(t){case"ethereum":return"ethereum";case"bsc":return"smartchain";case"polygon":return"polygon";case"solana":return"solana";case"fantom":return"fantom";default:throw"DePayReactTokenImage: Unknown blockchain"}},h=()=>{i("unknown"),n("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjgzLjUgMjgzLjUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDI4My41IDI4My41OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxjaXJjbGUgZmlsbD0iI0YwRUZFRiIgY3g9IjE0MS43IiBjeT0iMTQxLjciIHI9IjE0MS43Ii8+CjxnPgoJPHBhdGggZmlsbD0iI0FCQUJBQiIgZD0iTTEyNywxNzUuMXYtNC40YzAtOC40LDEuMS0xNS4zLDMuNC0yMC43YzIuMy01LjQsNS4xLTEwLDguNC0xMy44YzMuMy0zLjcsNi42LTcsMTAuMS05LjdzNi4zLTUuNiw4LjYtOC41CgkJYzIuMy0yLjksMy40LTYuNCwzLjQtMTAuNWMwLTUtMS4xLTguNy0zLjMtMTEuMWMtMi4yLTIuNC01LTQtOC40LTQuOGMtMy40LTAuOC02LjktMS4zLTEwLjUtMS4zYy01LjgsMC0xMS44LDEtMTcuOSwyLjkKCQljLTYuMSwxLjktMTEuNSw0LjctMTYsOC40Vjc0YzIuMy0xLjcsNS40LTMuMyw5LjQtNC45YzQtMS42LDguNC0yLjksMTMuNC00YzUtMS4xLDEwLjEtMS42LDE1LjUtMS42YzguMSwwLDE1LjEsMS4xLDIxLjEsMy40CgkJYzYsMi4zLDEwLjgsNS41LDE0LjcsOS41YzMuOCw0LDYuNyw4LjcsOC42LDE0LjFjMS45LDUuMywyLjksMTEuMSwyLjksMTcuMmMwLDYuNi0xLjEsMTItMy40LDE2LjNjLTIuMyw0LjMtNS4xLDgtOC41LDExLjIKCQljLTMuNCwzLjItNi44LDYuNC0xMC4yLDkuNWMtMy40LDMuMS02LjMsNi44LTguNiwxMWMtMi4zLDQuMi0zLjQsOS41LTMuNCwxNS45djMuNEgxMjd6IE0xMjUuMiwyMTguMnYtMjcuN2gzM3YyNy43SDEyNS4yeiIvPgo8L2c+Cjwvc3ZnPgo=")},d=t=>{t.match(/^ipfs/)&&(t=`https://ipfs.io/ipfs/${t.split("://")[1]}`),fetch(t).then((t=>{if(t.ok)return t.json();h()})).then((t=>{if(t){let e=t.image;e?(e.match(/^ipfs/)&&(e=`https://ipfs.io/ipfs/${e.split("://")[1]}`),i("meta"),n(e)):h()}})).catch(h)};return null==e?null:Z.createElement("img",{className:t.className,src:e,onError:t=>{"repository"==r?(i("depay"),n(`https://integrate.depay.com/tokens/${o}/${s}/image`)):"depay"==r&&u1.evm.includes(o)?u?RG({blockchain:o,address:s,api:l1,method:"uri",params:[u]}).then((t=>{t=t.match("0x{id}")?t.replace("0x{id}",u):t,d(t)})).catch(h):RG({blockchain:o,address:s,api:c1,method:"tokenURI",params:[1]}).then(d).catch(h):h()},__self:this,__source:{fileName:"/Users/sebastian/Work/DePay/react-token-image/src/index.js",lineNumber:112}})};var d1=function(t){var e=Z.useContext(uh).navigate;Z.useContext(mq).setError,Z.useContext(Jq).account;var r=Z.useContext(Fq),i=r.amount,o=r.setAmount,a=r.maxAmount;Z.useContext(i1).displayedPaymentValue;var s=d(Z.useState(i),2),u=s[0],c=s[1],l=Z.useContext(Wq),h=l.currencyCode,f=l.amount,p=Z.useContext(D$);p.allRoutes;var m=p.setSelectedRoute,g="object"==n(f)&&f.min?f.min:1,y="object"==n(f)&&f.step?f.step:1,b=null!=f&&f.token?null:h,w=function(t){Number.isNaN(t)||c(t)},v=function(t){return y&&(t=parseFloat(new TK(Math.floor(new TK(t).div(y))).mul(y).toString())),t},M=function(t){return t=v(t),a&&(t=Math.max(g,Math.min(t,a))),t=v(t)};return Z.createElement(dh,{stacked:!0,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomS"},Z.createElement("h1",{className:"LineHeightL FontSizeL TextCenter"},"Change Amount"),Z.createElement("div",{className:"FontSizeL TextCenter FontWeightBold"},Z.createElement("strong",null,b))),body:Z.createElement("div",{className:"MaxHeight PaddingTopXS"},Z.createElement("div",{className:"PaddingLeftM PaddingRightM"},Z.createElement("div",{className:"PaddingTopS TextCenter PaddingBottomL"},Z.createElement("div",{className:"PaddingBottomM"},Z.createElement("input",{max:a?parseFloat(a):null,min:g,step:y,className:"Input FontSizeXXL TextAlignCenter",type:"number",name:"amount",value:parseFloat(u),onChange:function(t){w(t.target.value)},onBlur:function(t){var e;e=t.target.value,c(M(e))}})),a&&Z.createElement("div",{style:{height:"40px"}},Z.createElement("div",{className:"FontSizeS"},s1(v(a)),Z.createElement("div",null,Z.createElement("button",{className:"TextButton",onClick:function(){w(M(a))}},"(Max)"))))))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:"ButtonPrimary",onClick:function(){var t=M(parseFloat(u));t!=i&&(m(void 0),o(t)),e("back")}},"Done"))})},f1=function(t){var e=Z.useContext(i1).paymentValue;return Z.createElement(dh,{stacked:!0,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomS"},Z.createElement("h1",{className:"LineHeightL FontSizeL TextCenter"},"Change Payment"),null!=e&&Z.createElement("div",{className:"FontSizeL TextCenter FontWeightBold"},Z.createElement("strong",null,e.toString()))),body:Z.createElement("div",{className:"MaxHeight PaddingTopXS"},Z.createElement("div",{className:"PaddingLeftM PaddingRightM"},Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"})),Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"})),Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))))})},p1=function(t){var e=Z.useContext(mq).setError,n=Z.useContext(D$),r=n.allRoutes,i=n.setSelectedRoute,o=Z.useContext(i1);o.paymentValue;var a=o.displayedPaymentValue,s=Z.useContext(uh).navigate,u=d(Z.useState([]),2),c=u[0],l=u[1],h=d(Z.useState([]),2),f=h[0],p=h[1];return Z.useEffect((function(){null!=r&&Promise.all(r.map((function(t){return t.exchangeRoutes[0],t.fromToken,Promise.all([t.fromToken.name(),t.fromToken.symbol(),t.fromToken.decimals(),t.fromToken.readable(t.fromAmount)])}))).then((function(t){l(r.map((function(e,n){return{name:t[n][0],symbol:t[n][1].toUpperCase(),decimals:t[n][2],amount:t[n][3],route:e}})))})).catch(e)}),[r]),Z.useEffect((function(){p(c.map((function(t,e){var n=Ch.findByName(t.route.blockchain);return Z.createElement("div",{key:e,className:"Card",title:"Select ".concat(t.symbol," as payment"),onClick:function(){i(t.route),s("back")}},Z.createElement("div",{className:"CardImage"},Z.createElement(h1,{blockchain:t.route.blockchain,address:t.route.fromToken.address}),Z.createElement("img",{className:"BlockchainLogo small",src:n.logo,alt:n.label,title:n.label})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("h2",{className:"CardText"},Z.createElement("div",{className:"TokenAmountRow"},Z.createElement("span",{className:"TokenSymbolCell"},t.symbol),Z.createElement("span",null," "),Z.createElement("span",{className:"TokenAmountCell"},s1(t.amount)))),Z.createElement("h3",{className:"CardText small"},Z.createElement("small",null,s1(qq(parseFloat(t.route.fromBalance.toString())/Math.pow(10,t.decimals),"down")))))))})))}),[c]),0==c.length||0==f.length?Z.createElement(f1,null):Z.createElement(dh,{stacked:!0,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomS"},Z.createElement("h1",{className:"LineHeightL FontSizeL TextCenter"},"Change Payment"),null!=a&&Z.createElement("div",{className:"FontSizeL TextCenter FontWeightBold"},Z.createElement("strong",null,a.toString()))),body:Z.createElement("div",{className:"MaxHeight PaddingTopXS"},Z.createElement("div",{className:"PaddingLeftM PaddingRightM"},f)),footer:Z.createElement("div",null)})},m1=function(){return Z.createElement("svg",{className:"ChevronRight Icon",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16"},Z.createElement("path",{strokeWidth:"1",fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"}))},g1=function(t){var e=Z.useContext(Wq).title;return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},e||"Donation")),body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"})),Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("div",{className:"SkeletonWrapper"},Z.createElement("div",{className:"ButtonPrimary Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))))})},y1=function(t){return Z.createElement("svg",{className:"Checkmark Icon "+t.className,version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 24 24"},Z.createElement("path",{d:"M20,4.9L9.2,16l-5.4-3.9c-0.7-0.5-1.6-0.3-2.1,0.3c-0.5,0.7-0.3,1.6,0.3,2.1l6.4,4.7c0.3,0.2,0.6,0.3,0.9,0.3 c0.4,0,0.8-0.2,1.1-0.5l11.7-12c0.6-0.6,0.6-1.6,0-2.2C21.6,4.3,20.6,4.3,20,4.9z"}))},b1=function(t){return Z.createElement("svg",{className:"DigitalWalletIcon Icon "+t.className,version:"1.1",xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",viewBox:"0 0 24 24"},Z.createElement("path",{d:"M8.51,4.84l-.39-.53,4-2.89a2.2,2.2,0,0,1,3.06.48l.4.56-.53.39-.4-.56A1.54,1.54,0,0,0,12.5,2Z",transform:"translate(-0.81 -1)"}),Z.createElement("path",{d:"M9.77,4.89l-.21-.62,6.31-2.13h0a2.18,2.18,0,0,1,.67-.1h0a2.21,2.21,0,0,1,2.08,1.49l.32.95-.63.21L18,3.73a1.53,1.53,0,0,0-1.45-1h0a1.61,1.61,0,0,0-.48.08h0Z",transform:"translate(-0.81 -1)"}),Z.createElement("path",{d:"M19.72,16.2H18.27a3.28,3.28,0,1,1,0-6.56h1.45a3.21,3.21,0,0,1,1.33.28h0a3.28,3.28,0,0,1,0,6A3.21,3.21,0,0,1,19.72,16.2Zm-1.45-5.9a2.63,2.63,0,0,0,0,5.25h1.45a2.56,2.56,0,0,0,1.06-.23,2.62,2.62,0,0,0,0-4.8,2.55,2.55,0,0,0-1.06-.22ZM19,14.53a1.61,1.61,0,1,1,1.61-1.61A1.62,1.62,0,0,1,19,14.53ZM19,12a1,1,0,1,0,.95.95A1,1,0,0,0,19,12Z",transform:"translate(-0.81 -1)"}),Z.createElement("path",{d:"M10.49,19.69a1.58,1.58,0,1,1,1.58-1.57A1.57,1.57,0,0,1,10.49,19.69Zm0-2.49a.92.92,0,1,0,.92.92A.92.92,0,0,0,10.49,17.2Z",transform:"translate(-0.81 -1)"}),Z.createElement("path",{d:"M19.09,22.14H2.79a2,2,0,0,1-2-2V6.25a2.1,2.1,0,0,1,0-.43,2,2,0,0,1,.48-.92,2,2,0,0,1,1.48-.65H19.09a2,2,0,0,1,.64.1,2,2,0,0,1,1.36,1.79v0a.28.28,0,0,1,0,.09v3.91h-.66v-4a1.49,1.49,0,0,0-.23-.69A1.35,1.35,0,0,0,19.52,5a1.26,1.26,0,0,0-.43-.08H2.82a1.34,1.34,0,0,0-1,.44A1.49,1.49,0,0,0,1.5,6a1.5,1.5,0,0,0,0,.29V20.13a1.36,1.36,0,0,0,1.34,1.35H19.09a1.35,1.35,0,0,0,1.35-1.35V15.68h.66v4.45A2,2,0,0,1,19.09,22.14Z",transform:"translate(-0.81 -1)"}),Z.createElement("path",{d:"M9.27,9.31a1.58,1.58,0,1,1,0-3.15,1.58,1.58,0,0,1,0,3.15Zm0-2.5a.92.92,0,1,0,.92.92A.92.92,0,0,0,9.27,6.81Z",transform:"translate(-0.81 -1)"}),Z.createElement("path",{d:"M7.11,14.67A1.58,1.58,0,1,1,8.69,13.1,1.57,1.57,0,0,1,7.11,14.67Zm0-2.49A.92.92,0,1,0,8,13.1.92.92,0,0,0,7.11,12.18Z",transform:"translate(-0.81 -1)"}),Z.createElement("rect",{x:"0.33",y:"11.77",width:"4.72",height:"0.66"}),Z.createElement("polygon",{points:"2.08 9.53 0.33 9.53 0.33 8.87 1.8 8.87 4.28 6.39 7.21 6.39 7.21 7.05 4.55 7.05 2.08 9.53"}),Z.createElement("polygon",{points:"8.43 17.45 4.53 17.45 2.63 15.55 0.33 15.55 0.33 14.89 2.9 14.89 4.8 16.79 8.43 16.79 8.43 17.45"}))},w1={ethereum:13,bsc:4,polygon:3},v1=function(t){return Z.createElement("div",{className:"LoadingText"},t.children,Z.createElement("span",{className:"dot"},"."),Z.createElement("span",{className:"dot"},"."),Z.createElement("span",{className:"dot"},"."))},M1=function(){var t=Z.useContext(Fq);t.amount,t.amountsMissing;var e=Z.useContext(O$),n=e.synchronousTracking,r=e.asynchronousTracking,i=e.trackingInitialized,o=e.release,a=e.forwardTo,s=e.confirmationsRequired,u=e.confirmationsPassed,c=Z.useContext(C$),l=c.payment,h=c.paymentState,f=c.pay,p=c.transaction,m=c.approve,g=c.approvalTransaction,y=Z.useContext(i1).paymentValueLoss,b=Z.useContext(D$),w=b.updatedRouteWithNewPrice,v=b.updateRouteWithNewPrice;Z.useContext(uh).navigate;var M=Z.useContext(V).close,L=d(Z.useState(),2),_=L[0],N=L[1],E=d(Z.useState(0),2),S=E[0],x=E[1];Z.useEffect((function(){if(s){var t=setInterval((function(){x(S+1)}),1e3);return function(){clearInterval(t)}}}),[s,S]),Z.useEffect((function(){u&&N(function(t,e,n){return(e-n)*w1[t]}(l.blockchain,s,u)-S)}),[u,S]),Z.useEffect((function(){u&&x(0)}),[u]);return Z.createElement("div",null,y&&Z.createElement("div",{className:"PaddingBottomXS"},Z.createElement("div",{className:"Alert"},Z.createElement("strong",null,"Payment would lose ",y,"% of its value!"))),null==l.route||!l.route.approvalRequired||l.route.directTransfer||w?null:y?Z.createElement("div",{className:"PaddingBottomXS"},Z.createElement("button",{className:"ButtonPrimary disabled",onClick:function(){},title:"Allow ".concat(l.symbol," to be used as payment")},"Approve use of ",l.symbol)):"initialized"==h?Z.createElement("div",{className:"PaddingBottomXS"},Z.createElement("button",{className:"ButtonPrimary",onClick:m,title:"Allow ".concat(l.symbol," to be used as payment")},"Approve use of ",l.symbol)):"approving"==h?Z.createElement("div",{className:"PaddingBottomXS"},Z.createElement("a",{className:"ButtonPrimary",title:"Approving payment token - please wait",href:null==g?void 0:g.url,target:"_blank",rel:"noopener noreferrer"},Z.createElement(v1,null,"Approving"))):void 0,"paying"==h&&null==p?Z.createElement("div",{className:"PaddingBottomS"},Z.createElement("div",{className:"Card transparent disabled small"},Z.createElement("div",{className:"CardImage"},Z.createElement("div",{className:"TextCenter Opacity05"},Z.createElement(b1,{className:"small"}))),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("div",{className:"Opacity05"},"Confirm transaction in your wallet"))))):"success"==h?Z.createElement("div",{className:"PaddingBottomS"},Z.createElement("div",null,Z.createElement("a",{className:"Card transparent small",title:"Transaction has been confirmed by the network",href:null==p?void 0:p.url,target:"_blank",rel:"noopener noreferrer"},Z.createElement("div",{className:"CardImage"},Z.createElement("div",{className:"TextCenter Opacity05"},Z.createElement(y1,{className:"small"}))),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("div",{className:"Opacity05"},"Transaction confirmed"))))),0==n&&0==r||r&&i?null:r&&0==i?Z.createElement("div",null,Z.createElement("div",{className:"Card transparent small disabled"},Z.createElement("div",{className:"CardImage"},Z.createElement("div",{className:"TextCenter"},Z.createElement("div",{className:"Loading Icon"}))),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("div",{className:"Opacity05"},"Initializing tracking"))))):o?Z.createElement("div",null,Z.createElement("div",{className:"Card transparent small disabled"},Z.createElement("div",{className:"CardImage"},Z.createElement("div",{className:"TextCenter Opacity05"},Z.createElement(y1,{className:"small"}))),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("div",{className:"Opacity05"},"Payment validated"))))):Z.createElement("div",null,Z.createElement("div",{className:"Card transparent small disabled"},Z.createElement("div",{className:"CardImage"},Z.createElement("div",{className:"TextCenter"},Z.createElement("div",{className:"Loading Icon"}))),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("div",{className:"Opacity05"},"Validating payment",s&&_>0&&Z.createElement("span",{title:"".concat(u,"/").concat(s," required confirmations")}," ",_,"s"))))))):void 0,w?Z.createElement("div",null,Z.createElement("div",{className:"PaddingBottomXS"},Z.createElement("div",{className:"Alert"},Z.createElement("strong",null,"Price updated!"))),Z.createElement("button",{className:"ButtonPrimary",onClick:function(){v()}},"Reload")):y?Z.createElement("div",null,Z.createElement("button",{className:"ButtonPrimary disabled",onClick:function(){}},"Pay")):"initialized"!=h&&"approving"!=h||!l.route?"paying"==h?Z.createElement("a",{className:"ButtonPrimary",title:"Performing the payment - please wait",href:null==p?void 0:p.url,target:"_blank",rel:"noopener noreferrer"},Z.createElement(v1,null,"Paying")):"success"==h?1==n?o?a?Z.createElement("a",{className:"ButtonPrimary",href:a,rel:"noopener noreferrer"},"Continue"):Z.createElement("button",{className:"ButtonPrimary",onClick:M},"Continue"):Z.createElement("button",{className:"ButtonPrimary disabled",onClick:function(){}},"Continue"):1==r&&0==i?Z.createElement("button",{className:"ButtonPrimary disabled",onClick:function(){}},"Close"):Z.createElement("button",{className:"ButtonPrimary",onClick:M},"Close"):void 0:Z.createElement("button",{className:["ButtonPrimary",l.route.approvalRequired&&!l.route.directTransfer?"disabled":""].join(" "),onClick:function(){l.route.approvalRequired&&!l.route.directTransfer||f()}},"Pay"))},L1=function(t){var e=Z.useContext(Wq);e.currencyCode;var n=e.title;Z.useContext(Fq).amount;var r=Z.useContext(C$),i=r.payment,o=r.paymentState,a=Z.useContext(i1).displayedPaymentValue,s=Z.useContext(uh).navigate;if(null==i)return Z.createElement(g1,null);var u=Ch.findByName(i.blockchain);return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},n||"Donation")),body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},Z.createElement("div",{className:["Card","initialized"==o?"":"disabled"].join(" "),title:"initialized"==o?"Change amount":void 0,onClick:function(){"initialized"==o&&s("ChangeAmount")}},Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("h4",{className:"CardTitle"},"Amount"),Z.createElement("h2",{className:"CardText"},Z.createElement("div",{className:"TokenAmountRow"},a)))),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null))),Z.createElement("div",{className:["Card","initialized"==o?"":"disabled"].join(" "),title:"initialized"==o?"Change payment":void 0,onClick:function(){"initialized"==o&&s("ChangePayment")}},Z.createElement("div",{className:"CardImage",title:i.name},Z.createElement(h1,{blockchain:i.route.blockchain,address:i.token}),Z.createElement("img",{className:"BlockchainLogo small",src:u.logo,alt:u.label,title:u.label})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("h4",{className:"CardTitle"},"Payment"),Z.createElement("h2",{className:"CardText"},Z.createElement("div",{className:"TokenAmountRow"},Z.createElement("span",{className:"TokenSymbolCell"},i.symbol),Z.createElement("span",null," "),Z.createElement("span",{className:"TokenAmountCell"},s1(i.amount)))))),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null)))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement(M1,null))})},_1=function(){var t=Z.useContext(V).close,e=Z.useContext(C$).transaction;return Z.createElement(dh,{stacked:!1,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:Z.createElement("div",{className:"TextCenter"},Z.createElement("div",{className:"GraphicWrapper"},Z.createElement("img",{className:"Graphic",src:gq})),Z.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Payment Failed"),Z.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("strong",{className:"FontSizeM"},"Unfortunately executing your payment failed, but you can try again."),e&&Z.createElement("div",{className:"PaddingTopS"},Z.createElement("a",{className:"Link",title:"Check your transaction on a block explorer",href:null==e?void 0:e.url,target:"_blank",rel:"noopener noreferrer"},"View on explorer")))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:"ButtonPrimary",onClick:function(){return t()}},"Try again"))})},N1=function(t){var e=Z.useContext(C$).payment,n=Z.useContext(Jq).wallet,r=Z.useContext(uh).navigate,i=d(Z.useState(!1),2);i[0],i[1];var o=Ch.findByName(e.route.blockchain);return Z.createElement(dh,{stacked:!0,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Wrong Network")),body:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomXS TextCenter"},Z.createElement("div",{className:"GraphicWrapper"},Z.createElement("img",{className:"Graphic",src:o.logo})),Z.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Connect to ",o.label),Z.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("strong",{className:"FontSizeM"},"Please make sure you connect your wallet to the correct network before you try again!"))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{type:"button",className:"ButtonPrimary",onClick:function(){n.switchTo(e.blockchain),r("back")}},"Switch Network"))})},E1=function(t){var e=Z.useContext(V),n=e.open,r=e.close,i=Z.useContext(j$).setNavigator;return Z.createElement(hh,{setNavigator:i,open:n,close:r,start:"DonationOverview",container:t.container,document:t.document,dialogs:{DonationOverview:Z.createElement(L1,null),ChangeAmount:Z.createElement(d1,null),ChangePayment:Z.createElement(p1,null),PaymentFailed:Z.createElement(_1,null),WrongNetwork:Z.createElement(N1,null)}})},S1=function(t){var e;return Z.createElement(j$.Provider,{value:{navigate:function(t){e&&e.navigate(t)},set:function(t){e&&e.set(t)},setNavigator:function(t){e=t}}},t.children)},x1=function(t){Z.useContext(mq).errorCallback;var n=Z.useContext(Wq),r=n.track,i=n.validated;n.failed;var o=n.integration,a=n.link,s=n.type,u=Z.useContext(Jq),l=u.account,h=u.wallet,f=d(Z.useState(),2),p=f[0],m=f[1],g=d(Z.useState(),2),y=g[0],b=g[1],w=d(Z.useState(),2),v=w[0],M=w[1],L=d(Z.useState(),2),_=L[0],N=L[1],E=d(Z.useState(),2);E[0],E[1];var S=d(Z.useState(),2),x=S[0],A=S[1],I=d(Z.useState(!1),2),k=I[0],j=I[1],T=d(Z.useState(!(!r||!r.endpoint&&"function"!=typeof r.method||1==r.async)),1)[0],C=d(Z.useState(!(!r||1!=r.async)),1)[0],D=d(Z.useState(!(!r||!r.poll||!r.poll.endpoint&&"function"!=typeof r.poll.method||1==r.async)),1)[0],O=d(Z.useState(!1),2),z=O[0],P=O[1],R=d(Z.useState(),2),B=R[0],U=R[1],Y=Z.useContext(V).setClosable,F=Z.useContext(j$),W=F.navigate,Q=F.set,H=function e(n){var r=new WebSocket("wss://integrate.depay.com/cable");r.onopen=function(t){var e,i={command:"subscribe",identifier:JSON.stringify({blockchain:n.blockchain,sender:n.from,nonce:null==n||null===(e=n.nonce)||void 0===e?void 0:e.toString(),channel:"PaymentChannel"})};r.send(JSON.stringify(i))},r.onclose=function(t){t&&1e3==t.code||e(n)},r.onmessage=function(e){var n=JSON.parse(e.data);if("ping"!==n.type&&n.message){var o="success"==n.message.status;i&&setTimeout((function(){return i(o)}),200),n.message.release?(r.close(1e3),o?(P(!0),Y(!0),U(n.message.forward_to),n.message.forward_to&&setTimeout((function(){t.document.location.href=n.message.forward_to}),200)):0==o&&(Y(!0),Q(["PaymentFailed"]))):n.message.confirmations&&(b(n.message.confirmations.required),M(n.message.confirmations.passed))}},r.onerror=function(t){console.log("WebSocket Error: "+t)}},G=function(t,e,n,i){(i=parseInt(i||1,10))<((null==r?void 0:r.attempts)||40)?setTimeout((function(){q(t,e,n,i+1)}),3e3):W("TrackingFailed")},q=function(t,e,n,i){var o,a;console.log("START TRACKING!",t),function(t){if(r.endpoint)return fetch(r.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((function(t){if(200==t.status||201==t.status)return t;throw t}));if(r.method)return r.method(t);throw"No tracking defined!"}({blockchain:t.blockchain,transaction:t.id,sender:t.from,nonce:null==t||null===(o=t.nonce)||void 0===o?void 0:o.toString(),after_block:e.toString(),from_token:n.fromToken.address,from_amount:n.fromAmount.toString(),from_decimals:n.fromDecimals,to_token:n.toToken.address,to_amount:n.toAmount.toString(),to_decimals:n.toDecimals,fee_amount:null==n||null===(a=n.feeAmount)||void 0===a?void 0:a.toString()}).then((function(t){j(!0),console.log("PAYMENT TRACKING INITIALIZED")})).catch((function(r){console.log("PAYMENT TRACKING FAILED",r),G(t,e,n,i)}))};Z.useEffect((function(){if(D&&T){var e=setInterval((function(){return function(e,n,o,a,s){var u;if(e&&null!=n&&null!=o&&null!=a){var c={blockchain:n.blockchain,transaction:n.id,sender:n.from,nonce:null==n||null===(u=n.nonce)||void 0===u?void 0:u.toString(),after_block:o.toString(),to_token:a.toToken.address},l=function(e){e&&(e&&e.forward_to?(Y(!0),U(e.forward_to),setTimeout((function(){t.document.location.href=e.forward_to}),200)):Y(!0),clearInterval(s),i&&i(!0),P(!0))};r.poll.endpoint?fetch(r.poll.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}).then((function(t){return 200==t.status||201==t.status?t.json().catch((function(){Y(!0)})):void 0})).then(l):r.poll.method&&r.poll.method(c).then(l)}}(D,p,_,x,e)}),5e3);return function(){clearInterval(e)}}}),[D,p,_,x]);var J=function t(e,n,r,i){var u;fetch("https://public.depay.com/payments",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({blockchain:e.blockchain,transaction:e.id,sender:e.from,nonce:null==e||null===(u=e.nonce)||void 0===u?void 0:u.toString(),receiver:r.toAddress,token:r.toToken.address,amount:r.fee?XM(r.transaction.params.amounts[1],r.toDecimals):XM(r.toAmount,r.toDecimals),confirmations:1,after_block:n.toString(),uuid:e.id,payload:{sender_id:e.from,sender_token_id:r.fromToken.address,sender_amount:XM(r.fromAmount,r.fromDecimals),integration:o,link:a,type:s},fee_amount:r.fee?XM(r.transaction.params.amounts[4],r.toDecimals):null,fee_receiver:r.fee?r.transaction.params.addresses[1]:null})}).then((function(i){200==i.status||201==i.status||setTimeout((function(){t(e,n,r)}),3e3)})).catch((function(i){setTimeout((function(){t(e,n,r)}),3e3)}))};return Z.createElement(O$.Provider,{value:{synchronousTracking:T,asynchronousTracking:C,initializeTracking:function(t,e,n){console.log("initializeTracking"),J(t,e,n),(T||r&&1==r.async)&&q(t,e,n),0!=T&&(m(t),N(e),A(n),H(t))},preTrack:function(t,n){return T||C?new Promise(function(){var i=e(c.mark((function e(i,o){var a,s;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=n.blockchain,e.t1=l,e.next=4,h.transactionCount({blockchain:n.blockchain,address:l});case 4:if(e.t2=e.sent.toString(),e.t3=t.toString(),e.t4=n.fromToken.address,e.t5=n.fromAmount.toString(),e.t6=n.fromDecimals,e.t7=n.toToken.address,e.t8=n.toAmount.toString(),e.t9=n.toDecimals,e.t10=null==n||null===(a=n.feeAmount)||void 0===a?void 0:a.toString(),s={blockchain:e.t0,sender:e.t1,nonce:e.t2,after_block:e.t3,from_token:e.t4,from_amount:e.t5,from_decimals:e.t6,to_token:e.t7,to_amount:e.t8,to_decimals:e.t9,fee_amount:e.t10},!r.endpoint){e.next=18;break}return e.abrupt("return",fetch(r.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then((function(t){return 200==t.status||201==t.status?i():o("PRETRACKING REQUEST FAILED")})));case 18:r.method?r.method(s).then(i).catch(o):o("No tracking defined!");case 19:case"end":return e.stop()}}),e)})));return function(t,e){return i.apply(this,arguments)}}()):Promise.resolve()},trackingInitialized:k,continueTryTracking:function(){G(p,_,x,1)},release:z,forwardTo:B,confirmationsRequired:y,confirmationsPassed:v}},t.children)},A1=function(t){var e=d(Z.useState(),2),n=e[0],r=e[1],i=d(Z.useState(),2),o=i[0],a=i[1],s=d(Z.useState(!1),2),u=s[0],c=s[1];Z.useContext(mq).errorCallback;var l=Z.useContext(Wq).recover;Z.useEffect((function(){if(u){var t=function(){fetch("https://public.depay.com/transactions/".concat(n.blockchain,"/").concat(n.from,"/").concat(n.nonce)).then((function(t){200==t.status&&t.json().then((function(t){"pending"!=t.status&&(a({id:t.external_id,status:t.status}),c(!1))}))}))},e=setInterval(t,5e3);return t(),function(){clearInterval(e)}}}),[u]);var h=function t(e,n,r){var i;r>3?console.log("TRANSACTION TRACKING FAILED AFTER 3 ATTEMPTS!"):fetch("https://public.depay.com/transactions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id,after_block:n.toString(),blockchain:e.blockchain,sender:e.from,nonce:null==e||null===(i=e.nonce)||void 0===i?void 0:i.toString()})}).then((function(i){200==i.status||201==i.status?console.log("TRANSACTION TRACKING INITIALIZED"):(console.log("TRANSACTION TRACKING FAILED",i),setTimeout((function(){t(e,n,r+1)}),3e3))})).catch((function(i){console.log("TRANSACTION TRACKING FAILED",i),setTimeout((function(){t(e,n,r+1)}),3e3)}))},f=function t(e){var n=new WebSocket("wss://integrate.depay.com/cable");n.onopen=function(t){var r,i={command:"subscribe",identifier:JSON.stringify({blockchain:e.blockchain,sender:e.from,nonce:null==e||null===(r=e.nonce)||void 0===r?void 0:r.toString(),channel:"TransactionChannel"})};n.send(JSON.stringify(i))},n.onclose=function(n){n&&1e3==n.code||t(e)},n.onmessage=function(t){var e=JSON.parse(t.data);"ping"!==e.type&&e.message&&e.message.status&&"pending"!=e.message.status&&(a(e.message),n.close(1e3))},n.onerror=function(t){console.log("WebSocket Error: "+t)}},p=function(t,e){r(t),null==l&&h(t,e,1),f(t),c(!0)};return Z.useEffect((function(){l&&p({blockchain:l.blockchain,id:l.transaction,from:l.sender,nonce:l.nonce},l.afterBlock)}),[l]),Z.createElement(z$.Provider,{value:{initializeTracking:p,foundTransaction:o}},t.children)},I1=function(t){var n=Z.useContext(Wq),r=n.recover,i=n.wallet;Z.useContext(mq).setError;var o=d(Z.useState(i),2),a=o[0],s=o[1],u=d(Z.useState(),2),l=u[0],h=u[1],f=d(Z.useState(i?"connected":void 0),2),p=f[0],m=f[1];return Z.useEffect((function(){e(c.mark((function t(){var e;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!i){t.next=5;break}return t.next=3,i.account();case 3:(e=t.sent)?h(e):(s(),m());case 5:case"end":return t.stop()}}),t)})))()}),[]),"connected"==p||null!=r?Z.createElement(Jq.Provider,{value:{account:l,wallet:a,disconnect:function(){h(),s(),m()}}},t.children):Z.createElement(cq,{document:t.document,container:t.container,resolve:function(e){var n=e.account,r=e.wallet;h(n),s(r),setTimeout((function(){m("connected"),t.connected&&t.connected(n)}),200)}})},k1=function(){var t=e(c.mark((function t(e){var n;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.accept)instanceof Array&&0!=n.length){t.next=3;break}throw"You need to set the tokens you accept as donation!";case 3:n.forEach((function(t){if(void 0===t.blockchain)throw"You need to set the blockchain you want to receive the donation on!";if(!["ethereum","bsc","polygon"].includes(t.blockchain))throw"You need to set a supported blockchain!";if(void 0===t.token)throw"You need to set the token you want to receive as donation!";if(void 0===t.receiver)throw"You need to set the receiver address that you want to receive the donation!"}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),j1=function(){var t=e(c.mark((function t(e){var n,r,i,o,a,s,u,l,h,d,f,p,m,g,y,b,w,v,M,L,_,N,E,S,x,A;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.amount,r=e.accept,i=e.event,o=e.sent,a=e.succeeded,s=e.validated,u=e.failed,l=e.error,h=e.critical,d=e.style,f=e.whitelist,p=e.blacklist,m=e.providers,g=e.currency,y=e.connected,b=e.closed,w=e.track,v=e.fee,M=e.closable,L=e.integration,_=e.link,N=e.container,E=e.title,S=e.wallet,x=e.document,Bq(),t.prev=2,t.next=5,k1({accept:r});case 5:return A=Rq({style:d,container:N,document:lq(x),closed:b},(function(t){return function(e){return Z.createElement(vq,{errorCallback:l,container:e,unmount:t},Z.createElement(A$,{configuration:{type:"donation",amount:n,accept:r,currency:g,event:i,track:w,fee:v,sent:o,succeeded:a,validated:s,failed:u,blacklist:p,whitelist:f,providers:m,integration:L,link:_,title:E,wallet:S}},Z.createElement(Yq,null,Z.createElement(J,{unmount:t,closable:M},Z.createElement(I1,{container:e,connected:y,unmount:t},Z.createElement(S1,null,Z.createElement(I$,null,Z.createElement(E$,{accept:r},Z.createElement(A1,null,Z.createElement(x1,{document:lq(x)},Z.createElement(a1,{container:e,document:x},Z.createElement(E1,{document:x,container:e}),Z.createElement(YZ,null))))))))))))}})),t.abrupt("return",{unmount:A});case 9:t.prev=9,t.t0=t.catch(2),console.log("critical error",t.t0),null!=h&&h(t.t0);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}(),T1=function(t){var e=Z.useContext(Wq).text;return Z.createElement(dh,{closable:!1,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Payment")),body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomS"},Z.createElement("div",{className:"SkeletonWrapper"},Z.createElement("div",{className:"ButtonPrimary Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))),Z.createElement("div",{className:"TextCenter Opacity05 PaddingTopS"},Z.createElement("strong",null,e)))})},C1=function(t){var e=Z.useContext(V),n=e.open,r=e.close,i=Z.useContext(j$).setNavigator;return Z.createElement(hh,{setNavigator:i,open:n,close:r,start:"Loading",container:t.container,document:t.document,dialogs:{Loading:Z.createElement(T1,null)}})},D1=function(){var t=e(c.mark((function t(e){var n,r,i,o,a,s,u;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.text,r=e.style,i=e.error,o=e.critical,a=e.container,e.before,s=e.document,Bq(),t.prev=2,u=Rq({style:r,container:a,document:lq(s),closed:closed},(function(t){return function(e){return Z.createElement(vq,{errorCallback:i,container:e,unmount:t},Z.createElement(A$,{configuration:{text:n}},Z.createElement(Yq,null,Z.createElement(J,{unmount:t,closable:!1},Z.createElement(S1,null,Z.createElement(C1,{document:s,container:e}),Z.createElement(YZ,null))))))}})),window._depayUnmountLoading=u,t.abrupt("return",{unmount:u});case 8:t.prev=8,t.t0=t.catch(2),console.log("critical error",t.t0),null!=o&&o(t.t0);case 12:case"end":return t.stop()}}),t,null,[[2,8]])})));return function(e){return t.apply(this,arguments)}}(),O1=function(t){var e=Z.useContext(mq).setError,n=Z.useContext(Wq),r=n.message,i=n.endpoint,o=Z.useContext(Wq).recoverSignature,a=Z.useContext(Jq),s=a.wallet,u=a.account;if(!s)return null;null==s||!s.name||s.name;var c=null!=s&&s.logo?s.logo:void 0;"function"!=typeof o&&(o=function(t){var n=t.message,r=t.signature;return new Promise((function(t,o){fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:n,signature:r})}).then((function(n){200==n.status?n.text().then((function(e){t(e)})).catch(e):n.text().then((function(t){e(t||"Recovering login signature failed!")}))}))}))});return Z.createElement(dh,{body:Z.createElement("div",{className:"TextCenter"},c&&Z.createElement("div",{className:"GraphicWrapper PaddingTopS PaddingBottomS"},Z.createElement("img",{className:"Graphic",src:c})),Z.createElement("h1",{className:"LineHeightL Text FontSizeL FontWeightBold PaddingTopS"},"Wallet Login"),Z.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("p",{className:"FontSizeM PaddingLeftM PaddingRightM PaddingBottomS"},'Please click "Log in" and sign the message with your connected wallet.'))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:"ButtonPrimary",onClick:function(){var n;n="function"==typeof r?r(u):r,s.sign(n).then((function(r){o({message:n,signature:r}).then((function(e){t.resolve({account:e,wallet:s})})).catch(e)})).catch((function(t){t&&t.code&&4001==t.code||e(t)}))}},"Log in"))})},z1=function(t){var e=Z.useContext(V),n=e.open,r=e.close;return Z.createElement(hh,{open:n,close:r,start:"SignLogin",container:t.container,document:t.document,dialogs:{SignLogin:Z.createElement(O1,{resolve:t.resolve,userClosedDialog:t.userClosedDialog})}})},P1=["all","xcd","eur","bbd","btn","bnd","xaf","cup","usd","fkp","gip","huf","irr","jmd","aud","lak","lyd","mkd","xof","nzd","omr","pgk","rwf","wst","rsd","sek","tzs","amd","bsd","bam","cve","cny","crc","czk","ern","gel","htg","inr","jod","krw","lbp","mwk","mru","mzn","ang","pen","qar","std","sll","sos","sdg","syp","aoa","awg","bhd","bzd","bwp","bif","kyd","cop","dkk","gtq","hnl","idr","ils","kzt","kwd","lsl","myr","mur","mnt","mmk","ngn","pab","php","ron","sar","sgd","zar","srd","twd","top","vef","dzd","ars","azn","bob","bgn","cad","clp","cdf","dop","fjd","gmd","gyd","isk","iqd","jpy","kpw","chf","mga","mdl","mad","npr","nio","pkr","pyg","shp","scr","sbd","lkr","thb","try","aed","vuv","yer","afn","bdt","brl","khr","kmf","hrk","djf","egp","etb","xpf","ghs","gnf","hkd","xdr","kes","kgs","lrd","mop","mvr","mxn","nad","nok","pln","rub","szl","tjs","ttd","ugx","uyu","vnd","tnd","uah","uzs","tmt","gbp","zmw","byn","bmd","ggp","clf","cuc","imp","jep","svc","xag","zwl"],R1=Z.createContext(),B1=function(t){var e=Z.useContext(Fq),n=e.amountsMissing,r=e.acceptWithAmount,i=e.setMaxRoute,o=d(Z.useState(),2),a=o[0],s=o[1];return Z.useEffect((function(){n?r&&s(r):s(t.accept)}),[n,r]),Z.createElement(R1.Provider,{value:{}},Z.createElement(r1,{accept:a,whitelist:t.whitelist,blacklist:t.blacklist,event:t.event,setMaxRoute:i,fee:t.fee},t.children))},U1=function(t){var e=Z.useContext(Fq),n=e.amountsMissing,r=e.fixedAmount,i=Z.useContext(D$),o=i.slowRouting,a=i.selectedRoute;return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Payment")),alternativeHeaderAction:t.alternativeHeaderAction,body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},n&&!r&&Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"})),Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))),footer:Z.createElement("div",{className:["PaddingTopXS PaddingRightM PaddingLeftM",null==a&&o?"PaddingBottomS":"PaddingBottomM"].join(" ")},Z.createElement("div",{className:"SkeletonWrapper"},Z.createElement("div",{className:"ButtonPrimary Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))),null==a&&o&&Z.createElement("div",{className:"TextCenter Opacity05 PaddingTopS"},Z.createElement("strong",null,"Loading payment options...")))})},Y1=function(t){var e=Z.useContext(Wq),n=e.currencyCode,r=e.recover,i=e.amount,o=e.currency,a=Z.useContext(C$),s=a.payment,u=a.paymentState,c=Z.useContext(Fq),l=c.amount,h=c.amountsMissing,f=c.fixedAmount,p=c.fixedCurrency,m=Z.useContext(Jq).disconnect,g=Z.useContext(i1),y=g.paymentValue,b=g.displayedPaymentValue,w=Z.useContext(uh).navigate,v=d(Z.useState(!1),2),M=v[0],L=v[1],_=null!=i&&i.token?null:n,N=Z.createElement("span",{className:"DropDownWrapper"},Z.createElement("button",{type:"button",onClick:function(){return L(!M)},className:"ButtonCircular",title:"Disconnect connected wallet"},Z.createElement(ZZ,null)),M&&Z.createElement(GZ,{hide:function(){return L(!1)},items:[{label:"Disconnect wallet",action:m}]}));if(null==s||null==r&&null==y)return Z.createElement(U1,{alternativeHeaderAction:N});var E=Ch.findByName(s.blockchain);return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Payment")),alternativeHeaderAction:N,body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},h&&!f&&Z.createElement("div",{className:["Card","initialized"==u?"":"disabled"].join(" "),title:"initialized"==u?"Change amount":void 0,onClick:function(){"initialized"==u&&w("ChangeAmount")}},Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("h4",{className:"CardTitle"},"Amount"),Z.createElement("h2",{className:"CardText"},_&&Z.createElement("div",{className:"TokenAmountRow"},new x$({amount:l.toFixed(2),code:n}).toString()),!_&&Z.createElement("div",{className:"TokenAmountRow"},l)))),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null))),Z.createElement("div",{className:["Card","initialized"==u?"":"disabled"].join(" "),title:"initialized"==u?"Change payment":void 0,onClick:function(){"initialized"==u&&w("ChangePayment")}},Z.createElement("div",{className:"CardImage",title:s.name},Z.createElement(h1,{blockchain:s.blockchain,address:s.token}),Z.createElement("img",{className:"BlockchainLogo small",src:E.logo,alt:E.label,title:E.label})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},h&&!p&&Z.createElement("h4",{className:"CardTitle"},"Payment"),Z.createElement("h2",{className:"CardText"},Z.createElement("div",{className:"TokenAmountRow"},Z.createElement("span",{className:"TokenSymbolCell"},s.symbol),Z.createElement("span",null," "),Z.createElement("span",{className:"TokenAmountCell"},s1(s.amount))),b!="".concat(s.symbol," ").concat(s1(s.amount))&&!(h&&!p)&&!1!==o&&Z.createElement("div",{className:"TokenAmountRow small grey"},Z.createElement("span",{className:"TokenAmountCell"},b))))),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null)))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement(M1,null))})},F1=function(){Z.useContext(C$).transaction;var t=Z.useContext(uh).navigate;return Z.createElement(dh,{stacked:!1,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:Z.createElement("div",{className:"TextCenter"},Z.createElement("div",{className:"GraphicWrapper"},Z.createElement("img",{className:"Graphic",src:gq})),Z.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Tracking payment failed"),Z.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("strong",{className:"FontSizeM"},'Please ensure you are connected to the internet, then click "Try again".'),Z.createElement("div",{className:"PaddingTopS"},Z.createElement("span",null,"If this keeps happening, please report it.")))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:"ButtonPrimary",onClick:function(){t("back")}},"Try again"))})},W1=function(){var t=Z.useContext(O$).continueTryTracking;Z.useContext(C$).transaction;var e=Z.useContext(uh).navigate;return Z.createElement(dh,{stacked:!1,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:Z.createElement("div",{className:"TextCenter"},Z.createElement("div",{className:"GraphicWrapper"},Z.createElement("img",{className:"Graphic",src:gq})),Z.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Tracking payment failed"),Z.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},Z.createElement("strong",{className:"FontSizeM"},'Please ensure you are connected to the internet, then click "Try again".'),Z.createElement("div",{className:"PaddingTopS"},Z.createElement("span",null,"If this keeps happening, please report it.")))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:"ButtonPrimary",onClick:function(){t(),e("back")}},"Try again"))})},Q1=function(t){var e=Z.useContext(V),n=e.open,r=e.close,i=Z.useContext(j$).setNavigator;return Z.createElement(hh,{setNavigator:i,open:n,close:r,start:"PaymentOverview",container:t.container,document:t.document,dialogs:{PaymentOverview:Z.createElement(Y1,null),ChangeAmount:Z.createElement(d1,null),ChangePayment:Z.createElement(p1,null),PaymentFailed:Z.createElement(_1,null),WrongNetwork:Z.createElement(N1,null),TrackingFailed:Z.createElement(W1,null),PreTrackingFailed:Z.createElement(F1,null)}})},H1=function(){var t=e(c.mark((function t(e){var n;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.accept,!e.recover){t.next=3;break}return t.abrupt("return");case 3:n.forEach((function(t){if(void 0===t.blockchain)throw"You need to set the blockchain your want to receive the payment on!";if(!["ethereum","bsc","polygon"].includes(t.blockchain))throw"You need to set a supported blockchain!";if(void 0===t.token&&void 0===t.fromToken&&void 0===t.fromAmount&&void 0===t.toToken)throw"You need to set the token you want to receive as payment!";if(void 0===t.token&&void 0!==t.fromToken&&void 0===t.fromAmount&&void 0===t.toToken)throw"You need to set the fromToken, fromAmount and toToken!";if(void 0===t.receiver)throw"You need to set the receiver address that you want to receive the payment!"}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),G1=function(){var t=e(c.mark((function t(e){var n,r,i,o,a,s,u,l,h,d,f,p,m,g,y,b,w,v,M,L,_,N,E,S,x,A;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.accept,r=e.amount,i=e.sent,o=e.succeeded,a=e.validated,s=e.failed,u=e.error,l=e.critical,h=e.style,d=e.whitelist,f=e.blacklist,p=e.providers,m=e.currency,g=e.connected,y=e.closed,b=e.track,w=e.fee,v=e.recover,M=e.closable,L=e.integration,_=e.link,N=e.container,E=e.before,S=e.wallet,x=e.document,Bq(),m&&!P1.includes(m.toLowerCase())&&(m=!1),t.prev=3,t.next=6,H1({accept:n,recover:v});case 6:return"function"==typeof window._depayUnmountLoading&&window._depayUnmountLoading(),A=Rq({style:h,container:N,document:lq(x),closed:y},(function(t){return function(e){return Z.createElement(vq,{errorCallback:u,container:e,unmount:t},Z.createElement(A$,{configuration:{type:"payment",before:E,amount:r,accept:n,currency:m,event:event,sent:i,succeeded:o,validated:a,failed:s,whitelist:d,blacklist:f,providers:p,track:b,fee:w,recover:v,integration:L,link:_,wallet:S}},Z.createElement(Yq,null,Z.createElement(J,{unmount:t,closable:M},Z.createElement(I1,{document:x,container:e,connected:g,unmount:t},Z.createElement(S1,null,Z.createElement(I$,null,Z.createElement(E$,{accept:n},Z.createElement(B1,{accept:n,whitelist:d,blacklist:f,event:event,fee:w},Z.createElement(A1,null,Z.createElement(x1,{document:lq(x)},Z.createElement(P$,{container:e,document:x},Z.createElement(o1,null,Z.createElement(Q1,{document:x,container:e}),Z.createElement(YZ,null))))))))))))))}})),t.abrupt("return",{unmount:A});case 11:t.prev=11,t.t0=t.catch(3),console.log("critical error",t.t0),null!=l&&l(t.t0);case 15:case"end":return t.stop()}}),t,null,[[3,11]])})));return function(e){return t.apply(this,arguments)}}();G1.preload=function(t){var e=t.account,n=t.accept,r=t.whitelist,i=t.blacklist;t.event;var o=t.fee;t1({account:e,accept:n,whitelist:r,blacklist:i,fee:o})};var Z1=Z.createContext(),V1=Z.createContext(),q1=function(t){var e=Z.useContext(C$).payment,n=d(Z.useState(),2),r=n[0],i=n[1],o=d(Z.useState(),2),a=o[0],s=o[1];return Z.useEffect((function(){e&&Promise.all([e.route.toToken.symbol(),e.route.toToken.readable(e.route.toAmount)]).then((function(t){var n=d(t,2),r=n[0],o=n[1];i({address:e.route.toToken.address,symbol:r}),s(o)}))}),[e]),Z.createElement(V1.Provider,{value:{toToken:r,toTokenReadableAmount:a}},t.children)},J1=function(t){var e=Z.useContext(Fq),n=e.acceptWithAmount,r=e.setMaxRoute,i=Z.useContext(Wq).sell,o=Z.useContext(Wq).blacklist;for(var a in null==o&&(o={}),i){var s=i[a];o[a]instanceof Array?o[a].push(s):o[a]=[s]}return Z.createElement(Z1.Provider,{value:{}},Z.createElement(r1,{accept:n,blacklist:o,setMaxRoute:r},Z.createElement(P$,{container:t.container,document:t.document},Z.createElement(o1,null,Z.createElement(q1,null,t.children)))))},K1=function(t){return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Purchase")),body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},Z.createElement("div",{className:"Card Skeleton",style:{height:"100px"}},Z.createElement("div",{className:"SkeletonBackground"})),Z.createElement("div",{className:"Card Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("div",{className:"SkeletonWrapper"},Z.createElement("div",{className:"ButtonPrimary Skeleton"},Z.createElement("div",{className:"SkeletonBackground"}))))})},X1=function(t){Z.useContext(Fq).amount;var e,n=Z.useContext(Wq),r=n.tokenImage,i=n.amount,o=Z.useContext(i1).paymentValue,a=Z.useContext(C$),s=a.payment,u=a.paymentState,c=Z.useContext(uh).navigate,l=Z.useContext(V1),h=l.toToken,f=l.toTokenReadableAmount,p=d(Z.useState(),2),m=p[0],g=p[1];if(Z.useEffect((function(){if(o&&(null==i||1!=i.token)&&f){var t=o.amount/parseFloat(f),e=new x$({amount:t,code:o.code}).toString();e!=new x$({amount:0,code:o.code}).toString()&&g(e)}}),[o,f]),null==h||null==f||null==s||null==o)return Z.createElement(K1,null);e=r?Z.createElement("img",{src:r}):Z.createElement(h1,{blockchain:s.route.blockchain,address:h.address});var y=Ch.findByName(s.blockchain);return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Purchase")),body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},Z.createElement("div",{className:["Card","initialized"==u?"":"disabled"].join(" "),title:"initialized"==u?"Change amount":void 0,onClick:function(){"initialized"==u&&c("ChangeAmount")}},Z.createElement("div",{className:"CardImage",title:s.name},e,Z.createElement("img",{className:"BlockchainLogo small",src:y.logo,alt:y.label,title:y.label})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("h4",{className:"CardTitle"},"Amount"),Z.createElement("h2",{className:"CardText"},Z.createElement("div",{className:"TokenAmountRow"},Z.createElement("span",{className:"TokenSymbolCell"},h.symbol),Z.createElement("span",null," "),Z.createElement("span",{className:"TokenAmountCell"},s1(f)))),m&&Z.createElement("h3",{className:"CardText small"},Z.createElement("small",null,m," per token")))),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null))),Z.createElement("div",{className:["Card","initialized"==u?"":"disabled"].join(" "),title:"initialized"==u?"Change payment":void 0,onClick:function(){"initialized"==u&&c("ChangePayment")}},Z.createElement("div",{className:"CardImage",title:s.name},Z.createElement(h1,{blockchain:s.route.blockchain,address:s.token})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardBodyWrapper"},Z.createElement("h4",{className:"CardTitle"},"Payment"),Z.createElement("h2",{className:"CardText"},Z.createElement("div",{className:"TokenAmountRow"},Z.createElement("span",{className:"TokenSymbolCell"},s.symbol),Z.createElement("span",null," "),Z.createElement("span",{className:"TokenAmountCell"},s1(s.amount)))))),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null)))),footer:Z.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement(M1,null))})},$1=function(t){var e=Z.useContext(V),n=e.open,r=e.close,i=Z.useContext(j$).setNavigator;return Z.createElement(hh,{setNavigator:i,open:n,close:r,start:"SaleOverview",container:t.container,document:t.document,dialogs:{SaleOverview:Z.createElement(X1,null),ChangeAmount:Z.createElement(d1,null),ChangePayment:Z.createElement(p1,null),NoPaymentMethodFound:Z.createElement(T$,null),PaymentFailed:Z.createElement(_1,null),WrongNetwork:Z.createElement(N1,null)}})},t2=function(){var t=e(c.mark((function t(e){var r;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("object"==n(r=e.sell)){t.next=3;break}throw'You need to configure at least 1 "blockchain": "token"';case 3:if(0!=Object.keys(r).length){t.next=5;break}throw'You need to configure at least 1 "blockchain": "token"';case 5:if(0!=Object.values(r).length){t.next=7;break}throw'You need to configure at least 1 "blockchain": "token"';case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e2=function(){var t=e(c.mark((function t(e){var n,r,i,o,a,s,u,l,h,d,f,p,m,g,y,b,w,v,M,L;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.amount,r=e.sell,i=e.sent,o=e.succeeded,a=e.failed,s=e.error,u=e.critical,l=e.style,h=e.blacklist,d=e.providers,f=e.currency,p=e.connected,m=e.closed,g=e.tokenImage,y=e.closable,b=e.integration,w=e.wallet,v=e.document,Bq(),t.prev=2,t.next=5,t2({sell:r});case 5:return M=Object.keys(r).map((function(t){return{blockchain:t,token:r[t]}})),L=Rq({style:l,document:lq(v),closed:m},(function(t){return function(e){return Z.createElement(vq,{errorCallback:s,container:e,unmount:t},Z.createElement(A$,{configuration:{type:"sale",tokenImage:g,amount:n,sell:r,currency:f,sent:i,succeeded:o,failed:a,blacklist:h,providers:d,integration:b,wallet:w}},Z.createElement(Yq,null,Z.createElement(J,{unmount:t,closable:y},Z.createElement(I1,{container:e,connected:p,unmount:t},Z.createElement(S1,null,Z.createElement(I$,null,Z.createElement(E$,{accept:M},Z.createElement(A1,null,Z.createElement(x1,{document:lq(v)},Z.createElement(J1,{container:e,document:v},Z.createElement($1,{document:v,container:e}),Z.createElement(YZ,null))))))))))))}})),t.abrupt("return",{unmount:L});case 10:t.prev=10,t.t0=t.catch(2),console.log("critical error",t.t0),null!=u&&u(t.t0);case 14:case"end":return t.stop()}}),t,null,[[2,10]])})));return function(e){return t.apply(this,arguments)}}();function n2(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(void 0===t)return t;var n="";return n+=t.slice(0,e+2),n+="...",n+=t.slice(t.length-e,t.length)}var r2=function(t){var e,n,r,i,o;return o=Math.floor(t/1e3),i=Math.floor(o/60),o%=60,r=Math.floor(i/60),i%=60,n=Math.floor(r/24),r%=24,e=Math.floor(n/30),n%=30,{year:Math.floor(e/12),month:e%=12,day:n,hour:r,minute:i,second:o}};function i2(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o2(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i2(Object(n),!0).forEach((function(e){HZ(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i2(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var a2=function(t){var e,n,r=Z.useContext(FZ),i=r.selection;r.setSelection;var o,a,s=Z.useContext(V).setOpen,u=Z.useContext(uh).navigate;i.nft.createdAt&&(o=[(o=r2(new Date-new Date(i.nft.createdAt))).year&&o.year>=1?o.year>=2?"".concat(o.year," years"):"1 year":void 0,o.month&&o.month>=1?o.month>=2?"".concat(o.month," months"):"1 month":void 0,o.day&&o.day>=1&&o.month<=1&&o.year<1?o.day>=2?"".concat(o.day," days !!!"):"1 day !!!":void 0].filter((function(t){return t})).join(" ")),i.nft.holders&&(a=i.nft.holders>1e6?"Millions":i.nft.holders>1e5?"Hundreds of Thousands":i.nft.holders>2e3?"Thousands":i.nft.holders>100?"Hundreds":"Only a Few!!!");var c=(null===(e=i.nft)||void 0===e?void 0:e.blockchain)||(null===(n=i.blockchain)||void 0===n?void 0:n.name);if(null==c)return u("SelectBlockchain"),null;return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("div",null,Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Confirm Selection"))),stacked:!0,body:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("div",{className:"TokenImage medium TextCenter"},i.nft.image&&Z.createElement("img",{src:i.nft.image})),Z.createElement("div",{className:"PaddingTopS TextCenter"},Z.createElement("div",{className:"Alert FontSizeS"},Z.createElement("strong",null,"Please review this information"))),Z.createElement("div",{className:"PaddingTopXS"},Z.createElement("table",{className:"Table TextLeft FontSizeS"},Z.createElement("tbody",null,Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Address")),Z.createElement("td",null,Z.createElement("div",null,Z.createElement("a",{className:"Link",title:i.nft.address,href:Ch.findByName(c).explorerUrlFor({token:i.nft.address}),target:"_blank",rel:"noopener noreferrer"},n2(i.nft.address,6))))),i.nft.id&&Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Token ID")),Z.createElement("td",null,Z.createElement("div",null,i.nft.id))),Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Blockchain")),Z.createElement("td",null,Z.createElement("div",null,Ch.findByName(c).label))),Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Name")),Z.createElement("td",null,Z.createElement("a",{className:"Link",href:i.nft.link,target:"_blank",rel:"noopener noreferrer"},i.nft.name))),o&&Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Age")),Z.createElement("td",null,Z.createElement("div",null,o))),a&&Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Holders")),Z.createElement("td",null,Z.createElement("div",null,a))))))),footer:Z.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomS"},Z.createElement("button",{className:"ButtonPrimary",onClick:function(){s(!1),t.resolve(o2(o2({},i.nft),{},{blockchain:c})),setTimeout(t.unmount,300)}},"Confirm"))})},s2="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4w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LjI0NjUuMDgyMi41MDg1LjEwMjcuNzc1Ni4wODIyLjg1MjguMDQxMSAxLjcwNTUtLjE0MzggMi41NjM0LS4wNzcxLjM2NDgtLjE3OTguNzA4OS0uMzAzMSAxLjA3MzctLjEyMzMuMzQ5My0uMjQ2Ni43MTQtLjQwNTggMS4wNTgyLS4zMDgyLjcxNC0uNjczIDEuNDI4MS0xLjEwNDUgMi4wOTU5LS4xMzg3LjI0NjYtLjMwMzEuNTA4Ni0uNDY3NS43NTUyLS4xNzk4LjI2MTktLjM2NDcuNTA4NS0uNTI5MS43NS0uMjI2LjMwODItLjQ2NzQuNjMxOC0uNzE0LjkxOTUtLjIyMDkuMzAzMS0uNDQ2OS42MDYyLS42OTM1Ljg3MzMtLjM0NDIuNDA1OC0uNjczLjc5MTEtMS4wMTcyIDEuMTYxLS4yMDU0LjI0MTQtLjQyNjMuNDg4LS42NTI0LjcwODktLjIyMDguMjQ2NS0uNDQ2OS40Njc0LS42NTI0LjY3MjktLjM0NDEuMzQ0Mi0uNjMxOC42MTEzLS44NzMzLjgzMjJsLS41NjUuNTE4OWMtLjA4MjIuMDcxOS0uMTkwMS4xMTMtLjMwMzEuMTEzaC00LjM3Njh2NS42MTQ4aDUuNTA2OWMxLjIzMjkgMCAyLjQwNDItLjQzNjcgMy4zNDk0LTEuMjM4MS4zMjM2LS4yODI1IDEuNzM2My0xLjUwNTEgMy40MDU4LTMuMzQ5My4wNTY1LS4wNjE3LjEyODUtLjEwNzkuMjEwNy0uMTI4NGwxNS4yMTA3LTQuMzk3M2MuMjgyNi0uMDgyMi41NzAyLjEzMzUuNTcwMi40MzE1eiIvPgogIDwvZz4KPC9zdmc+",u2=function(t){var n,r,i,o,a,s,u=Z.useContext(uh).navigate,l=Z.useContext(FZ),h=l.selection,f=l.setSelection,p=d(Z.useState(""),2),m=p[0],g=p[1],y=d(Z.useState(""),2),b=y[0],w=y[1],v=d(Z.useState(""),2),M=v[0],L=v[1],_=d(Z.useState(""),2),N=_[0],E=_[1],S=d(Z.useState(!1),2),x=S[0],A=S[1];return Z.useEffect((function(){var t,n,r=(null==h||null===(t=h.blockchain)||void 0===t?void 0:t.name)||(null==h?void 0:h.blockchain)||(null==h||null===(n=h.collection)||void 0===n?void 0:n.blockchain),i=function(){var t=e(c.mark((function t(){var e;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r){t.next=10;break}return t.prev=1,t.next=4,RG({blockchain:r,address:h.nft.address,method:"balanceOf",api:aX[r][1155],params:["0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02","1"]});case 4:e=t.sent,t.next=9;break;case 7:t.prev=7,t.t0=t.catch(1);case 9:e&&A(!0);case 10:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(){return t.apply(this,arguments)}}();i()}),[h.blockchain]),Z.createElement(dh,{stacked:!0,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("div",null,Z.createElement("div",{className:"LineHeightL FontSizeL PaddingTopXS"},Z.createElement("span",{className:"CardImage small"},Z.createElement("img",{className:"transparent",src:s2}))))),body:Z.createElement("div",{className:"PaddingLeftM PaddingRightM"},Z.createElement("div",null,Z.createElement("div",{className:"PaddingTopXS TextLeft"},Z.createElement("label",{htmlFor:"DePayWidgetsEnterNFTBlockchain"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Select Blockchain"))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS"},Z.createElement("div",{className:"Card small",onClick:function(){return u("SelectBlockchain")}},Z.createElement("div",{className:"CardImage small"},Z.createElement("img",{className:"transparent",src:null===(n=Ch.findByName((null==h||null===(r=h.blockchain)||void 0===r?void 0:r.name)||(null==h?void 0:h.blockchain)||(null==h||null===(i=h.collection)||void 0===i?void 0:i.blockchain)))||void 0===n?void 0:n.logo})),Z.createElement("div",{className:"CardBody FontSizeM"},null===(o=Ch.findByName((null==h||null===(a=h.blockchain)||void 0===a?void 0:a.name)||(null==h?void 0:h.blockchain)||(null==h||null===(s=h.collection)||void 0===s?void 0:s.blockchain)))||void 0===o?void 0:o.label),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null))))),x&&Z.createElement("div",null,Z.createElement("div",{className:"PaddingTopXS TextLeft"},Z.createElement("label",{htmlFor:"DePayWidgetsEnterNFTTokenId"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Enter Token ID"))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},Z.createElement("input",{id:"DePayWidgetsEnterNFTTokenId",name:"DePayWidgetsEnterNFTTokenId",value:m,onChange:function(t){return g(t.target.value)},className:"Search"}))),Z.createElement("div",null,Z.createElement("div",{className:"PaddingTopXS TextLeft"},Z.createElement("label",{htmlFor:"DePayWidgetsEnterNFTName"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Enter NFT Name"))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},Z.createElement("input",{id:"DePayWidgetsEnterNFTName",name:"DePayWidgetsEnterNFTName",value:N,onChange:function(t){return E(t.target.value)},placeholder:"CryptoPunks",className:"Search"}))),Z.createElement("div",null,Z.createElement("div",{className:"PaddingTopXS TextLeft"},Z.createElement("label",{htmlFor:"DePayWidgetsEnterNFTImage"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Enter Image URL"))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},Z.createElement("input",{id:"DePayWidgetsEnterNFTImage",name:"DePayWidgetsEnterNFTImage",value:b,onChange:function(t){return w(t.target.value)},placeholder:"https://i.seadn.io/gae/BdxvLseXcfl57BiuQcQYdJ64v-aI8din7WPk0Pgo3qQFhAUH-B6i-dCqqc_mCkRIzULmwzwecnohLhrcH8A9mpWIZqA7ygc52Sr81hE?auto=format&w=128",className:"Search"}))),Z.createElement("div",null,Z.createElement("div",{className:"PaddingTopXS TextLeft"},Z.createElement("label",{htmlFor:"DePayWidgetsEnterNFTLink"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Enter Link URL"))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},Z.createElement("input",{id:"DePayWidgetsEnterNFTLink",name:"DePayWidgetsEnterNFTLink",value:M,onChange:function(t){return L(t.target.value)},placeholder:"https://opensea.io/collection/cryptopunks",className:"Search"})))),footer:Z.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomM"},Z.createElement("button",{className:["ButtonPrimary",b.length&&M.length&&N.length&&(!x||m.length)?"":"disabled"].join(" "),onClick:function(){b.length&&M.length&&N.length&&(!x||m.length)&&function(){var e,n,r=(null==h||null===(e=h.blockchain)||void 0===e?void 0:e.name)||(null==h?void 0:h.blockchain)||(null==h||null===(n=h.collection)||void 0===n?void 0:n.blockchain);f(Object.assign(t.selection,{nft:{blockchain:r,id:m,image:b,name:N,link:M,address:h.nft.address,type:x?"1155":"721"}})),u("ConfirmNFTSelection")}()}},"Continue"))})},c2={ethereum:"ethereum",matic:"polygon,"},l2=function(t){var n,r=Z.useContext(uh).navigate,i=d(Z.useState(""),2),o=i[0],a=i[1],s=d(Z.useState(!1),2),u=s[0],l=s[1],h=d(Z.useState([]),2),f=h[0],p=h[1],m=Z.useContext(FZ).setSelection,g=function(e){m(Object.assign(t.selection,{nft:e})),r("ConfirmNFTSelection")},y=function(t){return new Promise((function(e,n){fetch("https://api.opensea.io/api/v1/assets?asset_contract_address=".concat(t)).then((function(t){if(200!=t.status)return e();t.json().then((function(t){return e(t.assets?t.assets[0]:void 0)})).catch((function(){return e()}))})).catch((function(){return e()}))}))},b=Z.useCallback(Kq.debounce((function(n){fetch("https://api.opensea.io/api/v1/asset_contract/".concat(n)).then((function(i){200==i.status?i.json().then(function(){var i=e(c.mark((function e(i){var o,s,u,h,d,f,b,w,v,M;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("non-fungible"!=i.asset_contract_type){e.next=8;break}return e.next=3,y(n);case 3:(h=e.sent)&&(s=null!=h&&h.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?c2[h.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0,u=null==h||null===(d=h.collection)||void 0===d||null===(f=d.stats)||void 0===f?void 0:f.num_owners),o={blockchain:s,holders:u,createdAt:i.created_date,image:i.image_url,name:i.collection?i.collection.name:void 0,link:i.collection?"https://opensea.io/collection/".concat(i.collection.slug):void 0,address:Mp(i.address),type:"721"},e.next=22;break;case 8:if("semi-fungible"!=i.asset_contract_type){e.next=21;break}if("OPENSTORE"!=i.symbol||"OpenSea Collection"!=i.name){e.next=13;break}o={id:null,address:Mp(i.address),type:"1155"},e.next=19;break;case 13:return e.next=15,y(n);case 15:v=e.sent,M=null!=v&&v.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?c2[v.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0,null==v||null===(b=v.collection)||void 0===b||null===(w=b.stats)||void 0===w||w.num_owners,o={blockchain:M,id:null,createdAt:i.created_date,image:i.image_url,name:i.collection?i.collection.name:void 0,link:i.collection?"https://opensea.io/collection/".concat(i.collection.slug):void 0,address:Mp(i.address),type:"1155"};case 19:e.next=22;break;case 21:i.address&&(o={address:Mp(i.address)});case 22:o&&(null==o.type?(m(Object.assign(t.selection,{nft:o,blockchain:o.blockchain||"polygon"})),r("EnterNFTDataForOpenSea"),a("")):null!==o.id?(g(o),p([o]),r("ConfirmNFTSelection")):(m(Object.assign(t.selection,{nft:o})),r("SelectNFTIdOnOpenSea"),a(""))),l(!1);case 24:case"end":return e.stop()}}),e)})));return function(t){return i.apply(this,arguments)}}()).catch((function(){l(!1)})):l(!1)})).catch((function(){l(!1)}))}),500),[]);return n=u?[Z.createElement("div",{className:"SkeletonWrapper",key:"loading"},Z.createElement("div",{className:"Skeleton",style:{height:"69px",width:"100%"}},Z.createElement("div",{className:"SkeletonBackground"})))]:f.map((function(t,e){return Z.createElement("div",{key:e,className:"Card Row",onClick:function(){return g(t)}},Z.createElement("div",{className:"CardImage"},Z.createElement("img",{src:t.image})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardTokenFullName",title:t.name},Z.createElement("span",{className:"CardText"},t.name))))})),Z.createElement(dh,{stacked:!0,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("div",null,Z.createElement("div",{className:"LineHeightL FontSizeL PaddingTopXS"},Z.createElement("span",{className:"CardImage small"},Z.createElement("img",{className:"transparent",src:s2})))),Z.createElement("div",{className:"PaddingTopS PaddingBottomXS TextLeft"},Z.createElement("label",{htmlFor:"DePayWidgetsEnterContractAddress"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Enter contract address"))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},Z.createElement("input",{id:"DePayWidgetsEnterContractAddress",name:"DePayWidgetsEnterContractAddress",value:o,onChange:function(t){l(!0),p([]);var e=t.target.value;a(e),e&&e.length?b(e):l(!1)},className:"Search",autoFocus:!0,placeholder:"0x495f947276749ce646f68ac8c248420045cb7b5e"}))),bodyClassName:"ScrollHeight",body:Z.createElement("div",null,n)})};function h2(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d2(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h2(Object(n),!0).forEach((function(e){HZ(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h2(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var f2={ethereum:"ethereum",matic:"polygon,"},p2=function(t){var n,r=Z.useContext(uh).navigate,i=d(Z.useState(""),2),o=i[0],a=i[1],s=d(Z.useState(!1),2),u=s[0],l=s[1],h=d(Z.useState([]),2),f=h[0],p=h[1],m=Z.useContext(FZ),g=m.selection,y=m.setSelection,b=function(e){y(Object.assign(t.selection,{nft:e})),r("ConfirmNFTSelection")},w=Z.useCallback(Kq.debounce((function(t){fetch("https://api.opensea.io/api/v1/asset/".concat(g.nft.address,"/").concat(t)).then((function(t){if(200!=t.status)return resolve();t.json().then(function(){var t=e(c.mark((function t(e){var n,r;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=null!=e&&e.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?f2[e.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0,r=d2(d2({},g.nft),{},{blockchain:n,id:e.token_id,image:e.image_url,name:e.name,link:e.permalink}),p([r]),b(r),l(!1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(){l(!1)}))})).catch((function(){l(!1)}))}),500),[]);return Z.useEffect((function(){fetch("https://api.opensea.io/api/v1/assets?asset_contract_address=".concat(g.nft.address)).then((function(t){if(200!=t.status)return resolve();t.json().then((function(t){if(t.assets.length<=6){var e=t.assets.map((function(t){var e=null!=t&&t.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?f2[t.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0;return d2(d2({},g.nft),{},{blockchain:e,id:t.token_id,image:t.image_url,name:t.name,link:t.permalink})}));p(e),1==e.length&&b(e[0])}}))}))}),[]),n=u?[Z.createElement("div",{className:"SkeletonWrapper",key:"loading"},Z.createElement("div",{className:"Skeleton",style:{height:"69px",width:"100%"}},Z.createElement("div",{className:"SkeletonBackground"})))]:f.map((function(t,e){return Z.createElement("div",{key:e,className:"Card Row",onClick:function(){return b(t)}},Z.createElement("div",{className:"CardImage"},Z.createElement("img",{src:t.image})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardTokenFullName",title:t.name},Z.createElement("span",{className:"CardText"},t.name))))})),Z.createElement(dh,{stacked:!0,header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("div",null,Z.createElement("div",{className:"LineHeightL FontSizeL PaddingTopXS"},Z.createElement("span",{className:"CardImage small"},Z.createElement("img",{className:"transparent",src:s2})))),Z.createElement("div",{className:"PaddingTopS PaddingBottomXS TextLeft"},Z.createElement("label",{htmlFor:"DePayWidgetsEnterCollectionId"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Enter Token ID"))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},Z.createElement("input",{id:"DePayWidgetsEnterCollectionId",name:"DePayWidgetsEnterCollectionId",value:o,onChange:function(t){l(!0),p([]);var e=t.target.value;a(e),e&&e.length?w(e):l(!1)},className:"Search",placeholder:"35347623114821255323888368639026081793120226253597860997754787918389704654849"}))),bodyClassName:"ScrollHeight",body:Z.createElement("div",null,n)})},m2=function(t){var e=Z.useContext(uh).navigate,n=[{name:"OpenSea",navigate:"SelectNFTContractOnOpenSea",logo:s2}].map((function(t,n){return Z.createElement("div",{key:n,className:"Card Row",onClick:function(){return function(t){e(t.navigate)}(t)}},Z.createElement("div",{className:"CardImage"},Z.createElement("img",{src:t.logo})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardTokenSymbol",title:t.name},Z.createElement("span",{className:"CardText"},t.name)),Z.createElement("div",{className:"CardTokenName PaddingTopXS"},Z.createElement(m1,null))))}));return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("div",null,Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Select NFT")),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS"},Z.createElement("span",{className:"FontSizeM Opacity05"},"Choose which marketplace"))),bodyClassName:"ScrollHeight",body:Z.createElement("div",{className:""},n)})},g2=function(t){Z.useContext(Wq).what;var e=Z.useContext(V),n=e.open,r=e.close,i=Z.useContext(FZ),o=i.selection;i.setSelection;var a=d(Z.useState(),2);a[0];var s,u=a[1];return s="SelectMarketplace",Z.createElement(hh,{open:n,close:r,start:s,container:t.container,document:t.document,setNavigator:function(t){u(t)},dialogs:{SelectMarketplace:Z.createElement(m2,{selection:o,resolve:t.resolve,unmount:t.unmount}),SelectNFTContractOnOpenSea:Z.createElement(l2,{selection:o,resolve:t.resolve,unmount:t.unmount}),SelectNFTIdOnOpenSea:Z.createElement(p2,{selection:o,resolve:t.resolve,unmount:t.unmount}),EnterNFTDataForOpenSea:Z.createElement(u2,{selection:o,resolve:t.resolve,unmount:t.unmount}),SelectBlockchain:Z.createElement(WZ,{selection:o,stacked:!0,resolve:t.resolve,unmount:t.unmount}),ConfirmNFTSelection:Z.createElement(a2,{selection:o,resolve:t.resolve,unmount:t.unmount})}})},y2=function(t){var e=Z.useContext(FZ).selection,n=Z.useContext(V).setOpen,r=e.token,i=r.address||r.external_id,o=r.logo||r.image,a=Ch.findByName(r.blockchain),s=r.first_transfer?r2(new Date-new Date(r.first_transfer)):void 0;s&&(s=[s.year&&s.year>=1?s.year>=2?"".concat(s.year," years"):"1 year":void 0,s.month&&s.month>=1?s.month>=2?"".concat(s.month," months"):"1 month":void 0,s.day&&s.day>=1&&s.month<=1&&s.year<1?s.day>=2?"".concat(s.day," days !!!"):"1 day !!!":void 0].filter((function(t){return t})).join(" "));var u=r.unique_senders?r.unique_senders:void 0;u&&(u=u>1e6?"Millions":u>1e5?"Hundreds of Thousands":u>2e3?"Thousands":u>100?"Hundreds":"Only a Few!!!");return Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("div",null,Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Confirm Selection"))),stacked:!0,body:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},Z.createElement("div",{className:"TokenImage medium TextCenter"},o&&Z.createElement("img",{src:o}),!o&&Z.createElement(h1,{blockchain:r.blockchain,address:i})),Z.createElement("div",{className:"PaddingTopS TextCenter"},Z.createElement("div",{className:"Alert FontSizeS"},Z.createElement("strong",null,"Please review this information"))),Z.createElement("div",{className:"PaddingTopXS"},Z.createElement("table",{className:"Table TextLeft FontSizeS"},Z.createElement("tbody",null,Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Address")),Z.createElement("td",null,Z.createElement("div",null,Z.createElement("a",{className:"Link",title:i,href:a.explorerUrlFor({token:i}),target:"_blank",rel:"noopener noreferrer"},n2(i,8))))),Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Blockchain")),Z.createElement("td",null,Z.createElement("div",null,a.label))),Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Symbol")),Z.createElement("td",null,Z.createElement("div",null,r.symbol))),Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Name")),Z.createElement("td",null,Z.createElement("div",null,r.name))),s&&Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Age")),Z.createElement("td",null,Z.createElement("div",null,s))),u&&Z.createElement("tr",null,Z.createElement("td",null,Z.createElement("div",{className:"TableSubTitle"},"Holders")),Z.createElement("td",null,Z.createElement("div",null,u))))))),footer:Z.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomS"},Z.createElement("button",{className:"ButtonPrimary",onClick:function(){n(!1),t.resolve({blockchain:r.blockchain,address:r.external_id||r.address,symbol:r.symbol,name:r.name,decimals:r.decimals,logo:r.image||r.logo,routable:r.routable}),setTimeout(t.unmount,300)}},"Confirm"))})},b2=function(t){var e=Z.useContext(uh).navigate,n=Z.useContext(V).setOpen,r=Z.useContext(FZ).setSelection,i=d(Z.useState(!1),2),o=i[0],a=i[1],s=d(Z.useState(""),2),u=s[0],c=s[1],l=d(Z.useState(),2),h=l[0],f=l[1],p=d(Z.useState(!1),2),m=p[0],g=p[1],y=d(Z.useState([]),2),b=y[0],w=y[1],v=d(Z.useState(),2);v[0],v[1];var M=Z.useRef(),L=RZ()[0],_=function(e){var n=Ch.findByName(e);f(n),r(Object.assign(t.selection,{blockchain:n,token:void 0})),w(n.tokens)};Z.useEffect((function(){L?L.connectedTo().then((function(t){var e=Ch.findByName(t);window._depay_token_selection_selected_blockchain?_(window._depay_token_selection_selected_blockchain):t&&t.length&&e&&e.tokens&&e.tokens.length?_(t):_("ethereum")})).catch((function(){return _("ethereum")})):_("ethereum")}),[]),Z.useEffect((function(){t.selection.blockchain&&(f(t.selection.blockchain),w(t.selection.blockchain.tokens),M.current&&(M.current.value="",M.current.focus()))}),[t.selection,t.selection.blockchain]);var N,E=Z.useCallback(Kq.debounce((function(t,e){fetch("https://public.depay.com/tokens/search?blockchain=".concat(e,"&term=").concat(t)).then((function(t){200==t.status?t.json().then((function(t){w(t),a(!1)})).catch((function(){return reject})):reject()})).catch((function(){return reject}))}),500),[]);return N=o?[Z.createElement("div",{className:"SkeletonWrapper",key:"loading"},Z.createElement("div",{className:"Skeleton",style:{height:"69px",width:"100%"}},Z.createElement("div",{className:"SkeletonBackground"})))]:b.map((function(i,o){return Z.createElement("div",{key:"".concat(o,"-").concat(i.address),className:"Card Row",onClick:function(){return function(i){i.address&&(i.address=Mp(i.address)),i.external_id&&(i.external_id=Mp(i.external_id)),h.tokens.find((function(t){return t.address==(i.address||i.external_id)}))?(n(!1),t.resolve({blockchain:h.name,address:i.address||i.external_id,logo:i.logo||i.image,name:i.name,symbol:i.symbol,decimals:i.decimals,routable:!0}),setTimeout(t.unmount,300)):(r(Object.assign(t.selection,{token:i})),e("ConfirmTokenSelection"))}(i)}},Z.createElement("div",{className:"CardImage"},i.logo&&Z.createElement("img",{src:i.logo}),i.image&&Z.createElement("img",{src:i.image}),!(i.logo||i.image)&&Z.createElement(h1,{blockchain:i.blockchain,address:i.external_id||i.address})),Z.createElement("div",{className:"CardBody"},Z.createElement("div",{className:"CardTokenSymbol",title:i.symbol},Z.createElement("span",{className:"CardText"},i.symbol)),Z.createElement("div",{className:"CardTokenName",title:i.name},Z.createElement("span",{className:"CardText"},i.name))))})),null==h?null:Z.createElement(dh,{header:Z.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},Z.createElement("div",null,Z.createElement("h1",{className:"LineHeightL FontSizeL"},"Select Token")),Z.createElement("div",{className:"PaddingTopS PaddingBottomXS"},Z.createElement("div",{className:"Card small",onClick:function(){e("SelectBlockchain")}},Z.createElement("div",{className:"CardImage small"},Z.createElement("img",{className:"transparent",src:h.logo})),Z.createElement("div",{className:"CardBody FontSizeM"},h.label),Z.createElement("div",{className:"CardAction"},Z.createElement(m1,null)))),Z.createElement("div",{className:"PaddingTopXS PaddingBottomS"},Z.createElement("input",{value:u,onBlur:function(){return g(!1)},onChange:function(t){g(!1),a(!0);var e=t.target.value;if(c(e),e.match(/^0x/)){var n;w([]);try{n=new aX({blockchain:h.name,address:e})}catch(t){}if(null==n)return void a(!1);Promise.all([n.name(),n.symbol(),n.decimals(),fetch("https://public.depay.com/tokens/routable/".concat(h.name,"/").concat(e)).then((function(t){if(200==t.status)return t.json()}))]).then((function(t){var n=d(t,4),r=n[0],i=n[1],o=n[2],s=n[3];w([{name:r,symbol:i,decimals:o,address:e,blockchain:h.name,routable:!!s}]),a(!1)}))}else e&&e.length?(w([]),E(e,h.name)):(w(h.tokens),a(!1))},className:"Search",autoFocus:!0,placeholder:"Search name or paste address",ref:M}),m&&Z.createElement("div",{className:"PaddingTopXS PaddingRightXS PaddingLeftXS"},Z.createElement("div",{className:"Tooltip"},Z.createElement("span",{className:"TooltipArrowUp"}),"Enter token address here")))),bodyClassName:"ScrollHeight",body:Z.createElement("div",{className:""},N),footer:Z.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomS"},Z.createElement("div",{className:"PaddingTopXS PaddingBottomXS"},Z.createElement("div",{className:"Link FontSizeS",onClick:function(){g(!0),M.current&&(M.current.value="",M.current.focus())}},"Token missing? Add it.")))})},w2=function(t){Z.useContext(Wq).what;var e,n=Z.useContext(V),r=n.open,i=n.close,o=Z.useContext(FZ).selection;return e="SelectToken",Z.createElement(hh,{open:r,close:i,start:e,container:t.container,document:t.document,dialogs:{SelectToken:Z.createElement(b2,{selection:o,resolve:t.resolve,unmount:t.unmount}),SelectBlockchain:Z.createElement(WZ,{selection:o,resolve:t.resolve}),ConfirmTokenSelection:Z.createElement(y2,{selection:o,resolve:t.resolve,unmount:t.unmount})}})},v2={Connect:function(t){var r,i,o;return Bq(),"object"==n(t)&&(r=t.style,i=t.error,o=t.document),new Promise(function(){var t=e(c.mark((function t(e,n){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Rq({style:r,document:lq(o)},(function(t){var r=function(){n("USER_CLOSED_DIALOG"),t()};return function(a){return Z.createElement(vq,{errorCallback:i,container:a,unmount:t},Z.createElement(Yq,null,Z.createElement(J,{unmount:r},Z.createElement(Uq,null,Z.createElement(cq,{document:o,container:a,resolve:e,reject:n,autoClose:!0}),Z.createElement(YZ,null)))))}}));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())},Donation:j1,Login:function(t){var r,i,o,a,s,u,l;return Bq(),"object"==n(t)&&(r=t.style,i=t.error,o=t.document,a=t.message,s=t.endpoint,u=t.recover,l=t.wallet),new Promise(function(){var t=e(c.mark((function t(e,n){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Rq({style:r,document:lq(o)},(function(t){var r=function(){n("USER_CLOSED_DIALOG"),t()};return function(n){return Z.createElement(vq,{errorCallback:i,container:n,unmount:t},Z.createElement(A$,{configuration:{message:a,endpoint:s||"/login",recoverSignature:u,wallet:l}},Z.createElement(Yq,null,Z.createElement(J,{unmount:r},Z.createElement(I1,{container:n,unmount:t},Z.createElement(z1,{document:o,container:n,resolve:function(n){var r=n.account,i=n.wallet;t(),e({account:r,wallet:i})}}),Z.createElement(YZ,null))))))}}));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())},Payment:G1,Sale:e2,Select:function(t){var r,i,o,a,s;return Bq(),"object"==n(t)&&(r=t.style,i=t.error,o=t.document,a=t.what),null==a?s='"what" needs to be configured!':["token","nft"].indexOf(a)<0&&(s='Unknown "what" configured: '.concat(a,"!")),new Promise(function(){var t=e(c.mark((function t(e,n){return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Rq({style:r,document:lq(o)},(function(t){var r=function(){n("USER_CLOSED_DIALOG"),t()};return function(n){return Z.createElement(vq,{error:s,errorCallback:i,container:n,unmount:t},Z.createElement(A$,{configuration:{what:a}},Z.createElement(Yq,null,Z.createElement(J,{unmount:r},Z.createElement(Uq,null,"token"==a&&Z.createElement(w2,{document:o,container:n,unmount:t,resolve:e}),"nft"==a&&Z.createElement(g2,{document:o,container:n,unmount:t,resolve:e})),Z.createElement(YZ,null)))))}}));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())},Loading:D1};export{v2 as default};
|