intract.id Open in urlscan Pro
172.67.180.171  Public Scan

URL: https://intract.id/scripts/wallet-connect-v4.js
Submission: On October 25 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

!async function(){var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,n=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,a=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,r)=>{for(var i in r)t(e,i,{get:r[i],enumerable:!0})},l=(e,n,a,s)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let c of i(n))!o.call(e,c)&&c!==a&&t(e,c,{get:()=>n[c],enumerable:!(s=r(n,c))||s.enumerable});return e},u=(e,t,r)=>(l(e,t,"default"),r&&l(r,t,"default")),d=(r,i,o)=>(o=null!=r?e(n(r)):{},l(!i&&r&&r.__esModule?o:t(o,"default",{value:r,enumerable:!0}),r)),h=e=>l(t({},"__esModule",{value:!0}),e),p=s(((e,t)=>{"use strict";var r,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(e,t){return new Promise((function(r,i){function n(r){e.removeListener(t,o),i(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",n),r([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&m(e,"error",t,r)}(e,n,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,r,i){var n,o,a;if(c(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),(n=l(e))>0&&a.length>n&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,function(e){console&&console.warn&&console.warn(e)}(s)}return e}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 h(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=d.bind(i);return n.listener=r,i.wrapFn=n,n}function p(e,t,r){var i=e._events;if(void 0===i)return[];var n=i[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(n):g(n,n.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function g(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function m(e,t,r,i){if("function"==typeof e.on)i.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function n(o){i.once&&e.removeEventListener(t,n),r(o)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),a.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},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,u=g(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},a.prototype.addListener=function(e,t){return u(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return u(this,e,t,!0)},a.prototype.once=function(e,t){return c(t),this.on(e,h(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,h(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,i,n,o,a;if(c(t),void 0===(i=this._events))return this;if(void 0===(r=i[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(n=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,n=o;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,n),1===r.length&&(i[e]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",e,a||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var n,o=Object.keys(r);for(i=0;i<o.length;++i)"removeListener"!==(n=o[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},a.prototype.listenerCount=f,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}})),f=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(e,t){var r=65535&e,i=65535&t;return r*i+((e>>>16&65535)*i+r*(t>>>16&65535)<<16>>>0)|0},e.add=function(e,t){return e+t|0},e.sub=function(e,t){return e-t|0},e.rotl=function(e,t){return e<<t|e>>>32-t},e.rotr=function(e,t){return e<<32-t|e>>>t},e.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}})),g=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=f();function r(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}function i(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}function n(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function o(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function a(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function s(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function c(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}function l(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}function u(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),c(e/4294967296>>>0,t,r),c(e>>>0,t,r+4),t}function d(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),l(e>>>0,t,r),l(e/4294967296>>>0,t,r+4),t}e.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},e.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},e.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},e.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},e.writeUint16BE=r,e.writeInt16BE=r,e.writeUint16LE=i,e.writeInt16LE=i,e.readInt32BE=n,e.readUint32BE=o,e.readInt32LE=a,e.readUint32LE=s,e.writeUint32BE=c,e.writeInt32BE=c,e.writeUint32LE=l,e.writeInt32LE=l,e.readInt64BE=function(e,t){void 0===t&&(t=0);var r=n(e,t),i=n(e,t+4);return 4294967296*r+i-4294967296*(i>>31)},e.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*o(e,t)+o(e,t+4)},e.readInt64LE=function(e,t){void 0===t&&(t=0);var r=a(e,t);return 4294967296*a(e,t+4)+r-4294967296*(r>>31)},e.readUint64LE=function(e,t){void 0===t&&(t=0);var r=s(e,t);return 4294967296*s(e,t+4)+r},e.writeUint64BE=u,e.writeInt64BE=u,e.writeUint64LE=d,e.writeInt64LE=d,e.readUintBE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var i=0,n=1,o=e/8+r-1;o>=r;o--)i+=t[o]*n,n*=256;return i},e.readUintLE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var i=0,n=1,o=r;o<r+e/8;o++)i+=t[o]*n,n*=256;return i},e.writeUintBE=function(e,r,i,n){if(void 0===i&&(i=new Uint8Array(e/8)),void 0===n&&(n=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!t.isSafeInteger(r))throw new Error("writeUintBE value must be an integer");for(var o=1,a=e/8+n-1;a>=n;a--)i[a]=r/o&255,o*=256;return i},e.writeUintLE=function(e,r,i,n){if(void 0===i&&(i=new Uint8Array(e/8)),void 0===n&&(n=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!t.isSafeInteger(r))throw new Error("writeUintLE value must be an integer");for(var o=1,a=n;a<n+e/8;a++)i[a]=r/o&255,o*=256;return i},e.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},e.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},e.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},e.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},e.writeFloat32BE=function(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e),t},e.writeFloat32LE=function(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e,!0),t},e.writeFloat64BE=function(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e),t},e.writeFloat64LE=function(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e,!0),t}})),m=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e}})),b=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=g(),r=m(),i=20;function n(e,r,n){for(var o=1634760805,a=857760878,s=2036477234,c=1797285236,l=n[3]<<24|n[2]<<16|n[1]<<8|n[0],u=n[7]<<24|n[6]<<16|n[5]<<8|n[4],d=n[11]<<24|n[10]<<16|n[9]<<8|n[8],h=n[15]<<24|n[14]<<16|n[13]<<8|n[12],p=n[19]<<24|n[18]<<16|n[17]<<8|n[16],f=n[23]<<24|n[22]<<16|n[21]<<8|n[20],g=n[27]<<24|n[26]<<16|n[25]<<8|n[24],m=n[31]<<24|n[30]<<16|n[29]<<8|n[28],b=r[3]<<24|r[2]<<16|r[1]<<8|r[0],y=r[7]<<24|r[6]<<16|r[5]<<8|r[4],w=r[11]<<24|r[10]<<16|r[9]<<8|r[8],v=r[15]<<24|r[14]<<16|r[13]<<8|r[12],_=o,x=a,E=s,C=c,k=l,P=u,I=d,S=h,A=p,T=f,O=g,R=m,N=b,M=y,$=w,j=v,L=0;L<i;L+=2)k=(k^=A=A+(N=(N^=_=_+k|0)>>>16|N<<16)|0)>>>20|k<<12,P=(P^=T=T+(M=(M^=x=x+P|0)>>>16|M<<16)|0)>>>20|P<<12,I=(I^=O=O+($=($^=E=E+I|0)>>>16|$<<16)|0)>>>20|I<<12,S=(S^=R=R+(j=(j^=C=C+S|0)>>>16|j<<16)|0)>>>20|S<<12,I=(I^=O=O+($=($^=E=E+I|0)>>>24|$<<8)|0)>>>25|I<<7,S=(S^=R=R+(j=(j^=C=C+S|0)>>>24|j<<8)|0)>>>25|S<<7,P=(P^=T=T+(M=(M^=x=x+P|0)>>>24|M<<8)|0)>>>25|P<<7,k=(k^=A=A+(N=(N^=_=_+k|0)>>>24|N<<8)|0)>>>25|k<<7,P=(P^=O=O+(j=(j^=_=_+P|0)>>>16|j<<16)|0)>>>20|P<<12,I=(I^=R=R+(N=(N^=x=x+I|0)>>>16|N<<16)|0)>>>20|I<<12,S=(S^=A=A+(M=(M^=E=E+S|0)>>>16|M<<16)|0)>>>20|S<<12,k=(k^=T=T+($=($^=C=C+k|0)>>>16|$<<16)|0)>>>20|k<<12,S=(S^=A=A+(M=(M^=E=E+S|0)>>>24|M<<8)|0)>>>25|S<<7,k=(k^=T=T+($=($^=C=C+k|0)>>>24|$<<8)|0)>>>25|k<<7,I=(I^=R=R+(N=(N^=x=x+I|0)>>>24|N<<8)|0)>>>25|I<<7,P=(P^=O=O+(j=(j^=_=_+P|0)>>>24|j<<8)|0)>>>25|P<<7;t.writeUint32LE(_+o|0,e,0),t.writeUint32LE(x+a|0,e,4),t.writeUint32LE(E+s|0,e,8),t.writeUint32LE(C+c|0,e,12),t.writeUint32LE(k+l|0,e,16),t.writeUint32LE(P+u|0,e,20),t.writeUint32LE(I+d|0,e,24),t.writeUint32LE(S+h|0,e,28),t.writeUint32LE(A+p|0,e,32),t.writeUint32LE(T+f|0,e,36),t.writeUint32LE(O+g|0,e,40),t.writeUint32LE(R+m|0,e,44),t.writeUint32LE(N+b|0,e,48),t.writeUint32LE(M+y|0,e,52),t.writeUint32LE($+w|0,e,56),t.writeUint32LE(j+v|0,e,60)}function o(e,t,i,o,s){if(void 0===s&&(s=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(o.length<i.length)throw new Error("ChaCha: destination is shorter than source");var c,l;if(0===s){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");l=(c=new Uint8Array(16)).length-t.length,c.set(t,l)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");c=t,l=s}for(var u=new Uint8Array(64),d=0;d<i.length;d+=64){n(u,c,e);for(var h=d;h<d+64&&h<i.length;h++)o[h]=i[h]^u[h-d];a(c,0,l)}return r.wipe(u),0===s&&r.wipe(c),o}function a(e,t,r){for(var i=1;r--;)i=i+(255&e[t])|0,e[t]=255&i,i>>>=8,t++;if(i>0)throw new Error("ChaCha: counter overflow")}e.streamXOR=o,e.stream=function(e,t,i,n){return void 0===n&&(n=0),r.wipe(i),o(e,t,i,i,n)}})),y=s((e=>{"use strict";function t(e,t){if(e.length!==t.length)return 0;for(var r=0,i=0;i<e.length;i++)r|=e[i]^t[i];return 1&r-1>>>8}Object.defineProperty(e,"__esModule",{value:!0}),e.select=function(e,t,r){return~(e-1)&t|e-1&r},e.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},e.compare=t,e.equal=function(e,r){return 0!==e.length&&0!==r.length&&0!==t(e,r)}})),w=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=y(),r=m();e.DIGEST_LENGTH=16;var i=function(){function t(t){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var r=t[0]|t[1]<<8;this._r[0]=8191&r;var i=t[2]|t[3]<<8;this._r[1]=8191&(r>>>13|i<<3);var n=t[4]|t[5]<<8;this._r[2]=7939&(i>>>10|n<<6);var o=t[6]|t[7]<<8;this._r[3]=8191&(n>>>7|o<<9);var a=t[8]|t[9]<<8;this._r[4]=255&(o>>>4|a<<12),this._r[5]=a>>>1&8190;var s=t[10]|t[11]<<8;this._r[6]=8191&(a>>>14|s<<2);var c=t[12]|t[13]<<8;this._r[7]=8065&(s>>>11|c<<5);var l=t[14]|t[15]<<8;this._r[8]=8191&(c>>>8|l<<8),this._r[9]=l>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return t.prototype._blocks=function(e,t,r){for(var i=this._fin?0:2048,n=this._h[0],o=this._h[1],a=this._h[2],s=this._h[3],c=this._h[4],l=this._h[5],u=this._h[6],d=this._h[7],h=this._h[8],p=this._h[9],f=this._r[0],g=this._r[1],m=this._r[2],b=this._r[3],y=this._r[4],w=this._r[5],v=this._r[6],_=this._r[7],x=this._r[8],E=this._r[9];r>=16;){var C=e[t+0]|e[t+1]<<8;n+=8191&C;var k=e[t+2]|e[t+3]<<8;o+=8191&(C>>>13|k<<3);var P=e[t+4]|e[t+5]<<8;a+=8191&(k>>>10|P<<6);var I=e[t+6]|e[t+7]<<8;s+=8191&(P>>>7|I<<9);var S=e[t+8]|e[t+9]<<8;c+=8191&(I>>>4|S<<12),l+=S>>>1&8191;var A=e[t+10]|e[t+11]<<8;u+=8191&(S>>>14|A<<2);var T=e[t+12]|e[t+13]<<8;d+=8191&(A>>>11|T<<5);var O=e[t+14]|e[t+15]<<8,R=0,N=R;N+=n*f,N+=o*(5*E),N+=a*(5*x),N+=s*(5*_),R=(N+=c*(5*v))>>>13,N&=8191,N+=l*(5*w),N+=u*(5*y),N+=d*(5*b),N+=(h+=8191&(T>>>8|O<<8))*(5*m);var M=R+=(N+=(p+=O>>>5|i)*(5*g))>>>13;M+=n*g,M+=o*f,M+=a*(5*E),M+=s*(5*x),R=(M+=c*(5*_))>>>13,M&=8191,M+=l*(5*v),M+=u*(5*w),M+=d*(5*y),M+=h*(5*b),R+=(M+=p*(5*m))>>>13,M&=8191;var $=R;$+=n*m,$+=o*g,$+=a*f,$+=s*(5*E),R=($+=c*(5*x))>>>13,$&=8191,$+=l*(5*_),$+=u*(5*v),$+=d*(5*w),$+=h*(5*y);var j=R+=($+=p*(5*b))>>>13;j+=n*b,j+=o*m,j+=a*g,j+=s*f,R=(j+=c*(5*E))>>>13,j&=8191,j+=l*(5*x),j+=u*(5*_),j+=d*(5*v),j+=h*(5*w);var L=R+=(j+=p*(5*y))>>>13;L+=n*y,L+=o*b,L+=a*m,L+=s*g,R=(L+=c*f)>>>13,L&=8191,L+=l*(5*E),L+=u*(5*x),L+=d*(5*_),L+=h*(5*v);var B=R+=(L+=p*(5*w))>>>13;B+=n*w,B+=o*y,B+=a*b,B+=s*m,R=(B+=c*g)>>>13,B&=8191,B+=l*f,B+=u*(5*E),B+=d*(5*x),B+=h*(5*_);var D=R+=(B+=p*(5*v))>>>13;D+=n*v,D+=o*w,D+=a*y,D+=s*b,R=(D+=c*m)>>>13,D&=8191,D+=l*g,D+=u*f,D+=d*(5*E),D+=h*(5*x);var U=R+=(D+=p*(5*_))>>>13;U+=n*_,U+=o*v,U+=a*w,U+=s*y,R=(U+=c*b)>>>13,U&=8191,U+=l*m,U+=u*g,U+=d*f,U+=h*(5*E);var F=R+=(U+=p*(5*x))>>>13;F+=n*x,F+=o*_,F+=a*v,F+=s*w,R=(F+=c*y)>>>13,F&=8191,F+=l*b,F+=u*m,F+=d*g,F+=h*f;var H=R+=(F+=p*(5*E))>>>13;H+=n*E,H+=o*x,H+=a*_,H+=s*v,R=(H+=c*w)>>>13,H&=8191,H+=l*y,H+=u*b,H+=d*m,H+=h*g,n=N=8191&(R=(R=((R+=(H+=p*f)>>>13)<<2)+R|0)+(N&=8191)|0),o=M+=R>>>=13,a=$&=8191,s=j&=8191,c=L&=8191,l=B&=8191,u=D&=8191,d=U&=8191,h=F&=8191,p=H&=8191,t+=16,r-=16}this._h[0]=n,this._h[1]=o,this._h[2]=a,this._h[3]=s,this._h[4]=c,this._h[5]=l,this._h[6]=u,this._h[7]=d,this._h[8]=h,this._h[9]=p},t.prototype.finish=function(e,t){void 0===t&&(t=0);var r,i,n,o,a=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(r=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=r,r=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*r,r=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=r,r=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=r,a[0]=this._h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this._h[o]+r,r=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,i=(1^r)-1,o=0;o<10;o++)a[o]&=i;for(i=~i,o=0;o<10;o++)this._h[o]=this._h[o]&i|a[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),n=this._h[0]+this._pad[0],this._h[0]=65535&n,o=1;o<8;o++)n=(this._h[o]+this._pad[o]|0)+(n>>>16)|0,this._h[o]=65535&n;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var t,r=0,i=e.length;if(this._leftover){(t=16-this._leftover)>i&&(t=i);for(var n=0;n<t;n++)this._buffer[this._leftover+n]=e[r+n];if(i-=t,r+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(i>=16&&(t=i-i%16,this._blocks(e,r,t),r+=t,i-=t),i){for(n=0;n<i;n++)this._buffer[this._leftover+n]=e[r+n];this._leftover+=i}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},t.prototype.clean=function(){return r.wipe(this._buffer),r.wipe(this._r),r.wipe(this._h),r.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();e.Poly1305=i,e.oneTimeAuth=function(e,t){var r=new i(e);r.update(t);var n=r.digest();return r.clean(),n},e.equal=function(r,i){return r.length===e.DIGEST_LENGTH&&i.length===e.DIGEST_LENGTH&&t.equal(r,i)}})),v=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=b(),r=w(),i=m(),n=g(),o=y();e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var a=new Uint8Array(16),s=function(){function s(t){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,t.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(t)}return s.prototype.seal=function(e,r,n,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var a=new Uint8Array(16);a.set(e,a.length-e.length);var s=new Uint8Array(32);t.stream(this._key,a,s,4);var c,l=r.length+this.tagLength;if(o){if(o.length!==l)throw new Error("ChaCha20Poly1305: incorrect destination length");c=o}else c=new Uint8Array(l);return t.streamXOR(this._key,a,r,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),s,c.subarray(0,c.length-this.tagLength),n),i.wipe(a),c},s.prototype.open=function(e,r,n,a){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(r.length<this.tagLength)return null;var s=new Uint8Array(16);s.set(e,s.length-e.length);var c=new Uint8Array(32);t.stream(this._key,s,c,4);var l=new Uint8Array(this.tagLength);if(this._authenticate(l,c,r.subarray(0,r.length-this.tagLength),n),!o.equal(l,r.subarray(r.length-this.tagLength,r.length)))return null;var u,d=r.length-this.tagLength;if(a){if(a.length!==d)throw new Error("ChaCha20Poly1305: incorrect destination length");u=a}else u=new Uint8Array(d);return t.streamXOR(this._key,s,r.subarray(0,r.length-this.tagLength),u,4),i.wipe(s),u},s.prototype.clean=function(){return i.wipe(this._key),this},s.prototype._authenticate=function(e,t,o,s){var c=new r.Poly1305(t);s&&(c.update(s),s.length%16>0&&c.update(a.subarray(s.length%16))),c.update(o),o.length%16>0&&c.update(a.subarray(o.length%16));var l=new Uint8Array(8);s&&n.writeUint64LE(s.length,l),c.update(l),n.writeUint64LE(o.length,l),c.update(l);for(var u=c.digest(),d=0;d<u.length;d++)e[d]=u[d];c.clean(),i.wipe(u),i.wipe(l)},s}();e.ChaCha20Poly1305=s})),_=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isSerializableHash=function(e){return typeof e.saveState<"u"&&typeof e.restoreState<"u"&&typeof e.cleanSavedState<"u"}})),x=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=_(),r=y(),i=m(),n=function(){function e(e,r){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);r.length>this.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var o=0;o<n.length;o++)n[o]^=54;this._inner.update(n);for(o=0;o<n.length;o++)n[o]^=106;this._outer.update(n),t.isSerializableHash(this._inner)&&t.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),i.wipe(n)}return e.prototype.reset=function(){if(!t.isSerializableHash(this._inner)||!t.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){t.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),t.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!t.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!t.isSerializableHash(this._inner)||!t.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!t.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();e.HMAC=n,e.hmac=function(e,t,r){var i=new n(e,t);i.update(r);var o=i.digest();return i.clean(),o},e.equal=r.equal})),E=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=x(),r=m(),i=function(){function e(e,r,i,n){void 0===i&&(i=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=n;var o=t.hmac(this._hash,i,r);this._hmac=new t.HMAC(e,o),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),r=0;r<t.length;r++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[r]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),r.wipe(this._buffer),r.wipe(this._counter),this._bufpos=0},e}();e.HKDF=i})),C=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserRandomSource=void 0;e.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;let e=typeof self<"u"?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");let t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}}})),k=s((()=>{})),P=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeRandomSource=void 0;var t=m();e.NodeRandomSource=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof require<"u"){let e=k();e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let r=this._crypto.randomBytes(e);if(r.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");let i=new Uint8Array(e);for(let e=0;e<i.length;e++)i[e]=r[e];return(0,t.wipe)(r),i}}})),I=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SystemRandomSource=void 0;var t=C(),r=P();e.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new t.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new r.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}})),S=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;var t=I(),r=g(),i=m();function n(t,r=e.defaultRandomSource){return r.randomBytes(t)}e.defaultRandomSource=new t.SystemRandomSource,e.randomBytes=n,e.randomUint32=function(t=e.defaultRandomSource){let o=n(4,t),a=(0,r.readUint32LE)(o);return(0,i.wipe)(o),a};var o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function a(t,r=o,a=e.defaultRandomSource){if(r.length<2)throw new Error("randomString charset is too short");if(r.length>256)throw new Error("randomString charset is too long");let s="",c=r.length,l=256-256%c;for(;t>0;){let e=n(Math.ceil(256*t/l),a);for(let i=0;i<e.length&&t>0;i++){let n=e[i];n<l&&(s+=r.charAt(n%c),t--)}(0,i.wipe)(e)}return s}e.randomString=a,e.randomStringForEntropy=function(t,r=o,i=e.defaultRandomSource){return a(Math.ceil(t/(Math.log(r.length)/Math.LN2)),r,i)}})),A=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=g(),r=m();e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var i=function(){function i(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return i.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},i.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},i.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._temp),this.reset()},i.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var r=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[r++],t--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(r=o(this._temp,this._state,e,r,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[r++],t--;return this},i.prototype.finish=function(e){if(!this._finished){var r=this._bytesHashed,i=this._bufferLength,n=r/536870912|0,a=r<<3,s=r%64<56?64:128;this._buffer[i]=128;for(var c=i+1;c<s-8;c++)this._buffer[c]=0;t.writeUint32BE(n,this._buffer,s-8),t.writeUint32BE(a,this._buffer,s-4),o(this._temp,this._state,this._buffer,0,s),this._finished=!0}for(c=0;c<this.digestLength/4;c++)t.writeUint32BE(this._state[c],e,4*c);return this},i.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},i.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},i.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},i.prototype.cleanSavedState=function(e){r.wipe(e.state),e.buffer&&r.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},i}();e.SHA256=i;var n=new Int32Array([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]);function o(e,r,i,o,a){for(;a>=64;){for(var s=r[0],c=r[1],l=r[2],u=r[3],d=r[4],h=r[5],p=r[6],f=r[7],g=0;g<16;g++){var m=o+4*g;e[g]=t.readUint32BE(i,m)}for(g=16;g<64;g++){var b=e[g-2],y=(b>>>17|b<<15)^(b>>>19|b<<13)^b>>>10,w=((b=e[g-15])>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;e[g]=(y+e[g-7]|0)+(w+e[g-16]|0)}for(g=0;g<64;g++){y=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&h^~d&p)|0)+(f+(n[g]+e[g]|0)|0)|0,w=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&c^s&l^c&l)|0;f=p,p=h,h=d,d=u+y|0,u=l,l=c,c=s,s=y+w|0}r[0]+=s,r[1]+=c,r[2]+=l,r[3]+=u,r[4]+=d,r[5]+=h,r[6]+=p,r[7]+=f,o+=64,a-=64}return o}e.hash=function(e){var t=new i;t.update(e);var r=t.digest();return t.clean(),r}})),T=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;var t=S(),r=m();function i(e){let t=new Float64Array(16);if(e)for(let r=0;r<e.length;r++)t[r]=e[r];return t}e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;var n=new Uint8Array(32);n[0]=9;var o=i([56129,1]);function a(e){let t=1;for(let r=0;r<16;r++){let i=e[r]+t+65535;t=Math.floor(i/65536),e[r]=i-65536*t}e[0]+=t-1+37*(t-1)}function s(e,t,r){let i=~(r-1);for(let r=0;r<16;r++){let n=i&(e[r]^t[r]);e[r]^=n,t[r]^=n}}function c(e,t,r){for(let i=0;i<16;i++)e[i]=t[i]+r[i]}function l(e,t,r){for(let i=0;i<16;i++)e[i]=t[i]-r[i]}function u(e,t,r){let i,n,o=0,a=0,s=0,c=0,l=0,u=0,d=0,h=0,p=0,f=0,g=0,m=0,b=0,y=0,w=0,v=0,_=0,x=0,E=0,C=0,k=0,P=0,I=0,S=0,A=0,T=0,O=0,R=0,N=0,M=0,$=0,j=r[0],L=r[1],B=r[2],D=r[3],U=r[4],F=r[5],H=r[6],z=r[7],q=r[8],W=r[9],V=r[10],G=r[11],Z=r[12],K=r[13],Y=r[14],J=r[15];i=t[0],o+=i*j,a+=i*L,s+=i*B,c+=i*D,l+=i*U,u+=i*F,d+=i*H,h+=i*z,p+=i*q,f+=i*W,g+=i*V,m+=i*G,b+=i*Z,y+=i*K,w+=i*Y,v+=i*J,i=t[1],a+=i*j,s+=i*L,c+=i*B,l+=i*D,u+=i*U,d+=i*F,h+=i*H,p+=i*z,f+=i*q,g+=i*W,m+=i*V,b+=i*G,y+=i*Z,w+=i*K,v+=i*Y,_+=i*J,i=t[2],s+=i*j,c+=i*L,l+=i*B,u+=i*D,d+=i*U,h+=i*F,p+=i*H,f+=i*z,g+=i*q,m+=i*W,b+=i*V,y+=i*G,w+=i*Z,v+=i*K,_+=i*Y,x+=i*J,i=t[3],c+=i*j,l+=i*L,u+=i*B,d+=i*D,h+=i*U,p+=i*F,f+=i*H,g+=i*z,m+=i*q,b+=i*W,y+=i*V,w+=i*G,v+=i*Z,_+=i*K,x+=i*Y,E+=i*J,i=t[4],l+=i*j,u+=i*L,d+=i*B,h+=i*D,p+=i*U,f+=i*F,g+=i*H,m+=i*z,b+=i*q,y+=i*W,w+=i*V,v+=i*G,_+=i*Z,x+=i*K,E+=i*Y,C+=i*J,i=t[5],u+=i*j,d+=i*L,h+=i*B,p+=i*D,f+=i*U,g+=i*F,m+=i*H,b+=i*z,y+=i*q,w+=i*W,v+=i*V,_+=i*G,x+=i*Z,E+=i*K,C+=i*Y,k+=i*J,i=t[6],d+=i*j,h+=i*L,p+=i*B,f+=i*D,g+=i*U,m+=i*F,b+=i*H,y+=i*z,w+=i*q,v+=i*W,_+=i*V,x+=i*G,E+=i*Z,C+=i*K,k+=i*Y,P+=i*J,i=t[7],h+=i*j,p+=i*L,f+=i*B,g+=i*D,m+=i*U,b+=i*F,y+=i*H,w+=i*z,v+=i*q,_+=i*W,x+=i*V,E+=i*G,C+=i*Z,k+=i*K,P+=i*Y,I+=i*J,i=t[8],p+=i*j,f+=i*L,g+=i*B,m+=i*D,b+=i*U,y+=i*F,w+=i*H,v+=i*z,_+=i*q,x+=i*W,E+=i*V,C+=i*G,k+=i*Z,P+=i*K,I+=i*Y,S+=i*J,i=t[9],f+=i*j,g+=i*L,m+=i*B,b+=i*D,y+=i*U,w+=i*F,v+=i*H,_+=i*z,x+=i*q,E+=i*W,C+=i*V,k+=i*G,P+=i*Z,I+=i*K,S+=i*Y,A+=i*J,i=t[10],g+=i*j,m+=i*L,b+=i*B,y+=i*D,w+=i*U,v+=i*F,_+=i*H,x+=i*z,E+=i*q,C+=i*W,k+=i*V,P+=i*G,I+=i*Z,S+=i*K,A+=i*Y,T+=i*J,i=t[11],m+=i*j,b+=i*L,y+=i*B,w+=i*D,v+=i*U,_+=i*F,x+=i*H,E+=i*z,C+=i*q,k+=i*W,P+=i*V,I+=i*G,S+=i*Z,A+=i*K,T+=i*Y,O+=i*J,i=t[12],b+=i*j,y+=i*L,w+=i*B,v+=i*D,_+=i*U,x+=i*F,E+=i*H,C+=i*z,k+=i*q,P+=i*W,I+=i*V,S+=i*G,A+=i*Z,T+=i*K,O+=i*Y,R+=i*J,i=t[13],y+=i*j,w+=i*L,v+=i*B,_+=i*D,x+=i*U,E+=i*F,C+=i*H,k+=i*z,P+=i*q,I+=i*W,S+=i*V,A+=i*G,T+=i*Z,O+=i*K,R+=i*Y,N+=i*J,i=t[14],w+=i*j,v+=i*L,_+=i*B,x+=i*D,E+=i*U,C+=i*F,k+=i*H,P+=i*z,I+=i*q,S+=i*W,A+=i*V,T+=i*G,O+=i*Z,R+=i*K,N+=i*Y,M+=i*J,i=t[15],v+=i*j,_+=i*L,x+=i*B,E+=i*D,C+=i*U,k+=i*F,P+=i*H,I+=i*z,S+=i*q,A+=i*W,T+=i*V,O+=i*G,R+=i*Z,N+=i*K,M+=i*Y,$+=i*J,o+=38*_,a+=38*x,s+=38*E,c+=38*C,l+=38*k,u+=38*P,d+=38*I,h+=38*S,p+=38*A,f+=38*T,g+=38*O,m+=38*R,b+=38*N,y+=38*M,w+=38*$,n=1,i=o+n+65535,n=Math.floor(i/65536),o=i-65536*n,i=a+n+65535,n=Math.floor(i/65536),a=i-65536*n,i=s+n+65535,n=Math.floor(i/65536),s=i-65536*n,i=c+n+65535,n=Math.floor(i/65536),c=i-65536*n,i=l+n+65535,n=Math.floor(i/65536),l=i-65536*n,i=u+n+65535,n=Math.floor(i/65536),u=i-65536*n,i=d+n+65535,n=Math.floor(i/65536),d=i-65536*n,i=h+n+65535,n=Math.floor(i/65536),h=i-65536*n,i=p+n+65535,n=Math.floor(i/65536),p=i-65536*n,i=f+n+65535,n=Math.floor(i/65536),f=i-65536*n,i=g+n+65535,n=Math.floor(i/65536),g=i-65536*n,i=m+n+65535,n=Math.floor(i/65536),m=i-65536*n,i=b+n+65535,n=Math.floor(i/65536),b=i-65536*n,i=y+n+65535,n=Math.floor(i/65536),y=i-65536*n,i=w+n+65535,n=Math.floor(i/65536),w=i-65536*n,i=v+n+65535,n=Math.floor(i/65536),v=i-65536*n,o+=n-1+37*(n-1),n=1,i=o+n+65535,n=Math.floor(i/65536),o=i-65536*n,i=a+n+65535,n=Math.floor(i/65536),a=i-65536*n,i=s+n+65535,n=Math.floor(i/65536),s=i-65536*n,i=c+n+65535,n=Math.floor(i/65536),c=i-65536*n,i=l+n+65535,n=Math.floor(i/65536),l=i-65536*n,i=u+n+65535,n=Math.floor(i/65536),u=i-65536*n,i=d+n+65535,n=Math.floor(i/65536),d=i-65536*n,i=h+n+65535,n=Math.floor(i/65536),h=i-65536*n,i=p+n+65535,n=Math.floor(i/65536),p=i-65536*n,i=f+n+65535,n=Math.floor(i/65536),f=i-65536*n,i=g+n+65535,n=Math.floor(i/65536),g=i-65536*n,i=m+n+65535,n=Math.floor(i/65536),m=i-65536*n,i=b+n+65535,n=Math.floor(i/65536),b=i-65536*n,i=y+n+65535,n=Math.floor(i/65536),y=i-65536*n,i=w+n+65535,n=Math.floor(i/65536),w=i-65536*n,i=v+n+65535,n=Math.floor(i/65536),v=i-65536*n,o+=n-1+37*(n-1),e[0]=o,e[1]=a,e[2]=s,e[3]=c,e[4]=l,e[5]=u,e[6]=d,e[7]=h,e[8]=p,e[9]=f,e[10]=g,e[11]=m,e[12]=b,e[13]=y,e[14]=w,e[15]=v}function d(e,t){u(e,t,t)}function h(e,t){let r=new Uint8Array(32),n=new Float64Array(80),h=i(),p=i(),f=i(),g=i(),m=i(),b=i();for(let t=0;t<31;t++)r[t]=e[t];r[31]=127&e[31]|64,r[0]&=248,function(e,t){for(let r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}(n,t);for(let e=0;e<16;e++)p[e]=n[e];h[0]=g[0]=1;for(let e=254;e>=0;--e){let t=r[e>>>3]>>>(7&e)&1;s(h,p,t),s(f,g,t),c(m,h,f),l(h,h,f),c(f,p,g),l(p,p,g),d(g,m),d(b,h),u(h,f,h),u(f,p,m),c(m,h,f),l(h,h,f),d(p,h),l(f,g,b),u(h,f,o),c(h,h,g),u(f,f,h),u(h,g,b),u(g,p,n),d(p,m),s(h,p,t),s(f,g,t)}for(let e=0;e<16;e++)n[e+16]=h[e],n[e+32]=f[e],n[e+48]=p[e],n[e+64]=g[e];let y=n.subarray(32),w=n.subarray(16);(function(e,t){let r=i();for(let e=0;e<16;e++)r[e]=t[e];for(let e=253;e>=0;e--)d(r,r),2!==e&&4!==e&&u(r,r,t);for(let t=0;t<16;t++)e[t]=r[t]})(y,y),u(w,w,y);let v=new Uint8Array(32);return function(e,t){let r=i(),n=i();for(let e=0;e<16;e++)n[e]=t[e];a(n),a(n),a(n);for(let e=0;e<2;e++){r[0]=n[0]-65517;for(let e=1;e<15;e++)r[e]=n[e]-65535-(r[e-1]>>16&1),r[e-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);let e=r[15]>>16&1;r[14]&=65535,s(n,r,1-e)}for(let t=0;t<16;t++)e[2*t]=255&n[t],e[2*t+1]=n[t]>>8}(v,w),v}function p(e){return h(e,n)}function f(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);let r=new Uint8Array(t);return{publicKey:p(r),secretKey:r}}e.scalarMult=h,e.scalarMultBase=p,e.generateKeyPairFromSeed=f,e.generateKeyPair=function(e){let i=(0,t.randomBytes)(32,e),n=f(i);return(0,r.wipe)(i),n},e.sharedKey=function(t,r,i=!1){if(t.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(r.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");let n=h(t,r);if(i){let e=0;for(let t=0;t<n.length;t++)e|=n[t];if(0===e)throw new Error("X25519: invalid shared key")}return n}})),O=a((()=>{}));function R(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}var N=a((()=>{}));function M(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?R(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}var $=a((()=>{N()}));function j(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));let r=M(t),i=0;for(let t of e)r.set(t,i),i+=t.length;return R(r)}var L=a((()=>{$(),N()})),B=a((()=>{}));function D(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),i=0;i<r.length;i++)r[i]=255;for(var n=0;n<e.length;n++){var o=e.charAt(n),a=o.charCodeAt(0);if(255!==r[a])throw new TypeError(o+" is ambiguous");r[a]=n}var s=e.length,c=e.charAt(0),l=Math.log(s)/Math.log(256),u=Math.log(256)/Math.log(s);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var i=0,n=0;e[t]===c;)i++,t++;for(var o=(e.length-t)*l+1>>>0,a=new Uint8Array(o);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var d=0,h=o-1;(0!==u||d<n)&&-1!==h;h--,d++)u+=s*a[h]>>>0,a[h]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");n=d,t++}if(" "!==e[t]){for(var p=o-n;p!==o&&0===a[p];)p++;for(var f=new Uint8Array(i+(o-p)),g=i;p!==o;)f[g++]=a[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,i=0,n=0,o=t.length;n!==o&&0===t[n];)n++,r++;for(var a=(o-n)*u+1>>>0,l=new Uint8Array(a);n!==o;){for(var d=t[n],h=0,p=a-1;(0!==d||h<i)&&-1!==p;p--,h++)d+=256*l[p]>>>0,l[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");i=h,n++}for(var f=a-i;f!==a&&0===l[f];)f++;for(var g=c.repeat(r);f<a;++f)g+=e.charAt(l[f]);return g},decodeUnsafe:d,decode:function(e){var r=d(e);if(r)return r;throw new Error(`Non-${t} character`)}}}var U,F,H,z,q,W,V,G,Z,K,Y,J,Q,X,ee,te=a((()=>{U=D})),re=a((()=>{new Uint8Array(0),F=(e,t)=>{if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0},H=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},z=e=>(new TextEncoder).encode(e),q=e=>(new TextDecoder).decode(e)})),ie=a((()=>{te(),re(),W=class{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},V=class{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return Z(this,e)}},G=class{constructor(e){this.decoders=e}or(e){return Z(this,e)}decode(e){let t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},Z=(e,t)=>new G({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}}),K=class{constructor(e,t,r,i){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=i,this.encoder=new W(e,t,r),this.decoder=new V(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},Y=({name:e,prefix:t,encode:r,decode:i})=>new K(e,t,r,i),J=({prefix:e,name:t,alphabet:r})=>{let{encode:i,decode:n}=U(r,t);return Y({prefix:e,name:t,encode:i,decode:e=>H(n(e))})},Q=(e,t,r,i)=>{let n={};for(let e=0;e<t.length;++e)n[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;let a=new Uint8Array(o*r/8|0),s=0,c=0,l=0;for(let t=0;t<o;++t){let o=n[e[t]];if(void 0===o)throw new SyntaxError(`Non-${i} character`);c=c<<r|o,s+=r,s>=8&&(s-=8,a[l++]=255&c>>s)}if(s>=r||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a},X=(e,t,r)=>{let i="="===t[t.length-1],n=(1<<r)-1,o="",a=0,s=0;for(let i=0;i<e.length;++i)for(s=s<<8|e[i],a+=8;a>r;)a-=r,o+=t[n&s>>a];if(a&&(o+=t[n&s<<r-a]),i)for(;o.length*r&7;)o+="=";return o},ee=({name:e,prefix:t,bitsPerChar:r,alphabet:i})=>Y({prefix:t,name:e,encode:e=>X(e,i,r),decode:t=>Q(t,i,r,e)})})),ne={};c(ne,{identity:()=>oe});var oe,ae=a((()=>{ie(),re(),oe=Y({prefix:"\0",name:"identity",encode:e=>q(e),decode:e=>z(e)})})),se={};c(se,{base2:()=>ce});var ce,le=a((()=>{ie(),ce=ee({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1})})),ue={};c(ue,{base8:()=>de});var de,he=a((()=>{ie(),de=ee({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3})})),pe={};c(pe,{base10:()=>fe});var fe,ge=a((()=>{ie(),fe=J({prefix:"9",name:"base10",alphabet:"0123456789"})})),me={};c(me,{base16:()=>be,base16upper:()=>ye});var be,ye,we=a((()=>{ie(),be=ee({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),ye=ee({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})})),ve={};c(ve,{base32:()=>_e,base32hex:()=>ke,base32hexpad:()=>Ie,base32hexpadupper:()=>Se,base32hexupper:()=>Pe,base32pad:()=>Ee,base32padupper:()=>Ce,base32upper:()=>xe,base32z:()=>Ae});var _e,xe,Ee,Ce,ke,Pe,Ie,Se,Ae,Te=a((()=>{ie(),_e=ee({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),xe=ee({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Ee=ee({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Ce=ee({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ke=ee({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Pe=ee({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Ie=ee({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Se=ee({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Ae=ee({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})})),Oe={};c(Oe,{base36:()=>Re,base36upper:()=>Ne});var Re,Ne,Me=a((()=>{ie(),Re=J({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Ne=J({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})})),$e={};c($e,{base58btc:()=>je,base58flickr:()=>Le});var je,Le,Be=a((()=>{ie(),je=J({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Le=J({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})})),De={};c(De,{base64:()=>Ue,base64pad:()=>Fe,base64url:()=>He,base64urlpad:()=>ze});var Ue,Fe,He,ze,qe=a((()=>{ie(),Ue=ee({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Fe=ee({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),He=ee({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),ze=ee({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})})),We={};function Ve(e){return e.reduce(((e,t)=>e+=Ke[t]),"")}function Ge(e){let t=[];for(let r of e){let e=Ye[r.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}c(We,{base256emoji:()=>Je});var Ze,Ke,Ye,Je,Qe=a((()=>{ie(),Ze=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Ke=Ze.reduce(((e,t,r)=>(e[r]=t,e)),[]),Ye=Ze.reduce(((e,t,r)=>(e[t.codePointAt(0)]=r,e)),[]),Je=Y({prefix:"🚀",name:"base256emoji",encode:Ve,decode:Ge})}));function Xe(e,t,r){t=t||[];for(var i=r=r||0;e>=nt;)t[r++]=255&e|rt,e/=128;for(;e&it;)t[r++]=255&e|rt,e>>>=7;return t[r]=0|e,Xe.bytes=r-i+1,t}function et(e,t){var r,i=0,n=0,o=t=t||0,a=e.length;do{if(o>=a)throw et.bytes=0,new RangeError("Could not decode varint");r=e[o++],i+=n<28?(r&st)<<n:(r&st)*Math.pow(2,n),n+=7}while(r>=at);return et.bytes=o-t,i}var tt,rt,it,nt,ot,at,st,ct,lt,ut,dt,ht,pt,ft,gt,mt,bt,yt,wt,vt,_t,xt,Et,Ct,kt,Pt,It=a((()=>{tt=Xe,rt=128,127,it=-128,nt=Math.pow(2,31),ot=et,at=128,st=127,ct=Math.pow(2,7),lt=Math.pow(2,14),ut=Math.pow(2,21),dt=Math.pow(2,28),ht=Math.pow(2,35),pt=Math.pow(2,42),ft=Math.pow(2,49),gt=Math.pow(2,56),mt=Math.pow(2,63),bt={encode:tt,decode:ot,encodingLength:function(e){return e<ct?1:e<lt?2:e<ut?3:e<dt?4:e<ht?5:e<pt?6:e<ft?7:e<gt?8:e<mt?9:10}}})),St=a((()=>{It(),yt=(e,t=0)=>[bt.decode(e,t),bt.decode.bytes],wt=(e,t,r=0)=>(bt.encode(e,t,r),t),vt=e=>bt.encodingLength(e)})),At=a((()=>{re(),St(),_t=(e,t)=>{let r=t.byteLength,i=vt(e),n=i+vt(r),o=new Uint8Array(n+r);return wt(e,o,0),wt(r,o,i),o.set(t,n),new Ct(e,r,t,o)},xt=e=>{let t=H(e),[r,i]=yt(t),[n,o]=yt(t.subarray(i)),a=t.subarray(i+o);if(a.byteLength!==n)throw new Error("Incorrect length");return new Ct(r,n,a,t)},Et=(e,t)=>e===t||e.code===t.code&&e.size===t.size&&F(e.bytes,t.bytes),Ct=class{constructor(e,t,r,i){this.code=e,this.size=t,this.digest=r,this.bytes=i}}})),Tt=a((()=>{At(),kt=({name:e,code:t,encode:r})=>new Pt(e,t,r),Pt=class{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?_t(this.code,t):t.then((e=>_t(this.code,e)))}throw Error("Unknown type, must be binary type")}}})),Ot={};c(Ot,{sha256:()=>Nt,sha512:()=>Mt});var Rt,Nt,Mt,$t=a((()=>{Tt(),Nt=kt({name:"sha2-256",code:18,encode:(Rt=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)))("SHA-256")}),Mt=kt({name:"sha2-512",code:19,encode:Rt("SHA-512")})})),jt={};c(jt,{identity:()=>Dt});var Lt,Bt,Dt,Ut,Ft,Ht,zt,qt,Wt,Vt,Gt,Zt,Kt,Yt,Jt,Qt=a((()=>{re(),At(),0,"identity",Bt=e=>_t(0,Lt(e)),Dt={code:0,name:"identity",encode:Lt=H,digest:Bt}})),Xt=a((()=>{re()})),er=a((()=>{new TextEncoder,new TextDecoder})),tr=a((()=>{St(),At(),Be(),Te(),re(),class e{constructor(e,t,r,i){this.code=t,this.version=e,this.multihash=r,this.bytes=i,this.byteOffset=i.byteOffset,this.byteLength=i.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:Zt,byteLength:Zt,code:Gt,version:Gt,multihash:Gt,bytes:Gt,_baseCache:Zt,asCID:Zt})}toV0(){if(0===this.version)return this;{let{code:t,multihash:r}=this;if(t!==zt)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(r.code!==qt)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return e.createV0(r)}}toV1(){switch(this.version){case 0:{let{code:t,digest:r}=this.multihash,i=_t(t,r);return e.createV1(this.code,i)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&Et(this.multihash,e.multihash)}toString(e){let{bytes:t,version:r,_baseCache:i}=this;return 0===r?Ft(t,i,e||je.encoder):Ht(t,i,e||_e.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return Kt(/^0\.0/,Yt),!(!e||!e[Vt]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(t){if(t instanceof e)return t;if(null!=t&&t.asCID===t){let{version:r,code:i,multihash:n,bytes:o}=t;return new e(r,i,n,o||Wt(r,i,n.bytes))}if(null!=t&&!0===t[Vt]){let{version:r,multihash:i,code:n}=t,o=xt(i);return e.create(r,n,o)}return null}static create(t,r,i){if("number"!=typeof r)throw new Error("String codecs are no longer supported");switch(t){case 0:if(r!==zt)throw new Error(`Version 0 CID must use dag-pb (code: ${zt}) block encoding`);return new e(t,r,i,i.bytes);case 1:{let n=Wt(t,r,i.bytes);return new e(t,r,i,n)}default:throw new Error("Invalid version")}}static createV0(t){return e.create(0,zt,t)}static createV1(t,r){return e.create(1,t,r)}static decode(t){let[r,i]=e.decodeFirst(t);if(i.length)throw new Error("Incorrect length");return r}static decodeFirst(t){let r=e.inspectBytes(t),i=r.size-r.multihashSize,n=H(t.subarray(i,i+r.multihashSize));if(n.byteLength!==r.multihashSize)throw new Error("Incorrect length");let o=n.subarray(r.multihashSize-r.digestSize),a=new Ct(r.multihashCode,r.digestSize,o,n);return[0===r.version?e.createV0(a):e.createV1(r.codec,a),t.subarray(r.size)]}static inspectBytes(e){let t=0,r=()=>{let[r,i]=yt(e.subarray(t));return t+=i,r},i=r(),n=zt;if(18===i?(i=0,t=0):1===i&&(n=r()),0!==i&&1!==i)throw new RangeError(`Invalid CID version ${i}`);let o=t,a=r(),s=r(),c=t+s;return{version:i,codec:n,multihashCode:a,digestSize:s,multihashSize:c-o,size:c}}static parse(t,r){let[i,n]=Ut(t,r),o=e.decode(n);return o._baseCache.set(i,t),o}},Ut=(e,t)=>{switch(e[0]){case"Q":{let r=t||je;return[je.prefix,r.decode(`${je.prefix}${e}`)]}case je.prefix:{let r=t||je;return[je.prefix,r.decode(e)]}case _e.prefix:{let r=t||_e;return[_e.prefix,r.decode(e)]}default:if(null==t)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}},Ft=(e,t,r)=>{let{prefix:i}=r;if(i!==je.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);let n=t.get(i);if(null==n){let n=r.encode(e).slice(1);return t.set(i,n),n}return n},Ht=(e,t,r)=>{let{prefix:i}=r,n=t.get(i);if(null==n){let n=r.encode(e);return t.set(i,n),n}return n},zt=112,qt=18,Wt=(e,t,r)=>{let i=vt(e),n=i+vt(t),o=new Uint8Array(n+r.byteLength);return wt(e,o,0),wt(t,o,i),o.set(r,n),o},Vt=Symbol.for("@ipld/js-cid/CID"),Gt={writable:!1,configurable:!1,enumerable:!0},Zt={writable:!1,enumerable:!1,configurable:!1},"0.0.0-dev",Kt=(e,t)=>{if(!e.test("0.0.0-dev"))throw new Error(t);console.warn(t)},Yt="CID.isCID(v) is deprecated and will be removed in the next major release.\n    Following code pattern:\n    \n    if (CID.isCID(value)) {\n      doSomethingWithCID(value)\n    }\n    \n    Is replaced with:\n    \n    const cid = CID.asCID(value)\n    if (cid) {\n      // Make sure to use cid instead of value\n      doSomethingWithCID(cid)\n    }\n    "})),rr=a((()=>{tr(),St(),re(),Tt(),At()})),ir=a((()=>{ae(),le(),he(),ge(),we(),Te(),Me(),Be(),qe(),Qe(),$t(),Qt(),Xt(),er(),rr(),Jt={...ne,...se,...ue,...pe,...me,...ve,...Oe,...$e,...De,...We},{...Ot,...jt}}));function nr(e,t,r,i){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:i}}}var or,ar,sr,cr,lr=a((()=>{ir(),$(),or=nr("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),ar=nr("ascii","a",(e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}),(e=>{let t=M((e=e.substring(1)).length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t})),sr={utf8:or,"utf-8":or,hex:Jt.base16,latin1:ar,ascii:ar,binary:ar,...Jt},cr=sr}));function ur(e,t="utf8"){let r=cr[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode(`${r.prefix}${e}`):R(globalThis.Buffer.from(e,"utf-8"))}var dr=a((()=>{lr(),N()}));function hr(e,t="utf8"){let r=cr[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}var pr=a((()=>{lr()})),fr=a((()=>{$(),N()})),gr=a((()=>{O(),L(),B(),dr(),pr(),fr()}));function mr(e){return e?br(e):typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new Er:typeof navigator<"u"?br(navigator.userAgent):function(){var e=typeof process<"u"&&process.version;return e?new vr(process.version.slice(1)):null}()}function br(e){var t=function(e){return""!==e&&Pr.reduce((function(t,r){var i=r[0],n=r[1];if(t)return t;var o=n.exec(e);return!!o&&[i,o]}),!1)}(e);if(!t)return null;var r=t[0],i=t[1];if("searchbot"===r)return new xr;var n=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);n?n.length<kr&&(n=yr(yr([],n,!0),function(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}(kr-n.length),!0)):n=[];var o=n.join("."),a=function(e){for(var t=0,r=Ir.length;t<r;t++){var i=Ir[t],n=i[0];if(i[1].exec(e))return n}return null}(e),s=Cr.exec(e);return s&&s[1]?new _r(r,o,a,s[1]):new wr(r,o,a)}var yr,wr,vr,_r,xr,Er,Cr,kr,Pr,Ir,Sr=a((()=>{yr=function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))},wr=function(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"},vr=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform},_r=function(e,t,r,i){this.name=e,this.version=t,this.os=r,this.bot=i,this.type="bot-device"},xr=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},Er=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},Cr=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,kr=3,Pr=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],Ir=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]]})),Ar={};function Tr(e,t){function r(){this.constructor=e}Qr(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function Or(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r}function Rr(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function Nr(e,t){return function(r,i){t(r,i,e)}}function Mr(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function $r(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(a,s)}c((i=i.apply(e,t||[])).next())}))}function jr(e,t){var r,i,n,o,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){a.label=o[1];break}if(6===o[0]&&a.label<n[1]){a.label=n[1],n=o;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(o);break}n[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{r=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function Lr(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}function Br(e,t){for(var r in e)"default"!==r&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function Dr(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ur(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return a}function Fr(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ur(arguments[t]));return e}function Hr(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var i=Array(e),n=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,n++)i[n]=o[a];return i}function zr(e){return this instanceof zr?(this.v=e,this):new zr(e)}function qr(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,n=r.apply(e,t||[]),o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(e){n[e]&&(i[e]=function(t){return new Promise((function(r,i){o.push([e,t,r,i])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof zr?Promise.resolve(e.value.v).then(c,l):u(o[0][2],e)}(n[e](t))}catch(e){u(o[0][3],e)}}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function Wr(e){var t,r;return t={},i("next"),i("throw",(function(e){throw e})),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,n){t[i]=e[i]?function(t){return(r=!r)?{value:zr(e[i](t)),done:"return"===i}:n?n(t):t}:n}}function Vr(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=Dr(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(r){t[r]=e[r]&&function(t){return new Promise((function(i,n){(function(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)})(i,n,(t=e[r](t)).done,t.value)}))}}}function Gr(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Zr(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function Kr(e){return e&&e.__esModule?e:{default:e}}function Yr(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function Jr(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}c(Ar,{__assign:()=>Xr,__asyncDelegator:()=>Wr,__asyncGenerator:()=>qr,__asyncValues:()=>Vr,__await:()=>zr,__awaiter:()=>$r,__classPrivateFieldGet:()=>Yr,__classPrivateFieldSet:()=>Jr,__createBinding:()=>Lr,__decorate:()=>Rr,__exportStar:()=>Br,__extends:()=>Tr,__generator:()=>jr,__importDefault:()=>Kr,__importStar:()=>Zr,__makeTemplateObject:()=>Gr,__metadata:()=>Mr,__param:()=>Nr,__read:()=>Ur,__rest:()=>Or,__spread:()=>Fr,__spreadArrays:()=>Hr,__values:()=>Dr});var Qr,Xr,ei,ti=a((()=>{Qr=function(e,t){return(Qr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},Xr=function(){return Xr=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},Xr.apply(this,arguments)}})),ri=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.delay=void 0,e.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}})),ii=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_THOUSAND=e.ONE_HUNDRED=void 0,e.ONE_HUNDRED=100,e.ONE_THOUSAND=1e3})),ni=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=5*e.ONE_MINUTE,e.TEN_MINUTES=10*e.ONE_MINUTE,e.THIRTY_MINUTES=30*e.ONE_MINUTE,e.SIXTY_MINUTES=60*e.ONE_MINUTE,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=3*e.ONE_HOUR,e.SIX_HOURS=6*e.ONE_HOUR,e.TWELVE_HOURS=12*e.ONE_HOUR,e.TWENTY_FOUR_HOURS=24*e.ONE_HOUR,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=3*e.ONE_DAY,e.FIVE_DAYS=5*e.ONE_DAY,e.SEVEN_DAYS=7*e.ONE_DAY,e.THIRTY_DAYS=30*e.ONE_DAY,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=2*e.ONE_WEEK,e.THREE_WEEKS=3*e.ONE_WEEK,e.FOUR_WEEKS=4*e.ONE_WEEK,e.ONE_YEAR=365*e.ONE_DAY})),oi=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=(ti(),h(Ar));t.__exportStar(ii(),e),t.__exportStar(ni(),e)})),ai=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fromMiliseconds=e.toMiliseconds=void 0;var t=oi();e.toMiliseconds=function(e){return e*t.ONE_THOUSAND},e.fromMiliseconds=function(e){return Math.floor(e/t.ONE_THOUSAND)}})),si=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=(ti(),h(Ar));t.__exportStar(ri(),e),t.__exportStar(ai(),e)})),ci=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;var t=class{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){let t=this.get(e);if(typeof t.elapsed<"u")throw new Error(`Watch already stopped for label: ${e}`);let r=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:r})}get(e){let t=this.timestamps.get(e);if(typeof t>"u")throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){let t=this.get(e);return t.elapsed||Date.now()-t.started}};e.Watch=t,e.default=t})),li=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWatch=void 0;e.IWatch=class{}})),ui=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(ti(),h(Ar)).__exportStar(li(),e)})),di=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=(ti(),h(Ar));t.__exportStar(si(),e),t.__exportStar(ci(),e),t.__exportStar(ui(),e),t.__exportStar(oi(),e)})),hi=s((e=>{"use strict";function t(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}function r(e){let r=t(e);if(!r)throw new Error(`${e} is not defined in Window`);return r}Object.defineProperty(e,"__esModule",{value:!0}),e.getLocalStorage=e.getLocalStorageOrThrow=e.getCrypto=e.getCryptoOrThrow=e.getLocation=e.getLocationOrThrow=e.getNavigator=e.getNavigatorOrThrow=e.getDocument=e.getDocumentOrThrow=e.getFromWindowOrThrow=e.getFromWindow=void 0,e.getFromWindow=t,e.getFromWindowOrThrow=r,e.getDocumentOrThrow=function(){return r("document")},e.getDocument=function(){return t("document")},e.getNavigatorOrThrow=function(){return r("navigator")},e.getNavigator=function(){return t("navigator")},e.getLocationOrThrow=function(){return r("location")},e.getLocation=function(){return t("location")},e.getCryptoOrThrow=function(){return r("crypto")},e.getCrypto=function(){return t("crypto")},e.getLocalStorageOrThrow=function(){return r("localStorage")},e.getLocalStorage=function(){return t("localStorage")}})),pi=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWindowMetadata=void 0;var t=hi();e.getWindowMetadata=function(){let e,r;try{e=t.getDocumentOrThrow(),r=t.getLocationOrThrow()}catch{return null}function i(...t){let r=e.getElementsByTagName("meta");for(let e=0;e<r.length;e++){let i=r[e],n=["itemprop","property","name"].map((e=>i.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(n.length&&n){let e=i.getAttribute("content");if(e)return e}}return""}let n=function(){let t=i("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:i("description","og:description","twitter:description","keywords"),url:r.origin,icons:function(){let t=e.getElementsByTagName("link"),i=[];for(let e=0;e<t.length;e++){let n=t[e],o=n.getAttribute("rel");if(o&&o.toLowerCase().indexOf("icon")>-1){let e=n.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let t=r.protocol+"//"+r.host;if(0===e.indexOf("/"))t+=e;else{let i=r.pathname.split("/");i.pop(),t+=i.join("/")+"/"+e}i.push(t)}else if(0===e.indexOf("//")){let t=r.protocol+e;i.push(t)}else i.push(e)}}return i}(),name:n}}})),fi=s(((e,t)=>{"use strict";t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))})),gi=s(((e,t)=>{"use strict";var r="%[a-f0-9]{2}",i=new RegExp("("+r+")|([^%]+?)","gi"),n=new RegExp("("+r+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),i=e.slice(t);return Array.prototype.concat.call([],o(r),o(i))}function a(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(i)||[],r=1;r<t.length;r++)t=(e=o(t,r).join("")).match(i)||[];return e}}t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=n.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var i=a(r[0]);i!==r[0]&&(t[r[0]]=i)}r=n.exec(e)}t["%C2"]="�";for(var o=Object.keys(t),s=0;s<o.length;s++){var c=o[s];e=e.replace(new RegExp(c,"g"),t[c])}return e}(e)}}})),mi=s(((e,t)=>{"use strict";t.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];let r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}})),bi=s(((e,t)=>{"use strict";t.exports=function(e,t){for(var r={},i=Object.keys(e),n=Array.isArray(t),o=0;o<i.length;o++){var a=i[o],s=e[a];(n?-1!==t.indexOf(a):t(a,s,e))&&(r[a]=s)}return r}})),yi=s((e=>{"use strict";var t=fi(),r=gi(),i=mi(),n=bi(),o=Symbol("encodeFragmentIdentifier");function a(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function s(e,r){return r.encode?r.strict?t(e):encodeURIComponent(e):e}function c(e,t){return t.decode?r(e):e}function l(e){return Array.isArray(e)?e.sort():"object"==typeof e?l(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function u(e){let t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function d(e){let t=(e=u(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function p(e,t){a((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,i)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===i[e]&&(i[e]={}),i[e][t[1]]=r):i[e]=r};case"bracket":return(e,r,i)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==i[e]?i[e]=[].concat(i[e],r):i[e]=[r]:i[e]=r};case"colon-list-separator":return(e,r,i)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==i[e]?i[e]=[].concat(i[e],r):i[e]=[r]:i[e]=r};case"comma":case"separator":return(t,r,i)=>{let n="string"==typeof r&&r.includes(e.arrayFormatSeparator),o="string"==typeof r&&!n&&c(r,e).includes(e.arrayFormatSeparator);r=o?c(r,e):r;let a=n||o?r.split(e.arrayFormatSeparator).map((t=>c(t,e))):null===r?r:c(r,e);i[t]=a};case"bracket-separator":return(t,r,i)=>{let n=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!n)return void(i[t]=r&&c(r,e));let o=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>c(t,e)));void 0!==i[t]?i[t]=[].concat(i[t],o):i[t]=o};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return n;for(let o of e.split("&")){if(""===o)continue;let[e,a]=i(t.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:c(a,t),r(c(e,t),a,n)}for(let e of Object.keys(n)){let r=n[e];if("object"==typeof r&&null!==r)for(let e of Object.keys(r))r[e]=h(r[e],t);else n[e]=h(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce(((e,t)=>{let r=n[t];return r&&"object"==typeof r&&!Array.isArray(r)?e[t]=l(r):e[t]=r,e}),Object.create(null))}e.extract=d,e.parse=p,e.stringify=(e,t)=>{if(!e)return"";a((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let r=r=>t.skipNull&&(e=>null==e)(e[r])||t.skipEmptyString&&""===e[r],i=function(e){switch(e.arrayFormat){case"index":return t=>(r,i)=>{let n=r.length;return void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,[s(t,e),"[",n,"]"].join("")]:[...r,[s(t,e),"[",s(n,e),"]=",s(i,e)].join("")]};case"bracket":return t=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,[s(t,e),"[]"].join("")]:[...r,[s(t,e),"[]=",s(i,e)].join("")];case"colon-list-separator":return t=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,[s(t,e),":list="].join("")]:[...r,[s(t,e),":list=",s(i,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(i,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?i:(n=null===n?"":n,0===i.length?[[s(r,e),t,s(n,e)].join("")]:[[i,s(n,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,s(t,e)]:[...r,[s(t,e),"=",s(i,e)].join("")]}}(t),n={};for(let t of Object.keys(e))r(t)||(n[t]=e[t]);let o=Object.keys(n);return!1!==t.sort&&o.sort(t.sort),o.map((r=>{let n=e[r];return void 0===n?"":null===n?s(r,t):Array.isArray(n)?0===n.length&&"bracket-separator"===t.arrayFormat?s(r,t)+"[]":n.reduce(i(r),[]).join("&"):s(r,t)+"="+s(n,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[r,n]=i(e,"#");return Object.assign({url:r.split("?")[0]||"",query:p(d(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:c(n,t)}:{})},e.stringifyUrl=(t,r)=>{r=Object.assign({encode:!0,strict:!0,[o]:!0},r);let i=u(t.url).split("?")[0]||"",n=e.extract(t.url),a=e.parse(n,{sort:!1}),c=Object.assign(a,t.query),l=e.stringify(c,r);l&&(l=`?${l}`);let d=function(e){let t="",r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(t.url);return t.fragmentIdentifier&&(d=`#${r[o]?s(t.fragmentIdentifier,r):t.fragmentIdentifier}`),`${i}${l}${d}`},e.pick=(t,r,i)=>{i=Object.assign({parseFragmentIdentifier:!0,[o]:!1},i);let{url:a,query:s,fragmentIdentifier:c}=e.parseUrl(t,i);return e.stringifyUrl({url:a,query:n(s,r),fragmentIdentifier:c},i)},e.exclude=(t,r,i)=>{let n=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return e.pick(t,n,i)}})),wi=a((()=>{ei={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}}}));function vi(e,t){return e.includes(":")?[e]:t.chains||[]}function _i(){return hr((0,kn.randomBytes)(Hn),Mn)}function xi(e){return hr((0,Pn.hash)(ur(e,jn)),Mn)}function Ei(e){return Number(hr(e,Nn))}function Ci(e){let t=function(e){return ur(`${e}`,Nn)}(typeof e.type<"u"?e.type:Ln);if(Ei(t)===Bn&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");let r=typeof e.senderPublicKey<"u"?ur(e.senderPublicKey,Mn):void 0,i=typeof e.iv<"u"?ur(e.iv,Mn):(0,kn.randomBytes)(Fn);return function(e){if(Ei(e.type)===Bn){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return hr(j([e.type,e.senderPublicKey,e.iv,e.sealed]),$n)}return hr(j([e.type,e.iv,e.sealed]),$n)}({type:t,sealed:new En.ChaCha20Poly1305(ur(e.symKey,Mn)).seal(i,ur(e.message,jn)),iv:i,senderPublicKey:r})}function ki(e){let t=ur(e,$n),r=t.slice(Dn,Un),i=Un;if(Ei(r)===Bn){let e=i+Hn,n=e+Fn,o=t.slice(i,e),a=t.slice(e,n);return{type:r,sealed:t.slice(n),iv:a,senderPublicKey:o}}let n=i+Fn,o=t.slice(i,n);return{type:r,sealed:t.slice(n),iv:o}}function Pi(e){let t=e?.type||Ln;if(t===Bn){if(typeof e?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function Ii(e){return e.type===Bn&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}function Si(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function Ai(){return!(0,An.getDocument)()&&!!(0,An.getNavigator)()&&navigator.product===Kn}function Ti(){return!Si()&&!!(0,An.getNavigator)()&&!!(0,An.getDocument)()}function Oi(){return Ai()?Yn.reactNative:Si()?Yn.node:Ti()?Yn.browser:Yn.unknown}function Ri(e,t,r){let i=function(){if(Oi()===Yn.reactNative&&typeof global<"u"&&typeof(null==global?void 0:global.Platform)<"u"){let{OS:e,Version:t}=global.Platform;return[e,t].join("-")}let e=mr();if(null===e)return"unknown";let t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[t,e.name,e.version].join("-"):[t,e.version].join("-")}(),n=function(){var e;let t=Oi();return t===Yn.browser?[t,(null==(e=(0,An.getLocation)())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[Jn,r].join("-"),i,n].join("/")}function Ni({protocol:e,version:t,relayUrl:r,sdkVersion:i,auth:n,projectId:o,useOnCloseEvent:a,bundleId:s}){let c=r.split("?"),l={auth:n,ua:Ri(e,t,i),projectId:o,useOnCloseEvent:a||void 0,origin:s||void 0},u=function(e,t){let r=On.parse(e);return r=Zn(Zn({},r),t),On.stringify(r)}(c[1]||"",l);return c[0]+"?"+u}function Mi(e,t){return e.filter((e=>t.includes(e))).length===e.length}function $i(e){return Object.fromEntries(e.entries())}function ji(e){return new Map(Object.entries(e))}function Li(e=Sn.FIVE_MINUTES,t){let r,i,n,o=(0,Sn.toMiliseconds)(e||Sn.FIVE_MINUTES);return{resolve:e=>{n&&r&&(clearTimeout(n),r(e))},reject:e=>{n&&i&&(clearTimeout(n),i(e))},done:()=>new Promise(((e,a)=>{n=setTimeout((()=>{a(new Error(t))}),o),r=e,i=a}))}}function Bi(e,t,r){return new Promise((async(i,n)=>{let o=setTimeout((()=>n(new Error(r))),t);try{i(await e)}catch(e){n(e)}clearTimeout(o)}))}function Di(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function Ui(e){let[t,r]=e.split(":"),i={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof r)i.topic=r;else{if("id"!==t||!Number.isInteger(Number(r)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);i.id=Number(r)}return i}function Fi(e,t){return(0,Sn.fromMiliseconds)((t||Date.now())+(0,Sn.toMiliseconds)(e))}function Hi(e){return Date.now()>=(0,Sn.toMiliseconds)(e)}function zi(e,t){return`${e}${t?`:${t}`:""}`}function qi(e=[],t=[]){return[...new Set([...e,...t])]}function Wi(e){return e?.relay||{protocol:Qn}}function Vi(e){let t=ei[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}function Gi(e,t="-"){let r={},i="relay"+t;return Object.keys(e).forEach((t=>{if(t.startsWith(i)){let n=t.replace(i,""),o=e[t];r[n]=o}})),r}function Zi(e){let t=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),r=-1!==e.indexOf("?")?e.indexOf("?"):void 0,i=e.substring(0,t),n=e.substring(t+1,r).split("@"),o=typeof r<"u"?e.substring(r):"",a=On.parse(o);return{protocol:i,topic:Ki(n[0]),version:parseInt(n[1],10),symKey:a.symKey,relay:Gi(a),expiryTimestamp:a.expiryTimestamp?parseInt(a.expiryTimestamp,10):void 0}}function Ki(e){return e.startsWith("//")?e.substring(2):e}function Yi(e){return`${e.protocol}:${e.topic}@${e.version}?`+On.stringify(so(ao({symKey:e.symKey},function(e,t="-"){let r={};return Object.keys(e).forEach((i=>{let n="relay"+t+i;e[i]&&(r[n]=e[i])})),r}(e.relay)),{expiryTimestamp:e.expiryTimestamp}))}function Ji(e){let t=[];return e.forEach((e=>{let[r,i]=e.split(":");t.push(`${r}:${i}`)})),t}function Qi(e){return e.includes(":")}function Xi(e){return Qi(e)?e.split(":")[0]:e}function en(e,t){let{message:r,code:i}=lo[e];return{message:t?`${r} ${t}`:r,code:i}}function tn(e,t){let{message:r,code:i}=co[e];return{message:t?`${r} ${t}`:r,code:i}}function rn(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function nn(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function on(e){return typeof e>"u"}function an(e,t){return!(!t||!on(e))||"string"==typeof e&&!!e.trim().length}function sn(e,t){return!(!t||!on(e))||"number"==typeof e&&!isNaN(e)}function cn(e){return!(!an(e,!1)||!e.includes(":"))&&2===e.split(":").length}function ln(e){let t=!0;return rn(e)?e.length&&(t=e.every((e=>an(e,!1)))):t=!1,t}function un(e,t,r){let i=null;return Object.entries(e).forEach((([e,n])=>{if(i)return;let o=function(e,t,r){let i=null;return rn(t)&&t.length?t.forEach((e=>{i||cn(e)||(i=tn("UNSUPPORTED_CHAINS",`${r}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):cn(e)||(i=tn("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),i}(e,vi(e,n),`${t} ${r}`);o&&(i=o)})),i}function dn(e,t){let r=null;return rn(e)?e.forEach((e=>{r||function(e){if(an(e,!1)&&e.includes(":")){let t=e.split(":");if(3===t.length){let e=t[0]+":"+t[1];return!!t[2]&&cn(e)}}return!1}(e)||(r=tn("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):r=tn("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function hn(e,t){let r=null;return Object.values(e).forEach((e=>{if(r)return;let i=function(e,t){let r=null;return ln(e?.methods)?ln(e?.events)||(r=tn("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=tn("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}(e,`${t}, namespace`);i&&(r=i)})),r}function pn(e,t){let r=null;if(e&&nn(e)){let i=hn(e,t);i&&(r=i);let n=function(e,t){let r=null;return Object.values(e).forEach((e=>{if(r)return;let i=dn(e?.accounts,`${t} namespace`);i&&(r=i)})),r}(e,t);n&&(r=n)}else r=en("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function fn(e){return an(e.protocol,!0)}function gn(e){return typeof e<"u"&&null!==typeof e}function mn(e,t){return!(!cn(t)||!function(e){let t=[];return Object.values(e).forEach((e=>{t.push(...Ji(e.accounts))})),t}(e).includes(t))}function bn(e,t,r){return!!an(r,!1)&&function(e,t){let r=[];return Object.values(e).forEach((e=>{Ji(e.accounts).includes(t)&&r.push(...e.methods)})),r}(e,t).includes(r)}function yn(e,t,r){return!!an(r,!1)&&function(e,t){let r=[];return Object.values(e).forEach((e=>{Ji(e.accounts).includes(t)&&r.push(...e.events)})),r}(e,t).includes(r)}function wn(e,t,r){let i=null,n=function(e){let t={};return Object.keys(e).forEach((r=>{var i;r.includes(":")?t[r]=e[r]:null==(i=e[r].chains)||i.forEach((i=>{t[i]={methods:e[r].methods,events:e[r].events}}))})),t}(e),o=function(e){let t={};return Object.keys(e).forEach((r=>{r.includes(":")?t[r]=e[r]:Ji(e[r].accounts)?.forEach((i=>{t[i]={accounts:e[r].accounts.filter((e=>e.includes(`${i}:`))),methods:e[r].methods,events:e[r].events}}))})),t}(t),a=Object.keys(n),s=Object.keys(o),c=vn(Object.keys(e)),l=vn(Object.keys(t)),u=c.filter((e=>!l.includes(e)));return u.length&&(i=en("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.\n          Required: ${u.toString()}\n          Received: ${Object.keys(t).toString()}`)),Mi(a,s)||(i=en("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.\n          Required: ${a.toString()}\n          Approved: ${s.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||i)return;let n=Ji(t[e].accounts);n.includes(e)||(i=en("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${e}\n            Required: ${e}\n            Approved: ${n.toString()}`))})),a.forEach((e=>{i||(Mi(n[e].methods,o[e].methods)?Mi(n[e].events,o[e].events)||(i=en("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${e}`)):i=en("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${e}`))})),i}function vn(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function _n(){let e=Oi();return new Promise((t=>{switch(e){case Yn.browser:t(Ti()&&navigator?.onLine);break;case Yn.reactNative:t(async function(){return!(Ai()&&typeof global<"u"&&null!=global&&global.NetInfo)||(await(null==global?void 0:global.NetInfo.fetch()))?.isConnected}());break;case Yn.node:default:t(!0)}}))}function xn(e){switch(Oi()){case Yn.browser:!function(e){!Ai()&&Ti()&&(window.addEventListener("online",(()=>e(!0))),window.addEventListener("offline",(()=>e(!1))))}(e);break;case Yn.reactNative:!function(e){Ai()&&typeof global<"u"&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener((t=>e(t?.isConnected)))}(e);case Yn.node:}}var En,Cn,kn,Pn,In,Sn,An,Tn,On,Rn,Nn,Mn,$n,jn,Ln,Bn,Dn,Un,Fn,Hn,zn,qn,Wn,Vn,Gn,Zn,Kn,Yn,Jn,Qn,Xn,eo,to,ro,io,no,oo,ao,so,co,lo,uo,ho,po=a((()=>{En=d(v()),Cn=d(E()),kn=d(S()),Pn=d(A()),In=d(T()),gr(),Sr(),Sn=d(di()),An=d(hi()),Tn=d(pi()),On=d(yi()),wi(),Rn=":",Nn="base10",Mn="base16",$n="base64pad",jn="utf8",Ln=0,Bn=1,Dn=0,Un=1,Fn=12,Hn=32,zn=Object.defineProperty,qn=Object.getOwnPropertySymbols,Wn=Object.prototype.hasOwnProperty,Vn=Object.prototype.propertyIsEnumerable,Gn=(e,t,r)=>t in e?zn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zn=(e,t)=>{for(var r in t||(t={}))Wn.call(t,r)&&Gn(e,r,t[r]);if(qn)for(var r of qn(t))Vn.call(t,r)&&Gn(e,r,t[r]);return e},Kn="ReactNative",Yn={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Jn="js",Qn="irn",Xn=Object.defineProperty,eo=Object.defineProperties,to=Object.getOwnPropertyDescriptors,ro=Object.getOwnPropertySymbols,io=Object.prototype.hasOwnProperty,no=Object.prototype.propertyIsEnumerable,oo=(e,t,r)=>t in e?Xn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ao=(e,t)=>{for(var r in t||(t={}))io.call(t,r)&&oo(e,r,t[r]);if(ro)for(var r of ro(t))no.call(t,r)&&oo(e,r,t[r]);return e},so=(e,t)=>eo(e,to(t)),co={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},lo={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}},uo={},ho=class{static get(e){return uo[e]}static set(e,t){uo[e]=t}static delete(e){delete uo[e]}}}));function fo(e,t){if(!("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t))return t;!function(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}(e)}function go(e,t={}){if("string"!=typeof e)return e;let r=e.trim();if('"'===e[0]&&e.endsWith('"')&&!e.includes("\\"))return r.slice(1,-1);if(r.length<=9){let e=r.toLowerCase();if("true"===e)return!0;if("false"===e)return!1;if("undefined"===e)return;if("null"===e)return null;if("nan"===e)return Number.NaN;if("infinity"===e)return Number.POSITIVE_INFINITY;if("-infinity"===e)return Number.NEGATIVE_INFINITY}if(!yo.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(mo.test(e)||bo.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,fo)}return JSON.parse(e)}catch(r){if(t.strict)throw r;return e}}var mo,bo,yo,wo=a((()=>{mo=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,bo=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,yo=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/}));function vo(e,...t){try{return function(e){return e&&"function"==typeof e.then?e:Promise.resolve(e)}(e(...t))}catch(e){return Promise.reject(e)}}function _o(e){if(function(e){let t=typeof e;return null===e||"object"!==t&&"function"!==t}(e))return String(e);if(function(e){let t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}(e)||Array.isArray(e))return JSON.stringify(e);if("function"==typeof e.toJSON)return _o(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function xo(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}function Eo(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function Co(...e){return Eo(e.join(":"))}function ko(e){return(e=Eo(e))?e+":":""}var Po,Io=a((()=>{Po="base64:"}));function So(e={}){let t={mounts:{"":e.driver||Oo()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},r=e=>{for(let r of t.mountpoints)if(e.startsWith(r))return{base:r,relativeKey:e.slice(r.length),driver:t.mounts[r]};return{base:"",relativeKey:e,driver:t.mounts[""]}},i=(e,r)=>t.mountpoints.filter((t=>t.startsWith(e)||r&&e.startsWith(t))).map((r=>({relativeBase:e.length>r.length?e.slice(r.length):void 0,mountpoint:r,driver:t.mounts[r]}))),n=(e,r)=>{if(t.watching){r=Eo(r);for(let i of t.watchListeners)i(e,r)}},o=async()=>{if(t.watching){for(let e in t.unwatch)await t.unwatch[e]();t.unwatch={},t.watching=!1}},a=(e,t,i)=>{let n=new Map,o=e=>{let t=n.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},n.set(e.base,t)),t};for(let i of e){let e="string"==typeof i,n=Eo(e?i:i.key),a=e?void 0:i.value,s=e||!i.options?t:{...t,...i.options},c=r(n);o(c).items.push({key:n,value:a,relativeKey:c.relativeKey,options:s})}return Promise.all([...n.values()].map((e=>i(e)))).then((e=>e.flat()))},s={hasItem(e,t={}){e=Eo(e);let{relativeKey:i,driver:n}=r(e);return vo(n.hasItem,i,t)},getItem(e,t={}){e=Eo(e);let{relativeKey:i,driver:n}=r(e);return vo(n.getItem,i,t).then((e=>go(e)))},getItems:(e,t)=>a(e,t,(e=>e.driver.getItems?vo(e.driver.getItems,e.items.map((e=>({key:e.relativeKey,options:e.options}))),t).then((t=>t.map((t=>({key:Co(e.base,t.key),value:go(t.value)}))))):Promise.all(e.items.map((t=>vo(e.driver.getItem,t.relativeKey,t.options).then((e=>({key:t.key,value:go(e)})))))))),getItemRaw(e,t={}){e=Eo(e);let{relativeKey:i,driver:n}=r(e);return n.getItemRaw?vo(n.getItemRaw,i,t):vo(n.getItem,i,t).then((e=>function(e){return"string"==typeof e&&e.startsWith(Po)?(xo(),Buffer.from(e.slice(Po.length),"base64")):e}(e)))},async setItem(e,t,i={}){if(void 0===t)return s.removeItem(e);e=Eo(e);let{relativeKey:o,driver:a}=r(e);a.setItem&&(await vo(a.setItem,o,_o(t),i),a.watch||n("update",e))},async setItems(e,t){await a(e,t,(async e=>{if(e.driver.setItems)return vo(e.driver.setItems,e.items.map((e=>({key:e.relativeKey,value:_o(e.value),options:e.options}))),t);e.driver.setItem&&await Promise.all(e.items.map((t=>vo(e.driver.setItem,t.relativeKey,_o(t.value),t.options))))}))},async setItemRaw(e,t,i={}){if(void 0===t)return s.removeItem(e,i);e=Eo(e);let{relativeKey:o,driver:a}=r(e);if(a.setItemRaw)await vo(a.setItemRaw,o,t,i);else{if(!a.setItem)return;await vo(a.setItem,o,function(e){if("string"==typeof e)return e;xo();let t=Buffer.from(e).toString("base64");return Po+t}(t),i)}a.watch||n("update",e)},async removeItem(e,t={}){"boolean"==typeof t&&(t={removeMeta:t}),e=Eo(e);let{relativeKey:i,driver:o}=r(e);o.removeItem&&(await vo(o.removeItem,i,t),(t.removeMeta||t.removeMata)&&await vo(o.removeItem,i+"$",t),o.watch||n("remove",e))},async getMeta(e,t={}){"boolean"==typeof t&&(t={nativeOnly:t}),e=Eo(e);let{relativeKey:i,driver:n}=r(e),o=Object.create(null);if(n.getMeta&&Object.assign(o,await vo(n.getMeta,i,t)),!t.nativeOnly){let e=await vo(n.getItem,i+"$",t).then((e=>go(e)));e&&"object"==typeof e&&("string"==typeof e.atime&&(e.atime=new Date(e.atime)),"string"==typeof e.mtime&&(e.mtime=new Date(e.mtime)),Object.assign(o,e))}return o},setMeta(e,t,r={}){return this.setItem(e+"$",t,r)},removeMeta(e,t={}){return this.removeItem(e+"$",t)},async getKeys(e,t={}){e=ko(e);let r=i(e,!0),n=[],o=[];for(let e of r){let r=(await vo(e.driver.getKeys,e.relativeBase,t)).map((t=>e.mountpoint+Eo(t))).filter((e=>!n.some((t=>e.startsWith(t)))));o.push(...r),n=[e.mountpoint,...n.filter((t=>!t.startsWith(e.mountpoint)))]}return e?o.filter((t=>t.startsWith(e)&&!t.endsWith("$"))):o.filter((e=>!e.endsWith("$")))},async clear(e,t={}){e=ko(e),await Promise.all(i(e,!1).map((async e=>{if(e.driver.clear)return vo(e.driver.clear,e.relativeBase,t);if(e.driver.removeItem){let r=await e.driver.getKeys(e.relativeBase||"",t);return Promise.all(r.map((r=>e.driver.removeItem(r,t))))}})))},async dispose(){await Promise.all(Object.values(t.mounts).map((e=>To(e))))},watch:async e=>(await(async()=>{if(!t.watching){t.watching=!0;for(let e in t.mounts)t.unwatch[e]=await Ao(t.mounts[e],n,e)}})(),t.watchListeners.push(e),async()=>{t.watchListeners=t.watchListeners.filter((t=>t!==e)),0===t.watchListeners.length&&await o()}),async unwatch(){t.watchListeners=[],await o()},mount(e,r){if((e=ko(e))&&t.mounts[e])throw new Error(`already mounted at ${e}`);return e&&(t.mountpoints.push(e),t.mountpoints.sort(((e,t)=>t.length-e.length))),t.mounts[e]=r,t.watching&&Promise.resolve(Ao(r,n,e)).then((r=>{t.unwatch[e]=r})).catch(console.error),s},async unmount(e,r=!0){(e=ko(e))&&t.mounts[e]&&(t.watching&&e in t.unwatch&&(t.unwatch[e](),delete t.unwatch[e]),r&&await To(t.mounts[e]),t.mountpoints=t.mountpoints.filter((t=>t!==e)),delete t.mounts[e])},getMount(e=""){e=Eo(e)+":";let t=r(e);return{driver:t.driver,base:t.base}},getMounts:(e="",t={})=>(e=Eo(e),i(e,t.parents).map((e=>({driver:e.driver,base:e.mountpoint}))))};return s}function Ao(e,t,r){return e.watch?e.watch(((e,i)=>t(e,r+i))):()=>{}}async function To(e){"function"==typeof e.dispose&&await vo(e.dispose)}var Oo,Ro=a((()=>{wo(),Io(),"memory",Oo=()=>{let e=new Map;return{name:"memory",options:{},hasItem:t=>e.has(t),getItem:t=>e.get(t)??null,getItemRaw:t=>e.get(t)??null,setItem(t,r){e.set(t,r)},setItemRaw(t,r){e.set(t,r)},removeItem(t){e.delete(t)},getKeys:()=>Array.from(e.keys()),clear(){e.clear()},dispose(){e.clear()}}}}));function No(e){return new Promise(((t,r)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)}))}function Mo(e,t){let r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(t);let i=No(r);return(e,r)=>i.then((i=>r(i.transaction(t,e).objectStore(t))))}function $o(){return Bo||(Bo=Mo("keyval-store","keyval")),Bo}function jo(e,t=$o()){return t("readonly",(t=>No(t.get(e))))}function Lo(e=$o()){return e("readonly",(e=>{if(e.getAllKeys)return No(e.getAllKeys());let t=[];return function(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},No(e.transaction)}(e,(e=>t.push(e.key))).then((()=>t))}))}var Bo,Do=a((()=>{}));function Uo(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return zo(e)}catch{return e}}function Fo(e){return"string"==typeof e?e:Ho(e)||""}var Ho,zo,qo=a((()=>{Ho=e=>JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString()+"n":t)),zo=e=>{let t=e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(t,((e,t)=>"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))}}));function Wo(e){var t;return[e[0],Uo(null!=(t=e[1])?t:"")]}var Vo,Go,Zo,Ko,Yo,Jo,Qo,Xo,ea,ta=a((()=>{Ro(),Do(),qo(),"idb-keyval",Vo=(e={})=>{let t,r=e.base&&e.base.length>0?`${e.base}:`:"",i=e=>r+e;return e.dbName&&e.storeName&&(t=Mo(e.dbName,e.storeName)),{name:"idb-keyval",options:e,hasItem:async e=>!(typeof await jo(i(e),t)>"u"),getItem:async e=>await jo(i(e),t)??null,setItem:(e,r)=>function(e,t,r=$o()){return r("readwrite",(r=>(r.put(t,e),No(r.transaction))))}(i(e),r,t),removeItem:e=>function(e,t=$o()){return t("readwrite",(t=>(t.delete(e),No(t.transaction))))}(i(e),t),getKeys:()=>Lo(t),clear:()=>function(e=$o()){return e("readwrite",(e=>(e.clear(),No(e.transaction))))}(t)}},"WALLET_CONNECT_V2_INDEXED_DB","keyvaluestorage",Go=class{constructor(){this.indexedDb=So({driver:Vo({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map((e=>[e.key,e.value]))}async getItem(e){let t=await this.indexedDb.getItem(e);if(null!==t)return t}async setItem(e,t){await this.indexedDb.setItem(e,Fo(t))}async removeItem(e){await this.indexedDb.removeItem(e)}},Zo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ko={exports:{}},function(){let e;function t(){}e=t,e.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},e.prototype.setItem=function(e,t){this[e]=String(t)},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){let e=this;Object.keys(e).forEach((function(t){e[t]=void 0,delete e[t]}))},e.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},e.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),typeof Zo<"u"&&Zo.localStorage?Ko.exports=Zo.localStorage:typeof window<"u"&&window.localStorage?Ko.exports=window.localStorage:Ko.exports=new t}(),Yo=class{constructor(){this.localStorage=Ko.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Wo)}async getItem(e){let t=this.localStorage.getItem(e);if(null!==t)return Uo(t)}async setItem(e,t){this.localStorage.setItem(e,Fo(t))}async removeItem(e){this.localStorage.removeItem(e)}},"wc_storage_version",1,Jo=async(e,t,r)=>{let i="wc_storage_version",n=await t.getItem(i);if(n&&n>=1)return void r(t);let o=await e.getKeys();if(!o.length)return void r(t);let a=[];for(;o.length;){let r=o.shift();if(!r)continue;let i=r.toLowerCase();if(i.includes("wc@")||i.includes("walletconnect")||i.includes("wc_")||i.includes("wallet_connect")){let i=await e.getItem(r);await t.setItem(r,i),a.push(r)}}await t.setItem(i,1),r(t),Qo(e,a)},Qo=async(e,t)=>{t.length&&t.forEach((async t=>{await e.removeItem(t)}))},Xo=class{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};let e=new Yo;this.storage=e;try{let t=new Go;Jo(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise((e=>{let t=setInterval((()=>{this.initialized&&(clearInterval(t),e())}),20)}))}}})),ra=a((()=>{ea=class{}})),ia={};c(ia,{IEvents:()=>ea});var na=a((()=>{ra()})),oa=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IHeartBeat=void 0;var t=(na(),h(ia)),r=class extends t.IEvents{constructor(e){super()}};e.IHeartBeat=r})),aa=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(ti(),h(Ar)).__exportStar(oa(),e)})),sa=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HEARTBEAT_EVENTS=e.HEARTBEAT_INTERVAL=void 0;var t=di();e.HEARTBEAT_INTERVAL=t.FIVE_SECONDS,e.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}})),ca=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(ti(),h(Ar)).__exportStar(sa(),e)})),la=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HeartBeat=void 0;var t=(ti(),h(Ar)),r=p(),i=di(),n=aa(),o=ca(),a=class e extends n.IHeartBeat{constructor(e){super(e),this.events=new r.EventEmitter,this.interval=o.HEARTBEAT_INTERVAL,this.interval=e?.interval||o.HEARTBEAT_INTERVAL}static init(r){return t.__awaiter(this,void 0,void 0,(function*(){let t=new e(r);return yield t.init(),t}))}init(){return t.__awaiter(this,void 0,void 0,(function*(){yield this.initialize()}))}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}initialize(){return t.__awaiter(this,void 0,void 0,(function*(){this.intervalRef=setInterval((()=>this.pulse()),i.toMiliseconds(this.interval))}))}pulse(){this.events.emit(o.HEARTBEAT_EVENTS.pulse)}};e.HeartBeat=a})),ua=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=(ti(),h(Ar));t.__exportStar(la(),e),t.__exportStar(aa(),e),t.__exportStar(ca(),e)})),da=s(((e,t)=>{"use strict";function r(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}t.exports=function(e,t,i){var n=i&&i.stringify||r;if("object"==typeof e&&null!==e){var o=t.length+1;if(1===o)return e;var a=new Array(o);a[0]=n(e);for(var s=1;s<o;s++)a[s]=n(t[s]);return a.join(" ")}if("string"!=typeof e)return e;var c=t.length;if(0===c)return e;for(var l="",u=0,d=-1,h=e&&e.length||0,p=0;p<h;){if(37===e.charCodeAt(p)&&p+1<h){switch(d=d>-1?d:0,e.charCodeAt(p+1)){case 100:case 102:if(u>=c||null==t[u])break;d<p&&(l+=e.slice(d,p)),l+=Number(t[u]),d=p+2,p++;break;case 105:if(u>=c||null==t[u])break;d<p&&(l+=e.slice(d,p)),l+=Math.floor(Number(t[u])),d=p+2,p++;break;case 79:case 111:case 106:if(u>=c||void 0===t[u])break;d<p&&(l+=e.slice(d,p));var f=typeof t[u];if("string"===f){l+="'"+t[u]+"'",d=p+2,p++;break}if("function"===f){l+=t[u].name||"<anonymous>",d=p+2,p++;break}l+=n(t[u]),d=p+2,p++;break;case 115:if(u>=c)break;d<p&&(l+=e.slice(d,p)),l+=String(t[u]),d=p+2,p++;break;case 37:d<p&&(l+=e.slice(d,p)),l+="%",d=p+2,p++,u--}++u}++p}return-1===d?e:(d<h&&(l+=e.slice(d)),l)}})),ha=s(((e,t)=>{"use strict";var r=da();t.exports=o;var i=function(){function e(e){return typeof e<"u"&&e}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}().console||{},n={mapHttpRequest:d,mapHttpResponse:d,wrapRequestSerializer:h,wrapResponseSerializer:h,wrapErrorSerializer:h,req:d,res:d,err:function(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)void 0===t[r]&&(t[r]=e[r]);return t}};function o(e){(e=e||{}).browser=e.browser||{};let t=e.browser.transmit;if(t&&"function"!=typeof t.send)throw Error("pino: transmit option must have a send function");let r=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},d=function(e,t){return Array.isArray(e)?e.filter((function(e){return"!stdSerializers.err"!==e})):!0===e&&Object.keys(t)}(e.browser.serialize,n),h=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(h=!1);"function"==typeof r&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),!1===e.enabled&&(e.level="silent");let f=e.level||"info",g=Object.create(r);g.log||(g.log=p),Object.defineProperty(g,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(g,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,a(m,g,"error","log"),a(m,g,"fatal","error"),a(m,g,"warn","error"),a(m,g,"info","log"),a(m,g,"debug","log"),a(m,g,"trace","log")}});let m={transmit:t,serialize:d,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:u(e)};return g.levels=o.levels,g.level=f,g.setMaxListeners=g.getMaxListeners=g.emit=g.addListener=g.on=g.prependListener=g.once=g.prependOnceListener=g.removeListener=g.removeAllListeners=g.listeners=g.listenerCount=g.eventNames=g.write=g.flush=p,g.serializers=n,g._serialize=d,g._stdErrSerialize=h,g.child=function(r,i){if(!r)throw new Error("missing bindings for child Pino");i=i||{},d&&r.serializers&&(i.serializers=r.serializers);let o=i.serializers;if(d&&o){var a=Object.assign({},n,o),u=!0===e.browser.serialize?Object.keys(a):d;delete r.serializers,s([r],u,a,this._stdErrSerialize)}function h(e){this._childLevel=1+(0|e._childLevel),this.error=c(e,r,"error"),this.fatal=c(e,r,"fatal"),this.warn=c(e,r,"warn"),this.info=c(e,r,"info"),this.debug=c(e,r,"debug"),this.trace=c(e,r,"trace"),a&&(this.serializers=a,this._serialize=u),t&&(this._logEvent=l([].concat(e._logEvent.bindings,r)))}return h.prototype=this,new h(this)},t&&(g._logEvent=l()),g}function a(e,t,n,a){let c=Object.getPrototypeOf(t);t[n]=t.levelVal>t.levels.values[n]?p:c[n]?c[n]:i[n]||i[a]||p,function(e,t,n){!e.transmit&&t[n]===p||(t[n]=function(a){return function(){let c=e.timestamp(),u=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var h=0;h<u.length;h++)u[h]=arguments[h];if(e.serialize&&!e.asObject&&s(u,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?a.call(d,function(e,t,i,n){e._serialize&&s(i,e._serialize,e.serializers,e._stdErrSerialize);let a=i.slice(),c=a[0],l={};n&&(l.time=n),l.level=o.levels.values[t];let u=1+(0|e._childLevel);if(u<1&&(u=1),null!==c&&"object"==typeof c){for(;u--&&"object"==typeof a[0];)Object.assign(l,a.shift());c=a.length?r(a.shift(),a):void 0}else"string"==typeof c&&(c=r(a.shift(),a));return void 0!==c&&(l.msg=c),l}(this,n,u,c)):a.apply(d,u),e.transmit){let r=e.transmit.level||t.level,i=o.levels.values[r],a=o.levels.values[n];if(a<i)return;!function(e,t,r){let i=t.send,n=t.ts,o=t.methodLevel,a=t.methodValue,c=t.val,u=e._logEvent.bindings;s(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=n,e._logEvent.messages=r.filter((function(e){return-1===u.indexOf(e)})),e._logEvent.level.label=o,e._logEvent.level.value=a,i(o,e._logEvent,c),e._logEvent=l(u)}(this,{ts:c,methodLevel:n,methodValue:a,transmitLevel:r,transmitValue:o.levels.values[e.transmit.level||t.level],send:e.transmit.send,val:t.levelVal},u)}}}(t[n]))}(e,t,n)}function s(e,t,r,i){for(let n in e)if(i&&e[n]instanceof Error)e[n]=o.stdSerializers.err(e[n]);else if("object"==typeof e[n]&&!Array.isArray(e[n]))for(let i in e[n])t&&t.indexOf(i)>-1&&i in r&&(e[n][i]=r[i](e[n][i]))}function c(e,t,r){return function(){let i=new Array(1+arguments.length);i[0]=t;for(var n=1;n<i.length;n++)i[n]=arguments[n-1];return e[r].apply(this,i)}}function l(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function u(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?f:g}function d(){return{}}function h(e){return e}function p(){}function f(){return!1}function g(){return Date.now()}o.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},o.stdSerializers=n,o.stdTimeFunctions=Object.assign({},{nullTime:f,epochTime:g,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}})}));function pa(e){return Ia(Pa({},e),{level:e?.level||ba.level})}function fa(e,t=ya){let r="";return r=typeof e.bindings>"u"?function(e,t=ya){return e[t]||""}(e,t):e.bindings().context||"",r}function ga(e,t,r=ya){let i=function(e,t,r=ya){let i=fa(e,r);return i.trim()?`${i}/${t}`:t}(e,t,r);return function(e,t,r=ya){return e[r]=t,e}(e.child({context:i}),i,r)}var ma,ba,ya,wa,va,_a,xa,Ea,Ca,ka,Pa,Ia,Sa,Aa,Ta,Oa,Ra,Na,Ma,$a,ja,La,Ba,Da,Ua,Fa,Ha,za,qa,Wa,Va,Ga,Za,Ka,Ya,Ja,Qa=a((()=>{d(ha()),ma=d(ha()),qo(),ba={level:"info"},ya="custom_context",1024e3,wa=Object.defineProperty,va=Object.defineProperties,_a=Object.getOwnPropertyDescriptors,xa=Object.getOwnPropertySymbols,Ea=Object.prototype.hasOwnProperty,Ca=Object.prototype.propertyIsEnumerable,ka=(e,t,r)=>t in e?wa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pa=(e,t)=>{for(var r in t||(t={}))Ea.call(t,r)&&ka(e,r,t[r]);if(xa)for(var r of xa(t))Ca.call(t,r)&&ka(e,r,t[r]);return e},Ia=(e,t)=>va(e,_a(t))})),Xa=a((()=>{na(),d(p()),Sa=class extends ea{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}},Aa=class extends ea{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}},Ta=class{constructor(e,t){this.logger=e,this.core=t}},Oa=class extends ea{constructor(e,t){super(),this.relayer=e,this.logger=t}},Ra=class extends ea{constructor(e){super()}},Na=class{constructor(e,t,r,i){this.core=e,this.logger=t,this.name=r}},Ma=class extends ea{constructor(e,t){super(),this.relayer=e,this.logger=t}},$a=class extends ea{constructor(e,t){super(),this.core=e,this.logger=t}},ja=class{constructor(e,t){this.projectId=e,this.logger=t}},La=class{constructor(e,t){this.projectId=e,this.logger=t}},Ba=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},Da=class{constructor(e){this.client=e}}})),es=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=g(),r=m();e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var i=function(){function i(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return i.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},i.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},i.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._tempHi),r.wipe(this._tempLo),this.reset()},i.prototype.update=function(t,r){if(void 0===r&&(r=t.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var i=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&r>0;)this._buffer[this._bufferLength++]=t[i++],r--;this._bufferLength===this.blockSize&&(o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(i=o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,t,i,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=t[i++],r--;return this},i.prototype.finish=function(e){if(!this._finished){var r=this._bytesHashed,i=this._bufferLength,n=r/536870912|0,a=r<<3,s=r%128<112?128:256;this._buffer[i]=128;for(var c=i+1;c<s-8;c++)this._buffer[c]=0;t.writeUint32BE(n,this._buffer,s-8),t.writeUint32BE(a,this._buffer,s-4),o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,s),this._finished=!0}for(c=0;c<this.digestLength/8;c++)t.writeUint32BE(this._stateHi[c],e,8*c),t.writeUint32BE(this._stateLo[c],e,8*c+4);return this},i.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},i.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},i.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},i.prototype.cleanSavedState=function(e){r.wipe(e.stateHi),r.wipe(e.stateLo),e.buffer&&r.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},i}();e.SHA512=i;var n=new Int32Array([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]);function o(e,r,i,o,a,s,c){for(var l,u,d,h,p,f,g,m,b=i[0],y=i[1],w=i[2],v=i[3],_=i[4],x=i[5],E=i[6],C=i[7],k=o[0],P=o[1],I=o[2],S=o[3],A=o[4],T=o[5],O=o[6],R=o[7];c>=128;){for(var N=0;N<16;N++){var M=8*N+s;e[N]=t.readUint32BE(a,M),r[N]=t.readUint32BE(a,M+4)}for(N=0;N<80;N++){var $,j,L=b,B=y,D=w,U=v,F=_,H=x,z=E,q=k,W=P,V=I,G=S,Z=A,K=T,Y=O;if(p=65535&(u=R),f=u>>>16,g=65535&(l=C),m=l>>>16,p+=65535&(u=(A>>>14|_<<18)^(A>>>18|_<<14)^(_>>>9|A<<23)),f+=u>>>16,g+=65535&(l=(_>>>14|A<<18)^(_>>>18|A<<14)^(A>>>9|_<<23)),m+=l>>>16,p+=65535&(u=A&T^~A&O),f+=u>>>16,g+=65535&(l=_&x^~_&E),m+=l>>>16,l=n[2*N],p+=65535&(u=n[2*N+1]),f+=u>>>16,g+=65535&l,m+=l>>>16,l=e[N%16],f+=(u=r[N%16])>>>16,g+=65535&l,m+=l>>>16,g+=(f+=(p+=65535&u)>>>16)>>>16,p=65535&(u=h=65535&p|f<<16),f=u>>>16,g=65535&(l=d=65535&g|(m+=g>>>16)<<16),m=l>>>16,p+=65535&(u=(k>>>28|b<<4)^(b>>>2|k<<30)^(b>>>7|k<<25)),f+=u>>>16,g+=65535&(l=(b>>>28|k<<4)^(k>>>2|b<<30)^(k>>>7|b<<25)),m+=l>>>16,f+=(u=k&P^k&I^P&I)>>>16,g+=65535&(l=b&y^b&w^y&w),m+=l>>>16,$=65535&(g+=(f+=(p+=65535&u)>>>16)>>>16)|(m+=g>>>16)<<16,j=65535&p|f<<16,p=65535&(u=G),f=u>>>16,g=65535&(l=U),m=l>>>16,f+=(u=h)>>>16,g+=65535&(l=d),m+=l>>>16,y=L,w=B,v=D,_=U=65535&(g+=(f+=(p+=65535&u)>>>16)>>>16)|(m+=g>>>16)<<16,x=F,E=H,C=z,b=$,P=q,I=W,S=V,A=G=65535&p|f<<16,T=Z,O=K,R=Y,k=j,N%16==15)for(M=0;M<16;M++)l=e[M],p=65535&(u=r[M]),f=u>>>16,g=65535&l,m=l>>>16,l=e[(M+9)%16],p+=65535&(u=r[(M+9)%16]),f+=u>>>16,g+=65535&l,m+=l>>>16,d=e[(M+1)%16],p+=65535&(u=((h=r[(M+1)%16])>>>1|d<<31)^(h>>>8|d<<24)^(h>>>7|d<<25)),f+=u>>>16,g+=65535&(l=(d>>>1|h<<31)^(d>>>8|h<<24)^d>>>7),m+=l>>>16,d=e[(M+14)%16],f+=(u=((h=r[(M+14)%16])>>>19|d<<13)^(d>>>29|h<<3)^(h>>>6|d<<26))>>>16,g+=65535&(l=(d>>>19|h<<13)^(h>>>29|d<<3)^d>>>6),m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,e[M]=65535&g|m<<16,r[M]=65535&p|f<<16}p=65535&(u=k),f=u>>>16,g=65535&(l=b),m=l>>>16,l=i[0],f+=(u=o[0])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,i[0]=b=65535&g|m<<16,o[0]=k=65535&p|f<<16,p=65535&(u=P),f=u>>>16,g=65535&(l=y),m=l>>>16,l=i[1],f+=(u=o[1])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,i[1]=y=65535&g|m<<16,o[1]=P=65535&p|f<<16,p=65535&(u=I),f=u>>>16,g=65535&(l=w),m=l>>>16,l=i[2],f+=(u=o[2])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,i[2]=w=65535&g|m<<16,o[2]=I=65535&p|f<<16,p=65535&(u=S),f=u>>>16,g=65535&(l=v),m=l>>>16,l=i[3],f+=(u=o[3])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,i[3]=v=65535&g|m<<16,o[3]=S=65535&p|f<<16,p=65535&(u=A),f=u>>>16,g=65535&(l=_),m=l>>>16,l=i[4],f+=(u=o[4])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,i[4]=_=65535&g|m<<16,o[4]=A=65535&p|f<<16,p=65535&(u=T),f=u>>>16,g=65535&(l=x),m=l>>>16,l=i[5],f+=(u=o[5])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,i[5]=x=65535&g|m<<16,o[5]=T=65535&p|f<<16,p=65535&(u=O),f=u>>>16,g=65535&(l=E),m=l>>>16,l=i[6],f+=(u=o[6])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,i[6]=E=65535&g|m<<16,o[6]=O=65535&p|f<<16,p=65535&(u=R),f=u>>>16,g=65535&(l=C),m=l>>>16,l=i[7],f+=(u=o[7])>>>16,g+=65535&l,m+=l>>>16,m+=(g+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,i[7]=C=65535&g|m<<16,o[7]=R=65535&p|f<<16,s+=128,c-=128}return s}e.hash=function(e){var t=new i;t.update(e);var r=t.digest();return t.clean(),r}})),ts=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertSecretKeyToX25519=e.convertPublicKeyToX25519=e.verify=e.sign=e.extractPublicKeyFromSecretKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.SEED_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=e.SIGNATURE_LENGTH=void 0;var t=S(),r=es(),i=m();function n(e){let t=new Float64Array(16);if(e)for(let r=0;r<e.length;r++)t[r]=e[r];return t}e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32,new Uint8Array(32)[0]=9;var o=n(),a=n([1]),s=n([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=n([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=n([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),u=n([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=n([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function h(e,t){for(let r=0;r<16;r++)e[r]=0|t[r]}function p(e){let t=1;for(let r=0;r<16;r++){let i=e[r]+t+65535;t=Math.floor(i/65536),e[r]=i-65536*t}e[0]+=t-1+37*(t-1)}function f(e,t,r){let i=~(r-1);for(let r=0;r<16;r++){let n=i&(e[r]^t[r]);e[r]^=n,t[r]^=n}}function g(e,t){let r=n(),i=n();for(let e=0;e<16;e++)i[e]=t[e];p(i),p(i),p(i);for(let e=0;e<2;e++){r[0]=i[0]-65517;for(let e=1;e<15;e++)r[e]=i[e]-65535-(r[e-1]>>16&1),r[e-1]&=65535;r[15]=i[15]-32767-(r[14]>>16&1);let e=r[15]>>16&1;r[14]&=65535,f(i,r,1-e)}for(let t=0;t<16;t++)e[2*t]=255&i[t],e[2*t+1]=i[t]>>8}function b(e,t){let r=0;for(let i=0;i<32;i++)r|=e[i]^t[i];return(1&r-1>>>8)-1}function y(e,t){let r=new Uint8Array(32),i=new Uint8Array(32);return g(r,e),g(i,t),b(r,i)}function w(e){let t=new Uint8Array(32);return g(t,e),1&t[0]}function v(e,t,r){for(let i=0;i<16;i++)e[i]=t[i]+r[i]}function _(e,t,r){for(let i=0;i<16;i++)e[i]=t[i]-r[i]}function x(e,t,r){let i,n,o=0,a=0,s=0,c=0,l=0,u=0,d=0,h=0,p=0,f=0,g=0,m=0,b=0,y=0,w=0,v=0,_=0,x=0,E=0,C=0,k=0,P=0,I=0,S=0,A=0,T=0,O=0,R=0,N=0,M=0,$=0,j=r[0],L=r[1],B=r[2],D=r[3],U=r[4],F=r[5],H=r[6],z=r[7],q=r[8],W=r[9],V=r[10],G=r[11],Z=r[12],K=r[13],Y=r[14],J=r[15];i=t[0],o+=i*j,a+=i*L,s+=i*B,c+=i*D,l+=i*U,u+=i*F,d+=i*H,h+=i*z,p+=i*q,f+=i*W,g+=i*V,m+=i*G,b+=i*Z,y+=i*K,w+=i*Y,v+=i*J,i=t[1],a+=i*j,s+=i*L,c+=i*B,l+=i*D,u+=i*U,d+=i*F,h+=i*H,p+=i*z,f+=i*q,g+=i*W,m+=i*V,b+=i*G,y+=i*Z,w+=i*K,v+=i*Y,_+=i*J,i=t[2],s+=i*j,c+=i*L,l+=i*B,u+=i*D,d+=i*U,h+=i*F,p+=i*H,f+=i*z,g+=i*q,m+=i*W,b+=i*V,y+=i*G,w+=i*Z,v+=i*K,_+=i*Y,x+=i*J,i=t[3],c+=i*j,l+=i*L,u+=i*B,d+=i*D,h+=i*U,p+=i*F,f+=i*H,g+=i*z,m+=i*q,b+=i*W,y+=i*V,w+=i*G,v+=i*Z,_+=i*K,x+=i*Y,E+=i*J,i=t[4],l+=i*j,u+=i*L,d+=i*B,h+=i*D,p+=i*U,f+=i*F,g+=i*H,m+=i*z,b+=i*q,y+=i*W,w+=i*V,v+=i*G,_+=i*Z,x+=i*K,E+=i*Y,C+=i*J,i=t[5],u+=i*j,d+=i*L,h+=i*B,p+=i*D,f+=i*U,g+=i*F,m+=i*H,b+=i*z,y+=i*q,w+=i*W,v+=i*V,_+=i*G,x+=i*Z,E+=i*K,C+=i*Y,k+=i*J,i=t[6],d+=i*j,h+=i*L,p+=i*B,f+=i*D,g+=i*U,m+=i*F,b+=i*H,y+=i*z,w+=i*q,v+=i*W,_+=i*V,x+=i*G,E+=i*Z,C+=i*K,k+=i*Y,P+=i*J,i=t[7],h+=i*j,p+=i*L,f+=i*B,g+=i*D,m+=i*U,b+=i*F,y+=i*H,w+=i*z,v+=i*q,_+=i*W,x+=i*V,E+=i*G,C+=i*Z,k+=i*K,P+=i*Y,I+=i*J,i=t[8],p+=i*j,f+=i*L,g+=i*B,m+=i*D,b+=i*U,y+=i*F,w+=i*H,v+=i*z,_+=i*q,x+=i*W,E+=i*V,C+=i*G,k+=i*Z,P+=i*K,I+=i*Y,S+=i*J,i=t[9],f+=i*j,g+=i*L,m+=i*B,b+=i*D,y+=i*U,w+=i*F,v+=i*H,_+=i*z,x+=i*q,E+=i*W,C+=i*V,k+=i*G,P+=i*Z,I+=i*K,S+=i*Y,A+=i*J,i=t[10],g+=i*j,m+=i*L,b+=i*B,y+=i*D,w+=i*U,v+=i*F,_+=i*H,x+=i*z,E+=i*q,C+=i*W,k+=i*V,P+=i*G,I+=i*Z,S+=i*K,A+=i*Y,T+=i*J,i=t[11],m+=i*j,b+=i*L,y+=i*B,w+=i*D,v+=i*U,_+=i*F,x+=i*H,E+=i*z,C+=i*q,k+=i*W,P+=i*V,I+=i*G,S+=i*Z,A+=i*K,T+=i*Y,O+=i*J,i=t[12],b+=i*j,y+=i*L,w+=i*B,v+=i*D,_+=i*U,x+=i*F,E+=i*H,C+=i*z,k+=i*q,P+=i*W,I+=i*V,S+=i*G,A+=i*Z,T+=i*K,O+=i*Y,R+=i*J,i=t[13],y+=i*j,w+=i*L,v+=i*B,_+=i*D,x+=i*U,E+=i*F,C+=i*H,k+=i*z,P+=i*q,I+=i*W,S+=i*V,A+=i*G,T+=i*Z,O+=i*K,R+=i*Y,N+=i*J,i=t[14],w+=i*j,v+=i*L,_+=i*B,x+=i*D,E+=i*U,C+=i*F,k+=i*H,P+=i*z,I+=i*q,S+=i*W,A+=i*V,T+=i*G,O+=i*Z,R+=i*K,N+=i*Y,M+=i*J,i=t[15],v+=i*j,_+=i*L,x+=i*B,E+=i*D,C+=i*U,k+=i*F,P+=i*H,I+=i*z,S+=i*q,A+=i*W,T+=i*V,O+=i*G,R+=i*Z,N+=i*K,M+=i*Y,$+=i*J,o+=38*_,a+=38*x,s+=38*E,c+=38*C,l+=38*k,u+=38*P,d+=38*I,h+=38*S,p+=38*A,f+=38*T,g+=38*O,m+=38*R,b+=38*N,y+=38*M,w+=38*$,n=1,i=o+n+65535,n=Math.floor(i/65536),o=i-65536*n,i=a+n+65535,n=Math.floor(i/65536),a=i-65536*n,i=s+n+65535,n=Math.floor(i/65536),s=i-65536*n,i=c+n+65535,n=Math.floor(i/65536),c=i-65536*n,i=l+n+65535,n=Math.floor(i/65536),l=i-65536*n,i=u+n+65535,n=Math.floor(i/65536),u=i-65536*n,i=d+n+65535,n=Math.floor(i/65536),d=i-65536*n,i=h+n+65535,n=Math.floor(i/65536),h=i-65536*n,i=p+n+65535,n=Math.floor(i/65536),p=i-65536*n,i=f+n+65535,n=Math.floor(i/65536),f=i-65536*n,i=g+n+65535,n=Math.floor(i/65536),g=i-65536*n,i=m+n+65535,n=Math.floor(i/65536),m=i-65536*n,i=b+n+65535,n=Math.floor(i/65536),b=i-65536*n,i=y+n+65535,n=Math.floor(i/65536),y=i-65536*n,i=w+n+65535,n=Math.floor(i/65536),w=i-65536*n,i=v+n+65535,n=Math.floor(i/65536),v=i-65536*n,o+=n-1+37*(n-1),n=1,i=o+n+65535,n=Math.floor(i/65536),o=i-65536*n,i=a+n+65535,n=Math.floor(i/65536),a=i-65536*n,i=s+n+65535,n=Math.floor(i/65536),s=i-65536*n,i=c+n+65535,n=Math.floor(i/65536),c=i-65536*n,i=l+n+65535,n=Math.floor(i/65536),l=i-65536*n,i=u+n+65535,n=Math.floor(i/65536),u=i-65536*n,i=d+n+65535,n=Math.floor(i/65536),d=i-65536*n,i=h+n+65535,n=Math.floor(i/65536),h=i-65536*n,i=p+n+65535,n=Math.floor(i/65536),p=i-65536*n,i=f+n+65535,n=Math.floor(i/65536),f=i-65536*n,i=g+n+65535,n=Math.floor(i/65536),g=i-65536*n,i=m+n+65535,n=Math.floor(i/65536),m=i-65536*n,i=b+n+65535,n=Math.floor(i/65536),b=i-65536*n,i=y+n+65535,n=Math.floor(i/65536),y=i-65536*n,i=w+n+65535,n=Math.floor(i/65536),w=i-65536*n,i=v+n+65535,n=Math.floor(i/65536),v=i-65536*n,o+=n-1+37*(n-1),e[0]=o,e[1]=a,e[2]=s,e[3]=c,e[4]=l,e[5]=u,e[6]=d,e[7]=h,e[8]=p,e[9]=f,e[10]=g,e[11]=m,e[12]=b,e[13]=y,e[14]=w,e[15]=v}function E(e,t){x(e,t,t)}function C(e,t){let r,i=n();for(r=0;r<16;r++)i[r]=t[r];for(r=253;r>=0;r--)E(i,i),2!==r&&4!==r&&x(i,i,t);for(r=0;r<16;r++)e[r]=i[r]}function k(e,t){let r=n(),i=n(),o=n(),a=n(),s=n(),l=n(),u=n(),d=n(),h=n();_(r,e[1],e[0]),_(h,t[1],t[0]),x(r,r,h),v(i,e[0],e[1]),v(h,t[0],t[1]),x(i,i,h),x(o,e[3],t[3]),x(o,o,c),x(a,e[2],t[2]),v(a,a,a),_(s,i,r),_(l,a,o),v(u,a,o),v(d,i,r),x(e[0],s,l),x(e[1],d,u),x(e[2],u,l),x(e[3],s,d)}function P(e,t,r){for(let i=0;i<4;i++)f(e[i],t[i],r)}function I(e,t){let r=n(),i=n(),o=n();C(o,t[2]),x(r,t[0],o),x(i,t[1],o),g(e,i),e[31]^=w(r)<<7}function A(e,t,r){h(e[0],o),h(e[1],a),h(e[2],a),h(e[3],o);for(let i=255;i>=0;--i){let n=r[i/8|0]>>(7&i)&1;P(e,t,n),k(t,e),k(e,e),P(e,t,n)}}function T(e,t){let r=[n(),n(),n(),n()];h(r[0],l),h(r[1],u),h(r[2],a),x(r[3],l,u),A(e,r,t)}function O(t){if(t.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);let i=(0,r.hash)(t);i[0]&=248,i[31]&=127,i[31]|=64;let o=new Uint8Array(32),a=[n(),n(),n(),n()];T(a,i),I(o,a);let s=new Uint8Array(64);return s.set(t),s.set(o,32),{publicKey:o,secretKey:s}}e.generateKeyPairFromSeed=O,e.generateKeyPair=function(e){let r=(0,t.randomBytes)(32,e),n=O(r);return(0,i.wipe)(r),n},e.extractPublicKeyFromSecretKey=function(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(t.subarray(32))};var R=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function N(e,t){let r,i,n,o;for(i=63;i>=32;--i){for(r=0,n=i-32,o=i-12;n<o;++n)t[n]+=r-16*t[i]*R[n-(i-32)],r=Math.floor((t[n]+128)/256),t[n]-=256*r;t[n]+=r,t[i]=0}for(r=0,n=0;n<32;n++)t[n]+=r-(t[31]>>4)*R[n],r=t[n]>>8,t[n]&=255;for(n=0;n<32;n++)t[n]-=r*R[n];for(i=0;i<32;i++)t[i+1]+=t[i]>>8,e[i]=255&t[i]}function M(e){let t=new Float64Array(64);for(let r=0;r<64;r++)t[r]=e[r];for(let t=0;t<64;t++)e[t]=0;N(e,t)}function $(e,t){let r=n(),i=n(),c=n(),l=n(),u=n(),p=n(),f=n();return h(e[2],a),function(e,t){for(let r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}(e[1],t),E(c,e[1]),x(l,c,s),_(c,c,e[2]),v(l,e[2],l),E(u,l),E(p,u),x(f,p,u),x(r,f,c),x(r,r,l),function(e,t){let r,i=n();for(r=0;r<16;r++)i[r]=t[r];for(r=250;r>=0;r--)E(i,i),1!==r&&x(i,i,t);for(r=0;r<16;r++)e[r]=i[r]}(r,r),x(r,r,c),x(r,r,l),x(r,r,l),x(e[0],r,l),E(i,e[0]),x(i,i,l),y(i,c)&&x(e[0],e[0],d),E(i,e[0]),x(i,i,l),y(i,c)?-1:(w(e[0])===t[31]>>7&&_(e[0],o,e[0]),x(e[3],e[0],e[1]),0)}e.sign=function(e,t){let i=new Float64Array(64),o=[n(),n(),n(),n()],a=(0,r.hash)(e.subarray(0,32));a[0]&=248,a[31]&=127,a[31]|=64;let s=new Uint8Array(64);s.set(a.subarray(32),32);let c=new r.SHA512;c.update(s.subarray(32)),c.update(t);let l=c.digest();c.clean(),M(l),T(o,l),I(s,o),c.reset(),c.update(s.subarray(0,32)),c.update(e.subarray(32)),c.update(t);let u=c.digest();M(u);for(let e=0;e<32;e++)i[e]=l[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)i[e+t]+=u[e]*a[t];return N(s.subarray(32),i),s},e.verify=function(t,i,o){let a=new Uint8Array(32),s=[n(),n(),n(),n()],c=[n(),n(),n(),n()];if(o.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if($(c,t))return!1;let l=new r.SHA512;l.update(o.subarray(0,32)),l.update(t),l.update(i);let u=l.digest();return M(u),A(s,c,u),T(c,o.subarray(32)),k(s,c),I(a,s),!b(o,a)},e.convertPublicKeyToX25519=function(e){let t=[n(),n(),n(),n()];if($(t,e))throw new Error("Ed25519: invalid public key");let r=n(),i=n(),o=t[1];v(r,a,o),_(i,a,o),C(i,i),x(r,r,i);let s=new Uint8Array(32);return g(s,r),s},e.convertSecretKeyToX25519=function(e){let t=(0,r.hash)(e.subarray(0,32));t[0]&=248,t[31]&=127,t[31]|=64;let n=new Uint8Array(t.subarray(0,32));return(0,i.wipe)(t),n}})),rs=a((()=>{Ua="EdDSA",Fa="JWT",Ha=".",za="base64url",qa="utf8",Wa="utf8",Va=":",Ga="did",Za="key",Ka="base58btc",Ya="z",Ja="K36"}));function is(e){return hr(ur(Fo(e),qa),za)}function ns(e){let t=ur(Ja,Ka),r=Ya+hr(j([t,e]),Ka);return[Ga,Za,r].join(Va)}function os(e){return hr(e,za)}var as=a((()=>{L(),pr(),dr(),qo(),rs()}));function ss(e=(0,us.randomBytes)(32)){return ls.generateKeyPairFromSeed(e)}async function cs(e,t,r,i,n=(0,ds.fromMiliseconds)(Date.now())){let o={alg:Ua,typ:Fa},a={iss:ns(i.publicKey),sub:e,aud:t,iat:n,exp:n+r},s=function(e){return ur([is(e.header),is(e.payload)].join(Ha),Wa)}({header:o,payload:a});return function(e){return[is(e.header),is(e.payload),os(e.signature)].join(Ha)}({header:o,payload:a,signature:ls.sign(i.secretKey,s)})}var ls,us,ds,hs,ps,fs,gs,ms,bs,ys,ws,vs,_s,xs=a((()=>{ls=d(ts()),us=d(S()),ds=d(di()),rs(),as()})),Es=a((()=>{})),Cs=a((()=>{xs(),rs(),Es(),as()})),ks=a((()=>{ys=[-32700,-32600,-32601,-32602,-32603],ws=[-32e3,-32099],vs={[hs="PARSE_ERROR"]:{code:-32700,message:"Parse error"},[ps="INVALID_REQUEST"]:{code:-32600,message:"Invalid Request"},[fs="METHOD_NOT_FOUND"]:{code:-32601,message:"Method not found"},[gs="INVALID_PARAMS"]:{code:-32602,message:"Invalid params"},[ms="INTERNAL_ERROR"]:{code:-32603,message:"Internal error"},[bs="SERVER_ERROR"]:{code:-32e3,message:"Server error"}},_s=bs}));function Ps(e){return e<=ws[0]&&e>=ws[1]}function Is(e){return ys.includes(e)}function Ss(e){return"number"==typeof e}function As(e){return Object.keys(vs).includes(e)?vs[e]:vs[_s]}function Ts(e){return Object.values(vs).find((t=>t.code===e))||vs[_s]}function Os(e){if(typeof e.error.code>"u")return{valid:!1,error:"Missing code for JSON-RPC error"};if(typeof e.error.message>"u")return{valid:!1,error:"Missing message for JSON-RPC error"};if(!Ss(e.error.code))return{valid:!1,error:`Invalid error code type for JSON-RPC: ${e.error.code}`};if(Is(e.error.code)){let t=Ts(e.error.code);if(t.message!==vs[_s].message&&e.error.message===t.message)return{valid:!1,error:`Invalid error code message for JSON-RPC: ${e.error.code}`}}return{valid:!0}}function Rs(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${t}`):e}var Ns=a((()=>{ks()})),Ms=s((e=>{"use strict";function t(){return(null==global?void 0:global.crypto)||(null==global?void 0:global.msCrypto)||{}}function r(){let e=t();return e.subtle||e.webkitSubtle}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowserCryptoAvailable=e.getSubtleCrypto=e.getBrowerCrypto=void 0,e.getBrowerCrypto=t,e.getSubtleCrypto=r,e.isBrowserCryptoAvailable=function(){return!!t()&&!!r()}})),$s=s((e=>{"use strict";function t(){return typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product}function r(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowser=e.isNode=e.isReactNative=void 0,e.isReactNative=t,e.isNode=r,e.isBrowser=function(){return!t()&&!r()}})),js=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=(ti(),h(Ar));t.__exportStar(Ms(),e),t.__exportStar($s(),e)})),Ls={};c(Ls,{isNodeJs:()=>Ds});var Bs,Ds,Us=a((()=>{Bs=d(js()),u(Ls,d(js())),Ds=Bs.isNode}));function Fs(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function Hs(e=6){return BigInt(Fs(e))}function zs(e,t,r){return{id:r||Fs(),jsonrpc:"2.0",method:e,params:t}}function qs(e,t){return{id:e,jsonrpc:"2.0",result:t}}function Ws(e,t,r){return{id:e,jsonrpc:"2.0",error:Vs(t,r)}}function Vs(e,t){return typeof e>"u"?As(ms):("string"==typeof e&&(e=Object.assign(Object.assign({},As(bs)),{message:e})),typeof t<"u"&&(e.data=t),Is(e.code)&&(e=Ts(e.code)),e)}var Gs=a((()=>{Ns(),ks()}));function Zs(e){return e.includes("*")?Ys(e):!/\W/g.test(e)}function Ks(e){return"*"===e}function Ys(e){return!!Ks(e)||!(!e.includes("*")||2!==e.split("*").length||1!==e.split("*").filter((e=>""===e.trim())).length)}function Js(e){return!Ks(e)&&Ys(e)&&!e.split("*")[0].trim()}function Qs(e){return!Ks(e)&&Ys(e)&&!e.split("*")[1].trim()}var Xs,ec,tc,rc,ic=a((()=>{})),nc=a((()=>{})),oc=a((()=>{Xs=class{}})),ac=a((()=>{oc(),ec=class extends Xs{constructor(e){super()}},tc=class extends Xs{constructor(){super()}},rc=class extends tc{constructor(e){super()}}})),sc=a((()=>{})),cc=a((()=>{nc(),oc(),ac(),sc()})),lc=a((()=>{cc()}));function uc(e,t){let r=function(e){let t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return!(typeof r>"u")&&new RegExp(t).test(r)}function dc(e){return uc(e,fc)}function hc(e){return uc(e,gc)}function pc(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}var fc,gc,mc=a((()=>{fc="^https?:",gc="^wss?:"}));function bc(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function yc(e){return bc(e)&&"method"in e}function wc(e){return bc(e)&&(vc(e)||_c(e))}function vc(e){return"result"in e}function _c(e){return"error"in e}function xc(e){return"error"in e&&!1===e.valid}var Ec=a((()=>{})),Cc={};c(Cc,{DEFAULT_ERROR:()=>_s,IBaseJsonRpcProvider:()=>tc,IEvents:()=>Xs,IJsonRpcConnection:()=>ec,IJsonRpcProvider:()=>rc,INTERNAL_ERROR:()=>ms,INVALID_PARAMS:()=>gs,INVALID_REQUEST:()=>ps,METHOD_NOT_FOUND:()=>fs,PARSE_ERROR:()=>hs,RESERVED_ERROR_CODES:()=>ys,SERVER_ERROR:()=>bs,SERVER_ERROR_CODE_RANGE:()=>ws,STANDARD_ERROR_MAP:()=>vs,formatErrorMessage:()=>Vs,formatJsonRpcError:()=>Ws,formatJsonRpcRequest:()=>zs,formatJsonRpcResult:()=>qs,getBigIntRpcId:()=>Hs,getError:()=>As,getErrorByCode:()=>Ts,isHttpUrl:()=>dc,isJsonRpcError:()=>_c,isJsonRpcPayload:()=>bc,isJsonRpcRequest:()=>yc,isJsonRpcResponse:()=>wc,isJsonRpcResult:()=>vc,isJsonRpcValidationInvalid:()=>xc,isLocalhostUrl:()=>pc,isNodeJs:()=>Ds,isReservedErrorCode:()=>Is,isServerErrorCode:()=>Ps,isValidDefaultRoute:()=>Ks,isValidErrorCode:()=>Ss,isValidLeadingWildcardRoute:()=>Js,isValidRoute:()=>Zs,isValidTrailingWildcardRoute:()=>Qs,isValidWildcardRoute:()=>Ys,isWsUrl:()=>hc,parseConnectionError:()=>Rs,payloadId:()=>Fs,validateJsonRpcError:()=>Os});var kc,Pc,Ic,Sc,Ac,Tc,Oc,Rc=a((()=>{ks(),Ns(),Us(),u(Cc,Ls),Gs(),ic(),lc(),mc(),Ec()})),Nc=a((()=>{kc=d(p()),Rc(),Pc=class extends rc{constructor(e){super(e),this.events=new kc.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(zs(e.method,e.params||[],e.id||Hs().toString()),t)}async requestStrict(e,t){return new Promise((async(r,i)=>{if(!this.connection.connected)try{await this.open()}catch(e){i(e)}this.events.on(`${e.id}`,(e=>{_c(e)?i(e.error):r(e.result)}));try{await this.connection.send(e,t)}catch(e){i(e)}}))}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),wc(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(e=>this.onClose(e))),this.connection.on("error",(e=>this.events.emit("error",e))),this.connection.on("register_error",(e=>this.onClose())),this.hasRegisteredEventListeners=!0)}}})),Mc=a((()=>{Nc(),Nc()})),$c=s(((e,t)=>{"use strict";t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}})),jc=a((()=>{Ic=d(p()),qo(),Rc(),Sc=()=>typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",Ac=e=>e.split("?")[0],10,Tc=(()=>typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:$c())(),Oc=class{constructor(e){if(this.url=e,this.events=new Ic.EventEmitter,this.registering=!1,!hc(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise(((e,t)=>{typeof this.socket>"u"?t(new Error("Connection already closed")):(this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close())}))}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(Fo(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!hc(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){let e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return t(new Error("WebSocket connection is missing or invalid"));e(this.socket)}))}))}return this.url=e,this.registering=!0,new Promise(((t,r)=>{let i=new URLSearchParams(e).get("origin"),n=(0,Cc.isReactNative)()?{headers:{origin:i}}:{rejectUnauthorized:!pc(e)},o=new Tc(e,[],n);Sc()?o.onerror=e=>{let t=e;r(this.emitError(t.error))}:o.on("error",(e=>{r(this.emitError(e))})),o.onopen=()=>{this.onOpen(o),t(o)}}))}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;let t="string"==typeof e.data?Uo(e.data):e.data;this.events.emit("payload",t)}onError(e,t){let r=this.parseError(t),i=Ws(e,r.message||r.toString());this.events.emit("payload",i)}parseError(e,t=this.url){return Rs(e,Ac(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){let t=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${Ac(this.url)}`));return this.events.emit("register_error",t),t}}})),Lc=s(((e,t)=>{var r="__lodash_hash_undefined__",i=1,n=2,o=9007199254740991,a="[object Arguments]",s="[object Array]",c="[object AsyncFunction]",l="[object Boolean]",u="[object Date]",d="[object Error]",h="[object Function]",p="[object GeneratorFunction]",f="[object Map]",g="[object Number]",m="[object Null]",b="[object Object]",y="[object Promise]",w="[object Proxy]",v="[object RegExp]",_="[object Set]",x="[object String]",E="[object Symbol]",C="[object Undefined]",k="[object WeakMap]",P="[object ArrayBuffer]",I="[object DataView]",S=/^\[object .+?Constructor\]$/,A=/^(?:0|[1-9]\d*)$/,T={};T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T[a]=T[s]=T[P]=T[l]=T[I]=T[u]=T[d]=T[h]=T[f]=T[g]=T[b]=T[v]=T[_]=T[x]=T[k]=!1;var O="object"==typeof global&&global&&global.Object===Object&&global,R="object"==typeof self&&self&&self.Object===Object&&self,N=O||R||Function("return this")(),M="object"==typeof e&&e&&!e.nodeType&&e,$=M&&"object"==typeof t&&t&&!t.nodeType&&t,j=$&&$.exports===M,L=j&&O.process,B=function(){try{return L&&L.binding&&L.binding("util")}catch{}}(),D=B&&B.isTypedArray;function U(e,t){for(var r=-1,i=null==e?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function F(e,t){return e.has(t)}function H(e){var t=-1,r=Array(e.size);return e.forEach((function(e,i){r[++t]=[i,e]})),r}function z(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var q,W=Array.prototype,V=Function.prototype,G=Object.prototype,Z=N["__core-js_shared__"],K=V.toString,Y=G.hasOwnProperty,J=(q=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||""))?"Symbol(src)_1."+q:"",Q=G.toString,X=RegExp("^"+K.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=j?N.Buffer:void 0,te=N.Symbol,re=N.Uint8Array,ie=G.propertyIsEnumerable,ne=W.splice,oe=te?te.toStringTag:void 0,ae=Object.getOwnPropertySymbols,se=ee?ee.isBuffer:void 0,ce=function(e,t){return function(r){return e(t(r))}}(Object.keys,Object),le=Le(N,"DataView"),ue=Le(N,"Map"),de=Le(N,"Promise"),he=Le(N,"Set"),pe=Le(N,"WeakMap"),fe=Le(Object,"create"),ge=Fe(le),me=Fe(ue),be=Fe(de),ye=Fe(he),we=Fe(pe),ve=te?te.prototype:void 0,_e=ve?ve.valueOf:void 0;function xe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function Ee(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function Ce(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function ke(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Ce;++t<r;)this.add(e[t])}function Pe(e){var t=this.__data__=new Ee(e);this.size=t.size}function Ie(e,t){var r=qe(e),i=!r&&ze(e),n=!r&&!i&&We(e),o=!r&&!i&&!n&&Ye(e),a=r||i||n||o,s=a?function(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}(e.length,String):[],c=s.length;for(var l in e)(t||Y.call(e,l))&&(!a||!("length"==l||n&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ue(l,c)))&&s.push(l);return s}function Se(e,t){for(var r=e.length;r--;)if(He(e[r][0],t))return r;return-1}function Ae(e){return null==e?void 0===e?C:m:oe&&oe in Object(e)?function(e){var t=Y.call(e,oe),r=e[oe];try{e[oe]=void 0;var i=!0}catch{}var n=Q.call(e);return i&&(t?e[oe]=r:delete e[oe]),n}(e):function(e){return Q.call(e)}(e)}function Te(e){return Ke(e)&&Ae(e)==a}function Oe(e,t,r,o,c){return e===t||(null==e||null==t||!Ke(e)&&!Ke(t)?e!=e&&t!=t:function(e,t,r,o,c,h){var p=qe(e),m=qe(t),y=p?s:De(e),w=m?s:De(t),C=(y=y==a?b:y)==b,k=(w=w==a?b:w)==b,S=y==w;if(S&&We(e)){if(!We(t))return!1;p=!0,C=!1}if(S&&!C)return h||(h=new Pe),p||Ye(e)?Me(e,t,r,o,c,h):function(e,t,r,o,a,s,c){switch(r){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case P:return!(e.byteLength!=t.byteLength||!s(new re(e),new re(t)));case l:case u:case g:return He(+e,+t);case d:return e.name==t.name&&e.message==t.message;case v:case x:return e==t+"";case f:var h=H;case _:var p=o&i;if(h||(h=z),e.size!=t.size&&!p)return!1;var m=c.get(e);if(m)return m==t;o|=n,c.set(e,t);var b=Me(h(e),h(t),o,a,s,c);return c.delete(e),b;case E:if(_e)return _e.call(e)==_e.call(t)}return!1}(e,t,y,r,o,c,h);if(!(r&i)){var A=C&&Y.call(e,"__wrapped__"),T=k&&Y.call(t,"__wrapped__");if(A||T){var O=A?e.value():e,R=T?t.value():t;return h||(h=new Pe),c(O,R,r,o,h)}}return!!S&&(h||(h=new Pe),function(e,t,r,n,o,a){var s=r&i,c=$e(e),l=c.length,u=$e(t),d=u.length;if(l!=d&&!s)return!1;for(var h=l;h--;){var p=c[h];if(!(s?p in t:Y.call(t,p)))return!1}var f=a.get(e);if(f&&a.get(t))return f==t;var g=!0;a.set(e,t),a.set(t,e);for(var m=s;++h<l;){var b=e[p=c[h]],y=t[p];if(n)var w=s?n(y,b,p,t,e,a):n(b,y,p,e,t,a);if(!(void 0===w?b===y||o(b,y,r,n,a):w)){g=!1;break}m||(m="constructor"==p)}if(g&&!m){var v=e.constructor,_=t.constructor;v!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof _&&_ instanceof _)&&(g=!1)}return a.delete(e),a.delete(t),g}(e,t,r,o,c,h))}(e,t,r,o,Oe,c))}function Re(e){return!(!Ze(e)||function(e){return!!J&&J in e}(e))&&(Ve(e)?X:S).test(Fe(e))}function Ne(e){if(!function(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||G;return e===r}(e))return ce(e);var t=[];for(var r in Object(e))Y.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Me(e,t,r,o,a,s){var c=r&i,l=e.length,u=t.length;if(l!=u&&!(c&&u>l))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var h=-1,p=!0,f=r&n?new ke:void 0;for(s.set(e,t),s.set(t,e);++h<l;){var g=e[h],m=t[h];if(o)var b=c?o(m,g,h,t,e,s):o(g,m,h,e,t,s);if(void 0!==b){if(b)continue;p=!1;break}if(f){if(!U(t,(function(e,t){if(!F(f,t)&&(g===e||a(g,e,r,o,s)))return f.push(t)}))){p=!1;break}}else if(g!==m&&!a(g,m,r,o,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function $e(e){return function(e,t,r){var i=t(e);return qe(e)?i:function(e,t){for(var r=-1,i=t.length,n=e.length;++r<i;)e[n+r]=t[r];return e}(i,r(e))}(e,Je,Be)}function je(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function Le(e,t){var r=function(e,t){return e?.[t]}(e,t);return Re(r)?r:void 0}xe.prototype.clear=function(){this.__data__=fe?fe(null):{},this.size=0},xe.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},xe.prototype.get=function(e){var t=this.__data__;if(fe){var i=t[e];return i===r?void 0:i}return Y.call(t,e)?t[e]:void 0},xe.prototype.has=function(e){var t=this.__data__;return fe?void 0!==t[e]:Y.call(t,e)},xe.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=fe&&void 0===t?r:t,this},Ee.prototype.clear=function(){this.__data__=[],this.size=0},Ee.prototype.delete=function(e){var t=this.__data__,r=Se(t,e);return!(r<0)&&(r==t.length-1?t.pop():ne.call(t,r,1),--this.size,!0)},Ee.prototype.get=function(e){var t=this.__data__,r=Se(t,e);return r<0?void 0:t[r][1]},Ee.prototype.has=function(e){return Se(this.__data__,e)>-1},Ee.prototype.set=function(e,t){var r=this.__data__,i=Se(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this},Ce.prototype.clear=function(){this.size=0,this.__data__={hash:new xe,map:new(ue||Ee),string:new xe}},Ce.prototype.delete=function(e){var t=je(this,e).delete(e);return this.size-=t?1:0,t},Ce.prototype.get=function(e){return je(this,e).get(e)},Ce.prototype.has=function(e){return je(this,e).has(e)},Ce.prototype.set=function(e,t){var r=je(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this},ke.prototype.add=ke.prototype.push=function(e){return this.__data__.set(e,r),this},ke.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.clear=function(){this.__data__=new Ee,this.size=0},Pe.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Pe.prototype.get=function(e){return this.__data__.get(e)},Pe.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ee){var i=r.__data__;if(!ue||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ce(i)}return r.set(e,t),this.size=r.size,this};var Be=ae?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,i=null==e?0:e.length,n=0,o=[];++r<i;){var a=e[r];t(a,r,e)&&(o[n++]=a)}return o}(ae(e),(function(t){return ie.call(e,t)})))}:function(){return[]},De=Ae;function Ue(e,t){return!!(t=t??o)&&("number"==typeof e||A.test(e))&&e>-1&&e%1==0&&e<t}function Fe(e){if(null!=e){try{return K.call(e)}catch{}try{return e+""}catch{}}return""}function He(e,t){return e===t||e!=e&&t!=t}(le&&De(new le(new ArrayBuffer(1)))!=I||ue&&De(new ue)!=f||de&&De(de.resolve())!=y||he&&De(new he)!=_||pe&&De(new pe)!=k)&&(De=function(e){var t=Ae(e),r=t==b?e.constructor:void 0,i=r?Fe(r):"";if(i)switch(i){case ge:return I;case me:return f;case be:return y;case ye:return _;case we:return k}return t});var ze=Te(function(){return arguments}())?Te:function(e){return Ke(e)&&Y.call(e,"callee")&&!ie.call(e,"callee")},qe=Array.isArray;var We=se||function(){return!1};function Ve(e){if(!Ze(e))return!1;var t=Ae(e);return t==h||t==p||t==c||t==w}function Ge(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Ze(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ke(e){return null!=e&&"object"==typeof e}var Ye=D?function(e){return function(t){return e(t)}}(D):function(e){return Ke(e)&&Ge(e.length)&&!!T[Ae(e)]};function Je(e){return function(e){return null!=e&&Ge(e.length)&&!Ve(e)}(e)?Ie(e):Ne(e)}t.exports=function(e,t){return Oe(e,t)}})),Bc=s(((e,t)=>{t.exports=function(e,t){return t=t||{},new Promise((function(r,i){var n=new XMLHttpRequest,o=[],a=[],s={},c=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:c,headers:{keys:function(){return o},entries:function(){return a},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var l in n.open(t.method||"get",e,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,r){o.push(t=t.toLowerCase()),a.push([t,r]),s[t]=s[t]?s[t]+","+r:r})),r(c())},n.onerror=i,n.withCredentials="include"==t.credentials,t.headers)n.setRequestHeader(l,t.headers[l]);n.send(t.body||null)}))}})),Dc=s(((e,t)=>{t.exports=self.fetch||(self.fetch=Bc().default||Bc())}));function Uc(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),i=0;i<r.length;i++)r[i]=255;for(var n=0;n<e.length;n++){var o=e.charAt(n),a=o.charCodeAt(0);if(255!==r[a])throw new TypeError(o+" is ambiguous");r[a]=n}var s=e.length,c=e.charAt(0),l=Math.log(s)/Math.log(256),u=Math.log(256)/Math.log(s);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var i=0,n=0;e[t]===c;)i++,t++;for(var o=(e.length-t)*l+1>>>0,a=new Uint8Array(o);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var d=0,h=o-1;(0!==u||d<n)&&-1!==h;h--,d++)u+=s*a[h]>>>0,a[h]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");n=d,t++}if(" "!==e[t]){for(var p=o-n;p!==o&&0===a[p];)p++;for(var f=new Uint8Array(i+(o-p)),g=i;p!==o;)f[g++]=a[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,i=0,n=0,o=t.length;n!==o&&0===t[n];)n++,r++;for(var a=(o-n)*u+1>>>0,l=new Uint8Array(a);n!==o;){for(var d=t[n],h=0,p=a-1;(0!==d||h<i)&&-1!==p;p--,h++)d+=256*l[p]>>>0,l[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");i=h,n++}for(var f=a-i;f!==a&&0===l[f];)f++;for(var g=c.repeat(r);f<a;++f)g+=e.charAt(l[f]);return g},decodeUnsafe:d,decode:function(e){var r=d(e);if(r)return r;throw new Error(`Non-${t} character`)}}}function Fc(e){return e.reduce(((e,t)=>e+=Wl[t]),"")}function Hc(e){let t=[];for(let r of e){let e=Vl[r.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}function zc(e,t,r){t=t||[];for(var i=r=r||0;e>=Ql;)t[r++]=255&e|Yl,e/=128;for(;e&Jl;)t[r++]=255&e|Yl,e>>>=7;return t[r]=0|e,zc.bytes=r-i+1,t}function qc(e,t){var r,i=0,n=0,o=t=t||0,a=e.length;do{if(o>=a)throw qc.bytes=0,new RangeError("Could not decode varint");r=e[o++],i+=n<28?(r&tu)<<n:(r&tu)*Math.pow(2,n),n+=7}while(r>=eu);return qc.bytes=o-t,i}function Wc(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function Vc(e,t,r,i){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:i}}}var Gc,Zc,Kc,Yc,Jc,Qc,Xc,el,tl,rl,il,nl,ol,al,sl,cl,ll,ul,dl,hl,pl,fl,gl,ml,bl,yl,wl,vl,_l,xl,El,Cl,kl,Pl,Il,Sl,Al,Tl,Ol,Rl,Nl,Ml,$l,jl,Ll,Bl,Dl,Ul,Fl,Hl,zl,ql,Wl,Vl,Gl,Zl,Kl,Yl,Jl,Ql,Xl,eu,tu,ru,iu,nu,ou,au,su,cu,lu,uu,du,hu,pu,fu,gu,mu,bu,yu,wu,vu,_u,xu,Eu,Cu,ku,Pu,Iu,Su,Au,Tu,Ou,Ru,Nu,Mu,$u,ju,Lu,Bu,Du,Uu,Fu,Hu,zu,qu,Wu,Vu,Gu,Zu,Ku,Yu,Ju,Qu,Xu,ed,td,rd,id,nd,od,ad,sd,cd,ld,ud,dd,hd,pd,fd,gd,md,bd,yd,wd,vd,_d,xd,Ed,Cd,kd,Pd,Id,Sd,Ad,Td,Od,Rd,Nd,Md,$d,jd,Ld,Bd,Dd,Ud,Fd,Hd,zd,qd,Wd,Vd,Gd,Zd,Kd,Yd,Jd,Qd,Xd,eh,th,rh,ih,nh,oh,ah,sh,ch,lh,uh,dh,hh,ph,fh,gh,mh=a((()=>{Gc=d(p()),ta(),Zc=d(ua()),Qa(),Xa(),qo(),Cs(),po(),gr(),Kc=d(di()),Mc(),Rc(),jc(),Yc=d(Lc()),Jc=d(Dc()),Qc=Uc,Xc=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},el=e=>(new TextEncoder).encode(e),tl=e=>(new TextDecoder).decode(e),rl=class{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},il=class{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return ol(this,e)}},nl=class{constructor(e){this.decoders=e}or(e){return ol(this,e)}decode(e){let t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},ol=(e,t)=>new nl({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}}),al=class{constructor(e,t,r,i){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=i,this.encoder=new rl(e,t,r),this.decoder=new il(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},cl=({prefix:e,name:t,alphabet:r})=>{let{encode:i,decode:n}=Qc(r,t);return sl({prefix:e,name:t,encode:i,decode:e=>Xc(n(e))})},ll=(e,t,r,i)=>{let n={};for(let e=0;e<t.length;++e)n[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;let a=new Uint8Array(o*r/8|0),s=0,c=0,l=0;for(let t=0;t<o;++t){let o=n[e[t]];if(void 0===o)throw new SyntaxError(`Non-${i} character`);c=c<<r|o,s+=r,s>=8&&(s-=8,a[l++]=255&c>>s)}if(s>=r||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a},ul=(e,t,r)=>{let i="="===t[t.length-1],n=(1<<r)-1,o="",a=0,s=0;for(let i=0;i<e.length;++i)for(s=s<<8|e[i],a+=8;a>r;)a-=r,o+=t[n&s>>a];if(a&&(o+=t[n&s<<r-a]),i)for(;o.length*r&7;)o+="=";return o},dl=({name:e,prefix:t,bitsPerChar:r,alphabet:i})=>sl({prefix:t,name:e,encode:e=>ul(e,i,r),decode:t=>ll(t,i,r,e)}),hl=(sl=({name:e,prefix:t,encode:r,decode:i})=>new al(e,t,r,i))({prefix:"\0",name:"identity",encode:e=>tl(e),decode:e=>el(e)}),pl=Object.freeze({__proto__:null,identity:hl}),fl=dl({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),gl=Object.freeze({__proto__:null,base2:fl}),ml=dl({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),bl=Object.freeze({__proto__:null,base8:ml}),yl=cl({prefix:"9",name:"base10",alphabet:"0123456789"}),wl=Object.freeze({__proto__:null,base10:yl}),vl=dl({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),_l=dl({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),xl=Object.freeze({__proto__:null,base16:vl,base16upper:_l}),El=dl({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Cl=dl({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),kl=dl({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Pl=dl({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Il=dl({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Sl=dl({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Al=dl({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Tl=dl({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Ol=dl({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Rl=Object.freeze({__proto__:null,base32:El,base32upper:Cl,base32pad:kl,base32padupper:Pl,base32hex:Il,base32hexupper:Sl,base32hexpad:Al,base32hexpadupper:Tl,base32z:Ol}),Nl=cl({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Ml=cl({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),$l=Object.freeze({__proto__:null,base36:Nl,base36upper:Ml}),jl=cl({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Ll=cl({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Bl=Object.freeze({__proto__:null,base58btc:jl,base58flickr:Ll}),Dl=dl({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Ul=dl({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Fl=dl({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Hl=dl({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),zl=Object.freeze({__proto__:null,base64:Dl,base64pad:Ul,base64url:Fl,base64urlpad:Hl}),ql=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Wl=ql.reduce(((e,t,r)=>(e[r]=t,e)),[]),Vl=ql.reduce(((e,t,r)=>(e[t.codePointAt(0)]=r,e)),[]),Gl=sl({prefix:"🚀",name:"base256emoji",encode:Fc,decode:Hc}),Zl=Object.freeze({__proto__:null,base256emoji:Gl}),Kl=zc,Yl=128,127,Jl=-128,Ql=Math.pow(2,31),Xl=qc,eu=128,tu=127,ru=Math.pow(2,7),iu=Math.pow(2,14),nu=Math.pow(2,21),ou=Math.pow(2,28),au=Math.pow(2,35),su=Math.pow(2,42),cu=Math.pow(2,49),lu=Math.pow(2,56),uu=Math.pow(2,63),du={encode:Kl,decode:Xl,encodingLength:function(e){return e<ru?1:e<iu?2:e<nu?3:e<ou?4:e<au?5:e<su?6:e<cu?7:e<lu?8:e<uu?9:10}},hu=(e,t,r=0)=>(du.encode(e,t,r),t),pu=e=>du.encodingLength(e),fu=(e,t)=>{let r=t.byteLength,i=pu(e),n=i+pu(r),o=new Uint8Array(n+r);return hu(e,o,0),hu(r,o,i),o.set(t,n),new gu(e,r,t,o)},gu=class{constructor(e,t,r,i){this.code=e,this.size=t,this.digest=r,this.bytes=i}},mu=({name:e,code:t,encode:r})=>new bu(e,t,r),bu=class{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?fu(this.code,t):t.then((e=>fu(this.code,e)))}throw Error("Unknown type, must be binary type")}},wu=mu({name:"sha2-256",code:18,encode:(yu=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)))("SHA-256")}),vu=mu({name:"sha2-512",code:19,encode:yu("SHA-512")}),Object.freeze({__proto__:null,sha256:wu,sha512:vu}),0,"identity",xu=e=>fu(0,_u(e)),Eu={code:0,name:"identity",encode:_u=Xc,digest:xu},Object.freeze({__proto__:null,identity:Eu}),new TextEncoder,new TextDecoder,Cu={...pl,...gl,...bl,...wl,...xl,...Rl,...$l,...Bl,...zl,...Zl},ku=Vc("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Pu=Vc("ascii","a",(e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}),(e=>{let t=function(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?Wc(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}((e=e.substring(1)).length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t})),Iu={utf8:ku,"utf-8":ku,hex:Cu.base16,latin1:Pu,ascii:Pu,binary:Pu,...Cu},"wc",2,Au=`wc@2:${Su="core"}:`,Tu={name:Su,logger:"error"},Ou={database:":memory:"},"crypto",Ru="client_ed25519_seed",Nu=Kc.ONE_DAY,"keychain","0.3","messages","0.3",Mu=Kc.SIX_HOURS,"publisher",$u="irn","error",ju="wss://relay.walletconnect.com",Lu="wss://relay.walletconnect.org","relayer",Bu={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},"_subscription",Du={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},Uu=Kc.ONE_SECOND,"2.11.2",1e4,"0.3","WALLETCONNECT_CLIENT_ID",Fu={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},"subscription","0.3",Hu=1e3*Kc.FIVE_SECONDS,"pairing","0.3",zu={wc_pairingDelete:{req:{ttl:Kc.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:Kc.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:Kc.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:Kc.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:Kc.ONE_DAY,prompt:!1,tag:0},res:{ttl:Kc.ONE_DAY,prompt:!1,tag:0}}},qu={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},Wu={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},"history","0.3","expirer",Vu={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},"0.3",Gu="verify-api",Yu=[Zu="https://verify.walletconnect.com",Ku="https://verify.walletconnect.org"],"echo","https://echo.walletconnect.com",Ju=class{constructor(e,t){this.core=e,this.logger=t,this.keychain=new Map,this.name="keychain",this.version="0.3",this.initialized=!1,this.storagePrefix=Au,this.init=async()=>{if(!this.initialized){let e=await this.getKeyChain();typeof e<"u"&&(this.keychain=e),this.initialized=!0}},this.has=e=>(this.isInitialized(),this.keychain.has(e)),this.set=async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()},this.get=e=>{this.isInitialized();let t=this.keychain.get(e);if(typeof t>"u"){let{message:t}=en("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t},this.del=async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()},this.core=e,this.logger=ga(t,this.name)}get context(){return fa(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,$i(e))}async getKeyChain(){let e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?ji(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){let{message:e}=en("NOT_INITIALIZED",this.name);throw new Error(e)}}},Qu=class{constructor(e,t,r){this.core=e,this.logger=t,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=e=>(this.isInitialized(),this.keychain.has(e)),this.getClientId=async()=>(this.isInitialized(),ns(ss(await this.getClientSeed()).publicKey)),this.generateKeyPair=()=>{this.isInitialized();let e=function(){let e=In.generateKeyPair();return{privateKey:hr(e.secretKey,Mn),publicKey:hr(e.publicKey,Mn)}}();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();let t=ss(await this.getClientSeed()),r=_i();return await cs(r,e,Nu,t)},this.generateSharedKey=(e,t,r)=>{this.isInitialized();let i=function(e,t){let r=In.sharedKey(ur(e,Mn),ur(t,Mn),!0);return hr(new Cn.HKDF(Pn.SHA256,r).expand(Hn),Mn)}(this.getPrivateKey(e),t);return this.setSymKey(i,r)},this.setSymKey=async(e,t)=>{this.isInitialized();let r=t||(i=e,hr((0,Pn.hash)(ur(i,Mn)),Mn));var i;return await this.keychain.set(r,e),r},this.deleteKeyPair=async e=>{this.isInitialized(),await this.keychain.del(e)},this.deleteSymKey=async e=>{this.isInitialized(),await this.keychain.del(e)},this.encode=async(e,t,r)=>{this.isInitialized();let i=Pi(r),n=Fo(t);if(Ii(i)){let t=i.senderPublicKey,r=i.receiverPublicKey;e=await this.generateSharedKey(t,r)}let o=this.getSymKey(e),{type:a,senderPublicKey:s}=i;return Ci({type:a,symKey:o,message:n,senderPublicKey:s})},this.decode=async(e,t,r)=>{this.isInitialized();let i=function(e,t){let r=ki(e);return Pi({type:Ei(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?hr(r.senderPublicKey,Mn):void 0,receiverPublicKey:t?.receiverPublicKey})}(t,r);if(Ii(i)){let t=i.receiverPublicKey,r=i.senderPublicKey;e=await this.generateSharedKey(t,r)}try{let r=function(e){let t=new En.ChaCha20Poly1305(ur(e.symKey,Mn)),{sealed:r,iv:i}=ki(e.encoded),n=t.open(i,r);if(null===n)throw new Error("Failed to decrypt");return hr(n,jn)}({symKey:this.getSymKey(e),encoded:t});return Uo(r)}catch(t){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(t)}},this.getPayloadType=e=>Ei(ki(e).type),this.getPayloadSenderPublicKey=e=>{let t=ki(e);return t.senderPublicKey?hr(t.senderPublicKey,Mn):void 0},this.core=e,this.logger=ga(t,this.name),this.keychain=r||new Ju(this.core,this.logger)}get context(){return fa(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(Ru)}catch{e=_i(),await this.keychain.set(Ru,e)}return function(e,t="utf8"){let r=Iu[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode(`${r.prefix}${e}`):Wc(globalThis.Buffer.from(e,"utf-8"))}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){let{message:e}=en("NOT_INITIALIZED",this.name);throw new Error(e)}}},Xu=class extends Ta{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=Au,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{let e=await this.getRelayerMessages();typeof e<"u"&&(this.messages=e),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}},this.set=async(e,t)=>{this.isInitialized();let r=xi(t),i=this.messages.get(e);return typeof i>"u"&&(i={}),typeof i[r]<"u"||(i[r]=t,this.messages.set(e,i),await this.persist()),r},this.get=e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t},this.has=(e,t)=>(this.isInitialized(),typeof this.get(e)[xi(t)]<"u"),this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=ga(e,this.name),this.core=t}get context(){return fa(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,$i(e))}async getRelayerMessages(){let e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?ji(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){let{message:e}=en("NOT_INITIALIZED",this.name);throw new Error(e)}}},ed=class extends Oa{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new Gc.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,Kc.toMiliseconds)(2*Kc.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(e,t,r)=>{var i;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}});try{let n=r?.ttl||Mu,o=Wi(r),a=r?.prompt||!1,s=r?.tag||0,c=r?.id||Hs().toString(),l={topic:e,message:t,opts:{ttl:n,relay:o,prompt:a,tag:s,id:c}},u=setTimeout((()=>this.queue.set(c,l)),this.publishTimeout);try{await await Bi(this.rpcPublish(e,t,n,o,a,s,c),this.publishTimeout,`Failed to publish payload, please try again. id:${c} tag:${s}`),this.removeRequestFromQueue(c),this.relayer.events.emit(Bu.publish,l)}catch(e){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,null!=(i=r?.internal)&&i.throwOnFailedPublish)throw this.removeRequestFromQueue(c),e;return}finally{clearTimeout(u)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}})}catch(e){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(e),e}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.relayer=e,this.logger=ga(t,this.name),this.registerEventListeners()}get context(){return fa(this.logger)}rpcPublish(e,t,r,i,n,o,a){var s,c,l,u;let d={method:Vi(i.protocol).publish,params:{topic:e,message:t,ttl:r,prompt:n,tag:o},id:a};return on(null==(s=d.params)?void 0:s.prompt)&&(null==(c=d.params)||delete c.prompt),on(null==(l=d.params)?void 0:l.tag)&&(null==(u=d.params)||delete u.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:d}),this.relayer.request(d)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach((async e=>{let{topic:t,message:r,opts:i}=e;await this.publish(t,r,i)}))}registerEventListeners(){this.relayer.core.heartbeat.on(Zc.HEARTBEAT_EVENTS.pulse,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(Bu.connection_stalled);this.checkQueue()})),this.relayer.on(Bu.message_ack,(e=>{this.removeRequestFromQueue(e.id.toString())}))}},td=class{constructor(){this.map=new Map,this.set=(e,t)=>{let r=this.get(e);this.exists(e,t)||this.map.set(e,[...r,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u")return void this.map.delete(e);if(!this.map.has(e))return;let r=this.get(e);if(!this.exists(e,t))return;let i=r.filter((e=>e!==t));i.length?this.map.set(e,i):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}},rd=Object.defineProperty,id=Object.defineProperties,nd=Object.getOwnPropertyDescriptors,od=Object.getOwnPropertySymbols,ad=Object.prototype.hasOwnProperty,sd=Object.prototype.propertyIsEnumerable,cd=(e,t,r)=>t in e?rd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ld=(e,t)=>{for(var r in t||(t={}))ad.call(t,r)&&cd(e,r,t[r]);if(od)for(var r of od(t))sd.call(t,r)&&cd(e,r,t[r]);return e},ud=(e,t)=>id(e,nd(t)),dd=class extends Ma{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new td,this.events=new Gc.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Au,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{let r=Wi(t),i={topic:e,relay:r};this.pending.set(e,i);let n=await this.rpcSubscribe(e,r);return this.onSubscribe(n,i),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}}),n}catch(e){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(e),e}},this.unsubscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),typeof t?.id<"u"?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)},this.isSubscribed=async e=>{if(this.topics.includes(e))return!0;let t=`${this.pendingSubscriptionWatchLabel}_${e}`;return await new Promise(((r,i)=>{let n=new Kc.Watch;n.start(t);let o=setInterval((()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(o),n.stop(t),r(!0)),n.elapsed(t)>=Hu&&(clearInterval(o),n.stop(t),i(new Error("Subscription resolution timeout")))}),this.pollingInterval)})).catch((()=>!1))},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=ga(t,this.name),this.clientId=""}get context(){return fa(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let r=!1;try{r=this.getSubscription(e).topic===t}catch{}return r}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){let r=this.topicMap.get(e);await Promise.all(r.map((async r=>await this.unsubscribeById(e,r,t))))}async unsubscribeById(e,t,r){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}});try{let i=Wi(r);await this.rpcUnsubscribe(e,t,i);let n=tn("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,n),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}})}catch(e){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(e),e}}async rpcSubscribe(e,t){let r={method:Vi(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{await await Bi(this.relayer.request(r),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Bu.connection_stalled)}return xi(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;let t={method:Vi(e[0].relay.protocol).batchSubscribe,params:{topics:e.map((e=>e.topic))}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:t});try{return await await Bi(this.relayer.request(t),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(Bu.connection_stalled)}}rpcUnsubscribe(e,t,r){let i={method:Vi(r.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,t){this.setSubscription(e,ud(ld({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,ld({},e)),this.pending.delete(e.topic)}))}async onUnsubscribe(e,t,r){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,r),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,ld({},t)),this.topicMap.set(t.topic,e),this.events.emit(Fu.created,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});let t=this.subscriptions.get(e);if(!t){let{message:t}=en("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});let r=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(r.topic,e),this.events.emit(Fu.deleted,ud(ld({},r),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Fu.sync)}async reset(){if(this.cached.length){let e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t<e;t++){let e=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(e)}}this.events.emit(Fu.resubscribed)}async restore(){try{let e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){let{message:e}=en("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;let t=await this.rpcBatchSubscribe(e);rn(t)&&this.onBatchSubscribe(t.map(((t,r)=>ud(ld({},e[r]),{id:t}))))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;let e=[];this.pending.forEach((t=>{e.push(t)})),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(Zc.HEARTBEAT_EVENTS.pulse,(async()=>{await this.checkPending()})),this.relayer.on(Bu.connect,(async()=>{await this.onConnect()})),this.relayer.on(Bu.disconnect,(()=>{this.onDisconnect()})),this.events.on(Fu.created,(async e=>{let t=Fu.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(Fu.deleted,(async e=>{let t=Fu.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){let{message:e}=en("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise((e=>{let t=setInterval((()=>{this.restartInProgress||(clearInterval(t),e())}),this.pollingInterval)}))}},hd=Object.defineProperty,pd=Object.getOwnPropertySymbols,fd=Object.prototype.hasOwnProperty,gd=Object.prototype.propertyIsEnumerable,md=(e,t,r)=>t in e?hd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bd=(e,t)=>{for(var r in t||(t={}))fd.call(t,r)&&md(e,r,t[r]);if(pd)for(var r of pd(t))gd.call(t,r)&&md(e,r,t[r]);return e},yd=class extends Ra{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new Gc.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.request=async e=>{this.logger.debug("Publishing Request Payload");let t=e.id;try{await this.toEstablishConnection();let r=this.provider.request(e);return this.requestsInFlight.set(t,{promise:r,request:e}),await r}catch(e){throw this.logger.debug("Failed to Publish Request"),this.logger.error(e),e}finally{this.requestsInFlight.delete(t)}},this.onPayloadHandler=e=>{this.onProviderPayload(e)},this.onConnectHandler=()=>{this.events.emit(Bu.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit(Bu.error,e),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(Du.payload,this.onPayloadHandler),this.provider.on(Du.connect,this.onConnectHandler),this.provider.on(Du.disconnect,this.onDisconnectHandler),this.provider.on(Du.error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?ga(e.logger,this.name):(0,ma.default)(pa({level:e.logger||"error"})),this.messages=new Xu(this.logger,e.core),this.subscriber=new dd(this,this.logger),this.publisher=new ed(this,this.logger),this.relayUrl=e?.relayUrl||ju,this.projectId=e.projectId,this.bundleId=function(){var e;try{return Ai()&&typeof global<"u"&&typeof(null==global?void 0:global.Application)<"u"?null==(e=global.Application)?void 0:e.applicationId:void 0}catch{return}}(),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${Lu}...`),await this.restartTransport(Lu)}this.initialized=!0,setTimeout((async()=>{0===this.subscriber.topics.length&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)}),1e4)}get context(){return fa(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,r){this.isInitialized(),await this.publisher.publish(e,t,r),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var r;this.isInitialized();let i=(null==(r=this.subscriber.topicMap.get(e))?void 0:r[0])||"";if(i)return i;let n,o=t=>{t.topic===e&&(this.subscriber.off(Fu.created,o),n())};return await Promise.all([new Promise((e=>{n=e,this.subscriber.on(Fu.created,o)})),new Promise((async r=>{i=await this.subscriber.subscribe(e,t),r()}))]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.requestsInFlight.size>0&&(this.logger.debug("Waiting for all in-flight requests to finish before closing transport..."),this.requestsInFlight.forEach((async e=>{await e.promise}))),this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await Bi(this.provider.disconnect(),1e3,"provider.disconnect()").catch((()=>this.onProviderDisconnect())):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise((e=>{if(!this.initialized)return e();this.subscriber.once(Fu.resubscribed,(()=>{e()}))})),new Promise((async(e,t)=>{try{await Bi(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(e){return void t(e)}e()}))])}catch(e){this.logger.error(e);let t=e;if(!this.isConnectionStalled(t.message))throw e;this.provider.events.emit(Du.disconnect)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await _n())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(e){return this.staleConnectionErrors.some((t=>e.includes(t)))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();let e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Pc(new Oc(Ni({sdkVersion:"2.11.2",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){let{topic:t,message:r}=e;await this.messages.set(t,r)}async shouldIgnoreMessageEvent(e){let{topic:t,message:r}=e;if(!r||0===r.length)return this.logger.debug(`Ignoring invalid/empty message: ${r}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;let i=this.messages.has(t,r);return i&&this.logger.debug(`Ignoring duplicate message: ${r}`),i}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),yc(e)){if(!e.method.endsWith("_subscription"))return;let t=e.params,{topic:r,message:i,publishedAt:n}=t.data,o={topic:r,message:i,publishedAt:n};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(bd({type:"event",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else wc(e)&&this.events.emit(Bu.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(Bu.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){let t=qs(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(Du.payload,this.onPayloadHandler),this.provider.off(Du.connect,this.onConnectHandler),this.provider.off(Du.disconnect,this.onDisconnectHandler),this.provider.off(Du.error,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(Bu.connection_stalled,(()=>{this.restartTransport().catch((e=>this.logger.error(e)))}));let e=await _n();xn((async t=>{this.initialized&&e!==t&&(e=t,t?await this.restartTransport().catch((e=>this.logger.error(e))):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch((e=>this.logger.error(e)))))}))}onProviderDisconnect(){this.events.emit(Bu.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((async()=>{await this.restartTransport().catch((e=>this.logger.error(e)))}),(0,Kc.toMiliseconds)(Uu)))}isInitialized(){if(!this.initialized){let{message:e}=en("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise((e=>{let t=setInterval((()=>{this.connected&&(clearInterval(t),e())}),this.connectionStatusPollingInterval)}));await this.restartTransport()}}},wd=Object.defineProperty,vd=Object.getOwnPropertySymbols,_d=Object.prototype.hasOwnProperty,xd=Object.prototype.propertyIsEnumerable,Ed=(e,t,r)=>t in e?wd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cd=(e,t)=>{for(var r in t||(t={}))_d.call(t,r)&&Ed(e,r,t[r]);if(vd)for(var r of vd(t))xd.call(t,r)&&Ed(e,r,t[r]);return e},kd=class extends Na{constructor(e,t,r,i=Au,n=void 0){super(e,t,r,i),this.core=e,this.logger=t,this.name=r,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Au,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{var t;this.getKey&&null!==e&&!on(e)?this.map.set(this.getKey(e),e):function(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}(e)?this.map.set(e.id,e):(t=e,t?.topic&&this.map.set(e.topic,e))})),this.cached=[],this.initialized=!0)},this.set=async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())},this.get=e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e)),this.getAll=e=>(this.isInitialized(),e?this.values.filter((t=>Object.keys(e).every((r=>(0,Yc.default)(t[r],e[r]))))):this.values),this.update=async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});let r=Cd(Cd({},this.getData(e)),t);this.map.set(e,r),await this.persist()},this.delete=async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),await this.persist())},this.logger=ga(t,this.name),this.storagePrefix=i,this.getKey=n}get context(){return fa(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){let t=this.map.get(e);if(!t){let{message:t}=en("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{let e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){let{message:e}=en("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){let{message:e}=en("NOT_INITIALIZED",this.name);throw new Error(e)}}},Pd=class{constructor(e,t){this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new Gc.default,this.initialized=!1,this.storagePrefix=Au,this.ignoredPayloadTypes=[Bn],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:e})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...e])]},this.create=async()=>{this.isInitialized();let e=_i(),t=await this.core.crypto.setSymKey(e),r=Fi(Kc.FIVE_MINUTES),i={protocol:$u},n={topic:t,expiry:r,relay:i,active:!1},o=Yi({protocol:this.core.protocol,version:this.core.version,topic:t,symKey:e,relay:i,expiryTimestamp:r});return await this.pairings.set(t,n),await this.core.relayer.subscribe(t),this.core.expirer.set(t,r),{topic:t,uri:o}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);let t,{topic:r,symKey:i,relay:n,expiryTimestamp:o}=Zi(e.uri);if(this.pairings.keys.includes(r)&&(t=this.pairings.get(r),t.active))throw new Error(`Pairing already exists: ${r}. Please try again with a new connection URI.`);let a=o||Fi(Kc.FIVE_MINUTES),s={topic:r,relay:n,expiry:a,active:!1};return await this.pairings.set(r,s),this.core.expirer.set(r,a),e.activatePairing&&await this.activate({topic:r}),this.events.emit(qu.create,s),this.core.crypto.keychain.has(r)||(await this.core.crypto.setSymKey(i,r),await this.core.relayer.subscribe(r,{relay:n})),s},this.activate=async({topic:e})=>{this.isInitialized();let t=Fi(Kc.THIRTY_DAYS);await this.pairings.update(e,{active:!0,expiry:t}),this.core.expirer.set(e,t)},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);let{topic:t}=e;if(this.pairings.keys.includes(t)){let e=await this.sendRequest(t,"wc_pairingPing",{}),{done:r,resolve:i,reject:n}=Li();this.events.once(zi("pairing_ping",e),(({error:e})=>{e?n(e):i()})),await r()}},this.updateExpiry=async({topic:e,expiry:t})=>{this.isInitialized(),await this.pairings.update(e,{expiry:t})},this.updateMetadata=async({topic:e,metadata:t})=>{this.isInitialized(),await this.pairings.update(e,{peerMetadata:t})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);let{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",tn("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,r)=>{let i=zs(t,r),n=await this.core.crypto.encode(e,i),o=zu[t].req;return this.core.history.set(e,i),this.core.relayer.publish(e,n,o),i.id},this.sendResult=async(e,t,r)=>{let i=qs(e,r),n=await this.core.crypto.encode(t,i),o=await this.core.history.get(t,e),a=zu[o.request.method].res;await this.core.relayer.publish(t,n,a),await this.core.history.resolve(i)},this.sendError=async(e,t,r)=>{let i=Ws(e,r),n=await this.core.crypto.encode(t,i),o=await this.core.history.get(t,e),a=zu[o.request.method]?zu[o.request.method].res:zu.unregistered_method.res;await this.core.relayer.publish(t,n,a),await this.core.history.resolve(i)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,tn("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])},this.cleanup=async()=>{let e=this.pairings.getAll().filter((e=>Hi(e.expiry)));await Promise.all(e.map((e=>this.deletePairing(e.topic))))},this.onRelayEventRequest=e=>{let{topic:t,payload:r}=e;switch(r.method){case"wc_pairingPing":return this.onPairingPingRequest(t,r);case"wc_pairingDelete":return this.onPairingDeleteRequest(t,r);default:return this.onUnknownRpcMethodRequest(t,r)}},this.onRelayEventResponse=async e=>{let{topic:t,payload:r}=e,i=(await this.core.history.get(t,r.id)).request.method;return"wc_pairingPing"===i?this.onPairingPingResponse(t,r):this.onUnknownRpcMethodResponse(i)},this.onPairingPingRequest=async(e,t)=>{let{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult(r,e,!0),this.events.emit(qu.ping,{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onPairingPingResponse=(e,t)=>{let{id:r}=t;setTimeout((()=>{vc(t)?this.events.emit(zi("pairing_ping",r),{}):_c(t)&&this.events.emit(zi("pairing_ping",r),{error:t.error})}),500)},this.onPairingDeleteRequest=async(e,t)=>{let{id:r}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit(qu.delete,{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onUnknownRpcMethodRequest=async(e,t)=>{let{id:r,method:i}=t;try{if(this.registeredMethods.includes(i))return;let t=tn("WC_METHOD_UNSUPPORTED",i);await this.sendError(r,e,t),this.logger.error(t)}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onUnknownRpcMethodResponse=e=>{this.registeredMethods.includes(e)||this.logger.error(tn("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{var t;if(!gn(e)){let{message:t}=en("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!function(e){if(an(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}(e.uri)){let{message:t}=en("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}let r=Zi(e.uri);if(null==(t=r?.relay)||!t.protocol){let{message:e}=en("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(e)}if(null==r||!r.symKey){let{message:e}=en("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(e)}if(null!=r&&r.expiryTimestamp&&(0,Kc.toMiliseconds)(r?.expiryTimestamp)<Date.now()){let{message:e}=en("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(e)}},this.isValidPing=async e=>{if(!gn(e)){let{message:t}=en("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}let{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!gn(e)){let{message:t}=en("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}let{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!an(e,!1)){let{message:t}=en("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){let{message:t}=en("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(Hi(this.pairings.get(e).expiry)){await this.deletePairing(e);let{message:t}=en("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=ga(t,this.name),this.pairings=new kd(this.core,this.logger,this.name,this.storagePrefix)}get context(){return fa(this.logger)}isInitialized(){if(!this.initialized){let{message:e}=en("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Bu.message,(async e=>{let{topic:t,message:r}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))return;let i=await this.core.crypto.decode(t,r);try{yc(i)?(this.core.history.set(t,i),this.onRelayEventRequest({topic:t,payload:i})):wc(i)&&(await this.core.history.resolve(i),await this.onRelayEventResponse({topic:t,payload:i}),this.core.history.delete(t,i.id))}catch(e){this.logger.error(e)}}))}registerExpirerEvents(){this.core.expirer.on(Vu.expired,(async e=>{let{topic:t}=Ui(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(qu.expire,{topic:t}))}))}},Id=class extends Aa{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new Gc.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Au,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.records.set(e.id,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(e,t,r)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:r}),this.records.has(t.id))return;let i={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:r,expiry:Fi(Kc.THIRTY_DAYS)};this.records.set(i.id,i),this.events.emit(Wu.created,i)},this.resolve=async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;let t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=_c(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.events.emit(Wu.updated,t))},this.get=async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t)),this.delete=(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach((r=>{if(r.topic===e){if(typeof t<"u"&&r.id!==t)return;this.records.delete(r.id),this.events.emit(Wu.deleted,r)}}))},this.exists=async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=ga(t,this.name)}get context(){return fa(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){let e=[];return this.values.forEach((t=>{if(typeof t.response<"u")return;let r={topic:t.topic,request:zs(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(r)})),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();let t=this.records.get(e);if(!t){let{message:t}=en("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Wu.sync)}async restore(){try{let e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){let{message:e}=en("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(Wu.created,(e=>{let t=Wu.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(Wu.updated,(e=>{let t=Wu.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(Wu.deleted,(e=>{let t=Wu.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.core.heartbeat.on(Zc.HEARTBEAT_EVENTS.pulse,(()=>{this.cleanup()}))}cleanup(){try{this.records.forEach((e=>{(0,Kc.toMiliseconds)(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))}))}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){let{message:e}=en("NOT_INITIALIZED",this.name);throw new Error(e)}}},Sd=class extends $a{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new Gc.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Au,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.expirations.set(e.target,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=e=>{try{let t=this.formatTarget(e);return typeof this.getExpiration(t)<"u"}catch{return!1}},this.set=(e,t)=>{this.isInitialized();let r=this.formatTarget(e),i={target:r,expiry:t};this.expirations.set(r,i),this.checkExpiry(r,i),this.events.emit(Vu.created,{target:r,expiration:i})},this.get=e=>{this.isInitialized();let t=this.formatTarget(e);return this.getExpiration(t)},this.del=e=>{if(this.isInitialized(),this.has(e)){let t=this.formatTarget(e),r=this.getExpiration(t);this.expirations.delete(t),this.events.emit(Vu.deleted,{target:t,expiration:r})}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=ga(t,this.name)}get context(){return fa(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return Di("topic",e);if("number"==typeof e)return function(e){return Di("id",e)}(e);let{message:t}=en("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Vu.sync)}async restore(){try{let e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){let{message:e}=en("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){let t=this.expirations.get(e);if(!t){let{message:t}=en("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}checkExpiry(e,t){let{expiry:r}=t;(0,Kc.toMiliseconds)(r)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(Vu.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(Zc.HEARTBEAT_EVENTS.pulse,(()=>this.checkExpirations())),this.events.on(Vu.created,(e=>{let t=Vu.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(Vu.expired,(e=>{let t=Vu.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(Vu.deleted,(e=>{let t=Vu.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){let{message:e}=en("NOT_INITIALIZED",this.name);throw new Error(e)}}},Ad=class extends ja{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=Gu,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async e=>{if(this.verifyDisabled||Ai()||!Ti())return;let t=this.getVerifyUrl(e?.verifyUrl);this.verifyUrl!==t&&this.removeIframe(),this.verifyUrl=t;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e)}if(!this.initialized){this.removeIframe(),this.verifyUrl=Ku;try{await this.createIframe()}catch(e){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(e),this.verifyDisabled=!0}}},this.register=async e=>{this.initialized?this.sendPost(e.attestationId):(this.addToQueue(e.attestationId),await this.init())},this.resolve=async e=>{if(this.isDevEnv)return"";let t,r=this.getVerifyUrl(e?.verifyUrl);try{t=await this.fetchAttestation(e.attestationId,r)}catch(i){this.logger.info(`failed to resolve attestation: ${e.attestationId} from url: ${r}`),this.logger.info(i),t=await this.fetchAttestation(e.attestationId,Ku)}return t},this.fetchAttestation=async(e,t)=>{this.logger.info(`resolving attestation: ${e} from url: ${t}`);let r=this.startAbortTimer(2*Kc.ONE_SECOND),i=await fetch(`${t}/attestation/${e}`,{signal:this.abortController.signal});return clearTimeout(r),200===i.status?await i.json():void 0},this.addToQueue=e=>{this.queue.push(e)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach((e=>this.sendPost(e))),this.queue=[])},this.sendPost=e=>{var t;try{if(!this.iframe)return;null==(t=this.iframe.contentWindow)||t.postMessage(e,"*"),this.logger.info(`postMessage sent: ${e} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let e,t=r=>{"verify_ready"===r.data&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",t),e())};await Promise.race([new Promise((r=>{if(document.getElementById(Gu))return r();window.addEventListener("message",t);let i=document.createElement("iframe");i.id=Gu,i.src=`${this.verifyUrl}/${this.projectId}`,i.style.display="none",document.body.append(i),this.iframe=i,e=r})),new Promise(((e,r)=>setTimeout((()=>{window.removeEventListener("message",t),r("verify iframe load timeout")}),(0,Kc.toMiliseconds)(Kc.FIVE_SECONDS))))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=e=>{let t=e||Zu;return Yu.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${Zu}`),t=Zu),t},this.logger=ga(t,this.name),this.verifyUrl=Zu,this.abortController=new AbortController,this.isDevEnv=Si()&&process.env.IS_VITEST}get context(){return fa(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout((()=>this.abortController.abort()),(0,Kc.toMiliseconds)(e))}},Td=class extends La{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context="echo",this.registerDeviceToken=async e=>{let{clientId:t,token:r,notificationType:i,enableEncrypted:n=!1}=e,o=`https://echo.walletconnect.com/${this.projectId}/clients`;await(0,Jc.default)(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:i,token:r,always_raw:n})})},this.logger=ga(t,this.context)}},Od=Object.defineProperty,Rd=Object.getOwnPropertySymbols,Nd=Object.prototype.hasOwnProperty,Md=Object.prototype.propertyIsEnumerable,$d=(e,t,r)=>t in e?Od(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jd=(e,t)=>{for(var r in t||(t={}))Nd.call(t,r)&&$d(e,r,t[r]);if(Rd)for(var r of Rd(t))Md.call(t,r)&&$d(e,r,t[r]);return e},Ld=class e extends Sa{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=Su,this.events=new Gc.EventEmitter,this.initialized=!1,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||ju,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";let t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,ma.default)(pa({level:e?.logger||Tu.logger}));this.logger=ga(t,this.name),this.heartbeat=new Zc.HeartBeat,this.crypto=new Qu(this,this.logger,e?.keychain),this.history=new Id(this,this.logger),this.expirer=new Sd(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new Xo(jd(jd({},Ou),e?.storageOptions)),this.relayer=new yd({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new Pd(this,this.logger),this.verify=new Ad(this.projectId||"",this.logger),this.echoClient=new Td(this.projectId||"",this.logger)}static async init(t){let r=new e(t);await r.initialize();let i=await r.crypto.getClientId();return await r.storage.setItem("WALLETCONNECT_CLIENT_ID",i),r}get context(){return fa(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}})),bh=a((()=>{mh(),Qa(),Xa(),po(),Bd=d(p()),Dd=d(di()),Rc(),"wc",2,Fd=`wc@2:${Ud="client"}:`,Hd={name:Ud,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},zd="WALLETCONNECT_DEEPLINK_CHOICE","proposal",qd="Proposal expired","session",Wd=Dd.SEVEN_DAYS,"engine",Vd={wc_sessionPropose:{req:{ttl:Dd.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Dd.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Dd.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Dd.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Dd.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Dd.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Dd.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Dd.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Dd.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Dd.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Dd.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Dd.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Dd.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Dd.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Dd.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Dd.THIRTY_SECONDS,prompt:!1,tag:1115}}},Gd={min:Dd.FIVE_MINUTES,max:Dd.SEVEN_DAYS},Zd={idle:"IDLE",active:"ACTIVE"},"request",Kd=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"],Yd=Object.defineProperty,Jd=Object.defineProperties,Qd=Object.getOwnPropertyDescriptors,Xd=Object.getOwnPropertySymbols,eh=Object.prototype.hasOwnProperty,th=Object.prototype.propertyIsEnumerable,rh=(e,t,r)=>t in e?Yd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ih=(e,t)=>{for(var r in t||(t={}))eh.call(t,r)&&rh(e,r,t[r]);if(Xd)for(var r of Xd(t))th.call(t,r)&&rh(e,r,t[r]);return e},nh=(e,t)=>Jd(e,Qd(t)),oh=class extends Da{constructor(e){super(e),this.name="engine",this.events=new Bd.default,this.initialized=!1,this.ignoredPayloadTypes=[Bn],this.requestQueue={state:Zd.idle,queue:[]},this.sessionRequestQueue={state:Zd.idle,queue:[]},this.requestQueueDelay=Dd.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(Vd)}),this.initialized=!0,setTimeout((()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()}),(0,Dd.toMiliseconds)(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();let t=nh(ih({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);let r,{pairingTopic:i,requiredNamespaces:n,optionalNamespaces:o,sessionProperties:a,relays:s}=t,c=i,l=!1;if(c&&(l=this.client.core.pairing.pairings.get(c).active),!c||!l){let{topic:e,uri:t}=await this.client.core.pairing.create();c=e,r=t}let u=await this.client.core.crypto.generateKeyPair(),d=Vd.wc_sessionPropose.req.ttl||Dd.FIVE_MINUTES,h=Fi(d),p=ih({requiredNamespaces:n,optionalNamespaces:o,relays:s??[{protocol:$u}],proposer:{publicKey:u,metadata:this.client.metadata},expiryTimestamp:h},a&&{sessionProperties:a}),{reject:f,resolve:g,done:m}=Li(d,qd);if(this.events.once(zi("session_connect"),(async({error:e,session:t})=>{if(e)f(e);else if(t){t.self.publicKey=u;let e=nh(ih({},t),{requiredNamespaces:p.requiredNamespaces,optionalNamespaces:p.optionalNamespaces});await this.client.session.set(t.topic,e),await this.setExpiry(t.topic,t.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:t.peer.metadata}),g(e)}})),!c){let{message:e}=en("NO_MATCHING_KEY",`connect() pairing topic: ${c}`);throw new Error(e)}let b=await this.sendRequest({topic:c,method:"wc_sessionPropose",params:p,throwOnFailedPublish:!0});return await this.setProposal(b,ih({id:b},p)),{uri:r,approval:m}},this.pair=async e=>(await this.isInitialized(),await this.client.core.pairing.pair(e)),this.approve=async e=>{await this.isInitialized(),await this.isValidApprove(e);let{id:t,relayProtocol:r,namespaces:i,sessionProperties:n}=e,o=this.client.proposal.get(t),{pairingTopic:a,proposer:s,requiredNamespaces:c,optionalNamespaces:l}=o;a=a||"";let u=await this.client.core.crypto.generateKeyPair(),d=s.publicKey,h=await this.client.core.crypto.generateSharedKey(u,d);a&&t&&(await this.client.core.pairing.updateMetadata({topic:a,metadata:s.metadata}),await this.sendResult({id:t,topic:a,result:{relay:{protocol:r??"irn"},responderPublicKey:u}}),await this.client.proposal.delete(t,tn("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:a}));let p=ih({relay:{protocol:r??"irn"},namespaces:i,pairingTopic:a,controller:{publicKey:u,metadata:this.client.metadata},expiry:Fi(Wd)},n&&{sessionProperties:n});await this.client.core.relayer.subscribe(h);let f=nh(ih({},p),{topic:h,requiredNamespaces:c,optionalNamespaces:l,pairingTopic:a,acknowledged:!1,self:p.controller,peer:{publicKey:s.publicKey,metadata:s.metadata},controller:u});await this.client.session.set(h,f);try{await this.sendRequest({topic:h,method:"wc_sessionSettle",params:p,throwOnFailedPublish:!0})}catch(e){throw this.client.logger.error(e),this.client.session.delete(h,tn("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(h),e}return await this.setExpiry(h,Fi(Wd)),{topic:h,acknowledged:()=>new Promise((e=>setTimeout((()=>e(this.client.session.get(h))),500)))}},this.reject=async e=>{await this.isInitialized(),await this.isValidReject(e);let{id:t,reason:r}=e,{pairingTopic:i}=this.client.proposal.get(t);i&&(await this.sendError(t,i,r),await this.client.proposal.delete(t,tn("USER_DISCONNECTED")))},this.update=async e=>{await this.isInitialized(),await this.isValidUpdate(e);let{topic:t,namespaces:r}=e,i=await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:r}}),{done:n,resolve:o,reject:a}=Li();return this.events.once(zi("session_update",i),(({error:e})=>{e?a(e):o()})),await this.client.session.update(t,{namespaces:r}),{acknowledged:n}},this.extend=async e=>{await this.isInitialized(),await this.isValidExtend(e);let{topic:t}=e,r=await this.sendRequest({topic:t,method:"wc_sessionExtend",params:{}}),{done:i,resolve:n,reject:o}=Li();return this.events.once(zi("session_extend",r),(({error:e})=>{e?o(e):n()})),await this.setExpiry(t,Fi(Wd)),{acknowledged:i}},this.request=async e=>{await this.isInitialized(),await this.isValidRequest(e);let{chainId:t,request:r,topic:i,expiry:n=Vd.wc_sessionRequest.req.ttl}=e,o=Fs(),{done:a,resolve:s,reject:c}=Li(n,"Request expired. Please try again.");return this.events.once(zi("session_request",o),(({error:e,result:t})=>{e?c(e):s(t)})),await Promise.all([new Promise((async e=>{await this.sendRequest({clientRpcId:o,topic:i,method:"wc_sessionRequest",params:{request:nh(ih({},r),{expiryTimestamp:Fi(n)}),chainId:t},expiry:n,throwOnFailedPublish:!0}).catch((e=>c(e))),this.client.events.emit("session_request_sent",{topic:i,request:r,chainId:t,id:o}),e()})),new Promise((async e=>{let t=await async function(e,t){try{return await e.getItem(t)||(Ti()?localStorage.getItem(t):void 0)}catch(e){console.error(e)}}(this.client.core.storage,zd);(async function({id:e,topic:t,wcDeepLink:r}){try{if(!r)return;let i=("string"==typeof r?JSON.parse(r):r)?.href;if("string"!=typeof i)return;i.endsWith("/")&&(i=i.slice(0,-1));let n=`${i}/wc?requestId=${e}&sessionTopic=${t}`,o=Oi();o===Yn.browser?n.startsWith("https://")?window.open(n,"_blank","noreferrer noopener"):window.open(n,"_self","noreferrer noopener"):o===Yn.reactNative&&typeof(null==global?void 0:global.Linking)<"u"&&await global.Linking.openURL(n)}catch(e){console.error(e)}})({id:o,topic:i,wcDeepLink:t}),e()})),a()]).then((e=>e[2]))},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);let{topic:t,response:r}=e,{id:i}=r;vc(r)?await this.sendResult({id:i,topic:t,result:r.result,throwOnFailedPublish:!0}):_c(r)&&await this.sendError(i,t,r.error),this.cleanupAfterResponse(e)},this.ping=async e=>{await this.isInitialized(),await this.isValidPing(e);let{topic:t}=e;if(this.client.session.keys.includes(t)){let e=await this.sendRequest({topic:t,method:"wc_sessionPing",params:{}}),{done:r,resolve:i,reject:n}=Li();this.events.once(zi("session_ping",e),(({error:e})=>{e?n(e):i()})),await r()}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{await this.isInitialized(),await this.isValidEmit(e);let{topic:t,event:r,chainId:i}=e;await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:r,chainId:i}})},this.disconnect=async e=>{await this.isInitialized(),await this.isValidDisconnect(e);let{topic:t}=e;if(this.client.session.keys.includes(t))await this.sendRequest({topic:t,method:"wc_sessionDelete",params:tn("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:t,emitEvent:!1});else{if(!this.client.core.pairing.pairings.keys.includes(t)){let{message:e}=en("MISMATCHED_TOPIC",`Session or pairing topic not found: ${t}`);throw new Error(e)}await this.client.core.pairing.disconnect({topic:t})}},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter((t=>function(e,t){let{requiredNamespaces:r}=t,i=Object.keys(e.namespaces),n=Object.keys(r),o=!0;return!!Mi(n,i)&&(i.forEach((t=>{let{accounts:i,methods:n,events:a}=e.namespaces[t],s=Ji(i),c=r[t];Mi(vi(t,c),s)&&Mi(c.methods,n)&&Mi(c.events,a)||(o=!1)})),o)}(t,e)))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{let t=this.client.core.pairing.pairings.get(e.pairingTopic),r=this.client.core.pairing.pairings.getAll().filter((r=>{var i,n;return(null==(i=r.peerMetadata)?void 0:i.url)&&(null==(n=r.peerMetadata)?void 0:n.url)===e.peer.metadata.url&&r.topic&&r.topic!==t.topic}));if(0===r.length)return;this.client.logger.info(`Cleaning up ${r.length} duplicate pairing(s)`),await Promise.all(r.map((e=>this.client.core.pairing.disconnect({topic:e.topic})))),this.client.logger.info("Duplicate pairings clean up finished")}catch(e){this.client.logger.error(e)}},this.deleteSession=async e=>{let{topic:t,expirerHasDeleted:r=!1,emitEvent:i=!0,id:n=0}=e,{self:o}=this.client.session.get(t);await this.client.core.relayer.unsubscribe(t),await this.client.session.delete(t,tn("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(o.publicKey)&&await this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.keychain.has(t)&&await this.client.core.crypto.deleteSymKey(t),r||this.client.core.expirer.del(t),this.client.core.storage.removeItem(zd).catch((e=>this.client.logger.warn(e))),this.getPendingSessionRequests().forEach((e=>{e.topic===t&&this.deletePendingSessionRequest(e.id,tn("USER_DISCONNECTED"))})),i&&this.client.events.emit("session_delete",{id:n,topic:t})},this.deleteProposal=async(e,t)=>{await Promise.all([this.client.proposal.delete(e,tn("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)])},this.deletePendingSessionRequest=async(e,t,r=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,t),r?Promise.resolve():this.client.core.expirer.del(e)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter((t=>t.id!==e)),r&&(this.sessionRequestQueue.state=Zd.idle,this.client.events.emit("session_request_expire",{id:e}))},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&await this.client.session.update(e,{expiry:t}),this.client.core.expirer.set(e,t)},this.setProposal=async(e,t)=>{await this.client.proposal.set(e,t),this.client.core.expirer.set(e,Fi(Vd.wc_sessionPropose.req.ttl))},this.setPendingSessionRequest=async e=>{let{id:t,topic:r,params:i,verifyContext:n}=e,o=i.request.expiryTimestamp||Fi(Vd.wc_sessionRequest.req.ttl);await this.client.pendingRequest.set(t,{id:t,topic:r,params:i,verifyContext:n}),o&&this.client.core.expirer.set(t,o)},this.sendRequest=async e=>{let{topic:t,method:r,params:i,expiry:n,relayRpcId:o,clientRpcId:a,throwOnFailedPublish:s}=e,c=zs(r,i,a);if(Ti()&&Kd.includes(r)){let e=xi(JSON.stringify(c));this.client.core.verify.register({attestationId:e})}let l=await this.client.core.crypto.encode(t,c),u=Vd[r].req;return n&&(u.ttl=n),o&&(u.id=o),this.client.core.history.set(t,c),s?(u.internal=nh(ih({},u.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,l,u)):this.client.core.relayer.publish(t,l,u).catch((e=>this.client.logger.error(e))),c.id},this.sendResult=async e=>{let{id:t,topic:r,result:i,throwOnFailedPublish:n}=e,o=qs(t,i),a=await this.client.core.crypto.encode(r,o),s=await this.client.core.history.get(r,t),c=Vd[s.request.method].res;n?(c.internal=nh(ih({},c.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(r,a,c)):this.client.core.relayer.publish(r,a,c).catch((e=>this.client.logger.error(e))),await this.client.core.history.resolve(o)},this.sendError=async(e,t,r)=>{let i=Ws(e,r),n=await this.client.core.crypto.encode(t,i),o=await this.client.core.history.get(t,e),a=Vd[o.request.method].res;this.client.core.relayer.publish(t,n,a),await this.client.core.history.resolve(i)},this.cleanup=async()=>{let e=[],t=[];this.client.session.getAll().forEach((t=>{let r=!1;Hi(t.expiry)&&(r=!0),this.client.core.crypto.keychain.has(t.topic)||(r=!0),r&&e.push(t.topic)})),this.client.proposal.getAll().forEach((e=>{Hi(e.expiryTimestamp)&&t.push(e.id)})),await Promise.all([...e.map((e=>this.deleteSession({topic:e}))),...t.map((e=>this.deleteProposal(e)))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state!==Zd.active){for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=Zd.active;let e=this.requestQueue.queue.shift();if(e)try{this.processRequest(e),await new Promise((e=>setTimeout(e,300)))}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=Zd.idle}else this.client.logger.info("Request queue already active, skipping...")},this.processRequest=e=>{let{topic:t,payload:r}=e,i=r.method;switch(i){case"wc_sessionPropose":return this.onSessionProposeRequest(t,r);case"wc_sessionSettle":return this.onSessionSettleRequest(t,r);case"wc_sessionUpdate":return this.onSessionUpdateRequest(t,r);case"wc_sessionExtend":return this.onSessionExtendRequest(t,r);case"wc_sessionPing":return this.onSessionPingRequest(t,r);case"wc_sessionDelete":return this.onSessionDeleteRequest(t,r);case"wc_sessionRequest":return this.onSessionRequest(t,r);case"wc_sessionEvent":return this.onSessionEventRequest(t,r);default:return this.client.logger.info(`Unsupported request method ${i}`)}},this.onRelayEventResponse=async e=>{let{topic:t,payload:r}=e,i=(await this.client.core.history.get(t,r.id)).request.method;switch(i){case"wc_sessionPropose":return this.onSessionProposeResponse(t,r);case"wc_sessionSettle":return this.onSessionSettleResponse(t,r);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,r);case"wc_sessionExtend":return this.onSessionExtendResponse(t,r);case"wc_sessionPing":return this.onSessionPingResponse(t,r);case"wc_sessionRequest":return this.onSessionRequestResponse(t,r);default:return this.client.logger.info(`Unsupported response method ${i}`)}},this.onRelayEventUnknownPayload=e=>{let{topic:t}=e,{message:r}=en("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw new Error(r)},this.onSessionProposeRequest=async(e,t)=>{let{params:r,id:i}=t;try{this.isValidConnect(ih({},t.params));let n=r.expiryTimestamp||Fi(Vd.wc_sessionPropose.req.ttl),o=ih({id:i,pairingTopic:e,expiryTimestamp:n},r);await this.setProposal(i,o);let a=xi(JSON.stringify(t)),s=await this.getVerifyContext(a,o.proposer.metadata);this.client.events.emit("session_proposal",{id:i,params:o,verifyContext:s})}catch(t){await this.sendError(i,e,t),this.client.logger.error(t)}},this.onSessionProposeResponse=async(e,t)=>{let{id:r}=t;if(vc(t)){let{result:i}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:i});let n=this.client.proposal.get(r);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:n});let o=n.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:o});let a=i.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:a});let s=await this.client.core.crypto.generateSharedKey(o,a);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:s});let c=await this.client.core.relayer.subscribe(s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else _c(t)&&(await this.client.proposal.delete(r,tn("USER_DISCONNECTED")),this.events.emit(zi("session_connect"),{error:t.error}))},this.onSessionSettleRequest=async(e,t)=>{let{id:r,params:i}=t;try{this.isValidSessionSettleRequest(i);let{relay:r,controller:n,expiry:o,namespaces:a,sessionProperties:s,pairingTopic:c}=t.params,l=ih({topic:e,relay:r,expiry:o,namespaces:a,acknowledged:!0,pairingTopic:c,requiredNamespaces:{},optionalNamespaces:{},controller:n.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:n.publicKey,metadata:n.metadata}},s&&{sessionProperties:s});await this.sendResult({id:t.id,topic:e,result:!0}),this.events.emit(zi("session_connect"),{session:l}),this.cleanupDuplicatePairings(l)}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionSettleResponse=async(e,t)=>{let{id:r}=t;vc(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(zi("session_approve",r),{})):_c(t)&&(await this.client.session.delete(e,tn("USER_DISCONNECTED")),this.events.emit(zi("session_approve",r),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{let{params:r,id:i}=t;try{let t=`${e}_session_update`,n=ho.get(t);if(n&&this.isRequestOutOfSync(n,i))return void this.client.logger.info(`Discarding out of sync request - ${i}`);this.isValidUpdate(ih({topic:e},r)),await this.client.session.update(e,{namespaces:r.namespaces}),await this.sendResult({id:i,topic:e,result:!0}),this.client.events.emit("session_update",{id:i,topic:e,params:r}),ho.set(t,i)}catch(t){await this.sendError(i,e,t),this.client.logger.error(t)}},this.isRequestOutOfSync=(e,t)=>parseInt(t.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,t)=>{let{id:r}=t;vc(t)?this.events.emit(zi("session_update",r),{}):_c(t)&&this.events.emit(zi("session_update",r),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{let{id:r}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,Fi(Wd)),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_extend",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionExtendResponse=(e,t)=>{let{id:r}=t;vc(t)?this.events.emit(zi("session_extend",r),{}):_c(t)&&this.events.emit(zi("session_extend",r),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{let{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_ping",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionPingResponse=(e,t)=>{let{id:r}=t;setTimeout((()=>{vc(t)?this.events.emit(zi("session_ping",r),{}):_c(t)&&this.events.emit(zi("session_ping",r),{error:t.error})}),500)},this.onSessionDeleteRequest=async(e,t)=>{let{id:r}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),await Promise.all([new Promise((t=>{this.client.core.relayer.once(Bu.publish,(async()=>{t(await this.deleteSession({topic:e,id:r}))}))})),this.sendResult({id:r,topic:e,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:tn("USER_DISCONNECTED")})])}catch(e){this.client.logger.error(e)}},this.onSessionRequest=async(e,t)=>{let{id:r,params:i}=t;try{this.isValidRequest(ih({topic:e},i));let t=xi(JSON.stringify(zs("wc_sessionRequest",i,r))),n=this.client.session.get(e),o={id:r,topic:e,params:i,verifyContext:await this.getVerifyContext(t,n.peer.metadata)};await this.setPendingSessionRequest(o),this.addSessionRequestToSessionRequestQueue(o),this.processSessionRequestQueue()}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionRequestResponse=(e,t)=>{let{id:r}=t;vc(t)?this.events.emit(zi("session_request",r),{result:t.result}):_c(t)&&this.events.emit(zi("session_request",r),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{let{id:r,params:i}=t;try{let t=`${e}_session_event_${i.event.name}`,n=ho.get(t);if(n&&this.isRequestOutOfSync(n,r))return void this.client.logger.info(`Discarding out of sync request - ${r}`);this.isValidEmit(ih({topic:e},i)),this.client.events.emit("session_event",{id:r,topic:e,params:i}),ho.set(t,r)}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout((()=>{this.sessionRequestQueue.state=Zd.idle,this.processSessionRequestQueue()}),(0,Dd.toMiliseconds)(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:e,error:t})=>{let r=this.client.core.history.pending;r.length>0&&r.filter((t=>t.topic===e&&"wc_sessionRequest"===t.request.method)).forEach((e=>{this.events.emit(zi("session_request",e.request.id),{error:t})}))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===Zd.active)return void this.client.logger.info("session request queue is already active.");let e=this.sessionRequestQueue.queue[0];if(e)try{this.sessionRequestQueue.state=Zd.active,this.client.events.emit("session_request",e)}catch(e){this.client.logger.error(e)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=e=>{if(e.active)return;let t=this.client.proposal.getAll().find((t=>t.pairingTopic===e.topic));t&&this.onSessionProposeRequest(e.topic,zs("wc_sessionPropose",{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties},t.id))},this.isValidConnect=async e=>{if(!gn(e)){let{message:t}=en("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(t)}let{pairingTopic:t,requiredNamespaces:r,optionalNamespaces:i,sessionProperties:n,relays:o}=e;if(on(t)||await this.isValidPairingTopic(t),!function(e,t){let r=!1;return t&&!e?r=!0:e&&rn(e)&&e.length&&e.forEach((e=>{r=fn(e)})),r}(o,!0)){let{message:e}=en("MISSING_OR_INVALID",`connect() relays: ${o}`);throw new Error(e)}!on(r)&&0!==nn(r)&&this.validateNamespaces(r,"requiredNamespaces"),!on(i)&&0!==nn(i)&&this.validateNamespaces(i,"optionalNamespaces"),on(n)||this.validateSessionProps(n,"sessionProperties")},this.validateNamespaces=(e,t)=>{let r=function(e,t,r){let i=null;if(e&&nn(e)){let n=hn(e,t);n&&(i=n);let o=un(e,t,r);o&&(i=o)}else i=en("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return i}(e,"connect()",t);if(r)throw new Error(r.message)},this.isValidApprove=async e=>{if(!gn(e))throw new Error(en("MISSING_OR_INVALID",`approve() params: ${e}`).message);let{id:t,namespaces:r,relayProtocol:i,sessionProperties:n}=e;await this.isValidProposalId(t);let o=this.client.proposal.get(t),a=pn(r,"approve()");if(a)throw new Error(a.message);let s=wn(o.requiredNamespaces,r,"approve()");if(s)throw new Error(s.message);if(!an(i,!0)){let{message:e}=en("MISSING_OR_INVALID",`approve() relayProtocol: ${i}`);throw new Error(e)}on(n)||this.validateSessionProps(n,"sessionProperties")},this.isValidReject=async e=>{if(!gn(e)){let{message:t}=en("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(t)}let{id:t,reason:r}=e;if(await this.isValidProposalId(t),!((i=r)&&"object"==typeof i&&i.code&&sn(i.code,!1)&&i.message&&an(i.message,!1))){let{message:e}=en("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(r)}`);throw new Error(e)}var i},this.isValidSessionSettleRequest=e=>{if(!gn(e)){let{message:t}=en("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}let{relay:t,controller:r,namespaces:i,expiry:n}=e;if(!fn(t)){let{message:e}=en("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}let o=function(e,t){let r=null;return an(e?.publicKey,!1)||(r=en("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}(r,"onSessionSettleRequest()");if(o)throw new Error(o.message);let a=pn(i,"onSessionSettleRequest()");if(a)throw new Error(a.message);if(Hi(n)){let{message:e}=en("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!gn(e)){let{message:t}=en("MISSING_OR_INVALID",`update() params: ${e}`);throw new Error(t)}let{topic:t,namespaces:r}=e;await this.isValidSessionTopic(t);let i=this.client.session.get(t),n=pn(r,"update()");if(n)throw new Error(n.message);let o=wn(i.requiredNamespaces,r,"update()");if(o)throw new Error(o.message)},this.isValidExtend=async e=>{if(!gn(e)){let{message:t}=en("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}let{topic:t}=e;await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!gn(e)){let{message:t}=en("MISSING_OR_INVALID",`request() params: ${e}`);throw new Error(t)}let{topic:t,request:r,chainId:i,expiry:n}=e;await this.isValidSessionTopic(t);let{namespaces:o}=this.client.session.get(t);if(!mn(o,i)){let{message:e}=en("MISSING_OR_INVALID",`request() chainId: ${i}`);throw new Error(e)}if(on(a=r)||!an(a.method,!1)){let{message:e}=en("MISSING_OR_INVALID",`request() ${JSON.stringify(r)}`);throw new Error(e)}var a;if(!bn(o,i,r.method)){let{message:e}=en("MISSING_OR_INVALID",`request() method: ${r.method}`);throw new Error(e)}if(n&&!function(e,t){return sn(e,!1)&&e<=t.max&&e>=t.min}(n,Gd)){let{message:e}=en("MISSING_OR_INVALID",`request() expiry: ${n}. Expiry must be a number (in seconds) between ${Gd.min} and ${Gd.max}`);throw new Error(e)}},this.isValidRespond=async e=>{var t;if(!gn(e)){let{message:t}=en("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(t)}let{topic:r,response:i}=e;try{await this.isValidSessionTopic(r)}catch(r){throw null!=(t=e?.response)&&t.id&&this.cleanupAfterResponse(e),r}if(on(n=i)||on(n.result)&&on(n.error)||!sn(n.id,!1)||!an(n.jsonrpc,!1)){let{message:e}=en("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(i)}`);throw new Error(e)}var n},this.isValidPing=async e=>{if(!gn(e)){let{message:t}=en("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}let{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!gn(e)){let{message:t}=en("MISSING_OR_INVALID",`emit() params: ${e}`);throw new Error(t)}let{topic:t,event:r,chainId:i}=e;await this.isValidSessionTopic(t);let{namespaces:n}=this.client.session.get(t);if(!mn(n,i)){let{message:e}=en("MISSING_OR_INVALID",`emit() chainId: ${i}`);throw new Error(e)}if(on(o=r)||!an(o.name,!1)){let{message:e}=en("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(e)}var o;if(!yn(n,i,r.name)){let{message:e}=en("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!gn(e)){let{message:t}=en("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}let{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.getVerifyContext=async(e,t)=>{let r={verified:{verifyUrl:t.verifyUrl||Zu,validation:"UNKNOWN",origin:t.url||""}};try{let i=await this.client.core.verify.resolve({attestationId:e,verifyUrl:t.verifyUrl});i&&(r.verified.origin=i.origin,r.verified.isScam=i.isScam,r.verified.validation=i.origin===new URL(t.url).origin?"VALID":"INVALID")}catch(e){this.client.logger.info(e)}return this.client.logger.info(`Verify context: ${JSON.stringify(r)}`),r},this.validateSessionProps=(e,t)=>{Object.values(e).forEach((e=>{if(!an(e,!1)){let{message:r}=en("MISSING_OR_INVALID",`${t} must be in Record<string, string> format. Received: ${JSON.stringify(e)}`);throw new Error(r)}}))}}async isInitialized(){if(!this.initialized){let{message:e}=en("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Bu.message,(async e=>{let{topic:t,message:r}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(r)))return;let i=await this.client.core.crypto.decode(t,r);try{yc(i)?(this.client.core.history.set(t,i),this.onRelayEventRequest({topic:t,payload:i})):wc(i)?(await this.client.core.history.resolve(i),await this.onRelayEventResponse({topic:t,payload:i}),this.client.core.history.delete(t,i.id)):this.onRelayEventUnknownPayload({topic:t,payload:i})}catch(e){this.client.logger.error(e)}}))}registerExpirerEvents(){this.client.core.expirer.on(Vu.expired,(async e=>{let{topic:t,id:r}=Ui(e.target);if(r&&this.client.pendingRequest.keys.includes(r))return await this.deletePendingSessionRequest(r,en("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):r&&(await this.deleteProposal(r,!0),this.client.events.emit("proposal_expire",{id:r}))}))}registerPairingEvents(){this.client.core.pairing.events.on(qu.create,(e=>this.onPairingCreated(e)))}isValidPairingTopic(e){if(!an(e,!1)){let{message:t}=en("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){let{message:t}=en("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(Hi(this.client.core.pairing.pairings.get(e).expiry)){let{message:t}=en("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!an(e,!1)){let{message:t}=en("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){let{message:t}=en("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(Hi(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});let{message:t}=en("EXPIRED",`session topic: ${e}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(e)){let{message:t}=en("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else{if(!this.client.core.pairing.pairings.keys.includes(e)){if(an(e,!1)){let{message:t}=en("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{let{message:t}=en("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}this.isValidPairingTopic(e)}}async isValidProposalId(e){if("number"!=typeof e){let{message:t}=en("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){let{message:t}=en("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(Hi(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);let{message:t}=en("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}},ah=class extends kd{constructor(e,t){super(e,t,"proposal",Fd),this.core=e,this.logger=t}},sh=class extends kd{constructor(e,t){super(e,t,"session",Fd),this.core=e,this.logger=t}},ch=class extends kd{constructor(e,t){super(e,t,"request",Fd,(e=>e.id)),this.core=e,this.logger=t}},lh=class e extends Ba{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=Hd.name,this.events=new Bd.EventEmitter,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(e){throw this.logger.error(e.message),e}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(e){throw this.logger.error(e.message),e}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(e){throw this.logger.error(e.message),e}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(e){throw this.logger.error(e.message),e}},this.update=async e=>{try{return await this.engine.update(e)}catch(e){throw this.logger.error(e.message),e}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(e){throw this.logger.error(e.message),e}},this.request=async e=>{try{return await this.engine.request(e)}catch(e){throw this.logger.error(e.message),e}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(e){throw this.logger.error(e.message),e}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(e){throw this.logger.error(e.message),e}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(e){throw this.logger.error(e.message),e}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(e){throw this.logger.error(e.message),e}},this.find=e=>{try{return this.engine.find(e)}catch(e){throw this.logger.error(e.message),e}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.name=e?.name||Hd.name,this.metadata=e?.metadata||(0,Tn.getWindowMetadata)()||{name:"",description:"",url:"",icons:[""]};let t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,ma.default)(pa({level:e?.logger||Hd.logger}));this.core=e?.core||new Ld(e),this.logger=ga(t,this.name),this.session=new sh(this.core,this.logger),this.proposal=new ah(this.core,this.logger),this.pendingRequest=new ch(this.core,this.logger),this.engine=new oh(this)}static async init(t){let r=new e(t);return await r.initialize(),r}get context(){return fa(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}})),yh=s(((e,t)=>{var r,i=typeof self<"u"?self:e,n=function(){function e(){this.fetch=!1,this.DOMException=i.DOMException}return e.prototype=i,new e}();r=n,function(e){var t="URLSearchParams"in r,i="Symbol"in r&&"iterator"in Symbol,n="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),o="FormData"in r,a="ArrayBuffer"in r;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=f(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:n&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:t&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&n&&function(e){return e&&DataView.prototype.isPrototypeOf(e)}(e)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,r=f(t);return t.readAsText(e),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),i=0;i<t.length;i++)r[i]=String.fromCharCode(t[i]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=l(e),t=u(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},h.prototype.delete=function(e){delete this.map[l(e)]},h.prototype.get=function(e){return e=l(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(l(e))},h.prototype.set=function(e,t){this.map[l(e)]=u(t)},h.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),d(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),d(e)},i&&(h.prototype[Symbol.iterator]=h.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(e,t){var r=(t=t||{}).body;if(e instanceof w){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!r&&null!=e._bodyInit&&(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new h(t.headers)),this.method=function(e){var t=e.toUpperCase();return y.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function v(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),i=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(n))}})),t}function _(e){var t=new h;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),i=r.shift().trim();if(i){var n=r.join(":").trim();t.append(i,n)}})),t}function x(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},b.call(w.prototype),b.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},x.error=function(){var e=new x(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];x.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new x(null,{status:t,headers:{location:e}})},e.DOMException=r.DOMException;try{new e.DOMException}catch{e.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function C(t,r){return new Promise((function(i,o){var a=new w(t,r);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:_(s.getAllResponseHeaders()||"")};e.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL");var t="response"in s?s.response:s.responseText;i(new x(t,e))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&n&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(typeof a._bodyInit>"u"?null:a._bodyInit)}))}C.polyfill=!0,r.fetch||(r.fetch=C,r.Headers=h,r.Request=w,r.Response=x),e.Headers=h,e.Request=w,e.Response=x,e.fetch=C,Object.defineProperty(e,"__esModule",{value:!0})}({}),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var o=n;(e=o.fetch).default=o.fetch,e.fetch=o.fetch,e.Headers=o.Headers,e.Request=o.Request,e.Response=o.Response,t.exports=e})),wh=a((()=>{uh=d(p()),dh=d(yh()),qo(),Rc(),"POST",hh={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},10,fh=ph=class{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new uh.EventEmitter,this.isAvailable=!1,this.registering=!1,!dc(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{let t=Fo(e),r=await(await(0,dh.default)(this.url,Object.assign(Object.assign({},hh),{body:t}))).json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!dc(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){let e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){let t=Fo({id:1,jsonrpc:"2.0",method:"test",params:[]});await(0,dh.default)(e,Object.assign(Object.assign({},hh),{body:t}))}this.onOpen()}catch(e){let t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;let t="string"==typeof e.data?Uo(e.data):e.data;this.events.emit("payload",t)}onError(e,t){let r=this.parseError(t),i=Ws(e,r.message||r.toString());this.events.emit("payload",i)}parseError(e,t=this.url){return Rs(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}})),vh=a((()=>{wh(),wh(),gh=fh}));function _h(e,t,r){var i;let n=function(e){let[t,r]=e.split(Rn);return{namespace:t,reference:r}}(e);return(null==(i=t.rpcMap)?void 0:i[n.reference])||`${Rh}?chainId=${n.namespace}:${n.reference}&projectId=${r}`}function xh(e){return e.includes(":")?e.split(":")[1]:e}function Eh(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}function Ch(e={},t={}){let r=kh(e),i=kh(t);return $h.exports.merge(r,i)}function kh(e){var t,r,i,n;let o={};if(!nn(e))return o;for(let[a,s]of Object.entries(e)){let e=Qi(a)?[a]:s.chains,c=s.methods||[],l=s.events||[],u=s.rpcMap||{},d=Xi(a);o[d]=qh(zh(zh({},o[d]),s),{chains:qi(e,null==(t=o[d])?void 0:t.chains),methods:qi(c,null==(r=o[d])?void 0:r.methods),events:qi(l,null==(i=o[d])?void 0:i.events),rpcMap:zh(zh({},u),null==(n=o[d])?void 0:n.rpcMap)})}return o}function Ph(e){return e.includes(":")?e.split(":")[2]:e}function Ih(e){let t={};for(let[r,i]of Object.entries(e)){let e=i.methods||[],n=i.events||[],o=i.accounts||[],a=Qi(r)?[r]:i.chains?i.chains:Eh(i.accounts);t[r]={chains:a,methods:e,events:n,accounts:o}}return t}function Sh(e){return"number"==typeof e?e:e.includes("0x")?parseInt(e,16):(e=e.includes(":")?e.split(":")[1]:e,isNaN(Number(e))?e:Number(e))}var Ah,Th,Oh,Rh,Nh,Mh,$h,jh,Lh,Bh,Dh,Uh,Fh,Hh,zh,qh,Wh,Vh,Gh,Zh,Kh,Yh,Jh,Qh,Xh,ep,tp,rp,ip,np,op,ap,sp,cp,lp,up,dp,hp,pp,fp,gp,mp,bp,yp,wp=a((()=>{var e,t;bh(),po(),Qa(),vh(),Mc(),Ah=d(p()),Rc(),Th="error","wss://relay.walletconnect.com","wc","universal_provider",Oh="wc@2:universal_provider:",Rh="https://rpc.walletconnect.com/v1/",Nh={DEFAULT_CHAIN_CHANGED:"default_chain_changed"},Mh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=$h={exports:{}},t=$h.exports,function(){var r,i="Expected a function",n="__lodash_hash_undefined__",o="__lodash_placeholder__",a=16,s=32,c=64,l=128,u=256,d=1/0,h=9007199254740991,p=NaN,f=4294967295,g=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",s],["partialRight",c],["rearg",u]],m="[object Arguments]",b="[object Array]",y="[object Boolean]",w="[object Date]",v="[object Error]",_="[object Function]",x="[object GeneratorFunction]",E="[object Map]",C="[object Number]",k="[object Object]",P="[object Promise]",I="[object RegExp]",S="[object Set]",A="[object String]",T="[object Symbol]",O="[object WeakMap]",R="[object ArrayBuffer]",N="[object DataView]",M="[object Float32Array]",$="[object Float64Array]",j="[object Int8Array]",L="[object Int16Array]",B="[object Int32Array]",D="[object Uint8Array]",U="[object Uint8ClampedArray]",F="[object Uint16Array]",H="[object Uint32Array]",z=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,Z=RegExp(V.source),K=RegExp(G.source),Y=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ee=/^\w*$/,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(re.source),ne=/^\s+/,oe=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,fe=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",ke="a-z\\xdf-\\xf6\\xf8-\\xff",Pe="A-Z\\xc0-\\xd6\\xd8-\\xde",Ie="\\ufe0e\\ufe0f",Se="\\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",Ae="['’]",Te="["+xe+"]",Oe="["+Se+"]",Re="["+Ee+"]",Ne="\\d+",Me="["+Ce+"]",$e="["+ke+"]",je="[^"+xe+Se+Ne+Ce+ke+Pe+"]",Le="\\ud83c[\\udffb-\\udfff]",Be="[^"+xe+"]",De="(?:\\ud83c[\\udde6-\\uddff]){2}",Ue="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Pe+"]",He="\\u200d",ze="(?:"+$e+"|"+je+")",qe="(?:"+Fe+"|"+je+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",Ve="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ge="(?:"+Re+"|"+Le+")?",Ze="["+Ie+"]?",Ke=Ze+Ge+"(?:"+He+"(?:"+[Be,De,Ue].join("|")+")"+Ze+Ge+")*",Ye="(?:"+[Me,De,Ue].join("|")+")"+Ke,Je="(?:"+[Be+Re+"?",Re,De,Ue,Te].join("|")+")",Qe=RegExp(Ae,"g"),Xe=RegExp(Re,"g"),et=RegExp(Le+"(?="+Le+")|"+Je+Ke,"g"),tt=RegExp([Fe+"?"+$e+"+"+We+"(?="+[Oe,Fe,"$"].join("|")+")",qe+"+"+Ve+"(?="+[Oe,Fe+ze,"$"].join("|")+")",Fe+"?"+ze+"+"+We,Fe+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,Ye].join("|"),"g"),rt=RegExp("["+He+xe+Ee+Ie+"]"),it=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["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"],ot=-1,at={};at[M]=at[$]=at[j]=at[L]=at[B]=at[D]=at[U]=at[F]=at[H]=!0,at[m]=at[b]=at[R]=at[y]=at[N]=at[w]=at[v]=at[_]=at[E]=at[C]=at[k]=at[I]=at[S]=at[A]=at[O]=!1;var st={};st[m]=st[b]=st[R]=st[N]=st[y]=st[w]=st[M]=st[$]=st[j]=st[L]=st[B]=st[E]=st[C]=st[k]=st[I]=st[S]=st[A]=st[T]=st[D]=st[U]=st[F]=st[H]=!0,st[v]=st[_]=st[O]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,ut=parseInt,dt="object"==typeof Mh&&Mh&&Mh.Object===Object&&Mh,ht="object"==typeof self&&self&&self.Object===Object&&self,pt=dt||ht||Function("return this")(),ft=t&&!t.nodeType&&t,gt=ft&&e&&!e.nodeType&&e,mt=gt&&gt.exports===ft,bt=mt&&dt.process,yt=function(){try{return gt&&gt.require&&gt.require("util").types||bt&&bt.binding&&bt.binding("util")}catch{}}(),wt=yt&&yt.isArrayBuffer,vt=yt&&yt.isDate,_t=yt&&yt.isMap,xt=yt&&yt.isRegExp,Et=yt&&yt.isSet,Ct=yt&&yt.isTypedArray;function kt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Pt(e,t,r,i){for(var n=-1,o=null==e?0:e.length;++n<o;){var a=e[n];t(i,a,r(a),e)}return i}function It(e,t){for(var r=-1,i=null==e?0:e.length;++r<i&&!1!==t(e[r],r,e););return e}function St(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function At(e,t){for(var r=-1,i=null==e?0:e.length;++r<i;)if(!t(e[r],r,e))return!1;return!0}function Tt(e,t){for(var r=-1,i=null==e?0:e.length,n=0,o=[];++r<i;){var a=e[r];t(a,r,e)&&(o[n++]=a)}return o}function Ot(e,t){return!(null==e||!e.length)&&Ft(e,t,0)>-1}function Rt(e,t,r){for(var i=-1,n=null==e?0:e.length;++i<n;)if(r(t,e[i]))return!0;return!1}function Nt(e,t){for(var r=-1,i=null==e?0:e.length,n=Array(i);++r<i;)n[r]=t(e[r],r,e);return n}function Mt(e,t){for(var r=-1,i=t.length,n=e.length;++r<i;)e[n+r]=t[r];return e}function $t(e,t,r,i){var n=-1,o=null==e?0:e.length;for(i&&o&&(r=e[++n]);++n<o;)r=t(r,e[n],n,e);return r}function jt(e,t,r,i){var n=null==e?0:e.length;for(i&&n&&(r=e[--n]);n--;)r=t(r,e[n],n,e);return r}function Lt(e,t){for(var r=-1,i=null==e?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}var Bt=Wt("length");function Dt(e,t,r){var i;return r(e,(function(e,r,n){if(t(e,r,n))return i=r,!1})),i}function Ut(e,t,r,i){for(var n=e.length,o=r+(i?1:-1);i?o--:++o<n;)if(t(e[o],o,e))return o;return-1}function Ft(e,t,r){return t==t?function(e,t,r){for(var i=r-1,n=e.length;++i<n;)if(e[i]===t)return i;return-1}(e,t,r):Ut(e,zt,r)}function Ht(e,t,r,i){for(var n=r-1,o=e.length;++n<o;)if(i(e[n],t))return n;return-1}function zt(e){return e!=e}function qt(e,t){var r=null==e?0:e.length;return r?Zt(e,t)/r:p}function Wt(e){return function(t){return null==t?r:t[e]}}function Vt(e){return function(t){return null==e?r:e[t]}}function Gt(e,t,r,i,n){return n(e,(function(e,n,o){r=i?(i=!1,e):t(r,e,n,o)})),r}function Zt(e,t){for(var i,n=-1,o=e.length;++n<o;){var a=t(e[n]);a!==r&&(i=i===r?a:i+a)}return i}function Kt(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}function Yt(e){return e&&e.slice(0,hr(e)+1).replace(ne,"")}function Jt(e){return function(t){return e(t)}}function Qt(e,t){return Nt(t,(function(t){return e[t]}))}function Xt(e,t){return e.has(t)}function er(e,t){for(var r=-1,i=e.length;++r<i&&Ft(t,e[r],0)>-1;);return r}function tr(e,t){for(var r=e.length;r--&&Ft(t,e[r],0)>-1;);return r}var rr=Vt({"À":"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"}),ir=Vt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nr(e){return"\\"+ct[e]}function or(e){return rt.test(e)}function ar(e){var t=-1,r=Array(e.size);return e.forEach((function(e,i){r[++t]=[i,e]})),r}function sr(e,t){return function(r){return e(t(r))}}function cr(e,t){for(var r=-1,i=e.length,n=0,a=[];++r<i;){var s=e[r];(s===t||s===o)&&(e[r]=o,a[n++]=r)}return a}function lr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function ur(e){return or(e)?function(e){for(var t=et.lastIndex=0;et.test(e);)++t;return t}(e):Bt(e)}function dr(e){return or(e)?function(e){return e.match(et)||[]}(e):function(e){return e.split("")}(e)}function hr(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var pr=Vt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),fr=function e(t){var oe,xe=(t=null==t?pt:fr.defaults(pt.Object(),t,fr.pick(pt,nt))).Array,Ee=t.Date,Ce=t.Error,ke=t.Function,Pe=t.Math,Ie=t.Object,Se=t.RegExp,Ae=t.String,Te=t.TypeError,Oe=xe.prototype,Re=ke.prototype,Ne=Ie.prototype,Me=t["__core-js_shared__"],$e=Re.toString,je=Ne.hasOwnProperty,Le=0,Be=(oe=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||""))?"Symbol(src)_1."+oe:"",De=Ne.toString,Ue=$e.call(Ie),Fe=pt._,He=Se("^"+$e.call(je).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=mt?t.Buffer:r,qe=t.Symbol,We=t.Uint8Array,Ve=ze?ze.allocUnsafe:r,Ge=sr(Ie.getPrototypeOf,Ie),Ze=Ie.create,Ke=Ne.propertyIsEnumerable,Ye=Oe.splice,Je=qe?qe.isConcatSpreadable:r,et=qe?qe.iterator:r,rt=qe?qe.toStringTag:r,ct=function(){try{var e=ho(Ie,"defineProperty");return e({},"",{}),e}catch{}}(),dt=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ht=Ee&&Ee.now!==pt.Date.now&&Ee.now,ft=t.setTimeout!==pt.setTimeout&&t.setTimeout,gt=Pe.ceil,bt=Pe.floor,yt=Ie.getOwnPropertySymbols,Bt=ze?ze.isBuffer:r,Vt=t.isFinite,gr=Oe.join,mr=sr(Ie.keys,Ie),br=Pe.max,yr=Pe.min,wr=Ee.now,vr=t.parseInt,_r=Pe.random,xr=Oe.reverse,Er=ho(t,"DataView"),Cr=ho(t,"Map"),kr=ho(t,"Promise"),Pr=ho(t,"Set"),Ir=ho(t,"WeakMap"),Sr=ho(Ie,"create"),Ar=Ir&&new Ir,Tr={},Or=Bo(Er),Rr=Bo(Cr),Nr=Bo(kr),Mr=Bo(Pr),$r=Bo(Ir),jr=qe?qe.prototype:r,Lr=jr?jr.valueOf:r,Br=jr?jr.toString:r;function Dr(e){if(ts(e)&&!qa(e)&&!(e instanceof zr)){if(e instanceof Hr)return e;if(je.call(e,"__wrapped__"))return Do(e)}return new Hr(e)}var Ur=function(){function e(){}return function(t){if(!es(t))return{};if(Ze)return Ze(t);e.prototype=t;var i=new e;return e.prototype=r,i}}();function Fr(){}function Hr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function zr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function qr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function Wr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Vr;++t<r;)this.add(e[t])}function Zr(e){var t=this.__data__=new Wr(e);this.size=t.size}function Kr(e,t){var r=qa(e),i=!r&&za(e),n=!r&&!i&&Za(e),o=!r&&!i&&!n&&ls(e),a=r||i||n||o,s=a?Kt(e.length,Ae):[],c=s.length;for(var l in e)(t||je.call(e,l))&&(!a||!("length"==l||n&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||wo(l,c)))&&s.push(l);return s}function Yr(e){var t=e.length;return t?e[Gi(0,t-1)]:r}function Jr(e,t){return $o(An(e),ai(t,0,e.length))}function Qr(e){return $o(An(e))}function Xr(e,t,i){(i!==r&&!Ua(e[t],i)||i===r&&!(t in e))&&ni(e,t,i)}function ei(e,t,i){var n=e[t];(!je.call(e,t)||!Ua(n,i)||i===r&&!(t in e))&&ni(e,t,i)}function ti(e,t){for(var r=e.length;r--;)if(Ua(e[r][0],t))return r;return-1}function ri(e,t,r,i){return di(e,(function(e,n,o){t(i,e,r(e),o)})),i}function ii(e,t){return e&&Tn(t,Os(t),e)}function ni(e,t,r){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function oi(e,t){for(var i=-1,n=t.length,o=xe(n),a=null==e;++i<n;)o[i]=a?r:Ps(e,t[i]);return o}function ai(e,t,i){return e==e&&(i!==r&&(e=e<=i?e:i),t!==r&&(e=e>=t?e:t)),e}function si(e,t,i,n,o,a){var s,c=1&t,l=2&t,u=4&t;if(i&&(s=o?i(e,n,o,a):i(e)),s!==r)return s;if(!es(e))return e;var d=qa(e);if(d){if(s=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&je.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!c)return An(e,s)}else{var h=go(e),p=h==_||h==x;if(Za(e))return En(e,c);if(h==k||h==m||p&&!o){if(s=l||p?{}:bo(e),!c)return l?function(e,t){return Tn(e,fo(e),t)}(e,function(e,t){return e&&Tn(t,Rs(t),e)}(s,e)):function(e,t){return Tn(e,po(e),t)}(e,ii(s,e))}else{if(!st[h])return o?e:{};s=function(e,t,r){var i=e.constructor;switch(t){case R:return Cn(e);case y:case w:return new i(+e);case N:return function(e,t){var r=t?Cn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case M:case $:case j:case L:case B:case D:case U:case F:case H:return kn(e,r);case E:return new i;case C:case A:return new i(e);case I:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case S:return new i;case T:return function(e){return Lr?Ie(Lr.call(e)):{}}(e)}}(e,h,c)}}a||(a=new Zr);var f=a.get(e);if(f)return f;a.set(e,s),as(e)?e.forEach((function(r){s.add(si(r,t,i,r,e,a))})):rs(e)&&e.forEach((function(r,n){s.set(n,si(r,t,i,n,e,a))}));var g=d?r:(u?l?no:io:l?Rs:Os)(e);return It(g||e,(function(r,n){g&&(r=e[n=r]),ei(s,n,si(r,t,i,n,e,a))})),s}function ci(e,t,i){var n=i.length;if(null==e)return!n;for(e=Ie(e);n--;){var o=i[n],a=t[o],s=e[o];if(s===r&&!(o in e)||!a(s))return!1}return!0}function li(e,t,n){if("function"!=typeof e)throw new Te(i);return Oo((function(){e.apply(r,n)}),t)}function ui(e,t,r,i){var n=-1,o=Ot,a=!0,s=e.length,c=[],l=t.length;if(!s)return c;r&&(t=Nt(t,Jt(r))),i?(o=Rt,a=!1):t.length>=200&&(o=Xt,a=!1,t=new Gr(t));e:for(;++n<s;){var u=e[n],d=null==r?u:r(u);if(u=i||0!==u?u:0,a&&d==d){for(var h=l;h--;)if(t[h]===d)continue e;c.push(u)}else o(t,d,i)||c.push(u)}return c}Dr.templateSettings={escape:Y,evaluate:J,interpolate:Q,variable:"",imports:{_:Dr}},Dr.prototype=Fr.prototype,Dr.prototype.constructor=Dr,Hr.prototype=Ur(Fr.prototype),Hr.prototype.constructor=Hr,zr.prototype=Ur(Fr.prototype),zr.prototype.constructor=zr,qr.prototype.clear=function(){this.__data__=Sr?Sr(null):{},this.size=0},qr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},qr.prototype.get=function(e){var t=this.__data__;if(Sr){var i=t[e];return i===n?r:i}return je.call(t,e)?t[e]:r},qr.prototype.has=function(e){var t=this.__data__;return Sr?t[e]!==r:je.call(t,e)},qr.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Sr&&t===r?n:t,this},Wr.prototype.clear=function(){this.__data__=[],this.size=0},Wr.prototype.delete=function(e){var t=this.__data__,r=ti(t,e);return!(r<0||(r==t.length-1?t.pop():Ye.call(t,r,1),--this.size,0))},Wr.prototype.get=function(e){var t=this.__data__,i=ti(t,e);return i<0?r:t[i][1]},Wr.prototype.has=function(e){return ti(this.__data__,e)>-1},Wr.prototype.set=function(e,t){var r=this.__data__,i=ti(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this},Vr.prototype.clear=function(){this.size=0,this.__data__={hash:new qr,map:new(Cr||Wr),string:new qr}},Vr.prototype.delete=function(e){var t=lo(this,e).delete(e);return this.size-=t?1:0,t},Vr.prototype.get=function(e){return lo(this,e).get(e)},Vr.prototype.has=function(e){return lo(this,e).has(e)},Vr.prototype.set=function(e,t){var r=lo(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this},Gr.prototype.add=Gr.prototype.push=function(e){return this.__data__.set(e,n),this},Gr.prototype.has=function(e){return this.__data__.has(e)},Zr.prototype.clear=function(){this.__data__=new Wr,this.size=0},Zr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Zr.prototype.get=function(e){return this.__data__.get(e)},Zr.prototype.has=function(e){return this.__data__.has(e)},Zr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Wr){var i=r.__data__;if(!Cr||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Vr(i)}return r.set(e,t),this.size=r.size,this};var di=Nn(wi),hi=Nn(vi,!0);function pi(e,t){var r=!0;return di(e,(function(e,i,n){return r=!!t(e,i,n)})),r}function fi(e,t,i){for(var n=-1,o=e.length;++n<o;){var a=e[n],s=t(a);if(null!=s&&(c===r?s==s&&!cs(s):i(s,c)))var c=s,l=a}return l}function gi(e,t){var r=[];return di(e,(function(e,i,n){t(e,i,n)&&r.push(e)})),r}function mi(e,t,r,i,n){var o=-1,a=e.length;for(r||(r=yo),n||(n=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?mi(s,t-1,r,i,n):Mt(n,s):i||(n[n.length]=s)}return n}var bi=Mn(),yi=Mn(!0);function wi(e,t){return e&&bi(e,t,Os)}function vi(e,t){return e&&yi(e,t,Os)}function _i(e,t){return Tt(t,(function(t){return Ja(e[t])}))}function xi(e,t){for(var i=0,n=(t=wn(t,e)).length;null!=e&&i<n;)e=e[Lo(t[i++])];return i&&i==n?e:r}function Ei(e,t,r){var i=t(e);return qa(e)?i:Mt(i,r(e))}function Ci(e){return null==e?e===r?"[object Undefined]":"[object Null]":rt&&rt in Ie(e)?function(e){var t=je.call(e,rt),i=e[rt];try{e[rt]=r;var n=!0}catch{}var o=De.call(e);return n&&(t?e[rt]=i:delete e[rt]),o}(e):function(e){return De.call(e)}(e)}function ki(e,t){return e>t}function Pi(e,t){return null!=e&&je.call(e,t)}function Ii(e,t){return null!=e&&t in Ie(e)}function Si(e,t,i){for(var n=i?Rt:Ot,o=e[0].length,a=e.length,s=a,c=xe(a),l=1/0,u=[];s--;){var d=e[s];s&&t&&(d=Nt(d,Jt(t))),l=yr(d.length,l),c[s]=!i&&(t||o>=120&&d.length>=120)?new Gr(s&&d):r}d=e[0];var h=-1,p=c[0];e:for(;++h<o&&u.length<l;){var f=d[h],g=t?t(f):f;if(f=i||0!==f?f:0,!(p?Xt(p,g):n(u,g,i))){for(s=a;--s;){var m=c[s];if(!(m?Xt(m,g):n(e[s],g,i)))continue e}p&&p.push(g),u.push(f)}}return u}function Ai(e,t,i){var n=null==(e=So(e,t=wn(t,e)))?e:e[Lo(Yo(t))];return null==n?r:kt(n,e,i)}function Ti(e){return ts(e)&&Ci(e)==m}function Oi(e,t,i,n,o){return e===t||(null==e||null==t||!ts(e)&&!ts(t)?e!=e&&t!=t:function(e,t,i,n,o,a){var s=qa(e),c=qa(t),l=s?b:go(e),u=c?b:go(t),d=(l=l==m?k:l)==k,h=(u=u==m?k:u)==k,p=l==u;if(p&&Za(e)){if(!Za(t))return!1;s=!0,d=!1}if(p&&!d)return a||(a=new Zr),s||ls(e)?to(e,t,i,n,o,a):function(e,t,r,i,n,o,a){switch(r){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R:return!(e.byteLength!=t.byteLength||!o(new We(e),new We(t)));case y:case w:case C:return Ua(+e,+t);case v:return e.name==t.name&&e.message==t.message;case I:case A:return e==t+"";case E:var s=ar;case S:var c=1&i;if(s||(s=lr),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;i|=2,a.set(e,t);var u=to(s(e),s(t),i,n,o,a);return a.delete(e),u;case T:if(Lr)return Lr.call(e)==Lr.call(t)}return!1}(e,t,l,i,n,o,a);if(!(1&i)){var f=d&&je.call(e,"__wrapped__"),g=h&&je.call(t,"__wrapped__");if(f||g){var _=f?e.value():e,x=g?t.value():t;return a||(a=new Zr),o(_,x,i,n,a)}}return!!p&&(a||(a=new Zr),function(e,t,i,n,o,a){var s=1&i,c=io(e),l=c.length,u=io(t),d=u.length;if(l!=d&&!s)return!1;for(var h=l;h--;){var p=c[h];if(!(s?p in t:je.call(t,p)))return!1}var f=a.get(e),g=a.get(t);if(f&&g)return f==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var b=s;++h<l;){var y=e[p=c[h]],w=t[p];if(n)var v=s?n(w,y,p,t,e,a):n(y,w,p,e,t,a);if(!(v===r?y===w||o(y,w,i,n,a):v)){m=!1;break}b||(b="constructor"==p)}if(m&&!b){var _=e.constructor,x=t.constructor;_!=x&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(m=!1)}return a.delete(e),a.delete(t),m}(e,t,i,n,o,a))}(e,t,i,n,Oi,o))}function Ri(e,t,i,n){var o=i.length,a=o,s=!n;if(null==e)return!a;for(e=Ie(e);o--;){var c=i[o];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<a;){var l=(c=i[o])[0],u=e[l],d=c[1];if(s&&c[2]){if(u===r&&!(l in e))return!1}else{var h=new Zr;if(n)var p=n(u,d,l,e,t,h);if(!(p===r?Oi(d,u,3,n,h):p))return!1}}return!0}function Ni(e){return!(!es(e)||function(e){return!!Be&&Be in e}(e))&&(Ja(e)?He:me).test(Bo(e))}function Mi(e){return"function"==typeof e?e:null==e?ic:"object"==typeof e?qa(e)?Ui(e[0],e[1]):Di(e):hc(e)}function $i(e){if(!Co(e))return mr(e);var t=[];for(var r in Ie(e))je.call(e,r)&&"constructor"!=r&&t.push(r);return t}function ji(e){if(!es(e))return function(e){var t=[];if(null!=e)for(var r in Ie(e))t.push(r);return t}(e);var t=Co(e),r=[];for(var i in e)"constructor"==i&&(t||!je.call(e,i))||r.push(i);return r}function Li(e,t){return e<t}function Bi(e,t){var r=-1,i=Va(e)?xe(e.length):[];return di(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Di(e){var t=uo(e);return 1==t.length&&t[0][2]?Po(t[0][0],t[0][1]):function(r){return r===e||Ri(r,e,t)}}function Ui(e,t){return _o(e)&&ko(t)?Po(Lo(e),t):function(i){var n=Ps(i,e);return n===r&&n===t?Is(i,e):Oi(t,n,3)}}function Fi(e,t,i,n,o){e!==t&&bi(t,(function(a,s){if(o||(o=new Zr),es(a))!function(e,t,i,n,o,a,s){var c=Ao(e,i),l=Ao(t,i),u=s.get(l);if(u)Xr(e,i,u);else{var d=a?a(c,l,i+"",e,t,s):r,h=d===r;if(h){var p=qa(l),f=!p&&Za(l),g=!p&&!f&&ls(l);d=l,p||f||g?qa(c)?d=c:Ga(c)?d=An(c):f?(h=!1,d=En(l,!0)):g?(h=!1,d=kn(l,!0)):d=[]:ns(l)||za(l)?(d=c,za(c)?d=bs(c):(!es(c)||Ja(c))&&(d=bo(l))):h=!1}h&&(s.set(l,d),o(d,l,n,a,s),s.delete(l)),Xr(e,i,d)}}(e,t,s,i,Fi,n,o);else{var c=n?n(Ao(e,s),a,s+"",e,t,o):r;c===r&&(c=a),Xr(e,s,c)}}),Rs)}function Hi(e,t){var i=e.length;if(i)return wo(t+=t<0?i:0,i)?e[t]:r}function zi(e,t,r){t=t.length?Nt(t,(function(e){return qa(e)?function(t){return xi(t,1===e.length?e[0]:e)}:e})):[ic];var i=-1;return t=Nt(t,Jt(co())),function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(Bi(e,(function(e,r,n){return{criteria:Nt(t,(function(t){return t(e)})),index:++i,value:e}})),(function(e,t){return function(e,t,r){for(var i=-1,n=e.criteria,o=t.criteria,a=n.length,s=r.length;++i<a;){var c=Pn(n[i],o[i]);if(c)return i>=s?c:c*("desc"==r[i]?-1:1)}return e.index-t.index}(e,t,r)}))}function qi(e,t,r){for(var i=-1,n=t.length,o={};++i<n;){var a=t[i],s=xi(e,a);r(s,a)&&Qi(o,wn(a,e),s)}return o}function Wi(e,t,r,i){var n=i?Ht:Ft,o=-1,a=t.length,s=e;for(e===t&&(t=An(t)),r&&(s=Nt(e,Jt(r)));++o<a;)for(var c=0,l=t[o],u=r?r(l):l;(c=n(s,u,c,i))>-1;)s!==e&&Ye.call(s,c,1),Ye.call(e,c,1);return e}function Vi(e,t){for(var r=e?t.length:0,i=r-1;r--;){var n=t[r];if(r==i||n!==o){var o=n;wo(n)?Ye.call(e,n,1):dn(e,n)}}return e}function Gi(e,t){return e+bt(_r()*(t-e+1))}function Zi(e,t){var r="";if(!e||t<1||t>h)return r;do{t%2&&(r+=e),(t=bt(t/2))&&(e+=e)}while(t);return r}function Ki(e,t){return Ro(Io(e,t,ic),e+"")}function Yi(e){return Yr(Us(e))}function Ji(e,t){var r=Us(e);return $o(r,ai(t,0,r.length))}function Qi(e,t,i,n){if(!es(e))return e;for(var o=-1,a=(t=wn(t,e)).length,s=a-1,c=e;null!=c&&++o<a;){var l=Lo(t[o]),u=i;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=s){var d=c[l];(u=n?n(d,l,c):r)===r&&(u=es(d)?d:wo(t[o+1])?[]:{})}ei(c,l,u),c=c[l]}return e}var Xi=Ar?function(e,t){return Ar.set(e,t),e}:ic,en=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:ec(t),writable:!0})}:ic;function tn(e){return $o(Us(e))}function rn(e,t,r){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(r=r>n?n:r)<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;for(var o=xe(n);++i<n;)o[i]=e[i+t];return o}function nn(e,t){var r;return di(e,(function(e,i,n){return!(r=t(e,i,n))})),!!r}function on(e,t,r){var i=0,n=null==e?i:e.length;if("number"==typeof t&&t==t&&n<=2147483647){for(;i<n;){var o=i+n>>>1,a=e[o];null!==a&&!cs(a)&&(r?a<=t:a<t)?i=o+1:n=o}return n}return an(e,t,ic,r)}function an(e,t,i,n){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=i(t))!=t,c=null===t,l=cs(t),u=t===r;o<a;){var d=bt((o+a)/2),h=i(e[d]),p=h!==r,f=null===h,g=h==h,m=cs(h);if(s)var b=n||g;else b=u?g&&(n||p):c?g&&p&&(n||!f):l?g&&p&&!f&&(n||!m):!f&&!m&&(n?h<=t:h<t);b?o=d+1:a=d}return yr(a,4294967294)}function sn(e,t){for(var r=-1,i=e.length,n=0,o=[];++r<i;){var a=e[r],s=t?t(a):a;if(!r||!Ua(s,c)){var c=s;o[n++]=0===a?0:a}}return o}function cn(e){return"number"==typeof e?e:cs(e)?p:+e}function ln(e){if("string"==typeof e)return e;if(qa(e))return Nt(e,ln)+"";if(cs(e))return Br?Br.call(e):"";var t=e+"";return"0"==t&&1/e==-d?"-0":t}function un(e,t,r){var i=-1,n=Ot,o=e.length,a=!0,s=[],c=s;if(r)a=!1,n=Rt;else if(o>=200){var l=t?null:Kn(e);if(l)return lr(l);a=!1,n=Xt,c=new Gr}else c=t?[]:s;e:for(;++i<o;){var u=e[i],d=t?t(u):u;if(u=r||0!==u?u:0,a&&d==d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),s.push(u)}else n(c,d,r)||(c!==s&&c.push(d),s.push(u))}return s}function dn(e,t){return null==(e=So(e,t=wn(t,e)))||delete e[Lo(Yo(t))]}function hn(e,t,r,i){return Qi(e,t,r(xi(e,t)),i)}function pn(e,t,r,i){for(var n=e.length,o=i?n:-1;(i?o--:++o<n)&&t(e[o],o,e););return r?rn(e,i?0:o,i?o+1:n):rn(e,i?o+1:0,i?n:o)}function fn(e,t){var r=e;return r instanceof zr&&(r=r.value()),$t(t,(function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))}),r)}function gn(e,t,r){var i=e.length;if(i<2)return i?un(e[0]):[];for(var n=-1,o=xe(i);++n<i;)for(var a=e[n],s=-1;++s<i;)s!=n&&(o[n]=ui(o[n]||a,e[s],t,r));return un(mi(o,1),t,r)}function mn(e,t,i){for(var n=-1,o=e.length,a=t.length,s={};++n<o;){var c=n<a?t[n]:r;i(s,e[n],c)}return s}function bn(e){return Ga(e)?e:[]}function yn(e){return"function"==typeof e?e:ic}function wn(e,t){return qa(e)?e:_o(e,t)?[e]:jo(ys(e))}var vn=Ki;function _n(e,t,i){var n=e.length;return i=i===r?n:i,!t&&i>=n?e:rn(e,t,i)}var xn=dt||function(e){return pt.clearTimeout(e)};function En(e,t){if(t)return e.slice();var r=e.length,i=Ve?Ve(r):new e.constructor(r);return e.copy(i),i}function Cn(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function kn(e,t){var r=t?Cn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Pn(e,t){if(e!==t){var i=e!==r,n=null===e,o=e==e,a=cs(e),s=t!==r,c=null===t,l=t==t,u=cs(t);if(!c&&!u&&!a&&e>t||a&&s&&l&&!c&&!u||n&&s&&l||!i&&l||!o)return 1;if(!n&&!a&&!u&&e<t||u&&i&&o&&!n&&!a||c&&i&&o||!s&&o||!l)return-1}return 0}function In(e,t,r,i){for(var n=-1,o=e.length,a=r.length,s=-1,c=t.length,l=br(o-a,0),u=xe(c+l),d=!i;++s<c;)u[s]=t[s];for(;++n<a;)(d||n<o)&&(u[r[n]]=e[n]);for(;l--;)u[s++]=e[n++];return u}function Sn(e,t,r,i){for(var n=-1,o=e.length,a=-1,s=r.length,c=-1,l=t.length,u=br(o-s,0),d=xe(u+l),h=!i;++n<u;)d[n]=e[n];for(var p=n;++c<l;)d[p+c]=t[c];for(;++a<s;)(h||n<o)&&(d[p+r[a]]=e[n++]);return d}function An(e,t){var r=-1,i=e.length;for(t||(t=xe(i));++r<i;)t[r]=e[r];return t}function Tn(e,t,i,n){var o=!i;i||(i={});for(var a=-1,s=t.length;++a<s;){var c=t[a],l=n?n(i[c],e[c],c,i,e):r;l===r&&(l=e[c]),o?ni(i,c,l):ei(i,c,l)}return i}function On(e,t){return function(r,i){var n=qa(r)?Pt:ri,o=t?t():{};return n(r,e,co(i,2),o)}}function Rn(e){return Ki((function(t,i){var n=-1,o=i.length,a=o>1?i[o-1]:r,s=o>2?i[2]:r;for(a=e.length>3&&"function"==typeof a?(o--,a):r,s&&vo(i[0],i[1],s)&&(a=o<3?r:a,o=1),t=Ie(t);++n<o;){var c=i[n];c&&e(t,c,n,a)}return t}))}function Nn(e,t){return function(r,i){if(null==r)return r;if(!Va(r))return e(r,i);for(var n=r.length,o=t?n:-1,a=Ie(r);(t?o--:++o<n)&&!1!==i(a[o],o,a););return r}}function Mn(e){return function(t,r,i){for(var n=-1,o=Ie(t),a=i(t),s=a.length;s--;){var c=a[e?s:++n];if(!1===r(o[c],c,o))break}return t}}function $n(e){return function(t){var i=or(t=ys(t))?dr(t):r,n=i?i[0]:t.charAt(0),o=i?_n(i,1).join(""):t.slice(1);return n[e]()+o}}function jn(e){return function(t){return $t(Js(zs(t).replace(Qe,"")),e,"")}}function Ln(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Ur(e.prototype),i=e.apply(r,t);return es(i)?i:r}}function Bn(e){return function(t,i,n){var o=Ie(t);if(!Va(t)){var a=co(i,3);t=Os(t),i=function(e){return a(o[e],e,o)}}var s=e(t,i,n);return s>-1?o[a?t[s]:s]:r}}function Dn(e){return ro((function(t){var n=t.length,o=n,a=Hr.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new Te(i);if(a&&!c&&"wrapper"==ao(s))var c=new Hr([],!0)}for(o=c?o:n;++o<n;){var l=ao(s=t[o]),u="wrapper"==l?oo(s):r;c=u&&xo(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[ao(u[0])].apply(c,u[3]):1==s.length&&xo(s)?c[l]():c.thru(s)}return function(){var e=arguments,r=e[0];if(c&&1==e.length&&qa(r))return c.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Un(e,t,i,n,o,a,s,c,u,d){var h=t&l,p=1&t,f=2&t,g=24&t,m=512&t,b=f?r:Ln(e);return function l(){for(var y=arguments.length,w=xe(y),v=y;v--;)w[v]=arguments[v];if(g)var _=so(l),x=function(e,t){for(var r=e.length,i=0;r--;)e[r]===t&&++i;return i}(w,_);if(n&&(w=In(w,n,o,g)),a&&(w=Sn(w,a,s,g)),y-=x,g&&y<d){var E=cr(w,_);return Gn(e,t,Un,l.placeholder,i,w,E,c,u,d-y)}var C=p?i:this,k=f?C[e]:e;return y=w.length,c?w=function(e,t){for(var i=e.length,n=yr(t.length,i),o=An(e);n--;){var a=t[n];e[n]=wo(a,i)?o[a]:r}return e}(w,c):m&&y>1&&w.reverse(),h&&u<y&&(w.length=u),this&&this!==pt&&this instanceof l&&(k=b||Ln(k)),k.apply(C,w)}}function Fn(e,t){return function(r,i){return function(e,t,r,i){return wi(e,(function(e,n,o){t(i,r(e),n,o)})),i}(r,e,t(i),{})}}function Hn(e,t){return function(i,n){var o;if(i===r&&n===r)return t;if(i!==r&&(o=i),n!==r){if(o===r)return n;"string"==typeof i||"string"==typeof n?(i=ln(i),n=ln(n)):(i=cn(i),n=cn(n)),o=e(i,n)}return o}}function zn(e){return ro((function(t){return t=Nt(t,Jt(co())),Ki((function(r){var i=this;return e(t,(function(e){return kt(e,i,r)}))}))}))}function qn(e,t){var i=(t=t===r?" ":ln(t)).length;if(i<2)return i?Zi(t,e):t;var n=Zi(t,gt(e/ur(t)));return or(t)?_n(dr(n),0,e).join(""):n.slice(0,e)}function Wn(e){return function(t,i,n){return n&&"number"!=typeof n&&vo(t,i,n)&&(i=n=r),t=ps(t),i===r?(i=t,t=0):i=ps(i),function(e,t,r,i){for(var n=-1,o=br(gt((t-e)/(r||1)),0),a=xe(o);o--;)a[i?o:++n]=e,e+=r;return a}(t,i,n=n===r?t<i?1:-1:ps(n),e)}}function Vn(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ms(t),r=ms(r)),e(t,r)}}function Gn(e,t,i,n,o,a,l,u,d,h){var p=8&t;t|=p?s:c,4&(t&=~(p?c:s))||(t&=-4);var f=[e,t,o,p?a:r,p?l:r,p?r:a,p?r:l,u,d,h],g=i.apply(r,f);return xo(e)&&To(g,f),g.placeholder=n,No(g,e,t)}function Zn(e){var t=Pe[e];return function(e,r){if(e=ms(e),(r=null==r?0:yr(fs(r),292))&&Vt(e)){var i=(ys(e)+"e").split("e");return+((i=(ys(t(i[0]+"e"+(+i[1]+r)))+"e").split("e"))[0]+"e"+(+i[1]-r))}return t(e)}}var Kn=Pr&&1/lr(new Pr([,-0]))[1]==d?function(e){return new Pr(e)}:cc;function Yn(e){return function(t){var r=go(t);return r==E?ar(t):r==S?function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Jn(e,t,n,d,h,p,f,g){var m=2&t;if(!m&&"function"!=typeof e)throw new Te(i);var b=d?d.length:0;if(b||(t&=-97,d=h=r),f=f===r?f:br(fs(f),0),g=g===r?g:fs(g),b-=h?h.length:0,t&c){var y=d,w=h;d=h=r}var v=m?r:oo(e),_=[e,t,n,d,h,y,w,p,f,g];if(v&&function(e,t){var r=e[1],i=t[1],n=r|i,a=n<131,s=i==l&&8==r||i==l&&r==u&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==r;if(!a&&!s)return e;1&i&&(e[2]=t[2],n|=1&r?0:4);var c=t[3];if(c){var d=e[3];e[3]=d?In(d,c,t[4]):c,e[4]=d?cr(e[3],o):t[4]}(c=t[5])&&(d=e[5],e[5]=d?Sn(d,c,t[6]):c,e[6]=d?cr(e[5],o):t[6]),(c=t[7])&&(e[7]=c),i&l&&(e[8]=null==e[8]?t[8]:yr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=n}(_,v),e=_[0],t=_[1],n=_[2],d=_[3],h=_[4],!(g=_[9]=_[9]===r?m?0:e.length:br(_[9]-b,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||t==a?function(e,t,i){var n=Ln(e);return function o(){for(var a=arguments.length,s=xe(a),c=a,l=so(o);c--;)s[c]=arguments[c];var u=a<3&&s[0]!==l&&s[a-1]!==l?[]:cr(s,l);return(a-=u.length)<i?Gn(e,t,Un,o.placeholder,r,s,u,r,r,i-a):kt(this&&this!==pt&&this instanceof o?n:e,this,s)}}(e,t,g):t!=s&&33!=t||h.length?Un.apply(r,_):function(e,t,r,i){var n=1&t,o=Ln(e);return function t(){for(var a=-1,s=arguments.length,c=-1,l=i.length,u=xe(l+s),d=this&&this!==pt&&this instanceof t?o:e;++c<l;)u[c]=i[c];for(;s--;)u[c++]=arguments[++a];return kt(d,n?r:this,u)}}(e,t,n,d);else var x=function(e,t,r){var i=1&t,n=Ln(e);return function t(){return(this&&this!==pt&&this instanceof t?n:e).apply(i?r:this,arguments)}}(e,t,n);return No((v?Xi:To)(x,_),e,t)}function Qn(e,t,i,n){return e===r||Ua(e,Ne[i])&&!je.call(n,i)?t:e}function Xn(e,t,i,n,o,a){return es(e)&&es(t)&&(a.set(t,e),Fi(e,t,r,Xn,a),a.delete(t)),e}function eo(e){return ns(e)?r:e}function to(e,t,i,n,o,a){var s=1&i,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var h=-1,p=!0,f=2&i?new Gr:r;for(a.set(e,t),a.set(t,e);++h<c;){var g=e[h],m=t[h];if(n)var b=s?n(m,g,h,t,e,a):n(g,m,h,e,t,a);if(b!==r){if(b)continue;p=!1;break}if(f){if(!Lt(t,(function(e,t){if(!Xt(f,t)&&(g===e||o(g,e,i,n,a)))return f.push(t)}))){p=!1;break}}else if(g!==m&&!o(g,m,i,n,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function ro(e){return Ro(Io(e,r,Wo),e+"")}function io(e){return Ei(e,Os,po)}function no(e){return Ei(e,Rs,fo)}var oo=Ar?function(e){return Ar.get(e)}:cc;function ao(e){for(var t=e.name+"",r=Tr[t],i=je.call(Tr,t)?r.length:0;i--;){var n=r[i],o=n.func;if(null==o||o==e)return n.name}return t}function so(e){return(je.call(Dr,"placeholder")?Dr:e).placeholder}function co(){var e=Dr.iteratee||nc;return e=e===nc?Mi:e,arguments.length?e(arguments[0],arguments[1]):e}function lo(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function uo(e){for(var t=Os(e),r=t.length;r--;){var i=t[r],n=e[i];t[r]=[i,n,ko(n)]}return t}function ho(e,t){var i=function(e,t){return null==e?r:e[t]}(e,t);return Ni(i)?i:r}var po=yt?function(e){return null==e?[]:(e=Ie(e),Tt(yt(e),(function(t){return Ke.call(e,t)})))}:gc,fo=yt?function(e){for(var t=[];e;)Mt(t,po(e)),e=Ge(e);return t}:gc,go=Ci;function mo(e,t,r){for(var i=-1,n=(t=wn(t,e)).length,o=!1;++i<n;){var a=Lo(t[i]);if(!(o=null!=e&&r(e,a)))break;e=e[a]}return o||++i!=n?o:!!(n=null==e?0:e.length)&&Xa(n)&&wo(a,n)&&(qa(e)||za(e))}function bo(e){return"function"!=typeof e.constructor||Co(e)?{}:Ur(Ge(e))}function yo(e){return qa(e)||za(e)||!!(Je&&e&&e[Je])}function wo(e,t){var r=typeof e;return!!(t=t??h)&&("number"==r||"symbol"!=r&&ye.test(e))&&e>-1&&e%1==0&&e<t}function vo(e,t,r){if(!es(r))return!1;var i=typeof t;return!!("number"==i?Va(r)&&wo(t,r.length):"string"==i&&t in r)&&Ua(r[t],e)}function _o(e,t){if(qa(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!cs(e))||ee.test(e)||!X.test(e)||null!=t&&e in Ie(t)}function xo(e){var t=ao(e),r=Dr[t];if("function"!=typeof r||!(t in zr.prototype))return!1;if(e===r)return!0;var i=oo(r);return!!i&&e===i[0]}(Er&&go(new Er(new ArrayBuffer(1)))!=N||Cr&&go(new Cr)!=E||kr&&go(kr.resolve())!=P||Pr&&go(new Pr)!=S||Ir&&go(new Ir)!=O)&&(go=function(e){var t=Ci(e),i=t==k?e.constructor:r,n=i?Bo(i):"";if(n)switch(n){case Or:return N;case Rr:return E;case Nr:return P;case Mr:return S;case $r:return O}return t});var Eo=Me?Ja:mc;function Co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ne)}function ko(e){return e==e&&!es(e)}function Po(e,t){return function(i){return null!=i&&i[e]===t&&(t!==r||e in Ie(i))}}function Io(e,t,i){return t=br(t===r?e.length-1:t,0),function(){for(var r=arguments,n=-1,o=br(r.length-t,0),a=xe(o);++n<o;)a[n]=r[t+n];n=-1;for(var s=xe(t+1);++n<t;)s[n]=r[n];return s[t]=i(a),kt(e,this,s)}}function So(e,t){return t.length<2?e:xi(e,rn(t,0,-1))}function Ao(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var To=Mo(Xi),Oo=ft||function(e,t){return pt.setTimeout(e,t)},Ro=Mo(en);function No(e,t,r){var i=t+"";return Ro(e,function(e,t){var r=t.length;if(!r)return e;var i=r-1;return t[i]=(r>1?"& ":"")+t[i],t=t.join(r>2?", ":" "),e.replace(ae,"{\n    /* [wrapped with "+t+"] */\n    ")}(i,function(e,t){return It(g,(function(r){var i="_."+r[0];t&r[1]&&!Ot(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ce):[]}(i),r)))}function Mo(e){var t=0,i=0;return function(){var n=wr(),o=16-(n-i);if(i=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function $o(e,t){var i=-1,n=e.length,o=n-1;for(t=t===r?n:t;++i<t;){var a=Gi(i,o),s=e[a];e[a]=e[i],e[i]=s}return e.length=t,e}var jo=function(e){var t=Ma(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,(function(e,r,i,n){t.push(i?n.replace(de,"$1"):r||e)})),t}));function Lo(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-d?"-0":t}function Bo(e){if(null!=e){try{return $e.call(e)}catch{}try{return e+""}catch{}}return""}function Do(e){if(e instanceof zr)return e.clone();var t=new Hr(e.__wrapped__,e.__chain__);return t.__actions__=An(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Uo=Ki((function(e,t){return Ga(e)?ui(e,mi(t,1,Ga,!0)):[]})),Fo=Ki((function(e,t){var i=Yo(t);return Ga(i)&&(i=r),Ga(e)?ui(e,mi(t,1,Ga,!0),co(i,2)):[]})),Ho=Ki((function(e,t){var i=Yo(t);return Ga(i)&&(i=r),Ga(e)?ui(e,mi(t,1,Ga,!0),r,i):[]}));function zo(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var n=null==r?0:fs(r);return n<0&&(n=br(i+n,0)),Ut(e,co(t,3),n)}function qo(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return i!==r&&(o=fs(i),o=i<0?br(n+o,0):yr(o,n-1)),Ut(e,co(t,3),o,!0)}function Wo(e){return null!=e&&e.length?mi(e,1):[]}function Vo(e){return e&&e.length?e[0]:r}var Go=Ki((function(e){var t=Nt(e,bn);return t.length&&t[0]===e[0]?Si(t):[]})),Zo=Ki((function(e){var t=Yo(e),i=Nt(e,bn);return t===Yo(i)?t=r:i.pop(),i.length&&i[0]===e[0]?Si(i,co(t,2)):[]})),Ko=Ki((function(e){var t=Yo(e),i=Nt(e,bn);return(t="function"==typeof t?t:r)&&i.pop(),i.length&&i[0]===e[0]?Si(i,r,t):[]}));function Yo(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Jo=Ki(Qo);function Qo(e,t){return e&&e.length&&t&&t.length?Wi(e,t):e}var Xo=ro((function(e,t){var r=null==e?0:e.length,i=oi(e,t);return Vi(e,Nt(t,(function(e){return wo(e,r)?+e:e})).sort(Pn)),i}));function ea(e){return null==e?e:xr.call(e)}var ta=Ki((function(e){return un(mi(e,1,Ga,!0))})),ra=Ki((function(e){var t=Yo(e);return Ga(t)&&(t=r),un(mi(e,1,Ga,!0),co(t,2))})),ia=Ki((function(e){var t=Yo(e);return t="function"==typeof t?t:r,un(mi(e,1,Ga,!0),r,t)}));function na(e){if(!e||!e.length)return[];var t=0;return e=Tt(e,(function(e){if(Ga(e))return t=br(e.length,t),!0})),Kt(t,(function(t){return Nt(e,Wt(t))}))}function oa(e,t){if(!e||!e.length)return[];var i=na(e);return null==t?i:Nt(i,(function(e){return kt(t,r,e)}))}var aa=Ki((function(e,t){return Ga(e)?ui(e,t):[]})),sa=Ki((function(e){return gn(Tt(e,Ga))})),ca=Ki((function(e){var t=Yo(e);return Ga(t)&&(t=r),gn(Tt(e,Ga),co(t,2))})),la=Ki((function(e){var t=Yo(e);return t="function"==typeof t?t:r,gn(Tt(e,Ga),r,t)})),ua=Ki(na),da=Ki((function(e){var t=e.length,i=t>1?e[t-1]:r;return i="function"==typeof i?(e.pop(),i):r,oa(e,i)}));function ha(e){var t=Dr(e);return t.__chain__=!0,t}function pa(e,t){return t(e)}var fa=ro((function(e){var t=e.length,i=t?e[0]:0,n=this.__wrapped__,o=function(t){return oi(t,e)};return!(t>1||this.__actions__.length)&&n instanceof zr&&wo(i)?((n=n.slice(i,+i+(t?1:0))).__actions__.push({func:pa,args:[o],thisArg:r}),new Hr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(o)})),ga=On((function(e,t,r){je.call(e,r)?++e[r]:ni(e,r,1)})),ma=Bn(zo),ba=Bn(qo);function ya(e,t){return(qa(e)?It:di)(e,co(t,3))}function wa(e,t){return(qa(e)?St:hi)(e,co(t,3))}var va=On((function(e,t,r){je.call(e,r)?e[r].push(t):ni(e,r,[t])})),_a=Ki((function(e,t,r){var i=-1,n="function"==typeof t,o=Va(e)?xe(e.length):[];return di(e,(function(e){o[++i]=n?kt(t,e,r):Ai(e,t,r)})),o})),xa=On((function(e,t,r){ni(e,r,t)}));function Ea(e,t){return(qa(e)?Nt:Bi)(e,co(t,3))}var Ca=On((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),ka=Ki((function(e,t){if(null==e)return[];var r=t.length;return r>1&&vo(e,t[0],t[1])?t=[]:r>2&&vo(t[0],t[1],t[2])&&(t=[t[0]]),zi(e,mi(t,1),[])})),Pa=ht||function(){return pt.Date.now()};function Ia(e,t,i){return t=i?r:t,t=e&&null==t?e.length:t,Jn(e,l,r,r,r,r,t)}function Sa(e,t){var n;if("function"!=typeof t)throw new Te(i);return e=fs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Aa=Ki((function(e,t,r){var i=1;if(r.length){var n=cr(r,so(Aa));i|=s}return Jn(e,i,t,r,n)})),Ta=Ki((function(e,t,r){var i=3;if(r.length){var n=cr(r,so(Ta));i|=s}return Jn(t,i,e,r,n)}));function Oa(e,t,n){var o,a,s,c,l,u,d=0,h=!1,p=!1,f=!0;if("function"!=typeof e)throw new Te(i);function g(t){var i=o,n=a;return o=a=r,d=t,c=e.apply(n,i)}function m(e){var i=e-u;return u===r||i>=t||i<0||p&&e-d>=s}function b(){var e=Pa();if(m(e))return y(e);l=Oo(b,function(e){var r=t-(e-u);return p?yr(r,s-(e-d)):r}(e))}function y(e){return l=r,f&&o?g(e):(o=a=r,c)}function w(){var e=Pa(),i=m(e);if(o=arguments,a=this,u=e,i){if(l===r)return function(e){return d=e,l=Oo(b,t),h?g(e):c}(u);if(p)return xn(l),l=Oo(b,t),g(u)}return l===r&&(l=Oo(b,t)),c}return t=ms(t)||0,es(n)&&(h=!!n.leading,s=(p="maxWait"in n)?br(ms(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f),w.cancel=function(){l!==r&&xn(l),d=0,o=u=a=l=r},w.flush=function(){return l===r?c:y(Pa())},w}var Ra=Ki((function(e,t){return li(e,1,t)})),Na=Ki((function(e,t,r){return li(e,ms(t)||0,r)}));function Ma(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(i);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var a=e.apply(this,i);return r.cache=o.set(n,a)||o,a};return r.cache=new(Ma.Cache||Vr),r}function $a(e){if("function"!=typeof e)throw new Te(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ma.Cache=Vr;var ja=vn((function(e,t){var r=(t=1==t.length&&qa(t[0])?Nt(t[0],Jt(co())):Nt(mi(t,1),Jt(co()))).length;return Ki((function(i){for(var n=-1,o=yr(i.length,r);++n<o;)i[n]=t[n].call(this,i[n]);return kt(e,this,i)}))})),La=Ki((function(e,t){var i=cr(t,so(La));return Jn(e,s,r,t,i)})),Ba=Ki((function(e,t){var i=cr(t,so(Ba));return Jn(e,c,r,t,i)})),Da=ro((function(e,t){return Jn(e,u,r,r,r,t)}));function Ua(e,t){return e===t||e!=e&&t!=t}var Fa=Vn(ki),Ha=Vn((function(e,t){return e>=t})),za=Ti(function(){return arguments}())?Ti:function(e){return ts(e)&&je.call(e,"callee")&&!Ke.call(e,"callee")},qa=xe.isArray,Wa=wt?Jt(wt):function(e){return ts(e)&&Ci(e)==R};function Va(e){return null!=e&&Xa(e.length)&&!Ja(e)}function Ga(e){return ts(e)&&Va(e)}var Za=Bt||mc,Ka=vt?Jt(vt):function(e){return ts(e)&&Ci(e)==w};function Ya(e){if(!ts(e))return!1;var t=Ci(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ns(e)}function Ja(e){if(!es(e))return!1;var t=Ci(e);return t==_||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qa(e){return"number"==typeof e&&e==fs(e)}function Xa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var rs=_t?Jt(_t):function(e){return ts(e)&&go(e)==E};function is(e){return"number"==typeof e||ts(e)&&Ci(e)==C}function ns(e){if(!ts(e)||Ci(e)!=k)return!1;var t=Ge(e);if(null===t)return!0;var r=je.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&$e.call(r)==Ue}var os=xt?Jt(xt):function(e){return ts(e)&&Ci(e)==I},as=Et?Jt(Et):function(e){return ts(e)&&go(e)==S};function ss(e){return"string"==typeof e||!qa(e)&&ts(e)&&Ci(e)==A}function cs(e){return"symbol"==typeof e||ts(e)&&Ci(e)==T}var ls=Ct?Jt(Ct):function(e){return ts(e)&&Xa(e.length)&&!!at[Ci(e)]},us=Vn(Li),ds=Vn((function(e,t){return e<=t}));function hs(e){if(!e)return[];if(Va(e))return ss(e)?dr(e):An(e);if(et&&e[et])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[et]());var t=go(e);return(t==E?ar:t==S?lr:Us)(e)}function ps(e){return e?(e=ms(e))===d||e===-d?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function fs(e){var t=ps(e),r=t%1;return t==t?r?t-r:t:0}function gs(e){return e?ai(fs(e),0,f):0}function ms(e){if("number"==typeof e)return e;if(cs(e))return p;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var r=ge.test(e);return r||be.test(e)?ut(e.slice(2),r?2:8):fe.test(e)?p:+e}function bs(e){return Tn(e,Rs(e))}function ys(e){return null==e?"":ln(e)}var ws=Rn((function(e,t){if(Co(t)||Va(t))Tn(t,Os(t),e);else for(var r in t)je.call(t,r)&&ei(e,r,t[r])})),vs=Rn((function(e,t){Tn(t,Rs(t),e)})),_s=Rn((function(e,t,r,i){Tn(t,Rs(t),e,i)})),xs=Rn((function(e,t,r,i){Tn(t,Os(t),e,i)})),Es=ro(oi),Cs=Ki((function(e,t){e=Ie(e);var i=-1,n=t.length,o=n>2?t[2]:r;for(o&&vo(t[0],t[1],o)&&(n=1);++i<n;)for(var a=t[i],s=Rs(a),c=-1,l=s.length;++c<l;){var u=s[c],d=e[u];(d===r||Ua(d,Ne[u])&&!je.call(e,u))&&(e[u]=a[u])}return e})),ks=Ki((function(e){return e.push(r,Xn),kt(Ms,r,e)}));function Ps(e,t,i){var n=null==e?r:xi(e,t);return n===r?i:n}function Is(e,t){return null!=e&&mo(e,t,Ii)}var Ss=Fn((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),e[t]=r}),ec(ic)),As=Fn((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),je.call(e,t)?e[t].push(r):e[t]=[r]}),co),Ts=Ki(Ai);function Os(e){return Va(e)?Kr(e):$i(e)}function Rs(e){return Va(e)?Kr(e,!0):ji(e)}var Ns=Rn((function(e,t,r){Fi(e,t,r)})),Ms=Rn((function(e,t,r,i){Fi(e,t,r,i)})),$s=ro((function(e,t){var r={};if(null==e)return r;var i=!1;t=Nt(t,(function(t){return t=wn(t,e),i||(i=t.length>1),t})),Tn(e,no(e),r),i&&(r=si(r,7,eo));for(var n=t.length;n--;)dn(r,t[n]);return r})),js=ro((function(e,t){return null==e?{}:function(e,t){return qi(e,t,(function(t,r){return Is(e,r)}))}(e,t)}));function Ls(e,t){if(null==e)return{};var r=Nt(no(e),(function(e){return[e]}));return t=co(t),qi(e,r,(function(e,r){return t(e,r[0])}))}var Bs=Yn(Os),Ds=Yn(Rs);function Us(e){return null==e?[]:Qt(e,Os(e))}var Fs=jn((function(e,t,r){return t=t.toLowerCase(),e+(r?Hs(t):t)}));function Hs(e){return Ys(ys(e).toLowerCase())}function zs(e){return(e=ys(e))&&e.replace(we,rr).replace(Xe,"")}var qs=jn((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ws=jn((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Vs=$n("toLowerCase"),Gs=jn((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Zs=jn((function(e,t,r){return e+(r?" ":"")+Ys(t)})),Ks=jn((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ys=$n("toUpperCase");function Js(e,t,i){return e=ys(e),(t=i?r:t)===r?function(e){return it.test(e)}(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Qs=Ki((function(e,t){try{return kt(e,r,t)}catch(e){return Ya(e)?e:new Ce(e)}})),Xs=ro((function(e,t){return It(t,(function(t){t=Lo(t),ni(e,t,Aa(e[t],e))})),e}));function ec(e){return function(){return e}}var tc=Dn(),rc=Dn(!0);function ic(e){return e}function nc(e){return Mi("function"==typeof e?e:si(e,1))}var oc=Ki((function(e,t){return function(r){return Ai(r,e,t)}})),ac=Ki((function(e,t){return function(r){return Ai(e,r,t)}}));function sc(e,t,r){var i=Os(t),n=_i(t,i);null==r&&(!es(t)||!n.length&&i.length)&&(r=t,t=e,e=this,n=_i(t,Os(t)));var o=!(es(r)&&"chain"in r&&!r.chain),a=Ja(e);return It(n,(function(r){var i=t[r];e[r]=i,a&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=An(this.__actions__)).push({func:i,args:arguments,thisArg:e}),r.__chain__=t,r}return i.apply(e,Mt([this.value()],arguments))})})),e}function cc(){}var lc=zn(Nt),uc=zn(At),dc=zn(Lt);function hc(e){return _o(e)?Wt(Lo(e)):function(e){return function(t){return xi(t,e)}}(e)}var pc=Wn(),fc=Wn(!0);function gc(){return[]}function mc(){return!1}var bc=Hn((function(e,t){return e+t}),0),yc=Zn("ceil"),wc=Hn((function(e,t){return e/t}),1),vc=Zn("floor"),_c=Hn((function(e,t){return e*t}),1),xc=Zn("round"),Ec=Hn((function(e,t){return e-t}),0);return Dr.after=function(e,t){if("function"!=typeof t)throw new Te(i);return e=fs(e),function(){if(--e<1)return t.apply(this,arguments)}},Dr.ary=Ia,Dr.assign=ws,Dr.assignIn=vs,Dr.assignInWith=_s,Dr.assignWith=xs,Dr.at=Es,Dr.before=Sa,Dr.bind=Aa,Dr.bindAll=Xs,Dr.bindKey=Ta,Dr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qa(e)?e:[e]},Dr.chain=ha,Dr.chunk=function(e,t,i){t=(i?vo(e,t,i):t===r)?1:br(fs(t),0);var n=null==e?0:e.length;if(!n||t<1)return[];for(var o=0,a=0,s=xe(gt(n/t));o<n;)s[a++]=rn(e,o,o+=t);return s},Dr.compact=function(e){for(var t=-1,r=null==e?0:e.length,i=0,n=[];++t<r;){var o=e[t];o&&(n[i++]=o)}return n},Dr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=xe(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Mt(qa(r)?An(r):[r],mi(t,1))},Dr.cond=function(e){var t=null==e?0:e.length,r=co();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new Te(i);return[r(e[0]),e[1]]})):[],Ki((function(r){for(var i=-1;++i<t;){var n=e[i];if(kt(n[0],this,r))return kt(n[1],this,r)}}))},Dr.conforms=function(e){return function(e){var t=Os(e);return function(r){return ci(r,e,t)}}(si(e,1))},Dr.constant=ec,Dr.countBy=ga,Dr.create=function(e,t){var r=Ur(e);return null==t?r:ii(r,t)},Dr.curry=function e(t,i,n){var o=Jn(t,8,r,r,r,r,r,i=n?r:i);return o.placeholder=e.placeholder,o},Dr.curryRight=function e(t,i,n){var o=Jn(t,a,r,r,r,r,r,i=n?r:i);return o.placeholder=e.placeholder,o},Dr.debounce=Oa,Dr.defaults=Cs,Dr.defaultsDeep=ks,Dr.defer=Ra,Dr.delay=Na,Dr.difference=Uo,Dr.differenceBy=Fo,Dr.differenceWith=Ho,Dr.drop=function(e,t,i){var n=null==e?0:e.length;return n?rn(e,(t=i||t===r?1:fs(t))<0?0:t,n):[]},Dr.dropRight=function(e,t,i){var n=null==e?0:e.length;return n?rn(e,0,(t=n-(t=i||t===r?1:fs(t)))<0?0:t):[]},Dr.dropRightWhile=function(e,t){return e&&e.length?pn(e,co(t,3),!0,!0):[]},Dr.dropWhile=function(e,t){return e&&e.length?pn(e,co(t,3),!0):[]},Dr.fill=function(e,t,i,n){var o=null==e?0:e.length;return o?(i&&"number"!=typeof i&&vo(e,t,i)&&(i=0,n=o),function(e,t,i,n){var o=e.length;for((i=fs(i))<0&&(i=-i>o?0:o+i),(n=n===r||n>o?o:fs(n))<0&&(n+=o),n=i>n?0:gs(n);i<n;)e[i++]=t;return e}(e,t,i,n)):[]},Dr.filter=function(e,t){return(qa(e)?Tt:gi)(e,co(t,3))},Dr.flatMap=function(e,t){return mi(Ea(e,t),1)},Dr.flatMapDeep=function(e,t){return mi(Ea(e,t),d)},Dr.flatMapDepth=function(e,t,i){return i=i===r?1:fs(i),mi(Ea(e,t),i)},Dr.flatten=Wo,Dr.flattenDeep=function(e){return null!=e&&e.length?mi(e,d):[]},Dr.flattenDepth=function(e,t){return null!=e&&e.length?mi(e,t=t===r?1:fs(t)):[]},Dr.flip=function(e){return Jn(e,512)},Dr.flow=tc,Dr.flowRight=rc,Dr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,i={};++t<r;){var n=e[t];i[n[0]]=n[1]}return i},Dr.functions=function(e){return null==e?[]:_i(e,Os(e))},Dr.functionsIn=function(e){return null==e?[]:_i(e,Rs(e))},Dr.groupBy=va,Dr.initial=function(e){return null!=e&&e.length?rn(e,0,-1):[]},Dr.intersection=Go,Dr.intersectionBy=Zo,Dr.intersectionWith=Ko,Dr.invert=Ss,Dr.invertBy=As,Dr.invokeMap=_a,Dr.iteratee=nc,Dr.keyBy=xa,Dr.keys=Os,Dr.keysIn=Rs,Dr.map=Ea,Dr.mapKeys=function(e,t){var r={};return t=co(t,3),wi(e,(function(e,i,n){ni(r,t(e,i,n),e)})),r},Dr.mapValues=function(e,t){var r={};return t=co(t,3),wi(e,(function(e,i,n){ni(r,i,t(e,i,n))})),r},Dr.matches=function(e){return Di(si(e,1))},Dr.matchesProperty=function(e,t){return Ui(e,si(t,1))},Dr.memoize=Ma,Dr.merge=Ns,Dr.mergeWith=Ms,Dr.method=oc,Dr.methodOf=ac,Dr.mixin=sc,Dr.negate=$a,Dr.nthArg=function(e){return e=fs(e),Ki((function(t){return Hi(t,e)}))},Dr.omit=$s,Dr.omitBy=function(e,t){return Ls(e,$a(co(t)))},Dr.once=function(e){return Sa(2,e)},Dr.orderBy=function(e,t,i,n){return null==e?[]:(qa(t)||(t=null==t?[]:[t]),qa(i=n?r:i)||(i=null==i?[]:[i]),zi(e,t,i))},Dr.over=lc,Dr.overArgs=ja,Dr.overEvery=uc,Dr.overSome=dc,Dr.partial=La,Dr.partialRight=Ba,Dr.partition=Ca,Dr.pick=js,Dr.pickBy=Ls,Dr.property=hc,Dr.propertyOf=function(e){return function(t){return null==e?r:xi(e,t)}},Dr.pull=Jo,Dr.pullAll=Qo,Dr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Wi(e,t,co(r,2)):e},Dr.pullAllWith=function(e,t,i){return e&&e.length&&t&&t.length?Wi(e,t,r,i):e},Dr.pullAt=Xo,Dr.range=pc,Dr.rangeRight=fc,Dr.rearg=Da,Dr.reject=function(e,t){return(qa(e)?Tt:gi)(e,$a(co(t,3)))},Dr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var i=-1,n=[],o=e.length;for(t=co(t,3);++i<o;){var a=e[i];t(a,i,e)&&(r.push(a),n.push(i))}return Vi(e,n),r},Dr.rest=function(e,t){if("function"!=typeof e)throw new Te(i);return Ki(e,t=t===r?t:fs(t))},Dr.reverse=ea,Dr.sampleSize=function(e,t,i){return t=(i?vo(e,t,i):t===r)?1:fs(t),(qa(e)?Jr:Ji)(e,t)},Dr.set=function(e,t,r){return null==e?e:Qi(e,t,r)},Dr.setWith=function(e,t,i,n){return n="function"==typeof n?n:r,null==e?e:Qi(e,t,i,n)},Dr.shuffle=function(e){return(qa(e)?Qr:tn)(e)},Dr.slice=function(e,t,i){var n=null==e?0:e.length;return n?(i&&"number"!=typeof i&&vo(e,t,i)?(t=0,i=n):(t=null==t?0:fs(t),i=i===r?n:fs(i)),rn(e,t,i)):[]},Dr.sortBy=ka,Dr.sortedUniq=function(e){return e&&e.length?sn(e):[]},Dr.sortedUniqBy=function(e,t){return e&&e.length?sn(e,co(t,2)):[]},Dr.split=function(e,t,i){return i&&"number"!=typeof i&&vo(e,t,i)&&(t=i=r),(i=i===r?f:i>>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ln(t))&&or(e)?_n(dr(e),0,i):e.split(t,i):[]},Dr.spread=function(e,t){if("function"!=typeof e)throw new Te(i);return t=null==t?0:br(fs(t),0),Ki((function(r){var i=r[t],n=_n(r,0,t);return i&&Mt(n,i),kt(e,this,n)}))},Dr.tail=function(e){var t=null==e?0:e.length;return t?rn(e,1,t):[]},Dr.take=function(e,t,i){return e&&e.length?rn(e,0,(t=i||t===r?1:fs(t))<0?0:t):[]},Dr.takeRight=function(e,t,i){var n=null==e?0:e.length;return n?rn(e,(t=n-(t=i||t===r?1:fs(t)))<0?0:t,n):[]},Dr.takeRightWhile=function(e,t){return e&&e.length?pn(e,co(t,3),!1,!0):[]},Dr.takeWhile=function(e,t){return e&&e.length?pn(e,co(t,3)):[]},Dr.tap=function(e,t){return t(e),e},Dr.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new Te(i);return es(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Oa(e,t,{leading:n,maxWait:t,trailing:o})},Dr.thru=pa,Dr.toArray=hs,Dr.toPairs=Bs,Dr.toPairsIn=Ds,Dr.toPath=function(e){return qa(e)?Nt(e,Lo):cs(e)?[e]:An(jo(ys(e)))},Dr.toPlainObject=bs,Dr.transform=function(e,t,r){var i=qa(e),n=i||Za(e)||ls(e);if(t=co(t,4),null==r){var o=e&&e.constructor;r=n?i?new o:[]:es(e)&&Ja(o)?Ur(Ge(e)):{}}return(n?It:wi)(e,(function(e,i,n){return t(r,e,i,n)})),r},Dr.unary=function(e){return Ia(e,1)},Dr.union=ta,Dr.unionBy=ra,Dr.unionWith=ia,Dr.uniq=function(e){return e&&e.length?un(e):[]},Dr.uniqBy=function(e,t){return e&&e.length?un(e,co(t,2)):[]},Dr.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?un(e,r,t):[]},Dr.unset=function(e,t){return null==e||dn(e,t)},Dr.unzip=na,Dr.unzipWith=oa,Dr.update=function(e,t,r){return null==e?e:hn(e,t,yn(r))},Dr.updateWith=function(e,t,i,n){return n="function"==typeof n?n:r,null==e?e:hn(e,t,yn(i),n)},Dr.values=Us,Dr.valuesIn=function(e){return null==e?[]:Qt(e,Rs(e))},Dr.without=aa,Dr.words=Js,Dr.wrap=function(e,t){return La(yn(t),e)},Dr.xor=sa,Dr.xorBy=ca,Dr.xorWith=la,Dr.zip=ua,Dr.zipObject=function(e,t){return mn(e||[],t||[],ei)},Dr.zipObjectDeep=function(e,t){return mn(e||[],t||[],Qi)},Dr.zipWith=da,Dr.entries=Bs,Dr.entriesIn=Ds,Dr.extend=vs,Dr.extendWith=_s,sc(Dr,Dr),Dr.add=bc,Dr.attempt=Qs,Dr.camelCase=Fs,Dr.capitalize=Hs,Dr.ceil=yc,Dr.clamp=function(e,t,i){return i===r&&(i=t,t=r),i!==r&&(i=(i=ms(i))==i?i:0),t!==r&&(t=(t=ms(t))==t?t:0),ai(ms(e),t,i)},Dr.clone=function(e){return si(e,4)},Dr.cloneDeep=function(e){return si(e,5)},Dr.cloneDeepWith=function(e,t){return si(e,5,t="function"==typeof t?t:r)},Dr.cloneWith=function(e,t){return si(e,4,t="function"==typeof t?t:r)},Dr.conformsTo=function(e,t){return null==t||ci(e,t,Os(t))},Dr.deburr=zs,Dr.defaultTo=function(e,t){return null==e||e!=e?t:e},Dr.divide=wc,Dr.endsWith=function(e,t,i){e=ys(e),t=ln(t);var n=e.length,o=i=i===r?n:ai(fs(i),0,n);return(i-=t.length)>=0&&e.slice(i,o)==t},Dr.eq=Ua,Dr.escape=function(e){return(e=ys(e))&&K.test(e)?e.replace(G,ir):e},Dr.escapeRegExp=function(e){return(e=ys(e))&&ie.test(e)?e.replace(re,"\\$&"):e},Dr.every=function(e,t,i){var n=qa(e)?At:pi;return i&&vo(e,t,i)&&(t=r),n(e,co(t,3))},Dr.find=ma,Dr.findIndex=zo,Dr.findKey=function(e,t){return Dt(e,co(t,3),wi)},Dr.findLast=ba,Dr.findLastIndex=qo,Dr.findLastKey=function(e,t){return Dt(e,co(t,3),vi)},Dr.floor=vc,Dr.forEach=ya,Dr.forEachRight=wa,Dr.forIn=function(e,t){return null==e?e:bi(e,co(t,3),Rs)},Dr.forInRight=function(e,t){return null==e?e:yi(e,co(t,3),Rs)},Dr.forOwn=function(e,t){return e&&wi(e,co(t,3))},Dr.forOwnRight=function(e,t){return e&&vi(e,co(t,3))},Dr.get=Ps,Dr.gt=Fa,Dr.gte=Ha,Dr.has=function(e,t){return null!=e&&mo(e,t,Pi)},Dr.hasIn=Is,Dr.head=Vo,Dr.identity=ic,Dr.includes=function(e,t,r,i){e=Va(e)?e:Us(e),r=r&&!i?fs(r):0;var n=e.length;return r<0&&(r=br(n+r,0)),ss(e)?r<=n&&e.indexOf(t,r)>-1:!!n&&Ft(e,t,r)>-1},Dr.indexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var n=null==r?0:fs(r);return n<0&&(n=br(i+n,0)),Ft(e,t,n)},Dr.inRange=function(e,t,i){return t=ps(t),i===r?(i=t,t=0):i=ps(i),function(e,t,r){return e>=yr(t,r)&&e<br(t,r)}(e=ms(e),t,i)},Dr.invoke=Ts,Dr.isArguments=za,Dr.isArray=qa,Dr.isArrayBuffer=Wa,Dr.isArrayLike=Va,Dr.isArrayLikeObject=Ga,Dr.isBoolean=function(e){return!0===e||!1===e||ts(e)&&Ci(e)==y},Dr.isBuffer=Za,Dr.isDate=Ka,Dr.isElement=function(e){return ts(e)&&1===e.nodeType&&!ns(e)},Dr.isEmpty=function(e){if(null==e)return!0;if(Va(e)&&(qa(e)||"string"==typeof e||"function"==typeof e.splice||Za(e)||ls(e)||za(e)))return!e.length;var t=go(e);if(t==E||t==S)return!e.size;if(Co(e))return!$i(e).length;for(var r in e)if(je.call(e,r))return!1;return!0},Dr.isEqual=function(e,t){return Oi(e,t)},Dr.isEqualWith=function(e,t,i){var n=(i="function"==typeof i?i:r)?i(e,t):r;return n===r?Oi(e,t,r,i):!!n},Dr.isError=Ya,Dr.isFinite=function(e){return"number"==typeof e&&Vt(e)},Dr.isFunction=Ja,Dr.isInteger=Qa,Dr.isLength=Xa,Dr.isMap=rs,Dr.isMatch=function(e,t){return e===t||Ri(e,t,uo(t))},Dr.isMatchWith=function(e,t,i){return i="function"==typeof i?i:r,Ri(e,t,uo(t),i)},Dr.isNaN=function(e){return is(e)&&e!=+e},Dr.isNative=function(e){if(Eo(e))throw new Ce("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ni(e)},Dr.isNil=function(e){return null==e},Dr.isNull=function(e){return null===e},Dr.isNumber=is,Dr.isObject=es,Dr.isObjectLike=ts,Dr.isPlainObject=ns,Dr.isRegExp=os,Dr.isSafeInteger=function(e){return Qa(e)&&e>=-h&&e<=h},Dr.isSet=as,Dr.isString=ss,Dr.isSymbol=cs,Dr.isTypedArray=ls,Dr.isUndefined=function(e){return e===r},Dr.isWeakMap=function(e){return ts(e)&&go(e)==O},Dr.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Ci(e)},Dr.join=function(e,t){return null==e?"":gr.call(e,t)},Dr.kebabCase=qs,Dr.last=Yo,Dr.lastIndexOf=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var o=n;return i!==r&&(o=(o=fs(i))<0?br(n+o,0):yr(o,n-1)),t==t?function(e,t,r){for(var i=r+1;i--;)if(e[i]===t)return i;return i}(e,t,o):Ut(e,zt,o,!0)},Dr.lowerCase=Ws,Dr.lowerFirst=Vs,Dr.lt=us,Dr.lte=ds,Dr.max=function(e){return e&&e.length?fi(e,ic,ki):r},Dr.maxBy=function(e,t){return e&&e.length?fi(e,co(t,2),ki):r},Dr.mean=function(e){return qt(e,ic)},Dr.meanBy=function(e,t){return qt(e,co(t,2))},Dr.min=function(e){return e&&e.length?fi(e,ic,Li):r},Dr.minBy=function(e,t){return e&&e.length?fi(e,co(t,2),Li):r},Dr.stubArray=gc,Dr.stubFalse=mc,Dr.stubObject=function(){return{}},Dr.stubString=function(){return""},Dr.stubTrue=function(){return!0},Dr.multiply=_c,Dr.nth=function(e,t){return e&&e.length?Hi(e,fs(t)):r},Dr.noConflict=function(){return pt._===this&&(pt._=Fe),this},Dr.noop=cc,Dr.now=Pa,Dr.pad=function(e,t,r){e=ys(e);var i=(t=fs(t))?ur(e):0;if(!t||i>=t)return e;var n=(t-i)/2;return qn(bt(n),r)+e+qn(gt(n),r)},Dr.padEnd=function(e,t,r){e=ys(e);var i=(t=fs(t))?ur(e):0;return t&&i<t?e+qn(t-i,r):e},Dr.padStart=function(e,t,r){e=ys(e);var i=(t=fs(t))?ur(e):0;return t&&i<t?qn(t-i,r)+e:e},Dr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),vr(ys(e).replace(ne,""),t||0)},Dr.random=function(e,t,i){if(i&&"boolean"!=typeof i&&vo(e,t,i)&&(t=i=r),i===r&&("boolean"==typeof t?(i=t,t=r):"boolean"==typeof e&&(i=e,e=r)),e===r&&t===r?(e=0,t=1):(e=ps(e),t===r?(t=e,e=0):t=ps(t)),e>t){var n=e;e=t,t=n}if(i||e%1||t%1){var o=_r();return yr(e+o*(t-e+lt("1e-"+((o+"").length-1))),t)}return Gi(e,t)},Dr.reduce=function(e,t,r){var i=qa(e)?$t:Gt,n=arguments.length<3;return i(e,co(t,4),r,n,di)},Dr.reduceRight=function(e,t,r){var i=qa(e)?jt:Gt,n=arguments.length<3;return i(e,co(t,4),r,n,hi)},Dr.repeat=function(e,t,i){return t=(i?vo(e,t,i):t===r)?1:fs(t),Zi(ys(e),t)},Dr.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Dr.result=function(e,t,i){var n=-1,o=(t=wn(t,e)).length;for(o||(o=1,e=r);++n<o;){var a=null==e?r:e[Lo(t[n])];a===r&&(n=o,a=i),e=Ja(a)?a.call(e):a}return e},Dr.round=xc,Dr.runInContext=e,Dr.sample=function(e){return(qa(e)?Yr:Yi)(e)},Dr.size=function(e){if(null==e)return 0;if(Va(e))return ss(e)?ur(e):e.length;var t=go(e);return t==E||t==S?e.size:$i(e).length},Dr.snakeCase=Gs,Dr.some=function(e,t,i){var n=qa(e)?Lt:nn;return i&&vo(e,t,i)&&(t=r),n(e,co(t,3))},Dr.sortedIndex=function(e,t){return on(e,t)},Dr.sortedIndexBy=function(e,t,r){return an(e,t,co(r,2))},Dr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var i=on(e,t);if(i<r&&Ua(e[i],t))return i}return-1},Dr.sortedLastIndex=function(e,t){return on(e,t,!0)},Dr.sortedLastIndexBy=function(e,t,r){return an(e,t,co(r,2),!0)},Dr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=on(e,t,!0)-1;if(Ua(e[r],t))return r}return-1},Dr.startCase=Zs,Dr.startsWith=function(e,t,r){return e=ys(e),r=null==r?0:ai(fs(r),0,e.length),t=ln(t),e.slice(r,r+t.length)==t},Dr.subtract=Ec,Dr.sum=function(e){return e&&e.length?Zt(e,ic):0},Dr.sumBy=function(e,t){return e&&e.length?Zt(e,co(t,2)):0},Dr.template=function(e,t,i){var n=Dr.templateSettings;i&&vo(e,t,i)&&(t=r),e=ys(e),t=_s({},t,n,Qn);var o,a,s=_s({},t.imports,n.imports,Qn),c=Os(s),l=Qt(s,c),u=0,d=t.interpolate||ve,h="__p += '",p=Se((t.escape||ve).source+"|"+d.source+"|"+(d===Q?he:ve).source+"|"+(t.evaluate||ve).source+"|$","g"),f="//# sourceURL="+(je.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ot+"]")+"\n    ";e.replace(p,(function(t,r,i,n,s,c){return i||(i=n),h+=e.slice(u,c).replace(_e,nr),r&&(o=!0,h+="' +\n    __e("+r+") +\n    '"),s&&(a=!0,h+="';\n    "+s+";\n    __p += '"),i&&(h+="' +\n    ((__t = ("+i+")) == null ? '' : __t) +\n    '"),u=c+t.length,t})),h+="';\n    ";var g=je.call(t,"variable")&&t.variable;if(g){if(ue.test(g))throw new Ce("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n    "+h+"\n    }\n    ";h=(a?h.replace(z,""):h).replace(q,"$1").replace(W,"$1;"),h="function("+(g||"obj")+") {\n    "+(g?"":"obj || (obj = {});\n    ")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\n    function print() { __p += __j.call(arguments, '') }\n    ":";\n    ")+h+"return __p\n    }";var m=Qs((function(){return ke(c,f+"return "+h).apply(r,l)}));if(m.source=h,Ya(m))throw m;return m},Dr.times=function(e,t){if((e=fs(e))<1||e>h)return[];var r=f,i=yr(e,f);t=co(t),e-=f;for(var n=Kt(i,t);++r<e;)t(r);return n},Dr.toFinite=ps,Dr.toInteger=fs,Dr.toLength=gs,Dr.toLower=function(e){return ys(e).toLowerCase()},Dr.toNumber=ms,Dr.toSafeInteger=function(e){return e?ai(fs(e),-h,h):0===e?e:0},Dr.toString=ys,Dr.toUpper=function(e){return ys(e).toUpperCase()},Dr.trim=function(e,t,i){if((e=ys(e))&&(i||t===r))return Yt(e);if(!e||!(t=ln(t)))return e;var n=dr(e),o=dr(t);return _n(n,er(n,o),tr(n,o)+1).join("")},Dr.trimEnd=function(e,t,i){if((e=ys(e))&&(i||t===r))return e.slice(0,hr(e)+1);if(!e||!(t=ln(t)))return e;var n=dr(e);return _n(n,0,tr(n,dr(t))+1).join("")},Dr.trimStart=function(e,t,i){if((e=ys(e))&&(i||t===r))return e.replace(ne,"");if(!e||!(t=ln(t)))return e;var n=dr(e);return _n(n,er(n,dr(t))).join("")},Dr.truncate=function(e,t){var i=30,n="...";if(es(t)){var o="separator"in t?t.separator:o;i="length"in t?fs(t.length):i,n="omission"in t?ln(t.omission):n}var a=(e=ys(e)).length;if(or(e)){var s=dr(e);a=s.length}if(i>=a)return e;var c=i-ur(n);if(c<1)return n;var l=s?_n(s,0,c).join(""):e.slice(0,c);if(o===r)return l+n;if(s&&(c+=l.length-c),os(o)){if(e.slice(c).search(o)){var u,d=l;for(o.global||(o=Se(o.source,ys(pe.exec(o))+"g")),o.lastIndex=0;u=o.exec(d);)var h=u.index;l=l.slice(0,h===r?c:h)}}else if(e.indexOf(ln(o),c)!=c){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+n},Dr.unescape=function(e){return(e=ys(e))&&Z.test(e)?e.replace(V,pr):e},Dr.uniqueId=function(e){var t=++Le;return ys(e)+t},Dr.upperCase=Ks,Dr.upperFirst=Ys,Dr.each=ya,Dr.eachRight=wa,Dr.first=Vo,sc(Dr,function(){var e={};return wi(Dr,(function(t,r){je.call(Dr.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),Dr.VERSION="4.17.21",It(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Dr[e].placeholder=Dr})),It(["drop","take"],(function(e,t){zr.prototype[e]=function(i){i=i===r?1:br(fs(i),0);var n=this.__filtered__&&!t?new zr(this):this.clone();return n.__filtered__?n.__takeCount__=yr(i,n.__takeCount__):n.__views__.push({size:yr(i,f),type:e+(n.__dir__<0?"Right":"")}),n},zr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),It(["filter","map","takeWhile"],(function(e,t){var r=t+1,i=1==r||3==r;zr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:co(e,3),type:r}),t.__filtered__=t.__filtered__||i,t}})),It(["head","last"],(function(e,t){var r="take"+(t?"Right":"");zr.prototype[e]=function(){return this[r](1).value()[0]}})),It(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");zr.prototype[e]=function(){return this.__filtered__?new zr(this):this[r](1)}})),zr.prototype.compact=function(){return this.filter(ic)},zr.prototype.find=function(e){return this.filter(e).head()},zr.prototype.findLast=function(e){return this.reverse().find(e)},zr.prototype.invokeMap=Ki((function(e,t){return"function"==typeof e?new zr(this):this.map((function(r){return Ai(r,e,t)}))})),zr.prototype.reject=function(e){return this.filter($a(co(e)))},zr.prototype.slice=function(e,t){e=fs(e);var i=this;return i.__filtered__&&(e>0||t<0)?new zr(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==r&&(i=(t=fs(t))<0?i.dropRight(-t):i.take(t-e)),i)},zr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zr.prototype.toArray=function(){return this.take(f)},wi(zr.prototype,(function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=Dr[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);o&&(Dr.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,c=t instanceof zr,l=s[0],u=c||qa(t),d=function(e){var t=o.apply(Dr,Mt([e],s));return n&&h?t[0]:t};u&&i&&"function"==typeof l&&1!=l.length&&(c=u=!1);var h=this.__chain__,p=!!this.__actions__.length,f=a&&!h,g=c&&!p;if(!a&&u){t=g?t:new zr(this);var m=e.apply(t,s);return m.__actions__.push({func:pa,args:[d],thisArg:r}),new Hr(m,h)}return f&&g?e.apply(this,s):(m=this.thru(d),f?n?m.value()[0]:m.value():m)})})),It(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Oe[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);Dr.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var n=this.value();return t.apply(qa(n)?n:[],e)}return this[r]((function(r){return t.apply(qa(r)?r:[],e)}))}})),wi(zr.prototype,(function(e,t){var r=Dr[t];if(r){var i=r.name+"";je.call(Tr,i)||(Tr[i]=[]),Tr[i].push({name:t,func:r})}})),Tr[Un(r,2).name]=[{name:"wrapper",func:r}],zr.prototype.clone=function(){var e=new zr(this.__wrapped__);return e.__actions__=An(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=An(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=An(this.__views__),e},zr.prototype.reverse=function(){if(this.__filtered__){var e=new zr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=qa(e),i=t<0,n=r?e.length:0,o=function(e,t,r){for(var i=-1,n=r.length;++i<n;){var o=r[i],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=yr(t,e+a);break;case"takeRight":e=br(e,t-a)}}return{start:e,end:t}}(0,n,this.__views__),a=o.start,s=o.end,c=s-a,l=i?s:a-1,u=this.__iteratees__,d=u.length,h=0,p=yr(c,this.__takeCount__);if(!r||!i&&n==c&&p==c)return fn(e,this.__actions__);var f=[];e:for(;c--&&h<p;){for(var g=-1,m=e[l+=t];++g<d;){var b=u[g],y=b.iteratee,w=b.type,v=y(m);if(2==w)m=v;else if(!v){if(1==w)continue e;break e}}f[h++]=m}return f},Dr.prototype.at=fa,Dr.prototype.chain=function(){return ha(this)},Dr.prototype.commit=function(){return new Hr(this.value(),this.__chain__)},Dr.prototype.next=function(){this.__values__===r&&(this.__values__=hs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},Dr.prototype.plant=function(e){for(var t,i=this;i instanceof Fr;){var n=Do(i);n.__index__=0,n.__values__=r,t?o.__wrapped__=n:t=n;var o=n;i=i.__wrapped__}return o.__wrapped__=e,t},Dr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof zr){var t=e;return this.__actions__.length&&(t=new zr(this)),(t=t.reverse()).__actions__.push({func:pa,args:[ea],thisArg:r}),new Hr(t,this.__chain__)}return this.thru(ea)},Dr.prototype.toJSON=Dr.prototype.valueOf=Dr.prototype.value=function(){return fn(this.__wrapped__,this.__actions__)},Dr.prototype.first=Dr.prototype.head,et&&(Dr.prototype[et]=function(){return this}),Dr}();gt?((gt.exports=fr)._=fr,ft._=fr):pt._=fr}.call(Mh),jh=Object.defineProperty,Lh=Object.defineProperties,Bh=Object.getOwnPropertyDescriptors,Dh=Object.getOwnPropertySymbols,Uh=Object.prototype.hasOwnProperty,Fh=Object.prototype.propertyIsEnumerable,Hh=(e,t,r)=>t in e?jh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zh=(e,t)=>{for(var r in t||(t={}))Uh.call(t,r)&&Hh(e,r,t[r]);if(Dh)for(var r of Dh(t))Fh.call(t,r)&&Hh(e,r,t[r]);return e},qh=(e,t)=>Lh(e,Bh(t)),Wh={},Vh=e=>Wh[e],Gh=(e,t)=>{Wh[e]=t},Zh=class{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=Vh("events"),this.client=Vh("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Nh.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){let e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){let e={};return this.namespace.chains.forEach((t=>{var r;let i=xh(t);e[i]=this.createHttpProvider(i,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||_h(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pc(new gh(r,Vh("disableProviderPing")))}},Kh=class{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=Vh("events"),this.client=Vh("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(Nh.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){let r=t||_h(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pc(new ph(r,Vh("disableProviderPing")))}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProviders(){let e={};return this.namespace.chains.forEach((t=>{var r;let i=parseInt(xh(t));e[i]=this.createHttpProvider(i,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}getHttpProvider(){let e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,r;let i=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0";i=i.startsWith("0x")?i:`0x${i}`;let n=parseInt(i,16);if(this.isChainApproved(n))this.setDefaultChain(`${n}`);else{if(!this.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${n}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:null==(r=this.namespace.chains)?void 0:r[0]}),this.setDefaultChain(`${n}`)}return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}},Yh=class{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=Vh("events"),this.client=Vh("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Nh.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach((t=>{var r;let i=xh(t);e[i]=this.createHttpProvider(i,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||_h(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pc(new gh(r,Vh("disableProviderPing")))}},Jh=class{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=Vh("events"),this.client=Vh("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Nh.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach((t=>{var r;let i=xh(t);e[i]=this.createHttpProvider(i,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||_h(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pc(new gh(r,Vh("disableProviderPing")))}},Qh=class{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=Vh("events"),this.client=Vh("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Nh.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach((t=>{let r=this.getCardanoRPCUrl(t),i=xh(t);e[i]=this.createHttpProvider(i,r)})),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){let t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||this.getCardanoRPCUrl(e);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pc(new gh(r,Vh("disableProviderPing")))}},Xh=class{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=Vh("events"),this.client=Vh("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Nh.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach((t=>{var r;let i=xh(t);e[i]=this.createHttpProvider(i,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||_h(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pc(new gh(r,Vh("disableProviderPing")))}},ep=class{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=Vh("events"),this.client=Vh("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Nh.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach((t=>{var r;let i=xh(t);e[i]=this.createHttpProvider(i,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||_h(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pc(new gh(r,Vh("disableProviderPing")))}},tp=class{constructor(e){this.name="near",this.namespace=e.namespace,this.events=Vh("events"),this.client=Vh("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){let r=t||_h(`${this.name}:${e}`,this.namespace);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(Nh.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){let e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||_h(e,this.namespace);return typeof r>"u"?void 0:new Pc(new gh(r,Vh("disableProviderPing")))}},rp=Object.defineProperty,ip=Object.defineProperties,np=Object.getOwnPropertyDescriptors,op=Object.getOwnPropertySymbols,ap=Object.prototype.hasOwnProperty,sp=Object.prototype.propertyIsEnumerable,cp=(e,t,r)=>t in e?rp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lp=(e,t)=>{for(var r in t||(t={}))ap.call(t,r)&&cp(e,r,t[r]);if(op)for(var r of op(t))sp.call(t,r)&&cp(e,r,t[r]);return e},up=(e,t)=>ip(e,np(t)),dp=class e{constructor(e){this.events=new Ah.default,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,ma.default)(pa({level:e?.logger||Th})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(t){let r=new e(t);return await r.initialize(),r}async request(e,t,r){let[i,n]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(i).request({request:lp({},e),chainId:`${i}:${n}`,topic:this.session.topic,expiry:r})}sendAsync(e,t,r,i){let n=(new Date).getTime();this.request(e,r,i).then((e=>t(null,qs(n,e)))).catch((e=>t(e,void 0)))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:tn("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");let{uri:r,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});r&&(this.uri=r,this.events.emit("display_uri",r)),await i().then((e=>{this.session=e;let t=Ih(e.namespaces);this.namespaces=Ch(this.namespaces,t),this.persist("namespaces",this.namespaces)})).catch((e=>{if(e.message!==qd)throw e;t++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;let[r,i]=this.validateChain(e);this.getProvider(r).setDefaultChain(i,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");let t=this.client.pairing.getAll();if(rn(t)){for(let r of t)e.deletePairings?this.client.core.expirer.set(r.topic,0):await this.client.core.relayer.subscriber.unsubscribe(r.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){let e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await lh.init({logger:this.providerOpts.logger||Th,relayUrl:this.providerOpts.relayUrl||"wss://relay.walletconnect.com",projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");let e=[...new Set(Object.keys(this.session.namespaces).map((e=>Xi(e))))];Gh("client",this.client),Gh("events",this.events),Gh("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;let t=function(e,t){let r=Object.keys(t.namespaces).filter((t=>t.includes(e)));if(!r.length)return[];let i=[];return r.forEach((e=>{let r=t.namespaces[e].accounts;i.push(...r)})),i}(e,this.session),r=Eh(t),i=Ch(this.namespaces,this.optionalNamespaces),n=up(lp({},i[e]),{accounts:t,chains:r});switch(e){case"eip155":this.rpcProviders[e]=new Kh({namespace:n});break;case"solana":this.rpcProviders[e]=new Yh({namespace:n});break;case"cosmos":this.rpcProviders[e]=new Jh({namespace:n});break;case"polkadot":this.rpcProviders[e]=new Zh({namespace:n});break;case"cip34":this.rpcProviders[e]=new Qh({namespace:n});break;case"elrond":this.rpcProviders[e]=new Xh({namespace:n});break;case"multiversx":this.rpcProviders[e]=new ep({namespace:n});break;case"near":this.rpcProviders[e]=new tp({namespace:n})}}))}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",(e=>{this.events.emit("session_ping",e)})),this.client.on("session_event",(e=>{let{params:t}=e,{event:r}=t;if("accountsChanged"===r.name){let e=r.data;e&&rn(e)&&this.events.emit("accountsChanged",e.map(Ph))}else if("chainChanged"===r.name){let e=t.chainId,r=t.event.data,i=Xi(e),n=Sh(e)!==Sh(r)?`${i}:${Sh(r)}`:e;this.onChainChanged(n)}else this.events.emit(r.name,r.data);this.events.emit("session_event",e)})),this.client.on("session_update",(({topic:e,params:t})=>{var r;let{namespaces:i}=t,n=null==(r=this.client)?void 0:r.session.get(e);this.session=up(lp({},n),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})})),this.client.on("session_delete",(async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",up(lp({},tn("USER_DISCONNECTED")),{data:e.topic}))})),this.on(Nh.DEFAULT_CHAIN_CHANGED,(e=>{this.onChainChanged(e,!0)}))}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])}))}setNamespaces(e){let{namespaces:t,optionalNamespaces:r,sessionProperties:i}=e;t&&Object.keys(t).length&&(this.namespaces=t),r&&Object.keys(r).length&&(this.optionalNamespaces=r),this.sessionProperties=i,this.persist("namespaces",t),this.persist("optionalNamespaces",r)}validateChain(e){let[t,r]=e?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,r];if(t&&!Object.keys(this.namespaces||{}).map((e=>Xi(e))).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&r)return[t,r];let i=Xi(Object.keys(this.namespaces)[0]);return[i,this.rpcProviders[i].getDefaultChain()]}async requestAccounts(){let[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;let[r,i]=this.validateChain(e);i&&(t||this.getProvider(r).setDefaultChain(i),this.namespaces[r]?this.namespaces[r].defaultChain=i:this.namespaces[`${r}:${i}`]?this.namespaces[`${r}:${i}`].defaultChain=i:this.namespaces[`${r}:${i}`]={defaultChain:i},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${Oh}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${Oh}/${e}`)}},hp=dp})),vp=a((()=>{Symbol(),pp=Symbol(),fp=Object.getPrototypeOf,gp=new WeakMap,mp=e=>e&&(gp.has(e)?gp.get(e):fp(e)===Object.prototype||fp(e)===Array.prototype),bp=e=>mp(e)&&e[pp]||null,yp=(e,t=!0)=>{gp.set(e,t)}}));function _p(e={}){return Tp(e)}function xp(e,t,r){let i=Ip.get(e);"production"!==(kp.env?kp.env.MODE:void 0)&&!i&&console.warn("Please use proxy object");let n,o=[],a=i[3],s=!1,c=a((e=>{o.push(e),r?t(o.splice(0)):n||(n=Promise.resolve().then((()=>{n=void 0,s&&t(o.splice(0))})))}));return s=!0,()=>{s=!1,c()}}function Ep(e,t){let r=Ip.get(e);"production"!==(kp.env?kp.env.MODE:void 0)&&!r&&console.warn("Please use proxy object");let[i,n,o]=r;return o(i,n(),t)}function Cp(e){return Sp.add(e),e}var kp,Pp,Ip,Sp,Ap,Tp,Op=a((()=>{vp(),kp={},Pp=e=>"object"==typeof e&&null!==e,Ip=new WeakMap,Sp=new WeakSet,Ap=(e=Object.is,t=((e,t)=>new Proxy(e,t)),r=(e=>Pp(e)&&!Sp.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)),i=(e=>{switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}}),n=new WeakMap,o=((e,t,r=i)=>{let a=n.get(e);if(a?.[0]===t)return a[1];let s=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return yp(s,!0),n.set(e,[t,s]),Reflect.ownKeys(e).forEach((t=>{if(Object.getOwnPropertyDescriptor(s,t))return;let i=Reflect.get(e,t),n={value:i,enumerable:!0,configurable:!0};if(Sp.has(i))yp(i,!1);else if(i instanceof Promise)delete n.value,n.get=()=>r(i);else if(Ip.has(i)){let[e,t]=Ip.get(i);n.value=o(e,t(),r)}Object.defineProperty(s,t,n)})),Object.preventExtensions(s)}),a=new WeakMap,s=[1,1],c=(i=>{if(!Pp(i))throw new Error("object required");let n=a.get(i);if(n)return n;let l=s[0],u=new Set,d=(e,t=++s[0])=>{l!==t&&(l=t,u.forEach((r=>r(e,t))))},h=s[1],p=e=>(t,r)=>{let i=[...t];i[1]=[e,...i[1]],d(i,r)},f=new Map,g=e=>{var t;let r=f.get(e);r&&(f.delete(e),null==(t=r[1])||t.call(r))},m=Array.isArray(i)?[]:Object.create(Object.getPrototypeOf(i)),b=t(m,{deleteProperty(e,t){let r=Reflect.get(e,t);g(t);let i=Reflect.deleteProperty(e,t);return i&&d(["delete",[t],r]),i},set(t,i,n,o){let s=Reflect.has(t,i),l=Reflect.get(t,i,o);if(s&&(e(l,n)||a.has(n)&&e(l,a.get(n))))return!0;g(i),Pp(n)&&(n=bp(n)||n);let h=n;if(n instanceof Promise)n.then((e=>{n.status="fulfilled",n.value=e,d(["resolve",[i],e])})).catch((e=>{n.status="rejected",n.reason=e,d(["reject",[i],e])}));else{!Ip.has(n)&&r(n)&&(h=c(n));let e=!Sp.has(h)&&Ip.get(h);e&&((e,t)=>{if("production"!==(kp.env?kp.env.MODE:void 0)&&f.has(e))throw new Error("prop listener already exists");if(u.size){let r=t[3](p(e));f.set(e,[t,r])}else f.set(e,[t])})(i,e)}return Reflect.set(t,i,h,o),d(["set",[i],n,l]),!0}});a.set(i,b);let y=[m,(e=++s[1])=>(h!==e&&!u.size&&(h=e,f.forEach((([t])=>{let r=t[1](e);r>l&&(l=r)}))),l),o,e=>(u.add(e),1===u.size&&f.forEach((([e,t],r)=>{if("production"!==(kp.env?kp.env.MODE:void 0)&&t)throw new Error("remove already exists");let i=e[3](p(r));f.set(r,[e,i])})),()=>{u.delete(e),0===u.size&&f.forEach((([e,t],r)=>{t&&(t(),f.set(r,[e]))}))})];return Ip.set(b,y),Reflect.ownKeys(i).forEach((e=>{let t=Object.getOwnPropertyDescriptor(i,e);"value"in t&&(b[e]=i[e],delete t.value,delete t.writable),Object.defineProperty(m,e,t)})),b}))=>[c,Ip,Sp,e,t,r,i,n,o,a,s],[Tp]=Ap()}));async function Rp(e,t){let r=Zp({sdkType:Yp,sdkVersion:Jp},t),i=new URL(e,Kp);return i.searchParams.append("projectId",Hp.state.projectId),Object.entries(r).forEach((([e,t])=>{t&&i.searchParams.append(e,String(t))})),(await fetch(i)).json()}var Np,Mp,$p,jp,Lp,Bp,Dp,Up,Fp,Hp,zp,qp,Wp,Vp,Gp,Zp,Kp,Yp,Jp,Qp,Xp,ef,tf,rf,nf,of,af,sf,cf,lf,uf,df,hf,pf,ff,gf,mf,bf,yf,wf,vf,_f,xf,Ef,Cf,kf,Pf,If,Sf,Af,Tf,Of,Rf,Nf,Mf,$f,jf,Lf,Bf,Df,Uf=a((()=>{Op(),Np=_p({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),Mp={state:Np,subscribe:e=>xp(Np,(()=>e(Np))),push(e,t){e!==Np.view&&(Np.view=e,t&&(Np.data=t),Np.history.push(e))},reset(e){Np.view=e,Np.history=[e]},replace(e){Np.history.length>1&&(Np.history[Np.history.length-1]=e,Np.view=e)},goBack(){if(Np.history.length>1){Np.history.pop();let[e]=Np.history.slice(-1);Np.view=e}},setData(e){Np.data=e}},$p={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>typeof window<"u"&&!(!window.matchMedia("(pointer:coarse)").matches&&!/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>$p.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){let e=navigator.userAgent.toLowerCase();return $p.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),isArray:e=>Array.isArray(e)&&e.length>0,formatNativeUrl(e,t,r){if($p.isHttpUrl(e))return this.formatUniversalUrl(e,t,r);let i=e;return i.includes("://")||(i=e.replaceAll("/","").replaceAll(":",""),i=`${i}://`),i.endsWith("/")||(i=`${i}/`),this.setWalletConnectDeepLink(i,r),`${i}wc?uri=${encodeURIComponent(t)}`},formatUniversalUrl(e,t,r){if(!$p.isHttpUrl(e))return this.formatNativeUrl(e,t,r);let i=e;return i.endsWith("/")||(i=`${i}/`),this.setWalletConnectDeepLink(i,r),`${i}wc?uri=${encodeURIComponent(t)}`},wait:async e=>new Promise((t=>{setTimeout(t,e)})),openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem($p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{let[t]=e.split("?");localStorage.setItem($p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem($p.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem($p.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;let t=null==(e=Mp.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},jp=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),Lp=_p({enabled:jp,userSessionId:"",events:[],connectedWalletId:void 0}),Bp={state:Lp,subscribe:e=>xp(Lp.events,(()=>e(Ep(Lp.events[Lp.events.length-1])))),initialize(){Lp.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(Lp.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){Lp.connectedWalletId=e},click(e){if(Lp.enabled){let t={type:"CLICK",name:e.name,userSessionId:Lp.userSessionId,timestamp:Date.now(),data:e};Lp.events.push(t)}},track(e){if(Lp.enabled){let t={type:"TRACK",name:e.name,userSessionId:Lp.userSessionId,timestamp:Date.now(),data:e};Lp.events.push(t)}},view(e){if(Lp.enabled){let t={type:"VIEW",name:e.name,userSessionId:Lp.userSessionId,timestamp:Date.now(),data:e};Lp.events.push(t)}}},Dp=_p({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),Up={state:Dp,subscribe:e=>xp(Dp,(()=>e(Dp))),setChains(e){Dp.chains=e},setWalletConnectUri(e){Dp.walletConnectUri=e},setIsCustomDesktop(e){Dp.isCustomDesktop=e},setIsCustomMobile(e){Dp.isCustomMobile=e},setIsDataLoaded(e){Dp.isDataLoaded=e},setIsUiLoaded(e){Dp.isUiLoaded=e},setIsAuth(e){Dp.isAuth=e}},Fp=_p({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),Hp={state:Fp,subscribe:e=>xp(Fp,(()=>e(Fp))),setConfig(e){var t,r;Bp.initialize(),Up.setChains(e.chains),Up.setIsAuth(!!e.enableAuthMode),Up.setIsCustomMobile(!(null==(t=e.mobileWallets)||!t.length)),Up.setIsCustomDesktop(!(null==(r=e.desktopWallets)||!r.length)),$p.setModalVersionInStorage(),Object.assign(Fp,e)}},zp=Object.defineProperty,qp=Object.getOwnPropertySymbols,Wp=Object.prototype.hasOwnProperty,Vp=Object.prototype.propertyIsEnumerable,Gp=(e,t,r)=>t in e?zp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zp=(e,t)=>{for(var r in t||(t={}))Wp.call(t,r)&&Gp(e,r,t[r]);if(qp)for(var r of qp(t))Vp.call(t,r)&&Gp(e,r,t[r]);return e},Kp="https://explorer-api.walletconnect.com",Yp="wcm",Jp="js-2.6.2",Qp={getDesktopListings:async e=>Rp("/w3m/v1/getDesktopListings",e),getMobileListings:async e=>Rp("/w3m/v1/getMobileListings",e),getInjectedListings:async e=>Rp("/w3m/v1/getInjectedListings",e),getAllListings:async e=>Rp("/w3m/v1/getAllListings",e),getWalletImageUrl:e=>`${Kp}/w3m/v1/getWalletImage/${e}?projectId=${Hp.state.projectId}&sdkType=${Yp}&sdkVersion=${Jp}`,getAssetImageUrl:e=>`${Kp}/w3m/v1/getAssetImage/${e}?projectId=${Hp.state.projectId}&sdkType=${Yp}&sdkVersion=${Jp}`},Xp=Object.defineProperty,ef=Object.getOwnPropertySymbols,tf=Object.prototype.hasOwnProperty,rf=Object.prototype.propertyIsEnumerable,nf=(e,t,r)=>t in e?Xp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,of=(e,t)=>{for(var r in t||(t={}))tf.call(t,r)&&nf(e,r,t[r]);if(ef)for(var r of ef(t))rf.call(t,r)&&nf(e,r,t[r]);return e},af=$p.isMobile(),sf=_p({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),cf={state:sf,async getRecomendedWallets(){let{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=Hp.state;if("NONE"===e||"ALL"===t&&!e)return sf.recomendedWallets;if($p.isArray(e)){let t={recommendedIds:e.join(",")},{listings:r}=await Qp.getAllListings(t),i=Object.values(r);i.sort(((t,r)=>e.indexOf(t.id)-e.indexOf(r.id))),sf.recomendedWallets=i}else{let{chains:e,isAuth:r}=Up.state,i=e?.join(","),n=$p.isArray(t),o={page:1,sdks:r?"auth_v1":void 0,entries:$p.RECOMMENDED_WALLET_AMOUNT,chains:i,version:2,excludedIds:n?t.join(","):void 0},{listings:a}=af?await Qp.getMobileListings(o):await Qp.getDesktopListings(o);sf.recomendedWallets=Object.values(a)}return sf.recomendedWallets},async getWallets(e){let t=of({},e),{explorerRecommendedWalletIds:r,explorerExcludedWalletIds:i}=Hp.state,{recomendedWallets:n}=sf;if("ALL"===i)return sf.wallets;n.length?t.excludedIds=n.map((e=>e.id)).join(","):$p.isArray(r)&&(t.excludedIds=r.join(",")),$p.isArray(i)&&(t.excludedIds=[t.excludedIds,i].filter(Boolean).join(",")),Up.state.isAuth&&(t.sdks="auth_v1");let{page:o,search:a}=e,{listings:s,total:c}=af?await Qp.getMobileListings(t):await Qp.getDesktopListings(t),l=Object.values(s),u=a?"search":"wallets";return sf[u]={listings:[...sf[u].listings,...l],total:c,page:o??1},{listings:l,total:c}},getWalletImageUrl:e=>Qp.getWalletImageUrl(e),getAssetImageUrl:e=>Qp.getAssetImageUrl(e),resetSearch(){sf.search={listings:[],total:0,page:1}}},lf=_p({open:!1}),uf={state:lf,subscribe:e=>xp(lf,(()=>e(lf))),open:async e=>new Promise((t=>{let{isUiLoaded:r,isDataLoaded:i}=Up.state;if($p.removeWalletConnectDeepLink(),Up.setWalletConnectUri(e?.uri),Up.setChains(e?.chains),Mp.reset("ConnectWallet"),r&&i)lf.open=!0,t();else{let e=setInterval((()=>{let r=Up.state;r.isUiLoaded&&r.isDataLoaded&&(clearInterval(e),lf.open=!0,t())}),200)}})),close(){lf.open=!1}},df=Object.defineProperty,hf=Object.getOwnPropertySymbols,pf=Object.prototype.hasOwnProperty,ff=Object.prototype.propertyIsEnumerable,gf=(e,t,r)=>t in e?df(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mf=(e,t)=>{for(var r in t||(t={}))pf.call(t,r)&&gf(e,r,t[r]);if(hf)for(var r of hf(t))ff.call(t,r)&&gf(e,r,t[r]);return e},bf=_p({themeMode:typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}),yf={state:bf,subscribe:e=>xp(bf,(()=>e(bf))),setThemeConfig(e){let{themeMode:t,themeVariables:r}=e;t&&(bf.themeMode=t),r&&(bf.themeVariables=mf({},r))}},wf=_p({open:!1,message:"",variant:"success"}),vf={state:wf,subscribe:e=>xp(wf,(()=>e(wf))),openToast(e,t){wf.open=!0,wf.message=e,wf.variant=t},closeToast(){wf.open=!1}}})),Ff=a((()=>{_f=window,xf=_f.ShadowRoot&&(void 0===_f.ShadyCSS||_f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ef=Symbol(),Cf=new WeakMap,kf=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Ef)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(xf&&void 0===e){let r=void 0!==t&&1===t.length;r&&(e=Cf.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Cf.set(t,e))}return e}toString(){return this.cssText}},Pf=e=>new kf("string"==typeof e?e:e+"",void 0,Ef),If=(e,...t)=>{let r=1===e.length?e[0]:t.reduce(((t,r,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[i+1]),e[0]);return new kf(r,e,Ef)},Sf=(e,t)=>{xf?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{let r=document.createElement("style"),i=_f.litNonce;void 0!==i&&r.setAttribute("nonce",i),r.textContent=t.cssText,e.appendChild(r)}))},Af=xf?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return Pf(t)})(e):e})),Hf=a((()=>{Ff(),Ff(),Of=window,Rf=Of.trustedTypes,Nf=Rf?Rf.emptyScript:"",Mf=Of.reactiveElementPolyfillSupport,$f={toAttribute(e,t){switch(t){case Boolean:e=e?Nf:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},jf=(e,t)=>t!==e&&(t==t||e==e),Lf={attribute:!0,type:String,converter:$f,reflect:!1,hasChanged:jf},Bf="finalized",(Df=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),(null!==(t=this.h)&&void 0!==t?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();let e=[];return this.elementProperties.forEach(((t,r)=>{let i=this._$Ep(r,t);void 0!==i&&(this._$Ev.set(i,r),e.push(i))})),e}static createProperty(e,t=Lf){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){let r="symbol"==typeof e?Symbol():"__"+e,i=this.getPropertyDescriptor(e,r,t);void 0!==i&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){return{get(){return this[t]},set(i){let n=this[e];this[t]=i,this.requestUpdate(e,n,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Lf}static finalize(){if(this.hasOwnProperty(Bf))return!1;this[Bf]=!0;let e=Object.getPrototypeOf(this);if(e.finalize(),void 0!==e.h&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let r of t)this.createProperty(r,e[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let e of r)t.unshift(Af(e))}else void 0!==e&&t.push(Af(e));return t}static _$Ep(e,t){let r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(e=this.constructor.h)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,r;(null!==(t=this._$ES)&&void 0!==t?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(r=e.hostConnected)||void 0===r||r.call(e))}removeController(e){var t;null===(t=this._$ES)||void 0===t||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;let t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return Sf(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EO(e,t,r=Lf){var i;let n=this.constructor._$Ep(e,r);if(void 0!==n&&!0===r.reflect){let o=(void 0!==(null===(i=r.converter)||void 0===i?void 0:i.toAttribute)?r.converter:$f).toAttribute(t,r.type);this._$El=e,null==o?this.removeAttribute(n):this.setAttribute(n,o),this._$El=null}}_$AK(e,t){var r;let i=this.constructor,n=i._$Ev.get(e);if(void 0!==n&&this._$El!==n){let e=i.getPropertyOptions(n),o="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null===(r=e.converter)||void 0===r?void 0:r.fromAttribute)?e.converter:$f;this._$El=n,this[n]=o.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,r){let i=!0;void 0!==e&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||jf)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,r))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((e,t)=>this[t]=e)),this._$Ei=void 0);let t=!1,r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(r)):this._$Ek()}catch(e){throw t=!1,this._$Ek(),e}t&&this._$AE(r)}willUpdate(e){}_$AE(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$EO(t,this[t],e))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}})[Bf]=!0,Df.elementProperties=new Map,Df.elementStyles=[],Df.shadowRootOptions={mode:"open"},Mf?.({ReactiveElement:Df}),(null!==(Tf=Of.reactiveElementVersions)&&void 0!==Tf?Tf:Of.reactiveElementVersions=[]).push("1.6.3")}));function zf(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Zf?Zf.createHTML(t):t}function qf(e,t,r=e,i){var n,o,a,s;if(t===gg)return t;let c=void 0!==i?null===(n=r._$Co)||void 0===n?void 0:n[i]:r._$Cl,l=tg(t)?void 0:t._$litDirective$;return c?.constructor!==l&&(null===(o=c?._$AO)||void 0===o||o.call(c,!1),void 0===l?c=void 0:(c=new l(e),c._$AT(e,r,i)),void 0!==i?(null!==(a=(s=r)._$Co)&&void 0!==a?a:s._$Co=[])[i]=c:r._$Cl=c),void 0!==c&&(t=qf(e,c._$AS(e,t.values),c,i)),t}var Wf,Vf,Gf,Zf,Kf,Yf,Jf,Qf,Xf,eg,tg,rg,ig,ng,og,ag,sg,cg,lg,ug,dg,hg,pg,fg,gg,mg,bg,yg,wg,vg,_g,xg,Eg,Cg,kg,Pg,Ig,Sg,Ag,Tg,Og,Rg,Ng,Mg,$g,jg=a((()=>{Vf=window,Gf=Vf.trustedTypes,Zf=Gf?Gf.createPolicy("lit-html",{createHTML:e=>e}):void 0,Kf="$lit$",Yf=`lit$${(Math.random()+"").slice(9)}$`,Qf=`<${Jf="?"+Yf}>`,Xf=document,eg=()=>Xf.createComment(""),tg=e=>null===e||"object"!=typeof e&&"function"!=typeof e,rg=Array.isArray,ig=e=>rg(e)||"function"==typeof e?.[Symbol.iterator],ng="[ \t\n    \f\r]",og=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ag=/-->/g,sg=/>/g,cg=RegExp(`>|${ng}(?:([^\\s"'>=/]+)(${ng}*=${ng}*(?:[^ \t\n    \f\r"'\`<>=]|("|')|))|$)`,"g"),lg=/'/g,ug=/"/g,dg=/^(?:script|style|textarea|title)$/i,pg=(hg=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}))(1),fg=hg(2),gg=Symbol.for("lit-noChange"),mg=Symbol.for("lit-nothing"),bg=new WeakMap,yg=Xf.createTreeWalker(Xf,129,null,!1),wg=(e,t)=>{let r,i=e.length-1,n=[],o=2===t?"<svg>":"",a=og;for(let t=0;t<i;t++){let i,s,c=e[t],l=-1,u=0;for(;u<c.length&&(a.lastIndex=u,s=a.exec(c),null!==s);)u=a.lastIndex,a===og?"!--"===s[1]?a=ag:void 0!==s[1]?a=sg:void 0!==s[2]?(dg.test(s[2])&&(r=RegExp("</"+s[2],"g")),a=cg):void 0!==s[3]&&(a=cg):a===cg?">"===s[0]?(a=r??og,l=-1):void 0===s[1]?l=-2:(l=a.lastIndex-s[2].length,i=s[1],a=void 0===s[3]?cg:'"'===s[3]?ug:lg):a===ug||a===lg?a=cg:a===ag||a===sg?a=og:(a=cg,r=void 0);let d=a===cg&&e[t+1].startsWith("/>")?" ":"";o+=a===og?c+Qf:l>=0?(n.push(i),c.slice(0,l)+Kf+c.slice(l)+Yf+d):c+Yf+(-2===l?(n.push(void 0),t):d)}return[zf(e,o+(e[i]||"<?>")+(2===t?"</svg>":"")),n]},vg=class e{constructor({strings:t,_$litType$:r},i){let n;this.parts=[];let o=0,a=0,s=t.length-1,c=this.parts,[l,u]=wg(t,r);if(this.el=e.createElement(l,i),yg.currentNode=this.el.content,2===r){let e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(n=yg.nextNode())&&c.length<s;){if(1===n.nodeType){if(n.hasAttributes()){let e=[];for(let t of n.getAttributeNames())if(t.endsWith(Kf)||t.startsWith(Yf)){let r=u[a++];if(e.push(t),void 0!==r){let e=n.getAttribute(r.toLowerCase()+Kf).split(Yf),t=/([.?@])?(.*)/.exec(r);c.push({type:1,index:o,name:t[2],strings:e,ctor:"."===t[1]?Cg:"?"===t[1]?Pg:"@"===t[1]?Ig:Eg})}else c.push({type:6,index:o})}for(let t of e)n.removeAttribute(t)}if(dg.test(n.tagName)){let e=n.textContent.split(Yf),t=e.length-1;if(t>0){n.textContent=Gf?Gf.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],eg()),yg.nextNode(),c.push({type:2,index:++o});n.append(e[t],eg())}}}else if(8===n.nodeType)if(n.data===Jf)c.push({type:2,index:o});else{let e=-1;for(;-1!==(e=n.data.indexOf(Yf,e+1));)c.push({type:7,index:o}),e+=Yf.length-1}o++}}static createElement(e,t){let r=Xf.createElement("template");return r.innerHTML=e,r}},_g=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;let{el:{content:r},parts:i}=this._$AD,n=(null!==(t=e?.creationScope)&&void 0!==t?t:Xf).importNode(r,!0);yg.currentNode=n;let o=yg.nextNode(),a=0,s=0,c=i[0];for(;void 0!==c;){if(a===c.index){let t;2===c.type?t=new xg(o,o.nextSibling,this,e):1===c.type?t=new c.ctor(o,c.name,c.strings,this,e):6===c.type&&(t=new Sg(o,this,e)),this._$AV.push(t),c=i[++s]}a!==c?.index&&(o=yg.nextNode(),a++)}return yg.currentNode=Xf,n}v(e){let t=0;for(let r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},xg=class e{constructor(e,t,r,i){var n;this.type=2,this._$AH=mg,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=i,this._$Cp=null===(n=i?.isConnected)||void 0===n||n}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=qf(this,e,t),tg(e)?e===mg||null==e||""===e?(this._$AH!==mg&&this._$AR(),this._$AH=mg):e!==this._$AH&&e!==gg&&this._(e):void 0!==e._$litType$?this.g(e):void 0!==e.nodeType?this.$(e):ig(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==mg&&tg(this._$AH)?this._$AA.nextSibling.data=e:this.$(Xf.createTextNode(e)),this._$AH=e}g(e){var t;let{values:r,_$litType$:i}=e,n="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=vg.createElement(zf(i.h,i.h[0]),this.options)),i);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===n)this._$AH.v(r);else{let e=new _g(n,this),t=e.u(this.options);e.v(r),this.$(t),this._$AH=e}}_$AC(e){let t=bg.get(e.strings);return void 0===t&&bg.set(e.strings,t=new vg(e)),t}T(t){rg(this._$AH)||(this._$AH=[],this._$AR());let r,i=this._$AH,n=0;for(let o of t)n===i.length?i.push(r=new e(this.k(eg()),this.k(eg()),this,this.options)):r=i[n],r._$AI(o),n++;n<i.length&&(this._$AR(r&&r._$AB.nextSibling,n),i.length=n)}_$AR(e=this._$AA.nextSibling,t){var r;for(null===(r=this._$AP)||void 0===r||r.call(this,!1,!0,t);e&&e!==this._$AB;){let t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cp=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}},Eg=class{constructor(e,t,r,i,n){this.type=1,this._$AH=mg,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=n,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=mg}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,r,i){let n=this.strings,o=!1;if(void 0===n)e=qf(this,e,t,0),o=!tg(e)||e!==this._$AH&&e!==gg,o&&(this._$AH=e);else{let i,a,s=e;for(e=n[0],i=0;i<n.length-1;i++)a=qf(this,s[r+i],t,i),a===gg&&(a=this._$AH[i]),o||(o=!tg(a)||a!==this._$AH[i]),a===mg?e=mg:e!==mg&&(e+=(a??"")+n[i+1]),this._$AH[i]=a}o&&!i&&this.j(e)}j(e){e===mg?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Cg=class extends Eg{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===mg?void 0:e}},kg=Gf?Gf.emptyScript:"",Pg=class extends Eg{constructor(){super(...arguments),this.type=4}j(e){e&&e!==mg?this.element.setAttribute(this.name,kg):this.element.removeAttribute(this.name)}},Ig=class extends Eg{constructor(e,t,r,i,n){super(e,t,r,i,n),this.type=5}_$AI(e,t=this){var r;if((e=null!==(r=qf(this,e,t,0))&&void 0!==r?r:mg)===gg)return;let i=this._$AH,n=e===mg&&i!==mg||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==mg&&(i===mg||n);n&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,r;"function"==typeof this._$AH?this._$AH.call(null!==(r=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==r?r:this.element,e):this._$AH.handleEvent(e)}},Sg=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){qf(this,e)}},Ag=Vf.litHtmlPolyfillSupport,Ag?.(vg,xg),(null!==(Wf=Vf.litHtmlVersions)&&void 0!==Wf?Wf:Vf.litHtmlVersions=[]).push("2.8.0"),Tg=(e,t,r)=>{var i,n;let o=null!==(i=r?.renderBefore)&&void 0!==i?i:t,a=o._$litPart$;if(void 0===a){let e=null!==(n=r?.renderBefore)&&void 0!==n?n:null;o._$litPart$=a=new xg(t.insertBefore(eg(),e),e,void 0,r??{})}return a._$AI(e),a}})),Lg=a((()=>{Hf(),Hf(),jg(),jg(),Ng=class extends Df{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;let r=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=r.firstChild),r}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Tg(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}render(){return gg}},Ng.finalized=!0,Ng._$litElement$=!0,null===(Og=globalThis.litElementHydrateSupport)||void 0===Og||Og.call(globalThis,{LitElement:Ng}),Mg=globalThis.litElementPolyfillSupport,Mg?.({LitElement:Ng}),(null!==(Rg=globalThis.litElementVersions)&&void 0!==Rg?Rg:globalThis.litElementVersions=[]).push("3.3.3")})),Bg=a((()=>{})),Dg=a((()=>{Hf(),jg(),Lg(),Bg()})),Ug=a((()=>{$g=e=>t=>{return"function"==typeof t?(r=e,i=t,customElements.define(r,i),i):((e,t)=>{let{kind:r,elements:i}=t;return{kind:r,elements:i,finisher(t){customElements.define(e,t)}}})(e,t);var r,i}}));function Fg(e){return(t,r)=>void 0!==r?zg(e,t,r):Hg(e,t)}var Hg,zg,qg=a((()=>{Hg=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(r){r.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(r){r.createProperty(t.key,e)}},zg=(e,t,r)=>{t.constructor.createProperty(r,e)}}));function Wg(e){return Fg({...e,state:!0})}var Vg,Gg,Zg,Kg,Yg,Jg=a((()=>{qg()})),Qg=a((()=>{})),Xg=a((()=>{Qg()})),em=a((()=>{Qg()})),tm=a((()=>{Qg()})),rm=a((()=>{Qg()})),im=a((()=>{Qg(),null!=(null===(Vg=window.HTMLSlotElement)||void 0===Vg?void 0:Vg.prototype.assignedElements)?(e,t)=>e.assignedElements(t):(e,t)=>e.assignedNodes(t).filter((e=>e.nodeType===Node.ELEMENT_NODE))})),nm=a((()=>{Qg(),im()})),om=a((()=>{Ug(),qg(),Jg(),Xg(),em(),tm(),rm(),im(),nm()})),am=a((()=>{Gg={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Zg=e=>(...t)=>({_$litDirective$:e,values:t}),Kg=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}})),sm=a((()=>{jg(),am(),Yg=Zg(class extends Kg{constructor(e){var t;if(super(e),e.type!==Gg.ATTRIBUTE||"class"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){var r,i;if(void 0===this.it){this.it=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(let e in t)t[e]&&(null===(r=this.nt)||void 0===r||!r.has(e))&&this.it.add(e);return this.render(t)}let n=e.element.classList;this.it.forEach((e=>{e in t||(n.remove(e),this.it.delete(e))}));for(let e in t){let r=!!t[e];r===this.it.has(e)||null!==(i=this.nt)&&void 0!==i&&i.has(e)||(r?(n.add(e),this.it.add(e)):(n.remove(e),this.it.delete(e)))}return gg}})})),cm=a((()=>{sm()}));var lm,um,dm,hm,pm,fm=a((()=>{})),gm=a((()=>{lm=(e,t,r)=>Math.min(Math.max(r,e),t)})),mm=a((()=>{um={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"}})),bm=a((()=>{dm=e=>"number"==typeof e})),ym=a((()=>{bm(),hm=e=>Array.isArray(e)&&!dm(e[0])})),wm=a((()=>{pm=(e,t,r)=>{let i=t-e;return((r-e)%i+i)%i+e}}));var vm,_m,xm,Em,Cm=a((()=>{ym(),wm()})),km=a((()=>{vm=(e,t,r)=>-r*e+r*t+e})),Pm=a((()=>{_m=()=>{},xm=e=>e})),Im=a((()=>{Em=(e,t,r)=>t-e==0?1:(r-e)/(t-e)}));function Sm(e,t){let r=e[e.length-1];for(let i=1;i<=t;i++){let n=Em(0,t,i);e.push(vm(r,1,n))}}var Am=a((()=>{km(),Im()}));function Tm(e,t=function(e){let t=[0];return Sm(t,e-1),t}(e.length),r=xm){let i=e.length,n=i-t.length;return n>0&&Sm(t,n),n=>{let o=0;for(;o<i-2&&!(n<t[o+1]);o++);let a=lm(0,1,Em(t[o],t[o+1],n));return a=function(e,t){return hm(e)?e[pm(0,e.length,t)]:e}(r,o)(a),vm(e[o],e[o+1],a)}}var Om,Rm,Nm,Mm,$m,jm=a((()=>{km(),Pm(),Am(),Im(),Cm(),gm()})),Lm=a((()=>{bm(),Om=e=>Array.isArray(e)&&dm(e[0])})),Bm=a((()=>{Rm=e=>"object"==typeof e&&!!e.createAnimation})),Dm=a((()=>{Nm=e=>"function"==typeof e})),Um=a((()=>{Mm=e=>"string"==typeof e})),Fm=a((()=>{$m={ms:e=>1e3*e,s:e=>e/1e3}})),Hm=a((()=>{fm(),gm(),mm(),jm(),Lm(),Bm(),ym(),Dm(),bm(),Um(),Pm(),Im(),Fm()}));function zm(e,t,r,i){if(e===t&&r===i)return xm;let n=t=>function(e,t,r,i,n){let o,a,s=0;do{a=t+(r-t)/2,o=qm(a,i,n)-e,o>0?r=a:t=a}while(Math.abs(o)>Wm&&++s<Vm);return a}(t,0,1,e,r);return e=>0===e||1===e?e:qm(n(e),t,i)}var qm,Wm,Vm,Gm,Zm=a((()=>{Hm(),qm=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Wm=1e-7,Vm=12})),Km=a((()=>{Hm(),Gm=(e,t="end")=>r=>{let i=(r="end"===t?Math.min(r,.999):Math.max(r,.001))*e,n="end"===t?Math.floor(i):Math.ceil(i);return lm(0,1,n/e)}})),Ym=a((()=>{Zm(),Km()}));function Jm(e){if(Nm(e))return e;if(Om(e))return zm(...e);if(Qm[e])return Qm[e];if(e.startsWith("steps")){let t=Xm.exec(e);if(t){let e=t[1].split(",");return Gm(parseFloat(e[0]),e[1].trim())}}return xm}var Qm,Xm,eb,tb,rb,ib=a((()=>{Ym(),Hm(),Qm={ease:zm(.25,.1,.25,1),"ease-in":zm(.42,0,1,1),"ease-in-out":zm(.42,0,.58,1),"ease-out":zm(0,0,.58,1)},Xm=/\((.*?)\)/})),nb=a((()=>{Hm(),ib(),eb=class{constructor(e,t=[0,1],{easing:r,duration:i=um.duration,delay:n=um.delay,endDelay:o=um.endDelay,repeat:a=um.repeat,offset:s,direction:c="normal",autoplay:l=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=xm,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((e,t)=>{this.resolve=e,this.reject=t})),r=r||um.easing,Rm(r)){let e=r.createAnimation(t);r=e.easing,t=e.keyframes||t,i=e.duration||i}this.repeat=a,this.easing=hm(r)?xm:Jm(r),this.updateDuration(i);let u=Tm(t,s,hm(r)?r.map(Jm):xm);this.tick=t=>{var r;let i=0;i=void 0!==this.pauseTime?this.pauseTime:(t-this.startTime)*this.rate,this.t=i,i/=1e3,i=Math.max(i-n,0),"finished"===this.playState&&void 0===this.pauseTime&&(i=this.totalDuration);let a=i/this.duration,s=Math.floor(a),l=a%1;!l&&a>=1&&(l=1),1===l&&s--;let d=s%2;("reverse"===c||"alternate"===c&&d||"alternate-reverse"===c&&!d)&&(l=1-l);let h=i>=this.totalDuration?1:Math.min(l,1),p=u(this.easing(h));e(p),void 0===this.pauseTime&&("finished"===this.playState||i>=this.totalDuration+o)?(this.playState="finished",null===(r=this.resolve)||void 0===r||r.call(this,p)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},l&&this.play()}play(){let e=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(e=this.reject)||void 0===e||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){void 0!==this.pauseTime||0===this.rate?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}})),ob=a((()=>{nb()})),ab=a((()=>{tb=function(){}})),sb=a((()=>{rb=class{setAnimation(e){this.animation=e,e?.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}})),cb=a((()=>{sb()}));function lb(e){return ub.has(e)||ub.set(e,{transforms:[],values:new Map}),ub.get(e)}var ub,db,hb,pb,fb,gb,mb,bb,yb,wb,vb,_b,xb,Eb,Cb,kb=a((()=>{cb(),ub=new WeakMap})),Pb=a((()=>{Hm(),kb(),db=["","X","Y","Z"],hb=["translate","scale","rotate","skew"],pb={x:"translateX",y:"translateY",z:"translateZ"},gb={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:fb={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},scale:{syntax:"<number>",initialValue:1,toDefaultUnit:xm},skew:fb},mb=new Map,bb=e=>`--motion-${e}`,yb=["x","y","z"],hb.forEach((e=>{db.forEach((t=>{yb.push(e+t),mb.set(bb(e+t),gb[e])}))})),wb=(e,t)=>yb.indexOf(e)-yb.indexOf(t),vb=new Set(yb),_b=e=>vb.has(e),xb=(e,t)=>{pb[t]&&(t=pb[t]);let{transforms:r}=lb(e);(function(e,t){-1===e.indexOf(t)&&e.push(t)})(r,t),e.style.transform=Eb(r)},Eb=e=>e.sort(wb).reduce(Cb,"").trim(),Cb=(e,t)=>`${e} ${t}(var(${bb(t)}))`}));var Ib,Sb,Ab,Tb,Ob,Rb,Nb,Mb,$b,jb=a((()=>{Pb(),Ib=e=>e.startsWith("--"),Sb=new Set})),Lb=a((()=>{Ab=(e,t)=>document.createElement("div").animate(e,t),Tb={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Ab({opacity:[1]})}catch{return!1}return!0},finished:()=>!!Ab({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{Ab({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Ob={},Rb={};for(let e in Tb)Rb[e]=()=>(void 0===Ob[e]&&(Ob[e]=Tb[e]()),Ob[e])})),Bb=a((()=>{Hm(),Lb(),.015,Nb=(e,t)=>{let r="",i=Math.round(t/.015);for(let t=0;t<i;t++)r+=e(Em(0,i-1,t))+", ";return r.substring(0,r.length-2)},Mb=(e,t)=>Nm(e)?Rb.linearEasing()?`linear(${Nb(e,t)})`:um.easing:Om(e)?$b(e):e,$b=([e,t,r,i])=>`cubic-bezier(${e}, ${t}, ${r}, ${i})`}));var Db,Ub=a((()=>{Db=e=>Array.isArray(e)?e:[e]}));function Fb(e){return pb[e]&&(e=pb[e]),_b(e)?bb(e):e}var Hb,zb=a((()=>{Pb()})),qb=a((()=>{jb(),zb(),Pb(),Hb={get:(e,t)=>{t=Fb(t);let r=Ib(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!r&&0!==r){let e=mb.get(t);e&&(r=e.initialValue)}return r},set:(e,t,r)=>{t=Fb(t),Ib(t)?e.style.setProperty(t,r):e.style[t]=r}}}));function Wb(e,t=!0){if(e&&"finished"!==e.playState)try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch{}}var Vb=a((()=>{}));var Gb=a((()=>{Hm()}));function Zb(e,t,r,i={},n){let o,a=window.__MOTION_DEV_TOOLS_RECORD,s=!1!==i.record&&a,{duration:c=um.duration,delay:l=um.delay,endDelay:u=um.endDelay,repeat:d=um.repeat,easing:h=um.easing,persist:p=!1,direction:f,offset:g,allowWebkitAcceleration:m=!1,autoplay:b=!0}=i,y=lb(e),w=_b(t),v=Rb.waapi();w&&xb(e,t);let _=Fb(t),x=function(e,t){return e.has(t)||e.set(t,new rb),e.get(t)}(y.values,_),E=mb.get(_);return Wb(x.animation,!(Rm(h)&&x.generator)&&!1!==i.record),()=>{let y=()=>{var t,r;return null!==(r=null!==(t=Hb.get(e,_))&&void 0!==t?t:E?.initialValue)&&void 0!==r?r:0},C=function(e,t){for(let r=0;r<e.length;r++)null===e[r]&&(e[r]=r?e[r-1]:t());return e}(Db(r),y),k=function(e,t){var r;let i=t?.toDefaultUnit||xm,n=e[e.length-1];if(Mm(n)){let e=(null===(r=n.match(/(-?[\d.]+)([a-z%]*)/))||void 0===r?void 0:r[2])||"";e&&(i=t=>t+e)}return i}(C,E);if(Rm(h)){let e=h.createAnimation(C,"opacity"!==t,y,_,x);h=e.easing,C=e.keyframes||C,c=e.duration||c}if(Ib(_)&&(Rb.cssRegisterProperty()?function(e){if(!Sb.has(e)){Sb.add(e);try{let{syntax:t,initialValue:r}=mb.has(e)?mb.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:r})}catch{}}}(_):v=!1),w&&!Rb.linearEasing()&&(Nm(h)||hm(h)&&h.some(Nm))&&(v=!1),v){E&&(C=C.map((e=>dm(e)?E.toDefaultUnit(e):e))),1===C.length&&(!Rb.partialKeyframes()||s)&&C.unshift(y());let t={delay:$m.ms(l),duration:$m.ms(c),endDelay:$m.ms(u),easing:hm(h)?void 0:Mb(h,c),direction:f,iterations:d+1,fill:"both"};o=e.animate({[_]:C,offset:g,easing:hm(h)?h.map((e=>Mb(e,c))):void 0},t),o.finished||(o.finished=new Promise(((e,t)=>{o.onfinish=e,o.oncancel=t})));let r=C[C.length-1];o.finished.then((()=>{p||(Hb.set(e,_,r),o.cancel())})).catch(_m),m||(o.playbackRate=1.000001)}else if(n&&w)C=C.map((e=>"string"==typeof e?parseFloat(e):e)),1===C.length&&C.unshift(parseFloat(y())),o=new n((t=>{Hb.set(e,_,k?k(t):t)}),C,Object.assign(Object.assign({},i),{duration:c,easing:h}));else{let t=C[C.length-1];Hb.set(e,_,E&&dm(t)?E.toDefaultUnit(t):t)}return s&&a(e,t,C,{duration:c,delay:l,easing:h,repeat:d,offset:g},"motion-one"),x.setAnimation(o),o&&!b&&o.pause(),o}}var Kb,Yb=a((()=>{kb(),jb(),Hm(),Pb(),Bb(),Lb(),Ub(),qb(),zb(),Vb(),Gb()})),Jb=a((()=>{Kb=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e)}));var Qb,Xb,ey,ty,ry,iy=a((()=>{})),ny=a((()=>{Hm(),Vb(),Qb=e=>e(),Xb=(e,t,r=um.duration)=>new Proxy({animations:e.map(Qb).filter(Boolean),duration:r,options:t},ty),ey=e=>e.animations[0],ty={get:(e,t)=>{let r=ey(e);switch(t){case"duration":return e.duration;case"currentTime":return $m.s(r?.[t]||0);case"playbackRate":case"playState":return r?.[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(ry)).catch(_m)),e.finished;case"stop":return()=>{e.animations.forEach((e=>Wb(e)))};case"forEachNative":return t=>{e.animations.forEach((r=>t(r,e)))};default:return typeof r?.[t]>"u"?void 0:()=>e.animations.forEach((e=>e[t]()))}},set:(e,t,r)=>{switch(t){case"currentTime":r=$m.ms(r);case"playbackRate":for(let i=0;i<e.animations.length;i++)e.animations[i][t]=r;return!0}return!1}},ry=e=>e.finished}));function oy(e,t,r){return Nm(e)?e(t,r):e}var ay=a((()=>{Hm()}));function sy(e){return function(t,r,i={}){t=function(e,t){var r;return"string"==typeof e?t?(null!==(r=t[e])&&void 0!==r||(t[e]=document.querySelectorAll(e)),e=t[e]):e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}(t);let n=t.length;tb(!!n,"No valid element provided."),tb(!!r,"No keyframes defined.");let o=[];for(let a=0;a<n;a++){let s=t[a];for(let t in r){let c=Kb(i,t);c.delay=oy(c.delay,a,n);let l=Zb(s,t,r[t],c,e);o.push(l)}}return Xb(o,i,i.duration)}}var cy,ly=a((()=>{ab(),Yb(),Jb(),iy(),ny(),ay()})),uy=a((()=>{ob(),ly(),cy=sy(eb)})),dy=a((()=>{uy(),ny()}));function hy(e,t={}){return Xb([()=>{let r=new eb(e,[0,1],t);return r.finished.catch((()=>{})),r}],t,t.duration)}function py(e,t,r){return(Nm(e)?hy:cy)(e,t,r)}var fy,gy=a((()=>{dy(),Hm(),ob()})),my=a((()=>{dy(),cb(),gy()})),by=a((()=>{jg(),fy=e=>e??mg})),yy=a((()=>{by()})),wy=s(((e,t)=>{t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}})),vy=s((e=>{var t,r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},e.getSymbolTotalCodewords=function(e){return r[e]},e.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');t=e},e.isKanjiModeEnabled=function(){return typeof t<"u"},e.toSJIS=function(e){return t(e)}})),_y=s((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4},e.from=function(t,r){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch{return r}}})),xy=s(((e,t)=>{function r(){this.buffer=[],this.length=0}r.prototype={get:function(e){let t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=r})),Ey=s(((e,t)=>{function r(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}r.prototype.set=function(e,t,r,i){let n=e*this.size+t;this.data[n]=r,i&&(this.reservedBit[n]=!0)},r.prototype.get=function(e,t){return this.data[e*this.size+t]},r.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},r.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=r})),Cy=s((e=>{var t=vy().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];let r=Math.floor(e/7)+2,i=t(e),n=145===i?26:2*Math.ceil((i-13)/(2*r-2)),o=[i-7];for(let e=1;e<r-1;e++)o[e]=o[e-1]-n;return o.push(6),o.reverse()},e.getPositions=function(t){let r=[],i=e.getRowColCoords(t),n=i.length;for(let e=0;e<n;e++)for(let t=0;t<n;t++)0===e&&0===t||0===e&&t===n-1||e===n-1&&0===t||r.push([i[e],i[t]]);return r}})),ky=s((e=>{var t=vy().getSymbolSize;e.getPositions=function(e){let r=t(e);return[[0,0],[r-7,0],[0,r-7]]}})),Py=s((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t=3,r=3,i=40,n=10;function o(t,r,i){switch(t){case e.Patterns.PATTERN000:return(r+i)%2==0;case e.Patterns.PATTERN001:return r%2==0;case e.Patterns.PATTERN010:return i%3==0;case e.Patterns.PATTERN011:return(r+i)%3==0;case e.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(i/3))%2==0;case e.Patterns.PATTERN101:return r*i%2+r*i%3==0;case e.Patterns.PATTERN110:return(r*i%2+r*i%3)%2==0;case e.Patterns.PATTERN111:return(r*i%3+(r+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let r=e.size,i=0,n=0,o=0,a=null,s=null;for(let c=0;c<r;c++){n=o=0,a=s=null;for(let l=0;l<r;l++){let r=e.get(c,l);r===a?n++:(n>=5&&(i+=t+(n-5)),a=r,n=1),r=e.get(l,c),r===s?o++:(o>=5&&(i+=t+(o-5)),s=r,o=1)}n>=5&&(i+=t+(n-5)),o>=5&&(i+=t+(o-5))}return i},e.getPenaltyN2=function(e){let t=e.size,i=0;for(let r=0;r<t-1;r++)for(let n=0;n<t-1;n++){let t=e.get(r,n)+e.get(r,n+1)+e.get(r+1,n)+e.get(r+1,n+1);(4===t||0===t)&&i++}return i*r},e.getPenaltyN3=function(e){let t=e.size,r=0,n=0,o=0;for(let i=0;i<t;i++){n=o=0;for(let a=0;a<t;a++)n=n<<1&2047|e.get(i,a),a>=10&&(1488===n||93===n)&&r++,o=o<<1&2047|e.get(a,i),a>=10&&(1488===o||93===o)&&r++}return r*i},e.getPenaltyN4=function(e){let t=0,r=e.data.length;for(let i=0;i<r;i++)t+=e.data[i];return Math.abs(Math.ceil(100*t/r/5)-10)*n},e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let n=0;n<r;n++)t.isReserved(n,i)||t.xor(n,i,o(e,n,i))},e.getBestMask=function(t,r){let i=Object.keys(e.Patterns).length,n=0,o=1/0;for(let a=0;a<i;a++){r(a),e.applyMask(a,t);let i=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),i<o&&(o=i,n=a)}return n}})),Iy=s((e=>{var t=_y(),r=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,i){switch(i){case t.L:return r[4*(e-1)+0];case t.M:return r[4*(e-1)+1];case t.Q:return r[4*(e-1)+2];case t.H:return r[4*(e-1)+3];default:return}},e.getTotalCodewordsCount=function(e,r){switch(r){case t.L:return i[4*(e-1)+0];case t.M:return i[4*(e-1)+1];case t.Q:return i[4*(e-1)+2];case t.H:return i[4*(e-1)+3];default:return}}})),Sy=s((e=>{var t=new Uint8Array(512),r=new Uint8Array(256);!function(){let e=1;for(let i=0;i<255;i++)t[i]=e,r[e]=i,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]}(),e.log=function(e){if(e<1)throw new Error("log("+e+")");return r[e]},e.exp=function(e){return t[e]},e.mul=function(e,i){return 0===e||0===i?0:t[r[e]+r[i]]}})),Ay=s((e=>{var t=Sy();e.mul=function(e,r){let i=new Uint8Array(e.length+r.length-1);for(let n=0;n<e.length;n++)for(let o=0;o<r.length;o++)i[n+o]^=t.mul(e[n],r[o]);return i},e.mod=function(e,r){let i=new Uint8Array(e);for(;i.length-r.length>=0;){let e=i[0];for(let n=0;n<r.length;n++)i[n]^=t.mul(r[n],e);let n=0;for(;n<i.length&&0===i[n];)n++;i=i.slice(n)}return i},e.generateECPolynomial=function(r){let i=new Uint8Array([1]);for(let n=0;n<r;n++)i=e.mul(i,new Uint8Array([1,t.exp(n)]));return i}})),Ty=s(((e,t)=>{var r=Ay();function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let i=r.mod(t,this.genPoly),n=this.degree-i.length;if(n>0){let e=new Uint8Array(this.degree);return e.set(i,n),e}return i},t.exports=i})),Oy=s((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),Ry=s((e=>{var t="[0-9]+",r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(r=r.replace(/u/g,"\\u"))+")(?:.|[\r\n    ]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(i,"g"),e.NUMERIC=new RegExp(t,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var n=new RegExp("^"+r+"$"),o=new RegExp("^"+t+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(e){return n.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return a.test(e)}})),Ny=s((e=>{var t=Oy(),r=Ry();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,r){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?e.ccBits[0]:r<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return r.testNumeric(t)?e.NUMERIC:r.testAlphanumeric(t)?e.ALPHANUMERIC:r.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,r){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch{return r}}})),My=s((e=>{var t=vy(),r=Iy(),i=_y(),n=Ny(),o=Oy(),a=t.getBCHDigit(7973);function s(e,t){return n.getCharCountIndicator(e,t)+4}function c(e,t){let r=0;return e.forEach((function(e){let i=s(e.mode,t);r+=i+e.getBitsLength()})),r}e.from=function(e,t){return o.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,i,a){if(!o.isValid(e))throw new Error("Invalid QR Code version");typeof a>"u"&&(a=n.BYTE);let c=8*(t.getSymbolTotalCodewords(e)-r.getTotalCodewordsCount(e,i));if(a===n.MIXED)return c;let l=c-s(a,e);switch(a){case n.NUMERIC:return Math.floor(l/10*3);case n.ALPHANUMERIC:return Math.floor(l/11*2);case n.KANJI:return Math.floor(l/13);case n.BYTE:default:return Math.floor(l/8)}},e.getBestVersionForData=function(t,r){let o,a=i.from(r,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,r){for(let i=1;i<=40;i++)if(c(t,i)<=e.getCapacity(i,r,n.MIXED))return i}(t,a);if(0===t.length)return 1;o=t[0]}else o=t;return function(t,r,i){for(let n=1;n<=40;n++)if(r<=e.getCapacity(n,i,t))return n}(o.mode,o.getLength(),a)},e.getEncodedBits=function(e){if(!o.isValid(e)||e<7)throw new Error("Invalid QR Code version");let r=e<<12;for(;t.getBCHDigit(r)-a>=0;)r^=7973<<t.getBCHDigit(r)-a;return e<<12|r}})),$y=s((e=>{var t=vy(),r=t.getBCHDigit(1335);e.getEncodedBits=function(e,i){let n=e.bit<<3|i,o=n<<10;for(;t.getBCHDigit(o)-r>=0;)o^=1335<<t.getBCHDigit(o)-r;return 21522^(n<<10|o)}})),jy=s(((e,t)=>{var r=Ny();function i(e){this.mode=r.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,r,i;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),i=parseInt(r,10),e.put(i,10);let n=this.data.length-t;n>0&&(r=this.data.substr(t),i=parseInt(r,10),e.put(i,3*n+1))},t.exports=i})),Ly=s(((e,t)=>{var r=Ny(),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(e){this.mode=r.ALPHANUMERIC,this.data=e}n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*i.indexOf(this.data[t]);r+=i.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},t.exports=n})),By=s(((e,t)=>{"use strict";t.exports=function(e){for(var t=[],r=e.length,i=0;i<r;i++){var n=e.charCodeAt(i);if(n>=55296&&n<=56319&&r>i+1){var o=e.charCodeAt(i+1);o>=56320&&o<=57343&&(n=1024*(n-55296)+o-56320+65536,i+=1)}n<128?t.push(n):n<2048?(t.push(n>>6|192),t.push(63&n|128)):n<55296||n>=57344&&n<65536?(t.push(n>>12|224),t.push(n>>6&63|128),t.push(63&n|128)):n>=65536&&n<=1114111?(t.push(n>>18|240),t.push(n>>12&63|128),t.push(n>>6&63|128),t.push(63&n|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}})),Dy=s(((e,t)=>{var r=By(),i=Ny();function n(e){this.mode=i.BYTE,"string"==typeof e&&(e=r(e)),this.data=new Uint8Array(e)}n.getBitsLength=function(e){return 8*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)},t.exports=n})),Uy=s(((e,t)=>{var r=Ny(),i=vy();function n(e){this.mode=r.KANJI,this.data=e}n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=i.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\n    Make sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},t.exports=n})),Fy=s(((e,t)=>{"use strict";var r={single_source_shortest_paths:function(e,t,i){var n={},o={};o[t]=0;var a,s,c,l,u,d,h,p=r.PriorityQueue.make();for(p.push(t,0);!p.empty();)for(c in s=(a=p.pop()).value,l=a.cost,u=e[s]||{})u.hasOwnProperty(c)&&(d=l+u[c],h=o[c],(typeof o[c]>"u"||h>d)&&(o[c]=d,p.push(c,d),n[c]=s));if(typeof i<"u"&&typeof o[i]>"u"){var f=["Could not find a path from ",t," to ",i,"."].join("");throw new Error(f)}return n},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],i=t;i;)r.push(i),e[i],i=e[i];return r.reverse(),r},find_path:function(e,t,i){var n=r.single_source_shortest_paths(e,t,i);return r.extract_shortest_path_from_predecessor_list(n,i)},PriorityQueue:{make:function(e){var t,i=r.PriorityQueue,n={};for(t in e=e||{},i)i.hasOwnProperty(t)&&(n[t]=i[t]);return n.queue=[],n.sorter=e.sorter||i.default_sorter,n},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};typeof t<"u"&&(t.exports=r)})),Hy=s((e=>{var t=Ny(),r=jy(),i=Ly(),n=Dy(),o=Uy(),a=Ry(),s=vy(),c=Fy();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,r){let i,n=[];for(;null!==(i=e.exec(r));)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function d(e){let r,i,n=u(a.NUMERIC,t.NUMERIC,e),o=u(a.ALPHANUMERIC,t.ALPHANUMERIC,e);return s.isKanjiModeEnabled()?(r=u(a.BYTE,t.BYTE,e),i=u(a.KANJI,t.KANJI,e)):(r=u(a.BYTE_KANJI,t.BYTE,e),i=[]),n.concat(o,r,i).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function h(e,a){switch(a){case t.NUMERIC:return r.getBitsLength(e);case t.ALPHANUMERIC:return i.getBitsLength(e);case t.KANJI:return o.getBitsLength(e);case t.BYTE:return n.getBitsLength(e)}}function p(e,a){let c,l=t.getBestModeForData(e);if(c=t.from(a,l),c!==t.BYTE&&c.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(c)+".\n     Suggested mode is: "+t.toString(l));switch(c===t.KANJI&&!s.isKanjiModeEnabled()&&(c=t.BYTE),c){case t.NUMERIC:return new r(e);case t.ALPHANUMERIC:return new i(e);case t.KANJI:return new o(e);case t.BYTE:return new n(e)}}e.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(p(t,null)):t.data&&e.push(p(t.data,t.mode)),e}),[])},e.fromString=function(r,i){let n=function(e){let r=[];for(let i=0;i<e.length;i++){let n=e[i];switch(n.mode){case t.NUMERIC:r.push([n,{data:n.data,mode:t.ALPHANUMERIC,length:n.length},{data:n.data,mode:t.BYTE,length:n.length}]);break;case t.ALPHANUMERIC:r.push([n,{data:n.data,mode:t.BYTE,length:n.length}]);break;case t.KANJI:r.push([n,{data:n.data,mode:t.BYTE,length:l(n.data)}]);break;case t.BYTE:r.push([{data:n.data,mode:t.BYTE,length:l(n.data)}])}}return r}(d(r,s.isKanjiModeEnabled())),o=function(e,r){let i={},n={start:{}},o=["start"];for(let a=0;a<e.length;a++){let s=e[a],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=""+a+e;c.push(u),i[u]={node:l,lastCount:0},n[u]={};for(let e=0;e<o.length;e++){let a=o[e];i[a]&&i[a].node.mode===l.mode?(n[a][u]=h(i[a].lastCount+l.length,l.mode)-h(i[a].lastCount,l.mode),i[a].lastCount+=l.length):(i[a]&&(i[a].lastCount=l.length),n[a][u]=h(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,r))}}o=c}for(let e=0;e<o.length;e++)n[o[e]].end=0;return{map:n,table:i}}(n,i),a=c.find_path(o.map,"start","end"),u=[];for(let e=1;e<a.length-1;e++)u.push(o.table[a[e]].node);return e.fromArray(u.reduce((function(e,t){let r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[]))},e.rawSplit=function(t){return e.fromArray(d(t,s.isKanjiModeEnabled()))}})),zy=s((e=>{var t=vy(),r=_y(),i=xy(),n=Ey(),o=Cy(),a=ky(),s=Py(),c=Iy(),l=Ty(),u=My(),d=$y(),h=Ny(),p=Hy();function f(e,t,r){let i,n,o=e.size,a=d.getEncodedBits(t,r);for(i=0;i<15;i++)n=1==(a>>i&1),i<6?e.set(i,8,n,!0):i<8?e.set(i+1,8,n,!0):e.set(o-15+i,8,n,!0),i<8?e.set(8,o-i-1,n,!0):i<9?e.set(8,15-i-1+1,n,!0):e.set(8,15-i-1,n,!0);e.set(o-8,8,1,!0)}function g(e,r,n){let o=new i;n.forEach((function(t){o.put(t.mode.bit,4),o.put(t.getLength(),h.getCharCountIndicator(t.mode,e)),t.write(o)}));let a=8*(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,r));for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);let s=(a-o.getLengthInBits())/8;for(let e=0;e<s;e++)o.put(e%2?17:236,8);return function(e,r,i){let n=t.getSymbolTotalCodewords(r),o=c.getTotalCodewordsCount(r,i),a=n-o,s=c.getBlocksCount(r,i),u=n%s,d=s-u,h=Math.floor(n/s),p=Math.floor(a/s),f=p+1,g=h-p,m=new l(g),b=0,y=new Array(s),w=new Array(s),v=0,_=new Uint8Array(e.buffer);for(let e=0;e<s;e++){let t=e<d?p:f;y[e]=_.slice(b,b+t),w[e]=m.encode(y[e]),b+=t,v=Math.max(v,t)}let x,E,C=new Uint8Array(n),k=0;for(x=0;x<v;x++)for(E=0;E<s;E++)x<y[E].length&&(C[k++]=y[E][x]);for(x=0;x<g;x++)for(E=0;E<s;E++)C[k++]=w[E][x];return C}(o,e,r)}function m(e,r,i,c){let l;if(Array.isArray(e))l=p.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let t=r;if(!t){let r=p.rawSplit(e);t=u.getBestVersionForData(r,i)}l=p.fromString(e,t||40)}}let d=u.getBestVersionForData(l,i);if(!d)throw new Error("The amount of data is too big to be stored in a QR Code");if(r){if(r<d)throw new Error("\n    The chosen QR Code version cannot contain this amount of data.\n    Minimum version required to store current data is: "+d+".\n    ")}else r=d;let h=g(r,i,l),m=t.getSymbolSize(r),b=new n(m);return function(e,t){let r=e.size,i=a.getPositions(t);for(let t=0;t<i.length;t++){let n=i[t][0],o=i[t][1];for(let t=-1;t<=7;t++)if(!(n+t<=-1||r<=n+t))for(let i=-1;i<=7;i++)o+i<=-1||r<=o+i||(t>=0&&t<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===t||6===t)||t>=2&&t<=4&&i>=2&&i<=4?e.set(n+t,o+i,!0,!0):e.set(n+t,o+i,!1,!0))}}(b,r),function(e){let t=e.size;for(let r=8;r<t-8;r++){let t=r%2==0;e.set(r,6,t,!0),e.set(6,r,t,!0)}}(b),function(e,t){let r=o.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],n=r[t][1];for(let t=-2;t<=2;t++)for(let r=-2;r<=2;r++)-2===t||2===t||-2===r||2===r||0===t&&0===r?e.set(i+t,n+r,!0,!0):e.set(i+t,n+r,!1,!0)}}(b,r),f(b,i,0),r>=7&&function(e,t){let r,i,n,o=e.size,a=u.getEncodedBits(t);for(let t=0;t<18;t++)r=Math.floor(t/3),i=t%3+o-8-3,n=1==(a>>t&1),e.set(r,i,n,!0),e.set(i,r,n,!0)}(b,r),function(e,t){let r=e.size,i=-1,n=r-1,o=7,a=0;for(let s=r-1;s>0;s-=2)for(6===s&&s--;;){for(let r=0;r<2;r++)if(!e.isReserved(n,s-r)){let i=!1;a<t.length&&(i=1==(t[a]>>>o&1)),e.set(n,s-r,i),o--,-1===o&&(a++,o=7)}if(n+=i,n<0||r<=n){n-=i,i=-i;break}}}(b,h),isNaN(c)&&(c=s.getBestMask(b,f.bind(null,b,i))),s.applyMask(c,b),f(b,i,c),{modules:b,version:r,errorCorrectionLevel:i,maskPattern:c,segments:l}}e.create=function(e,i){if(typeof e>"u"||""===e)throw new Error("No input text");let n,o,a=r.M;return typeof i<"u"&&(a=r.from(i.errorCorrectionLevel,r.M),n=u.from(i.version),o=s.from(i.maskPattern),i.toSJISFunc&&t.setToSJISFunction(i.toSJISFunc)),m(e,n,a,o)}})),qy=s((e=>{function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);(3===t.length||4===t.length)&&(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");let r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});let r=typeof e.margin>"u"||null===e.margin||e.margin<0?4:e.margin,i=e.width&&e.width>=21?e.width:void 0,n=e.scale||4;return{width:i,scale:i?4:n,margin:r,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,r){let i=e.getScale(t,r);return Math.floor((t+2*r.margin)*i)},e.qrToImageData=function(t,r,i){let n=r.modules.size,o=r.modules.data,a=e.getScale(n,i),s=Math.floor((n+2*i.margin)*a),c=i.margin*a,l=[i.color.light,i.color.dark];for(let e=0;e<s;e++)for(let r=0;r<s;r++){let u=4*(e*s+r),d=i.color.light;if(e>=c&&r>=c&&e<s-c&&r<s-c){d=l[o[Math.floor((e-c)/a)*n+Math.floor((r-c)/a)]?1:0]}t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}})),Wy=s((e=>{var t=qy();e.render=function(e,r,i){let n=i,o=r;typeof n>"u"&&(!r||!r.getContext)&&(n=r,r=void 0),r||(o=function(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}()),n=t.getOptions(n);let a=t.getImageWidth(e.modules.size,n),s=o.getContext("2d"),c=s.createImageData(a,a);return t.qrToImageData(c.data,e,n),function(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(s,o,a),s.putImageData(c,0,0),o},e.renderToDataURL=function(t,r,i){let n=i;typeof n>"u"&&(!r||!r.getContext)&&(n=r,r=void 0),n||(n={});let o=e.render(t,r,n),a=n.type||"image/png",s=n.rendererOpts||{};return o.toDataURL(a,s.quality)}})),Vy=s((e=>{var t=qy();function r(e,t){let r=e.a/255,i=t+'="'+e.hex+'"';return r<1?i+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':i}function i(e,t,r){let i=e+t;return typeof r<"u"&&(i+=" "+r),i}e.render=function(e,n,o){let a=t.getOptions(n),s=e.modules.size,c=e.modules.data,l=s+2*a.margin,u=a.color.light.a?"<path "+r(a.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",d="<path "+r(a.color.dark,"stroke")+' d="'+function(e,t,r){let n="",o=0,a=!1,s=0;for(let c=0;c<e.length;c++){let l=Math.floor(c%t),u=Math.floor(c/t);!l&&!a&&(a=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(n+=a?i("M",l+r,.5+u+r):i("m",o,0),o=0,a=!1),l+1<t&&e[c+1]||(n+=i("h",s),s=0)):o++}return n}(c,s,a.margin)+'"/>',h='viewBox="0 0 '+l+" "+l+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+h+' shape-rendering="crispEdges">'+u+d+"</svg>\n    ";return"function"==typeof o&&o(null,p),p}})),Gy=s((e=>{var t=wy(),r=zy(),i=Wy(),n=Vy();function o(e,i,n,o,a){let s=[].slice.call(arguments,1),c=s.length,l="function"==typeof s[c-1];if(!l&&!t())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=i,i=o=void 0):2===c&&!i.getContext&&(o=n,n=i,i=void 0),new Promise((function(t,a){try{let a=r.create(n,o);t(e(a,i,o))}catch(e){a(e)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(a=n,n=i,i=o=void 0):3===c&&(i.getContext&&typeof a>"u"?(a=o,o=void 0):(a=o,o=n,n=i,i=void 0));try{let t=r.create(n,o);a(null,e(t,i,o))}catch(e){a(e)}}e.create=r.create,e.toCanvas=o.bind(null,i.render),e.toDataURL=o.bind(null,i.renderToDataURL),e.toString=o.bind(null,(function(e,t,r){return n.render(e,r)}))})),Zy={};function Ky(e,t,r){return e!==t&&(e-t<0?t-e:e-t)<=r+Jw}c(Zy,{WcmModal:()=>f_,WcmQrCode:()=>iv});var Yy,Jy,Qy,Xy,ew,tw,rw,iw,nw,ow,aw,sw,cw,lw,uw,dw,hw,pw,fw,gw,mw,bw,yw,ww,vw,_w,xw,Ew,Cw,kw,Pw,Iw,Sw,Aw,Tw,Ow,Rw,Nw,Mw,$w,jw,Lw,Bw,Dw,Uw,Fw,Hw,zw,qw,Ww,Vw,Gw,Zw,Kw,Yw,Jw,Qw,Xw,ev,tv,rv,iv,nv,ov,av,sv,cv,lv,uv,dv,hv,pv,fv,gv,mv,bv,yv,wv,vv,_v,xv,Ev,Cv,kv,Pv,Iv,Sv,Av,Tv,Ov,Rv,Nv,Mv,$v,jv,Lv,Bv,Dv,Uv,Fv,Hv,zv,qv,Wv,Vv,Gv,Zv,Kv,Yv,Jv,Qv,Xv,e_,t_,r_,i_,n_,o_,a_,s_,c_,l_,u_,d_,h_,p_,f_,g_,m_,b_,y_,w_,v_,__,x_,E_,C_,k_,P_,I_,S_,A_,T_,O_,R_,N_,M_,$_,j_,L_,B_,D_,U_,F_,H_,z_,q_,W_,V_,G_,Z_,K_,Y_,J_,Q_,X_,ex,tx,rx,ix,nx,ox,ax,sx,cx,lx,ux,dx,hx,px,fx=a((()=>{Dg(),om(),cm(),Uf(),jg(),my(),yy(),Yy=d(Gy(),1),Jy=Object.defineProperty,Qy=Object.getOwnPropertySymbols,Xy=Object.prototype.hasOwnProperty,ew=Object.prototype.propertyIsEnumerable,tw=(e,t,r)=>t in e?Jy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rw=(e,t)=>{for(var r in t||(t={}))Xy.call(t,r)&&tw(e,r,t[r]);if(Qy)for(var r of Qy(t))ew.call(t,r)&&tw(e,r,t[r]);return e},iw={getPreset:e=>({"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}[e]),setTheme(){let e=document.querySelector(":root"),{themeVariables:t}=yf.state;if(e){let r=rw(rw(rw({},function(){var e;let t={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[null!=(e=yf.state.themeMode)?e:"dark"];return{"--wcm-color-fg-1":t.foreground[1],"--wcm-color-fg-2":t.foreground[2],"--wcm-color-fg-3":t.foreground[3],"--wcm-color-bg-1":t.background[1],"--wcm-color-bg-2":t.background[2],"--wcm-color-bg-3":t.background[3],"--wcm-color-overlay":t.overlay}}()),{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}),t);Object.entries(r).forEach((([t,r])=>e.style.setProperty(t,r)))}},globalCss:If`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}`},nw=If`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`,ow=Object.defineProperty,aw=Object.getOwnPropertyDescriptor,sw=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?aw(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&ow(t,r,o),o},cw=class extends Ng{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){let e={"wcm-icon-left":void 0!==this.iconLeft,"wcm-icon-right":void 0!==this.iconRight,"wcm-ghost":"ghost"===this.variant,"wcm-outline":"outline"===this.variant},t="inverse";return"ghost"===this.variant&&(t="secondary"),"outline"===this.variant&&(t="accent"),pg`<button class="${Yg(e)}" ?disabled="${this.disabled}" @click="${this.onClick}">${this.iconLeft}<wcm-text variant="small-regular" color="${t}"><slot></slot></wcm-text>${this.iconRight}</button>`}},cw.styles=[iw.globalCss,nw],sw([Fg({type:Boolean})],cw.prototype,"disabled",2),sw([Fg()],cw.prototype,"iconLeft",2),sw([Fg()],cw.prototype,"iconRight",2),sw([Fg()],cw.prototype,"onClick",2),sw([Fg()],cw.prototype,"variant",2),cw=sw([$g("wcm-button")],cw),lw=If`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`,uw=Object.defineProperty,dw=Object.getOwnPropertyDescriptor,hw=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?dw(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&uw(t,r,o),o},pw=class extends Ng{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){let e={"wcm-secondary":"secondary"===this.variant};return pg`<button ?disabled="${this.disabled}" class="${Yg(e)}"><slot></slot></button>`}},pw.styles=[iw.globalCss,lw],hw([Fg({type:Boolean})],pw.prototype,"disabled",2),hw([Fg()],pw.prototype,"variant",2),pw=hw([$g("wcm-button-big")],pw),fw=If`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`,gw=Object.defineProperty,mw=Object.getOwnPropertyDescriptor,bw=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?mw(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&gw(t,r,o),o},(yw=class extends Ng{render(){return pg`<div><slot></slot></div>`}}).styles=[iw.globalCss,fw],yw=bw([$g("wcm-info-footer")],yw),ww={CROSS_ICON:fg`<svg width="12" height="12" viewBox="0 0 12 12"><path d="M9.94 11A.75.75 0 1 0 11 9.94L7.414 6.353a.5.5 0 0 1 0-.708L11 2.061A.75.75 0 1 0 9.94 1L6.353 4.586a.5.5 0 0 1-.708 0L2.061 1A.75.75 0 0 0 1 2.06l3.586 3.586a.5.5 0 0 1 0 .708L1 9.939A.75.75 0 1 0 2.06 11l3.586-3.586a.5.5 0 0 1 .708 0L9.939 11Z" fill="#fff"/></svg>`,WALLET_CONNECT_LOGO:fg`<svg width="178" height="29" viewBox="0 0 178 29" id="wcm-wc-logo"><path d="M10.683 7.926c5.284-5.17 13.85-5.17 19.134 0l.636.623a.652.652 0 0 1 0 .936l-2.176 2.129a.343.343 0 0 1-.478 0l-.875-.857c-3.686-3.607-9.662-3.607-13.348 0l-.937.918a.343.343 0 0 1-.479 0l-2.175-2.13a.652.652 0 0 1 0-.936l.698-.683Zm23.633 4.403 1.935 1.895a.652.652 0 0 1 0 .936l-8.73 8.543a.687.687 0 0 1-.956 0L20.37 17.64a.172.172 0 0 0-.239 0l-6.195 6.063a.687.687 0 0 1-.957 0l-8.73-8.543a.652.652 0 0 1 0-.936l1.936-1.895a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .239 0l6.195-6.064a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .24 0l6.195-6.064a.687.687 0 0 1 .956 0ZM48.093 20.948l2.338-9.355c.139-.515.258-1.07.416-1.942.12.872.258 1.427.357 1.942l2.022 9.355h4.181l3.528-13.874h-3.21l-1.943 8.523a24.825 24.825 0 0 0-.456 2.457c-.158-.931-.317-1.625-.495-2.438l-1.883-8.542h-4.201l-2.042 8.542a41.204 41.204 0 0 0-.475 2.438 41.208 41.208 0 0 0-.476-2.438l-1.903-8.542h-3.349l3.508 13.874h4.083ZM63.33 21.304c1.585 0 2.596-.654 3.11-1.605-.059.297-.078.595-.078.892v.357h2.655V15.22c0-2.735-1.248-4.32-4.3-4.32-2.636 0-4.36 1.466-4.52 3.487h2.914c.1-.891.734-1.426 1.705-1.426.911 0 1.407.515 1.407 1.11 0 .435-.258.693-1.03.792l-1.388.159c-2.061.257-3.825 1.01-3.825 3.19 0 1.982 1.645 3.092 3.35 3.092Zm.891-2.041c-.773 0-1.348-.436-1.348-1.19 0-.733.655-1.09 1.645-1.268l.674-.119c.575-.118.892-.218 1.09-.396v.912c0 1.228-.892 2.06-2.06 2.06ZM70.398 7.074v13.874h2.874V7.074h-2.874ZM74.934 7.074v13.874h2.874V7.074h-2.874ZM84.08 21.304c2.735 0 4.5-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922H81.92ZM94.92 21.146c.633 0 1.248-.1 1.525-.179v-2.18c-.218.04-.475.06-.693.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.338v-2.24h-2.338V7.788H91.47v3.448H89.37v2.24h2.1v4.201c0 2.3 1.15 3.469 3.45 3.469ZM104.62 21.304c3.924 0 6.302-2.299 6.599-5.608h-3.111c-.238 1.803-1.506 3.032-3.369 3.032-2.2 0-3.746-1.784-3.746-4.796 0-2.953 1.605-4.638 3.805-4.638 1.883 0 2.953 1.15 3.171 2.834h3.191c-.317-3.448-2.854-5.41-6.342-5.41-3.984 0-7.036 2.695-7.036 7.214 0 4.677 2.676 7.372 6.838 7.372ZM117.449 21.304c2.993 0 5.114-1.882 5.114-5.172 0-3.23-2.121-5.233-5.114-5.233-2.972 0-5.093 2.002-5.093 5.233 0 3.29 2.101 5.172 5.093 5.172Zm0-2.22c-1.327 0-2.18-1.09-2.18-2.952 0-1.903.892-2.973 2.18-2.973 1.308 0 2.2 1.07 2.2 2.973 0 1.862-.872 2.953-2.2 2.953ZM126.569 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.229-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM137.464 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.228-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM149.949 21.304c2.735 0 4.499-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922h-3.984ZM160.876 21.304c3.013 0 4.658-1.645 4.975-4.201h-2.874c-.099 1.07-.713 1.982-2.001 1.982-1.309 0-2.2-1.21-2.2-2.993 0-1.942 1.03-2.933 2.259-2.933 1.209 0 1.803.872 1.883 1.882h2.873c-.218-2.358-1.823-4.142-4.776-4.142-2.874 0-5.153 1.903-5.153 5.193 0 3.25 1.923 5.212 5.014 5.212ZM172.067 21.146c.634 0 1.248-.1 1.526-.179v-2.18c-.218.04-.476.06-.694.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.339v-2.24h-2.339V7.788h-2.854v3.448h-2.1v2.24h2.1v4.201c0 2.3 1.15 3.469 3.449 3.469Z" fill="#fff"/></svg>`,WALLET_CONNECT_ICON:fg`<svg width="28" height="20" viewBox="0 0 28 20"><g clip-path="url(#a)"><path d="M7.386 6.482c3.653-3.576 9.575-3.576 13.228 0l.44.43a.451.451 0 0 1 0 .648L19.55 9.033a.237.237 0 0 1-.33 0l-.606-.592c-2.548-2.496-6.68-2.496-9.228 0l-.648.634a.237.237 0 0 1-.33 0L6.902 7.602a.451.451 0 0 1 0-.647l.483-.473Zm16.338 3.046 1.339 1.31a.451.451 0 0 1 0 .648l-6.035 5.909a.475.475 0 0 1-.662 0L14.083 13.2a.119.119 0 0 0-.166 0l-4.283 4.194a.475.475 0 0 1-.662 0l-6.035-5.91a.451.451 0 0 1 0-.647l1.338-1.31a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0Z" fill="#000000"/></g><defs><clipPath id="a"><path fill="#ffffff" d="M0 0h28v20H0z"/></clipPath></defs></svg>`,WALLET_CONNECT_ICON_COLORED:fg`<svg width="96" height="96" fill="none"><path fill="#fff" d="M25.322 33.597c12.525-12.263 32.83-12.263 45.355 0l1.507 1.476a1.547 1.547 0 0 1 0 2.22l-5.156 5.048a.814.814 0 0 1-1.134 0l-2.074-2.03c-8.737-8.555-22.903-8.555-31.64 0l-2.222 2.175a.814.814 0 0 1-1.134 0l-5.156-5.049a1.547 1.547 0 0 1 0-2.22l1.654-1.62Zm56.019 10.44 4.589 4.494a1.547 1.547 0 0 1 0 2.22l-20.693 20.26a1.628 1.628 0 0 1-2.267 0L48.283 56.632a.407.407 0 0 0-.567 0L33.03 71.012a1.628 1.628 0 0 1-2.268 0L10.07 50.75a1.547 1.547 0 0 1 0-2.22l4.59-4.494a1.628 1.628 0 0 1 2.267 0l14.687 14.38c.156.153.41.153.567 0l14.685-14.38a1.628 1.628 0 0 1 2.268 0l14.687 14.38c.156.153.41.153.567 0l14.686-14.38a1.628 1.628 0 0 1 2.268 0Z"/><path stroke="#000" d="M25.672 33.954c12.33-12.072 32.325-12.072 44.655 0l1.508 1.476a1.047 1.047 0 0 1 0 1.506l-5.157 5.048a.314.314 0 0 1-.434 0l-2.074-2.03c-8.932-8.746-23.409-8.746-32.34 0l-2.222 2.174a.314.314 0 0 1-.434 0l-5.157-5.048a1.047 1.047 0 0 1 0-1.506l1.655-1.62Zm55.319 10.44 4.59 4.494a1.047 1.047 0 0 1 0 1.506l-20.694 20.26a1.128 1.128 0 0 1-1.568 0l-14.686-14.38a.907.907 0 0 0-1.267 0L32.68 70.655a1.128 1.128 0 0 1-1.568 0L10.42 50.394a1.047 1.047 0 0 1 0-1.506l4.59-4.493a1.128 1.128 0 0 1 1.567 0l14.687 14.379a.907.907 0 0 0 1.266 0l-.35-.357.35.357 14.686-14.38a1.128 1.128 0 0 1 1.568 0l14.687 14.38a.907.907 0 0 0 1.267 0l14.686-14.38a1.128 1.128 0 0 1 1.568 0Z"/></svg>`,BACK_ICON:fg`<svg width="10" height="18" viewBox="0 0 10 18"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.735.179a.75.75 0 0 1 .087 1.057L2.92 8.192a1.25 1.25 0 0 0 0 1.617l5.902 6.956a.75.75 0 1 1-1.144.97L1.776 10.78a2.75 2.75 0 0 1 0-3.559L7.678.265A.75.75 0 0 1 8.735.18Z" fill="#fff"/></svg>`,COPY_ICON:fg`<svg width="24" height="24" fill="none"><path fill="#fff" fill-rule="evenodd" d="M7.01 7.01c.03-1.545.138-2.5.535-3.28A5 5 0 0 1 9.73 1.545C10.8 1 12.2 1 15 1c2.8 0 4.2 0 5.27.545a5 5 0 0 1 2.185 2.185C23 4.8 23 6.2 23 9c0 2.8 0 4.2-.545 5.27a5 5 0 0 1-2.185 2.185c-.78.397-1.735.505-3.28.534l-.001.01c-.03 1.54-.138 2.493-.534 3.27a5 5 0 0 1-2.185 2.186C13.2 23 11.8 23 9 23c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C1 19.2 1 17.8 1 15c0-2.8 0-4.2.545-5.27A5 5 0 0 1 3.73 7.545C4.508 7.149 5.46 7.04 7 7.01h.01ZM15 15.5c-1.425 0-2.403-.001-3.162-.063-.74-.06-1.139-.172-1.427-.319a3.5 3.5 0 0 1-1.53-1.529c-.146-.288-.257-.686-.318-1.427C8.501 11.403 8.5 10.425 8.5 9c0-1.425.001-2.403.063-3.162.06-.74.172-1.139.318-1.427a3.5 3.5 0 0 1 1.53-1.53c.288-.146.686-.257 1.427-.318.759-.062 1.737-.063 3.162-.063 1.425 0 2.403.001 3.162.063.74.06 1.139.172 1.427.318a3.5 3.5 0 0 1 1.53 1.53c.146.288.257.686.318 1.427.062.759.063 1.737.063 3.162 0 1.425-.001 2.403-.063 3.162-.06.74-.172 1.139-.319 1.427a3.5 3.5 0 0 1-1.529 1.53c-.288.146-.686.257-1.427.318-.759.062-1.737.063-3.162.063ZM7 8.511c-.444.009-.825.025-1.162.052-.74.06-1.139.172-1.427.318a3.5 3.5 0 0 0-1.53 1.53c-.146.288-.257.686-.318 1.427-.062.759-.063 1.737-.063 3.162 0 1.425.001 2.403.063 3.162.06.74.172 1.139.318 1.427a3.5 3.5 0 0 0 1.53 1.53c.288.146.686.257 1.427.318.759.062 1.737.063 3.162.063 1.425 0 2.403-.001 3.162-.063.74-.06 1.139-.172 1.427-.319a3.5 3.5 0 0 0 1.53-1.53c.146-.287.257-.685.318-1.426.027-.337.043-.718.052-1.162H15c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C7 13.2 7 11.8 7 9v-.489Z" clip-rule="evenodd"/></svg>`,RETRY_ICON:fg`<svg width="15" height="16" viewBox="0 0 15 16"><path d="M6.464 2.03A.75.75 0 0 0 5.403.97L2.08 4.293a1 1 0 0 0 0 1.414L5.403 9.03a.75.75 0 0 0 1.06-1.06L4.672 6.177a.25.25 0 0 1 .177-.427h2.085a4 4 0 1 1-3.93 4.746c-.077-.407-.405-.746-.82-.746-.414 0-.755.338-.7.748a5.501 5.501 0 1 0 5.45-6.248H4.848a.25.25 0 0 1-.177-.427L6.464 2.03Z" fill="#fff"/></svg>`,DESKTOP_ICON:fg`<svg width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 5.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C2.204 1 3.13 1 4.98 1h6.04c1.85 0 2.775 0 3.466.394a3 3 0 0 1 1.12 1.12C16 3.204 16 4.13 16 5.98v1.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C13.796 12 12.87 12 11.02 12H4.98c-1.85 0-2.775 0-3.466-.394a3 3 0 0 1-1.12-1.12C0 9.796 0 8.87 0 7.02V5.98ZM4.98 2.5h6.04c.953 0 1.568.001 2.034.043.446.04.608.108.69.154a1.5 1.5 0 0 1 .559.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033v1.04c0 .952-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.046-.243.114-.69.154-.466.042-1.08.043-2.033.043H4.98c-.952 0-1.568-.001-2.034-.043-.446-.04-.608-.108-.69-.154a1.5 1.5 0 0 1-.559-.56c-.046-.08-.114-.243-.154-.69-.042-.465-.043-1.08-.043-2.033V5.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.046.243-.114.69-.154.465-.042 1.08-.043 2.033-.043Z" fill="#fff"/><path d="M4 14.25a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,MOBILE_ICON:fg`<svg width="16" height="16" viewBox="0 0 16 16"><path d="M6.75 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3 4.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C5.204 0 6.136 0 8 0s2.795 0 3.486.394a3 3 0 0 1 1.12 1.12C13 2.204 13 3.13 13 4.98v6.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C10.796 16 9.864 16 8 16s-2.795 0-3.486-.394a3 3 0 0 1-1.12-1.12C3 13.796 3 12.87 3 11.02V4.98Zm8.5 0v6.04c0 .953-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.045-.242.113-.693.154-.47.042-1.091.043-2.05.043-.959 0-1.58-.001-2.05-.043-.45-.04-.613-.109-.693-.154a1.5 1.5 0 0 1-.56-.56c-.046-.08-.114-.243-.154-.69-.042-.466-.043-1.08-.043-2.033V4.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.045.243-.113.693-.154C6.42 1.501 7.041 1.5 8 1.5c.959 0 1.58.001 2.05.043.45.04.613.109.693.154a1.5 1.5 0 0 1 .56.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033Z" fill="#fff"/></svg>`,ARROW_DOWN_ICON:fg`<svg width="14" height="14" viewBox="0 0 14 14"><path d="M2.28 7.47a.75.75 0 0 0-1.06 1.06l5.25 5.25a.75.75 0 0 0 1.06 0l5.25-5.25a.75.75 0 0 0-1.06-1.06l-3.544 3.543a.25.25 0 0 1-.426-.177V.75a.75.75 0 0 0-1.5 0v10.086a.25.25 0 0 1-.427.176L2.28 7.47Z" fill="#fff"/></svg>`,ARROW_UP_RIGHT_ICON:fg`<svg width="15" height="14" fill="none"><path d="M4.5 1.75A.75.75 0 0 1 5.25 1H12a1.5 1.5 0 0 1 1.5 1.5v6.75a.75.75 0 0 1-1.5 0V4.164a.25.25 0 0 0-.427-.176L4.061 11.5A.75.75 0 0 1 3 10.44l7.513-7.513a.25.25 0 0 0-.177-.427H5.25a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,ARROW_RIGHT_ICON:fg`<svg width="6" height="14" viewBox="0 0 6 14"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.181 1.099a.75.75 0 0 1 1.024.279l2.433 4.258a2.75 2.75 0 0 1 0 2.729l-2.433 4.257a.75.75 0 1 1-1.303-.744L4.335 7.62a1.25 1.25 0 0 0 0-1.24L1.902 2.122a.75.75 0 0 1 .28-1.023Z" fill="#fff"/></svg>`,QRCODE_ICON:fg`<svg width="25" height="24" viewBox="0 0 25 24"><path d="M23.748 9a.748.748 0 0 0 .748-.752c-.018-2.596-.128-4.07-.784-5.22a6 6 0 0 0-2.24-2.24c-1.15-.656-2.624-.766-5.22-.784a.748.748 0 0 0-.752.748c0 .414.335.749.748.752 1.015.007 1.82.028 2.494.088.995.09 1.561.256 1.988.5.7.398 1.28.978 1.679 1.678.243.427.41.993.498 1.988.061.675.082 1.479.09 2.493a.753.753 0 0 0 .75.749ZM3.527.788C4.677.132 6.152.022 8.747.004A.748.748 0 0 1 9.5.752a.753.753 0 0 1-.749.752c-1.014.007-1.818.028-2.493.088-.995.09-1.561.256-1.988.5-.7.398-1.28.978-1.679 1.678-.243.427-.41.993-.499 1.988-.06.675-.081 1.479-.088 2.493A.753.753 0 0 1 1.252 9a.748.748 0 0 1-.748-.752c.018-2.596.128-4.07.784-5.22a6 6 0 0 1 2.24-2.24ZM1.252 15a.748.748 0 0 0-.748.752c.018 2.596.128 4.07.784 5.22a6 6 0 0 0 2.24 2.24c1.15.656 2.624.766 5.22.784a.748.748 0 0 0 .752-.748.753.753 0 0 0-.749-.752c-1.014-.007-1.818-.028-2.493-.089-.995-.089-1.561-.255-1.988-.498a4.5 4.5 0 0 1-1.679-1.68c-.243-.426-.41-.992-.499-1.987-.06-.675-.081-1.479-.088-2.493A.753.753 0 0 0 1.252 15ZM22.996 15.749a.753.753 0 0 1 .752-.749c.415 0 .751.338.748.752-.018 2.596-.128 4.07-.784 5.22a6 6 0 0 1-2.24 2.24c-1.15.656-2.624.766-5.22.784a.748.748 0 0 1-.752-.748c0-.414.335-.749.748-.752 1.015-.007 1.82-.028 2.494-.089.995-.089 1.561-.255 1.988-.498a4.5 4.5 0 0 0 1.679-1.68c.243-.426.41-.992.498-1.987.061-.675.082-1.479.09-2.493Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 4a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 11h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 4H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1ZM13.5 6.5A2.5 2.5 0 0 1 16 4h2a2.5 2.5 0 0 1 2.5 2.5v2A2.5 2.5 0 0 1 18 11h-2a2.5 2.5 0 0 1-2.5-2.5v-2Zm2.5-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1ZM7 13a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 20h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 13H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1Z" fill="#fff"/><path d="M13.5 15.5c0-.465 0-.697.038-.89a2 2 0 0 1 1.572-1.572C15.303 13 15.535 13 16 13v2.5h-2.5ZM18 13c.465 0 .697 0 .89.038a2 2 0 0 1 1.572 1.572c.038.193.038.425.038.89H18V13ZM18 17.5h2.5c0 .465 0 .697-.038.89a2 2 0 0 1-1.572 1.572C18.697 20 18.465 20 18 20v-2.5ZM13.5 17.5H16V20c-.465 0-.697 0-.89-.038a2 2 0 0 1-1.572-1.572c-.038-.193-.038-.425-.038-.89Z" fill="#fff"/></svg>`,SCAN_ICON:fg`<svg width="16" height="16" fill="none"><path fill="#fff" d="M10 15.216c0 .422.347.763.768.74 1.202-.064 2.025-.222 2.71-.613a5.001 5.001 0 0 0 1.865-1.866c.39-.684.549-1.507.613-2.709a.735.735 0 0 0-.74-.768.768.768 0 0 0-.76.732c-.009.157-.02.306-.032.447-.073.812-.206 1.244-.384 1.555-.31.545-.761.996-1.306 1.306-.311.178-.743.311-1.555.384-.141.013-.29.023-.447.032a.768.768 0 0 0-.732.76ZM10 .784c0 .407.325.737.732.76.157.009.306.02.447.032.812.073 1.244.206 1.555.384a3.5 3.5 0 0 1 1.306 1.306c.178.311.311.743.384 1.555.013.142.023.29.032.447a.768.768 0 0 0 .76.732.734.734 0 0 0 .74-.768c-.064-1.202-.222-2.025-.613-2.71A5 5 0 0 0 13.477.658c-.684-.39-1.507-.549-2.709-.613a.735.735 0 0 0-.768.74ZM5.232.044A.735.735 0 0 1 6 .784a.768.768 0 0 1-.732.76c-.157.009-.305.02-.447.032-.812.073-1.244.206-1.555.384A3.5 3.5 0 0 0 1.96 3.266c-.178.311-.311.743-.384 1.555-.013.142-.023.29-.032.447A.768.768 0 0 1 .784 6a.735.735 0 0 1-.74-.768c.064-1.202.222-2.025.613-2.71A5 5 0 0 1 2.523.658C3.207.267 4.03.108 5.233.044ZM5.268 14.456a.768.768 0 0 1 .732.76.734.734 0 0 1-.768.74c-1.202-.064-2.025-.222-2.71-.613a5 5 0 0 1-1.865-1.866c-.39-.684-.549-1.507-.613-2.709A.735.735 0 0 1 .784 10c.407 0 .737.325.76.732.009.157.02.306.032.447.073.812.206 1.244.384 1.555a3.5 3.5 0 0 0 1.306 1.306c.311.178.743.311 1.555.384.142.013.29.023.447.032Z"/></svg>`,CHECKMARK_ICON:fg`<svg width="13" height="12" viewBox="0 0 13 12"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.155.132a.75.75 0 0 1 .232 1.035L5.821 11.535a1 1 0 0 1-1.626.09L.665 7.21a.75.75 0 1 1 1.17-.937L4.71 9.867a.25.25 0 0 0 .406-.023L11.12.364a.75.75 0 0 1 1.035-.232Z" fill="#fff"/></svg>`,SEARCH_ICON:fg`<svg width="20" height="21"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.432 13.992c-.354-.353-.91-.382-1.35-.146a5.5 5.5 0 1 1 2.265-2.265c-.237.441-.208.997.145 1.35l3.296 3.296a.75.75 0 1 1-1.06 1.061l-3.296-3.296Zm.06-5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z" fill="#949E9E"/></svg>`,WALLET_PLACEHOLDER:fg`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#q)"><path id="wallet-placeholder-fill" fill="#fff" d="M0 24.9c0-9.251 0-13.877 1.97-17.332a15 15 0 0 1 5.598-5.597C11.023 0 15.648 0 24.9 0h10.2c9.252 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.023 60 15.648 60 24.9v10.2c0 9.252 0 13.877-1.97 17.332a15.001 15.001 0 0 1-5.598 5.597C48.977 60 44.352 60 35.1 60H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.352 0 35.1V24.9Z"/><path id="wallet-placeholder-dash" stroke="#000" stroke-dasharray="4 4" stroke-width="1.5" d="M.04 41.708a231.598 231.598 0 0 1-.039-4.403l.75-.001L.75 35.1v-2.55H0v-5.1h.75V24.9l.001-2.204h-.75c.003-1.617.011-3.077.039-4.404l.75.016c.034-1.65.099-3.08.218-4.343l-.746-.07c.158-1.678.412-3.083.82-4.316l.713.236c.224-.679.497-1.296.827-1.875a14.25 14.25 0 0 1 1.05-1.585L3.076 5.9A15 15 0 0 1 5.9 3.076l.455.596a14.25 14.25 0 0 1 1.585-1.05c.579-.33 1.196-.603 1.875-.827l-.236-.712C10.812.674 12.217.42 13.895.262l.07.746C15.23.89 16.66.824 18.308.79l-.016-.75C19.62.012 21.08.004 22.695.001l.001.75L24.9.75h2.55V0h5.1v.75h2.55l2.204.001v-.75c1.617.003 3.077.011 4.404.039l-.016.75c1.65.034 3.08.099 4.343.218l.07-.746c1.678.158 3.083.412 4.316.82l-.236.713c.679.224 1.296.497 1.875.827a14.24 14.24 0 0 1 1.585 1.05l.455-.596A14.999 14.999 0 0 1 56.924 5.9l-.596.455c.384.502.735 1.032 1.05 1.585.33.579.602 1.196.827 1.875l.712-.236c.409 1.233.663 2.638.822 4.316l-.747.07c.119 1.264.184 2.694.218 4.343l.75-.016c.028 1.327.036 2.787.039 4.403l-.75.001.001 2.204v2.55H60v5.1h-.75v2.55l-.001 2.204h.75a231.431 231.431 0 0 1-.039 4.404l-.75-.016c-.034 1.65-.099 3.08-.218 4.343l.747.07c-.159 1.678-.413 3.083-.822 4.316l-.712-.236a10.255 10.255 0 0 1-.827 1.875 14.242 14.242 0 0 1-1.05 1.585l.596.455a14.997 14.997 0 0 1-2.824 2.824l-.455-.596c-.502.384-1.032.735-1.585 1.05-.579.33-1.196.602-1.875.827l.236.712c-1.233.409-2.638.663-4.316.822l-.07-.747c-1.264.119-2.694.184-4.343.218l.016.75c-1.327.028-2.787.036-4.403.039l-.001-.75-2.204.001h-2.55V60h-5.1v-.75H24.9l-2.204-.001v.75a231.431 231.431 0 0 1-4.404-.039l.016-.75c-1.65-.034-3.08-.099-4.343-.218l-.07.747c-1.678-.159-3.083-.413-4.316-.822l.236-.712a10.258 10.258 0 0 1-1.875-.827 14.252 14.252 0 0 1-1.585-1.05l-.455.596A14.999 14.999 0 0 1 3.076 54.1l.596-.455a14.24 14.24 0 0 1-1.05-1.585 10.259 10.259 0 0 1-.827-1.875l-.712.236C.674 49.188.42 47.783.262 46.105l.746-.07C.89 44.77.824 43.34.79 41.692l-.75.016Z"/><path fill="#fff" fill-rule="evenodd" d="M35.643 32.145c-.297-.743-.445-1.114-.401-1.275a.42.42 0 0 1 .182-.27c.134-.1.463-.1 1.123-.1.742 0 1.499.046 2.236-.05a6 6 0 0 0 5.166-5.166c.051-.39.051-.855.051-1.784 0-.928 0-1.393-.051-1.783a6 6 0 0 0-5.166-5.165c-.39-.052-.854-.052-1.783-.052h-7.72c-4.934 0-7.401 0-9.244 1.051a8 8 0 0 0-2.985 2.986C16.057 22.28 16.003 24.58 16 29 15.998 31.075 16 33.15 16 35.224A7.778 7.778 0 0 0 23.778 43H28.5c1.394 0 2.09 0 2.67-.116a6 6 0 0 0 4.715-4.714c.115-.58.115-1.301.115-2.744 0-1.31 0-1.964-.114-2.49a4.998 4.998 0 0 0-.243-.792Z" clip-rule="evenodd"/><path fill="#9EA9A9" fill-rule="evenodd" d="M37 18h-7.72c-2.494 0-4.266.002-5.647.126-1.361.122-2.197.354-2.854.728a6.5 6.5 0 0 0-2.425 2.426c-.375.657-.607 1.492-.729 2.853-.11 1.233-.123 2.777-.125 4.867 0 .7 0 1.05.097 1.181.096.13.182.181.343.2.163.02.518-.18 1.229-.581a6.195 6.195 0 0 1 3.053-.8H37c.977 0 1.32-.003 1.587-.038a4.5 4.5 0 0 0 3.874-3.874c.036-.268.039-.611.039-1.588 0-.976-.003-1.319-.038-1.587a4.5 4.5 0 0 0-3.875-3.874C38.32 18.004 37.977 18 37 18Zm-7.364 12.5h-7.414a4.722 4.722 0 0 0-4.722 4.723 6.278 6.278 0 0 0 6.278 6.278H28.5c1.466 0 1.98-.008 2.378-.087a4.5 4.5 0 0 0 3.535-3.536c.08-.397.087-.933.087-2.451 0-1.391-.009-1.843-.08-2.17a3.5 3.5 0 0 0-2.676-2.676c-.328-.072-.762-.08-2.108-.08Z" clip-rule="evenodd"/></g><defs><clipPath id="q"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,GLOBE_ICON:fg`<svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="#fff" fill-rule="evenodd" d="M15.5 8a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Zm-2.113.75c.301 0 .535.264.47.558a6.01 6.01 0 0 1-2.867 3.896c-.203.116-.42-.103-.334-.32.409-1.018.691-2.274.797-3.657a.512.512 0 0 1 .507-.477h1.427Zm.47-2.058c.065.294-.169.558-.47.558H11.96a.512.512 0 0 1-.507-.477c-.106-1.383-.389-2.638-.797-3.656-.087-.217.13-.437.333-.32a6.01 6.01 0 0 1 2.868 3.895Zm-4.402.558c.286 0 .515-.24.49-.525-.121-1.361-.429-2.534-.83-3.393-.279-.6-.549-.93-.753-1.112a.535.535 0 0 0-.724 0c-.204.182-.474.513-.754 1.112-.4.859-.708 2.032-.828 3.393a.486.486 0 0 0 .49.525h2.909Zm-5.415 0c.267 0 .486-.21.507-.477.106-1.383.389-2.638.797-3.656.087-.217-.13-.437-.333-.32a6.01 6.01 0 0 0-2.868 3.895c-.065.294.169.558.47.558H4.04ZM2.143 9.308c-.065-.294.169-.558.47-.558H4.04c.267 0 .486.21.507.477.106 1.383.389 2.639.797 3.657.087.217-.13.436-.333.32a6.01 6.01 0 0 1-2.868-3.896Zm3.913-.033a.486.486 0 0 1 .49-.525h2.909c.286 0 .515.24.49.525-.121 1.361-.428 2.535-.83 3.394-.279.6-.549.93-.753 1.112a.535.535 0 0 1-.724 0c-.204-.182-.474-.513-.754-1.112-.4-.859-.708-2.033-.828-3.394Z" clip-rule="evenodd"/></svg>`},vw=If`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`,_w=Object.defineProperty,xw=Object.getOwnPropertyDescriptor,Ew=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?xw(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&_w(t,r,o),o},(Cw=class extends Ng{render(){return pg`<div class="wcm-toolbar-placeholder"></div><div class="wcm-toolbar">${ww.WALLET_CONNECT_LOGO} <button @click="${uf.close}">${ww.CROSS_ICON}</button></div>`}}).styles=[iw.globalCss,vw],Cw=Ew([$g("wcm-modal-backcard")],Cw),kw=If`main{padding:20px;padding-top:0;width:100%}`,Pw=Object.defineProperty,Iw=Object.getOwnPropertyDescriptor,Sw=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?Iw(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&Pw(t,r,o),o},(Aw=class extends Ng{render(){return pg`<main><slot></slot></main>`}}).styles=[iw.globalCss,kw],Aw=Sw([$g("wcm-modal-content")],Aw),Tw=If`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`,Ow=Object.defineProperty,Rw=Object.getOwnPropertyDescriptor,Nw=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?Rw(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&Ow(t,r,o),o},(Mw=class extends Ng{render(){return pg`<footer><slot></slot></footer>`}}).styles=[iw.globalCss,Tw],Mw=Nw([$g("wcm-modal-footer")],Mw),$w=If`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`,jw=Object.defineProperty,Lw=Object.getOwnPropertyDescriptor,Bw=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?Lw(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&jw(t,r,o),o},Dw=class extends Ng{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return pg`<button class="wcm-back-btn" @click="${Mp.goBack}">${ww.BACK_ICON}</button>`}actionBtnTemplate(){return pg`<button class="wcm-action-btn" @click="${this.onAction}">${this.actionIcon}</button>`}render(){let e={"wcm-border":this.border},t=Mp.state.history.length>1,r=this.title?pg`<wcm-text variant="big-bold">${this.title}</wcm-text>`:pg`<slot></slot>`;return pg`<header class="${Yg(e)}">${t?this.backBtnTemplate():null} ${r} ${this.onAction?this.actionBtnTemplate():null}</header>`}},Dw.styles=[iw.globalCss,$w],Bw([Fg()],Dw.prototype,"title",2),Bw([Fg()],Dw.prototype,"onAction",2),Bw([Fg()],Dw.prototype,"actionIcon",2),Bw([Fg({type:Boolean})],Dw.prototype,"border",2),Dw=Bw([$g("wcm-modal-header")],Dw),Uw={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:"WCM_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",getShadowRootElement(e,t){let r=e.renderRoot.querySelector(t);if(!r)throw new Error(`${t} not found`);return r},getWalletIcon({id:e,image_id:t}){let{walletImages:r}=Hp.state;return null!=r&&r[e]?r[e]:t?cf.getWalletImageUrl(t):""},getWalletName:(e,t=!1)=>t&&e.length>8?`${e.substring(0,8)}..`:e,isMobileAnimation:()=>window.innerWidth<=Uw.MOBILE_BREAKPOINT,async preloadImage(e){let t=new Promise(((t,r)=>{let i=new Image;i.onload=t,i.onerror=r,i.crossOrigin="anonymous",i.src=e}));return Promise.race([t,$p.wait(3e3)])},getErrorMessage:e=>e instanceof Error?e.message:"Unknown Error",debounce(e,t=500){let r;return(...i)=>{r&&clearTimeout(r),r=setTimeout((function(){e(...i)}),t)}},handleMobileLinking(e){let{walletConnectUri:t}=Up.state,{mobile:r,name:i}=e,n=r?.native,o=r?.universal;Uw.setRecentWallet(e),t&&function(e){let t="";n?t=$p.formatUniversalUrl(n,e,i):o&&(t=$p.formatNativeUrl(o,e,i)),$p.openHref(t,"_self")}(t)},handleAndroidLinking(){let{walletConnectUri:e}=Up.state;e&&($p.setWalletConnectAndroidDeepLink(e),$p.openHref(e,"_self"))},async handleUriCopy(){let{walletConnectUri:e}=Up.state;if(e)try{await navigator.clipboard.writeText(e),vf.openToast("Link copied","success")}catch{vf.openToast("Failed to copy","error")}},getCustomImageUrls(){let{walletImages:e}=Hp.state,t=Object.values(e??{});return Object.values(t)},truncate:(e,t=8)=>e.length<=t?e:`${e.substring(0,4)}...${e.substring(e.length-4)}`,setRecentWallet(e){try{localStorage.setItem(Uw.WCM_RECENT_WALLET_DATA,JSON.stringify(e))}catch{console.info("Unable to set recent wallet")}},getRecentWallet(){try{let e=localStorage.getItem(Uw.WCM_RECENT_WALLET_DATA);return e?JSON.parse(e):void 0}catch{console.info("Unable to get recent wallet")}},caseSafeIncludes:(e,t)=>e.toUpperCase().includes(t.toUpperCase()),openWalletExplorerUrl(){$p.openHref(Uw.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){let{desktop:e,mobile:t}=$p.getWalletRouterData(),r=!!e?.native,i=!!e?.universal;return{isDesktop:r,isMobile:!!t?.native||!!t?.universal,isWeb:i}},goToConnectingView(e){Mp.setData({Wallet:e});let t=$p.isMobile(),{isDesktop:r,isWeb:i,isMobile:n}=Uw.getCachedRouterWalletPlatforms();t?n?Mp.push("MobileConnecting"):i?Mp.push("WebConnecting"):Mp.push("InstallWallet"):r?Mp.push("DesktopConnecting"):i?Mp.push("WebConnecting"):n?Mp.push("MobileQrcodeConnecting"):Mp.push("InstallWallet")}},Fw=If`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`,Hw=Object.defineProperty,zw=Object.getOwnPropertyDescriptor,qw=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?zw(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&Hw(t,r,o),o},(Ww=class extends Ng{constructor(){super(),this.view=Mp.state.view,this.prevView=Mp.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=Mp.subscribe((e=>{this.view!==e.view&&this.onChangeRoute()}))}firstUpdated(){this.resizeObserver=new ResizeObserver((([e])=>{let t=`${e.contentRect.height}px`;"0px"!==this.oldHeight&&py(this.routerEl,{height:[this.oldHeight,t]},{duration:.2}),this.oldHeight=t})),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var e,t;null==(e=this.unsubscribe)||e.call(this),null==(t=this.resizeObserver)||t.disconnect()}get routerEl(){return Uw.getShadowRootElement(this,".wcm-router")}get contentEl(){return Uw.getShadowRootElement(this,".wcm-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return pg`<wcm-connect-wallet-view></wcm-connect-wallet-view>`;case"DesktopConnecting":return pg`<wcm-desktop-connecting-view></wcm-desktop-connecting-view>`;case"MobileConnecting":return pg`<wcm-mobile-connecting-view></wcm-mobile-connecting-view>`;case"WebConnecting":return pg`<wcm-web-connecting-view></wcm-web-connecting-view>`;case"MobileQrcodeConnecting":return pg`<wcm-mobile-qr-connecting-view></wcm-mobile-qr-connecting-view>`;case"WalletExplorer":return pg`<wcm-wallet-explorer-view></wcm-wallet-explorer-view>`;case"Qrcode":return pg`<wcm-qrcode-view></wcm-qrcode-view>`;case"InstallWallet":return pg`<wcm-install-wallet-view></wcm-install-wallet-view>`;default:return pg`<div>Not Found</div>`}}async onChangeRoute(){await py(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=Mp.state.view,py(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return pg`<div class="wcm-router"><div class="wcm-content">${this.viewTemplate()}</div></div>`}}).styles=[iw.globalCss,Fw],qw([Wg()],Ww.prototype,"view",2),qw([Wg()],Ww.prototype,"prevView",2),Ww=qw([$g("wcm-modal-router")],Ww),Vw=If`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`,Gw=Object.defineProperty,Zw=Object.getOwnPropertyDescriptor,Kw=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?Zw(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&Gw(t,r,o),o},(Yw=class extends Ng{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=vf.subscribe((e=>{e.open?(this.open=!0,this.timeout=setTimeout((()=>vf.closeToast()),2200)):(this.open=!1,clearTimeout(this.timeout))}))}disconnectedCallback(){var e;null==(e=this.unsubscribe)||e.call(this),clearTimeout(this.timeout),vf.closeToast()}render(){let{message:e,variant:t}=vf.state,r={"wcm-success":"success"===t,"wcm-error":"error"===t};return this.open?pg`<div class="${Yg(r)}">${"success"===t?ww.CHECKMARK_ICON:null} ${"error"===t?ww.CROSS_ICON:null}<wcm-text variant="small-regular">${e}</wcm-text></div>`:null}}).styles=[iw.globalCss,Vw],Kw([Wg()],Yw.prototype,"open",2),Yw=Kw([$g("wcm-modal-toast")],Yw),Jw=.1,2.5,7,Qw={generate(e,t,r){let i="#141414",n=[],o=function(e,t){let r=Array.prototype.slice.call(Yy.default.create(e,{errorCorrectionLevel:t}).modules.data,0),i=Math.sqrt(r.length);return r.reduce(((e,t,r)=>(r%i==0?e.push([t]):e[e.length-1].push(t))&&e),[])}(e,"Q"),a=t/o.length,s=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];s.forEach((({x:e,y:t})=>{let r=(o.length-7)*a*e,c=(o.length-7)*a*t;for(let e=0;e<s.length;e+=1){let t=a*(7-2*e);n.push(fg`<rect fill="${e%2==0?i:"#ffffff"}" height="${t}" rx="${.45*t}" ry="${.45*t}" width="${t}" x="${r+a*e}" y="${c+a*e}">`)}}));let c=Math.floor((r+25)/a),l=o.length/2-c/2,u=o.length/2+c/2-1,d=[];o.forEach(((e,t)=>{e.forEach(((e,r)=>{if(o[t][r]&&!(t<7&&r<7||t>o.length-8&&r<7||t<7&&r>o.length-8)&&!(t>l&&t<u&&r>l&&r<u)){let e=t*a+a/2,i=r*a+a/2;d.push([e,i])}}))}));let h={};return d.forEach((([e,t])=>{h[e]?h[e].push(t):h[e]=[t]})),Object.entries(h).map((([e,t])=>{let r=t.filter((e=>t.every((t=>!Ky(e,t,a)))));return[Number(e),r]})).forEach((([e,t])=>{t.forEach((t=>{n.push(fg`<circle cx="${e}" cy="${t}" fill="${i}" r="${a/2.5}">`)}))})),Object.entries(h).filter((([e,t])=>t.length>1)).map((([e,t])=>{let r=t.filter((e=>t.some((t=>Ky(e,t,a)))));return[Number(e),r]})).map((([e,t])=>{t.sort(((e,t)=>e<t?-1:1));let r=[];for(let e of t){let t=r.find((t=>t.some((t=>Ky(e,t,a)))));t?t.push(e):r.push([e])}return[e,r.map((e=>[e[0],e[e.length-1]]))]})).forEach((([e,t])=>{t.forEach((([t,r])=>{n.push(fg`<line x1="${e}" x2="${e}" y1="${t}" y2="${r}" stroke="${i}" stroke-width="${a/1.25}" stroke-linecap="round">`)}))})),n}},Xw=If`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`,ev=Object.defineProperty,tv=Object.getOwnPropertyDescriptor,rv=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?tv(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&ev(t,r,o),o},iv=class extends Ng{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){let e="light"===yf.state.themeMode?this.size:this.size-36;return fg`<svg height="${e}" width="${e}">${Qw.generate(this.uri,e,e/4)}</svg>`}render(){let e={"wcm-dark":"dark"===yf.state.themeMode};return pg`<div style="${`width: ${this.size}px`}" class="${Yg(e)}">${this.walletId||this.imageUrl?pg`<wcm-wallet-image walletId="${fy(this.walletId)}" imageId="${fy(this.imageId)}" imageUrl="${fy(this.imageUrl)}"></wcm-wallet-image>`:ww.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}</div>`}},iv.styles=[iw.globalCss,Xw],rv([Fg()],iv.prototype,"uri",2),rv([Fg({type:Number})],iv.prototype,"size",2),rv([Fg()],iv.prototype,"imageId",2),rv([Fg()],iv.prototype,"walletId",2),rv([Fg()],iv.prototype,"imageUrl",2),iv=rv([$g("wcm-qrcode")],iv),nv=If`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`,ov=Object.defineProperty,av=Object.getOwnPropertyDescriptor,sv=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?av(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&ov(t,r,o),o},cv=class extends Ng{constructor(){super(...arguments),this.onChange=()=>null}render(){return pg`<input type="text" @input="${this.onChange}" placeholder="Search wallets"> ${ww.SEARCH_ICON}`}},cv.styles=[iw.globalCss,nv],sv([Fg()],cv.prototype,"onChange",2),cv=sv([$g("wcm-search-input")],cv),lv=If`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`,uv=Object.defineProperty,dv=Object.getOwnPropertyDescriptor,hv=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?dv(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&uv(t,r,o),o},(pv=class extends Ng{render(){return pg`<svg viewBox="0 0 50 50" width="24" height="24"><circle cx="25" cy="25" r="20" fill="none" stroke-width="4" stroke="#fff"/></svg>`}}).styles=[iw.globalCss,lv],pv=hv([$g("wcm-spinner")],pv),fv=If`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`,gv=Object.defineProperty,mv=Object.getOwnPropertyDescriptor,bv=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?mv(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&gv(t,r,o),o},yv=class extends Ng{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){let e={"wcm-big-bold":"big-bold"===this.variant,"wcm-medium-regular":"medium-regular"===this.variant,"wcm-small-regular":"small-regular"===this.variant,"wcm-small-thin":"small-thin"===this.variant,"wcm-xsmall-regular":"xsmall-regular"===this.variant,"wcm-xsmall-bold":"xsmall-bold"===this.variant,"wcm-color-primary":"primary"===this.color,"wcm-color-secondary":"secondary"===this.color,"wcm-color-tertiary":"tertiary"===this.color,"wcm-color-inverse":"inverse"===this.color,"wcm-color-accnt":"accent"===this.color,"wcm-color-error":"error"===this.color};return pg`<span><slot class="${Yg(e)}"></slot></span>`}},yv.styles=[iw.globalCss,fv],bv([Fg()],yv.prototype,"variant",2),bv([Fg()],yv.prototype,"color",2),yv=bv([$g("wcm-text")],yv),wv=If`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`,vv=Object.defineProperty,_v=Object.getOwnPropertyDescriptor,xv=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?_v(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&vv(t,r,o),o},Ev=class extends Ng{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?pg`<wcm-text class="wcm-sublabel" variant="xsmall-bold" color="tertiary">RECENT</wcm-text>`:this.installed?pg`<wcm-text class="wcm-sublabel" variant="xsmall-bold" color="tertiary">INSTALLED</wcm-text>`:null}handleClick(){Bp.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var e;return pg`<button @click="${this.handleClick.bind(this)}"><div><wcm-wallet-image walletId="${this.walletId}" imageId="${fy(this.imageId)}"></wcm-wallet-image><wcm-text variant="xsmall-regular">${null!=(e=this.label)?e:Uw.getWalletName(this.name,!0)}</wcm-text>${this.sublabelTemplate()}</div></button>`}},Ev.styles=[iw.globalCss,wv],xv([Fg()],Ev.prototype,"onClick",2),xv([Fg()],Ev.prototype,"name",2),xv([Fg()],Ev.prototype,"walletId",2),xv([Fg()],Ev.prototype,"label",2),xv([Fg()],Ev.prototype,"imageId",2),xv([Fg({type:Boolean})],Ev.prototype,"installed",2),xv([Fg({type:Boolean})],Ev.prototype,"recent",2),Ev=xv([$g("wcm-wallet-button")],Ev),Cv=If`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`,kv=Object.defineProperty,Pv=Object.getOwnPropertyDescriptor,Iv=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?Pv(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&kv(t,r,o),o},Sv=class extends Ng{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var e;let t=null!=(e=this.imageUrl)&&e.length?this.imageUrl:Uw.getWalletIcon({id:this.walletId,image_id:this.imageId});return pg`${t.length?pg`<div><img crossorigin="anonymous" src="${t}" alt="${this.id}"></div>`:ww.WALLET_PLACEHOLDER}`}},Sv.styles=[iw.globalCss,Cv],Iv([Fg()],Sv.prototype,"walletId",2),Iv([Fg()],Sv.prototype,"imageId",2),Iv([Fg()],Sv.prototype,"imageUrl",2),Sv=Iv([$g("wcm-wallet-image")],Sv),Av=Object.defineProperty,Tv=Object.getOwnPropertyDescriptor,Ov=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?Tv(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&Av(t,r,o),o},Rv=class extends Ng{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(e){try{null!=e&&e.length&&await Promise.all(e.map((async e=>Uw.preloadImage(e))))}catch{console.info("Unsuccessful attempt at preloading some images",e)}}async preloadListings(){if(Hp.state.enableExplorer){await cf.getRecomendedWallets(),Up.setIsDataLoaded(!0);let{recomendedWallets:e}=cf.state,t=e.map((e=>Uw.getWalletIcon(e)));await this.loadImages(t)}else Up.setIsDataLoaded(!0)}async preloadCustomImages(){let e=Uw.getCustomImageUrls();await this.loadImages(e)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(e){console.error(e),vf.openToast("Failed preloading","error")}}},Ov([Wg()],Rv.prototype,"preload",2),Rv=Ov([$g("wcm-explorer-context")],Rv),Nv=Object.defineProperty,Mv=Object.getOwnPropertyDescriptor,$v=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?Mv(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&Nv(t,r,o),o},jv=class extends Ng{constructor(){super(),this.unsubscribeTheme=void 0,iw.setTheme(),this.unsubscribeTheme=yf.subscribe(iw.setTheme)}disconnectedCallback(){var e;null==(e=this.unsubscribeTheme)||e.call(this)}},jv=$v([$g("wcm-theme-context")],jv),Lv=If`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`,Bv=Object.defineProperty,Dv=Object.getOwnPropertyDescriptor,Uv=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?Dv(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&Bv(t,r,o),o},(Fv=class extends Ng{onGoToQrcode(){Mp.push("Qrcode")}render(){let{recomendedWallets:e}=cf.state,t=[...e,...e],r=2*$p.RECOMMENDED_WALLET_AMOUNT;return pg`<wcm-modal-header title="Connect your wallet" .onAction="${this.onGoToQrcode}" .actionIcon="${ww.QRCODE_ICON}"></wcm-modal-header><wcm-modal-content><div class="wcm-title">${ww.MOBILE_ICON}<wcm-text variant="small-regular" color="accent">WalletConnect</wcm-text></div><div class="wcm-slider"><div class="wcm-track">${[...Array(r)].map(((e,r)=>{let i=t[r%t.length];return i?pg`<wcm-wallet-image walletId="${i.id}" imageId="${i.image_id}"></wcm-wallet-image>`:ww.WALLET_PLACEHOLDER}))}</div><wcm-button-big @click="${Uw.handleAndroidLinking}"><wcm-text variant="medium-regular" color="inverse">Select Wallet</wcm-text></wcm-button-big></div></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">Choose WalletConnect to see supported apps on your device</wcm-text></wcm-info-footer>`}}).styles=[iw.globalCss,Lv],Fv=Uv([$g("wcm-android-wallet-selection")],Fv),Hv=If`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`,zv=Object.defineProperty,qv=Object.getOwnPropertyDescriptor,Wv=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?qv(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&zv(t,r,o),o},Vv=class extends Ng{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var e,t;let r=null!=(t=null==(e=yf.state.themeVariables)?void 0:e["--wcm-wallet-icon-large-border-radius"])?t:iw.getPreset("--wcm-wallet-icon-large-border-radius"),i=0;return i=r.includes("%")?.88*parseInt(r,10):parseInt(r,10),i*=1.17,pg`<svg viewBox="0 0 110 110" width="110" height="110"><rect id="wcm-loader" x="2" y="2" width="106" height="106" rx="${i}"/><use xlink:href="#wcm-loader" stroke-dasharray="106 ${317-1.57*i}" stroke-dashoffset="${425-1.8*i}"></use></svg>`}render(){let e={"wcm-error":this.isError,"wcm-stale":this.isStale};return pg`<div class="${Yg(e)}">${this.svgLoaderTemplate()}<wcm-wallet-image walletId="${fy(this.walletId)}" imageId="${fy(this.imageId)}"></wcm-wallet-image></div><wcm-text variant="medium-regular" color="${this.isError?"error":"primary"}">${this.isError?"Connection declined":this.label}</wcm-text>`}},Vv.styles=[iw.globalCss,Hv],Wv([Fg()],Vv.prototype,"walletId",2),Wv([Fg()],Vv.prototype,"imageId",2),Wv([Fg({type:Boolean})],Vv.prototype,"isError",2),Wv([Fg({type:Boolean})],Vv.prototype,"isStale",2),Wv([Fg()],Vv.prototype,"label",2),Vv=Wv([$g("wcm-connector-waiting")],Vv),Gv={manualWallets(){var e,t;let{mobileWallets:r,desktopWallets:i}=Hp.state,n=null==(e=Gv.recentWallet())?void 0:e.id,o=$p.isMobile()?r:i,a=o?.filter((e=>n!==e.id));return null!=(t=$p.isMobile()?a?.map((({id:e,name:t,links:r})=>({id:e,name:t,mobile:r,links:r}))):a?.map((({id:e,name:t,links:r})=>({id:e,name:t,desktop:r,links:r}))))?t:[]},recentWallet:()=>Uw.getRecentWallet(),recomendedWallets(e=!1){var t;let r=e||null==(t=Gv.recentWallet())?void 0:t.id,{recomendedWallets:i}=cf.state;return i.filter((e=>r!==e.id))}},Zv={onConnecting(e){Uw.goToConnectingView(e)},manualWalletsTemplate(){return Gv.manualWallets().map((e=>pg`<wcm-wallet-button walletId="${e.id}" name="${e.name}" .onClick="${()=>this.onConnecting(e)}"></wcm-wallet-button>`))},recomendedWalletsTemplate(e=!1){return Gv.recomendedWallets(e).map((e=>pg`<wcm-wallet-button name="${e.name}" walletId="${e.id}" imageId="${e.image_id}" .onClick="${()=>this.onConnecting(e)}"></wcm-wallet-button>`))},recentWalletTemplate(){let e=Gv.recentWallet();if(e)return pg`<wcm-wallet-button name="${e.name}" walletId="${e.id}" imageId="${fy(e.image_id)}" .recent="${!0}" .onClick="${()=>this.onConnecting(e)}"></wcm-wallet-button>`}},Kv=If`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`,Yv=Object.defineProperty,Jv=Object.getOwnPropertyDescriptor,Qv=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?Jv(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&Yv(t,r,o),o},(Xv=class extends Ng{render(){let{explorerExcludedWalletIds:e,enableExplorer:t}=Hp.state,r="ALL"!==e&&t,i=Zv.manualWalletsTemplate(),n=Zv.recomendedWalletsTemplate(),o=[Zv.recentWalletTemplate(),...i,...n];o=o.filter(Boolean);let a=o.length>4||r,s=[];s=a?o.slice(0,3):o;let c=!!s.length;return pg`<wcm-modal-header .border="${!0}" title="Connect your wallet" .onAction="${Uw.handleUriCopy}" .actionIcon="${ww.COPY_ICON}"></wcm-modal-header><wcm-modal-content><div class="wcm-mobile-title"><div class="wcm-subtitle">${ww.MOBILE_ICON}<wcm-text variant="small-regular" color="accent">Mobile</wcm-text></div><div class="wcm-subtitle">${ww.SCAN_ICON}<wcm-text variant="small-regular" color="secondary">Scan with your wallet</wcm-text></div></div><wcm-walletconnect-qr></wcm-walletconnect-qr></wcm-modal-content>${c?pg`<wcm-modal-footer><div class="wcm-desktop-title">${ww.DESKTOP_ICON}<wcm-text variant="small-regular" color="accent">Desktop</wcm-text></div><div class="wcm-grid">${s} ${a?pg`<wcm-view-all-wallets-button></wcm-view-all-wallets-button>`:null}</div></wcm-modal-footer>`:null}`}}).styles=[iw.globalCss,Kv],Xv=Qv([$g("wcm-desktop-wallet-selection")],Xv),e_=If`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`,t_=Object.defineProperty,r_=Object.getOwnPropertyDescriptor,i_=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?r_(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&t_(t,r,o),o},(n_=class extends Ng{render(){let{termsOfServiceUrl:e,privacyPolicyUrl:t}=Hp.state;return e??t?pg`<div><wcm-text variant="small-regular" color="secondary">By connecting your wallet to this app, you agree to the app's ${e?pg`<a href="${e}" target="_blank" rel="noopener noreferrer">Terms of Service</a>`:null} ${e&&t?"and":null} ${t?pg`<a href="${t}" target="_blank" rel="noopener noreferrer">Privacy Policy</a>`:null}</wcm-text></div>`:null}}).styles=[iw.globalCss,e_],n_=i_([$g("wcm-legal-notice")],n_),o_=If`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`,a_=Object.defineProperty,s_=Object.getOwnPropertyDescriptor,c_=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?s_(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&a_(t,r,o),o},(l_=class extends Ng{onQrcode(){Mp.push("Qrcode")}render(){let{explorerExcludedWalletIds:e,enableExplorer:t}=Hp.state,r="ALL"!==e&&t,i=Zv.manualWalletsTemplate(),n=Zv.recomendedWalletsTemplate(),o=[Zv.recentWalletTemplate(),...i,...n];o=o.filter(Boolean);let a=o.length>8||r,s=[];s=a?o.slice(0,7):o;let c=!!s.length;return pg`<wcm-modal-header title="Connect your wallet" .onAction="${this.onQrcode}" .actionIcon="${ww.QRCODE_ICON}"></wcm-modal-header>${c?pg`<wcm-modal-content><div>${s} ${a?pg`<wcm-view-all-wallets-button></wcm-view-all-wallets-button>`:null}</div></wcm-modal-content>`:null}`}}).styles=[iw.globalCss,o_],l_=c_([$g("wcm-mobile-wallet-selection")],l_),u_=If`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`,d_=Object.defineProperty,h_=Object.getOwnPropertyDescriptor,p_=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?h_(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&d_(t,r,o),o},(f_=class extends Ng{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=uf.subscribe((e=>{e.open?this.onOpenModalEvent():this.onCloseModalEvent()}))}disconnectedCallback(){var e;null==(e=this.unsubscribeModal)||e.call(this)}get overlayEl(){return Uw.getShadowRootElement(this,".wcm-overlay")}get containerEl(){return Uw.getShadowRootElement(this,".wcm-container")}toggleBodyScroll(e){document.querySelector("body")&&(e?document.getElementById("wcm-styles")?.remove():document.head.insertAdjacentHTML("beforeend",'<style id="wcm-styles">html,body{touch-action:none;overflow:hidden;overscroll-behavior:contain;}</style>'))}onCloseModal(e){e.target===e.currentTarget&&uf.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout((async()=>{let e=Uw.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]};await Promise.all([py(this.overlayEl,{opacity:[0,1]},{delay:.1,duration:.2}).finished,py(this.containerEl,e,{delay:.1,duration:.2}).finished]),this.active=!0}),0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();let e=Uw.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]};await Promise.all([py(this.overlayEl,{opacity:[1,0]},{duration:.2}).finished,py(this.containerEl,e,{duration:.2}).finished]),this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",(e=>{var t;"Escape"===e.key?uf.close():"Tab"===e.key&&(null!=(t=e.target)&&t.tagName.includes("wcm-")||this.containerEl.focus())}),this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var e;null==(e=this.abortController)||e.abort(),this.abortController=void 0}render(){let e={"wcm-overlay":!0,"wcm-active":this.active};return pg`<wcm-explorer-context></wcm-explorer-context><wcm-theme-context></wcm-theme-context><div id="wcm-modal" class="${Yg(e)}" @click="${this.onCloseModal}" role="alertdialog" aria-modal="true"><div class="wcm-container" tabindex="0">${this.open?pg`<wcm-modal-backcard></wcm-modal-backcard><div class="wcm-card"><wcm-modal-router></wcm-modal-router><wcm-modal-toast></wcm-modal-toast></div>`:null}</div></div>`}}).styles=[iw.globalCss,u_],p_([Wg()],f_.prototype,"open",2),p_([Wg()],f_.prototype,"active",2),f_=p_([$g("wcm-modal")],f_),g_=If`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`,m_=Object.defineProperty,b_=Object.getOwnPropertyDescriptor,y_=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?b_(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&m_(t,r,o),o},w_=class extends Ng{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){$p.isMobile()?Mp.replace("MobileConnecting"):Mp.replace("MobileQrcodeConnecting")}onDesktop(){Mp.replace("DesktopConnecting")}onWeb(){Mp.replace("WebConnecting")}render(){return pg`<div>${this.isRetry?pg`<slot></slot>`:null} ${this.isMobile?pg`<wcm-button .onClick="${this.onMobile}" .iconLeft="${ww.MOBILE_ICON}" variant="outline">Mobile</wcm-button>`:null} ${this.isDesktop?pg`<wcm-button .onClick="${this.onDesktop}" .iconLeft="${ww.DESKTOP_ICON}" variant="outline">Desktop</wcm-button>`:null} ${this.isWeb?pg`<wcm-button .onClick="${this.onWeb}" .iconLeft="${ww.GLOBE_ICON}" variant="outline">Web</wcm-button>`:null}</div>`}},w_.styles=[iw.globalCss,g_],y_([Fg({type:Boolean})],w_.prototype,"isMobile",2),y_([Fg({type:Boolean})],w_.prototype,"isDesktop",2),y_([Fg({type:Boolean})],w_.prototype,"isWeb",2),y_([Fg({type:Boolean})],w_.prototype,"isRetry",2),w_=y_([$g("wcm-platform-selection")],w_),v_=If`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`,__=Object.defineProperty,x_=Object.getOwnPropertyDescriptor,E_=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?x_(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&__(t,r,o),o},(C_=class extends Ng{onClick(){Mp.push("WalletExplorer")}render(){let{recomendedWallets:e}=cf.state,t=[...e,...Gv.manualWallets()].reverse().slice(0,4);return pg`<button @click="${this.onClick}"><div class="wcm-icons">${t.map((e=>{let t=Uw.getWalletIcon(e);if(t)return pg`<img crossorigin="anonymous" src="${t}">`;let r=Uw.getWalletIcon({id:e.id});return r?pg`<img crossorigin="anonymous" src="${r}">`:ww.WALLET_PLACEHOLDER}))} ${[...Array(4-t.length)].map((()=>ww.WALLET_PLACEHOLDER))}</div><wcm-text variant="xsmall-regular">View All</wcm-text></button>`}}).styles=[iw.globalCss,v_],C_=E_([$g("wcm-view-all-wallets-button")],C_),k_=If`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`,P_=Object.defineProperty,I_=Object.getOwnPropertyDescriptor,S_=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?I_(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&P_(t,r,o),o},(A_=class extends Ng{constructor(){super(),this.walletId="",this.imageId="",this.uri="",setTimeout((()=>{let{walletConnectUri:e}=Up.state;this.uri=e}),0)}get overlayEl(){return Uw.getShadowRootElement(this,".wcm-qr-container")}render(){return pg`<div class="wcm-qr-container">${this.uri?pg`<wcm-qrcode size="${this.overlayEl.offsetWidth}" uri="${this.uri}" walletId="${fy(this.walletId)}" imageId="${fy(this.imageId)}"></wcm-qrcode>`:pg`<wcm-spinner></wcm-spinner>`}</div>`}}).styles=[iw.globalCss,k_],S_([Fg()],A_.prototype,"walletId",2),S_([Fg()],A_.prototype,"imageId",2),S_([Wg()],A_.prototype,"uri",2),A_=S_([$g("wcm-walletconnect-qr")],A_),T_=Object.defineProperty,O_=Object.getOwnPropertyDescriptor,R_=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?O_(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&T_(t,r,o),o},(N_=class extends Ng{viewTemplate(){return $p.isAndroid()?pg`<wcm-android-wallet-selection></wcm-android-wallet-selection>`:$p.isMobile()?pg`<wcm-mobile-wallet-selection></wcm-mobile-wallet-selection>`:pg`<wcm-desktop-wallet-selection></wcm-desktop-wallet-selection>`}render(){return pg`${this.viewTemplate()}<wcm-legal-notice></wcm-legal-notice>`}}).styles=[iw.globalCss],N_=R_([$g("wcm-connect-wallet-view")],N_),M_=If`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`,$_=Object.defineProperty,j_=Object.getOwnPropertyDescriptor,L_=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?j_(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&$_(t,r,o),o},(B_=class extends Ng{constructor(){super(),this.isError=!1,this.openDesktopApp()}onFormatAndRedirect(e){let{desktop:t,name:r}=$p.getWalletRouterData(),i=t?.native;if(i){let t=$p.formatNativeUrl(i,e,r);$p.openHref(t,"_self")}}openDesktopApp(){let{walletConnectUri:e}=Up.state,t=$p.getWalletRouterData();Uw.setRecentWallet(t),e&&this.onFormatAndRedirect(e)}render(){let{name:e,id:t,image_id:r}=$p.getWalletRouterData(),{isMobile:i,isWeb:n}=Uw.getCachedRouterWalletPlatforms();return pg`<wcm-modal-header title="${e}" .onAction="${Uw.handleUriCopy}" .actionIcon="${ww.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${fy(r)}" label="${`Continue in ${e}...`}" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Connection can continue loading if ${e} is not installed on your device`}</wcm-text><wcm-platform-selection .isMobile="${i}" .isWeb="${n}" .isRetry="${!0}"><wcm-button .onClick="${this.openDesktopApp.bind(this)}" .iconRight="${ww.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection></wcm-info-footer>`}}).styles=[iw.globalCss,M_],L_([Wg()],B_.prototype,"isError",2),B_=L_([$g("wcm-desktop-connecting-view")],B_),D_=If`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`,U_=Object.defineProperty,F_=Object.getOwnPropertyDescriptor,H_=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?F_(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&U_(t,r,o),o},(z_=class extends Ng{onInstall(e){e&&$p.openHref(e,"_blank")}render(){let{name:e,id:t,image_id:r,homepage:i}=$p.getWalletRouterData();return pg`<wcm-modal-header title="${e}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${fy(r)}" label="Not Detected" .isStale="${!0}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Download ${e} to continue. If multiple browser extensions are installed, disable non ${e} ones and try again`}</wcm-text><wcm-button .onClick="${()=>this.onInstall(i)}" .iconLeft="${ww.ARROW_DOWN_ICON}">Download</wcm-button></wcm-info-footer>`}}).styles=[iw.globalCss,D_],z_=H_([$g("wcm-install-wallet-view")],z_),q_=If`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`,W_=Object.defineProperty,V_=Object.getOwnPropertyDescriptor,G_=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?V_(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&W_(t,r,o),o},(Z_=class extends Ng{constructor(){super(),this.isError=!1,this.openMobileApp()}onFormatAndRedirect(e,t=!1){let{mobile:r,name:i}=$p.getWalletRouterData(),n=r?.native,o=r?.universal;if(n&&!t){let t=$p.formatNativeUrl(n,e,i);$p.openHref(t,"_self")}else if(o){let t=$p.formatUniversalUrl(o,e,i);$p.openHref(t,"_self")}}openMobileApp(e=!1){let{walletConnectUri:t}=Up.state,r=$p.getWalletRouterData();Uw.setRecentWallet(r),t&&this.onFormatAndRedirect(t,e)}onGoToAppStore(e){e&&$p.openHref(e,"_blank")}render(){let{name:e,id:t,image_id:r,app:i,mobile:n}=$p.getWalletRouterData(),{isWeb:o}=Uw.getCachedRouterWalletPlatforms(),a=i?.ios,s=n?.universal;return pg`<wcm-modal-header title="${e}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${fy(r)}" label="Tap 'Open' to continue…" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer class="wcm-note"><wcm-platform-selection .isWeb="${o}" .isRetry="${!0}"><wcm-button .onClick="${()=>this.openMobileApp(!1)}" .iconRight="${ww.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection>${s?pg`<wcm-text color="secondary" variant="small-thin">Still doesn't work? <span tabindex="0" @click="${()=>this.openMobileApp(!0)}">Try this alternate link</span></wcm-text>`:null}</wcm-info-footer><wcm-info-footer class="wcm-app-store"><div><wcm-wallet-image walletId="${t}" imageId="${fy(r)}"></wcm-wallet-image><wcm-text>${`Get ${e}`}</wcm-text></div><wcm-button .iconRight="${ww.ARROW_RIGHT_ICON}" .onClick="${()=>this.onGoToAppStore(a)}" variant="ghost">App Store</wcm-button></wcm-info-footer>`}}).styles=[iw.globalCss,q_],G_([Wg()],Z_.prototype,"isError",2),Z_=G_([$g("wcm-mobile-connecting-view")],Z_),K_=If`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`,Y_=Object.defineProperty,J_=Object.getOwnPropertyDescriptor,Q_=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?J_(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&Y_(t,r,o),o},(X_=class extends Ng{render(){let{name:e,id:t,image_id:r}=$p.getWalletRouterData(),{isDesktop:i,isWeb:n}=Uw.getCachedRouterWalletPlatforms();return pg`<wcm-modal-header title="${e}" .onAction="${Uw.handleUriCopy}" .actionIcon="${ww.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-walletconnect-qr walletId="${t}" imageId="${fy(r)}"></wcm-walletconnect-qr></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Scan this QR Code with your phone's camera or inside ${e} app`}</wcm-text><wcm-platform-selection .isDesktop="${i}" .isWeb="${n}"></wcm-platform-selection></wcm-info-footer>`}}).styles=[iw.globalCss,K_],X_=Q_([$g("wcm-mobile-qr-connecting-view")],X_),ex=Object.defineProperty,tx=Object.getOwnPropertyDescriptor,rx=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?tx(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&ex(t,r,o),o},(ix=class extends Ng{render(){return pg`<wcm-modal-header title="Scan the code" .onAction="${Uw.handleUriCopy}" .actionIcon="${ww.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-walletconnect-qr></wcm-walletconnect-qr></wcm-modal-content>`}}).styles=[iw.globalCss],ix=rx([$g("wcm-qrcode-view")],ix),nx=If`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`,ox=Object.defineProperty,ax=Object.getOwnPropertyDescriptor,sx=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?ax(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&ox(t,r,o),o},40,cx=class extends Ng{constructor(){super(...arguments),this.loading=!cf.state.wallets.listings.length,this.firstFetch=!cf.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=Uw.debounce((e=>{e.length>=1?(this.firstFetch=!0,this.endReached=!1,this.search=e,cf.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),cf.resetSearch())}))}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var e;null==(e=this.intersectionObserver)||e.disconnect()}get placeholderEl(){return Uw.getShadowRootElement(this,".wcm-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver((([e])=>{e.isIntersecting&&(!this.search||!this.firstFetch)&&this.fetchWallets()})),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){let{wallets:e,search:t}=cf.state,{listings:r,total:i}=this.search?t:e;return i<=40||r.length>=i}async fetchWallets(){var e;let{wallets:t,search:r}=cf.state,{listings:i,total:n,page:o}=this.search?r:t;if(!this.endReached&&(this.firstFetch||n>40&&i.length<n))try{this.loading=!0;let t=null==(e=Up.state.chains)?void 0:e.join(","),{listings:r}=await cf.getWallets({page:this.firstFetch?1:o+1,entries:40,search:this.search,version:2,chains:t}),i=r.map((e=>Uw.getWalletIcon(e)));await Promise.all([...i.map((async e=>Uw.preloadImage(e))),$p.wait(300)]),this.endReached=this.isLastPage()}catch(e){console.error(e),vf.openToast(Uw.getErrorMessage(e),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(e){$p.isAndroid()?Uw.handleMobileLinking(e):Uw.goToConnectingView(e)}onSearchChange(e){let{value:t}=e.target;this.searchDebounce(t)}render(){let{wallets:e,search:t}=cf.state,{listings:r}=this.search?t:e,i=this.loading&&!r.length,n=this.search.length>=3,o=Zv.manualWalletsTemplate(),a=Zv.recomendedWalletsTemplate(!0);n&&(o=o.filter((({values:e})=>Uw.caseSafeIncludes(e[0],this.search))),a=a.filter((({values:e})=>Uw.caseSafeIncludes(e[0],this.search))));let s=!this.loading&&!r.length&&!a.length,c={"wcm-loading":i,"wcm-end-reached":this.endReached||!this.loading,"wcm-empty":s};return pg`<wcm-modal-header><wcm-search-input .onChange="${this.onSearchChange.bind(this)}"></wcm-search-input></wcm-modal-header><wcm-modal-content class="${Yg(c)}"><div class="wcm-grid">${i?null:o} ${i?null:a} ${i?null:r.map((e=>pg`${e?pg`<wcm-wallet-button imageId="${e.image_id}" name="${e.name}" walletId="${e.id}" .onClick="${()=>this.onConnect(e)}"></wcm-wallet-button>`:null}`))}</div><div class="wcm-placeholder-block">${s?pg`<wcm-text variant="big-bold" color="secondary">No results found</wcm-text>`:null} ${!s&&this.loading?pg`<wcm-spinner></wcm-spinner>`:null}</div></wcm-modal-content>`}},cx.styles=[iw.globalCss,nx],sx([Wg()],cx.prototype,"loading",2),sx([Wg()],cx.prototype,"firstFetch",2),sx([Wg()],cx.prototype,"search",2),sx([Wg()],cx.prototype,"endReached",2),cx=sx([$g("wcm-wallet-explorer-view")],cx),lx=If`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`,ux=Object.defineProperty,dx=Object.getOwnPropertyDescriptor,hx=(e,t,r,i)=>{for(var n,o=i>1?void 0:i?dx(t,r):t,a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i?n(t,r,o):n(o))||o);return i&&o&&ux(t,r,o),o},(px=class extends Ng{constructor(){super(),this.isError=!1,this.openWebWallet()}onFormatAndRedirect(e){let{desktop:t,name:r}=$p.getWalletRouterData(),i=t?.universal;if(i){let t=$p.formatUniversalUrl(i,e,r);$p.openHref(t,"_blank")}}openWebWallet(){let{walletConnectUri:e}=Up.state,t=$p.getWalletRouterData();Uw.setRecentWallet(t),e&&this.onFormatAndRedirect(e)}render(){let{name:e,id:t,image_id:r}=$p.getWalletRouterData(),{isMobile:i,isDesktop:n}=Uw.getCachedRouterWalletPlatforms(),o=$p.isMobile();return pg`<wcm-modal-header title="${e}" .onAction="${Uw.handleUriCopy}" .actionIcon="${ww.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${fy(r)}" label="${`Continue in ${e}...`}" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`${e} web app has opened in a new tab. Go there, accept the connection, and come back`}</wcm-text><wcm-platform-selection .isMobile="${i}" .isDesktop="${!o&&n}" .isRetry="${!0}"><wcm-button .onClick="${this.openWebWallet.bind(this)}" .iconRight="${ww.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection></wcm-info-footer>`}}).styles=[iw.globalCss,lx],hx([Wg()],px.prototype,"isError",2),px=hx([$g("wcm-web-connecting-view")],px)})),gx={};c(gx,{WalletConnectModal:()=>mx});var mx,bx=a((()=>{Uf(),mx=class{constructor(e){this.openModal=uf.open,this.closeModal=uf.close,this.subscribeModal=uf.subscribe,this.setTheme=yf.setThemeConfig,yf.setThemeConfig(e),Hp.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then((()=>(fx(),Zy)));let e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),Up.setIsUiLoaded(!0)}}}})),yx={};function wx(e){return Number(e[0].split(":")[1])}function vx(e){return`0x${e.toString(16)}`}c(yx,{EthereumProvider:()=>jx,OPTIONAL_EVENTS:()=>kx,OPTIONAL_METHODS:()=>Ex,REQUIRED_EVENTS:()=>Cx,REQUIRED_METHODS:()=>xx,default:()=>$x});var _x,xx,Ex,Cx,kx,Px,Ix,Sx,Ax,Tx,Ox,Rx,Nx,Mx,$x,jx,Lx,Bx,Dx,Ux,Fx=a((()=>{_x=d(p()),po(),wp(),"wc","ethereum_provider","wc@2:ethereum_provider:","https://rpc.walletconnect.com/v1/",xx=["eth_sendTransaction","personal_sign"],Ex=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],Cx=["chainChanged","accountsChanged"],kx=["chainChanged","accountsChanged","message","disconnect","connect"],Px=Object.defineProperty,Ix=Object.defineProperties,Sx=Object.getOwnPropertyDescriptors,Ax=Object.getOwnPropertySymbols,Tx=Object.prototype.hasOwnProperty,Ox=Object.prototype.propertyIsEnumerable,Rx=(e,t,r)=>t in e?Px(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Nx=(e,t)=>{for(var r in t||(t={}))Tx.call(t,r)&&Rx(e,r,t[r]);if(Ax)for(var r of Ax(t))Ox.call(t,r)&&Rx(e,r,t[r]);return e},Mx=(e,t)=>Ix(e,Sx(t)),jx=$x=class e{constructor(){this.events=new _x.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(t){let r=new e;return await r.initialize(t),r}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,r){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),r)}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);let{required:t,optional:r}=function(e){let{chains:t,optionalChains:r,methods:i,optionalMethods:n,events:o,optionalEvents:a,rpcMap:s}=e;if(!rn(t))throw new Error("Invalid chains");let c={chains:t,methods:i||xx,events:o||Cx,rpcMap:Nx({},t.length?{[wx(t)]:s[wx(t)]}:{})},l=o?.filter((e=>!Cx.includes(e))),u=i?.filter((e=>!xx.includes(e)));if(!(r||a||n||null!=l&&l.length||null!=u&&u.length))return{required:t.length?c:void 0};let d={chains:[...new Set(l?.length&&u?.length||!r?c.chains.concat(r||[]):r)],methods:[...new Set(c.methods.concat(null!=n&&n.length?n:Ex))],events:[...new Set(c.events.concat(null!=a&&a.length?a:kx))],rpcMap:s};return{required:t.length?c:void 0,optional:r.length?d:void 0}}(this.rpc);try{let i=await new Promise((async(i,n)=>{var o;this.rpc.showQrModal&&(null==(o=this.modal)||o.subscribeModal((e=>{!e.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),n(new Error("Connection request reset. Please try again.")))}))),await this.signer.connect(Mx(Nx({namespaces:Nx({},t&&{[this.namespace]:t})},r&&{optionalNamespaces:{[this.namespace]:r}}),{pairingTopic:e?.pairingTopic})).then((e=>{i(e)})).catch((e=>{n(new Error(e.message))}))}));if(!i)return;let n=function(e,t=[]){let r=[];return Object.keys(e).forEach((i=>{if(t.length&&!t.includes(i))return;let n=e[i];r.push(...n.accounts)})),r}(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:n),this.setAccounts(n),this.events.emit("connect",{chainId:vx(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",(e=>{let{params:t}=e,{event:r}=t;"accountsChanged"===r.name?(this.accounts=this.parseAccounts(r.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===r.name?this.setChainId(this.formatChainId(r.data)):this.events.emit(r.name,r.data),this.events.emit("session_event",e)})),this.signer.on("chainChanged",(e=>{let t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",vx(this.chainId)),this.persist()})),this.signer.on("session_update",(e=>{this.events.emit("session_update",e)})),this.signer.on("session_delete",(e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Mx(Nx({},tn("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(e=>{var t,r;this.rpc.showQrModal&&(null==(t=this.modal)||t.closeModal(),null==(r=this.modal)||r.openModal({uri:e})),this.events.emit("display_uri",e)}))}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith(`${this.namespace}:`)}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){let t=e.filter((e=>this.isCompatibleChainId(e))).map((e=>this.parseChainId(e)));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",vx(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){let t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){let[t,r,i]=e.split(":");return{chainId:`${t}:${r}`,address:i}}setAccounts(e){this.accounts=e.filter((e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId)).map((e=>this.parseAccountId(e).address)),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,r;let i=null!=(t=e?.chains)?t:[],n=null!=(r=e?.optionalChains)?r:[],o=i.concat(n);if(!o.length)throw new Error("No chains specified in either `chains` or `optionalChains`");let a=i.length?e?.methods||xx:[],s=i.length?e?.events||Cx:[],c=e?.optionalMethods||[],l=e?.optionalEvents||[],u=e?.rpcMap||this.buildRpcMap(o,e.projectId),d=e?.qrModalOptions||void 0;return{chains:i?.map((e=>this.formatChainId(e))),optionalChains:n.map((e=>this.formatChainId(e))),methods:a,events:s,optionalMethods:c,optionalEvents:l,rpcMap:u,showQrModal:!(null==e||!e.showQrModal),qrModalOptions:d,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){let r={};return e.forEach((e=>{r[e]=this.getRpcUrl(e,t)})),r}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?wx(this.rpc.chains):wx(this.rpc.optionalChains),this.signer=await hp.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let e;try{let{WalletConnectModal:t}=await Promise.resolve().then((()=>(bx(),gx)));e=t}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(e)try{this.modal=new e(Nx({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(e){throw this.signer.logger.error(e),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;let{chains:t,optionalChains:r,rpcMap:i}=e;t&&rn(t)&&(this.rpc.chains=t.map((e=>this.formatChainId(e))),t.forEach((e=>{this.rpc.rpcMap[e]=i?.[e]||this.getRpcUrl(e)}))),r&&rn(r)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=r?.map((e=>this.formatChainId(e))),r.forEach((e=>{this.rpc.rpcMap[e]=i?.[e]||this.getRpcUrl(e)})))}getRpcUrl(e,t){var r;return(null==(r=this.rpc.rpcMap)?void 0:r[e])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;let e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t?.accounts),this.setAccounts(t?.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map((e=>this.parseAccount(e)))}}})),Hx=a((()=>{Lx="2.9.31"})),zx=a((()=>{Hx(),Bx=e=>e,Dx=e=>e,Ux=()=>`viem@${Lx}`}));function qx(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e?qx(e.cause,t):t?null:e}var Wx,Vx,Gx,Zx,Kx,Yx,Jx,Qx=a((()=>{zx(),Wx=class e extends Error{constructor(t,r={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:Ux()});let i=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,n=r.cause instanceof e&&r.cause.docsPath||r.docsPath;this.message=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...n?[`Docs: https://viem.sh${n}${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...i?[`Details: ${i}`]:[],`Version: ${this.version}`].join("\n    "),r.cause&&(this.cause=r.cause),this.details=i,this.docsPath=n,this.metaMessages=r.metaMessages,this.shortMessage=t}walk(e){return qx(this,e)}}})),Xx=a((()=>{Qx(),Vx=class extends Wx{constructor({max:e,min:t,signed:r,size:i,value:n}){super(`Number "${n}" is not in safe ${i?`${8*i}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}},Gx=class extends Wx{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesBooleanError"})}},Zx=class extends Wx{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}})),eE=a((()=>{Qx(),Kx=class extends Wx{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}},Yx=class extends Wx{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}},Jx=class extends Wx{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${t} ${r} long, but is ${e} ${r} long.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesLengthError"})}}}));function tE(e,{dir:t,size:r=32}={}){return"string"==typeof e?rE(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new Yx({size:e.length,targetSize:r,type:"bytes"});let i=new Uint8Array(r);for(let n=0;n<r;n++){let o="right"===t;i[o?n:r-n-1]=e[o?n:e.length-n-1]}return i}(e,{dir:t,size:r})}function rE(e,{dir:t,size:r=32}={}){if(null===r)return e;let i=e.replace("0x","");if(i.length>2*r)throw new Yx({size:Math.ceil(i.length/2),targetSize:r,type:"hex"});return`0x${i["right"===t?"padEnd":"padStart"](2*r,"0")}`}var iE=a((()=>{eE()}));function nE(e,{strict:t=!0}={}){return!(!e||"string"!=typeof e)&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}var oE=a((()=>{}));function aE(e){return nE(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}var sE=a((()=>{oE()}));function cE(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,i=0;for(let e=0;e<r.length-1&&"0"===r["left"===t?e:r.length-e-1].toString();e++)i++;return r="left"===t?r.slice(i):r.slice(0,r.length-i),"string"==typeof e?(1===r.length&&"right"===t&&(r=`${r}0`),`0x${r.length%2==1?`0${r}`:r}`):r}var lE=a((()=>{}));function uE(e,t={}){return"number"==typeof e||"bigint"==typeof e?function(e,t){let r=kE(e,t);return hE(r)}(e,t):"boolean"==typeof e?function(e,t={}){let r=new Uint8Array(1);return r[0]=Number(e),"number"==typeof t.size?(bE(r,{size:t.size}),tE(r,{size:t.size})):r}(e,t):nE(e)?hE(e,t):pE(e,t)}function dE(e){return e>=gE.zero&&e<=gE.nine?e-gE.zero:e>=gE.A&&e<=gE.F?e-(gE.A-10):e>=gE.a&&e<=gE.f?e-(gE.a-10):void 0}function hE(e,t={}){let r=e;t.size&&(bE(r,{size:t.size}),r=tE(r,{dir:"right",size:t.size}));let i=r.slice(2);i.length%2&&(i=`0${i}`);let n=i.length/2,o=new Uint8Array(n);for(let e=0,t=0;e<n;e++){let r=dE(i.charCodeAt(t++)),n=dE(i.charCodeAt(t++));if(void 0===r||void 0===n)throw new Wx(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);o[e]=16*r+n}return o}function pE(e,t={}){let r=fE.encode(e);return"number"==typeof t.size?(bE(r,{size:t.size}),tE(r,{dir:"right",size:t.size})):r}var fE,gE,mE=a((()=>{Qx(),oE(),iE(),_E(),AE(),fE=new TextEncoder,gE={zero:48,nine:57,A:65,F:70,a:97,f:102}}));function bE(e,{size:t}){if(aE(e)>t)throw new Zx({givenSize:aE(e),maxSize:t})}function yE(e,t={}){let{signed:r}=t;t.size&&bE(e,{size:t.size});let i=BigInt(e);if(!r)return i;let n=(e.length-2)/2;return i<=(1n<<8n*BigInt(n)-1n)-1n?i:i-BigInt(`0x${"f".padStart(2*n,"f")}`)-1n}function wE(e,t={}){return Number(yE(e,t))}function vE(e,t={}){let r=hE(e);return t.size&&(bE(r,{size:t.size}),r=cE(r,{dir:"right"})),(new TextDecoder).decode(r)}var _E=a((()=>{Xx(),sE(),lE(),mE()}));function xE(e,t={}){return"number"==typeof e||"bigint"==typeof e?kE(e,t):"string"==typeof e?PE(e,t):"boolean"==typeof e?EE(e,t):CE(e,t)}function EE(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?(bE(r,{size:t.size}),tE(r,{size:t.size})):r}function CE(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=IE[e[t]];let i=`0x${r}`;return"number"==typeof t.size?(bE(i,{size:t.size}),tE(i,{dir:"right",size:t.size})):i}function kE(e,t={}){let r,{signed:i,size:n}=t,o=BigInt(e);n?r=i?(1n<<8n*BigInt(n)-1n)-1n:2n**(8n*BigInt(n))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));let a="bigint"==typeof r&&i?-r-1n:0;if(r&&o>r||o<a){let t="bigint"==typeof e?"n":"";throw new Vx({max:r?`${r}${t}`:void 0,min:`${a}${t}`,signed:i,size:n,value:`${e}${t}`})}let s=`0x${(i&&o<0?(1n<<BigInt(8*n))+BigInt(o):o).toString(16)}`;return n?tE(s,{size:n}):s}function PE(e,t={}){return CE(SE.encode(e),t)}var IE,SE,AE=a((()=>{Xx(),iE(),_E(),IE=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0"))),SE=new TextEncoder}));function TE(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new qE(e.type);return`${e.name}(${OE(e.inputs,{includeName:t})})`}function OE(e,{includeName:t=!1}={}){return e?e.map((e=>function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${OE(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t}))).join(t?", ":","):""}var RE,NE,ME,$E,jE,LE,BE,DE,UE,FE,HE,zE,qE,WE=a((()=>{VE()})),VE=a((()=>{WE(),sE(),Qx(),RE=class extends Wx{constructor({data:e,params:t,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join("\n    "),{metaMessages:[`Params: (${OE(t,{includeName:!0})})`,`Data:   ${e} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=r}},NE=class extends Wx{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}},ME=class extends Wx{constructor({expectedLength:e,givenLength:t,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n    ")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}},$E=class extends Wx{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${aE(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}},jE=class extends Wx{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n    ")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}},LE=class extends Wx{constructor(e,{docsPath:t}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n    "),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}},BE=class extends Wx{constructor(e,{docsPath:t}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n    "),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}},DE=class extends Wx{constructor(e,{docsPath:t}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join("\n    "),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}},UE=class extends Wx{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${TE(e.abiItem)}\`, and`,`\`${t.type}\` in \`${TE(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItemAmbiguityError"})}},FE=class extends Wx{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n    "),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}},HE=class extends Wx{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join("\n    "),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}},zE=class extends Wx{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n    ")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}},qE=class extends Wx{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n    ")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}}));function GE(e){return"string"==typeof e[0]?ZE(e):function(e){let t=0;for(let r of e)t+=r.length;let r=new Uint8Array(t),i=0;for(let t of e)r.set(t,i),i+=t.length;return r}(e)}function ZE(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}var KE,YE,JE=a((()=>{})),QE=a((()=>{Qx(),KE=class extends Wx{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}})),XE=a((()=>{YE=class extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}set(e,t){return super.set(e,t),this.maxSize&&this.size>this.maxSize&&this.delete(this.keys().next().value),this}}}));function eC(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function tC(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function rC(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function iC(e,t){tC(e);let r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}var nC=a((()=>{}));function oC(e,t=!1){return t?{h:Number(e&aC),l:Number(e>>sC&aC)}:{h:0|Number(e>>sC&aC),l:0|Number(e&aC)}}var aC,sC,cC,lC,uC,dC,hC=a((()=>{aC=BigInt(4294967295),sC=BigInt(32),cC=(e,t,r)=>e<<r|t>>>32-r,lC=(e,t,r)=>t<<r|e>>>32-r,uC=(e,t,r)=>t<<r-32|e>>>64-r,dC=(e,t,r)=>e<<r-32|t>>>64-r}));function pC(e){if("string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!gC(e))throw new Error("expected Uint8Array, got "+typeof e);return e}function fC(e){let t=t=>e().update(pC(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}var gC,mC,bC,yC,wC,vC=a((()=>{if(gC=e=>e instanceof Uint8Array,mC=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),bC=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),yC=(e,t)=>e<<32-t|e>>>t,!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");wC=class{clone(){return this._cloneInto()}},{}.toString}));var _C,xC,EC,CC,kC,PC,IC,SC,AC,TC,OC,RC,NC,MC,$C,jC,LC,BC=a((()=>{nC(),hC(),vC(),[_C,xC,EC]=[[],[],[]],CC=BigInt(0),kC=BigInt(1),PC=BigInt(2),IC=BigInt(7),SC=BigInt(256),AC=BigInt(113);for(let e=0,t=kC,r=1,i=0;e<24;e++){[r,i]=[i,(2*r+3*i)%5],_C.push(2*(5*i+r)),xC.push((e+1)*(e+2)/2%64);let n=CC;for(let e=0;e<7;e++)t=(t<<kC^(t>>IC)*AC)%SC,t&PC&&(n^=kC<<(kC<<BigInt(e))-kC);EC.push(n)}[TC,OC]=function(e,t=!1){let r=new Uint32Array(e.length),i=new Uint32Array(e.length);for(let n=0;n<e.length;n++){let{h:o,l:a}=oC(e[n],t);[r[n],i[n]]=[o,a]}return[r,i]}(EC,!0),RC=(e,t,r)=>r>32?uC(e,t,r):cC(e,t,r),NC=(e,t,r)=>r>32?dC(e,t,r):lC(e,t,r),MC=class e extends wC{constructor(e,t,r,i=!1,n=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=n,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,eC(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=mC(this.state)}keccak(){(function(e,t=24){let r=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let i=(t+8)%10,n=(t+2)%10,o=r[n],a=r[n+1],s=RC(o,a,1)^r[i],c=NC(o,a,1)^r[i+1];for(let r=0;r<50;r+=10)e[t+r]^=s,e[t+r+1]^=c}let t=e[2],n=e[3];for(let r=0;r<24;r++){let i=xC[r],o=RC(t,n,i),a=NC(t,n,i),s=_C[r];t=e[s],n=e[s+1],e[s]=o,e[s+1]=a}for(let t=0;t<50;t+=10){for(let i=0;i<10;i++)r[i]=e[t+i];for(let i=0;i<10;i++)e[t+i]^=~r[(i+2)%10]&r[(i+4)%10]}e[0]^=TC[i],e[1]^=OC[i]}r.fill(0)})(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){rC(this);let{blockLen:t,state:r}=this,i=(e=pC(e)).length;for(let n=0;n<i;){let o=Math.min(t-this.pos,i-n);for(let t=0;t<o;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:r,blockLen:i}=this;e[r]^=t,128&t&&r===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){rC(this,!1),tC(e),this.finish();let t=this.state,{blockLen:r}=this;for(let i=0,n=e.length;i<n;){this.posOut>=r&&this.keccak();let o=Math.min(r-this.posOut,n-i);e.set(t.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return eC(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(iC(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:i,outputLen:n,rounds:o,enableXOF:a}=this;return t||(t=new e(r,i,n,a,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=i,t.outputLen=n,t.enableXOF=a,t.destroyed=this.destroyed,t}},($C=(e,t,r)=>fC((()=>new MC(t,e,r))))(6,144,28),$C(6,136,32),$C(6,104,48),$C(6,72,64),$C(1,144,28),jC=$C(1,136,32),$C(1,104,48),$C(1,72,64),(LC=(e,t,r)=>function(e){let t=(t,r)=>e(r).update(pC(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}(((i={})=>new MC(t,e,void 0===i.dkLen?r:i.dkLen,!0))))(31,168,16),LC(31,136,32)}));function DC(e,t){let r=t||"hex",i=jC(nE(e,{strict:!1})?uE(e):e);return"bytes"===r?i:xE(i)}var UC=a((()=>{BC(),oE(),mE(),AE()}));function FC(e,t){let r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),i=DC(pE(r),"bytes"),n=(t?r.substring(`${t}0x`.length):r).split("");for(let e=0;e<40;e+=2)i[e>>1]>>4>=8&&n[e]&&(n[e]=n[e].toUpperCase()),(15&i[e>>1])>=8&&n[e+1]&&(n[e+1]=n[e+1].toUpperCase());return`0x${n.join("")}`}function HC(e,t){if(!qC(e,{strict:!1}))throw new KE({address:e});return FC(e,t)}var zC=a((()=>{QE(),mE(),UC(),GC()}));function qC(e,t){let{strict:r=!0}=t??{};if(VC.has(e))return VC.get(e);let i=!!WC.test(e)&&(e.toLowerCase()===e||(!r||FC(e)===e));return VC.set(e,i),i}var WC,VC,GC=a((()=>{XE(),zC(),WC=/^0x[a-fA-F0-9]{40}$/,VC=new YE(8192)}));function ZC(e,t,r,{strict:i}={}){return nE(e,{strict:!1})?function(e,t,r,{strict:i}={}){KC(e,t);let n=`0x${e.replace("0x","").slice(2*(t??0),2*(r??e.length))}`;return i&&YC(n,t,r),n}(e,t,r,{strict:i}):JC(e,t,r,{strict:i})}function KC(e,t){if("number"==typeof t&&t>0&&t>aE(e)-1)throw new Kx({offset:t,position:"start",size:aE(e)})}function YC(e,t,r){if("number"==typeof t&&"number"==typeof r&&aE(e)!==r-t)throw new Kx({offset:r,position:"end",size:aE(e)})}function JC(e,t,r,{strict:i}={}){KC(e,t);let n=e.slice(t,r);return i&&YC(n,t,r),n}var QC=a((()=>{eE(),oE(),sE()}));function XC(e,t){if(e.length!==t.length)throw new jE({expectedLength:e.length,givenLength:t.length});let r=function({params:e,values:t}){let r=[];for(let i=0;i<e.length;i++)r.push(ek({param:e[i],value:t[i]}));return r}({params:e,values:t}),i=tk(r);return 0===i.length?"0x":i}function ek({param:e,value:t}){let r=rk(e.type);if(r){let[i,n]=r;return function(e,{length:t,param:r}){let i=null===t;if(!Array.isArray(e))throw new zE(e);if(!i&&e.length!==t)throw new ME({expectedLength:t,givenLength:e.length,type:`${r.type}[${t}]`});let n=!1,o=[];for(let t=0;t<e.length;t++){let i=ek({param:r,value:e[t]});i.dynamic&&(n=!0),o.push(i)}if(i||n){let e=tk(o);if(i){let t=kE(o.length,{size:32});return{dynamic:!0,encoded:o.length>0?GE([t,e]):t}}if(n)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:GE(o.map((({encoded:e})=>e)))}}(t,{length:i,param:{...e,type:n}})}if("tuple"===e.type)return function(e,{param:t}){let r=!1,i=[];for(let n=0;n<t.components.length;n++){let o=t.components[n],a=ek({param:o,value:e[Array.isArray(e)?n:o.name]});i.push(a),a.dynamic&&(r=!0)}return{dynamic:r,encoded:r?tk(i):GE(i.map((({encoded:e})=>e)))}}(t,{param:e});if("address"===e.type)return function(e){if(!qC(e))throw new KE({address:e});return{dynamic:!1,encoded:rE(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){if("boolean"!=typeof e)throw new Wx(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:rE(EE(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){return function(e,{signed:t}){return{dynamic:!1,encoded:kE(e,{size:32,signed:t})}}(t,{signed:e.type.startsWith("int")})}if(e.type.startsWith("bytes"))return function(e,{param:t}){let[,r]=t.type.split("bytes"),i=aE(e);if(!r){let t=e;return i%32!=0&&(t=rE(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:GE([rE(kE(i,{size:32})),t])}}if(i!==parseInt(r))throw new $E({expectedSize:parseInt(r),value:e});return{dynamic:!1,encoded:rE(e,{dir:"right"})}}(t,{param:e});if("string"===e.type)return function(e){let t=PE(e),r=Math.ceil(aE(t)/32),i=[];for(let e=0;e<r;e++)i.push(rE(ZC(t,32*e,32*(e+1)),{dir:"right"}));return{dynamic:!0,encoded:GE([rE(kE(aE(t),{size:32})),...i])}}(t);throw new FE(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function tk(e){let t=0;for(let r=0;r<e.length;r++){let{dynamic:i,encoded:n}=e[r];t+=i?32:aE(n)}let r=[],i=[],n=0;for(let o=0;o<e.length;o++){let{dynamic:a,encoded:s}=e[o];a?(r.push(kE(t+n,{size:32})),i.push(s),n+=aE(s)):r.push(s)}return GE([...r,...i])}function rk(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}var ik=a((()=>{VE(),QE(),Qx(),GC(),JE(),iE(),sE(),QC(),AE()}));function nk(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}var ok,ak,sk,ck,lk,uk,dk,hk=a((()=>{})),pk=a((()=>{Qx(),ok=class extends Wx{constructor({blockNumber:e,chain:t,contract:r}){super(`Chain "${t.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...e&&r.blockCreated&&r.blockCreated>e?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${r.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}},ak=class extends Wx{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID:  ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}},sk=class extends Wx{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join("\n    ")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}},ck=class extends Wx{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}})),fk=a((()=>{lk={gwei:9,wei:18},uk={ether:-9,wei:9},dk={ether:-18,gwei:-9}}));function gk(e,t){let r=e.toString(),i=r.startsWith("-");i&&(r=r.slice(1)),r=r.padStart(t,"0");let[n,o]=[r.slice(0,r.length-t),r.slice(r.length-t)];return o=o.replace(/(0+)$/,""),`${i?"-":""}${n||"0"}${o?`.${o}`:""}`}var mk=a((()=>{}));function bk(e,t="wei"){return gk(e,uk[t])}var yk,wk,vk,_k,xk,Ek,Ck,kk,Pk,Ik,Sk,Ak,Tk=a((()=>{fk(),mk()})),Ok=a((()=>{Tk(),Qx(),yk=class extends Wx{constructor({cause:e,message:t}={}){let r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}},Object.defineProperty(yk,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(yk,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/}),wk=class extends Wx{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${bk(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}},Object.defineProperty(wk,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/}),vk=class extends Wx{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${bk(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}},Object.defineProperty(vk,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/}),_k=class extends Wx{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}},Object.defineProperty(_k,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/}),xk=class extends Wx{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n    "),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}},Object.defineProperty(xk,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/}),Ek=class extends Wx{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}},Object.defineProperty(Ek,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/}),Ck=class extends Wx{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n    "),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}},Object.defineProperty(Ck,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/}),kk=class extends Wx{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}},Object.defineProperty(kk,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/}),Pk=class extends Wx{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}},Object.defineProperty(Pk,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/}),Ik=class extends Wx{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}},Object.defineProperty(Ik,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/}),Sk=class extends Wx{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${bk(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${bk(r)} gwei`:""}).`].join("\n    "),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}},Object.defineProperty(Sk,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/}),Ak=class extends Wx{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}}));function Rk(e,t="wei"){return gk(e,lk[t])}var Nk=a((()=>{fk(),mk()}));function Mk(e){let t=Object.entries(e).map((([e,t])=>void 0===t||!1===t?null:[e,t])).filter(Boolean),r=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>`  ${`${e}:`.padEnd(r+1)}  ${t}`)).join("\n    ")}var $k,jk,Lk,Bk,Dk,Uk,Fk,Hk,zk,qk,Wk,Vk,Gk,Zk,Kk,Yk,Jk,Qk,Xk,eP,tP,rP,iP,nP,oP,aP,sP,cP,lP,uP,dP,hP=a((()=>{Nk(),Tk(),Qx(),$k=class extends Wx{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join("\n    ")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}},jk=class extends Wx{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Mk(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}},Lk=class extends Wx{constructor(e,{account:t,docsPath:r,chain:i,data:n,gas:o,gasPrice:a,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:l,to:u,value:d}){let h=Mk({chain:i&&`${i?.name} (id: ${i?.id})`,from:t?.address,to:u,value:typeof d<"u"&&`${Rk(d)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:n,gas:o,gasPrice:typeof a<"u"&&`${bk(a)} gwei`,maxFeePerGas:typeof s<"u"&&`${bk(s)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${bk(c)} gwei`,nonce:l});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}},Bk=class extends Wx{constructor({blockHash:e,blockNumber:t,blockTag:r,hash:i,index:n}){let o="Transaction";r&&void 0!==n&&(o=`Transaction at block time "${r}" at index "${n}"`),e&&void 0!==n&&(o=`Transaction at block hash "${e}" at index "${n}"`),t&&void 0!==n&&(o=`Transaction at block number "${t}" at index "${n}"`),i&&(o=`Transaction with hash "${i}"`),super(`${o} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}},Dk=class extends Wx{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}},Uk=class extends Wx{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}})),pP=a((()=>{Fk=(e,t,r)=>JSON.stringify(e,((e,r)=>{let i="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,i):i}),r)})),fP=a((()=>{pP(),Qx(),zx(),Hk=class extends Wx{constructor({body:e,details:t,headers:r,status:i,url:n}){super("HTTP request failed.",{details:t,metaMessages:[i&&`Status: ${i}`,`URL: ${Dx(n)}`,e&&`Request body: ${Fk(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=r,this.status=i,this.url=n}},zk=class extends Wx{constructor({body:e,error:t,url:r}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${Dx(r)}`,`Request body: ${Fk(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}},qk=class extends Wx{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${Dx(t)}`,`Request body: ${Fk(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}})),gP=a((()=>{Qx(),fP(),-1,Wk=class extends Wx{constructor(e,{code:t,docsPath:r,metaMessages:i,shortMessage:n}){super(n,{cause:e,docsPath:r,metaMessages:i||e?.metaMessages}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof zk?e.code:t??-1}},Vk=class extends Wk{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}},Gk=class e extends Wk{constructor(t){super(t,{code:e.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}},Object.defineProperty(Gk,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700}),Zk=class e extends Wk{constructor(t){super(t,{code:e.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}},Object.defineProperty(Zk,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600}),Kk=class e extends Wk{constructor(t){super(t,{code:e.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}},Object.defineProperty(Kk,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601}),Yk=class e extends Wk{constructor(t){super(t,{code:e.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join("\n    ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}},Object.defineProperty(Yk,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602}),Jk=class e extends Wk{constructor(t){super(t,{code:e.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}},Object.defineProperty(Jk,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603}),Qk=class e extends Wk{constructor(t){super(t,{code:e.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join("\n    ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}},Object.defineProperty(Qk,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3}),Xk=class e extends Wk{constructor(t){super(t,{code:e.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}},Object.defineProperty(Xk,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001}),eP=class e extends Wk{constructor(t){super(t,{code:e.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}},Object.defineProperty(eP,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002}),tP=class e extends Wk{constructor(t){super(t,{code:e.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}},Object.defineProperty(tP,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003}),rP=class e extends Wk{constructor(t){super(t,{code:e.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}},Object.defineProperty(rP,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004}),iP=class e extends Wk{constructor(t){super(t,{code:e.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}},Object.defineProperty(iP,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005}),nP=class e extends Wk{constructor(t){super(t,{code:e.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}},Object.defineProperty(nP,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006}),oP=class e extends Vk{constructor(t){super(t,{code:e.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}},Object.defineProperty(oP,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001}),aP=class e extends Vk{constructor(t){super(t,{code:e.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}},Object.defineProperty(aP,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100}),sP=class e extends Vk{constructor(t){super(t,{code:e.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}},Object.defineProperty(sP,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200}),cP=class e extends Vk{constructor(t){super(t,{code:e.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}},Object.defineProperty(cP,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900}),lP=class e extends Vk{constructor(t){super(t,{code:e.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}},Object.defineProperty(lP,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901}),uP=class e extends Vk{constructor(t){super(t,{code:e.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}},Object.defineProperty(uP,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902}),dP=class extends Wk{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}}));function mP(e,t){let r=(e.details||"").toLowerCase(),i=e instanceof Wx?e.walk((e=>e.code===yk.code)):e;return i instanceof Wx?new yk({cause:e,message:i.details}):yk.nodeMessage.test(r)?new yk({cause:e,message:e.details}):wk.nodeMessage.test(r)?new wk({cause:e,maxFeePerGas:t?.maxFeePerGas}):vk.nodeMessage.test(r)?new vk({cause:e,maxFeePerGas:t?.maxFeePerGas}):_k.nodeMessage.test(r)?new _k({cause:e,nonce:t?.nonce}):xk.nodeMessage.test(r)?new xk({cause:e,nonce:t?.nonce}):Ek.nodeMessage.test(r)?new Ek({cause:e,nonce:t?.nonce}):Ck.nodeMessage.test(r)?new Ck({cause:e}):kk.nodeMessage.test(r)?new kk({cause:e,gas:t?.gas}):Pk.nodeMessage.test(r)?new Pk({cause:e,gas:t?.gas}):Ik.nodeMessage.test(r)?new Ik({cause:e}):Sk.nodeMessage.test(r)?new Sk({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new Ak({cause:e})}var bP=a((()=>{Qx(),Ok()}));function yP(e,{format:t}){if(!t)return{};let r={};return function t(i){let n=Object.keys(i);for(let o of n)o in e&&(r[o]=e[o]),i[o]&&"object"==typeof i[o]&&!Array.isArray(i[o])&&t(i[o])}(t(e||{})),r}var wP=a((()=>{}));function vP(e){let t={};return typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&("string"!=typeof e.blobs[0]?t.blobs=e.blobs.map((e=>CE(e))):t.blobs=e.blobs),typeof e.data<"u"&&(t.data=e.data),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=kE(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=kE(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=kE(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=kE(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=kE(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=kE(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=_P[e.type]),typeof e.value<"u"&&(t.value=kE(e.value)),t}var _P,xP=a((()=>{AE(),_P={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3"}}));function EP(e){let{account:t,gasPrice:r,maxFeePerGas:i,maxPriorityFeePerGas:n,to:o}=e,a=t?nk(t):void 0;if(a&&!qC(a.address))throw new KE({address:a.address});if(o&&!qC(o))throw new KE({address:o});if(typeof r<"u"&&(typeof i<"u"||typeof n<"u"))throw new $k;if(i&&i>2n**256n-1n)throw new wk({maxFeePerGas:i});if(n&&i&&n>i)throw new Sk({maxFeePerGas:i,maxPriorityFeePerGas:n})}var CP=a((()=>{hk(),QE(),Ok(),hP(),GC()}));var kP,PP,IP,SP,AP,TP,OP,RP,NP,MP,$P,jP=a((()=>{nC(),vC(),kP=class extends wC{constructor(e,t,r,i){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=bC(this.buffer)}update(e){rC(this);let{view:t,buffer:r,blockLen:i}=this,n=(e=pC(e)).length;for(let o=0;o<n;){let a=Math.min(i-this.pos,n-o);if(a!==i)r.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(t,0),this.pos=0);else{let t=bC(e);for(;i<=n-o;o+=i)this.process(t,o)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){rC(this),iC(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:i,isLE:n}=this,{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(r,0),o=0);for(let e=o;e<i;e++)t[e]=0;(function(e,t,r,i){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,i);let n=BigInt(32),o=BigInt(4294967295),a=Number(r>>n&o),s=Number(r&o),c=i?4:0,l=i?0:4;e.setUint32(t+c,a,i),e.setUint32(t+l,s,i)})(r,i-8,BigInt(8*this.length),n),this.process(r,0);let a=bC(e),s=this.outputLen;if(s%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let c=s/4,l=this.get();if(c>l.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)a.setUint32(4*e,l[e],n)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:i,finished:n,destroyed:o,pos:a}=this;return e.length=i,e.pos=a,e.finished=n,e.destroyed=o,i%t&&e.buffer.set(r),e}}})),LP=a((()=>{jP(),vC(),PP=(e,t,r)=>e&t^~e&r,IP=(e,t,r)=>e&t^e&r^t&r,SP=new Uint32Array([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]),AP=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),TP=new Uint32Array(64),OP=class extends kP{constructor(){super(64,32,8,!1),this.A=0|AP[0],this.B=0|AP[1],this.C=0|AP[2],this.D=0|AP[3],this.E=0|AP[4],this.F=0|AP[5],this.G=0|AP[6],this.H=0|AP[7]}get(){let{A:e,B:t,C:r,D:i,E:n,F:o,G:a,H:s}=this;return[e,t,r,i,n,o,a,s]}set(e,t,r,i,n,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|i,this.E=0|n,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)TP[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=TP[e-15],r=TP[e-2],i=yC(t,7)^yC(t,18)^t>>>3,n=yC(r,17)^yC(r,19)^r>>>10;TP[e]=n+TP[e-7]+i+TP[e-16]|0}let{A:r,B:i,C:n,D:o,E:a,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=l+(yC(a,6)^yC(a,11)^yC(a,25))+PP(a,s,c)+SP[e]+TP[e]|0,u=(yC(r,2)^yC(r,13)^yC(r,22))+IP(r,i,n)|0;l=c,c=s,s=a,a=o+t|0,o=n,n=i,i=r,r=t+u|0}r=r+this.A|0,i=i+this.B|0,n=n+this.C|0,o=o+this.D|0,a=a+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(r,i,n,o,a,s,c,l)}roundClean(){TP.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},RP=fC((()=>new OP))})),BP=a((()=>{Qx(),NP=class extends Wx{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}},MP=class extends Wx{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}},$P=class extends Wx{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RecursiveReadLimitExceededError"})}}}));function DP(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(UP);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var UP,FP,HP,zP,qP,WP,VP=a((()=>{BP(),UP={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:1/0,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new $P({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new MP({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new NP({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new NP({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===1/0)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}}})),GP=a((()=>{FP=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],HP=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],zP=[...HP,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],qP=[...HP,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],WP=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}]}));function ZP(e,t={}){return typeof t.size<"u"&&bE(e,{size:t.size}),yE(CE(e,t),t)}function KP(e,t={}){let r=e;if(typeof t.size<"u"&&(bE(r,{size:t.size}),r=cE(r)),r.length>1||r[0]>1)throw new Gx(r);return!!r[0]}function YP(e,t={}){return typeof t.size<"u"&&bE(e,{size:t.size}),wE(CE(e,t),t)}var JP=a((()=>{Xx(),lE(),_E(),AE()}));function QP(e,t){let r="string"==typeof t?hE(t):t,i=DP(r);if(0===aE(r)&&e.length>0)throw new NE;if(aE(t)&&aE(t)<32)throw new RE({data:"string"==typeof t?t:CE(t),params:e,size:aE(t)});let n=0,o=[];for(let t=0;t<e.length;++t){let r=e[t];i.setPosition(n);let[a,s]=XP(i,r,{staticPosition:0});n+=s,o.push(a)}return o}function XP(e,t,{staticPosition:r}){let i=rk(t.type);if(i){let[n,o]=i;return function(e,t,{length:r,staticPosition:i}){if(!r){let r=i+YP(e.readBytes(rI)),n=r+tI;e.setPosition(r);let o=YP(e.readBytes(tI)),a=eI(t),s=0,c=[];for(let r=0;r<o;++r){e.setPosition(n+(a?32*r:s));let[i,o]=XP(e,t,{staticPosition:n});s+=o,c.push(i)}return e.setPosition(i+32),[c,32]}if(eI(t)){let n=i+YP(e.readBytes(rI)),o=[];for(let i=0;i<r;++i){e.setPosition(n+32*i);let[r]=XP(e,t,{staticPosition:n});o.push(r)}return e.setPosition(i+32),[o,32]}let n=0,o=[];for(let a=0;a<r;++a){let[r,a]=XP(e,t,{staticPosition:i+n});n+=a,o.push(r)}return[o,n]}(e,{...t,type:o},{length:n,staticPosition:r})}if("tuple"===t.type)return function(e,t,{staticPosition:r}){let i=0===t.components.length||t.components.some((({name:e})=>!e)),n=i?[]:{},o=0;if(eI(t)){let a=r+YP(e.readBytes(rI));for(let r=0;r<t.components.length;++r){let s=t.components[r];e.setPosition(a+o);let[c,l]=XP(e,s,{staticPosition:a});o+=l,n[i?r:s?.name]=c}return e.setPosition(r+32),[n,32]}for(let a=0;a<t.components.length;++a){let s=t.components[a],[c,l]=XP(e,s,{staticPosition:r});n[i?a:s?.name]=c,o+=l}return[n,o]}(e,t,{staticPosition:r});if("address"===t.type)return function(e){let t=e.readBytes(32);return[FC(CE(JC(t,-20))),32]}(e);if("bool"===t.type)return function(e){return[KP(e.readBytes(32),{size:32}),32]}(e);if(t.type.startsWith("bytes"))return function(e,t,{staticPosition:r}){let[i,n]=t.type.split("bytes");if(!n){let t=YP(e.readBytes(32));e.setPosition(r+t);let i=YP(e.readBytes(32));if(0===i)return e.setPosition(r+32),["0x",32];let n=e.readBytes(i);return e.setPosition(r+32),[CE(n),32]}return[CE(e.readBytes(parseInt(n),32)),32]}(e,t,{staticPosition:r});if(t.type.startsWith("uint")||t.type.startsWith("int"))return function(e,t){let r=t.type.startsWith("int"),i=parseInt(t.type.split("int")[1]||"256"),n=e.readBytes(32);return[i>48?ZP(n,{signed:r}):YP(n,{signed:r}),32]}(e,t);if("string"===t.type)return function(e,{staticPosition:t}){let r=YP(e.readBytes(32)),i=t+r;e.setPosition(i);let n=YP(e.readBytes(32));if(0===n)return e.setPosition(t+32),["",32];let o=e.readBytes(n,32),a=function(e,t={}){let r=e;return typeof t.size<"u"&&(bE(r,{size:t.size}),r=cE(r,{dir:"right"})),(new TextDecoder).decode(r)}(cE(o));return e.setPosition(t+32),[a,32]}(e,{staticPosition:r});throw new HE(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function eI(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(eI);let r=rk(e.type);return!(!r||!eI({...e,type:r[1]}))}var tI,rI,iI=a((()=>{VE(),zC(),VP(),sE(),QC(),lE(),JP(),mE(),AE(),ik(),tI=32,rI=32}));var nI=a((()=>{}));function oI(e){let t=e.type;if(aI.test(e.type)&&"components"in e){t="(";let r=e.components.length;for(let i=0;i<r;i++){t+=oI(e.components[i]),i<r-1&&(t+=", ")}let i=function(e,t){return e.exec(t)?.groups}(aI,e.type);return t+=`)${i?.array??""}`,oI({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}var aI,sI=a((()=>{nI(),aI=/^tuple(?<array>(\[(\d*)\])*)$/}));function cI(e){let t="",r=e.length;for(let i=0;i<r;i++){t+=oI(e[i]),i!==r-1&&(t+=", ")}return t}var lI=a((()=>{sI()}));var uI=a((()=>{lI()})),dI=a((()=>{uI()}));var hI,pI=a((()=>{mE(),UC(),hI=e=>DC(uE(e))}));var fI,gI=a((()=>{Qx()})),mI=a((()=>{dI(),gI(),fI=e=>{let t="string"==typeof e?e:function(e){return"function"===e.type?`function ${e.name}(${cI(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs.length?` returns (${cI(e.outputs)})`:""}`:"event"===e.type?`event ${e.name}(${cI(e.inputs)})`:"error"===e.type?`error ${e.name}(${cI(e.inputs)})`:"constructor"===e.type?`constructor(${cI(e.inputs)})${"payable"===e.stateMutability?" payable":""}`:"fallback"===e.type?"fallback()":"receive() external payable"}(e);return function(e){let t=!0,r="",i=0,n="",o=!1;for(let a=0;a<e.length;a++){let s=e[a];if(["(",")",","].includes(s)&&(t=!0),"("===s&&i++,")"===s&&i--,t){if(0===i){if(" "===s&&["event","function",""].includes(n))n="";else if(n+=s,")"===s){o=!0;break}continue}if(" "===s){","!==e[a-1]&&","!==r&&",("!==r&&(r="",t=!1);continue}n+=s,r+=s}}if(!o)throw new Wx("Unable to normalize signature.");return n}(t)}}));function bI(e){return function(e){return hI(e)}(fI(e))}var yI,wI,vI=a((()=>{pI(),mI()})),_I=a((()=>{vI(),yI=bI})),xI=a((()=>{QC(),vI(),wI=e=>ZC(bI(e),0,4)}));function EI(e){let t,{abi:r,args:i=[],name:n}=e,o=nE(n,{strict:!1}),a=r.filter((e=>o?"function"===e.type?wI(e)===n:"event"===e.type&&yI(e)===n:"name"in e&&e.name===n));if(0!==a.length){if(1===a.length)return a[0];for(let e of a)if("inputs"in e)if(i&&0!==i.length){if(e.inputs&&0!==e.inputs.length&&e.inputs.length===i.length&&i.every(((t,r)=>{let i="inputs"in e&&e.inputs[r];return!!i&&CI(t,i)}))){if(t&&"inputs"in t&&t.inputs){let r=kI(e.inputs,t.inputs,i);if(r)throw new UE({abiItem:e,type:r[0]},{abiItem:t,type:r[1]})}t=e}}else if(!e.inputs||0===e.inputs.length)return e;return t||a[0]}}function CI(e,t){let r=typeof e,i=t.type;switch(i){case"address":return qC(e,{strict:!1});case"bool":return"boolean"===r;case"function":case"string":return"string"===r;default:return"tuple"===i&&"components"in t?Object.values(t.components).every(((t,r)=>CI(Object.values(e)[r],t))):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i)?"number"===r||"bigint"===r:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i)?"string"===r||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i)&&(Array.isArray(e)&&e.every((e=>CI(e,{...t,type:i.replace(/(\[[0-9]{0,}\])$/,"")}))))}}function kI(e,t,r){for(let i in e){let n=e[i],o=t[i];if("tuple"===n.type&&"tuple"===o.type&&"components"in n&&"components"in o)return kI(n.components,o.components,r[i]);let a=[n.type,o.type];if(a.includes("address")&&a.includes("bytes20")||(a.includes("address")&&a.includes("string")||a.includes("address")&&a.includes("bytes"))&&qC(r[i],{strict:!1}))return a}}var PI=a((()=>{VE(),oE(),GC(),_I(),xI()}));function II(e){let{abi:t,args:r,functionName:i,data:n}=e,o=t[0];if(i){let e=EI({abi:t,args:r,name:i});if(!e)throw new BE(i,{docsPath:SI});o=e}if("function"!==o.type)throw new BE(void 0,{docsPath:SI});if(!o.outputs)throw new DE(o.name,{docsPath:SI});let a=QP(o.outputs,n);return a&&a.length>1?a:a&&1===a.length?a[0]:void 0}var SI,AI=a((()=>{VE(),iI(),PI(),SI="/docs/contract/decodeFunctionResult"}));var TI,OI=a((()=>{VE(),xI(),WE(),PI(),TI="/docs/contract/encodeFunctionData"}));function RI(e){let{args:t}=e,{abi:r,functionName:i}=1===e.abi.length&&e.functionName?.startsWith("0x")?e:function(e){let{abi:t,args:r,functionName:i}=e,n=t[0];if(i){let e=EI({abi:t,args:r,name:i});if(!e)throw new BE(i,{docsPath:TI});n=e}if("function"!==n.type)throw new BE(void 0,{docsPath:TI});return{abi:[n],functionName:wI(TE(n))}}(e),n=r[0];return ZE([i,("inputs"in n&&n.inputs?XC(n.inputs,t??[]):void 0)??"0x"])}var NI=a((()=>{JE(),ik(),OI()}));function MI({blockNumber:e,chain:t,contract:r}){let i=t?.contracts?.[r];if(!i)throw new ok({chain:t,contract:{name:r}});if(e&&i.blockCreated&&i.blockCreated>e)throw new ok({blockNumber:e,chain:t,contract:{name:r,blockCreated:i.blockCreated}});return i.address}var $I,jI,LI,BI=a((()=>{pk()})),DI=a((()=>{$I={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},jI={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},LI={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}}));function UI(e){let{abi:t,data:r}=e,i=ZC(r,0,4);if("0x"===i)throw new NE;let n=[...t||[],jI,LI].find((e=>"error"===e.type&&i===wI(TE(e))));if(!n)throw new LE(i,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:n,args:"inputs"in n&&n.inputs&&n.inputs.length>0?QP(n.inputs,ZC(r,4)):void 0,errorName:n.name}}var FI=a((()=>{DI(),VE(),QC(),xI(),iI(),WE()}));function HI({abiItem:e,args:t,includeFunctionName:r=!0,includeName:i=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map(((e,r)=>`${i&&e.name?`${e.name}: `:""}${"object"==typeof t[r]?Fk(t[r]):t[r]}`)).join(", ")})`}var zI=a((()=>{pP()}));function qI(e){return e.reduce(((e,{slot:t,value:r})=>`${e}        ${t}: ${r}\n    `),"")}var WI,VI,GI,ZI,KI,YI,JI,QI,XI=a((()=>{Qx(),WI=class extends Wx{constructor({address:e}){super(`State for account "${e}" is set multiple times.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountStateConflictError"})}},VI=class extends Wx{constructor(){super("state and stateDiff are set on the same account."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"StateAssignmentConflictError"})}}})),eS=a((()=>{hk(),DI(),FI(),WE(),zI(),PI(),Nk(),Tk(),VE(),Qx(),XI(),hP(),zx(),GI=class extends Wx{constructor(e,{account:t,docsPath:r,chain:i,data:n,gas:o,gasPrice:a,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:l,to:u,value:d,stateOverride:h}){let p=t?nk(t):void 0,f=Mk({from:p?.address,to:u,value:typeof d<"u"&&`${Rk(d)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:n,gas:o,gasPrice:typeof a<"u"&&`${bk(a)} gwei`,maxFeePerGas:typeof s<"u"&&`${bk(s)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${bk(c)} gwei`,nonce:l});var g;h&&(f+=`\n    ${g=h,g.reduce(((e,{address:t,...r})=>{let i=`${e}    ${t}:\n    `;return r.nonce&&(i+=`      nonce: ${r.nonce}\n    `),r.balance&&(i+=`      balance: ${r.balance}\n    `),r.code&&(i+=`      code: ${r.code}\n    `),r.state&&(i+="      state:\n    ",i+=qI(r.state)),r.stateDiff&&(i+="      stateDiff:\n    ",i+=qI(r.stateDiff)),i}),"  State Override:\n    ").slice(0,-1)}`),super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",f].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}},ZI=class extends Wx{constructor(e,{abi:t,args:r,contractAddress:i,docsPath:n,functionName:o,sender:a}){let s=EI({abi:t,args:r,name:o}),c=s?HI({abiItem:s,args:r,includeFunctionName:!1,includeName:!1}):void 0,l=s?TE(s,{includeName:!0}):void 0,u=Mk({address:i&&Bx(i),function:l,args:c&&"()"!==c&&`${[...Array(o?.length??0).keys()].map((()=>" ")).join("")}${c}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",u].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=t,this.args=r,this.cause=e,this.contractAddress=i,this.functionName=o,this.sender=a}},KI=class extends Wx{constructor({abi:e,data:t,functionName:r,message:i}){let n,o,a,s,c;if(t&&"0x"!==t)try{o=UI({abi:e,data:t});let{abiItem:r,errorName:i,args:n}=o;if("Error"===i)s=n[0];else if("Panic"===i){let[e]=n;s=$I[e]}else{let e=r?TE(r,{includeName:!0}):void 0,t=r&&n?HI({abiItem:r,args:n,includeFunctionName:!1,includeName:!1}):void 0;a=[e?`Error: ${e}`:"",t&&"()"!==t?`       ${[...Array(i?.length??0).keys()].map((()=>" ")).join("")}${t}`:""]}}catch(e){n=e}else i&&(s=i);n instanceof LE&&(c=n.signature,a=[`Unable to decode signature "${c}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${c}.`]),super(s&&"execution reverted"!==s||c?[`The contract function "${r}" reverted with the following ${c?"signature":"reason"}:`,s||c].join("\n    "):`The contract function "${r}" reverted.`,{cause:n,metaMessages:a}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=o,this.reason=s,this.signature=c}},YI=class extends Wx{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",`  - The contract does not have the function "${e}",`,"  - The parameters passed to the contract function may be invalid, or","  - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}},JI=class extends Wx{constructor({data:e,message:t}){super(t||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}})),tS=a((()=>{QI="0x82ad56cb"}));var rS=a((()=>{eS(),Ok(),bP()}));function iS({fn:e,id:t,shouldSplitBatch:r,wait:i=0,sort:n}){let o=async()=>{let t=s();a();let r=t.map((({args:e})=>e));0!==r.length&&e(r).then((e=>{n&&Array.isArray(e)&&e.sort(n);for(let r=0;r<t.length;r++){let{pendingPromise:i}=t[r];i.resolve?.([e[r],e])}})).catch((e=>{for(let r=0;r<t.length;r++){let{pendingPromise:i}=t[r];i.reject?.(e)}}))},a=()=>nS.delete(t),s=()=>nS.get(t)||[],c=e=>nS.set(t,[...s(),e]);return{flush:a,async schedule(e){let t={},n=new Promise(((e,r)=>{t.resolve=e,t.reject=r}));return r?.([...s().map((({args:e})=>e)),e])&&o(),s().length>0?(c({args:e,pendingPromise:t}),n):(c({args:e,pendingPromise:t}),setTimeout(o,i),n)}}}var nS,oS,aS,sS,cS=a((()=>{nS=new Map})),lS=a((()=>{pP(),Qx(),zx(),oS=class extends Wx{constructor({callbackSelector:e,cause:t,data:r,extraData:i,sender:n,urls:o}){super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],t.metaMessages?.length?"":[],"Offchain Gateway Call:",o&&["  Gateway URL(s):",...o.map((e=>`    ${Dx(e)}`))],`  Sender: ${n}`,`  Data: ${r}`,`  Callback selector: ${e}`,`  Extra data: ${i}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}},aS=class extends Wx{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${Dx(t)}`,`Response: ${Fk(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}},sS=class extends Wx{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}}));var uS=a((()=>{QE(),GC()})),dS={};async function hS(e,{blockNumber:t,blockTag:r,data:i,to:n}){let{args:o}=UI({data:i,abi:[gS]}),[a,s,c,l,u]=o,{ccipRead:d}=e,h=d&&"function"==typeof d?.request?d.request:pS;try{if(!function(e,t){if(!qC(e,{strict:!1}))throw new KE({address:e});if(!qC(t,{strict:!1}))throw new KE({address:t});return e.toLowerCase()===t.toLowerCase()}(n,a))throw new sS({sender:a,to:n});let i=await h({data:c,sender:a,urls:s}),{data:o}=await bS(e,{blockNumber:t,blockTag:r,data:GE([l,XC([{type:"bytes"},{type:"bytes"}],[i,u])]),to:n});return o}catch(e){throw new oS({callbackSelector:l,cause:e,data:i,extraData:u,sender:a,urls:s})}}async function pS({data:e,sender:t,urls:r}){let i=new Error("An unknown error occurred.");for(let n=0;n<r.length;n++){let o=r[n],a=o.includes("{data}")?"GET":"POST",s="POST"===a?{data:e,sender:t}:void 0;try{let r,n=await fetch(o.replace("{sender}",t).replace("{data}",e),{body:JSON.stringify(s),method:a});if(r=n.headers.get("Content-Type")?.startsWith("application/json")?(await n.json()).data:await n.text(),!n.ok){i=new Hk({body:s,details:r?.error?Fk(r.error):n.statusText,headers:n.headers,status:n.status,url:o});continue}if(!nE(r)){i=new aS({result:r,url:o});continue}return r}catch(e){i=new Hk({body:s,details:e.message,url:o})}}throw i}c(dS,{ccipRequest:()=>pS,offchainLookup:()=>hS,offchainLookupAbiItem:()=>gS,offchainLookupSignature:()=>fS});var fS,gS,mS=a((()=>{vS(),lS(),fP(),FI(),ik(),uS(),JE(),oE(),pP(),fS="0x556f1830",gS={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]}}));async function bS(e,t){let{account:r=e.account,batch:i=!!e.batch?.multicall,blockNumber:n,blockTag:o="latest",accessList:a,blobs:s,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:f,to:g,value:m,stateOverride:b,...y}=t,w=r?nk(r):void 0;try{EP(t);let r=(n?kE(n):void 0)||o,v=function(e){if(!e)return;let t={};for(let{address:r,...i}of e){if(!qC(r,{strict:!1}))throw new KE({address:r});if(t[r])throw new WI({address:r});t[r]=wS(i)}return t}(b),_=e.chain?.formatters?.transactionRequest?.format,x=(_||vP)({...yP(y,{format:_}),from:w?.address,accessList:a,blobs:s,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:f,to:g,value:m});if(i&&function({request:e}){let{data:t,to:r,...i}=e;return!(!t||t.startsWith(QI)||!r||Object.values(i).filter((e=>typeof e<"u")).length>0)}({request:x})&&!v)try{return await async function(e,t){let{batchSize:r=1024,wait:i=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:n,blockTag:o="latest",data:a,multicallAddress:s,to:c}=t,l=s;if(!l){if(!e.chain)throw new ck;l=MI({blockNumber:n,chain:e.chain,contract:"multicall3"})}let u=(n?kE(n):void 0)||o,{schedule:d}=iS({id:`${e.uid}.${u}`,wait:i,shouldSplitBatch:e=>e.reduce(((e,{data:t})=>e+(t.length-2)),0)>2*r,fn:async t=>{let r=t.map((e=>({allowFailure:!0,callData:e.data,target:e.to}))),i=RI({abi:FP,args:[r],functionName:"aggregate3"}),n=await e.request({method:"eth_call",params:[{data:i,to:l},u]});return II({abi:FP,args:[r],functionName:"aggregate3",data:n||"0x"})}}),[{returnData:h,success:p}]=await d({data:a,to:c});if(!p)throw new JI({data:h});return"0x"===h?{data:void 0}:{data:h}}(e,{...x,blockNumber:n,blockTag:o})}catch(e){if(!(e instanceof ck||e instanceof ok))throw e}let E=await e.request({method:"eth_call",params:v?[x,r,v]:[x,r]});return"0x"===E?{data:void 0}:{data:E}}catch(r){let i=function(e){if(!(e instanceof Wx))return;let t=e.walk();return"object"==typeof t?.data?t.data?.data:t.data}(r),{offchainLookup:n,offchainLookupSignature:o}=await Promise.resolve().then((()=>(mS(),dS)));if(!1!==e.ccipRead&&i?.slice(0,10)===o&&g)return{data:await n(e,{data:i,to:g})};throw function(e,{docsPath:t,...r}){let i=(()=>{let t=mP(e,r);return t instanceof Ak?e:t})();return new GI(i,{docsPath:t,...r})}(r,{...t,account:w,chain:e.chain})}}function yS(e){if(e&&0!==e.length)return e.reduce(((e,{slot:t,value:r})=>{if(66!==t.length)throw new Jx({size:t.length,targetSize:66,type:"hex"});if(66!==r.length)throw new Jx({size:r.length,targetSize:66,type:"hex"});return e[t]=r,e}),{})}function wS(e){let{balance:t,nonce:r,state:i,stateDiff:n,code:o}=e,a={};if(void 0!==o&&(a.code=o),void 0!==t&&(a.balance=kE(t)),void 0!==r&&(a.nonce=kE(r)),void 0!==i&&(a.state=yS(i)),void 0!==n){if(a.state)throw new VI;a.stateDiff=yS(n)}return a}var vS=a((()=>{hk(),GP(),tS(),QE(),Qx(),pk(),eS(),eE(),XI(),AI(),NI(),GC(),BI(),AE(),rS(),wP(),xP(),cS(),CP()})),_S=s(((e,t)=>{"use strict";var r=Object.prototype.hasOwnProperty,i="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,r,n,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,n||e,a),c=i?i+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function c(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),c.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},c.prototype.listeners=function(e){var t=i?i+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,a=new Array(o);n<o;n++)a[n]=r[n].fn;return a},c.prototype.listenerCount=function(e){var t=i?i+e:e,r=this._events[t];return r?r.fn?1:r.length:0},c.prototype.emit=function(e,t,r,n,o,a){var s=i?i+e:e;if(!this._events[s])return!1;var c,l,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,n),!0;case 5:return u.fn.call(u.context,t,r,n,o),!0;case 6:return u.fn.call(u.context,t,r,n,o,a),!0}for(l=1,c=new Array(d-1);l<d;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var h,p=u.length;for(l=0;l<p;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),d){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,r);break;case 4:u[l].fn.call(u[l].context,t,r,n);break;default:if(!c)for(h=1,c=new Array(d-1);h<d;h++)c[h-1]=arguments[h];u[l].fn.apply(u[l].context,c)}}return!0},c.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},c.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},c.prototype.removeListener=function(e,t,r,n){var o=i?i+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn===t&&(!n||a.once)&&(!r||a.context===r)&&s(this,o);else{for(var c=0,l=[],u=a.length;c<u;c++)(a[c].fn!==t||n&&!a[c].once||r&&a[c].context!==r)&&l.push(a[c]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=i,c.EventEmitter=c,typeof t<"u"&&(t.exports=c)}));function xS(e,t,r,i){let n=e[t];return xp(e,(()=>{let i=e[t];Object.is(n,i)||r(n=i)}),i)}var ES,CS,kS,PS,IS,SS,AS,TS,OS,RS,NS,MS,$S,jS,LS,BS,DS,US,FS,HS,zS,qS,WS,VS,GS,ZS,KS,YS,JS,QS,XS,eA,tA,rA,iA=a((()=>{Op(),Symbol()})),nA=a((()=>{CS=[{label:"Coinbase",name:"coinbase",feeRange:"1-2%",url:""}],kS={FOUR_MINUTES_MS:24e4,TEN_SEC_MS:1e4,ONE_SEC_MS:1e3,SECURE_SITE:ES="https://secure.walletconnect.com",SECURE_SITE_DASHBOARD:`${ES}/dashboard`,SECURE_SITE_FAVICON:`${ES}/images/favicon.png`,RESTRICTED_TIMEZONES:["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],WC_COINBASE_PAY_SDK_CHAINS:["ethereum","arbitrum","polygon","avalanche-c-chain","optimism","celo","base"],WC_COINBASE_PAY_SDK_FALLBACK_CHAIN:"ethereum",WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP:{Ethereum:"ethereum","Arbitrum One":"arbitrum",Polygon:"polygon",Avalanche:"avalanche-c-chain","OP Mainnet":"optimism",Celo:"celo",Base:"base"},WC_COINBASE_ONRAMP_APP_ID:"bf18c88d-495a-463b-b249-0b9d3656cf5e",SUGGESTED_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP"],POPULAR_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP","DAI","CHAMP","WOLF","SALE","BAL","BUSD","MUST","BTCpx","ROUTE","HEX","WELT","amDAI","VSQ","VISION","AURUM","pSP","SNX","VC","LINK","CHP","amUSDT","SPHERE","FOX","GIDDY","GFC","OMEN","OX_OLD","DE","WNT"],NATIVE_TOKEN_ADDRESS:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",CONVERT_SLIPPAGE_TOLERANCE:1}})),oA=a((()=>{nA(),PS={isMobile:()=>typeof window<"u"&&!(!window.matchMedia("(pointer:coarse)").matches&&!/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),checkCaipNetwork:(e,t="")=>e?.id.toLocaleLowerCase().includes(t.toLowerCase()),isAndroid(){let e=window.navigator.userAgent.toLowerCase();return PS.isMobile()&&e.includes("android")},isIos(){let e=window.navigator.userAgent.toLowerCase();return PS.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isClient:()=>typeof window<"u",isPairingExpired:e=>!e||e-Date.now()<=kS.TEN_SEC_MS,isAllowedRetry:e=>Date.now()-e>=kS.ONE_SEC_MS,copyToClopboard(e){navigator.clipboard.writeText(e)},getPairingExpiry:()=>Date.now()+kS.FOUR_MINUTES_MS,getPlainAddress:e=>e.split(":")[2],wait:async e=>new Promise((t=>{setTimeout(t,e)})),debounce(e,t=500){let r;return(...i)=>{r&&clearTimeout(r),r=setTimeout((function(){e(...i)}),t)}},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),formatNativeUrl(e,t){if(PS.isHttpUrl(e))return this.formatUniversalUrl(e,t);let r=e;return r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),{redirect:`${r}wc?uri=${encodeURIComponent(t)}`,href:r}},formatUniversalUrl(e,t){if(!PS.isHttpUrl(e))return this.formatNativeUrl(e,t);let r=e;return r.endsWith("/")||(r=`${r}/`),{redirect:`${r}wc?uri=${encodeURIComponent(t)}`,href:r}},openHref(e,t,r){window.open(e,t,r||"noreferrer noopener")},async preloadImage(e){let t=new Promise(((t,r)=>{let i=new Image;i.onload=t,i.onerror=r,i.crossOrigin="anonymous",i.src=e}));return Promise.race([t,PS.wait(2e3)])},formatBalance(e,t){let r;if("0"===e)r="0.000";else if("string"==typeof e){let t=Number(e);t&&(r=t.toString().match(/^-?\d+(?:\.\d{0,3})?/u)?.[0])}return r?`${r} ${t??""}`:`0.000 ${t??""}`},formatBalance2(e,t){let r;if("0"===e)r="0";else if("string"==typeof e){let t=Number(e);t&&(r=t.toString().match(/^-?\d+(?:\.\d{0,3})?/u)?.[0])}return{value:r??"0",rest:"0"===r?"000":"",symbol:t}},isRestrictedRegion(){try{let{timeZone:e}=(new Intl.DateTimeFormat).resolvedOptions(),t=e.toUpperCase();return kS.RESTRICTED_TIMEZONES.includes(t)}catch{return!1}},getApiUrl:()=>PS.isRestrictedRegion()?"https://api.web3modal.org":"https://api.web3modal.com",getBlockchainApiUrl:()=>PS.isRestrictedRegion()?"https://rpc.walletconnect.org":"https://rpc.walletconnect.com",getAnalyticsUrl:()=>PS.isRestrictedRegion()?"https://pulse.walletconnect.org":"https://pulse.walletconnect.com",getUUID:()=>crypto?.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,(e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})),parseError:e=>"string"==typeof e?e:"string"==typeof e?.issues?.[0]?.message?e.issues[0].message:e instanceof Error?e.message:"Unknown error",sortRequestedNetworks(e,t=[]){let r={};return t&&e&&(e.forEach(((e,t)=>{r[e]=t})),t.sort(((e,t)=>{let i=r[e.id],n=r[t.id];return void 0!==i&&void 0!==n?i-n:void 0!==i?-1:void 0!==n?1:0}))),t},calculateBalance(e){let t=0;for(let r of e)t+=r.value??0;return t},formatTokenBalance(e){let t=e.toFixed(2),[r,i]=t.split(".");return{dollars:r,pennies:i}},isAddress:e=>!!/^(?:0x)?[0-9a-f]{40}$/iu.test(e)&&!(!/^(?:0x)?[0-9a-f]{40}$/iu.test(e)&&!/^(?:0x)?[0-9A-F]{40}$/iu.test(e))}})),aA=a((()=>{IS=class{constructor({baseUrl:e}){this.baseUrl=e}async get({headers:e,signal:t,...r}){let i=this.createUrl(r);return(await fetch(i,{method:"GET",headers:e,signal:t,cache:"no-cache"})).json()}async getBlob({headers:e,signal:t,...r}){let i=this.createUrl(r);return(await fetch(i,{method:"GET",headers:e,signal:t})).blob()}async post({body:e,headers:t,signal:r,...i}){let n=this.createUrl(i);return(await fetch(n,{method:"POST",headers:t,body:e?JSON.stringify(e):void 0,signal:r})).json()}async put({body:e,headers:t,signal:r,...i}){let n=this.createUrl(i);return(await fetch(n,{method:"PUT",headers:t,body:e?JSON.stringify(e):void 0,signal:r})).json()}async delete({body:e,headers:t,signal:r,...i}){let n=this.createUrl(i);return(await fetch(n,{method:"DELETE",headers:t,body:e?JSON.stringify(e):void 0,signal:r})).json()}createUrl({path:e,params:t}){let r=new URL(e,this.baseUrl);return t&&Object.entries(t).forEach((([e,t])=>{t&&r.searchParams.append(e,t)})),r}}})),sA=a((()=>{iA(),Op(),SS=_p({projectId:"",sdkType:"w3m",sdkVersion:"html-wagmi-undefined"}),AS={state:SS,subscribeKey:(e,t)=>xS(SS,e,t),setProjectId(e){SS.projectId=e},setAllWallets(e){SS.allWallets=e},setIncludeWalletIds(e){SS.includeWalletIds=e},setExcludeWalletIds(e){SS.excludeWalletIds=e},setFeaturedWalletIds(e){SS.featuredWalletIds=e},setTokens(e){SS.tokens=e},setTermsConditionsUrl(e){SS.termsConditionsUrl=e},setPrivacyPolicyUrl(e){SS.privacyPolicyUrl=e},setCustomWallets(e){SS.customWallets=e},setIsSiweEnabled(e){SS.isSiweEnabled=e},setEnableAnalytics(e){SS.enableAnalytics=e},setSdkVersion(e){SS.sdkVersion=e},setMetadata(e){SS.metadata=e},setOnrampEnabled(e){SS.enableOnramp=e},setWalletFeaturesEnabled(e){SS.enableWalletFeatures=e}}})),cA=a((()=>{nA(),oA(),aA(),sA(),TS={purchaseCurrencies:[{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"Ether",symbol:"ETH",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]}],paymentCurrencies:[{id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},{id:"EUR",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]}]},OS=PS.getBlockchainApiUrl(),RS=new IS({baseUrl:OS}),NS={fetchIdentity:({address:e})=>RS.get({path:`/v1/identity/${e}`,params:{projectId:AS.state.projectId}}),fetchTransactions({account:e,projectId:t,cursor:r,onramp:i,signal:n}){let o=r?{cursor:r}:{};return RS.get({path:`/v1/account/${e}/history?projectId=${t}${i?`&onramp=${i}`:""}`,params:o,signal:n})},fetchConvertTokens:({projectId:e,chainId:t})=>RS.get({path:`/v1/convert/tokens?projectId=${e}&chainId=${t}`}),fetchTokenPrice:({projectId:e,addresses:t})=>RS.post({path:"/v1/fungible/price",body:{projectId:e,currency:"usd",addresses:t},headers:{"Content-Type":"application/json"}}),fetchConvertAllowance({projectId:e,tokenAddress:t,userAddress:r}){let{sdkType:i,sdkVersion:n}=AS.state;return RS.get({path:`/v1/convert/allowance?projectId=${e}&tokenAddress=${t}&userAddress=${r}`,headers:{"Content-Type":"application/json","x-sdk-type":i,"x-sdk-version":n}})},fetchGasPrice({projectId:e,chainId:t}){let{sdkType:r,sdkVersion:i}=AS.state;return RS.get({path:`/v1/convert/gas-price?projectId=${e}&chainId=${t}`,headers:{"Content-Type":"application/json","x-sdk-type":r,"x-sdk-version":i}})},generateConvertCalldata:({amount:e,from:t,projectId:r,to:i,userAddress:n})=>RS.post({path:"/v1/convert/build-transaction",headers:{"Content-Type":"application/json"},body:{amount:e,eip155:{slippage:kS.CONVERT_SLIPPAGE_TOLERANCE},from:t,projectId:r,to:i,userAddress:n}}),generateApproveCalldata({from:e,projectId:t,to:r,userAddress:i}){let{sdkType:n,sdkVersion:o}=AS.state;return RS.get({path:`/v1/convert/build-approve?projectId=${t}&userAddress=${i}&from=${e}&to=${r}`,headers:{"Content-Type":"application/json","x-sdk-type":n,"x-sdk-version":o}})},async getBalance(e,t){let{sdkType:r,sdkVersion:i}=AS.state;return RS.get({path:`/v1/account/${e}/balance`,headers:{"x-sdk-type":r,"x-sdk-version":i},params:{currency:"usd",projectId:AS.state.projectId,chainId:t}})},generateOnRampURL:async({destinationWallets:e,partnerUserId:t,defaultNetwork:r,purchaseAmount:i,paymentAmount:n})=>(await RS.post({path:`/v1/generators/onrampurl?projectId=${AS.state.projectId}`,body:{destinationWallets:e,defaultNetwork:r,partnerUserId:t,defaultExperience:"buy",presetCryptoAmount:i,presetFiatAmount:n}})).url,async getOnrampOptions(){try{return await RS.get({path:`/v1/onramp/options?projectId=${AS.state.projectId}`})}catch{return TS}},async getOnrampQuote({purchaseCurrency:e,paymentCurrency:t,amount:r,network:i}){try{return await RS.post({path:`/v1/onramp/quote?projectId=${AS.state.projectId}`,body:{purchaseCurrency:e,paymentCurrency:t,amount:r,network:i}})}catch{return{coinbaseFee:{amount:r,currency:t.id},networkFee:{amount:r,currency:t.id},paymentSubtotal:{amount:r,currency:t.id},paymentTotal:{amount:r,currency:t.id},purchaseAmount:{amount:r,currency:t.id},quoteId:"mocked-quote-id"}}}}})),lA=a((()=>{iA(),Op(),oA(),MS=_p({message:"",variant:"success",open:!1}),$S={state:MS,subscribeKey:(e,t)=>xS(MS,e,t),showSuccess(e){MS.message=e,MS.variant="success",MS.open=!0},showError(e){let t=PS.parseError(e);MS.message=t,MS.variant="error",MS.open=!0},hide(){MS.open=!1}}})),uA=s((e=>{"use strict";var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,g={};function m(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||p}function b(){}function y(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||p}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=m.prototype;var w=y.prototype=new b;w.constructor=y,f(w,m.prototype),w.isPureReactComponent=!0;var v=Array.isArray,_=Object.prototype.hasOwnProperty,x={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function C(e,r,i){var n,o={},a=null,s=null;if(null!=r)for(n in void 0!==r.ref&&(s=r.ref),void 0!==r.key&&(a=""+r.key),r)_.call(r,n)&&!E.hasOwnProperty(n)&&(o[n]=r[n]);var c=arguments.length-2;if(1===c)o.children=i;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(n in c=e.defaultProps)void 0===o[n]&&(o[n]=c[n]);return{$$typeof:t,type:e,key:a,ref:s,props:o,_owner:x.current}}function k(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}var P=/\/+/g;function I(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function S(e,i,n,o,a){var s=typeof e;("undefined"===s||"boolean"===s)&&(e=null);var c=!1;if(null===e)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case t:case r:c=!0}}if(c)return a=a(c=e),e=""===o?"."+I(c,0):o,v(a)?(n="",null!=e&&(n=e.replace(P,"$&/")+"/"),S(a,i,n,"",(function(e){return e}))):null!=a&&(k(a)&&(a=function(e,r){return{$$typeof:t,type:e.type,key:r,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||c&&c.key===a.key?"":(""+a.key).replace(P,"$&/")+"/")+e)),i.push(a)),1;if(c=0,o=""===o?".":o+":",v(e))for(var l=0;l<e.length;l++){var u=o+I(s=e[l],l);c+=S(s,i,n,u,a)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),l=0;!(s=e.next()).done;)c+=S(s=s.value,i,n,u=o+I(s,l++),a);else if("object"===s)throw i=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===i?"object with keys {"+Object.keys(e).join(", ")+"}":i)+"). If you meant to render a collection of children, use an array instead.");return c}function A(e,t,r){if(null==e)return e;var i=[],n=0;return S(e,i,"","",(function(e){return t.call(r,e,n++)})),i}function T(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)}),(function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O={current:null},R={transition:null},N={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:R,ReactCurrentOwner:x};e.Children={map:A,forEach:function(e,t,r){A(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return A(e,(function(){t++})),t},toArray:function(e){return A(e,(function(e){return e}))||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},e.Component=m,e.Fragment=i,e.Profiler=o,e.PureComponent=y,e.StrictMode=n,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N,e.cloneElement=function(e,r,i){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=f({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=r){if(void 0!==r.ref&&(a=r.ref,s=x.current),void 0!==r.key&&(o=""+r.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in r)_.call(r,l)&&!E.hasOwnProperty(l)&&(n[l]=void 0===r[l]&&void 0!==c?c[l]:r[l])}var l=arguments.length-2;if(1===l)n.children=i;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];n.children=c}return{$$typeof:t,type:e.type,key:o,ref:a,props:n,_owner:s}},e.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},e.createElement=C,e.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:T}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},e.startTransition=function(e){var t=R.transition;R.transition={};try{e()}finally{R.transition=t}},e.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},e.useCallback=function(e,t){return O.current.useCallback(e,t)},e.useContext=function(e){return O.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return O.current.useDeferredValue(e)},e.useEffect=function(e,t){return O.current.useEffect(e,t)},e.useId=function(){return O.current.useId()},e.useImperativeHandle=function(e,t,r){return O.current.useImperativeHandle(e,t,r)},e.useInsertionEffect=function(e,t){return O.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return O.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return O.current.useMemo(e,t)},e.useReducer=function(e,t,r){return O.current.useReducer(e,t,r)},e.useRef=function(e){return O.current.useRef(e)},e.useState=function(e){return O.current.useState(e)},e.useSyncExternalStore=function(e,t,r){return O.current.useSyncExternalStore(e,t,r)},e.useTransition=function(){return O.current.useTransition()},e.version="18.2.0"})),dA=s(((e,t)=>{"use strict";t.exports=uA()})),hA=a((()=>{d(dA(),1)})),pA=a((()=>{iA(),hA()})),fA=a((()=>{jS="WALLETCONNECT_DEEPLINK_CHOICE",LS="@w3m/recent",BS="@w3m/connected_wallet_image_url",DS="@w3m/connected_connector",US={setWalletConnectDeepLink({href:e,name:t}){try{localStorage.setItem(jS,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},getWalletConnectDeepLink(){try{let e=localStorage.getItem(jS);if(e)return JSON.parse(e)}catch{console.info("Unable to get WalletConnect deep link")}},deleteWalletConnectDeepLink(){try{localStorage.removeItem(jS)}catch{console.info("Unable to delete WalletConnect deep link")}},setWeb3ModalRecent(e){try{let t=US.getRecentWallets();t.find((t=>t.id===e.id))||(t.unshift(e),t.length>2&&t.pop(),localStorage.setItem(LS,JSON.stringify(t)))}catch{console.info("Unable to set Web3Modal recent")}},getRecentWallets(){try{let e=localStorage.getItem(LS);return e?JSON.parse(e):[]}catch{console.info("Unable to get Web3Modal recent")}return[]},setConnectedWalletImageUrl(e){try{localStorage.setItem(BS,e)}catch{console.info("Unable to set Connected Wallet Image Url")}},getConnectedWalletImageUrl(){try{return localStorage.getItem(BS)}catch{console.info("Unable to set Connected Wallet Image Url")}},setConnectedConnector(e){try{localStorage.setItem(DS,e)}catch{console.info("Unable to set Connected Connector")}},getConnectedConnector(){try{return localStorage.getItem(DS)}catch{console.info("Unable to get Connected Connector")}}}})),gA=a((()=>{Op(),oA(),aA(),sA(),FS=PS.getAnalyticsUrl(),HS=new IS({baseUrl:FS}),zS=["MODAL_CREATED"],qS=_p({timestamp:Date.now(),data:{type:"track",event:"MODAL_CREATED"}}),WS={state:qS,subscribe:e=>xp(qS,(()=>e(qS))),_getApiHeaders(){let{projectId:e,sdkType:t,sdkVersion:r}=AS.state;return{"x-project-id":e,"x-sdk-type":t,"x-sdk-version":r}},async _sendAnalyticsEvent(e){try{if(zS.includes(e.data.event)||typeof window>"u")return;await HS.post({path:"/e",headers:WS._getApiHeaders(),body:{eventId:PS.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:e.timestamp,props:e.data}})}catch{}},sendEvent(e){qS.timestamp=Date.now(),qS.data=e,AS.state.enableAnalytics&&WS._sendAnalyticsEvent(qS)}}})),mA=a((()=>{Op(),sA(),gA(),lA(),cA(),VS=_p({transactions:[],coinbaseTransactions:{},transactionsByYear:{},loading:!1,empty:!1,next:void 0}),GS={state:VS,subscribe:e=>xp(VS,(()=>e(VS))),async fetchTransactions(e,t){let{projectId:r}=AS.state;if(!r||!e)throw new Error("Transactions can't be fetched without a projectId and an accountAddress");VS.loading=!0;try{let i=await NS.fetchTransactions({account:e,projectId:r,cursor:VS.next,onramp:t}),n=this.filterSpamTransactions(i.data),o=[...VS.transactions,...n];VS.loading=!1,"coinbase"===t?VS.coinbaseTransactions=this.groupTransactionsByYearAndMonth(VS.coinbaseTransactions,i.data):(VS.transactions=o,VS.transactionsByYear=this.groupTransactionsByYearAndMonth(VS.transactionsByYear,n)),VS.empty=0===o.length,VS.next=i.next?i.next:void 0}catch{WS.sendEvent({type:"track",event:"ERROR_FETCH_TRANSACTIONS",properties:{address:e,projectId:r,cursor:VS.next}}),$S.showError("Failed to fetch transactions"),VS.loading=!1,VS.empty=!0,VS.next=void 0}},groupTransactionsByYearAndMonth(e={},t=[]){let r=e;return t.forEach((e=>{let t=new Date(e.metadata.minedAt).getFullYear(),i=new Date(e.metadata.minedAt).getMonth(),n=r[t]??{},o=(n[i]??[]).filter((t=>t.id!==e.id));r[t]={...n,[i]:[...o,e].sort(((e,t)=>new Date(t.metadata.minedAt).getTime()-new Date(e.metadata.minedAt).getTime()))}})),r},filterSpamTransactions:e=>e.filter((e=>!e.transfers.every((e=>!0===e.nft_info?.flags.is_spam)))),clearCursor(){VS.next=void 0},resetTransactions(){VS.transactions=[],VS.transactionsByYear={},VS.loading=!1,VS.empty=!1,VS.next=void 0}}})),bA=a((()=>{iA(),Op(),oA(),fA(),mA(),ZS=_p({wcError:!1,buffering:!1}),KS={state:ZS,subscribeKey:(e,t)=>xS(ZS,e,t),_getClient(){if(!ZS._client)throw new Error("ConnectionController client not set");return ZS._client},setClient(e){ZS._client=Cp(e)},connectWalletConnect(){ZS.wcPromise=this._getClient().connectWalletConnect((e=>{ZS.wcUri=e,ZS.wcPairingExpiry=PS.getPairingExpiry()})),US.setConnectedConnector("WALLET_CONNECT")},async connectExternal(e){await(this._getClient().connectExternal?.(e)),US.setConnectedConnector(e.type)},async signMessage(e){return this._getClient().signMessage(e)},parseUnits(e,t){return this._getClient().parseUnits(e,t)},formatUnits(e,t){return this._getClient().formatUnits(e,t)},async sendTransaction(e){return this._getClient().sendTransaction(e)},async estimateGas(e){return this._getClient().estimateGas(e)},checkInstalled(e){return this._getClient().checkInstalled?.(e)},resetWcConnection(){ZS.wcUri=void 0,ZS.wcPairingExpiry=void 0,ZS.wcPromise=void 0,ZS.wcLinking=void 0,ZS.recentWallet=void 0,GS.resetTransactions(),US.deleteWalletConnectDeepLink()},setWcLinking(e){ZS.wcLinking=e},setWcError(e){ZS.wcError=e,ZS.buffering=!1},setRecentWallet(e){ZS.recentWallet=e},setBuffering(e){ZS.buffering=e},async disconnect(){await this._getClient().disconnect(),this.resetWcConnection()}}})),yA=a((()=>{Op(),YS=_p({loading:!1,open:!1,selectedNetworkId:void 0}),JS={state:YS,subscribe:e=>xp(YS,(()=>e(YS))),set(e){Object.assign(YS,{...YS,...e})}}})),wA=s(((e,t)=>{var r,i;r=e,i=function(){"use strict";var e=6e4,t=36e5,r="millisecond",i="second",n="minute",o="hour",a="day",s="week",c="month",l="quarter",u="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},m=function(e,t,r){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(r)+e},b={s:m,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),i=Math.floor(r/60),n=r%60;return(t<=0?"+":"-")+m(i,2,"0")+":"+m(n,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var i=12*(r.year()-t.year())+(r.month()-t.month()),n=t.clone().add(i,c),o=r-n<0,a=t.clone().add(i+(o?-1:1),c);return+(-(i+(r-n)/(o?n-a:a-n))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:u,w:s,d:a,D:d,h:o,m:n,s:i,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",w={};w[y]=g;var v="$isDayjsObject",_=function(e){return e instanceof k||!(!e||!e[v])},x=function e(t,r,i){var n;if(!t)return y;if("string"==typeof t){var o=t.toLowerCase();w[o]&&(n=o),r&&(w[o]=r,n=o);var a=t.split("-");if(!n&&a.length>1)return e(a[0])}else{var s=t.name;w[s]=t,n=s}return!i&&n&&(y=n),n||!i&&y},E=function(e,t){if(_(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new k(r)},C=b;C.l=x,C.i=_,C.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var k=function(){function g(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[v]=!0}var m=g.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(C.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(p);if(i){var n=i[2]-1||0,o=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(t)}(e),this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return C},m.isValid=function(){return this.$d.toString()!==h},m.isSame=function(e,t){var r=E(e);return this.startOf(t)<=r&&r<=this.endOf(t)},m.isAfter=function(e,t){return E(e)<this.startOf(t)},m.isBefore=function(e,t){return this.endOf(t)<E(e)},m.$g=function(e,t,r){return C.u(e)?this[t]:this.set(r,e)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(e,t){var r=this,l=!!C.u(t)||t,h=C.p(e),p=function(e,t){var i=C.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return l?i:i.endOf(a)},f=function(e,t){return C.w(r.toDate()[e].apply(r.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},g=this.$W,m=this.$M,b=this.$D,y="set"+(this.$u?"UTC":"");switch(h){case u:return l?p(1,0):p(31,11);case c:return l?p(1,m):p(0,m+1);case s:var w=this.$locale().weekStart||0,v=(g<w?g+7:g)-w;return p(l?b-v:b+(6-v),m);case a:case d:return f(y+"Hours",0);case o:return f(y+"Minutes",1);case n:return f(y+"Seconds",2);case i:return f(y+"Milliseconds",3);default:return this.clone()}},m.endOf=function(e){return this.startOf(e,!1)},m.$set=function(e,t){var s,l=C.p(e),h="set"+(this.$u?"UTC":""),p=(s={},s[a]=h+"Date",s[d]=h+"Date",s[c]=h+"Month",s[u]=h+"FullYear",s[o]=h+"Hours",s[n]=h+"Minutes",s[i]=h+"Seconds",s[r]=h+"Milliseconds",s)[l],f=l===a?this.$D+(t-this.$W):t;if(l===c||l===u){var g=this.clone().set(d,1);g.$d[p](f),g.init(),this.$d=g.set(d,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},m.set=function(e,t){return this.clone().$set(e,t)},m.get=function(e){return this[C.p(e)]()},m.add=function(r,l){var d,h=this;r=Number(r);var p=C.p(l),f=function(e){var t=E(h);return C.w(t.date(t.date()+Math.round(e*r)),h)};if(p===c)return this.set(c,this.$M+r);if(p===u)return this.set(u,this.$y+r);if(p===a)return f(1);if(p===s)return f(7);var g=(d={},d[n]=e,d[o]=t,d[i]=1e3,d)[p]||1,m=this.$d.getTime()+r*g;return C.w(m,this)},m.subtract=function(e,t){return this.add(-1*e,t)},m.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||h;var i=e||"YYYY-MM-DDTHH:mm:ssZ",n=C.z(this),o=this.$H,a=this.$m,s=this.$M,c=r.weekdays,l=r.months,u=r.meridiem,d=function(e,r,n,o){return e&&(e[r]||e(t,i))||n[r].slice(0,o)},p=function(e){return C.s(o%12||12,e,"0")},g=u||function(e,t,r){var i=e<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(f,(function(e,i){return i||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return C.s(t.$y,4,"0");case"M":return s+1;case"MM":return C.s(s+1,2,"0");case"MMM":return d(r.monthsShort,s,l,3);case"MMMM":return d(l,s);case"D":return t.$D;case"DD":return C.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(r.weekdaysMin,t.$W,c,2);case"ddd":return d(r.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(o);case"HH":return C.s(o,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return g(o,a,!0);case"A":return g(o,a,!1);case"m":return String(a);case"mm":return C.s(a,2,"0");case"s":return String(t.$s);case"ss":return C.s(t.$s,2,"0");case"SSS":return C.s(t.$ms,3,"0");case"Z":return n}return null}(e)||n.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,h){var p,f=this,g=C.p(d),m=E(r),b=(m.utcOffset()-this.utcOffset())*e,y=this-m,w=function(){return C.m(f,m)};switch(g){case u:p=w()/12;break;case c:p=w();break;case l:p=w()/3;break;case s:p=(y-b)/6048e5;break;case a:p=(y-b)/864e5;break;case o:p=y/t;break;case n:p=y/e;break;case i:p=y/1e3;break;default:p=y}return h?p:C.a(p)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return w[this.$L]},m.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),i=x(e,t,!0);return i&&(r.$L=i),r},m.clone=function(){return C.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},g}(),P=k.prototype;return E.prototype=P,[["$ms",r],["$s",i],["$m",n],["$H",o],["$W",a],["$M",c],["$y",u],["$D",d]].forEach((function(e){P[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),E.extend=function(e,t){return e.$i||(e(t,k,E),e.$i=!0),E},E.locale=x,E.isDayjs=_,E.unix=function(e){return E(1e3*e)},E.en=w[y],E.Ls=w,E.p={},E},"object"==typeof e&&typeof t<"u"?t.exports=i():"function"==typeof define&&define.amd?define(i):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=i()})),vA=s(((e,t)=>{var r,i;r=e,i=function(){"use strict";return function(e,t,r){r.updateLocale=function(e,t){var i=r.Ls[e];if(i)return(t?Object.keys(t):[]).forEach((function(e){i[e]=t[e]})),i}}},"object"==typeof e&&typeof t<"u"?t.exports=i():"function"==typeof define&&define.amd?define(i):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_updateLocale=i()})),_A=s(((e,t)=>{var r,i;r=e,i=function(){"use strict";return function(e,t,r){e=e||{};var i=t.prototype,n={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function o(e,t,r,n){return i.fromToBase(e,t,r,n)}r.en.relativeTime=n,i.fromToBase=function(t,i,o,a,s){for(var c,l,u,d=o.$locale().relativeTime||n,h=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],p=h.length,f=0;f<p;f+=1){var g=h[f];g.d&&(c=a?r(t).diff(o,g.d,!0):o.diff(t,g.d,!0));var m=(e.rounding||Math.round)(Math.abs(c));if(u=c>0,m<=g.r||!g.r){m<=1&&f>0&&(g=h[f-1]);var b=d[g.l];s&&(m=s(""+m)),l="string"==typeof b?b.replace("%d",m):b(m,i,g.l,u);break}}if(i)return l;var y=u?d.future:d.past;return"function"==typeof y?y(l):y.replace("%s",l)},i.to=function(e,t){return o(e,t,this,!0)},i.from=function(e,t){return o(e,t,this)};var a=function(e){return e.$u?r.utc():r()};i.toNow=function(e){return this.to(a(this),e)},i.fromNow=function(e){return this.from(a(this),e)}}},"object"==typeof e&&typeof t<"u"?t.exports=i():"function"==typeof define&&define.amd?define(i):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_relativeTime=i()})),xA=a((()=>{QS=d(wA(),1),XS=d(vA(),1),eA=d(_A(),1),QS.default.extend(eA.default),QS.default.extend(XS.default),QS.default.updateLocale("en",{relativeTime:{future:"in %s",past:"%s ago",s:"%s sec",m:"1 min",mm:"%d min",h:"1 hr",hh:"%d hrs",d:"1 d",dd:"%d d",M:"1 mo",MM:"%d mo",y:"1 yr",yy:"%d yr"}}),tA={getYear:(e=(new Date).toISOString())=>(0,QS.default)(e).year(),getRelativeDateFromNow:e=>(0,QS.default)(e).fromNow(!0),formatDate:(e,t="DD MMM")=>(0,QS.default)(e).format(t)}})),EA=a((()=>{rA={caipNetworkIdToNumber:e=>e?Number(e.split(":")[1]):void 0}}));function CA(e){var t,r,i,n,o,a=v.prototype={constructor:v,toString:null,valueOf:null},s=new v(1),c=20,l=4,u=-7,d=21,h=-1e7,p=1e7,f=!1,g=1,m=0,b={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},y="0123456789abcdefghijklmnopqrstuvwxyz",w=!0;function v(e,t){var n,o,a,s,u,d,f,g,m=this;if(!(m instanceof v))return new v(e,t);if(null==t){if(e&&!0===e._isBigNumber)return m.s=e.s,void(!e.c||e.e>p?m.c=m.e=null:e.e<h?m.c=[m.e=0]:(m.e=e.e,m.c=e.c.slice()));if((d="number"==typeof e)&&0*e==0){if(m.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,u=e;u>=10;u/=10,s++);return void(s>p?m.c=m.e=null:(m.e=s,m.c=[e]))}g=String(e)}else{if(!RA.test(g=String(e)))return i(m,g,d);m.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(s=g.indexOf("."))>-1&&(g=g.replace(".","")),(u=g.search(/e/i))>0?(s<0&&(s=u),s+=+g.slice(u+1),g=g.substring(0,u)):s<0&&(s=g.length)}else{if(SA(t,2,y.length,"Base"),10==t&&w)return C(m=new v(e),c+m.e+1,l);if(g=String(e),d="number"==typeof e){if(0*e!=0)return i(m,g,d,t);if(m.s=1/e<0?(g=g.slice(1),-1):1,v.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(jA+e)}else m.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(n=y.slice(0,t),s=u=0,f=g.length;u<f;u++)if(n.indexOf(o=g.charAt(u))<0){if("."==o){if(u>s){s=f;continue}}else if(!a&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){a=!0,u=-1,s=0;continue}return i(m,String(e),d,t)}d=!1,(s=(g=r(g,t,10,m.s)).indexOf("."))>-1?g=g.replace(".",""):s=g.length}for(u=0;48===g.charCodeAt(u);u++);for(f=g.length;48===g.charCodeAt(--f););if(g=g.slice(u,++f)){if(f-=u,d&&v.DEBUG&&f>15&&(e>DA||e!==MA(e)))throw Error(jA+m.s*e);if((s=s-u-1)>p)m.c=m.e=null;else if(s<h)m.c=[m.e=0];else{if(m.e=s,m.c=[],u=(s+1)%BA,s<0&&(u+=BA),u<f){for(u&&m.c.push(+g.slice(0,u)),f-=BA;u<f;)m.c.push(+g.slice(u,u+=BA));u=BA-(g=g.slice(u)).length}else u-=f;for(;u--;g+="0");m.c.push(+g)}}else m.c=[m.e=0]}function _(e,t,r,i){var n,o,a,s,c;if(null==r?r=l:SA(r,0,8),!e.c)return e.toString();if(n=e.c[0],a=e.e,null==t)c=PA(e.c),c=1==i||2==i&&(a<=u||a>=d)?TA(c,a):OA(c,a,"0");else if(o=(e=C(new v(e),t,r)).e,s=(c=PA(e.c)).length,1==i||2==i&&(t<=o||o<=u)){for(;s<t;c+="0",s++);c=TA(c,o)}else if(t-=a,c=OA(c,o,"0"),o+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=o-s)>0)for(o+1==s&&(c+=".");t--;c+="0");return e.s<0&&n?"-"+c:c}function x(e,t){for(var r,i,n=1,o=new v(e[0]);n<e.length;n++)(!(i=new v(e[n])).s||(r=IA(o,i))===t||0===r&&o.s===t)&&(o=i);return o}function E(e,t,r){for(var i=1,n=t.length;!t[--n];t.pop());for(n=t[0];n>=10;n/=10,i++);return(r=i+r*BA-1)>p?e.c=e.e=null:r<h?e.c=[e.e=0]:(e.e=r,e.c=t),e}function C(e,t,r,i){var n,o,a,s,c,l,u,d=e.c,f=UA;if(d){e:{for(n=1,s=d[0];s>=10;s/=10,n++);if((o=t-n)<0)o+=BA,a=t,c=d[l=0],u=MA(c/f[n-a-1]%10);else if((l=NA((o+1)/BA))>=d.length){if(!i)break e;for(;d.length<=l;d.push(0));c=u=0,n=1,a=(o%=BA)-BA+1}else{for(c=s=d[l],n=1;s>=10;s/=10,n++);u=(a=(o%=BA)-BA+n)<0?0:MA(c/f[n-a-1]%10)}if(i=i||t<0||null!=d[l+1]||(a<0?c:c%f[n-a-1]),i=r<4?(u||i)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||i||6==r&&(o>0?a>0?c/f[n-a]:0:d[l-1])%10&1||r==(e.s<0?8:7)),t<1||!d[0])return d.length=0,i?(t-=e.e+1,d[0]=f[(BA-t%BA)%BA],e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=l,s=1,l--):(d.length=l+1,s=f[BA-o],d[l]=a>0?MA(c/f[n-a]%f[a])*s:0),i)for(;;){if(0==l){for(o=1,a=d[0];a>=10;a/=10,o++);for(a=d[0]+=s,s=1;a>=10;a/=10,s++);o!=s&&(e.e++,d[0]==LA&&(d[0]=1));break}if(d[l]+=s,d[l]!=LA)break;d[l--]=0,s=1}for(o=d.length;0===d[--o];d.pop());}e.e>p?e.c=e.e=null:e.e<h&&(e.c=[e.e=0])}return e}function k(e){var t,r=e.e;return null===r?e.toString():(t=PA(e.c),t=r<=u||r>=d?TA(t,r):OA(t,r,"0"),e.s<0?"-"+t:t)}return v.clone=CA,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error($A+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(SA(r=e[t],0,HA,t),c=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(SA(r=e[t],0,8,t),l=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(SA(r[0],-HA,0,t),SA(r[1],0,HA,t),u=r[0],d=r[1]):(SA(r,-HA,HA,t),u=-(d=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)SA(r[0],-HA,-1,t),SA(r[1],1,HA,t),h=r[0],p=r[1];else{if(SA(r,-HA,HA,t),!r)throw Error($A+t+" cannot be zero: "+r);h=-(p=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error($A+t+" not true or false: "+r);if(r){if(!(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes)))throw f=!r,Error($A+"crypto unavailable");f=r}else f=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(SA(r=e[t],0,9,t),g=r),e.hasOwnProperty(t="POW_PRECISION")&&(SA(r=e[t],0,HA,t),m=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error($A+t+" not an object: "+r);b=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error($A+t+" invalid: "+r);w="0123456789"==r.slice(0,10),y=r}}return{DECIMAL_PLACES:c,ROUNDING_MODE:l,EXPONENTIAL_AT:[u,d],RANGE:[h,p],CRYPTO:f,MODULO_MODE:g,POW_PRECISION:m,FORMAT:b,ALPHABET:y}},v.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!v.DEBUG)return!0;var t,r,i=e.c,n=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(i)){if((1===o||-1===o)&&n>=-HA&&n<=HA&&n===MA(n)){if(0===i[0]){if(0===n&&1===i.length)return!0;break e}if((t=(n+1)%BA)<1&&(t+=BA),String(i[0]).length==t){for(t=0;t<i.length;t++)if((r=i[t])<0||r>=LA||r!==MA(r))break e;if(0!==r)return!0}}}else if(null===i&&null===n&&(null===o||1===o||-1===o))return!0;throw Error($A+"Invalid BigNumber: "+e)},v.maximum=v.max=function(){return x(arguments,-1)},v.minimum=v.min=function(){return x(arguments,1)},v.random=(n=9007199254740992,o=Math.random()*n&2097151?function(){return MA(Math.random()*n)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,i,n,a,l=0,u=[],d=new v(s);if(null==e?e=c:SA(e,0,HA),n=NA(e/BA),f)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(n*=2));l<n;)(a=131072*t[l]+(t[l+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[l]=r[0],t[l+1]=r[1]):(u.push(a%1e14),l+=2);l=n/2}else{if(!crypto.randomBytes)throw f=!1,Error($A+"crypto unavailable");for(t=crypto.randomBytes(n*=7);l<n;)(a=281474976710656*(31&t[l])+1099511627776*t[l+1]+4294967296*t[l+2]+16777216*t[l+3]+(t[l+4]<<16)+(t[l+5]<<8)+t[l+6])>=9e15?crypto.randomBytes(7).copy(t,l):(u.push(a%1e14),l+=7);l=n/7}if(!f)for(;l<n;)(a=o())<9e15&&(u[l++]=a%1e14);for(n=u[--l],e%=BA,n&&e&&(a=UA[BA-e],u[l]=MA(n/a)*a);0===u[l];u.pop(),l--);if(l<0)u=[i=0];else{for(i=-1;0===u[0];u.splice(0,1),i-=BA);for(l=1,a=u[0];a>=10;a/=10,l++);l<BA&&(i-=BA-l)}return d.e=i,d.c=u,d}),v.sum=function(){for(var e=1,t=arguments,r=new v(t[0]);e<t.length;)r=r.plus(t[e++]);return r},r=function(){var e="0123456789";function r(e,t,r,i){for(var n,o,a=[0],s=0,c=e.length;s<c;){for(o=a.length;o--;a[o]*=t);for(a[0]+=i.indexOf(e.charAt(s++)),n=0;n<a.length;n++)a[n]>r-1&&(null==a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}return function(i,n,o,a,s){var u,d,h,p,f,g,b,w,_=i.indexOf("."),x=c,E=l;for(_>=0&&(p=m,m=0,i=i.replace(".",""),g=(w=new v(n)).pow(i.length-_),m=p,w.c=r(OA(PA(g.c),g.e,"0"),10,o,e),w.e=w.c.length),h=p=(b=r(i,n,o,s?(u=y,e):(u=e,y))).length;0==b[--p];b.pop());if(!b[0])return u.charAt(0);if(_<0?--h:(g.c=b,g.e=h,g.s=a,b=(g=t(g,w,x,E,o)).c,f=g.r,h=g.e),_=b[d=h+x+1],p=o/2,f=f||d<0||null!=b[d+1],f=E<4?(null!=_||f)&&(0==E||E==(g.s<0?3:2)):_>p||_==p&&(4==E||f||6==E&&1&b[d-1]||E==(g.s<0?8:7)),d<1||!b[0])i=f?OA(u.charAt(1),-x,u.charAt(0)):u.charAt(0);else{if(b.length=d,f)for(--o;++b[--d]>o;)b[d]=0,d||(++h,b=[1].concat(b));for(p=b.length;!b[--p];);for(_=0,i="";_<=p;i+=u.charAt(b[_++]));i=OA(i,h,u.charAt(0))}return i}}(),t=function(){function e(e,t,r){var i,n,o,a,s=0,c=e.length,l=t%FA,u=t/FA|0;for(e=e.slice();c--;)s=((n=l*(o=e[c]%FA)+(i=u*o+(a=e[c]/FA|0)*l)%FA*FA+s)/r|0)+(i/FA|0)+u*a,e[c]=n%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,i){var n,o;if(r!=i)o=r>i?1:-1;else for(n=o=0;n<r;n++)if(e[n]!=t[n]){o=e[n]>t[n]?1:-1;break}return o}function r(e,t,r,i){for(var n=0;r--;)e[r]-=n,n=e[r]<t[r]?1:0,e[r]=n*i+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(i,n,o,a,s){var c,l,u,d,h,p,f,g,m,b,y,w,_,x,E,k,P,I=i.s==n.s?1:-1,S=i.c,A=n.c;if(!(S&&S[0]&&A&&A[0]))return new v(i.s&&n.s&&(S?!A||S[0]!=A[0]:A)?S&&0==S[0]||!A?0*I:I/0:NaN);for(m=(g=new v(I)).c=[],I=o+(l=i.e-n.e)+1,s||(s=LA,l=kA(i.e/BA)-kA(n.e/BA),I=I/BA|0),u=0;A[u]==(S[u]||0);u++);if(A[u]>(S[u]||0)&&l--,I<0)m.push(1),d=!0;else{for(x=S.length,k=A.length,u=0,I+=2,(h=MA(s/(A[0]+1)))>1&&(A=e(A,h,s),S=e(S,h,s),k=A.length,x=S.length),_=k,y=(b=S.slice(0,k)).length;y<k;b[y++]=0);P=A.slice(),P=[0].concat(P),E=A[0],A[1]>=s/2&&E++;do{if(h=0,(c=t(A,b,k,y))<0){if(w=b[0],k!=y&&(w=w*s+(b[1]||0)),(h=MA(w/E))>1)for(h>=s&&(h=s-1),f=(p=e(A,h,s)).length,y=b.length;1==t(p,b,f,y);)h--,r(p,k<f?P:A,f,s),f=p.length,c=1;else 0==h&&(c=h=1),f=(p=A.slice()).length;if(f<y&&(p=[0].concat(p)),r(b,p,y,s),y=b.length,-1==c)for(;t(A,b,k,y)<1;)h++,r(b,k<y?P:A,y,s),y=b.length}else 0===c&&(h++,b=[0]);m[u++]=h,b[0]?b[y++]=S[_]||0:(b=[S[_]],y=1)}while((_++<x||null!=b[0])&&I--);d=null!=b[0],m[0]||m.splice(0,1)}if(s==LA){for(u=1,I=m[0];I>=10;I/=10,u++);C(g,o+(g.e=u+l*BA-1)+1,a,d)}else g.e=l,g.r=+d;return g}}(),i=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,n=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,s,c){var l,u=s?a:a.replace(n,"");if(i.test(u))o.s=isNaN(u)?null:u<0?-1:1;else{if(!s&&(u=u.replace(e,(function(e,t,r){return l="x"==(r=r.toLowerCase())?16:"b"==r?2:8,c&&c!=l?e:t})),c&&(l=c,u=u.replace(t,"$1").replace(r,"0.$1")),a!=u))return new v(u,l);if(v.DEBUG)throw Error($A+"Not a"+(c?" base "+c:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),a.absoluteValue=a.abs=function(){var e=new v(this);return e.s<0&&(e.s=1),e},a.comparedTo=function(e,t){return IA(this,new v(e,t))},a.decimalPlaces=a.dp=function(e,t){var r,i,n,o=this;if(null!=e)return SA(e,0,HA),null==t?t=l:SA(t,0,8),C(new v(o),e+o.e+1,t);if(!(r=o.c))return null;if(i=((n=r.length-1)-kA(this.e/BA))*BA,n=r[n])for(;n%10==0;n/=10,i--);return i<0&&(i=0),i},a.dividedBy=a.div=function(e,r){return t(this,new v(e,r),c,l)},a.dividedToIntegerBy=a.idiv=function(e,r){return t(this,new v(e,r),0,1)},a.exponentiatedBy=a.pow=function(e,t){var r,i,n,o,a,c,u,d,h=this;if((e=new v(e)).c&&!e.isInteger())throw Error($A+"Exponent not an integer: "+k(e));if(null!=t&&(t=new v(t)),a=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return d=new v(Math.pow(+k(h),a?e.s*(2-AA(e)):+k(e))),t?d.mod(t):d;if(c=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new v(NaN);(i=!c&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||a&&h.c[1]>=24e7:h.c[0]<8e13||a&&h.c[0]<=9999975e7)))return o=h.s<0&&AA(e)?-0:0,h.e>-1&&(o=1/o),new v(c?1/o:o);m&&(o=NA(m/BA+2))}for(a?(r=new v(.5),c&&(e.s=1),u=AA(e)):u=(n=Math.abs(+k(e)))%2,d=new v(s);;){if(u){if(!(d=d.times(h)).c)break;o?d.c.length>o&&(d.c.length=o):i&&(d=d.mod(t))}if(n){if(0===(n=MA(n/2)))break;u=n%2}else if(C(e=e.times(r),e.e+1,1),e.e>14)u=AA(e);else{if(0===(n=+k(e)))break;u=n%2}h=h.times(h),o?h.c&&h.c.length>o&&(h.c.length=o):i&&(h=h.mod(t))}return i?d:(c&&(d=s.div(d)),t?d.mod(t):o?C(d,m,l,undefined):d)},a.integerValue=function(e){var t=new v(this);return null==e?e=l:SA(e,0,8),C(t,t.e+1,e)},a.isEqualTo=a.eq=function(e,t){return 0===IA(this,new v(e,t))},a.isFinite=function(){return!!this.c},a.isGreaterThan=a.gt=function(e,t){return IA(this,new v(e,t))>0},a.isGreaterThanOrEqualTo=a.gte=function(e,t){return 1===(t=IA(this,new v(e,t)))||0===t},a.isInteger=function(){return!!this.c&&kA(this.e/BA)>this.c.length-2},a.isLessThan=a.lt=function(e,t){return IA(this,new v(e,t))<0},a.isLessThanOrEqualTo=a.lte=function(e,t){return-1===(t=IA(this,new v(e,t)))||0===t},a.isNaN=function(){return!this.s},a.isNegative=function(){return this.s<0},a.isPositive=function(){return this.s>0},a.isZero=function(){return!!this.c&&0==this.c[0]},a.minus=function(e,t){var r,i,n,o,a=this,s=a.s;if(t=(e=new v(e,t)).s,!s||!t)return new v(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/BA,u=e.e/BA,d=a.c,h=e.c;if(!c||!u){if(!d||!h)return d?(e.s=-t,e):new v(h?a:NaN);if(!d[0]||!h[0])return h[0]?(e.s=-t,e):new v(d[0]?a:3==l?-0:0)}if(c=kA(c),u=kA(u),d=d.slice(),s=c-u){for((o=s<0)?(s=-s,n=d):(u=c,n=h),n.reverse(),t=s;t--;n.push(0));n.reverse()}else for(i=(o=(s=d.length)<(t=h.length))?s:t,s=t=0;t<i;t++)if(d[t]!=h[t]){o=d[t]<h[t];break}if(o&&(n=d,d=h,h=n,e.s=-e.s),(t=(i=h.length)-(r=d.length))>0)for(;t--;d[r++]=0);for(t=LA-1;i>s;){if(d[--i]<h[i]){for(r=i;r&&!d[--r];d[r]=t);--d[r],d[i]+=LA}d[i]-=h[i]}for(;0==d[0];d.splice(0,1),--u);return d[0]?E(e,d,u):(e.s=3==l?-1:1,e.c=[e.e=0],e)},a.modulo=a.mod=function(e,r){var i,n,o=this;return e=new v(e,r),!o.c||!e.s||e.c&&!e.c[0]?new v(NaN):!e.c||o.c&&!o.c[0]?new v(o):(9==g?(n=e.s,e.s=1,i=t(o,e,0,3),e.s=n,i.s*=n):i=t(o,e,0,g),!(e=o.minus(i.times(e))).c[0]&&1==g&&(e.s=o.s),e)},a.multipliedBy=a.times=function(e,t){var r,i,n,o,a,s,c,l,u,d,h,p,f,g,m,b=this,y=b.c,w=(e=new v(e,t)).c;if(!(y&&w&&y[0]&&w[0]))return!b.s||!e.s||y&&!y[0]&&!w||w&&!w[0]&&!y?e.c=e.e=e.s=null:(e.s*=b.s,y&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(i=kA(b.e/BA)+kA(e.e/BA),e.s*=b.s,(c=y.length)<(d=w.length)&&(f=y,y=w,w=f,n=c,c=d,d=n),n=c+d,f=[];n--;f.push(0));for(g=LA,m=FA,n=d;--n>=0;){for(r=0,h=w[n]%m,p=w[n]/m|0,o=n+(a=c);o>n;)r=((l=h*(l=y[--a]%m)+(s=p*l+(u=y[a]/m|0)*h)%m*m+f[o]+r)/g|0)+(s/m|0)+p*u,f[o--]=l%g;f[o]=r}return r?++i:f.splice(0,1),E(e,f,i)},a.negated=function(){var e=new v(this);return e.s=-e.s||null,e},a.plus=function(e,t){var r,i=this,n=i.s;if(t=(e=new v(e,t)).s,!n||!t)return new v(NaN);if(n!=t)return e.s=-t,i.minus(e);var o=i.e/BA,a=e.e/BA,s=i.c,c=e.c;if(!o||!a){if(!s||!c)return new v(n/0);if(!s[0]||!c[0])return c[0]?e:new v(s[0]?i:0*n)}if(o=kA(o),a=kA(a),s=s.slice(),n=o-a){for(n>0?(a=o,r=c):(n=-n,r=s),r.reverse();n--;r.push(0));r.reverse()}for((n=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=n),n=0;t;)n=(s[--t]=s[t]+c[t]+n)/LA|0,s[t]=LA===s[t]?0:s[t]%LA;return n&&(s=[n].concat(s),++a),E(e,s,a)},a.precision=a.sd=function(e,t){var r,i,n,o=this;if(null!=e&&e!==!!e)return SA(e,1,HA),null==t?t=l:SA(t,0,8),C(new v(o),e,t);if(!(r=o.c))return null;if(i=(n=r.length-1)*BA+1,n=r[n]){for(;n%10==0;n/=10,i--);for(n=r[0];n>=10;n/=10,i++);}return e&&o.e+1>i&&(i=o.e+1),i},a.shiftedBy=function(e){return SA(e,-DA,DA),this.times("1e"+e)},a.squareRoot=a.sqrt=function(){var e,r,i,n,o,a=this,s=a.c,u=a.s,d=a.e,h=c+4,p=new v("0.5");if(1!==u||!s||!s[0])return new v(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+k(a)))||u==1/0?(((r=PA(s)).length+d)%2==0&&(r+="0"),u=Math.sqrt(+r),d=kA((d+1)/2)-(d<0||d%2),u==1/0?r="5e"+d:r=(r=u.toExponential()).slice(0,r.indexOf("e")+1)+d,i=new v(r)):i=new v(u+""),i.c[0])for((u=(d=i.e)+h)<3&&(u=0);;)if(o=i,i=p.times(o.plus(t(a,o,h,1))),PA(o.c).slice(0,u)===(r=PA(i.c)).slice(0,u)){if(i.e<d&&--u,"9999"!=(r=r.slice(u-3,u+1))&&(n||"4999"!=r)){(!+r||!+r.slice(1)&&"5"==r.charAt(0))&&(C(i,i.e+c+2,1),e=!i.times(i).eq(a));break}if(!n&&(C(o,o.e+c+2,0),o.times(o).eq(a))){i=o;break}h+=4,u+=4,n=1}return C(i,i.e+c+1,l,e)},a.toExponential=function(e,t){return null!=e&&(SA(e,0,HA),e++),_(this,e,t,1)},a.toFixed=function(e,t){return null!=e&&(SA(e,0,HA),e=e+this.e+1),_(this,e,t)},a.toFormat=function(e,t,r){var i,n=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=b;else if("object"!=typeof r)throw Error($A+"Argument not an object: "+r);if(i=n.toFixed(e,t),n.c){var o,a=i.split("."),s=+r.groupSize,c=+r.secondaryGroupSize,l=r.groupSeparator||"",u=a[0],d=a[1],h=n.s<0,p=h?u.slice(1):u,f=p.length;if(c&&(o=s,s=c,c=o,f-=o),s>0&&f>0){for(o=f%s||s,u=p.substr(0,o);o<f;o+=s)u+=l+p.substr(o,s);c>0&&(u+=l+p.slice(o)),h&&(u="-"+u)}i=d?u+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?d.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):d):u}return(r.prefix||"")+i+(r.suffix||"")},a.toFraction=function(e){var r,i,n,o,a,c,u,d,h,f,g,m,b=this,y=b.c;if(null!=e&&(!(u=new v(e)).isInteger()&&(u.c||1!==u.s)||u.lt(s)))throw Error($A+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+k(u));if(!y)return new v(b);for(r=new v(s),h=i=new v(s),n=d=new v(s),m=PA(y),a=r.e=m.length-b.e-1,r.c[0]=UA[(c=a%BA)<0?BA+c:c],e=!e||u.comparedTo(r)>0?a>0?r:h:u,c=p,p=1/0,u=new v(m),d.c[0]=0;f=t(u,r,0,1),1!=(o=i.plus(f.times(n))).comparedTo(e);)i=n,n=o,h=d.plus(f.times(o=h)),d=o,r=u.minus(f.times(o=r)),u=o;return o=t(e.minus(i),n,0,1),d=d.plus(o.times(h)),i=i.plus(o.times(n)),d.s=h.s=b.s,g=t(h,n,a*=2,l).minus(b).abs().comparedTo(t(d,i,a,l).minus(b).abs())<1?[h,n]:[d,i],p=c,g},a.toNumber=function(){return+k(this)},a.toPrecision=function(e,t){return null!=e&&SA(e,1,HA),_(this,e,t,2)},a.toString=function(e){var t,i=this,n=i.s,o=i.e;return null===o?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=o<=u||o>=d?TA(PA(i.c),o):OA(PA(i.c),o,"0"):10===e&&w?t=OA(PA((i=C(new v(i),c+o+1,l)).c),i.e,"0"):(SA(e,2,y.length,"Base"),t=r(OA(PA(i.c),o,"0"),10,e,n,!0)),n<0&&i.c[0]&&(t="-"+t)),t},a.valueOf=a.toJSON=function(){return k(this)},a._isBigNumber=!0,a[Symbol.toStringTag]="BigNumber",a[Symbol.for("nodejs.util.inspect.custom")]=a.valueOf,null!=e&&v.set(e),v}function kA(e){var t=0|e;return e>0||e===t?t:t-1}function PA(e){for(var t,r,i=1,n=e.length,o=e[0]+"";i<n;){for(t=e[i++]+"",r=BA-t.length;r--;t="0"+t);o+=t}for(n=o.length;48===o.charCodeAt(--n););return o.slice(0,n+1||1)}function IA(e,t){var r,i,n=e.c,o=t.c,a=e.s,s=t.s,c=e.e,l=t.e;if(!a||!s)return null;if(r=n&&!n[0],i=o&&!o[0],r||i)return r?i?0:-s:a;if(a!=s)return a;if(r=a<0,i=c==l,!n||!o)return i?0:!n^r?1:-1;if(!i)return c>l^r?1:-1;for(s=(c=n.length)<(l=o.length)?c:l,a=0;a<s;a++)if(n[a]!=o[a])return n[a]>o[a]^r?1:-1;return c==l?0:c>l^r?1:-1}function SA(e,t,r,i){if(e<t||e>r||e!==MA(e))throw Error($A+(i||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function AA(e){var t=e.c.length-1;return kA(e.e/BA)==t&&e.c[t]%2!=0}function TA(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function OA(e,t,r){var i,n;if(t<0){for(n=r+".";++t;n+=r);e=n+e}else if(++t>(i=e.length)){for(n=r,t-=i;--t;n+=r);e+=n}else t<i&&(e=e.slice(0,t)+"."+e.slice(t));return e}var RA,NA,MA,$A,jA,LA,BA,DA,UA,FA,HA,zA,qA,WA,VA,GA,ZA,KA,YA,JA,QA,XA,eT,tT,rT,iT,nT,oT,aT,sT,cT,lT,uT,dT,hT,pT,fT,gT,mT,bT,yT,wT,vT,_T,xT,ET,CT,kT,PT,IT,ST,AT,TT,OT,RT,NT,MT,$T,jT,LT,BT,DT,UT,FT,HT,zT,qT,WT=a((()=>{RA=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,NA=Math.ceil,MA=Math.floor,jA=($A="[BigNumber Error] ")+"Number primitive has more than 15 significant digits: ",LA=1e14,BA=14,DA=9007199254740991,UA=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],FA=1e7,HA=1e9,zA=CA(),qA=zA})),VT=a((()=>{WT(),WA={bigNumber:e=>new qA(e),multiply(e,t){if(void 0===e||void 0===t)return qA(0);let r=new qA(e),i=new qA(t);return r.multipliedBy(i)}}})),GT=a((()=>{xA(),EA(),VT()})),ZT=a((()=>{pA(),Op(),yA(),gA(),iO(),oA(),GT(),VA=_p({supportsAllNetworks:!0,isDefaultCaipNetwork:!1,smartAccountEnabledNetworks:[]}),GA={state:VA,subscribe:e=>xp(VA,(()=>e(VA))),subscribeKey:(e,t)=>xS(VA,e,t),_getClient(){if(!VA._client)throw new Error("NetworkController client not set");return VA._client},setClient(e){VA._client=Cp(e)},setCaipNetwork(e){VA.caipNetwork=e,JS.set({selectedNetworkId:e?.id}),this.state.allowUnsupportedChain||this.checkIfSupportedNetwork()},setDefaultCaipNetwork(e){VA.caipNetwork=e,JS.set({selectedNetworkId:e?.id}),VA.isDefaultCaipNetwork=!0},setRequestedCaipNetworks(e){VA.requestedCaipNetworks=e},setAllowUnsupportedChain(e){VA.allowUnsupportedChain=e},setSmartAccountEnabledNetworks(e){VA.smartAccountEnabledNetworks=e},getRequestedCaipNetworks(){let{approvedCaipNetworkIds:e,requestedCaipNetworks:t}=VA,r=e,i=t;return PS.sortRequestedNetworks(r,i)},async getApprovedCaipNetworksData(){let e=await this._getClient().getApprovedCaipNetworksData();VA.supportsAllNetworks=e.supportsAllNetworks,VA.approvedCaipNetworkIds=e.approvedCaipNetworkIds},async switchActiveNetwork(e){await this._getClient().switchCaipNetwork(e),VA.caipNetwork=e,e&&WS.sendEvent({type:"track",event:"SWITCH_NETWORK",properties:{network:e.id}})},checkIfSupportedNetwork(){VA.isUnsupportedChain=!VA.requestedCaipNetworks?.some((e=>e.id===VA.caipNetwork?.id)),VA.isUnsupportedChain&&this.showUnsupportedChainUI()},checkIfSmartAccountEnabled(){let e=rA.caipNetworkIdToNumber(VA.caipNetwork?.id);return!!e&&!!VA.smartAccountEnabledNetworks?.includes(e)},resetNetwork(){VA.isDefaultCaipNetwork||(VA.caipNetwork=void 0),VA.approvedCaipNetworkIds=void 0,VA.supportsAllNetworks=!0,VA.smartAccountEnabledNetworks=[]},showUnsupportedChainUI(){setTimeout((()=>{hT.open({view:"UnsupportedChain"})}),300)}}})),KT=a((()=>{ZT(),QT(),bA(),nA(),cA(),sA(),ZA={getTokenList:async()=>(await NS.fetchConvertTokens({chainId:GA.state.caipNetwork?.id,projectId:AS.state.projectId})).tokens.map((e=>({...e,eip2612:!1,quantity:{decimals:"0",numeric:"0"},price:0,value:0}))),async fetchGasPrice(){let e=AS.state.projectId,t=GA.state.caipNetwork;return t?await NS.fetchGasPrice({projectId:e,chainId:t.id}):null},async fetchConvertAllowance({tokenAddress:e,userAddress:t,sourceTokenAmount:r,sourceTokenDecimals:i}){let n=AS.state.projectId,o=await NS.fetchConvertAllowance({projectId:n,tokenAddress:e,userAddress:t});if(o?.allowance&&r&&i){let e=KS.parseUnits(r,i);return BigInt(o.allowance)>=e}return!1},async getMyTokensWithBalance(){let e=eT.state.address,t=GA.state.caipNetwork;if(!e||!t)return[];let r=(await NS.getBalance(e,t.id)).balances;return this.mapBalancesToConvertTokens(r)},mapBalancesToConvertTokens:e=>e.map((e=>({symbol:e.symbol,name:e.name,address:e?.address?e.address:`${GA.state.caipNetwork?.id}:${kS.NATIVE_TOKEN_ADDRESS}`,decimals:parseInt(e.quantity.decimals,10),logoUri:e.iconUrl,eip2612:!1,quantity:e.quantity,price:e.price,value:e.value})))}})),YT=a((()=>{iA(),Op(),KA=_p({view:"Connect",history:["Connect"],transactionStack:[]}),YA={state:KA,subscribeKey:(e,t)=>xS(KA,e,t),pushTransactionStack(e){KA.transactionStack.push(e)},popTransactionStack(e){let t=KA.transactionStack.pop();t&&(e?(this.goBack(),t?.onCancel?.()):(t.goBack?this.goBack():t.view&&this.reset(t.view),t?.onSuccess?.()))},push(e,t){e!==KA.view&&(KA.view=e,KA.history.push(e),KA.data=t)},reset(e){KA.view=e,KA.history=[e]},replace(e,t){KA.history.length>1&&KA.history.at(-1)!==e&&(KA.view=e,KA.history[KA.history.length-1]=e,KA.data=t)},goBack(){if(KA.history.length>1){KA.history.pop();let[e]=KA.history.slice(-1);e&&(KA.view=e)}},goBackToIndex(e){if(KA.history.length>1){KA.history=KA.history.slice(0,e+1);let[t]=KA.history.slice(-1);t&&(KA.view=t)}}}})),JT=a((()=>{pA(),Op(),QT(),nA(),bA(),KT(),lA(),YT(),GT(),ZT(),oA(),cA(),sA(),15e4,JA=_p({initialized:!1,loading:!1,loadingPrices:!1,approvalTransaction:void 0,convertTransaction:void 0,transactionError:void 0,transactionLoading:!1,sourceToken:void 0,sourceTokenAmount:"",sourceTokenPriceInUSD:0,toToken:void 0,toTokenAmount:"",toTokenPriceInUSD:0,networkPrice:"0",networkBalanceInUSD:"0",inputError:void 0,slippage:kS.CONVERT_SLIPPAGE_TOLERANCE,tokens:void 0,popularTokens:void 0,suggestedTokens:void 0,foundTokens:void 0,myTokensWithBalance:void 0,tokensPriceMap:{},gasFee:BigInt(0),gasPriceInUSD:0,priceImpact:void 0,maxSlippage:void 0}),QA={state:JA,subscribe:e=>xp(JA,(()=>e(JA))),subscribeKey:(e,t)=>xS(JA,e,t),getParams(){let{address:e}=eT.state,t=`${GA.state.caipNetwork?.id}:${kS.NATIVE_TOKEN_ADDRESS}`;if(!e)throw new Error("No address found to swap the tokens from.");return{networkAddress:t,fromAddress:e,fromCaipAddress:eT.state.caipAddress,sourceTokenAddress:JA.sourceToken?.address,toTokenAddress:JA.toToken?.address,toTokenAmount:JA.toTokenAmount,toTokenDecimals:JA.toToken?.decimals,sourceTokenAmount:JA.sourceTokenAmount,sourceTokenDecimals:JA.sourceToken?.decimals}},setLoading(e){JA.loading=e},setSourceToken(e){e&&(JA.sourceToken=e,this.setTokenValues(e.address,"sourceToken"))},setSourceTokenAmount(e){let{sourceTokenAddress:t}=this.getParams();JA.sourceTokenAmount=e,t&&this.setTokenValues(t,"sourceToken")},setToToken(e){let{sourceTokenAddress:t,sourceTokenAmount:r}=this.getParams();if(!e)return JA.toTokenAmount="0",void(JA.toTokenPriceInUSD=0);JA.toToken=e,this.setTokenValues(e.address,"toToken"),t&&r&&this.makeChecks()},setToTokenAmount(e){let{toTokenAddress:t}=this.getParams();JA.toTokenAmount=e,t&&this.setTokenValues(t,"toToken")},async setTokenValues(e,t){let r=JA.tokensPriceMap[e]||0;r||(r=await this.getAddressPrice(e)),"sourceToken"===t?JA.sourceTokenPriceInUSD=r:"toToken"===t&&(JA.toTokenPriceInUSD=r)},switchTokens(){let e=JA.toToken?{...JA.toToken}:void 0,t=JA.sourceToken?{...JA.sourceToken}:void 0;this.setSourceToken(e),this.setToToken(t),this.setSourceTokenAmount(JA.toTokenAmount||"0"),QA.convertTokens()},resetTokens(){JA.tokens=void 0,JA.popularTokens=void 0,JA.myTokensWithBalance=void 0,JA.initialized=!1},resetValues(){let{networkAddress:e}=this.getParams(),t=JA.tokens?.find((t=>t.address===e));this.setSourceToken(t),JA.sourceTokenPriceInUSD=JA.tokensPriceMap[e]||0,JA.sourceTokenAmount="0",this.setToToken(void 0),JA.gasPriceInUSD=0},clearError(){JA.transactionError=void 0},async initializeState(){JA.initialized||(await this.fetchTokens(),JA.initialized=!0)},async fetchTokens(){let{networkAddress:e}=this.getParams();await this.getTokenList(),await this.getNetworkTokenPrice(),await this.getMyTokensWithBalance();let t=JA.tokens?.find((t=>t.address===e));t&&this.setSourceToken(t)},async getTokenList(){let e=await ZA.getTokenList();JA.tokens=e,JA.popularTokens=e.sort(((e,t)=>e.symbol<t.symbol?-1:e.symbol>t.symbol?1:0)).filter((e=>!!kS.POPULAR_TOKENS.includes(e.symbol)),{}),JA.suggestedTokens=e.filter((e=>!!kS.SUGGESTED_TOKENS.includes(e.symbol)),{})},async getAddressPrice(e){let t=JA.tokensPriceMap[e];if(t)return t;let r=(await NS.fetchTokenPrice({projectId:AS.state.projectId,addresses:[e]})).fungibles||[],i=[...JA.tokens||[],...JA.myTokensWithBalance||[]]?.find((t=>t.address===e))?.symbol,n=r.find((e=>e.symbol===i))?.price||"0",o=parseFloat(n);return JA.tokensPriceMap[e]=o,o},async getNetworkTokenPrice(){let{networkAddress:e}=this.getParams(),t=(await NS.fetchTokenPrice({projectId:AS.state.projectId,addresses:[e]})).fungibles?.[0]?.price||"0";JA.tokensPriceMap[e]=parseFloat(t),JA.networkPrice=t},async getMyTokensWithBalance(){let e=await ZA.getMyTokensWithBalance();e&&(await this.getInitialGasPrice(),this.setBalances(e))},setBalances(e){let{networkAddress:t}=this.getParams(),r=e.find((e=>e.address===t));e.forEach((e=>{JA.tokensPriceMap[e.address]=e.price||0})),JA.myTokensWithBalance=e,JA.networkBalanceInUSD=r?WA.multiply(r.quantity.numeric,r.price).toString():"0"},async getInitialGasPrice(){let e=await ZA.fetchGasPrice();if(!e)return;let t=e.instant,r=BigInt(t),i=BigInt(15e4),n=this.calculateGasPriceInUSD(i,r);JA.gasPriceInUSD=n},async refreshConvertValues(){let{fromAddress:e,toTokenDecimals:t,toTokenAddress:r}=this.getParams();if(e&&r&&t&&!JA.loading){let e=await this.getTransaction();this.setTransactionDetails(e)}},calculateGasPriceInEther:(e,t)=>Number(t*e)/1e18,calculateGasPriceInUSD(e,t){let r=this.calculateGasPriceInEther(e,t);return WA.bigNumber(JA.networkPrice).multipliedBy(r).toNumber()},calculatePriceImpact(e,t){let r=JA.sourceTokenAmount,i=JA.sourceTokenPriceInUSD,n=JA.toTokenPriceInUSD;return WA.bigNumber(r).multipliedBy(i).plus(t).dividedBy(e).minus(n).dividedBy(n).multipliedBy(100).toNumber()},calculateMaxSlippage(){let e=WA.bigNumber(JA.slippage).dividedBy(100);return WA.multiply(JA.sourceTokenAmount,e).toNumber()},async convertTokens(){let{sourceTokenAddress:e,toTokenAddress:t}=this.getParams();!e||!t||await this.makeChecks()},async makeChecks(){let{toTokenDecimals:e,toTokenAddress:t}=this.getParams();if(!e||!t)return;JA.loading=!0;let r=await this.getTransaction();this.setTransactionDetails(r),JA.loading=!1},async getTransaction(){let e,{fromCaipAddress:t,sourceTokenAddress:r,sourceTokenAmount:i,sourceTokenDecimals:n}=this.getParams();if(t&&r&&i&&0!==parseFloat(i)&&n)return await ZA.fetchConvertAllowance({userAddress:t,tokenAddress:r,sourceTokenAmount:i,sourceTokenDecimals:n})?(JA.approvalTransaction=void 0,e=await this.createConvert(),JA.convertTransaction=e):(JA.convertTransaction=void 0,e=await this.createTokenAllowance(),JA.approvalTransaction=e),e},getToAmount(){let{sourceTokenDecimals:e}=this.getParams(),t=10**(e||18);return(JA.sourceTokenPriceInUSD&&JA.toTokenPriceInUSD&&JA.sourceTokenAmount?WA.bigNumber(JA.sourceTokenAmount).multipliedBy(JA.sourceTokenPriceInUSD).dividedBy(JA.toTokenPriceInUSD):WA.bigNumber(0)).multipliedBy(t).toString()},async createTokenAllowance(){let{fromCaipAddress:e,fromAddress:t,sourceTokenAddress:r,toTokenAddress:i}=this.getParams();if(!e||!i)return;if(!r)throw new Error(">>> createTokenAllowance - No source token address found.");let n=await NS.generateApproveCalldata({projectId:AS.state.projectId,from:r,to:i,userAddress:e}),o=await KS.estimateGas({address:t,to:PS.getPlainAddress(n.tx.to),data:n.tx.data}),a=this.getToAmount();return{data:n.tx.data,to:PS.getPlainAddress(n.tx.from),gas:o,gasPrice:BigInt(n.tx.eip155.gasPrice),value:BigInt(n.tx.value),toAmount:a}},async sendTransactionForApproval(e){let{fromAddress:t}=this.getParams();JA.transactionLoading=!0,YA.pushTransactionStack({view:null,goBack:!0});try{await KS.sendTransaction({address:t,to:e.to,data:e.data,value:BigInt(e.value),gasPrice:BigInt(e.gasPrice)}),JA.approvalTransaction=void 0,JA.transactionLoading=!1,this.makeChecks()}catch(e){let t=e;JA.transactionError=t?.shortMessage,JA.transactionLoading=!1}},async createConvert(){let{networkAddress:e,fromCaipAddress:t,sourceTokenAddress:r,sourceTokenDecimals:i,sourceTokenAmount:n,toTokenAddress:o}=this.getParams();if(t&&n&&r&&o&&i)try{let a=KS.parseUnits(n,i).toString(),s=await NS.generateConvertCalldata({projectId:AS.state.projectId,userAddress:t,from:r,to:o,amount:a}),c=r===e,l=this.getToAmount(),u=BigInt(s.tx.eip155.gas),d=BigInt(s.tx.eip155.gasPrice),h={data:s.tx.data,to:PS.getPlainAddress(s.tx.to),gas:u,gasPrice:d,value:BigInt(c?a:"0"),toAmount:l};return JA.gasPriceInUSD=this.calculateGasPriceInUSD(u,d),h}catch{return}},async sendTransactionForConvert(e){if(!e)return;let{fromAddress:t}=this.getParams();JA.transactionLoading=!0,YA.pushTransactionStack({view:"Account",goBack:!1,onSuccess(){QA.resetValues()}});try{let r=await KS.sendTransaction({address:t,to:e.to,data:e.data,gas:e.gas,gasPrice:BigInt(e.gasPrice),value:e.value});return JA.transactionLoading=!1,setTimeout((()=>{this.resetValues(),this.getMyTokensWithBalance()}),1e3),r}catch(e){let t=e;return JA.transactionError=t?.shortMessage,JA.transactionLoading=!1,void $S.showError(t?.shortMessage||"Transaction error")}},getToTokenValues(e,t){let{toTokenAddress:r}=this.getParams();if(!r)return{toTokenAmount:"0",toTokenPriceInUSD:0};let i=WA.bigNumber(e).dividedBy(10**t).toFixed(20),n=JA.tokensPriceMap[r]||"0";return{toTokenAmount:i,toTokenPriceInUSD:WA.bigNumber(n).toNumber()}},isInsufficientNetworkTokenForGas:()=>WA.bigNumber(WA.bigNumber(JA.gasPriceInUSD||"0")).isGreaterThan(JA.networkBalanceInUSD),setTransactionDetails(e){let{toTokenAddress:t,toTokenDecimals:r}=this.getParams();if(!e||!t||!r)return;this.isInsufficientNetworkTokenForGas()?JA.inputError="Insufficient balance":JA.inputError=void 0;let{toTokenAmount:i,toTokenPriceInUSD:n}=this.getToTokenValues(e.toAmount,r);JA.toTokenAmount=i,JA.toTokenPriceInUSD=n,JA.gasPriceInUSD=this.calculateGasPriceInUSD(e.gas,e.gasPrice),JA.priceImpact=this.calculatePriceImpact(JA.toTokenAmount,JA.gasPriceInUSD),JA.maxSlippage=this.calculateMaxSlippage()}}})),QT=a((()=>{iA(),Op(),oA(),cA(),lA(),JT(),KT(),XA=_p({isConnected:!1,currentTab:0,tokenBalance:[],smartAccountDeployed:!1}),eT={state:XA,subscribe:e=>xp(XA,(()=>e(XA))),subscribeKey:(e,t)=>xS(XA,e,t),setIsConnected(e){XA.isConnected=e},setCaipAddress(e){XA.caipAddress=e,XA.address=e?PS.getPlainAddress(e):void 0},setBalance(e,t){XA.balance=e,XA.balanceSymbol=t},setProfileName(e){XA.profileName=e},setProfileImage(e){XA.profileImage=e},setAddressExplorerUrl(e){XA.addressExplorerUrl=e},setSmartAccountDeployed(e){XA.smartAccountDeployed=e},setCurrentTab(e){XA.currentTab=e},setTokenBalance(e){e&&(XA.tokenBalance=Cp(e))},setConnectedWalletInfo(e){XA.connectedWalletInfo=e},setPreferredAccountType(e){XA.preferredAccountType=e},async fetchTokenBalance(){try{if(XA.address){let e=await NS.getBalance(XA.address);this.setTokenBalance(e.balances),QA.setBalances(ZA.mapBalancesToConvertTokens(e.balances))}}catch{$S.showError("Failed to fetch token balance")}},resetAccount(){XA.isConnected=!1,XA.smartAccountDeployed=!1,XA.currentTab=0,XA.caipAddress=void 0,XA.address=void 0,XA.balance=void 0,XA.balanceSymbol=void 0,XA.profileName=void 0,XA.profileImage=void 0,XA.addressExplorerUrl=void 0,XA.tokenBalance=[],XA.connectedWalletInfo=void 0,XA.preferredAccountType=void 0}}})),XT=a((()=>{iA(),Op(),tT=_p({walletImages:{},networkImages:{},connectorImages:{},tokenImages:{},currencyImages:{}}),rT={state:tT,subscribeNetworkImages:e=>xp(tT.networkImages,(()=>e(tT.networkImages))),subscribeKey:(e,t)=>xS(tT,e,t),subscribe:e=>xp(tT,(()=>e(tT))),setWalletImage(e,t){tT.walletImages[e]=t},setNetworkImage(e,t){tT.networkImages[e]=t},setConnectorImage(e,t){tT.connectorImages[e]=t},setTokenImage(e,t){tT.tokenImages[e]=t},setCurrencyImage(e,t){tT.currencyImages[e]=t}}})),eO=a((()=>{Op(),tO(),iT=_p({themeMode:"dark",themeVariables:{}}),nT={state:iT,subscribe:e=>xp(iT,(()=>e(iT))),setThemeMode(e){iT.themeMode=e;try{let e=aT.getEmailConnector();e&&e.provider.syncTheme({themeMode:nT.getSnapshot().themeMode})}catch{console.info("Unable to sync theme to email connector")}},setThemeVariables(e){iT.themeVariables={...iT.themeVariables,...e};try{let e=aT.getEmailConnector();e&&e.provider.syncTheme({themeVariables:nT.getSnapshot().themeVariables})}catch{console.info("Unable to sync theme to email connector")}},getSnapshot:()=>Ep(iT)}})),tO=a((()=>{iA(),Op(),sA(),eO(),oT=_p({connectors:[]}),aT={state:oT,subscribeKey:(e,t)=>xS(oT,e,t),setConnectors(e){oT.connectors=e.map((e=>Cp(e)))},addConnector(e){if(oT.connectors.push(Cp(e)),"w3mEmail"===e.id){let t=e,r=Ep(AS.state);t?.provider?.syncDappData?.({metadata:r.metadata,sdkVersion:r.sdkVersion,projectId:r.projectId}),t.provider.syncTheme({themeMode:nT.getSnapshot().themeMode,themeVariables:nT.getSnapshot().themeVariables})}},getEmailConnector:()=>oT.connectors.find((e=>"EMAIL"===e.type)),getAnnouncedConnectorRdns:()=>oT.connectors.filter((e=>"ANNOUNCED"===e.type)).map((e=>e.info?.rdns)),getConnectors:()=>oT.connectors,getConnector:(e,t)=>oT.connectors.find((r=>r.explorerId===e||r.info?.rdns===t))}})),rO=a((()=>{iA(),Op(),oA(),aA(),fA(),XT(),tO(),ZT(),sA(),sT=PS.getApiUrl(),cT=new IS({baseUrl:sT}),"40","4",lT=_p({page:1,count:0,featured:[],recommended:[],wallets:[],search:[],isAnalyticsEnabled:!1}),uT={state:lT,subscribeKey:(e,t)=>xS(lT,e,t),_getApiHeaders(){let{projectId:e,sdkType:t,sdkVersion:r}=AS.state;return{"x-project-id":e,"x-sdk-type":t,"x-sdk-version":r}},async _fetchWalletImage(e){let t=`${cT.baseUrl}/getWalletImage/${e}`,r=await cT.getBlob({path:t,headers:uT._getApiHeaders()});rT.setWalletImage(e,URL.createObjectURL(r))},async _fetchNetworkImage(e){let t=`${cT.baseUrl}/public/getAssetImage/${e}`,r=await cT.getBlob({path:t,headers:uT._getApiHeaders()});rT.setNetworkImage(e,URL.createObjectURL(r))},async _fetchConnectorImage(e){let t=`${cT.baseUrl}/public/getAssetImage/${e}`,r=await cT.getBlob({path:t,headers:uT._getApiHeaders()});rT.setConnectorImage(e,URL.createObjectURL(r))},async _fetchCurrencyImage(e){let t=`${cT.baseUrl}/public/getCurrencyImage/${e}`,r=await cT.getBlob({path:t,headers:uT._getApiHeaders()});rT.setCurrencyImage(e,URL.createObjectURL(r))},async _fetchTokenImage(e){let t=`${cT.baseUrl}/public/getTokenImage/${e}`,r=await cT.getBlob({path:t,headers:uT._getApiHeaders()});rT.setTokenImage(e,URL.createObjectURL(r))},async fetchNetworkImages(){let{requestedCaipNetworks:e}=GA.state,t=e?.map((({imageId:e})=>e)).filter(Boolean);t&&await Promise.allSettled(t.map((e=>uT._fetchNetworkImage(e))))},async fetchConnectorImages(){let{connectors:e}=aT.state,t=e.map((({imageId:e})=>e)).filter(Boolean);await Promise.allSettled(t.map((e=>uT._fetchConnectorImage(e))))},async fetchCurrencyImages(e=[]){await Promise.allSettled(e.map((e=>uT._fetchCurrencyImage(e))))},async fetchTokenImages(e=[]){await Promise.allSettled(e.map((e=>uT._fetchTokenImage(e))))},async fetchFeaturedWallets(){let{featuredWalletIds:e}=AS.state;if(e?.length){let{data:t}=await cT.get({path:"/getWallets",headers:uT._getApiHeaders(),params:{page:"1",entries:e?.length?String(e.length):"4",include:e?.join(",")}});t.sort(((t,r)=>e.indexOf(t.id)-e.indexOf(r.id)));let r=t.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled(r.map((e=>uT._fetchWalletImage(e)))),lT.featured=t}},async fetchRecommendedWallets(){let{includeWalletIds:e,excludeWalletIds:t,featuredWalletIds:r}=AS.state,i=[...t??[],...r??[]].filter(Boolean),{data:n,count:o}=await cT.get({path:"/getWallets",headers:uT._getApiHeaders(),params:{page:"1",chains:GA.state.caipNetwork?.id,entries:"4",include:e?.join(","),exclude:i?.join(",")}}),a=US.getRecentWallets(),s=n.map((e=>e.image_id)).filter(Boolean),c=a.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled([...s,...c].map((e=>uT._fetchWalletImage(e)))),lT.recommended=n,lT.count=o??0},async fetchWallets({page:e}){let{includeWalletIds:t,excludeWalletIds:r,featuredWalletIds:i}=AS.state,n=[...lT.recommended.map((({id:e})=>e)),...r??[],...i??[]].filter(Boolean),{data:o,count:a}=await cT.get({path:"/getWallets",headers:uT._getApiHeaders(),params:{page:String(e),entries:"40",chains:GA.state.caipNetwork?.id,include:t?.join(","),exclude:n.join(",")}}),s=o.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled([...s.map((e=>uT._fetchWalletImage(e))),PS.wait(300)]),lT.wallets=[...lT.wallets,...o],lT.count=a>lT.count?a:lT.count,lT.page=e},async searchWallet({search:e}){let{includeWalletIds:t,excludeWalletIds:r}=AS.state;lT.search=[];let{data:i}=await cT.get({path:"/getWallets",headers:uT._getApiHeaders(),params:{page:"1",entries:"100",search:e,chains:GA.state.caipNetwork?.id,include:t?.join(","),exclude:r?.join(",")}}),n=i.map((e=>e.image_id)).filter(Boolean);await Promise.allSettled([...n.map((e=>uT._fetchWalletImage(e))),PS.wait(300)]),lT.search=i},async reFetchWallets(){lT.page=1,lT.wallets=[],await uT.fetchFeaturedWallets(),await uT.fetchRecommendedWallets()},prefetch(){let e=[uT.fetchFeaturedWallets(),uT.fetchRecommendedWallets(),uT.fetchNetworkImages(),uT.fetchConnectorImages()];void 0===AS.state.enableAnalytics&&e.push(uT.fetchAnalyticsConfig()),lT.prefetchPromise=Promise.race([Promise.allSettled(e),PS.wait(3e3)])},async fetchAnalyticsConfig(){let{isAnalyticsEnabled:e}=await cT.get({path:"/getAnalyticsConfig",headers:uT._getApiHeaders()});AS.setEnableAnalytics(e)}}})),iO=a((()=>{iA(),Op(),QT(),rO(),gA(),yA(),YT(),dT=_p({loading:!1,open:!1}),hT={state:dT,subscribe:e=>xp(dT,(()=>e(dT))),subscribeKey:(e,t)=>xS(dT,e,t),async open(e){await uT.state.prefetchPromise;let t=eT.state.isConnected;e?.view?YA.reset(e.view):t?YA.reset("Account"):YA.reset("Connect"),dT.open=!0,JS.set({open:!0}),WS.sendEvent({type:"track",event:"MODAL_OPEN",properties:{connected:t}})},close(){let e=eT.state.isConnected;dT.open=!1,JS.set({open:!1}),WS.sendEvent({type:"track",event:"MODAL_CLOSE",properties:{connected:e}})},setLoading(e){dT.loading=e,JS.set({loading:e})}}})),nO=a((()=>{iA(),Op(),nA(),cA(),rO(),gT=_p({providers:CS,selectedProvider:null,error:null,purchaseCurrency:pT={id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},paymentCurrency:fT={id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},purchaseCurrencies:[pT],paymentCurrencies:[],quotesLoading:!1}),mT={state:gT,subscribe:e=>xp(gT,(()=>e(gT))),subscribeKey:(e,t)=>xS(gT,e,t),setSelectedProvider(e){gT.selectedProvider=e},setPurchaseCurrency(e){gT.purchaseCurrency=e},setPaymentCurrency(e){gT.paymentCurrency=e},setPurchaseAmount(e){this.state.purchaseAmount=e},setPaymentAmount(e){this.state.paymentAmount=e},async getAvailableCurrencies(){let e=await NS.getOnrampOptions();gT.purchaseCurrencies=e.purchaseCurrencies,gT.paymentCurrencies=e.paymentCurrencies,gT.paymentCurrency=e.paymentCurrencies[0]||fT,gT.purchaseCurrency=e.purchaseCurrencies[0]||pT,await uT.fetchCurrencyImages(e.paymentCurrencies.map((e=>e.id))),await uT.fetchTokenImages(e.purchaseCurrencies.map((e=>e.symbol)))},async getQuote(){gT.quotesLoading=!0;try{let e=await NS.getOnrampQuote({purchaseCurrency:gT.purchaseCurrency,paymentCurrency:gT.paymentCurrency,amount:gT.paymentAmount?.toString()||"0",network:gT.purchaseCurrency?.symbol});return gT.quotesLoading=!1,gT.purchaseAmount=Number(e.purchaseAmount.amount),e}catch(e){return gT.error=e.message,gT.quotesLoading=!1,null}finally{gT.quotesLoading=!1}},resetState(){gT.providers=CS,gT.selectedProvider=null,gT.error=null,gT.purchaseCurrency=pT,gT.paymentCurrency=fT,gT.purchaseCurrencies=[pT],gT.paymentCurrencies=[],gT.paymentAmount=void 0,gT.purchaseAmount=void 0,gT.quotesLoading=!1}}})),oO=a((()=>{iA(),Op(),bT=_p({}),yT={state:bT,subscribe:e=>xp(bT,(()=>e(bT))),subscribeKey:(e,t)=>xS(bT,e,t),setToken(e){e&&(bT.token=Cp(e))},setTokenAmount(e){bT.sendTokenAmount=e},setReceiverAddress(e){bT.receiverAddress=e},setReceiverProfileImageUrl(e){bT.receiverProfileImageUrl=e},setReceiverProfileName(e){bT.receiverProfileName=e},resetSend(){bT.token=void 0,bT.sendTokenAmount=void 0,bT.receiverAddress=void 0,bT.receiverProfileImageUrl=void 0,bT.receiverProfileName=void 0}}})),aO=a((()=>{XT(),wT={getWalletImage:e=>e?.image_url?e?.image_url:e?.image_id?rT.state.walletImages[e.image_id]:void 0,getNetworkImage:e=>e?.imageUrl?e?.imageUrl:e?.imageId?rT.state.networkImages[e.imageId]:void 0,getConnectorImage:e=>e?.imageUrl?e.imageUrl:e?.imageId?rT.state.connectorImages[e.imageId]:void 0}})),sO=a((()=>{YT(),iO(),vT={goBackOrCloseModal(){YA.state.history.length>1?YA.goBack():hT.close()},navigateAfterNetworkSwitch(){let{history:e}=YA.state,t=e.findIndex((e=>"Networks"===e));t>=1?YA.goBackToIndex(t-1):hT.close()}}})),cO=a((()=>{iO(),YT(),QT(),ZT(),nO(),bA(),tO(),lA(),rO(),XT(),eO(),sA(),cA(),yA(),gA(),mA(),JT(),oO(),aO(),nA(),oA(),fA(),sO()})),lO=a((()=>{_T=globalThis,xT=_T.ShadowRoot&&(void 0===_T.ShadyCSS||_T.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ET=Symbol(),CT=new WeakMap,kT=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==ET)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(xT&&void 0===e){let r=void 0!==t&&1===t.length;r&&(e=CT.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&CT.set(t,e))}return e}toString(){return this.cssText}},PT=e=>new kT("string"==typeof e?e:e+"",void 0,ET),IT=(e,...t)=>{let r=1===e.length?e[0]:t.reduce(((t,r,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[i+1]),e[0]);return new kT(r,e,ET)},ST=(e,t)=>{if(xT)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let r of t){let t=document.createElement("style"),i=_T.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=r.cssText,e.appendChild(t)}},AT=xT?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return PT(t)})(e):e})),uO=a((()=>{lO(),lO(),({is:TT,defineProperty:OT,getOwnPropertyDescriptor:RT,getOwnPropertyNames:NT,getOwnPropertySymbols:MT,getPrototypeOf:$T}=Object),jT=globalThis,LT=jT.trustedTypes,BT=LT?LT.emptyScript:"",DT=jT.reactiveElementPolyfillSupport,UT=(e,t)=>e,FT={toAttribute(e,t){switch(t){case Boolean:e=e?BT:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},HT=(e,t)=>!TT(e,t),zT={attribute:!0,type:String,converter:FT,reflect:!1,hasChanged:HT},Symbol.metadata??=Symbol("metadata"),jT.litPropertyMetadata??=new WeakMap,(qT=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=zT){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(e,r,t);void 0!==i&&OT(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){let{get:i,set:n}=RT(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return i?.call(this)},set(t){let o=i?.call(this);n.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??zT}static _$Ei(){if(this.hasOwnProperty(UT("elementProperties")))return;let e=$T(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(UT("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(UT("properties"))){let e=this.properties,t=[...NT(e),...MT(e)];for(let r of t)this.createProperty(r,e[r])}let e=this[Symbol.metadata];if(null!==e){let t=litPropertyMetadata.get(e);if(void 0!==t)for(let[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let e of r)t.unshift(AT(e))}else void 0!==e&&t.push(AT(e));return t}static _$Eu(e,t){let r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ST(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){let r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(void 0!==i&&!0===r.reflect){let n=(void 0!==r.converter?.toAttribute?r.converter:FT).toAttribute(t,r.type);this._$Em=e,null==n?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,t){let r=this.constructor,i=r._$Eh.get(e);if(void 0!==i&&this._$Em!==i){let e=r.getPropertyOptions(i),n="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:FT;this._$Em=i,this[i]=n.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??HT)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}).elementStyles=[],qT.shadowRootOptions={mode:"open"},qT[UT("elementProperties")]=new Map,qT[UT("finalized")]=new Map,DT?.({ReactiveElement:qT}),(jT.reactiveElementVersions??=[]).push("2.0.4")}));function dO(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==gO?gO.createHTML(t):t}function hO(e,t,r=e,i){if(t===jO)return t;let n=void 0!==i?r._$Co?.[i]:r._$Cl,o=xO(t)?void 0:t._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),void 0===o?n=void 0:(n=new o(e),n._$AT(e,r,i)),void 0!==i?(r._$Co??=[])[i]=n:r._$Cl=n),void 0!==n&&(t=hO(e,n._$AS(e,t.values),n,i)),t}var pO,fO,gO,mO,bO,yO,wO,vO,_O,xO,EO,CO,kO,PO,IO,SO,AO,TO,OO,RO,NO,MO,$O,jO,LO,BO,DO,UO,FO,HO,zO,qO,WO,VO,GO,ZO,KO,YO,JO,QO,XO,eR,tR,rR=a((()=>{pO=globalThis,fO=pO.trustedTypes,gO=fO?fO.createPolicy("lit-html",{createHTML:e=>e}):void 0,mO="$lit$",bO=`lit$${Math.random().toFixed(9).slice(2)}$`,wO=`<${yO="?"+bO}>`,vO=document,_O=()=>vO.createComment(""),xO=e=>null===e||"object"!=typeof e&&"function"!=typeof e,EO=Array.isArray,CO=e=>EO(e)||"function"==typeof e?.[Symbol.iterator],kO="[ \t\n    \f\r]",PO=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,IO=/-->/g,SO=/>/g,AO=RegExp(`>|${kO}(?:([^\\s"'>=/]+)(${kO}*=${kO}*(?:[^ \t\n    \f\r"'\`<>=]|("|')|))|$)`,"g"),TO=/'/g,OO=/"/g,RO=/^(?:script|style|textarea|title)$/i,MO=(NO=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}))(1),$O=NO(2),jO=Symbol.for("lit-noChange"),LO=Symbol.for("lit-nothing"),BO=new WeakMap,DO=vO.createTreeWalker(vO,129),UO=(e,t)=>{let r,i=e.length-1,n=[],o=2===t?"<svg>":"",a=PO;for(let t=0;t<i;t++){let i,s,c=e[t],l=-1,u=0;for(;u<c.length&&(a.lastIndex=u,s=a.exec(c),null!==s);)u=a.lastIndex,a===PO?"!--"===s[1]?a=IO:void 0!==s[1]?a=SO:void 0!==s[2]?(RO.test(s[2])&&(r=RegExp("</"+s[2],"g")),a=AO):void 0!==s[3]&&(a=AO):a===AO?">"===s[0]?(a=r??PO,l=-1):void 0===s[1]?l=-2:(l=a.lastIndex-s[2].length,i=s[1],a=void 0===s[3]?AO:'"'===s[3]?OO:TO):a===OO||a===TO?a=AO:a===IO||a===SO?a=PO:(a=AO,r=void 0);let d=a===AO&&e[t+1].startsWith("/>")?" ":"";o+=a===PO?c+wO:l>=0?(n.push(i),c.slice(0,l)+mO+c.slice(l)+bO+d):c+bO+(-2===l?t:d)}return[dO(e,o+(e[i]||"<?>")+(2===t?"</svg>":"")),n]},FO=class e{constructor({strings:t,_$litType$:r},i){let n;this.parts=[];let o=0,a=0,s=t.length-1,c=this.parts,[l,u]=UO(t,r);if(this.el=e.createElement(l,i),DO.currentNode=this.el.content,2===r){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=DO.nextNode())&&c.length<s;){if(1===n.nodeType){if(n.hasAttributes())for(let e of n.getAttributeNames())if(e.endsWith(mO)){let t=u[a++],r=n.getAttribute(e).split(bO),i=/([.?@])?(.*)/.exec(t);c.push({type:1,index:o,name:i[2],strings:r,ctor:"."===i[1]?WO:"?"===i[1]?VO:"@"===i[1]?GO:qO}),n.removeAttribute(e)}else e.startsWith(bO)&&(c.push({type:6,index:o}),n.removeAttribute(e));if(RO.test(n.tagName)){let e=n.textContent.split(bO),t=e.length-1;if(t>0){n.textContent=fO?fO.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],_O()),DO.nextNode(),c.push({type:2,index:++o});n.append(e[t],_O())}}}else if(8===n.nodeType)if(n.data===yO)c.push({type:2,index:o});else{let e=-1;for(;-1!==(e=n.data.indexOf(bO,e+1));)c.push({type:7,index:o}),e+=bO.length-1}o++}}static createElement(e,t){let r=vO.createElement("template");return r.innerHTML=e,r}},HO=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,i=(e?.creationScope??vO).importNode(t,!0);DO.currentNode=i;let n=DO.nextNode(),o=0,a=0,s=r[0];for(;void 0!==s;){if(o===s.index){let t;2===s.type?t=new zO(n,n.nextSibling,this,e):1===s.type?t=new s.ctor(n,s.name,s.strings,this,e):6===s.type&&(t=new ZO(n,this,e)),this._$AV.push(t),s=r[++a]}o!==s?.index&&(n=DO.nextNode(),o++)}return DO.currentNode=vO,i}p(e){let t=0;for(let r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},zO=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,i){this.type=2,this._$AH=LO,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=hO(this,e,t),xO(e)?e===LO||null==e||""===e?(this._$AH!==LO&&this._$AR(),this._$AH=LO):e!==this._$AH&&e!==jO&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):CO(e)?this.k(e):this._(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}_(e){this._$AH!==LO&&xO(this._$AH)?this._$AA.nextSibling.data=e:this.T(vO.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,i="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=FO.createElement(dO(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(t);else{let e=new HO(i,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=BO.get(e.strings);return void 0===t&&BO.set(e.strings,t=new FO(e)),t}k(t){EO(this._$AH)||(this._$AH=[],this._$AR());let r,i=this._$AH,n=0;for(let o of t)n===i.length?i.push(r=new e(this.S(_O()),this.S(_O()),this,this.options)):r=i[n],r._$AI(o),n++;n<i.length&&(this._$AR(r&&r._$AB.nextSibling,n),i.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){let t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}},qO=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,i,n){this.type=1,this._$AH=LO,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=n,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=LO}_$AI(e,t=this,r,i){let n=this.strings,o=!1;if(void 0===n)e=hO(this,e,t,0),o=!xO(e)||e!==this._$AH&&e!==jO,o&&(this._$AH=e);else{let i,a,s=e;for(e=n[0],i=0;i<n.length-1;i++)a=hO(this,s[r+i],t,i),a===jO&&(a=this._$AH[i]),o||=!xO(a)||a!==this._$AH[i],a===LO?e=LO:e!==LO&&(e+=(a??"")+n[i+1]),this._$AH[i]=a}o&&!i&&this.j(e)}j(e){e===LO?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},WO=class extends qO{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===LO?void 0:e}},VO=class extends qO{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==LO)}},GO=class extends qO{constructor(e,t,r,i,n){super(e,t,r,i,n),this.type=5}_$AI(e,t=this){if((e=hO(this,e,t,0)??LO)===jO)return;let r=this._$AH,i=e===LO&&r!==LO||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==LO&&(r===LO||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ZO=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){hO(this,e)}},KO={P:mO,A:bO,C:yO,M:1,L:UO,R:HO,D:CO,V:hO,I:zO,H:qO,N:VO,U:GO,B:WO,F:ZO},YO=pO.litHtmlPolyfillSupport,YO?.(FO,zO),(pO.litHtmlVersions??=[]).push("3.1.3"),JO=(e,t,r)=>{let i=r?.renderBefore??t,n=i._$litPart$;if(void 0===n){let e=r?.renderBefore??null;i._$litPart$=n=new zO(t.insertBefore(_O(),e),e,void 0,r??{})}return n._$AI(e),n}})),iR=a((()=>{uO(),uO(),rR(),rR(),QO=class extends qT{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=JO(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return jO}},QO._$litElement$=!0,QO.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:QO}),XO=globalThis.litElementPolyfillSupport,XO?.({LitElement:QO}),(globalThis.litElementVersions??=[]).push("4.0.5")})),nR=a((()=>{})),oR=a((()=>{uO(),rR(),iR(),nR()})),aR=a((()=>{oR(),eR=$O`<svg class="input_mask" width="328" height="100" viewBox="0 0 328 100" fill="none">
      <mask id="path-1-inside-1_18299_4189">
        <path
          class="input_mask__border"
          fill-rule="evenodd"
          clip-rule="evenodd"
          d="M138.008 0H40C21.1438 0 11.7157 0 5.85786 5.85786C0 11.7157 0 21.1438 0 40V60C0 78.8562 0 88.2843 5.85786 94.1421C11.7157 100 21.1438 100 40 100H288C306.856 100 316.284 100 322.142 94.1421C328 88.2843 328 78.8562 328 60V40C328 21.1438 328 11.7157 322.142 5.85786C316.284 0 306.856 0 288 0H189.992C189.958 4.89122 189.786 7.76279 188.914 10.1564C187.095 15.1562 183.156 19.0947 178.156 20.9145C175.174 22 171.449 22 164 22C156.551 22 152.826 22 149.844 20.9145C144.844 19.0947 140.905 15.1562 139.086 10.1564C138.214 7.76279 138.042 4.89122 138.008 0Z"
        />
      </mask>
      <path
        class="input_mask__background"
        fill-rule="evenodd"
        clip-rule="evenodd"
        d="M138.008 0H40C21.1438 0 11.7157 0 5.85786 5.85786C0 11.7157 0 21.1438 0 40V60C0 78.8562 0 88.2843 5.85786 94.1421C11.7157 100 21.1438 100 40 100H288C306.856 100 316.284 100 322.142 94.1421C328 88.2843 328 78.8562 328 60V40C328 21.1438 328 11.7157 322.142 5.85786C316.284 0 306.856 0 288 0H189.992C189.958 4.89122 189.786 7.76279 188.914 10.1564C187.095 15.1562 183.156 19.0947 178.156 20.9145C175.174 22 171.449 22 164 22C156.551 22 152.826 22 149.844 20.9145C144.844 19.0947 140.905 15.1562 139.086 10.1564C138.214 7.76279 138.042 4.89122 138.008 0Z"
      />
      <path
        class="input_mask__border"
        d="M138.008 0L139.008 -0.00694413L139.001 -1H138.008V0ZM322.142 94.1421L322.849 94.8492H322.849L322.142 94.1421ZM322.142 5.85786L322.849 5.15076L322.849 5.15076L322.142 5.85786ZM189.992 0V-1H188.999L188.992 -0.00694413L189.992 0ZM188.914 10.1564L189.854 10.4984V10.4984L188.914 10.1564ZM178.156 20.9145L177.814 19.9748V19.9748L178.156 20.9145ZM149.844 20.9145L150.186 19.9748V19.9748L149.844 20.9145ZM139.086 10.1564L138.146 10.4984V10.4984L139.086 10.1564ZM40 1H138.008V-1H40V1ZM6.56497 6.56497C9.27713 3.85281 12.8524 2.44064 18.1878 1.72332C23.552 1.00212 30.5436 1 40 1V-1C30.6002 -1 23.4497 -1.00212 17.9213 -0.25885C12.3641 0.488292 8.29646 2.00506 5.15076 5.15076L6.56497 6.56497ZM1 40C1 30.5436 1.00212 23.552 1.72332 18.1878C2.44064 12.8524 3.85281 9.27713 6.56497 6.56497L5.15076 5.15076C2.00506 8.29646 0.488292 12.3641 -0.25885 17.9213C-1.00212 23.4497 -1 30.6002 -1 40H1ZM1 60V40H-1V60H1ZM6.56497 93.435C3.85281 90.7229 2.44064 87.1476 1.72332 81.8122C1.00212 76.448 1 69.4564 1 60H-1C-1 69.3998 -1.00212 76.5503 -0.25885 82.0787C0.488292 87.6358 2.00506 91.7035 5.15076 94.8492L6.56497 93.435ZM40 99C30.5436 99 23.552 98.9979 18.1878 98.2767C12.8524 97.5594 9.27713 96.1472 6.56497 93.435L5.15076 94.8492C8.29646 97.9949 12.3641 99.5117 17.9213 100.259C23.4497 101.002 30.6002 101 40 101V99ZM288 99H40V101H288V99ZM321.435 93.435C318.723 96.1472 315.148 97.5594 309.812 98.2767C304.448 98.9979 297.456 99 288 99V101C297.4 101 304.55 101.002 310.079 100.259C315.636 99.5117 319.704 97.9949 322.849 94.8492L321.435 93.435ZM327 60C327 69.4564 326.998 76.448 326.277 81.8122C325.559 87.1476 324.147 90.7229 321.435 93.435L322.849 94.8492C325.995 91.7035 327.512 87.6358 328.259 82.0787C329.002 76.5503 329 69.3998 329 60H327ZM327 40V60H329V40H327ZM321.435 6.56497C324.147 9.27713 325.559 12.8524 326.277 18.1878C326.998 23.552 327 30.5436 327 40H329C329 30.6002 329.002 23.4497 328.259 17.9213C327.512 12.3642 325.995 8.29646 322.849 5.15076L321.435 6.56497ZM288 1C297.456 1 304.448 1.00212 309.812 1.72332C315.148 2.44064 318.723 3.85281 321.435 6.56497L322.849 5.15076C319.704 2.00506 315.636 0.488292 310.079 -0.25885C304.55 -1.00212 297.4 -1 288 -1V1ZM189.992 1H288V-1H189.992V1ZM188.992 -0.00694413C188.958 4.90792 188.778 7.60788 187.975 9.81434L189.854 10.4984C190.793 7.9177 190.958 4.87452 190.992 0.00694413L188.992 -0.00694413ZM187.975 9.81434C186.256 14.5364 182.536 18.2561 177.814 19.9748L178.498 21.8542C183.776 19.9333 187.933 15.7759 189.854 10.4984L187.975 9.81434ZM177.814 19.9748C175.039 20.9848 171.536 21 164 21V23C171.362 23 175.308 23.0152 178.498 21.8542L177.814 19.9748ZM164 21C156.464 21 152.961 20.9848 150.186 19.9748L149.502 21.8542C152.692 23.0152 156.638 23 164 23V21ZM150.186 19.9748C145.464 18.2561 141.744 14.5364 140.025 9.81434L138.146 10.4984C140.067 15.7759 144.224 19.9333 149.502 21.8542L150.186 19.9748ZM140.025 9.81434C139.222 7.60788 139.042 4.90792 139.008 -0.00694413L137.008 0.00694413C137.042 4.87452 137.207 7.9177 138.146 10.4984L140.025 9.81434Z"
        mask="url(#path-1-inside-1_18299_4189)"
      />
    </svg>`})),sR=a((()=>{oR(),tR=$O`<svg class="input_mask" width="328" height="100" viewBox="0 0 328 100" fill="none">
      <mask id="path-1-inside-1_18299_4168">
        <path
          class="input_mask__border"
          fill-rule="evenodd"
          clip-rule="evenodd"
          d="M5.85786 5.85786C0 11.7157 0 21.1438 0 40V60C0 78.8562 0 88.2843 5.85786 94.1421C11.7157 100 21.1438 100 40 100H138.008C138.042 95.1088 138.214 92.2372 139.086 89.8436C140.905 84.8438 144.844 80.9053 149.844 79.0855C152.826 78 156.551 78 164 78C171.449 78 175.174 78 178.156 79.0855C183.156 80.9053 187.095 84.8438 188.914 89.8436C189.786 92.2372 189.958 95.1088 189.992 100H288C306.856 100 316.284 100 322.142 94.1421C328 88.2843 328 78.8562 328 60V40C328 21.1438 328 11.7157 322.142 5.85786C316.284 0 306.856 0 288 0H40C21.1438 0 11.7157 0 5.85786 5.85786Z"
        />
      </mask>
      <path
        class="input_mask__background"
        fill-rule="evenodd"
        clip-rule="evenodd"
        d="M5.85786 5.85786C0 11.7157 0 21.1438 0 40V60C0 78.8562 0 88.2843 5.85786 94.1421C11.7157 100 21.1438 100 40 100H138.008C138.042 95.1088 138.214 92.2372 139.086 89.8436C140.905 84.8438 144.844 80.9053 149.844 79.0855C152.826 78 156.551 78 164 78C171.449 78 175.174 78 178.156 79.0855C183.156 80.9053 187.095 84.8438 188.914 89.8436C189.786 92.2372 189.958 95.1088 189.992 100H288C306.856 100 316.284 100 322.142 94.1421C328 88.2843 328 78.8562 328 60V40C328 21.1438 328 11.7157 322.142 5.85786C316.284 0 306.856 0 288 0H40C21.1438 0 11.7157 0 5.85786 5.85786Z"
      />
      <path
        class="input_mask__border"
        d="M138.008 100V101H139.001L139.008 100.007L138.008 100ZM139.086 89.8436L138.146 89.5016L139.086 89.8436ZM149.844 79.0855L150.186 80.0252L149.844 79.0855ZM178.156 79.0855L177.814 80.0252L178.156 79.0855ZM188.914 89.8436L189.854 89.5016L188.914 89.8436ZM189.992 100L188.992 100.007L188.999 101H189.992V100ZM322.142 94.1421L322.849 94.8492H322.849L322.142 94.1421ZM322.142 5.85786L322.849 5.15076L322.849 5.15076L322.142 5.85786ZM1 40C1 30.5436 1.00212 23.552 1.72332 18.1878C2.44064 12.8524 3.85281 9.27713 6.56497 6.56497L5.15076 5.15076C2.00506 8.29646 0.488292 12.3641 -0.25885 17.9213C-1.00212 23.4497 -1 30.6002 -1 40H1ZM1 60V40H-1V60H1ZM6.56497 93.435C3.85281 90.7229 2.44064 87.1476 1.72332 81.8122C1.00212 76.448 1 69.4564 1 60H-1C-1 69.3998 -1.00212 76.5503 -0.25885 82.0787C0.488292 87.6358 2.00506 91.7035 5.15076 94.8492L6.56497 93.435ZM40 99C30.5436 99 23.552 98.9979 18.1878 98.2767C12.8524 97.5594 9.27713 96.1472 6.56497 93.435L5.15076 94.8492C8.29646 97.9949 12.3641 99.5117 17.9213 100.259C23.4497 101.002 30.6002 101 40 101V99ZM138.008 99H40V101H138.008V99ZM139.008 100.007C139.042 95.0921 139.222 92.3921 140.025 90.1857L138.146 89.5016C137.207 92.0823 137.042 95.1255 137.008 99.9931L139.008 100.007ZM140.025 90.1857C141.744 85.4636 145.464 81.7439 150.186 80.0252L149.502 78.1458C144.224 80.0667 140.067 84.2241 138.146 89.5016L140.025 90.1857ZM150.186 80.0252C152.961 79.0152 156.464 79 164 79V77C156.638 77 152.692 76.9848 149.502 78.1458L150.186 80.0252ZM164 79C171.536 79 175.039 79.0152 177.814 80.0252L178.498 78.1458C175.308 76.9848 171.362 77 164 77V79ZM177.814 80.0252C182.536 81.7439 186.256 85.4636 187.975 90.1857L189.854 89.5016C187.933 84.2241 183.776 80.0667 178.498 78.1458L177.814 80.0252ZM187.975 90.1857C188.778 92.3921 188.958 95.0921 188.992 100.007L190.992 99.9931C190.958 95.1255 190.793 92.0823 189.854 89.5016L187.975 90.1857ZM288 99H189.992V101H288V99ZM321.435 93.435C318.723 96.1472 315.148 97.5594 309.812 98.2767C304.448 98.9979 297.456 99 288 99V101C297.4 101 304.55 101.002 310.079 100.259C315.636 99.5117 319.704 97.9949 322.849 94.8492L321.435 93.435ZM327 60C327 69.4564 326.998 76.448 326.277 81.8122C325.559 87.1476 324.147 90.7229 321.435 93.435L322.849 94.8492C325.995 91.7035 327.512 87.6358 328.259 82.0787C329.002 76.5503 329 69.3998 329 60H327ZM327 40V60H329V40H327ZM321.435 6.56497C324.147 9.27713 325.559 12.8524 326.277 18.1878C326.998 23.552 327 30.5436 327 40H329C329 30.6002 329.002 23.4497 328.259 17.9213C327.512 12.3642 325.995 8.29646 322.849 5.15076L321.435 6.56497ZM288 1C297.456 1 304.448 1.00212 309.812 1.72332C315.148 2.44064 318.723 3.85281 321.435 6.56497L322.849 5.15076C319.704 2.00506 315.636 0.488292 310.079 -0.25885C304.55 -1.00212 297.4 -1 288 -1V1ZM40 1H288V-1H40V1ZM6.56497 6.56497C9.27713 3.85281 12.8524 2.44064 18.1878 1.72332C23.552 1.00212 30.5436 1 40 1V-1C30.6002 -1 23.4497 -1.00212 17.9213 -0.25885C12.3641 0.488292 8.29646 2.00506 5.15076 5.15076L6.56497 6.56497Z"
        mask="url(#path-1-inside-1_18299_4168)"
      />
    </svg>`}));function cR(e,t){hR=document.createElement("style"),pR=document.createElement("style"),fR=document.createElement("style"),hR.textContent=dR(e).core.cssText,pR.textContent=dR(e).dark.cssText,fR.textContent=dR(e).light.cssText,document.head.appendChild(hR),document.head.appendChild(pR),document.head.appendChild(fR),lR(t)}function lR(e){pR&&fR&&("light"===e?(pR.removeAttribute("media"),fR.media="enabled"):(fR.removeAttribute("media"),pR.media="enabled"))}function uR(e){hR&&pR&&fR&&(hR.textContent=dR(e).core.cssText,pR.textContent=dR(e).dark.cssText,fR.textContent=dR(e).light.cssText)}function dR(e){return{core:IT`
          @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
          :root {
            --w3m-color-mix-strength: ${PT(e?.["--w3m-color-mix-strength"]?`${e["--w3m-color-mix-strength"]}%`:"0%")};
            --w3m-font-family: ${PT(e?.["--w3m-font-family"]||"Inter, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;")};
            --w3m-font-size-master: ${PT(e?.["--w3m-font-size-master"]||"10px")};
            --w3m-border-radius-master: ${PT(e?.["--w3m-border-radius-master"]||"4px")};
            --w3m-z-index: ${PT(e?.["--w3m-z-index"]||999)};
    
            --wui-font-family: var(--w3m-font-family);
    
            --wui-font-size-mini: calc(var(--w3m-font-size-master) * 0.8);
            --wui-font-size-micro: var(--w3m-font-size-master);
            --wui-font-size-tiny: calc(var(--w3m-font-size-master) * 1.2);
            --wui-font-size-small: calc(var(--w3m-font-size-master) * 1.4);
            --wui-font-size-paragraph: calc(var(--w3m-font-size-master) * 1.6);
            --wui-font-size-medium: calc(var(--w3m-font-size-master) * 1.8);
            --wui-font-size-large: calc(var(--w3m-font-size-master) * 2);
            --wui-font-size-medium-title: calc(var(--w3m-font-size-master) * 2.4);
            --wui-font-size-2xl: calc(var(--w3m-font-size-master) * 4);
    
            --wui-border-radius-5xs: var(--w3m-border-radius-master);
            --wui-border-radius-4xs: calc(var(--w3m-border-radius-master) * 1.5);
            --wui-border-radius-3xs: calc(var(--w3m-border-radius-master) * 2);
            --wui-border-radius-xxs: calc(var(--w3m-border-radius-master) * 3);
            --wui-border-radius-xs: calc(var(--w3m-border-radius-master) * 4);
            --wui-border-radius-s: calc(var(--w3m-border-radius-master) * 5);
            --wui-border-radius-m: calc(var(--w3m-border-radius-master) * 7);
            --wui-border-radius-l: calc(var(--w3m-border-radius-master) * 9);
            --wui-border-radius-3xl: calc(var(--w3m-border-radius-master) * 20);
    
            --wui-font-weight-light: 400;
            --wui-font-weight-regular: 500;
            --wui-font-weight-medium: 600;
            --wui-font-weight-bold: 700;
    
            --wui-letter-spacing-2xl: -1.6px;
            --wui-letter-spacing-medium-title: -0.96px;
            --wui-letter-spacing-large: -0.8px;
            --wui-letter-spacing-medium: -0.72px;
            --wui-letter-spacing-paragraph: -0.64px;
            --wui-letter-spacing-small: -0.56px;
            --wui-letter-spacing-tiny: -0.48px;
            --wui-letter-spacing-micro: -0.2px;
            --wui-letter-spacing-mini: -0.16px;
    
            --wui-spacing-0: 0px;
            --wui-spacing-4xs: 2px;
            --wui-spacing-3xs: 4px;
            --wui-spacing-xxs: 6px;
            --wui-spacing-2xs: 7px;
            --wui-spacing-xs: 8px;
            --wui-spacing-1xs: 10px;
            --wui-spacing-s: 12px;
            --wui-spacing-m: 14px;
            --wui-spacing-l: 16px;
            --wui-spacing-2l: 18px;
            --wui-spacing-xl: 20px;
            --wui-spacing-xxl: 24px;
            --wui-spacing-2xl: 32px;
            --wui-spacing-3xl: 40px;
            --wui-spacing-4xl: 90px;
    
            --wui-icon-box-size-xxs: 14px;
            --wui-icon-box-size-xs: 20px;
            --wui-icon-box-size-sm: 24px;
            --wui-icon-box-size-md: 32px;
            --wui-icon-box-size-lg: 40px;
            --wui-icon-box-size-xl: 64px;
    
            --wui-icon-size-inherit: inherit;
            --wui-icon-size-xxs: 10px;
            --wui-icon-size-xs: 12px;
            --wui-icon-size-sm: 14px;
            --wui-icon-size-md: 16px;
            --wui-icon-size-mdl: 18px;
            --wui-icon-size-lg: 20px;
            --wui-icon-size-xl: 24px;
    
            --wui-wallet-image-size-inherit: inherit;
            --wui-wallet-image-size-sm: 40px;
            --wui-wallet-image-size-md: 56px;
            --wui-wallet-image-size-lg: 80px;
    
            --wui-visual-size-size-inherit: inherit;
            --wui-visual-size-sm: 40px;
            --wui-visual-size-md: 55px;
            --wui-visual-size-lg: 80px;
    
            --wui-box-size-md: 100px;
            --wui-box-size-lg: 120px;
    
            --wui-ease-out-power-2: cubic-bezier(0, 0, 0.22, 1);
            --wui-ease-out-power-1: cubic-bezier(0, 0, 0.55, 1);
    
            --wui-ease-in-power-3: cubic-bezier(0.66, 0, 1, 1);
            --wui-ease-in-power-2: cubic-bezier(0.45, 0, 1, 1);
            --wui-ease-in-power-1: cubic-bezier(0.3, 0, 1, 1);
    
            --wui-ease-inout-power-1: cubic-bezier(0.45, 0, 0.55, 1);
    
            --wui-duration-lg: 200ms;
            --wui-duration-md: 125ms;
            --wui-duration-sm: 75ms;
    
            --wui-path-network-sm: path(
              'M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z'
            );
    
            --wui-path-network-md: path(
              'M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z'
            );
    
            --wui-path-network-lg: path(
              'M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z'
            );
    
            --wui-width-network-sm: 36px;
            --wui-width-network-md: 48px;
            --wui-width-network-lg: 86px;
    
            --wui-height-network-sm: 40px;
            --wui-height-network-md: 54px;
            --wui-height-network-lg: 96px;
    
            --wui-icon-size-network-xs: 12px;
            --wui-icon-size-network-sm: 16px;
            --wui-icon-size-network-md: 24px;
            --wui-icon-size-network-lg: 42px;
    
            --wui-color-inherit: inherit;
    
            --wui-color-inverse-100: #fff;
            --wui-color-inverse-000: #000;
    
            --wui-cover: rgba(20, 20, 20, 0.8);
    
            --wui-color-modal-bg: var(--wui-color-modal-bg-base);
    
            --wui-color-blue-100: var(--wui-color-blue-base-100);
    
            --wui-color-accent-100: var(--wui-color-accent-base-100);
            --wui-color-accent-090: var(--wui-color-accent-base-090);
            --wui-color-accent-080: var(--wui-color-accent-base-080);
    
            --wui-accent-glass-090: var(--wui-accent-glass-base-090);
            --wui-accent-glass-080: var(--wui-accent-glass-base-080);
            --wui-accent-glass-020: var(--wui-accent-glass-base-020);
            --wui-accent-glass-015: var(--wui-accent-glass-base-015);
            --wui-accent-glass-010: var(--wui-accent-glass-base-010);
            --wui-accent-glass-005: var(--wui-accent-glass-base-005);
            --wui-accent-glass-002: var(--wui-accent-glass-base-002);
    
            --wui-color-fg-100: var(--wui-color-fg-base-100);
            --wui-color-fg-125: var(--wui-color-fg-base-125);
            --wui-color-fg-150: var(--wui-color-fg-base-150);
            --wui-color-fg-175: var(--wui-color-fg-base-175);
            --wui-color-fg-200: var(--wui-color-fg-base-200);
            --wui-color-fg-225: var(--wui-color-fg-base-225);
            --wui-color-fg-250: var(--wui-color-fg-base-250);
            --wui-color-fg-275: var(--wui-color-fg-base-275);
            --wui-color-fg-300: var(--wui-color-fg-base-300);
    
            --wui-color-bg-100: var(--wui-color-bg-base-100);
            --wui-color-bg-125: var(--wui-color-bg-base-125);
            --wui-color-bg-150: var(--wui-color-bg-base-150);
            --wui-color-bg-175: var(--wui-color-bg-base-175);
            --wui-color-bg-200: var(--wui-color-bg-base-200);
            --wui-color-bg-225: var(--wui-color-bg-base-225);
            --wui-color-bg-250: var(--wui-color-bg-base-250);
            --wui-color-bg-275: var(--wui-color-bg-base-275);
            --wui-color-bg-300: var(--wui-color-bg-base-300);
    
            --wui-color-success-100: var(--wui-color-success-base-100);
            --wui-color-error-100: var(--wui-color-error-base-100);
    
            --wui-icon-box-bg-error-100: var(--wui-icon-box-bg-error-base-100);
            --wui-icon-box-bg-blue-100: var(--wui-icon-box-bg-blue-base-100);
            --wui-icon-box-bg-success-100: var(--wui-icon-box-bg-success-base-100);
            --wui-icon-box-bg-inverse-100: var(--wui-icon-box-bg-inverse-base-100);
    
            --wui-all-wallets-bg-100: var(--wui-all-wallets-bg-base-100);
    
            --wui-avatar-border: var(--wui-avatar-border-base);
    
            --wui-thumbnail-border: var(--wui-thumbnail-border-base);
    
            --wui-box-shadow-blue: rgba(71, 161, 255, 0.16);
          }
    
          @supports (background: color-mix(in srgb, white 50%, black)) {
            :root {
              --wui-color-modal-bg: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-modal-bg-base)
              );
    
              --wui-box-shadow-blue: color-mix(in srgb, var(--wui-color-accent-100) 16%, transparent);
    
              --wui-color-accent-090: color-mix(
                in srgb,
                var(--wui-color-accent-base-100) 90%,
                var(--w3m-default)
              );
              --wui-color-accent-080: color-mix(
                in srgb,
                var(--wui-color-accent-base-100) 80%,
                var(--w3m-default)
              );
    
              --wui-color-accent-090: color-mix(
                in srgb,
                var(--wui-color-accent-base-100) 90%,
                transparent
              );
              --wui-color-accent-080: color-mix(
                in srgb,
                var(--wui-color-accent-base-100) 80%,
                transparent
              );
    
              --wui-accent-glass-090: color-mix(
                in srgb,
                var(--wui-color-accent-base-100) 90%,
                transparent
              );
              --wui-accent-glass-080: color-mix(
                in srgb,
                var(--wui-color-accent-base-100) 80%,
                transparent
              );
              --wui-accent-glass-020: color-mix(
                in srgb,
                var(--wui-color-accent-base-100) 20%,
                transparent
              );
              --wui-accent-glass-015: color-mix(
                in srgb,
                var(--wui-color-accent-base-100) 15%,
                transparent
              );
              --wui-accent-glass-010: color-mix(
                in srgb,
                var(--wui-color-accent-base-100) 10%,
                transparent
              );
              --wui-accent-glass-005: color-mix(
                in srgb,
                var(--wui-color-accent-base-100) 5%,
                transparent
              );
              --wui-color-accent-002: color-mix(
                in srgb,
                var(--wui-color-accent-base-100) 2%,
                transparent
              );
    
              --wui-color-fg-100: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-fg-base-100)
              );
              --wui-color-fg-125: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-fg-base-125)
              );
              --wui-color-fg-150: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-fg-base-150)
              );
              --wui-color-fg-175: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-fg-base-175)
              );
              --wui-color-fg-200: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-fg-base-200)
              );
              --wui-color-fg-225: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-fg-base-225)
              );
              --wui-color-fg-250: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-fg-base-250)
              );
              --wui-color-fg-275: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-fg-base-275)
              );
              --wui-color-fg-300: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-fg-base-300)
              );
    
              --wui-color-bg-100: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-bg-base-100)
              );
              --wui-color-bg-125: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-bg-base-125)
              );
              --wui-color-bg-150: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-bg-base-150)
              );
              --wui-color-bg-175: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-bg-base-175)
              );
              --wui-color-bg-200: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-bg-base-200)
              );
              --wui-color-bg-225: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-bg-base-225)
              );
              --wui-color-bg-250: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-bg-base-250)
              );
              --wui-color-bg-275: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-bg-base-275)
              );
              --wui-color-bg-300: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-bg-base-300)
              );
    
              --wui-color-success-100: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-success-base-100)
              );
              --wui-color-error-100: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-color-error-base-100)
              );
    
              --wui-icon-box-bg-error-100: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-icon-box-bg-error-base-100)
              );
              --wui-icon-box-bg-accent-100: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-icon-box-bg-blue-base-100)
              );
              --wui-icon-box-bg-success-100: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-icon-box-bg-success-base-100)
              );
              --wui-icon-box-bg-inverse-100: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-icon-box-bg-inverse-base-100)
              );
    
              --wui-all-wallets-bg-100: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-all-wallets-bg-base-100)
              );
    
              --wui-avatar-border: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-avatar-border-base)
              );
    
              --wui-thumbnail-border: color-mix(
                in srgb,
                var(--w3m-color-mix) var(--w3m-color-mix-strength),
                var(--wui-thumbnail-border-base)
              );
            }
          }
        `,light:IT`
          :root {
            --w3m-color-mix: ${PT(e?.["--w3m-color-mix"]||"#fff")};
            --w3m-accent: ${PT(e?.["--w3m-accent"]||"#47a1ff")};
            --w3m-default: #fff;
    
            --wui-color-modal-bg-base: #191a1a;
    
            --wui-color-blue-base-100: #47a1ff;
    
            --wui-color-accent-base-100: var(--w3m-accent);
            --wui-color-accent-base-090: #59aaff;
            --wui-color-accent-base-080: #6cb4ff;
    
            --wui-accent-glass-base-090: rgba(71, 161, 255, 0.9);
            --wui-accent-glass-base-080: rgba(71, 161, 255, 0.8);
            --wui-accent-glass-base-020: rgba(71, 161, 255, 0.2);
            --wui-accent-glass-base-015: rgba(71, 161, 255, 0.15);
            --wui-accent-glass-base-010: rgba(71, 161, 255, 0.1);
            --wui-accent-glass-base-005: rgba(71, 161, 255, 0.05);
            --wui-accent-glass-base-002: rgba(71, 161, 255, 0.02);
    
            --wui-color-fg-base-100: #e4e7e7;
            --wui-color-fg-base-125: #d0d5d5;
            --wui-color-fg-base-150: #a8b1b1;
            --wui-color-fg-base-175: #a8b0b0;
            --wui-color-fg-base-200: #949e9e;
            --wui-color-fg-base-225: #868f8f;
            --wui-color-fg-base-250: #788080;
            --wui-color-fg-base-275: #788181;
            --wui-color-fg-base-300: #6e7777;
    
            --wui-color-bg-base-100: #141414;
            --wui-color-bg-base-125: #191a1a;
            --wui-color-bg-base-150: #1e1f1f;
            --wui-color-bg-base-175: #222525;
            --wui-color-bg-base-200: #272a2a;
            --wui-color-bg-base-225: #2c3030;
            --wui-color-bg-base-250: #313535;
            --wui-color-bg-base-275: #363b3b;
            --wui-color-bg-base-300: #3b4040;
    
            --wui-color-success-base-100: #26d962;
            --wui-color-error-base-100: #f25a67;
    
            --wui-success-glass-001: rgba(38, 217, 98, 0.01);
            --wui-success-glass-002: rgba(38, 217, 98, 0.02);
            --wui-success-glass-005: rgba(38, 217, 98, 0.05);
            --wui-success-glass-010: rgba(38, 217, 98, 0.1);
            --wui-success-glass-015: rgba(38, 217, 98, 0.15);
            --wui-success-glass-020: rgba(38, 217, 98, 0.2);
            --wui-success-glass-025: rgba(38, 217, 98, 0.25);
            --wui-success-glass-030: rgba(38, 217, 98, 0.3);
            --wui-success-glass-060: rgba(38, 217, 98, 0.6);
            --wui-success-glass-080: rgba(38, 217, 98, 0.8);
    
            --wui-error-glass-001: rgba(242, 90, 103, 0.01);
            --wui-error-glass-002: rgba(242, 90, 103, 0.02);
            --wui-error-glass-005: rgba(242, 90, 103, 0.05);
            --wui-error-glass-010: rgba(242, 90, 103, 0.1);
            --wui-error-glass-015: rgba(242, 90, 103, 0.15);
            --wui-error-glass-020: rgba(242, 90, 103, 0.2);
            --wui-error-glass-025: rgba(242, 90, 103, 0.25);
            --wui-error-glass-030: rgba(242, 90, 103, 0.3);
            --wui-error-glass-060: rgba(242, 90, 103, 0.6);
            --wui-error-glass-080: rgba(242, 90, 103, 0.8);
    
            --wui-icon-box-bg-error-base-100: #3c2426;
            --wui-icon-box-bg-blue-base-100: #20303f;
            --wui-icon-box-bg-success-base-100: #1f3a28;
            --wui-icon-box-bg-inverse-base-100: #243240;
    
            --wui-all-wallets-bg-base-100: #222b35;
    
            --wui-avatar-border-base: #252525;
    
            --wui-thumbnail-border-base: #252525;
    
            --wui-gray-glass-001: rgba(255, 255, 255, 0.01);
            --wui-gray-glass-002: rgba(255, 255, 255, 0.02);
            --wui-gray-glass-005: rgba(255, 255, 255, 0.05);
            --wui-gray-glass-010: rgba(255, 255, 255, 0.1);
            --wui-gray-glass-015: rgba(255, 255, 255, 0.15);
            --wui-gray-glass-020: rgba(255, 255, 255, 0.2);
            --wui-gray-glass-025: rgba(255, 255, 255, 0.25);
            --wui-gray-glass-030: rgba(255, 255, 255, 0.3);
            --wui-gray-glass-060: rgba(255, 255, 255, 0.6);
            --wui-gray-glass-080: rgba(255, 255, 255, 0.8);
            --wui-gray-glass-090: rgba(255, 255, 255, 0.9);
          }
        `,dark:IT`
          :root {
            --w3m-color-mix: ${PT(e?.["--w3m-color-mix"]||"#000")};
            --w3m-accent: ${PT(e?.["--w3m-accent"]||"#3396ff")};
            --w3m-default: #000;
    
            --wui-color-modal-bg-base: #fff;
    
            --wui-color-blue-base-100: #3396ff;
    
            --wui-color-accent-base-100: var(--w3m-accent);
            --wui-color-accent-base-090: #2d7dd2;
            --wui-color-accent-base-080: #2978cc;
    
            --wui-accent-glass-base-090: rgba(51, 150, 255, 0.9);
            --wui-accent-glass-base-080: rgba(51, 150, 255, 0.8);
            --wui-accent-glass-base-020: rgba(51, 150, 255, 0.2);
            --wui-accent-glass-base-015: rgba(51, 150, 255, 0.15);
            --wui-accent-glass-base-010: rgba(51, 150, 255, 0.1);
            --wui-accent-glass-base-005: rgba(51, 150, 255, 0.05);
            --wui-accent-glass-base-002: rgba(51, 150, 255, 0.02);
    
            --wui-color-fg-base-100: #141414;
            --wui-color-fg-base-125: #2d3131;
            --wui-color-fg-base-150: #474d4d;
            --wui-color-fg-base-175: #636d6d;
            --wui-color-fg-base-200: #798686;
            --wui-color-fg-base-225: #828f8f;
            --wui-color-fg-base-250: #8b9797;
            --wui-color-fg-base-275: #95a0a0;
            --wui-color-fg-base-300: #9ea9a9;
    
            --wui-color-bg-base-100: #ffffff;
            --wui-color-bg-base-125: #f5fafa;
            --wui-color-bg-base-150: #f3f8f8;
            --wui-color-bg-base-175: #eef4f4;
            --wui-color-bg-base-200: #eaf1f1;
            --wui-color-bg-base-225: #e5eded;
            --wui-color-bg-base-250: #e1e9e9;
            --wui-color-bg-base-275: #dce7e7;
            --wui-color-bg-base-300: #d8e3e3;
    
            --wui-color-success-base-100: #26b562;
            --wui-color-error-base-100: #f05142;
    
            --wui-success-glass-001: rgba(38, 181, 98, 0.01);
            --wui-success-glass-002: rgba(38, 181, 98, 0.02);
            --wui-success-glass-005: rgba(38, 181, 98, 0.05);
            --wui-success-glass-010: rgba(38, 181, 98, 0.1);
            --wui-success-glass-015: rgba(38, 181, 98, 0.15);
            --wui-success-glass-020: rgba(38, 181, 98, 0.2);
            --wui-success-glass-025: rgba(38, 181, 98, 0.25);
            --wui-success-glass-030: rgba(38, 181, 98, 0.3);
            --wui-success-glass-060: rgba(38, 181, 98, 0.6);
            --wui-success-glass-080: rgba(38, 181, 98, 0.8);
    
            --wui-error-glass-001: rgba(240, 81, 66, 0.01);
            --wui-error-glass-002: rgba(240, 81, 66, 0.02);
            --wui-error-glass-005: rgba(240, 81, 66, 0.05);
            --wui-error-glass-010: rgba(240, 81, 66, 0.1);
            --wui-error-glass-015: rgba(240, 81, 66, 0.15);
            --wui-error-glass-020: rgba(240, 81, 66, 0.2);
            --wui-error-glass-025: rgba(240, 81, 66, 0.25);
            --wui-error-glass-030: rgba(240, 81, 66, 0.3);
            --wui-error-glass-060: rgba(240, 81, 66, 0.6);
            --wui-error-glass-080: rgba(240, 81, 66, 0.8);
    
            --wui-icon-box-bg-error-base-100: #f4dfdd;
            --wui-icon-box-bg-blue-base-100: #d9ecfb;
            --wui-icon-box-bg-success-base-100: #daf0e4;
            --wui-icon-box-bg-inverse-base-100: #dcecfc;
    
            --wui-all-wallets-bg-base-100: #e8f1fa;
    
            --wui-avatar-border-base: #f3f4f4;
    
            --wui-thumbnail-border-base: #eaefef;
    
            --wui-gray-glass-001: rgba(0, 0, 0, 0.01);
            --wui-gray-glass-002: rgba(0, 0, 0, 0.02);
            --wui-gray-glass-005: rgba(0, 0, 0, 0.05);
            --wui-gray-glass-010: rgba(0, 0, 0, 0.1);
            --wui-gray-glass-015: rgba(0, 0, 0, 0.15);
            --wui-gray-glass-020: rgba(0, 0, 0, 0.2);
            --wui-gray-glass-025: rgba(0, 0, 0, 0.25);
            --wui-gray-glass-030: rgba(0, 0, 0, 0.3);
            --wui-gray-glass-060: rgba(0, 0, 0, 0.6);
            --wui-gray-glass-080: rgba(0, 0, 0, 0.8);
            --wui-gray-glass-090: rgba(0, 0, 0, 0.9);
          }
        `}}var hR,pR,fR,gR,mR,bR,yR=a((()=>{oR(),gR=IT`
      *,
      *::after,
      *::before,
      :host {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-style: normal;
        text-rendering: optimizeSpeed;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        -webkit-tap-highlight-color: transparent;
        font-family: var(--wui-font-family);
        backface-visibility: hidden;
      }
    `,mR=IT`
      button,
      a {
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        transition:
          background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
          color var(--wui-ease-inout-power-1) var(--wui-duration-md),
          box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);
        will-change: background-color, color;
        outline: none;
        border: 1px solid transparent;
        column-gap: var(--wui-spacing-3xs);
        background-color: transparent;
        text-decoration: none;
      }
    
      @media (hover: hover) and (pointer: fine) {
        button:hover:enabled {
          background-color: var(--wui-gray-glass-005);
        }
    
        button:active:enabled {
          background-color: var(--wui-gray-glass-010);
        }
    
        button[data-variant='fill']:hover:enabled {
          background-color: var(--wui-color-accent-090);
        }
    
        button[data-variant='accentBg']:hover:enabled {
          background: var(--wui-accent-glass-015);
        }
    
        button[data-variant='accentBg']:active:enabled {
          background: var(--wui-accent-glass-020);
        }
      }
    
      button:disabled {
        cursor: not-allowed;
        background-color: var(--wui-gray-glass-005);
      }
    
      button[data-variant='shade']:disabled,
      button[data-variant='accent']:disabled,
      button[data-variant='accentBg']:disabled {
        background-color: var(--wui-gray-glass-010);
        color: var(--wui-gray-glass-015);
        filter: grayscale(1);
      }
    
      button:disabled > wui-wallet-image,
      button:disabled > wui-all-wallets-image,
      button:disabled > wui-network-image,
      button:disabled > wui-image,
      button:disabled > wui-icon-box,
      button:disabled > wui-transaction-visual,
      button:disabled > wui-logo {
        filter: grayscale(1);
      }
    
      button:focus-visible,
      a:focus-visible {
        border: 1px solid var(--wui-color-accent-100);
        background-color: var(--wui-gray-glass-005);
        -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
        -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
        box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
      }
    
      button[data-variant='fill']:focus-visible {
        background-color: var(--wui-color-accent-090);
      }
    
      button[data-variant='fill'] {
        color: var(--wui-color-inverse-100);
        background-color: var(--wui-color-accent-100);
      }
    
      button[data-variant='fill']:disabled {
        color: var(--wui-gray-glass-015);
        background-color: var(--wui-gray-glass-015);
      }
    
      button[data-variant='fill']:disabled > wui-icon {
        color: var(--wui-gray-glass-015);
      }
    
      button[data-variant='shade'] {
        color: var(--wui-color-fg-200);
      }
    
      button[data-variant='accent'],
      button[data-variant='accentBg'] {
        color: var(--wui-color-accent-100);
      }
    
      button[data-variant='accentBg'] {
        background: var(--wui-accent-glass-010);
        border: 1px solid var(--wui-accent-glass-010);
      }
    
      button[data-variant='fullWidth'] {
        width: 100%;
        border-radius: var(--wui-border-radius-xs);
        height: 56px;
        border: none;
        background-color: var(--wui-gray-glass-002);
        color: var(--wui-color-fg-200);
        gap: var(--wui-spacing-xs);
      }
    
      button:active:enabled {
        background-color: var(--wui-gray-glass-010);
      }
    
      button[data-variant='fill']:active:enabled {
        background-color: var(--wui-color-accent-080);
        border: 1px solid var(--wui-gray-glass-010);
      }
    
      input {
        border: none;
        outline: none;
        appearance: none;
      }
    `,bR=IT`
      .wui-color-inherit {
        color: var(--wui-color-inherit);
      }
    
      .wui-color-accent-100 {
        color: var(--wui-color-accent-100);
      }
    
      .wui-color-error-100 {
        color: var(--wui-color-error-100);
      }
    
      .wui-color-success-100 {
        color: var(--wui-color-success-100);
      }
    
      .wui-color-inverse-100 {
        color: var(--wui-color-inverse-100);
      }
    
      .wui-color-inverse-000 {
        color: var(--wui-color-inverse-000);
      }
    
      .wui-color-fg-100 {
        color: var(--wui-color-fg-100);
      }
    
      .wui-color-fg-200 {
        color: var(--wui-color-fg-200);
      }
    
      .wui-color-fg-300 {
        color: var(--wui-color-fg-300);
      }
    
      .wui-bg-color-inherit {
        background-color: var(--wui-color-inherit);
      }
    
      .wui-bg-color-blue-100 {
        background-color: var(--wui-color-accent-100);
      }
    
      .wui-bg-color-error-100 {
        background-color: var(--wui-color-error-100);
      }
    
      .wui-bg-color-success-100 {
        background-color: var(--wui-color-success-100);
      }
    
      .wui-bg-color-inverse-100 {
        background-color: var(--wui-color-inverse-100);
      }
    
      .wui-bg-color-inverse-000 {
        background-color: var(--wui-color-inverse-000);
      }
    
      .wui-bg-color-fg-100 {
        background-color: var(--wui-color-fg-100);
      }
    
      .wui-bg-color-fg-200 {
        background-color: var(--wui-color-fg-200);
      }
    
      .wui-bg-color-fg-300 {
        background-color: var(--wui-color-fg-300);
      }
    `}));function wR(e){return function(t){return"function"==typeof t?function(e,t){return customElements.get(e)||customElements.define(e,t),t}(e,t):function(e,t){let{kind:r,elements:i}=t;return{kind:r,elements:i,finisher(t){customElements.get(e)||customElements.define(e,t)}}}(e,t)}}var vR,_R,xR,ER=a((()=>{})),CR=a((()=>{oR(),vR=IT`
      :host {
        display: block;
        border-radius: clamp(0px, var(--wui-border-radius-l), 44px);
        box-shadow: 0 0 0 1px var(--wui-gray-glass-005);
        background-color: var(--wui-color-modal-bg);
        overflow: hidden;
      }
    `})),kR=a((()=>{oR(),yR(),ER(),CR(),_R=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},(xR=class extends QO{render(){return MO`<slot></slot>`}}).styles=[gR,vR],xR=_R([wR("wui-card")],xR)})),PR=a((()=>{}));function IR(e){return(t,r)=>"object"==typeof r?AR(e,t,r):((e,t,r)=>{let i=t.hasOwnProperty(r);return t.constructor.createProperty(r,i?{...e,wrapped:!0}:e),i?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}var SR,AR,TR=a((()=>{uO(),SR={attribute:!0,type:String,converter:FT,reflect:!1,hasChanged:HT},AR=(e=SR,t,r)=>{let{kind:i,metadata:n}=r,o=globalThis.litPropertyMetadata.get(n);if(void 0===o&&globalThis.litPropertyMetadata.set(n,o=new Map),o.set(r.name,e),"accessor"===i){let{name:i}=r;return{set(r){let n=t.get.call(this);t.set.call(this,r),this.requestUpdate(i,n,e)},init(t){return void 0!==t&&this.P(i,void 0,e),t}}}if("setter"===i){let{name:i}=r;return function(r){let n=this[i];t.call(this,r),this.requestUpdate(i,n,e)}}throw Error("Unsupported decorator location: "+i)}}));function OR(e){return IR({...e,state:!0,attribute:!1})}var RR,NR,MR,$R,jR,LR,BR,DR,UR,FR,HR,zR,qR,WR,VR,GR,ZR,KR,YR,JR,QR,XR,eN,tN,rN,iN,nN,oN,aN,sN,cN,lN,uN,dN,hN,pN,fN,gN,mN,bN,yN,wN,vN,_N,xN,EN,CN,kN,PN,IN,SN,AN,TN,ON,RN,NN,MN,$N,jN,LN,BN,DN,UN,FN,HN,zN,qN,WN,VN,GN,ZN,KN,YN,JN,QN,XN,eM,tM,rM,iM,nM,oM,aM,sM,cM,lM,uM,dM,hM,pM,fM,gM,mM,bM,yM,wM,vM,_M,xM,EM,CM,kM,PM,IM,SM,AM,TM,OM,RM,NM,MM,$M,jM,LM,BM,DM,UM,FM,HM,zM,qM,WM,VM,GM,ZM,KM,YM,JM,QM,XM,e$,t$,r$,i$,n$,o$,a$,s$,c$,l$,u$,d$,h$,p$,f$,g$,m$,b$,y$,w$,v$,_$,x$,E$,C$,k$,P$,I$,S$,A$,T$,O$,R$,N$,M$,$$,j$,L$,B$,D$=a((()=>{TR()})),U$=a((()=>{})),F$=a((()=>{})),H$=a((()=>{F$()})),z$=a((()=>{F$()})),q$=a((()=>{F$()})),W$=a((()=>{F$()})),V$=a((()=>{F$()})),G$=a((()=>{PR(),TR(),D$(),U$(),H$(),z$(),q$(),W$(),V$()})),Z$=a((()=>{oR(),RR=IT`
      :host {
        display: flex;
        aspect-ratio: 1 / 1;
        color: var(--local-color);
        width: var(--local-width);
      }
    
      svg {
        width: inherit;
        height: inherit;
        object-fit: contain;
        object-position: center;
      }
    `})),K$=a((()=>{oR(),NR=$O`<svg fill="none" viewBox="0 0 24 24">
      <path
        style="fill: var(--wui-color-accent-100);"
        d="M10.2 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM10.2 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0Z"
      />
    </svg>`})),Y$=a((()=>{oR(),MR=$O`<svg
      fill="none"
      viewBox="0 0 21 20"
    >
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M10.5 2.42908C6.31875 2.42908 2.92859 5.81989 2.92859 10.0034C2.92859 14.1869 6.31875 17.5777 10.5 17.5777C14.6813 17.5777 18.0714 14.1869 18.0714 10.0034C18.0714 5.81989 14.6813 2.42908 10.5 2.42908ZM0.928589 10.0034C0.928589 4.71596 5.21355 0.429077 10.5 0.429077C15.7865 0.429077 20.0714 4.71596 20.0714 10.0034C20.0714 15.2908 15.7865 19.5777 10.5 19.5777C5.21355 19.5777 0.928589 15.2908 0.928589 10.0034ZM10.5 5.75003C11.0523 5.75003 11.5 6.19774 11.5 6.75003L11.5 10.8343L12.7929 9.54137C13.1834 9.15085 13.8166 9.15085 14.2071 9.54137C14.5976 9.9319 14.5976 10.5651 14.2071 10.9556L11.2071 13.9556C10.8166 14.3461 10.1834 14.3461 9.79291 13.9556L6.79291 10.9556C6.40239 10.5651 6.40239 9.9319 6.79291 9.54137C7.18343 9.15085 7.8166 9.15085 8.20712 9.54137L9.50002 10.8343L9.50002 6.75003C9.50002 6.19774 9.94773 5.75003 10.5 5.75003Z"
        clip-rule="evenodd"
      /></svg
    >`})),J$=a((()=>{oR(),$R=$O`
    <svg width="36" height="36">
      <path
        d="M28.724 0H7.271A7.269 7.269 0 0 0 0 7.272v21.46A7.268 7.268 0 0 0 7.271 36H28.73A7.272 7.272 0 0 0 36 28.728V7.272A7.275 7.275 0 0 0 28.724 0Z"
        fill="url(#a)"
      />
      <path
        d="m17.845 8.271.729-1.26a1.64 1.64 0 1 1 2.843 1.638l-7.023 12.159h5.08c1.646 0 2.569 1.935 1.853 3.276H6.434a1.632 1.632 0 0 1-1.638-1.638c0-.909.73-1.638 1.638-1.638h4.176l5.345-9.265-1.67-2.898a1.642 1.642 0 0 1 2.844-1.638l.716 1.264Zm-6.317 17.5-1.575 2.732a1.64 1.64 0 1 1-2.844-1.638l1.17-2.025c1.323-.41 2.398-.095 3.249.931Zm13.56-4.954h4.262c.909 0 1.638.729 1.638 1.638 0 .909-.73 1.638-1.638 1.638h-2.367l1.597 2.772c.45.788.185 1.782-.602 2.241a1.642 1.642 0 0 1-2.241-.603c-2.69-4.666-4.711-8.159-6.052-10.485-1.372-2.367-.391-4.743.576-5.549 1.075 1.846 2.682 4.631 4.828 8.348Z"
        fill="#fff"
      />
      <defs>
        <linearGradient id="a" x1="18" y1="0" x2="18" y2="36" gradientUnits="userSpaceOnUse">
          <stop stop-color="#18BFFB" />
          <stop offset="1" stop-color="#2072F3" />
        </linearGradient>
      </defs>
    </svg>`})),Q$=a((()=>{oR(),jR=$O`<svg fill="none" viewBox="0 0 40 40">
      <g clip-path="url(#a)">
        <g clip-path="url(#b)">
          <circle cx="20" cy="19.89" r="20" fill="#000" />
          <g clip-path="url(#c)">
            <path
              fill="#fff"
              d="M28.77 23.3c-.69 1.99-2.75 5.52-4.87 5.56-1.4.03-1.86-.84-3.46-.84-1.61 0-2.12.81-3.45.86-2.25.1-5.72-5.1-5.72-9.62 0-4.15 2.9-6.2 5.42-6.25 1.36-.02 2.64.92 3.47.92.83 0 2.38-1.13 4.02-.97.68.03 2.6.28 3.84 2.08-3.27 2.14-2.76 6.61.75 8.25ZM24.2 7.88c-2.47.1-4.49 2.69-4.2 4.84 2.28.17 4.47-2.39 4.2-4.84Z"
            />
          </g>
        </g>
      </g>
      <defs>
        <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
        <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
        <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
      </defs>
    </svg>`})),X$=a((()=>{oR(),LR=$O`<svg fill="none" viewBox="0 0 14 15">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M7 1.99a1 1 0 0 1 1 1v7.58l2.46-2.46a1 1 0 0 1 1.41 1.42L7.7 13.69a1 1 0 0 1-1.41 0L2.12 9.53A1 1 0 0 1 3.54 8.1L6 10.57V3a1 1 0 0 1 1-1Z"
        clip-rule="evenodd"
      />
    </svg>`})),ej=a((()=>{oR(),BR=$O`<svg fill="none" viewBox="0 0 14 15">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M13 7.99a1 1 0 0 1-1 1H4.4l2.46 2.46a1 1 0 1 1-1.41 1.41L1.29 8.7a1 1 0 0 1 0-1.41L5.46 3.1a1 1 0 0 1 1.41 1.42L4.41 6.99H12a1 1 0 0 1 1 1Z"
        clip-rule="evenodd"
      />
    </svg>`})),tj=a((()=>{oR(),DR=$O`<svg fill="none" viewBox="0 0 14 15">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M1 7.99a1 1 0 0 1 1-1h7.58L7.12 4.53A1 1 0 1 1 8.54 3.1l4.16 4.17a1 1 0 0 1 0 1.41l-4.16 4.17a1 1 0 1 1-1.42-1.41l2.46-2.46H2a1 1 0 0 1-1-1Z"
        clip-rule="evenodd"
      />
    </svg>`})),rj=a((()=>{oR(),UR=$O`<svg fill="none" viewBox="0 0 14 15">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M7 13.99a1 1 0 0 1-1-1V5.4L3.54 7.86a1 1 0 0 1-1.42-1.41L6.3 2.28a1 1 0 0 1 1.41 0l4.17 4.17a1 1 0 1 1-1.41 1.41L8 5.4v7.59a1 1 0 0 1-1 1Z"
        clip-rule="evenodd"
      />
    </svg>`})),ij=a((()=>{oR(),FR=$O`<svg fill="none" viewBox="0 0 20 20">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M4 6.4a1 1 0 0 1-.46.89 6.98 6.98 0 0 0 .38 6.18A7 7 0 0 0 16.46 7.3a1 1 0 0 1-.47-.92 7 7 0 0 0-12 .03Zm-2.02-.5a9 9 0 1 1 16.03 8.2A9 9 0 0 1 1.98 5.9Z"
        clip-rule="evenodd"
      />
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M6.03 8.63c-1.46-.3-2.72-.75-3.6-1.35l-.02-.01-.14-.11a1 1 0 0 1 1.2-1.6l.1.08c.6.4 1.52.74 2.69 1 .16-.99.39-1.88.67-2.65.3-.79.68-1.5 1.15-2.02A2.58 2.58 0 0 1 9.99 1c.8 0 1.45.44 1.92.97.47.52.84 1.23 1.14 2.02.29.77.52 1.66.68 2.64a8 8 0 0 0 2.7-1l.26-.18h.48a1 1 0 0 1 .12 2c-.86.51-2.01.91-3.34 1.18a22.24 22.24 0 0 1-.03 3.19c1.45.29 2.7.73 3.58 1.31a1 1 0 0 1-1.1 1.68c-.6-.4-1.56-.76-2.75-1-.15.8-.36 1.55-.6 2.2-.3.79-.67 1.5-1.14 2.02-.47.53-1.12.97-1.92.97-.8 0-1.45-.44-1.91-.97a6.51 6.51 0 0 1-1.15-2.02c-.24-.65-.44-1.4-.6-2.2-1.18.24-2.13.6-2.73.99a1 1 0 1 1-1.1-1.67c.88-.58 2.12-1.03 3.57-1.31a22.03 22.03 0 0 1-.04-3.2Zm2.2-1.7c.15-.86.34-1.61.58-2.24.24-.65.51-1.12.76-1.4.25-.28.4-.29.42-.29.03 0 .17.01.42.3.25.27.52.74.77 1.4.23.62.43 1.37.57 2.22a19.96 19.96 0 0 1-3.52 0Zm-.18 4.6a20.1 20.1 0 0 1-.03-2.62 21.95 21.95 0 0 0 3.94 0 20.4 20.4 0 0 1-.03 2.63 21.97 21.97 0 0 0-3.88 0Zm.27 2c.13.66.3 1.26.49 1.78.24.65.51 1.12.76 1.4.25.28.4.29.42.29.03 0 .17-.01.42-.3.25-.27.52-.74.77-1.4.19-.5.36-1.1.49-1.78a20.03 20.03 0 0 0-3.35 0Z"
        clip-rule="evenodd"
      />
    </svg>`})),nj=a((()=>{oR(),HR=$O`<svg
      xmlns="http://www.w3.org/2000/svg"
      width="12"
      height="12"
      viewBox="0 0 12 12"
      fill="none"
    >
      <path
        fill-rule="evenodd"
        clip-rule="evenodd"
        d="M10.537 2.34245C10.8997 2.64654 10.9471 3.187 10.6429 3.54959L5.61072 9.54757C5.45645 9.73144 5.23212 9.84222 4.99229 9.85295C4.75247 9.86368 4.51914 9.77337 4.34906 9.60401L1.40881 6.6761C1.07343 6.34213 1.07238 5.7996 1.40647 5.46433C1.74055 5.12906 2.28326 5.12801 2.61865 5.46198L4.89731 7.73108L9.32942 2.44834C9.63362 2.08576 10.1743 2.03835 10.537 2.34245Z"
        fill="currentColor"
      /></svg
    >`})),oj=a((()=>{oR(),zR=$O`<svg fill="none" viewBox="0 0 16 16">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M1.46 4.96a1 1 0 0 1 1.41 0L8 10.09l5.13-5.13a1 1 0 1 1 1.41 1.41l-5.83 5.84a1 1 0 0 1-1.42 0L1.46 6.37a1 1 0 0 1 0-1.41Z"
        clip-rule="evenodd"
      />
    </svg>`})),aj=a((()=>{oR(),qR=$O`<svg fill="none" viewBox="0 0 16 16">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M11.04 1.46a1 1 0 0 1 0 1.41L5.91 8l5.13 5.13a1 1 0 1 1-1.41 1.41L3.79 8.71a1 1 0 0 1 0-1.42l5.84-5.83a1 1 0 0 1 1.41 0Z"
        clip-rule="evenodd"
      />
    </svg>`})),sj=a((()=>{oR(),WR=$O`<svg fill="none" viewBox="0 0 16 16">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M4.96 14.54a1 1 0 0 1 0-1.41L10.09 8 4.96 2.87a1 1 0 0 1 1.41-1.41l5.84 5.83a1 1 0 0 1 0 1.42l-5.84 5.83a1 1 0 0 1-1.41 0Z"
        clip-rule="evenodd"
      />
    </svg>`})),cj=a((()=>{oR(),VR=$O`<svg fill="none" viewBox="0 0 16 16">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M14.54 11.04a1 1 0 0 1-1.41 0L8 5.92l-5.13 5.12a1 1 0 1 1-1.41-1.41l5.83-5.84a1 1 0 0 1 1.42 0l5.83 5.84a1 1 0 0 1 0 1.41Z"
        clip-rule="evenodd"
      />
    </svg>`})),lj=a((()=>{oR(),GR=$O`<svg width="36" height="36" fill="none">
      <path
        fill="#fff"
        fill-opacity=".05"
        d="M0 14.94c0-5.55 0-8.326 1.182-10.4a9 9 0 0 1 3.359-3.358C6.614 0 9.389 0 14.94 0h6.12c5.55 0 8.326 0 10.4 1.182a9 9 0 0 1 3.358 3.359C36 6.614 36 9.389 36 14.94v6.12c0 5.55 0 8.326-1.182 10.4a9 9 0 0 1-3.359 3.358C29.386 36 26.611 36 21.06 36h-6.12c-5.55 0-8.326 0-10.4-1.182a9 9 0 0 1-3.358-3.359C0 29.386 0 26.611 0 21.06v-6.12Z"
      />
      <path
        stroke="#fff"
        stroke-opacity=".05"
        d="M14.94.5h6.12c2.785 0 4.84 0 6.46.146 1.612.144 2.743.43 3.691.97a8.5 8.5 0 0 1 3.172 3.173c.541.948.826 2.08.971 3.692.145 1.62.146 3.675.146 6.459v6.12c0 2.785 0 4.84-.146 6.46-.145 1.612-.43 2.743-.97 3.691a8.5 8.5 0 0 1-3.173 3.172c-.948.541-2.08.826-3.692.971-1.62.145-3.674.146-6.459.146h-6.12c-2.784 0-4.84 0-6.46-.146-1.612-.145-2.743-.43-3.691-.97a8.5 8.5 0 0 1-3.172-3.173c-.541-.948-.827-2.08-.971-3.692C.5 25.9.5 23.845.5 21.06v-6.12c0-2.784 0-4.84.146-6.46.144-1.612.43-2.743.97-3.691A8.5 8.5 0 0 1 4.79 1.617C5.737 1.076 6.869.79 8.48.646 10.1.5 12.156.5 14.94.5Z"
      />
      <path
        fill="url(#a)"
        d="M17.998 10.8h12.469a14.397 14.397 0 0 0-24.938.001l6.234 10.798.006-.001a7.19 7.19 0 0 1 6.23-10.799Z"
      />
      <path
        fill="url(#b)"
        d="m24.237 21.598-6.234 10.798A14.397 14.397 0 0 0 30.47 10.798H18.002l-.002.006a7.191 7.191 0 0 1 6.237 10.794Z"
      />
      <path
        fill="url(#c)"
        d="M11.765 21.601 5.531 10.803A14.396 14.396 0 0 0 18.001 32.4l6.235-10.798-.004-.004a7.19 7.19 0 0 1-12.466.004Z"
      />
      <path fill="#fff" d="M18 25.2a7.2 7.2 0 1 0 0-14.4 7.2 7.2 0 0 0 0 14.4Z" />
      <path fill="#1A73E8" d="M18 23.7a5.7 5.7 0 1 0 0-11.4 5.7 5.7 0 0 0 0 11.4Z" />
      <defs>
        <linearGradient
          id="a"
          x1="6.294"
          x2="41.1"
          y1="5.995"
          y2="5.995"
          gradientUnits="userSpaceOnUse"
        >
          <stop stop-color="#D93025" />
          <stop offset="1" stop-color="#EA4335" />
        </linearGradient>
        <linearGradient
          id="b"
          x1="20.953"
          x2="37.194"
          y1="32.143"
          y2="2.701"
          gradientUnits="userSpaceOnUse"
        >
          <stop stop-color="#FCC934" />
          <stop offset="1" stop-color="#FBBC04" />
        </linearGradient>
        <linearGradient
          id="c"
          x1="25.873"
          x2="9.632"
          y1="31.2"
          y2="1.759"
          gradientUnits="userSpaceOnUse"
        >
          <stop stop-color="#1E8E3E" />
          <stop offset="1" stop-color="#34A853" />
        </linearGradient>
      </defs>
    </svg>`})),uj=a((()=>{oR(),ZR=$O`<svg fill="none" viewBox="0 0 16 16">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M7 2.99a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm-7 5a7 7 0 1 1 14 0 7 7 0 0 1-14 0Zm7-4a1 1 0 0 1 1 1v2.58l1.85 1.85a1 1 0 0 1-1.41 1.42L6.29 8.69A1 1 0 0 1 6 8v-3a1 1 0 0 1 1-1Z"
        clip-rule="evenodd"
      />
    </svg>`})),dj=a((()=>{oR(),KR=$O`<svg fill="none" viewBox="0 0 16 16">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M2.54 2.54a1 1 0 0 1 1.42 0L8 6.6l4.04-4.05a1 1 0 1 1 1.42 1.42L9.4 8l4.05 4.04a1 1 0 0 1-1.42 1.42L8 9.4l-4.04 4.05a1 1 0 0 1-1.42-1.42L6.6 8 2.54 3.96a1 1 0 0 1 0-1.42Z"
        clip-rule="evenodd"
      />
    </svg>`})),hj=a((()=>{oR(),YR=$O`<svg fill="none" viewBox="0 0 20 20">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M10 3a7 7 0 0 0-6.85 8.44l8.29-8.3C10.97 3.06 10.49 3 10 3Zm3.49.93-9.56 9.56c.32.55.71 1.06 1.16 1.5L15 5.1a7.03 7.03 0 0 0-1.5-1.16Zm2.7 2.8-9.46 9.46a7 7 0 0 0 9.46-9.46ZM1.99 5.9A9 9 0 1 1 18 14.09 9 9 0 0 1 1.98 5.91Z"
        clip-rule="evenodd"
      />
    </svg>`})),pj=a((()=>{oR(),JR=$O`<svg fill="none" viewBox="0 0 16 16">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm10.66-2.65a1 1 0 0 1 .23 1.06L9.83 9.24a1 1 0 0 1-.59.58l-2.83 1.06A1 1 0 0 1 5.13 9.6l1.06-2.82a1 1 0 0 1 .58-.59L9.6 5.12a1 1 0 0 1 1.06.23ZM7.9 7.89l-.13.35.35-.13.12-.35-.34.13Z"
        clip-rule="evenodd"
      />
    </svg>`})),fj=a((()=>{oR(),QR=$O`<svg
      xmlns="http://www.w3.org/2000/svg"
      width="16"
      height="16"
      viewBox="0 0 16 16"
      fill="none"
    >
      <path
        fill="currentColor"
        fill-rule="evenodd"
        clip-rule="evenodd"
        d="M9.21498 1.28565H10.5944C11.1458 1.28562 11.6246 1.2856 12.0182 1.32093C12.4353 1.35836 12.853 1.44155 13.2486 1.66724C13.7005 1.92498 14.0749 2.29935 14.3326 2.75122C14.5583 3.14689 14.6415 3.56456 14.6789 3.9817C14.7143 4.37531 14.7142 4.85403 14.7142 5.40545V6.78489C14.7142 7.33631 14.7143 7.81503 14.6789 8.20865C14.6415 8.62578 14.5583 9.04345 14.3326 9.43912C14.0749 9.89099 13.7005 10.2654 13.2486 10.5231C12.853 10.7488 12.4353 10.832 12.0182 10.8694C11.7003 10.8979 11.3269 10.9034 10.9045 10.9045C10.9034 11.3269 10.8979 11.7003 10.8694 12.0182C10.832 12.4353 10.7488 12.853 10.5231 13.2486C10.2654 13.7005 9.89099 14.0749 9.43912 14.3326C9.04345 14.5583 8.62578 14.6415 8.20865 14.6789C7.81503 14.7143 7.33631 14.7142 6.78489 14.7142H5.40545C4.85403 14.7142 4.37531 14.7143 3.9817 14.6789C3.56456 14.6415 3.14689 14.5583 2.75122 14.3326C2.29935 14.0749 1.92498 13.7005 1.66724 13.2486C1.44155 12.853 1.35836 12.4353 1.32093 12.0182C1.2856 11.6246 1.28562 11.1458 1.28565 10.5944V9.21498C1.28562 8.66356 1.2856 8.18484 1.32093 7.79122C1.35836 7.37409 1.44155 6.95642 1.66724 6.56074C1.92498 6.10887 2.29935 5.73451 2.75122 5.47677C3.14689 5.25108 3.56456 5.16789 3.9817 5.13045C4.2996 5.10192 4.67301 5.09645 5.09541 5.09541C5.09645 4.67302 5.10192 4.2996 5.13045 3.9817C5.16789 3.56456 5.25108 3.14689 5.47676 2.75122C5.73451 2.29935 6.10887 1.92498 6.56074 1.66724C6.95642 1.44155 7.37409 1.35836 7.79122 1.32093C8.18484 1.2856 8.66356 1.28562 9.21498 1.28565ZM5.09541 7.09552C4.68397 7.09667 4.39263 7.10161 4.16046 7.12245C3.88053 7.14757 3.78516 7.18949 3.74214 7.21403C3.60139 7.29431 3.48478 7.41091 3.4045 7.55166C3.37997 7.59468 3.33804 7.69005 3.31292 7.96999C3.28659 8.26345 3.28565 8.65147 3.28565 9.25708V10.5523C3.28565 11.1579 3.28659 11.5459 3.31292 11.8394C3.33804 12.1193 3.37997 12.2147 3.4045 12.2577C3.48478 12.3985 3.60139 12.5151 3.74214 12.5954C3.78516 12.6199 3.88053 12.6618 4.16046 12.6869C4.45393 12.7133 4.84195 12.7142 5.44755 12.7142H6.74279C7.3484 12.7142 7.73641 12.7133 8.02988 12.6869C8.30981 12.6618 8.40518 12.6199 8.44821 12.5954C8.58895 12.5151 8.70556 12.3985 8.78584 12.2577C8.81038 12.2147 8.8523 12.1193 8.87742 11.8394C8.89825 11.6072 8.90319 11.3159 8.90435 10.9045C8.48219 10.9034 8.10898 10.8979 7.79122 10.8694C7.37409 10.832 6.95641 10.7488 6.56074 10.5231C6.10887 10.2654 5.73451 9.89099 5.47676 9.43912C5.25108 9.04345 5.16789 8.62578 5.13045 8.20865C5.10194 7.89089 5.09645 7.51767 5.09541 7.09552ZM7.96999 3.31292C7.69005 3.33804 7.59468 3.37997 7.55166 3.4045C7.41091 3.48478 7.29431 3.60139 7.21403 3.74214C7.18949 3.78516 7.14757 3.88053 7.12245 4.16046C7.09611 4.45393 7.09517 4.84195 7.09517 5.44755V6.74279C7.09517 7.3484 7.09611 7.73641 7.12245 8.02988C7.14757 8.30981 7.18949 8.40518 7.21403 8.4482C7.29431 8.58895 7.41091 8.70556 7.55166 8.78584C7.59468 8.81038 7.69005 8.8523 7.96999 8.87742C8.26345 8.90376 8.65147 8.9047 9.25708 8.9047H10.5523C11.1579 8.9047 11.5459 8.90376 11.8394 8.87742C12.1193 8.8523 12.2147 8.81038 12.2577 8.78584C12.3985 8.70556 12.5151 8.58895 12.5954 8.4482C12.6199 8.40518 12.6618 8.30981 12.6869 8.02988C12.7133 7.73641 12.7142 7.3484 12.7142 6.74279V5.44755C12.7142 4.84195 12.7133 4.45393 12.6869 4.16046C12.6618 3.88053 12.6199 3.78516 12.5954 3.74214C12.5151 3.60139 12.3985 3.48478 12.2577 3.4045C12.2147 3.37997 12.1193 3.33804 11.8394 3.31292C11.5459 3.28659 11.1579 3.28565 10.5523 3.28565H9.25708C8.65147 3.28565 8.26345 3.28659 7.96999 3.31292Z"
        fill="#788181"
      /></svg
    >`})),gj=a((()=>{oR(),XR=$O`<svg
      width="14"
      height="14"
      viewBox="0 0 14 14"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        fill="currentColor"
        fill-rule="evenodd"
        clip-rule="evenodd"
        d="M7.0023 0.875C7.48571 0.875 7.8776 1.26675 7.8776 1.75V6.125H12.2541C12.7375 6.125 13.1294 6.51675 13.1294 7C13.1294 7.48325 12.7375 7.875 12.2541 7.875H7.8776V12.25C7.8776 12.7332 7.48571 13.125 7.0023 13.125C6.51889 13.125 6.12701 12.7332 6.12701 12.25V7.875H1.75054C1.26713 7.875 0.875244 7.48325 0.875244 7C0.875244 6.51675 1.26713 6.125 1.75054 6.125H6.12701V1.75C6.12701 1.26675 6.51889 0.875 7.0023 0.875Z"
        fill="#47A1FF"
      /></svg
    >`})),mj=a((()=>{oR(),eN=$O` <svg fill="none" viewBox="0 0 13 4">
      <path fill="currentColor" d="M.5 0h12L8.9 3.13a3.76 3.76 0 0 1-4.8 0L.5 0Z" />
    </svg>`})),bj=a((()=>{oR(),tN=$O`<svg fill="none" viewBox="0 0 20 20">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M13.66 2H6.34c-1.07 0-1.96 0-2.68.08-.74.08-1.42.25-2.01.68a4 4 0 0 0-.89.89c-.43.6-.6 1.27-.68 2.01C0 6.38 0 7.26 0 8.34v.89c0 1.07 0 1.96.08 2.68.08.74.25 1.42.68 2.01a4 4 0 0 0 .89.89c.6.43 1.27.6 2.01.68a27 27 0 0 0 2.68.08h7.32a27 27 0 0 0 2.68-.08 4.03 4.03 0 0 0 2.01-.68 4 4 0 0 0 .89-.89c.43-.6.6-1.27.68-2.01.08-.72.08-1.6.08-2.68v-.89c0-1.07 0-1.96-.08-2.68a4.04 4.04 0 0 0-.68-2.01 4 4 0 0 0-.89-.89c-.6-.43-1.27-.6-2.01-.68C15.62 2 14.74 2 13.66 2ZM2.82 4.38c.2-.14.48-.25 1.06-.31C4.48 4 5.25 4 6.4 4h7.2c1.15 0 1.93 0 2.52.07.58.06.86.17 1.06.31a2 2 0 0 1 .44.44c.14.2.25.48.31 1.06.07.6.07 1.37.07 2.52v.77c0 1.15 0 1.93-.07 2.52-.06.58-.17.86-.31 1.06a2 2 0 0 1-.44.44c-.2.14-.48.25-1.06.32-.6.06-1.37.06-2.52.06H6.4c-1.15 0-1.93 0-2.52-.06-.58-.07-.86-.18-1.06-.32a2 2 0 0 1-.44-.44c-.14-.2-.25-.48-.31-1.06C2 11.1 2 10.32 2 9.17V8.4c0-1.15 0-1.93.07-2.52.06-.58.17-.86.31-1.06a2 2 0 0 1 .44-.44Z"
        clip-rule="evenodd"
      />
      <path fill="currentColor" d="M6.14 17.57a1 1 0 1 0 0 2h7.72a1 1 0 1 0 0-2H6.14Z" />
    </svg>`})),yj=a((()=>{oR(),rN=$O`<svg fill="none" viewBox="0 0 16 16">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M6.07 1h.57a1 1 0 0 1 0 2h-.52c-.98 0-1.64 0-2.14.06-.48.05-.7.14-.84.24-.13.1-.25.22-.34.35-.1.14-.2.35-.25.83-.05.5-.05 1.16-.05 2.15v2.74c0 .99 0 1.65.05 2.15.05.48.14.7.25.83.1.14.2.25.34.35.14.1.36.2.84.25.5.05 1.16.05 2.14.05h.52a1 1 0 0 1 0 2h-.57c-.92 0-1.69 0-2.3-.07a3.6 3.6 0 0 1-1.8-.61c-.3-.22-.57-.49-.8-.8a3.6 3.6 0 0 1-.6-1.79C.5 11.11.5 10.35.5 9.43V6.58c0-.92 0-1.7.06-2.31a3.6 3.6 0 0 1 .62-1.8c.22-.3.48-.57.79-.79a3.6 3.6 0 0 1 1.8-.61C4.37 1 5.14 1 6.06 1ZM9.5 3a1 1 0 0 1 1.42 0l4.28 4.3a1 1 0 0 1 0 1.4L10.93 13a1 1 0 0 1-1.42-1.42L12.1 9H6.8a1 1 0 1 1 0-2h5.3L9.51 4.42a1 1 0 0 1 0-1.41Z"
        clip-rule="evenodd"
      />
    </svg>`})),wj=a((()=>{oR(),iN=$O`<svg fill="none" viewBox="0 0 40 40">
      <g clip-path="url(#a)">
        <g clip-path="url(#b)">
          <circle cx="20" cy="19.89" r="20" fill="#5865F2" />
          <path
            fill="#fff"
            fill-rule="evenodd"
            d="M25.71 28.15C30.25 28 32 25.02 32 25.02c0-6.61-2.96-11.98-2.96-11.98-2.96-2.22-5.77-2.15-5.77-2.15l-.29.32c3.5 1.07 5.12 2.61 5.12 2.61a16.75 16.75 0 0 0-10.34-1.93l-.35.04a15.43 15.43 0 0 0-5.88 1.9s1.71-1.63 5.4-2.7l-.2-.24s-2.81-.07-5.77 2.15c0 0-2.96 5.37-2.96 11.98 0 0 1.73 2.98 6.27 3.13l1.37-1.7c-2.6-.79-3.6-2.43-3.6-2.43l.58.35.09.06.08.04.02.01.08.05a17.25 17.25 0 0 0 4.52 1.58 14.4 14.4 0 0 0 8.3-.86c.72-.27 1.52-.66 2.37-1.21 0 0-1.03 1.68-3.72 2.44.61.78 1.35 1.67 1.35 1.67Zm-9.55-9.6c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28.01-1.25-.93-2.28-2.1-2.28Zm7.5 0c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28 0-1.25-.93-2.28-2.1-2.28Z"
            clip-rule="evenodd"
          />
        </g>
      </g>
      <defs>
        <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
        <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
      </defs>
    </svg>`})),vj=a((()=>{oR(),nN=$O`<svg fill="none" viewBox="0 0 16 16">
      <path
        fill="currentColor"
        d="M4.25 7a.63.63 0 0 0-.63.63v3.97c0 .28-.2.51-.47.54l-.75.07a.93.93 0 0 1-.9-.47A7.51 7.51 0 0 1 5.54.92a7.5 7.5 0 0 1 9.54 4.62c.12.35.06.72-.16 1-.74.97-1.68 1.78-2.6 2.44V4.44a.64.64 0 0 0-.63-.64h-1.06c-.35 0-.63.3-.63.64v5.5c0 .23-.12.42-.32.5l-.52.23V6.05c0-.36-.3-.64-.64-.64H7.45c-.35 0-.64.3-.64.64v4.97c0 .25-.17.46-.4.52a5.8 5.8 0 0 0-.45.11v-4c0-.36-.3-.65-.64-.65H4.25ZM14.07 12.4A7.49 7.49 0 0 1 3.6 14.08c4.09-.58 9.14-2.5 11.87-6.6v.03a7.56 7.56 0 0 1-1.41 4.91Z"
      />
    </svg>`})),_j=a((()=>{oR(),oN=$O`<svg fill="none" viewBox="0 0 14 15">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M6.71 2.99a.57.57 0 0 0-.57.57 1 1 0 0 1-1 1c-.58 0-.96 0-1.24.03-.27.03-.37.07-.42.1a.97.97 0 0 0-.36.35c-.04.08-.09.21-.11.67a2.57 2.57 0 0 1 0 5.13c.02.45.07.6.11.66.09.15.21.28.36.36.07.04.21.1.67.12a2.57 2.57 0 0 1 5.12 0c.46-.03.6-.08.67-.12a.97.97 0 0 0 .36-.36c.03-.04.07-.14.1-.41.02-.29.03-.66.03-1.24a1 1 0 0 1 1-1 .57.57 0 0 0 0-1.15 1 1 0 0 1-1-1c0-.58 0-.95-.03-1.24a1.04 1.04 0 0 0-.1-.42.97.97 0 0 0-.36-.36 1.04 1.04 0 0 0-.42-.1c-.28-.02-.65-.02-1.24-.02a1 1 0 0 1-1-1 .57.57 0 0 0-.57-.57ZM5.15 13.98a1 1 0 0 0 .99-1v-.78a.57.57 0 0 1 1.14 0v.78a1 1 0 0 0 .99 1H8.36a66.26 66.26 0 0 0 .73 0 3.78 3.78 0 0 0 1.84-.38c.46-.26.85-.64 1.1-1.1.23-.4.32-.8.36-1.22.02-.2.03-.4.03-.63a2.57 2.57 0 0 0 0-4.75c0-.23-.01-.44-.03-.63a2.96 2.96 0 0 0-.35-1.22 2.97 2.97 0 0 0-1.1-1.1c-.4-.22-.8-.31-1.22-.35a8.7 8.7 0 0 0-.64-.04 2.57 2.57 0 0 0-4.74 0c-.23 0-.44.02-.63.04-.42.04-.83.13-1.22.35-.46.26-.84.64-1.1 1.1-.33.57-.37 1.2-.39 1.84a21.39 21.39 0 0 0 0 .72v.1a1 1 0 0 0 1 .99h.78a.57.57 0 0 1 0 1.15h-.77a1 1 0 0 0-1 .98v.1a63.87 63.87 0 0 0 0 .73c0 .64.05 1.27.38 1.83.26.47.64.85 1.1 1.11.56.32 1.2.37 1.84.38a20.93 20.93 0 0 0 .72 0h.1Z"
        clip-rule="evenodd"
      />
    </svg>`})),xj=a((()=>{oR(),aN=$O`<svg fill="none" viewBox="0 0 14 15">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M3.74 3.99a1 1 0 0 1 1-1H11a1 1 0 0 1 1 1v6.26a1 1 0 0 1-2 0V6.4l-6.3 6.3a1 1 0 0 1-1.4-1.42l6.29-6.3H4.74a1 1 0 0 1-1-1Z"
        clip-rule="evenodd"
      />
    </svg>`})),Ej=a((()=>{oR(),sN=$O`<svg fill="none" viewBox="0 0 40 40">
      <g clip-path="url(#a)">
        <g clip-path="url(#b)">
          <circle cx="20" cy="19.89" r="20" fill="#1877F2" />
          <g clip-path="url(#c)">
            <path
              fill="#fff"
              d="M26 12.38h-2.89c-.92 0-1.61.38-1.61 1.34v1.66H26l-.36 4.5H21.5v12H17v-12h-3v-4.5h3V12.5c0-3.03 1.6-4.62 5.2-4.62H26v4.5Z"
            />
          </g>
        </g>
        <path
          fill="#1877F2"
          d="M40 20a20 20 0 1 0-23.13 19.76V25.78H11.8V20h5.07v-4.4c0-5.02 3-7.79 7.56-7.79 2.19 0 4.48.4 4.48.4v4.91h-2.53c-2.48 0-3.25 1.55-3.25 3.13V20h5.54l-.88 5.78h-4.66v13.98A20 20 0 0 0 40 20Z"
        />
        <path
          fill="#fff"
          d="m27.79 25.78.88-5.78h-5.55v-3.75c0-1.58.78-3.13 3.26-3.13h2.53V8.2s-2.3-.39-4.48-.39c-4.57 0-7.55 2.77-7.55 7.78V20H11.8v5.78h5.07v13.98a20.15 20.15 0 0 0 6.25 0V25.78h4.67Z"
        />
      </g>
      <defs>
        <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
        <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
        <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
      </defs>
    </svg>`})),Cj=a((()=>{oR(),cN=$O`<svg fill="none" viewBox="0 0 16 16">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M0 3a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H1a1 1 0 0 1-1-1Zm2.63 5.25a1 1 0 0 1 1-1h8.75a1 1 0 1 1 0 2H3.63a1 1 0 0 1-1-1Zm2.62 5.25a1 1 0 0 1 1-1h3.5a1 1 0 0 1 0 2h-3.5a1 1 0 0 1-1-1Z"
        clip-rule="evenodd"
      />
    </svg>`})),kj=a((()=>{oR(),lN=$O`<svg fill="none" viewBox="0 0 40 40">
      <g clip-path="url(#a)">
        <g clip-path="url(#b)">
          <circle cx="20" cy="19.89" r="20" fill="#1B1F23" />
          <g clip-path="url(#c)">
            <path
              fill="#fff"
              d="M8 19.89a12 12 0 1 1 15.8 11.38c-.6.12-.8-.26-.8-.57v-3.3c0-1.12-.4-1.85-.82-2.22 2.67-.3 5.48-1.31 5.48-5.92 0-1.31-.47-2.38-1.24-3.22.13-.3.54-1.52-.12-3.18 0 0-1-.32-3.3 1.23a11.54 11.54 0 0 0-6 0c-2.3-1.55-3.3-1.23-3.3-1.23a4.32 4.32 0 0 0-.12 3.18 4.64 4.64 0 0 0-1.24 3.22c0 4.6 2.8 5.63 5.47 5.93-.34.3-.65.83-.76 1.6-.69.31-2.42.84-3.5-1 0 0-.63-1.15-1.83-1.23 0 0-1.18-.02-.09.73 0 0 .8.37 1.34 1.76 0 0 .7 2.14 4.03 1.41v2.24c0 .31-.2.68-.8.57A12 12 0 0 1 8 19.9Z"
            />
          </g>
        </g>
      </g>
      <defs>
        <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
        <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
        <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
      </defs>
    </svg>`})),Pj=a((()=>{oR(),uN=$O`<svg fill="none" viewBox="0 0 40 40">
      <g clip-path="url(#a)">
        <g clip-path="url(#b)">
          <circle cx="20" cy="19.89" r="20" fill="#fff" fill-opacity=".05" />
          <g clip-path="url(#c)">
            <path
              fill="#4285F4"
              d="M20 17.7v4.65h6.46a5.53 5.53 0 0 1-2.41 3.61l3.9 3.02c2.26-2.09 3.57-5.17 3.57-8.82 0-.85-.08-1.67-.22-2.46H20Z"
            />
            <path
              fill="#34A853"
              d="m13.27 22.17-.87.67-3.11 2.42A12 12 0 0 0 20 31.9c3.24 0 5.96-1.07 7.94-2.9l-3.9-3.03A7.15 7.15 0 0 1 20 27.12a7.16 7.16 0 0 1-6.72-4.94v-.01Z"
            />
            <path
              fill="#FBBC05"
              d="M9.29 14.5a11.85 11.85 0 0 0 0 10.76l3.99-3.1a7.19 7.19 0 0 1 0-4.55l-4-3.1Z"
            />
            <path
              fill="#EA4335"
              d="M20 12.66c1.77 0 3.34.61 4.6 1.8l3.43-3.44A11.51 11.51 0 0 0 20 7.89c-4.7 0-8.74 2.69-10.71 6.62l3.99 3.1A7.16 7.16 0 0 1 20 12.66Z"
            />
          </g>
        </g>
      </g>
      <defs>
        <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
        <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
        <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
      </defs>
    </svg>`})),Ij=a((()=>{oR(),dN=$O`<svg fill="none" viewBox="0 0 16 16">
      <path
        fill="currentColor"
        d="M8.51 5.66a.83.83 0 0 0-.57-.2.83.83 0 0 0-.52.28.8.8 0 0 0-.25.52 1 1 0 0 1-2 0c0-.75.34-1.43.81-1.91a2.75 2.75 0 0 1 4.78 1.92c0 1.24-.8 1.86-1.25 2.2l-.04.03c-.47.36-.5.43-.5.65a1 1 0 1 1-2 0c0-1.25.8-1.86 1.24-2.2l.04-.04c.47-.36.5-.43.5-.65 0-.3-.1-.49-.24-.6ZM9.12 11.87a1.13 1.13 0 1 1-2.25 0 1.13 1.13 0 0 1 2.25 0Z"
      />
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6a6 6 0 1 0 0 12A6 6 0 0 0 8 2Z"
        clip-rule="evenodd"
      />
    </svg>`})),Sj=a((()=>{oR(),hN=$O`<svg fill="none" viewBox="0 0 14 15">
      <path
        fill="currentColor"
        d="M6 10.49a1 1 0 1 0 2 0v-2a1 1 0 0 0-2 0v2ZM7 4.49a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"
      />
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M7 14.99a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-7a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"
        clip-rule="evenodd"
      />
    </svg>`})),Aj=a((()=>{oR(),pN=$O`<svg fill="none" viewBox="0 0 16 16">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M4.83 1.34h6.34c.68 0 1.26 0 1.73.04.5.05.97.15 1.42.4.52.3.95.72 1.24 1.24.26.45.35.92.4 1.42.04.47.04 1.05.04 1.73v3.71c0 .69 0 1.26-.04 1.74-.05.5-.14.97-.4 1.41-.3.52-.72.95-1.24 1.25-.45.25-.92.35-1.42.4-.47.03-1.05.03-1.73.03H4.83c-.68 0-1.26 0-1.73-.04-.5-.04-.97-.14-1.42-.4-.52-.29-.95-.72-1.24-1.24a3.39 3.39 0 0 1-.4-1.41A20.9 20.9 0 0 1 0 9.88v-3.7c0-.7 0-1.27.04-1.74.05-.5.14-.97.4-1.42.3-.52.72-.95 1.24-1.24.45-.25.92-.35 1.42-.4.47-.04 1.05-.04 1.73-.04ZM3.28 3.38c-.36.03-.51.08-.6.14-.21.11-.39.29-.5.5a.8.8 0 0 0-.08.19l5.16 3.44c.45.3 1.03.3 1.48 0L13.9 4.2a.79.79 0 0 0-.08-.2c-.11-.2-.29-.38-.5-.5-.09-.05-.24-.1-.6-.13-.37-.04-.86-.04-1.6-.04H4.88c-.73 0-1.22 0-1.6.04ZM14 6.54 9.85 9.31a3.33 3.33 0 0 1-3.7 0L2 6.54v3.3c0 .74 0 1.22.03 1.6.04.36.1.5.15.6.11.2.29.38.5.5.09.05.24.1.6.14.37.03.86.03 1.6.03h6.25c.73 0 1.22 0 1.6-.03.35-.03.5-.09.6-.14.2-.12.38-.3.5-.5.05-.1.1-.24.14-.6.03-.38.03-.86.03-1.6v-3.3Z"
        clip-rule="evenodd"
      />
    </svg>`})),Tj=a((()=>{oR(),fN=$O`<svg fill="none" viewBox="0 0 20 20">
      <path fill="currentColor" d="M10.81 5.81a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" />
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M3 4.75A4.75 4.75 0 0 1 7.75 0h4.5A4.75 4.75 0 0 1 17 4.75v10.5A4.75 4.75 0 0 1 12.25 20h-4.5A4.75 4.75 0 0 1 3 15.25V4.75ZM7.75 2A2.75 2.75 0 0 0 5 4.75v10.5A2.75 2.75 0 0 0 7.75 18h4.5A2.75 2.75 0 0 0 15 15.25V4.75A2.75 2.75 0 0 0 12.25 2h-4.5Z"
        clip-rule="evenodd"
      />
    </svg>`})),Oj=a((()=>{oR(),gN=$O`<svg fill="none" viewBox="0 0 22 20">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M16.32 13.62a3.14 3.14 0 1 1-.99 1.72l-1.6-.93a3.83 3.83 0 0 1-3.71 1 3.66 3.66 0 0 1-1.74-1l-1.6.94a3.14 3.14 0 1 1-1-1.73l1.6-.94a3.7 3.7 0 0 1 0-2 3.81 3.81 0 0 1 1.8-2.33c.29-.17.6-.3.92-.38V6.1a3.14 3.14 0 1 1 2 0l-.01.02v1.85H12a3.82 3.82 0 0 1 2.33 1.8 3.7 3.7 0 0 1 .39 2.91l1.6.93ZM2.6 16.54a1.14 1.14 0 0 0 1.98-1.14 1.14 1.14 0 0 0-1.98 1.14ZM11 2.01a1.14 1.14 0 1 0 0 2.28 1.14 1.14 0 0 0 0-2.28Zm1.68 10.45c.08-.19.14-.38.16-.58v-.05l.02-.13v-.13a1.92 1.92 0 0 0-.24-.8l-.11-.15a1.89 1.89 0 0 0-.74-.6 1.86 1.86 0 0 0-.77-.17h-.19a1.97 1.97 0 0 0-.89.34 1.98 1.98 0 0 0-.61.74 1.99 1.99 0 0 0-.16.9v.05a1.87 1.87 0 0 0 .24.74l.1.15c.12.16.26.3.42.42l.16.1.13.07.04.02a1.84 1.84 0 0 0 .76.17h.17a2 2 0 0 0 .91-.35 1.78 1.78 0 0 0 .52-.58l.03-.05a.84.84 0 0 0 .05-.11Zm5.15 4.5a1.14 1.14 0 0 0 1.14-1.97 1.13 1.13 0 0 0-1.55.41c-.32.55-.13 1.25.41 1.56Z"
        clip-rule="evenodd"
      />
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M4.63 9.43a1.5 1.5 0 1 0 1.5-2.6 1.5 1.5 0 0 0-1.5 2.6Zm.32-1.55a.5.5 0 0 1 .68-.19.5.5 0 0 1 .18.68.5.5 0 0 1-.68.19.5.5 0 0 1-.18-.68ZM17.94 8.88a1.5 1.5 0 1 1-2.6-1.5 1.5 1.5 0 1 1 2.6 1.5ZM16.9 7.69a.5.5 0 0 0-.68.19.5.5 0 0 0 .18.68.5.5 0 0 0 .68-.19.5.5 0 0 0-.18-.68ZM9.75 17.75a1.5 1.5 0 1 1 2.6 1.5 1.5 1.5 0 1 1-2.6-1.5Zm1.05 1.18a.5.5 0 0 0 .68-.18.5.5 0 0 0-.18-.68.5.5 0 0 0-.68.18.5.5 0 0 0 .18.68Z"
        clip-rule="evenodd"
      />
    </svg>`})),Rj=a((()=>{oR(),mN=$O`<svg fill="none" viewBox="0 0 20 20">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M9.13 1h1.71c1.46 0 2.63 0 3.56.1.97.1 1.8.33 2.53.85a5 5 0 0 1 1.1 1.11c.53.73.75 1.56.86 2.53.1.93.1 2.1.1 3.55v1.72c0 1.45 0 2.62-.1 3.55-.1.97-.33 1.8-.86 2.53a5 5 0 0 1-1.1 1.1c-.73.53-1.56.75-2.53.86-.93.1-2.1.1-3.55.1H9.13c-1.45 0-2.62 0-3.56-.1-.96-.1-1.8-.33-2.52-.85a5 5 0 0 1-1.1-1.11 5.05 5.05 0 0 1-.86-2.53c-.1-.93-.1-2.1-.1-3.55V9.14c0-1.45 0-2.62.1-3.55.1-.97.33-1.8.85-2.53a5 5 0 0 1 1.1-1.1 5.05 5.05 0 0 1 2.53-.86C6.51 1 7.67 1 9.13 1ZM5.79 3.09a3.1 3.1 0 0 0-1.57.48 3 3 0 0 0-.66.67c-.24.32-.4.77-.48 1.56-.1.82-.1 1.88-.1 3.4v1.6c0 1.15 0 2.04.05 2.76l.41-.42c.5-.5.93-.92 1.32-1.24.41-.33.86-.6 1.43-.7a3 3 0 0 1 .94 0c.35.06.66.2.95.37a17.11 17.11 0 0 0 .8.45c.1-.08.2-.2.41-.4l.04-.03a27 27 0 0 1 1.95-1.84 4.03 4.03 0 0 1 1.91-.94 4 4 0 0 1 1.25 0c.73.11 1.33.46 1.91.94l.64.55V9.2c0-1.52 0-2.58-.1-3.4a3.1 3.1 0 0 0-.48-1.56 3 3 0 0 0-.66-.67 3.1 3.1 0 0 0-1.56-.48C13.37 3 12.3 3 10.79 3h-1.6c-1.52 0-2.59 0-3.4.09Zm11.18 10-.04-.05a26.24 26.24 0 0 0-1.83-1.74c-.45-.36-.73-.48-.97-.52a2 2 0 0 0-.63 0c-.24.04-.51.16-.97.52-.46.38-1.01.93-1.83 1.74l-.02.02c-.17.18-.34.34-.49.47a2.04 2.04 0 0 1-1.08.5 1.97 1.97 0 0 1-1.25-.27l-.79-.46-.02-.02a.65.65 0 0 0-.24-.1 1 1 0 0 0-.31 0c-.08.02-.21.06-.49.28-.3.24-.65.59-1.2 1.14l-.56.56-.65.66a3 3 0 0 0 .62.6c.33.24.77.4 1.57.49.81.09 1.88.09 3.4.09h1.6c1.52 0 2.58 0 3.4-.09a3.1 3.1 0 0 0 1.56-.48 3 3 0 0 0 .66-.67c.24-.32.4-.77.49-1.56l.07-1.12Zm-8.02-1.03ZM4.99 7a2 2 0 1 1 4 0 2 2 0 0 1-4 0Z"
        clip-rule="evenodd"
      />
    </svg>`})),Nj=a((()=>{oR(),bN=$O`<svg fill="none" viewBox="0 0 16 16">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M8 0a1 1 0 0 1 1 1v5.38a1 1 0 0 1-2 0V1a1 1 0 0 1 1-1ZM5.26 2.6a1 1 0 0 1-.28 1.39 5.46 5.46 0 1 0 6.04 0 1 1 0 1 1 1.1-1.67 7.46 7.46 0 1 1-8.25 0 1 1 0 0 1 1.4.28Z"
        clip-rule="evenodd"
      />
    </svg>`})),Mj=a((()=>{oR(),yN=$O` <svg
      width="36"
      height="36"
      fill="none"
    >
      <path
        d="M0 8a8 8 0 0 1 8-8h20a8 8 0 0 1 8 8v20a8 8 0 0 1-8 8H8a8 8 0 0 1-8-8V8Z"
        fill="#fff"
        fill-opacity=".05"
      />
      <path
        d="m18.262 17.513-8.944 9.49v.01a2.417 2.417 0 0 0 3.56 1.452l.026-.017 10.061-5.803-4.703-5.132Z"
        fill="#EA4335"
      />
      <path
        d="m27.307 15.9-.008-.008-4.342-2.52-4.896 4.36 4.913 4.912 4.325-2.494a2.42 2.42 0 0 0 .008-4.25Z"
        fill="#FBBC04"
      />
      <path
        d="M9.318 8.997c-.05.202-.084.403-.084.622V26.39c0 .218.025.42.084.621l9.246-9.247-9.246-8.768Z"
        fill="#4285F4"
      />
      <path
        d="m18.33 18 4.627-4.628-10.053-5.828a2.427 2.427 0 0 0-3.586 1.444L18.329 18Z"
        fill="#34A853"
      />
      <path
        d="M8 .5h20A7.5 7.5 0 0 1 35.5 8v20a7.5 7.5 0 0 1-7.5 7.5H8A7.5 7.5 0 0 1 .5 28V8A7.5 7.5 0 0 1 8 .5Z"
        stroke="#fff"
        stroke-opacity=".05"
      />
    </svg>`})),$j=a((()=>{oR(),wN=$O`<svg fill="none" viewBox="0 0 20 20">
      <path
        fill="currentColor"
        d="M3 6a3 3 0 0 1 3-3h1a1 1 0 1 0 0-2H6a5 5 0 0 0-5 5v1a1 1 0 0 0 2 0V6ZM13 1a1 1 0 1 0 0 2h1a3 3 0 0 1 3 3v1a1 1 0 1 0 2 0V6a5 5 0 0 0-5-5h-1ZM3 13a1 1 0 1 0-2 0v1a5 5 0 0 0 5 5h1a1 1 0 1 0 0-2H6a3 3 0 0 1-3-3v-1ZM19 13a1 1 0 1 0-2 0v1a3 3 0 0 1-3 3h-1a1 1 0 1 0 0 2h1.01a5 5 0 0 0 5-5v-1ZM5.3 6.36c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05A1.5 1.5 0 0 0 9.2 8.14c.06-.2.06-.43.06-.89s0-.7-.06-.89A1.5 1.5 0 0 0 8.14 5.3c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06ZM10.8 6.36c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05a1.5 1.5 0 0 0 1.06-1.06c.06-.2.06-.43.06-.89s0-.7-.06-.89a1.5 1.5 0 0 0-1.06-1.06c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06ZM5.26 12.75c0-.46 0-.7.05-.89a1.5 1.5 0 0 1 1.06-1.06c.19-.05.42-.05.89-.05.46 0 .7 0 .88.05.52.14.93.54 1.06 1.06.06.2.06.43.06.89s0 .7-.06.89a1.5 1.5 0 0 1-1.06 1.06c-.19.05-.42.05-.88.05-.47 0-.7 0-.9-.05a1.5 1.5 0 0 1-1.05-1.06c-.05-.2-.05-.43-.05-.89ZM10.8 11.86c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05a1.5 1.5 0 0 0 1.06-1.06c.06-.2.06-.43.06-.89s0-.7-.06-.89a1.5 1.5 0 0 0-1.06-1.06c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06Z"
      />
    </svg>`})),jj=a((()=>{oR(),vN=$O`<svg fill="none" viewBox="0 0 14 16">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M3.94 1.04a1 1 0 0 1 .7 1.23l-.48 1.68a5.85 5.85 0 0 1 8.53 4.32 5.86 5.86 0 0 1-11.4 2.56 1 1 0 0 1 1.9-.57 3.86 3.86 0 1 0 1.83-4.5l1.87.53a1 1 0 0 1-.55 1.92l-4.1-1.15a1 1 0 0 1-.69-1.23l1.16-4.1a1 1 0 0 1 1.23-.7Z"
        clip-rule="evenodd"
      />
    </svg>`})),Lj=a((()=>{oR(),_N=$O`<svg fill="none" viewBox="0 0 20 20">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M9.36 4.21a5.14 5.14 0 1 0 0 10.29 5.14 5.14 0 0 0 0-10.29ZM1.64 9.36a7.71 7.71 0 1 1 14 4.47l2.52 2.5a1.29 1.29 0 1 1-1.82 1.83l-2.51-2.51A7.71 7.71 0 0 1 1.65 9.36Z"
        clip-rule="evenodd"
      />
    </svg>`})),Bj=a((()=>{oR(),xN=$O`<svg fill="none" viewBox="0 0 21 20">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M14.3808 4.34812C13.72 4.47798 12.8501 4.7587 11.5748 5.17296L9.00869 6.00646C6.90631 6.68935 5.40679 7.17779 4.38121 7.63178C3.87166 7.85734 3.5351 8.05091 3.32022 8.22035C3.11183 8.38466 3.07011 8.48486 3.05969 8.51817C2.98058 8.77103 2.98009 9.04195 3.05831 9.29509C3.06861 9.32844 3.10998 9.42878 3.31777 9.59384C3.53205 9.76404 3.86792 9.95881 4.37667 10.1862C5.29287 10.5957 6.58844 11.0341 8.35529 11.6164L10.8876 8.59854C11.2426 8.17547 11.8733 8.12028 12.2964 8.47528C12.7195 8.83029 12.7746 9.46104 12.4196 9.88412L9.88738 12.9019C10.7676 14.5408 11.4244 15.7406 11.9867 16.5718C12.299 17.0333 12.5491 17.3303 12.7539 17.5117C12.9526 17.6877 13.0586 17.711 13.0932 17.7154C13.3561 17.7484 13.6228 17.7009 13.8581 17.5791C13.8891 17.563 13.9805 17.5046 14.1061 17.2708C14.2357 17.0298 14.3679 16.6647 14.5015 16.1237C14.7705 15.0349 14.9912 13.4733 15.2986 11.2843L15.6738 8.61249C15.8603 7.28456 15.9857 6.37917 15.9989 5.7059C16.012 5.03702 15.9047 4.8056 15.8145 4.69183C15.7044 4.55297 15.5673 4.43792 15.4114 4.35365C15.2837 4.28459 15.0372 4.2191 14.3808 4.34812ZM7.99373 13.603C6.11919 12.9864 4.6304 12.4902 3.5606 12.0121C2.98683 11.7557 2.4778 11.4808 2.07383 11.1599C1.66337 10.8339 1.31312 10.4217 1.14744 9.88551C0.949667 9.24541 0.950886 8.56035 1.15094 7.92096C1.31852 7.38534 1.67024 6.97442 2.08185 6.64985C2.48697 6.33041 2.99697 6.05734 3.57166 5.80295C4.70309 5.3021 6.30179 4.78283 8.32903 4.12437L11.0196 3.25042C12.2166 2.86159 13.2017 2.54158 13.9951 2.38566C14.8065 2.22618 15.6202 2.19289 16.3627 2.59437C16.7568 2.80747 17.1035 3.09839 17.3818 3.4495C17.9062 4.111 18.0147 4.91815 17.9985 5.74496C17.9827 6.55332 17.8386 7.57903 17.6636 8.82534L17.2701 11.6268C16.9737 13.7376 16.7399 15.4022 16.4432 16.6034C16.2924 17.2135 16.1121 17.7632 15.8678 18.2176C15.6197 18.6794 15.2761 19.0971 14.7777 19.3551C14.1827 19.6632 13.5083 19.7833 12.8436 19.6997C12.2867 19.6297 11.82 19.3563 11.4277 19.0087C11.0415 18.6666 10.6824 18.213 10.3302 17.6925C9.67361 16.722 8.92648 15.342 7.99373 13.603Z"
        clip-rule="evenodd"
      />
      <svg
        xmlns="http://www.w3.org/2000/svg"
        width="21"
        height="20"
        viewBox="0 0 21 20"
        fill="none"
      ></svg></svg
    >`})),Dj=a((()=>{oR(),EN=$O`<svg fill="none" viewBox="0 0 20 20">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M6.76.3a1 1 0 0 1 0 1.4L4.07 4.4h9a1 1 0 1 1 0 2h-9l2.69 2.68a1 1 0 1 1-1.42 1.42L.95 6.09a1 1 0 0 1 0-1.4l4.4-4.4a1 1 0 0 1 1.4 0Zm6.49 9.21a1 1 0 0 1 1.41 0l4.39 4.4a1 1 0 0 1 0 1.4l-4.39 4.4a1 1 0 0 1-1.41-1.42l2.68-2.68h-9a1 1 0 0 1 0-2h9l-2.68-2.68a1 1 0 0 1 0-1.42Z"
        clip-rule="evenodd"
      />
    </svg>`})),Uj=a((()=>{oR(),CN=$O`<svg width="10" height="10" viewBox="0 0 10 10">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M3.77986 0.566631C4.0589 0.845577 4.0589 1.29784 3.77986 1.57678L3.08261 2.2738H6.34184C6.73647 2.2738 7.05637 2.5936 7.05637 2.98808C7.05637 3.38257 6.73647 3.70237 6.34184 3.70237H3.08261L3.77986 4.39938C4.0589 4.67833 4.0589 5.13059 3.77986 5.40954C3.50082 5.68848 3.04841 5.68848 2.76937 5.40954L0.852346 3.49316C0.573306 3.21421 0.573306 2.76195 0.852346 2.48301L2.76937 0.566631C3.04841 0.287685 3.50082 0.287685 3.77986 0.566631ZM6.22 4.59102C6.49904 4.31208 6.95145 4.31208 7.23049 4.59102L9.14751 6.5074C9.42655 6.78634 9.42655 7.23861 9.14751 7.51755L7.23049 9.43393C6.95145 9.71287 6.49904 9.71287 6.22 9.43393C5.94096 9.15498 5.94096 8.70272 6.22 8.42377L6.91725 7.72676L3.65802 7.72676C3.26339 7.72676 2.94349 7.40696 2.94349 7.01247C2.94349 6.61798 3.26339 6.29819 3.65802 6.29819L6.91725 6.29819L6.22 5.60117C5.94096 5.32223 5.94096 4.86997 6.22 4.59102Z"
        clip-rule="evenodd"
      />
    </svg>`})),Fj=a((()=>{oR(),kN=$O`<svg
      width="14"
      height="14"
      viewBox="0 0 14 14"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        fill-rule="evenodd"
        clip-rule="evenodd"
        d="M13.7306 3.24213C14.0725 3.58384 14.0725 4.13786 13.7306 4.47957L10.7418 7.46737C10.4 7.80908 9.84581 7.80908 9.50399 7.46737C9.16216 7.12567 9.16216 6.57165 9.50399 6.22994L10.9986 4.73585H5.34082C4.85741 4.73585 4.46553 4.3441 4.46553 3.86085C4.46553 3.3776 4.85741 2.98585 5.34082 2.98585L10.9986 2.98585L9.50399 1.49177C9.16216 1.15006 9.16216 0.596037 9.50399 0.254328C9.84581 -0.0873803 10.4 -0.0873803 10.7418 0.254328L13.7306 3.24213ZM9.52515 10.1352C9.52515 10.6185 9.13327 11.0102 8.64986 11.0102L2.9921 11.0102L4.48669 12.5043C4.82852 12.846 4.82852 13.4001 4.48669 13.7418C4.14487 14.0835 3.59066 14.0835 3.24884 13.7418L0.26003 10.754C0.0958806 10.5899 0.0036621 10.3673 0.00366211 10.1352C0.00366212 9.90318 0.0958806 9.68062 0.26003 9.51652L3.24884 6.52872C3.59066 6.18701 4.14487 6.18701 4.48669 6.52872C4.82851 6.87043 4.82851 7.42445 4.48669 7.76616L2.9921 9.26024L8.64986 9.26024C9.13327 9.26024 9.52515 9.65199 9.52515 10.1352Z"
        fill="currentColor"
      />
    </svg>
    
    `})),Hj=a((()=>{oR(),PN=$O`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
      <path 
        fill="currentColor"
        fill-rule="evenodd" 
        clip-rule="evenodd" 
        d="M8.3071 0.292893C8.69763 0.683417 8.69763 1.31658 8.3071 1.70711L6.41421 3.6H11.3404C13.8368 3.6 16.0533 5.1975 16.8427 7.56588L16.9487 7.88377C17.1233 8.40772 16.8402 8.97404 16.3162 9.14868C15.7923 9.32333 15.226 9.04017 15.0513 8.51623L14.9453 8.19834C14.4281 6.64664 12.976 5.6 11.3404 5.6H6.41421L8.3071 7.49289C8.69763 7.88342 8.69763 8.51658 8.3071 8.90711C7.91658 9.29763 7.28341 9.29763 6.89289 8.90711L3.29289 5.30711C2.90236 4.91658 2.90236 4.28342 3.29289 3.89289L6.89289 0.292893C7.28341 -0.0976311 7.91658 -0.0976311 8.3071 0.292893ZM3.68377 10.8513C4.20771 10.6767 4.77403 10.9598 4.94868 11.4838L5.05464 11.8017C5.57188 13.3534 7.024 14.4 8.65964 14.4L13.5858 14.4L11.6929 12.5071C11.3024 12.1166 11.3024 11.4834 11.6929 11.0929C12.0834 10.7024 12.7166 10.7024 13.1071 11.0929L16.7071 14.6929C17.0976 15.0834 17.0976 15.7166 16.7071 16.1071L13.1071 19.7071C12.7166 20.0976 12.0834 20.0976 11.6929 19.7071C11.3024 19.3166 11.3024 18.6834 11.6929 18.2929L13.5858 16.4L8.65964 16.4C6.16314 16.4 3.94674 14.8025 3.15728 12.4341L3.05131 12.1162C2.87667 11.5923 3.15983 11.026 3.68377 10.8513Z" 
      />
    </svg>`})),zj=a((()=>{oR(),IN=$O`<svg fill="none" viewBox="0 0 14 14">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M3.48 2.18a1 1 0 0 1 1.41 0l2.68 2.68a1 1 0 1 1-1.41 1.42l-.98-.98v4.56a1 1 0 0 1-2 0V5.3l-.97.98A1 1 0 0 1 .79 4.86l2.69-2.68Zm6.34 2.93a1 1 0 0 1 1 1v4.56l.97-.98a1 1 0 1 1 1.42 1.42l-2.69 2.68a1 1 0 0 1-1.41 0l-2.68-2.68a1 1 0 0 1 1.41-1.42l.98.98V6.1a1 1 0 0 1 1-1Z"
        clip-rule="evenodd"
      />
    </svg>`})),qj=a((()=>{oR(),SN=$O`<svg fill="none" viewBox="0 0 40 40">
      <g clip-path="url(#a)">
        <g clip-path="url(#b)">
          <circle cx="20" cy="19.89" r="20" fill="#5865F2" />
          <path
            fill="#fff"
            fill-rule="evenodd"
            d="M25.71 28.15C30.25 28 32 25.02 32 25.02c0-6.61-2.96-11.98-2.96-11.98-2.96-2.22-5.77-2.15-5.77-2.15l-.29.32c3.5 1.07 5.12 2.61 5.12 2.61a16.75 16.75 0 0 0-10.34-1.93l-.35.04a15.43 15.43 0 0 0-5.88 1.9s1.71-1.63 5.4-2.7l-.2-.24s-2.81-.07-5.77 2.15c0 0-2.96 5.37-2.96 11.98 0 0 1.73 2.98 6.27 3.13l1.37-1.7c-2.6-.79-3.6-2.43-3.6-2.43l.58.35.09.06.08.04.02.01.08.05a17.25 17.25 0 0 0 4.52 1.58 14.4 14.4 0 0 0 8.3-.86c.72-.27 1.52-.66 2.37-1.21 0 0-1.03 1.68-3.72 2.44.61.78 1.35 1.67 1.35 1.67Zm-9.55-9.6c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28.01-1.25-.93-2.28-2.1-2.28Zm7.5 0c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28 0-1.25-.93-2.28-2.1-2.28Z"
            clip-rule="evenodd"
          />
        </g>
      </g>
      <defs>
        <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
        <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
      </defs>
    </svg> `})),Wj=a((()=>{oR(),AN=$O`<svg fill="none" viewBox="0 0 40 40">
      <g clip-path="url(#a)">
        <g clip-path="url(#b)">
          <circle cx="20" cy="19.89" r="20" fill="#5A3E85" />
          <g clip-path="url(#c)">
            <path
              fill="#fff"
              d="M18.22 25.7 20 23.91h3.34l2.1-2.1v-6.68H15.4v8.78h2.82v1.77Zm3.87-8.16h1.25v3.66H22.1v-3.66Zm-3.34 0H20v3.66h-1.25v-3.66ZM20 7.9a12 12 0 1 0 0 24 12 12 0 0 0 0-24Zm6.69 14.56-3.66 3.66h-2.72l-1.77 1.78h-1.88V26.1H13.3v-9.82l.94-2.4H26.7v8.56Z"
            />
          </g>
        </g>
      </g>
      <defs>
        <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
        <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
        <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
      </defs>
    </svg>`})),Vj=a((()=>{oR(),TN=$O`<svg fill="none" viewBox="0 0 40 40">
      <g clip-path="url(#a)">
        <g clip-path="url(#b)">
          <circle cx="20" cy="19.89" r="20" fill="#1D9BF0" />
          <path
            fill="#fff"
            d="M30 13.81c-.74.33-1.53.55-2.36.65.85-.51 1.5-1.32 1.8-2.27-.79.47-1.66.8-2.6 1a4.1 4.1 0 0 0-7 3.73c-3.4-.17-6.42-1.8-8.45-4.28a4.1 4.1 0 0 0 1.27 5.47c-.67-.02-1.3-.2-1.86-.5a4.1 4.1 0 0 0 3.3 4.07c-.58.15-1.21.19-1.86.07a4.1 4.1 0 0 0 3.83 2.85A8.25 8.25 0 0 1 10 26.3a11.62 11.62 0 0 0 6.29 1.84c7.62 0 11.92-6.44 11.66-12.2.8-.59 1.5-1.3 2.05-2.13Z"
          />
        </g>
      </g>
      <defs>
        <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
        <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
      </defs>
    </svg>`})),Gj=a((()=>{oR(),ON=$O`<svg fill="none" viewBox="0 0 16 16">
      <path
        fill="currentColor"
        d="m14.36 4.74.01.42c0 4.34-3.3 9.34-9.34 9.34A9.3 9.3 0 0 1 0 13.03a6.6 6.6 0 0 0 4.86-1.36 3.29 3.29 0 0 1-3.07-2.28c.5.1 1 .07 1.48-.06A3.28 3.28 0 0 1 .64 6.11v-.04c.46.26.97.4 1.49.41A3.29 3.29 0 0 1 1.11 2.1a9.32 9.32 0 0 0 6.77 3.43 3.28 3.28 0 0 1 5.6-3 6.59 6.59 0 0 0 2.08-.8 3.3 3.3 0 0 1-1.45 1.82A6.53 6.53 0 0 0 16 3.04c-.44.66-1 1.23-1.64 1.7Z"
      />
    </svg>`})),Zj=a((()=>{oR(),RN=$O`<svg fill="none" viewBox="0 0 28 28">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M18.1 4.76c-.42-.73-1.33-1.01-2.09-.66l-1.42.66c-.37.18-.8.18-1.18 0l-1.4-.65a1.63 1.63 0 0 0-2.1.66l-.84 1.45c-.2.34-.53.59-.92.67l-1.7.35c-.83.17-1.39.94-1.3 1.78l.19 1.56c.04.39-.08.78-.33 1.07l-1.12 1.3c-.52.6-.52 1.5 0 2.11L5 16.38c.25.3.37.68.33 1.06l-.18 1.57c-.1.83.46 1.6 1.28 1.78l1.7.35c.4.08.73.32.93.66l.84 1.43a1.63 1.63 0 0 0 2.09.66l1.41-.66c.37-.17.8-.17 1.18 0l1.43.67c.76.35 1.66.07 2.08-.65l.86-1.45c.2-.34.54-.58.92-.66l1.68-.35A1.63 1.63 0 0 0 22.84 19l-.18-1.57a1.4 1.4 0 0 1 .33-1.06l1.12-1.32c.52-.6.52-1.5 0-2.11l-1.12-1.3a1.4 1.4 0 0 1-.33-1.07l.18-1.57c.1-.83-.46-1.6-1.28-1.77l-1.68-.35a1.4 1.4 0 0 1-.92-.66l-.86-1.47Zm-3.27-3.2a4.43 4.43 0 0 1 5.69 1.78l.54.93 1.07.22a4.43 4.43 0 0 1 3.5 4.84l-.11.96.7.83a4.43 4.43 0 0 1 .02 5.76l-.72.85.1.96a4.43 4.43 0 0 1-3.5 4.84l-1.06.22-.54.92a4.43 4.43 0 0 1-5.68 1.77l-.84-.4-.82.39a4.43 4.43 0 0 1-5.7-1.79l-.51-.89-1.09-.22a4.43 4.43 0 0 1-3.5-4.84l.1-.96-.72-.85a4.43 4.43 0 0 1 .01-5.76l.71-.83-.1-.95a4.43 4.43 0 0 1 3.5-4.84l1.08-.23.53-.9a4.43 4.43 0 0 1 5.7-1.8l.81.38.83-.39ZM18.2 9.4c.65.42.84 1.28.42 1.93l-4.4 6.87a1.4 1.4 0 0 1-2.26.14L9.5 15.39a1.4 1.4 0 0 1 2.15-1.8l1.23 1.48 3.38-5.26a1.4 1.4 0 0 1 1.93-.42Z"
        clip-rule="evenodd"
      />
    </svg>`})),Kj=a((()=>{oR(),NN=$O`<svg fill="none" viewBox="0 0 14 14">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="m4.1 12.43-.45-.78-.93-.2a1.65 1.65 0 0 1-1.31-1.8l.1-.86-.61-.71a1.65 1.65 0 0 1 0-2.16l.6-.7-.09-.85c-.1-.86.47-1.64 1.3-1.81l.94-.2.45-.78A1.65 1.65 0 0 1 6.23.9l.77.36.78-.36c.77-.36 1.69-.07 2.12.66l.47.8.91.2c.84.17 1.4.95 1.31 1.8l-.1.86.6.7c.54.62.54 1.54.01 2.16l-.6.71.09.86c.1.85-.47 1.63-1.3 1.8l-.92.2-.47.79a1.65 1.65 0 0 1-2.12.66L7 12.74l-.77.36c-.78.35-1.7.07-2.13-.67Zm5.74-6.9a1 1 0 1 0-1.68-1.07L6.32 7.3l-.55-.66a1 1 0 0 0-1.54 1.28l1.43 1.71a1 1 0 0 0 1.61-.1l2.57-4Z"
        clip-rule="evenodd"
      />
    </svg>`})),Yj=a((()=>{oR(),MN=$O`
      <svg fill="none" viewBox="0 0 48 44">
        <path
          style="fill: var(--wui-color-bg-300);"
          d="M4.56 8.64c-1.23 1.68-1.23 4.08-1.23 8.88v8.96c0 4.8 0 7.2 1.23 8.88.39.55.87 1.02 1.41 1.42C7.65 38 10.05 38 14.85 38h14.3c4.8 0 7.2 0 8.88-1.22a6.4 6.4 0 0 0 1.41-1.42c.83-1.14 1.1-2.6 1.19-4.92a6.4 6.4 0 0 0 5.16-4.65c.21-.81.21-1.8.21-3.79 0-1.98 0-2.98-.22-3.79a6.4 6.4 0 0 0-5.15-4.65c-.1-2.32-.36-3.78-1.19-4.92a6.4 6.4 0 0 0-1.41-1.42C36.35 6 33.95 6 29.15 6h-14.3c-4.8 0-7.2 0-8.88 1.22a6.4 6.4 0 0 0-1.41 1.42Z"
        />
        <path
          style="fill: var(--wui-color-fg-200);"
          fill-rule="evenodd"
          d="M2.27 11.33a6.4 6.4 0 0 1 6.4-6.4h26.66a6.4 6.4 0 0 1 6.4 6.4v1.7a6.4 6.4 0 0 1 5.34 6.3v5.34a6.4 6.4 0 0 1-5.34 6.3v1.7a6.4 6.4 0 0 1-6.4 6.4H8.67a6.4 6.4 0 0 1-6.4-6.4V11.33ZM39.6 31.07h-6.93a9.07 9.07 0 1 1 0-18.14h6.93v-1.6a4.27 4.27 0 0 0-4.27-4.26H8.67a4.27 4.27 0 0 0-4.27 4.26v21.34a4.27 4.27 0 0 0 4.27 4.26h26.66a4.27 4.27 0 0 0 4.27-4.26v-1.6Zm-6.93-16a6.93 6.93 0 0 0 0 13.86h8a4.27 4.27 0 0 0 4.26-4.26v-5.34a4.27 4.27 0 0 0-4.26-4.26h-8Z"
          clip-rule="evenodd"
        />
      </svg>
    `})),Jj=a((()=>{oR(),$N=$O`<svg fill="none" viewBox="0 0 20 20">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M0 5.5c0-1.8 1.46-3.25 3.25-3.25H14.5c1.8 0 3.25 1.46 3.25 3.25v.28A3.25 3.25 0 0 1 20 8.88v2.24c0 1.45-.94 2.68-2.25 3.1v.28c0 1.8-1.46 3.25-3.25 3.25H3.25A3.25 3.25 0 0 1 0 14.5v-9Zm15.75 8.88h-2.38a4.38 4.38 0 0 1 0-8.76h2.38V5.5c0-.69-.56-1.25-1.25-1.25H3.25C2.56 4.25 2 4.81 2 5.5v9c0 .69.56 1.25 1.25 1.25H14.5c.69 0 1.25-.56 1.25-1.25v-.13Zm-2.38-6.76a2.37 2.37 0 1 0 0 4.75h3.38c.69 0 1.25-.55 1.25-1.24V8.87c0-.69-.56-1.24-1.25-1.24h-3.38Z"
        clip-rule="evenodd"
      />
    </svg>`})),Qj=a((()=>{oR(),jN=$O`<svg fill="none" viewBox="0 0 96 67">
      <path
        fill="currentColor"
        d="M25.32 18.8a32.56 32.56 0 0 1 45.36 0l1.5 1.47c.63.62.63 1.61 0 2.22l-5.15 5.05c-.31.3-.82.3-1.14 0l-2.07-2.03a22.71 22.71 0 0 0-31.64 0l-2.22 2.18c-.31.3-.82.3-1.14 0l-5.15-5.05a1.55 1.55 0 0 1 0-2.22l1.65-1.62Zm56.02 10.44 4.59 4.5c.63.6.63 1.6 0 2.21l-20.7 20.26c-.62.61-1.63.61-2.26 0L48.28 41.83a.4.4 0 0 0-.56 0L33.03 56.21c-.63.61-1.64.61-2.27 0L10.07 35.95a1.55 1.55 0 0 1 0-2.22l4.59-4.5a1.63 1.63 0 0 1 2.27 0L31.6 43.63a.4.4 0 0 0 .57 0l14.69-14.38a1.63 1.63 0 0 1 2.26 0l14.69 14.38a.4.4 0 0 0 .57 0l14.68-14.38a1.63 1.63 0 0 1 2.27 0Z"
      />
      <path
        stroke="#000"
        stroke-opacity=".1"
        d="M25.67 19.15a32.06 32.06 0 0 1 44.66 0l1.5 1.48c.43.42.43 1.09 0 1.5l-5.15 5.05a.31.31 0 0 1-.44 0l-2.07-2.03a23.21 23.21 0 0 0-32.34 0l-2.22 2.18a.31.31 0 0 1-.44 0l-5.15-5.05a1.05 1.05 0 0 1 0-1.5l1.65-1.63ZM81 29.6l4.6 4.5c.42.41.42 1.09 0 1.5l-20.7 20.26c-.43.43-1.14.43-1.57 0L48.63 41.47a.9.9 0 0 0-1.26 0L32.68 55.85c-.43.43-1.14.43-1.57 0L10.42 35.6a1.05 1.05 0 0 1 0-1.5l4.59-4.5a1.13 1.13 0 0 1 1.57 0l14.68 14.38a.9.9 0 0 0 1.27 0l-.35-.35.35.35L47.22 29.6a1.13 1.13 0 0 1 1.56 0l14.7 14.38a.9.9 0 0 0 1.26 0L79.42 29.6a1.13 1.13 0 0 1 1.57 0Z"
      />
    </svg>`})),Xj=a((()=>{oR(),LN=$O`<svg fill="none" viewBox="0 0 20 20">
      <path
        fill="currentColor"
        d="M11 6.67a1 1 0 1 0-2 0v2.66a1 1 0 0 0 2 0V6.67ZM10 14.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z"
      />
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M10 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm-7 9a7 7 0 1 1 14 0 7 7 0 0 1-14 0Z"
        clip-rule="evenodd"
      />
    </svg>`})),eL=a((()=>{oR(),BN=$O`<svg
      fill="none"
      viewBox="0 0 21 20"
    >
      <path
        fill="currentColor"
        d="M8.8071 0.292893C9.19763 0.683417 9.19763 1.31658 8.8071 1.70711L6.91421 3.6H11.8404C14.3368 3.6 16.5533 5.1975 17.3427 7.56588L17.4487 7.88377C17.6233 8.40772 17.3402 8.97404 16.8162 9.14868C16.2923 9.32333 15.726 9.04017 15.5513 8.51623L15.4453 8.19834C14.9281 6.64664 13.476 5.6 11.8404 5.6H6.91421L8.8071 7.49289C9.19763 7.88342 9.19763 8.51658 8.8071 8.90711C8.41658 9.29763 7.78341 9.29763 7.39289 8.90711L3.79289 5.30711C3.40236 4.91658 3.40236 4.28342 3.79289 3.89289L7.39289 0.292893C7.78341 -0.0976311 8.41658 -0.0976311 8.8071 0.292893ZM4.18377 10.8513C4.70771 10.6767 5.27403 10.9598 5.44868 11.4838L5.55464 11.8017C6.07188 13.3534 7.52401 14.4 9.15964 14.4L14.0858 14.4L12.1929 12.5071C11.8024 12.1166 11.8024 11.4834 12.1929 11.0929C12.5834 10.7024 13.2166 10.7024 13.6071 11.0929L17.2071 14.6929C17.5976 15.0834 17.5976 15.7166 17.2071 16.1071L13.6071 19.7071C13.2166 20.0976 12.5834 20.0976 12.1929 19.7071C11.8024 19.3166 11.8024 18.6834 12.1929 18.2929L14.0858 16.4L9.15964 16.4C6.66314 16.4 4.44674 14.8025 3.65728 12.4341L3.55131 12.1162C3.37667 11.5923 3.65983 11.026 4.18377 10.8513Z"
      /></svg
    >`})),tL=a((()=>{oR(),DN=$O`<svg
      xmlns="http://www.w3.org/2000/svg"
      width="12"
      height="13"
      viewBox="0 0 12 13"
      fill="none"
    >
      <path
        fill-rule="evenodd"
        clip-rule="evenodd"
        d="M5.61391 1.57124C5.85142 1.42873 6.14813 1.42873 6.38564 1.57124L11.0793 4.38749C11.9179 4.89067 11.5612 6.17864 10.5832 6.17864H9.96398V10.0358H10.2854C10.6996 10.0358 11.0354 10.3716 11.0354 10.7858C11.0354 11.2 10.6996 11.5358 10.2854 11.5358H1.71416C1.29995 11.5358 0.964172 11.2 0.964172 10.7858C0.964172 10.3716 1.29995 10.0358 1.71416 10.0358H2.03558L2.03558 6.17864H1.41637C0.438389 6.17864 0.0816547 4.89066 0.920263 4.38749L5.61391 1.57124ZM3.53554 6.17864V10.0358H5.24979V6.17864H3.53554ZM6.74976 6.17864V10.0358H8.46401V6.17864H6.74976ZM8.64913 4.67864H3.35043L5.99978 3.089L8.64913 4.67864Z"
        fill="currentColor"
      /></svg
    >`})),rL=a((()=>{oR(),UN=$O`<svg
      xmlns="http://www.w3.org/2000/svg"
      width="12"
      height="13"
      viewBox="0 0 12 13"
      fill="none"
    >
      <path
        fill-rule="evenodd"
        clip-rule="evenodd"
        d="M4.16072 2C4.17367 2 4.18665 2 4.19968 2L7.83857 2C8.36772 1.99998 8.82398 1.99996 9.19518 2.04018C9.5895 2.0829 9.97577 2.17811 10.3221 2.42971C10.5131 2.56849 10.6811 2.73647 10.8198 2.92749C11.0714 3.27379 11.1666 3.66007 11.2094 4.0544C11.2496 4.42561 11.2496 4.88188 11.2495 5.41105V7.58896C11.2496 8.11812 11.2496 8.57439 11.2094 8.94561C11.1666 9.33994 11.0714 9.72621 10.8198 10.0725C10.6811 10.2635 10.5131 10.4315 10.3221 10.5703C9.97577 10.8219 9.5895 10.9171 9.19518 10.9598C8.82398 11 8.36772 11 7.83856 11H4.16073C3.63157 11 3.17531 11 2.80411 10.9598C2.40979 10.9171 2.02352 10.8219 1.67722 10.5703C1.48621 10.4315 1.31824 10.2635 1.17946 10.0725C0.927858 9.72621 0.832652 9.33994 0.78993 8.94561C0.749713 8.5744 0.749733 8.11813 0.749757 7.58896L0.749758 5.45C0.749758 5.43697 0.749758 5.42399 0.749757 5.41104C0.749733 4.88188 0.749713 4.42561 0.78993 4.0544C0.832652 3.66007 0.927858 3.27379 1.17946 2.92749C1.31824 2.73647 1.48621 2.56849 1.67722 2.42971C2.02352 2.17811 2.40979 2.0829 2.80411 2.04018C3.17531 1.99996 3.63157 1.99998 4.16072 2ZM2.96567 3.53145C2.69897 3.56034 2.60687 3.60837 2.55888 3.64324C2.49521 3.6895 2.43922 3.74549 2.39296 3.80916C2.35809 3.85715 2.31007 3.94926 2.28117 4.21597C2.26629 4.35335 2.25844 4.51311 2.25431 4.70832H9.74498C9.74085 4.51311 9.733 4.35335 9.71812 4.21597C9.68922 3.94926 9.6412 3.85715 9.60633 3.80916C9.56007 3.74549 9.50408 3.6895 9.44041 3.64324C9.39242 3.60837 9.30031 3.56034 9.03362 3.53145C8.75288 3.50103 8.37876 3.5 7.79961 3.5H4.19968C3.62053 3.5 3.24641 3.50103 2.96567 3.53145ZM9.74956 6.20832H2.24973V7.55C2.24973 8.12917 2.25076 8.5033 2.28117 8.78404C2.31007 9.05074 2.35809 9.14285 2.39296 9.19084C2.43922 9.25451 2.49521 9.31051 2.55888 9.35677C2.60687 9.39163 2.69897 9.43966 2.96567 9.46856C3.24641 9.49897 3.62053 9.5 4.19968 9.5H7.79961C8.37876 9.5 8.75288 9.49897 9.03362 9.46856C9.30032 9.43966 9.39242 9.39163 9.44041 9.35677C9.50408 9.31051 9.56007 9.25451 9.60633 9.19084C9.6412 9.14285 9.68922 9.05075 9.71812 8.78404C9.74854 8.5033 9.74956 8.12917 9.74956 7.55V6.20832ZM6.74963 8C6.74963 7.58579 7.08541 7.25 7.49961 7.25H8.2496C8.6638 7.25 8.99958 7.58579 8.99958 8C8.99958 8.41422 8.6638 8.75 8.2496 8.75H7.49961C7.08541 8.75 6.74963 8.41422 6.74963 8Z"
        fill="currentColor"
      /></svg
    >`})),iL=a((()=>{oR(),FN=$O`<svg
      width="13"
      height="12"
      viewBox="0 0 13 12"
      fill="none"
    >
      <path
        fill="currentColor"
        fill-rule="evenodd"
        clip-rule="evenodd"
        d="M0.794373 5.99982C0.794373 5.52643 1.17812 5.14268 1.6515 5.14268H5.643V1.15109C5.643 0.677701 6.02675 0.293946 6.50012 0.293945C6.9735 0.293946 7.35725 0.677701 7.35725 1.15109V5.14268H11.3488C11.8221 5.14268 12.2059 5.52643 12.2059 5.99982C12.2059 6.47321 11.8221 6.85696 11.3488 6.85696H7.35725V10.8486C7.35725 11.3219 6.9735 11.7057 6.50012 11.7057C6.02675 11.7057 5.643 11.3219 5.643 10.8486V6.85696H1.6515C1.17812 6.85696 0.794373 6.47321 0.794373 5.99982Z"
      /></svg
    >`})),nL=a((()=>{oR(),HN=$O`<svg fill="none" viewBox="0 0 14 6">
      <path style="fill: var(--wui-color-bg-150);" d="M0 1h14L9.21 5.12a3.31 3.31 0 0 1-4.49 0L0 1Z" />
      <path
        style="stroke: var(--wui-color-inverse-100);"
        stroke-opacity=".05"
        d="M1.33 1.5h11.32L8.88 4.75l-.01.01a2.81 2.81 0 0 1-3.8 0l-.02-.01L1.33 1.5Z"
      />
      <path
        style="fill: var(--wui-color-bg-150);"
        d="M1.25.71h11.5L9.21 3.88a3.31 3.31 0 0 1-4.49 0L1.25.71Z"
      />
    </svg> `})),oL=a((()=>{oR(),zN=$O`<svg fill="none" viewBox="0 0 14 14">
      <path
        fill="currentColor"
        fill-rule="evenodd"
        d="M12.9576 2.23383C13.3807 2.58873 13.4361 3.21947 13.0812 3.64263L6.37159 11.6426C6.19161 11.8572 5.92989 11.9865 5.65009 11.999C5.3703 12.0115 5.09808 11.9062 4.89965 11.7085L0.979321 7.80331C0.588042 7.41354 0.586817 6.78038 0.976585 6.3891C1.36635 5.99782 1.99952 5.99659 2.3908 6.38636L5.53928 9.52268L11.5488 2.35742C11.9037 1.93426 12.5344 1.87893 12.9576 2.23383Z"
        clip-rule="evenodd"
      />
    </svg>`})),aL=a((()=>{oR(),G$(),yR(),ER(),Z$(),K$(),Y$(),J$(),Q$(),X$(),ej(),tj(),rj(),ij(),nj(),oj(),aj(),sj(),cj(),lj(),uj(),dj(),hj(),pj(),fj(),gj(),mj(),bj(),yj(),wj(),vj(),_j(),xj(),Ej(),Cj(),kj(),Pj(),Ij(),Sj(),Aj(),Tj(),Oj(),Rj(),Nj(),Mj(),$j(),jj(),Lj(),Bj(),Dj(),Uj(),Fj(),Hj(),zj(),qj(),Wj(),Vj(),Gj(),Zj(),Kj(),Yj(),Jj(),Qj(),Xj(),eL(),tL(),rL(),iL(),nL(),oL(),qN=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},WN={add:XR,allWallets:NR,arrowBottomCircle:MR,appStore:$R,apple:jR,arrowBottom:LR,arrowLeft:BR,arrowRight:DR,arrowTop:UR,bank:DN,browser:FR,card:UN,checkmark:HR,checkmarkBold:zN,chevronBottom:zR,chevronLeft:qR,chevronRight:WR,chevronTop:VR,chromeStore:GR,clock:ZR,close:KR,compass:JR,coinPlaceholder:YR,copy:QR,cursor:eN,cursorTransparent:HN,desktop:tN,disconnect:rN,discord:iN,etherscan:nN,extension:oN,externalLink:aN,facebook:sN,filters:cN,github:lN,google:uN,helpCircle:dN,infoCircle:hN,mail:pN,mobile:fN,networkPlaceholder:gN,nftPlaceholder:mN,off:bN,playStore:yN,plus:FN,qrCode:wN,recycleHorizontal:BN,refresh:vN,search:_N,send:xN,swapHorizontal:EN,swapHorizontalMedium:kN,swapHorizontalBold:CN,swapHorizontalRoundedBold:PN,swapVertical:IN,telegram:SN,twitch:AN,twitter:TN,twitterIcon:ON,verify:RN,verifyFilled:NN,wallet:$N,walletConnect:jN,walletPlaceholder:MN,warningCircle:LN},VN=class extends QO{constructor(){super(...arguments),this.size="md",this.name="copy",this.color="fg-300"}render(){return this.style.cssText=`\n          --local-color: var(--wui-color-${this.color});\n          --local-width: var(--wui-icon-size-${this.size});\n        `,MO`${WN[this.name]}`}},VN.styles=[gR,bR,RR],qN([IR()],VN.prototype,"size",void 0),qN([IR()],VN.prototype,"name",void 0),qN([IR()],VN.prototype,"color",void 0),VN=qN([wR("wui-icon")],VN)})),sL=a((()=>{oR(),GN=IT`
      :host {
        display: block;
        width: var(--local-width);
        height: var(--local-height);
      }
    
      img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
        border-radius: inherit;
      }
    `})),cL=a((()=>{oR(),G$(),yR(),ER(),sL(),ZN=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},KN=class extends QO{constructor(){super(...arguments),this.src="./path/to/image.jpg",this.alt="Image",this.size=void 0}render(){return this.style.cssText=`\n          --local-width: ${this.size?`var(--wui-icon-size-${this.size});`:"100%"};\n          --local-height: ${this.size?`var(--wui-icon-size-${this.size});`:"100%"};\n          `,MO`<img src=${this.src} alt=${this.alt} />`}},KN.styles=[gR,bR,GN],ZN([IR()],KN.prototype,"src",void 0),ZN([IR()],KN.prototype,"alt",void 0),ZN([IR()],KN.prototype,"size",void 0),KN=ZN([wR("wui-image")],KN)})),lL=a((()=>{oR(),YN=IT`
      :host {
        display: block;
        width: var(--wui-box-size-lg);
        height: var(--wui-box-size-lg);
      }
    
      svg {
        width: var(--wui-box-size-lg);
        height: var(--wui-box-size-lg);
        fill: none;
        stroke: transparent;
        stroke-linecap: round;
      }
    
      use {
        stroke: var(--wui-color-accent-100);
        stroke-width: 2px;
        stroke-dasharray: 54, 118;
        stroke-dashoffset: 172;
        animation: dash 1s linear infinite;
      }
    
      @keyframes dash {
        to {
          stroke-dashoffset: 0px;
        }
      }
    `})),uL=a((()=>{oR(),yR(),ER(),lL(),JN=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},(QN=class extends QO{render(){return MO`
          <svg viewBox="0 0 54 59">
            <path
              id="wui-loader-path"
              d="M17.22 5.295c3.877-2.277 5.737-3.363 7.72-3.726a11.44 11.44 0 0 1 4.12 0c1.983.363 3.844 1.45 7.72 3.726l6.065 3.562c3.876 2.276 5.731 3.372 7.032 4.938a11.896 11.896 0 0 1 2.06 3.63c.683 1.928.688 4.11.688 8.663v7.124c0 4.553-.005 6.735-.688 8.664a11.896 11.896 0 0 1-2.06 3.63c-1.3 1.565-3.156 2.66-7.032 4.937l-6.065 3.563c-3.877 2.276-5.737 3.362-7.72 3.725a11.46 11.46 0 0 1-4.12 0c-1.983-.363-3.844-1.449-7.72-3.726l-6.065-3.562c-3.876-2.276-5.731-3.372-7.032-4.938a11.885 11.885 0 0 1-2.06-3.63c-.682-1.928-.688-4.11-.688-8.663v-7.124c0-4.553.006-6.735.688-8.664a11.885 11.885 0 0 1 2.06-3.63c1.3-1.565 3.156-2.66 7.032-4.937l6.065-3.562Z"
            />
            <use xlink:href="#wui-loader-path"></use>
          </svg>
        `}}).styles=[gR,YN],QN=JN([wR("wui-loading-hexagon")],QN)})),dL=a((()=>{oR(),XN=IT`
      :host {
        display: flex;
      }
    
      :host([data-size='sm']) > svg {
        width: 12px;
        height: 12px;
      }
    
      :host([data-size='md']) > svg {
        width: 16px;
        height: 16px;
      }
    
      :host([data-size='lg']) > svg {
        width: 24px;
        height: 24px;
      }
    
      :host([data-size='xl']) > svg {
        width: 32px;
        height: 32px;
      }
    
      svg {
        animation: rotate 2s linear infinite;
      }
    
      circle {
        fill: none;
        stroke: var(--local-color);
        stroke-width: 4px;
        stroke-dasharray: 1, 124;
        stroke-dashoffset: 0;
        stroke-linecap: round;
        animation: dash 1.5s ease-in-out infinite;
      }
    
      :host([data-size='md']) > svg > circle {
        stroke-width: 6px;
      }
    
      :host([data-size='sm']) > svg > circle {
        stroke-width: 8px;
      }
    
      @keyframes rotate {
        100% {
          transform: rotate(360deg);
        }
      }
    
      @keyframes dash {
        0% {
          stroke-dasharray: 1, 124;
          stroke-dashoffset: 0;
        }
    
        50% {
          stroke-dasharray: 90, 124;
          stroke-dashoffset: -35;
        }
    
        100% {
          stroke-dashoffset: -125;
        }
      }
    `})),hL=a((()=>{oR(),G$(),yR(),ER(),dL(),eM=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},tM=class extends QO{constructor(){super(...arguments),this.color="accent-100",this.size="lg"}render(){return this.style.cssText=`--local-color: var(--wui-color-${this.color});`,this.dataset.size=this.size,MO`<svg viewBox="25 25 50 50">
          <circle r="20" cy="50" cx="50"></circle>
        </svg>`}},tM.styles=[gR,XN],eM([IR()],tM.prototype,"color",void 0),eM([IR()],tM.prototype,"size",void 0),tM=eM([wR("wui-loading-spinner")],tM)})),pL=a((()=>{oR(),rM=IT`
      :host {
        display: block;
        width: var(--wui-box-size-md);
        height: var(--wui-box-size-md);
      }
    
      svg {
        width: var(--wui-box-size-md);
        height: var(--wui-box-size-md);
      }
    
      rect {
        fill: none;
        stroke: var(--wui-color-accent-100);
        stroke-width: 4px;
        stroke-linecap: round;
        animation: dash 1s linear infinite;
      }
    
      @keyframes dash {
        to {
          stroke-dashoffset: 0px;
        }
      }
    `})),fL=a((()=>{oR(),G$(),yR(),ER(),pL(),iM=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},nM=class extends QO{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){let e=this.radius>50?50:this.radius,t=36-e;return MO`
          <svg viewBox="0 0 110 110" width="110" height="110">
            <rect
              x="2"
              y="2"
              width="106"
              height="106"
              rx=${e}
              stroke-dasharray="${116+t} ${245+t}"
              stroke-dashoffset=${360+1.75*t}
            />
          </svg>
        `}},nM.styles=[gR,rM],iM([IR({type:Number})],nM.prototype,"radius",void 0),nM=iM([wR("wui-loading-thumbnail")],nM)})),gL=a((()=>{oR(),oM=IT`
      :host {
        display: block;
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);
        background: linear-gradient(
          120deg,
          var(--wui-color-bg-200) 5%,
          var(--wui-color-bg-200) 48%,
          var(--wui-color-bg-300) 55%,
          var(--wui-color-bg-300) 60%,
          var(--wui-color-bg-300) calc(60% + 10px),
          var(--wui-color-bg-200) calc(60% + 12px),
          var(--wui-color-bg-200) 100%
        );
        background-size: 250%;
        animation: shimmer 3s linear infinite reverse;
      }
    
      @keyframes shimmer {
        from {
          background-position: -250% 0;
        }
        to {
          background-position: 250% 0;
        }
      }
    `})),mL=a((()=>{oR(),G$(),ER(),gL(),aM=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},sM=class extends QO{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="m"}render(){return this.style.cssText=`\n          width: ${this.width};\n          height: ${this.height};\n          border-radius: clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px);\n        `,MO`<slot></slot>`}},sM.styles=[oM],aM([IR()],sM.prototype,"width",void 0),aM([IR()],sM.prototype,"height",void 0),aM([IR()],sM.prototype,"borderRadius",void 0),sM=aM([wR("wui-shimmer")],sM)})),bL=a((()=>{cM={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},lM=e=>(...t)=>({_$litDirective$:e,values:t}),uM=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}})),yL=a((()=>{rR(),bL(),dM=lM(class extends uM{constructor(e){if(super(e),e.type!==cM.ATTRIBUTE||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(let e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}let r=e.element.classList;for(let e of this.st)e in t||(r.remove(e),this.st.delete(e));for(let e in t){let i=!!t[e];i===this.st.has(e)||this.nt?.has(e)||(i?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return jO}})})),wL=a((()=>{yL()})),vL=a((()=>{oR(),hM=IT`
      :host {
        display: inline-flex !important;
      }
    
      slot {
        width: 100%;
        display: inline-block;
        font-style: normal;
        font-family: var(--wui-font-family);
        font-feature-settings:
          'tnum' on,
          'lnum' on,
          'case' on;
        line-height: 130%;
        font-weight: var(--wui-font-weight-regular);
        overflow: inherit;
        text-overflow: inherit;
        text-align: var(--local-align);
        color: var(--local-color);
      }
    
      .wui-font-medium-400 {
        font-size: var(--wui-font-size-medium);
        font-weight: var(--wui-font-weight-light);
        letter-spacing: var(--wui-letter-spacing-medium);
      }
    
      .wui-font-medium-600 {
        font-size: var(--wui-font-size-medium);
        letter-spacing: var(--wui-letter-spacing-medium);
      }
    
      .wui-font-medium-title-600 {
        font-size: var(--wui-font-size-medium-title);
        letter-spacing: var(--wui-letter-spacing-medium-title);
      }
    
      .wui-font-mini-700 {
        font-size: var(--wui-font-size-mini);
        letter-spacing: var(--wui-letter-spacing-mini);
        text-transform: uppercase;
      }
    
      .wui-font-large-500,
      .wui-font-large-600,
      .wui-font-large-700 {
        font-size: var(--wui-font-size-large);
        letter-spacing: var(--wui-letter-spacing-large);
      }
    
      .wui-font-2xl-500,
      .wui-font-2xl-600,
      .wui-font-2xl-700 {
        font-size: var(--wui-font-size-2xl);
        letter-spacing: var(--wui-letter-spacing-2xl);
      }
    
      .wui-font-paragraph-400,
      .wui-font-paragraph-500,
      .wui-font-paragraph-600,
      .wui-font-paragraph-700 {
        font-size: var(--wui-font-size-paragraph);
        letter-spacing: var(--wui-letter-spacing-paragraph);
      }
    
      .wui-font-small-400,
      .wui-font-small-500,
      .wui-font-small-600 {
        font-size: var(--wui-font-size-small);
        letter-spacing: var(--wui-letter-spacing-small);
      }
    
      .wui-font-tiny-400,
      .wui-font-tiny-500,
      .wui-font-tiny-600 {
        font-size: var(--wui-font-size-tiny);
        letter-spacing: var(--wui-letter-spacing-tiny);
      }
    
      .wui-font-micro-700,
      .wui-font-micro-600 {
        font-size: var(--wui-font-size-micro);
        letter-spacing: var(--wui-letter-spacing-micro);
        text-transform: uppercase;
      }
    
      .wui-font-tiny-400,
      .wui-font-small-400,
      .wui-font-paragraph-400 {
        font-weight: var(--wui-font-weight-light);
      }
    
      .wui-font-large-700,
      .wui-font-paragraph-700,
      .wui-font-micro-700,
      .wui-font-mini-700 {
        font-weight: var(--wui-font-weight-bold);
      }
    
      .wui-font-medium-600,
      .wui-font-medium-title-600,
      .wui-font-large-600,
      .wui-font-paragraph-600,
      .wui-font-small-600,
      .wui-font-tiny-600,
      .wui-font-micro-600 {
        font-weight: var(--wui-font-weight-medium);
      }
    `})),_L=a((()=>{oR(),G$(),wL(),yR(),ER(),vL(),pM=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},fM=class extends QO{constructor(){super(...arguments),this.variant="paragraph-500",this.color="fg-300",this.align="left"}render(){let e={[`wui-font-${this.variant}`]:!0,[`wui-color-${this.color}`]:!0};return this.style.cssText=`\n          --local-align: ${this.align};\n          --local-color: var(--wui-color-${this.color});\n        `,MO`<slot class=${dM(e)}></slot>`}},fM.styles=[gR,hM],pM([IR()],fM.prototype,"variant",void 0),pM([IR()],fM.prototype,"color",void 0),pM([IR()],fM.prototype,"align",void 0),fM=pM([wR("wui-text")],fM)})),xL=a((()=>{oR(),gM=$O`<svg fill="none" viewBox="0 0 60 60">
      <rect width="60" height="60" fill="#1DC956" rx="30" />
      <circle cx="30" cy="30" r="3" fill="#fff" />
      <path
        fill="#2BEE6C"
        stroke="#fff"
        stroke-width="2"
        d="m45.32 17.9-.88-.42.88.42.02-.05c.1-.2.21-.44.26-.7l-.82-.15.82.16a2 2 0 0 0-.24-1.4c-.13-.23-.32-.42-.47-.57a8.42 8.42 0 0 1-.04-.04l-.04-.04a2.9 2.9 0 0 0-.56-.47l-.51.86.5-.86a2 2 0 0 0-1.4-.24c-.26.05-.5.16-.69.26l-.05.02-15.05 7.25-.1.05c-1.14.55-1.85.89-2.46 1.37a7 7 0 0 0-1.13 1.14c-.5.6-.83 1.32-1.38 2.45l-.05.11-7.25 15.05-.02.05c-.1.2-.21.43-.26.69a2 2 0 0 0 .24 1.4l.85-.5-.85.5c.13.23.32.42.47.57l.04.04.04.04c.15.15.34.34.56.47a2 2 0 0 0 1.41.24l-.2-.98.2.98c.25-.05.5-.17.69-.26l.05-.02-.42-.87.42.87 15.05-7.25.1-.05c1.14-.55 1.85-.89 2.46-1.38a7 7 0 0 0 1.13-1.13 12.87 12.87 0 0 0 1.43-2.56l7.25-15.05Z"
      />
      <path
        fill="#1DC956"
        d="M33.38 32.72 30.7 29.3 15.86 44.14l.2.2a1 1 0 0 0 1.14.2l15.1-7.27a3 3 0 0 0 1.08-4.55Z"
      />
      <path
        fill="#86F999"
        d="m26.62 27.28 2.67 3.43 14.85-14.85-.2-.2a1 1 0 0 0-1.14-.2l-15.1 7.27a3 3 0 0 0-1.08 4.55Z"
      />
      <circle cx="30" cy="30" r="3" fill="#fff" transform="rotate(45 30 30)" />
      <rect width="59" height="59" x=".5" y=".5" stroke="#062B2B" stroke-opacity=".1" rx="29.5" />
    </svg> `})),EL=a((()=>{oR(),mM=$O`<svg viewBox="0 0 60 60" fill="none">
      <g clip-path="url(#clip0_7734_50402)">
        <path
          d="M0 24.9C0 15.6485 0 11.0228 1.97053 7.56812C3.3015 5.23468 5.23468 3.3015 7.56812 1.97053C11.0228 0 15.6485 0 24.9 0H35.1C44.3514 0 48.9772 0 52.4319 1.97053C54.7653 3.3015 56.6985 5.23468 58.0295 7.56812C60 11.0228 60 15.6485 60 24.9V35.1C60 44.3514 60 48.9772 58.0295 52.4319C56.6985 54.7653 54.7653 56.6985 52.4319 58.0295C48.9772 60 44.3514 60 35.1 60H24.9C15.6485 60 11.0228 60 7.56812 58.0295C5.23468 56.6985 3.3015 54.7653 1.97053 52.4319C0 48.9772 0 44.3514 0 35.1V24.9Z"
          fill="#EB8B47"
        />
        <path
          d="M0.5 24.9C0.5 20.2652 0.50047 16.8221 0.744315 14.105C0.987552 11.3946 1.46987 9.45504 2.40484 7.81585C3.69145 5.56019 5.56019 3.69145 7.81585 2.40484C9.45504 1.46987 11.3946 0.987552 14.105 0.744315C16.8221 0.50047 20.2652 0.5 24.9 0.5H35.1C39.7348 0.5 43.1779 0.50047 45.895 0.744315C48.6054 0.987552 50.545 1.46987 52.1841 2.40484C54.4398 3.69145 56.3086 5.56019 57.5952 7.81585C58.5301 9.45504 59.0124 11.3946 59.2557 14.105C59.4995 16.8221 59.5 20.2652 59.5 24.9V35.1C59.5 39.7348 59.4995 43.1779 59.2557 45.895C59.0124 48.6054 58.5301 50.545 57.5952 52.1841C56.3086 54.4398 54.4398 56.3086 52.1841 57.5952C50.545 58.5301 48.6054 59.0124 45.895 59.2557C43.1779 59.4995 39.7348 59.5 35.1 59.5H24.9C20.2652 59.5 16.8221 59.4995 14.105 59.2557C11.3946 59.0124 9.45504 58.5301 7.81585 57.5952C5.56019 56.3086 3.69145 54.4398 2.40484 52.1841C1.46987 50.545 0.987552 48.6054 0.744315 45.895C0.50047 43.1779 0.5 39.7348 0.5 35.1V24.9Z"
          stroke="#062B2B"
          stroke-opacity="0.1"
        />
        <path
          d="M19 52C24.5228 52 29 47.5228 29 42C29 36.4772 24.5228 32 19 32C13.4772 32 9 36.4772 9 42C9 47.5228 13.4772 52 19 52Z"
          fill="#FF974C"
          stroke="white"
          stroke-width="2"
        />
        <path
          fill-rule="evenodd"
          clip-rule="evenodd"
          d="M42.8437 8.3264C42.4507 7.70891 41.5493 7.70891 41.1564 8.32641L28.978 27.4638C28.5544 28.1295 29.0326 29.0007 29.8217 29.0007H54.1783C54.9674 29.0007 55.4456 28.1295 55.022 27.4638L42.8437 8.3264Z"
          fill="white"
        />
        <path
          fill-rule="evenodd"
          clip-rule="evenodd"
          d="M42.3348 11.6456C42.659 11.7608 42.9061 12.1492 43.4005 12.926L50.7332 24.4488C51.2952 25.332 51.5763 25.7737 51.5254 26.1382C51.4915 26.3808 51.3698 26.6026 51.1833 26.7614C50.9031 27 50.3796 27 49.3327 27H34.6673C33.6204 27 33.0969 27 32.8167 26.7614C32.6302 26.6026 32.5085 26.3808 32.4746 26.1382C32.4237 25.7737 32.7048 25.332 33.2669 24.4488L40.5995 12.926C41.0939 12.1492 41.341 11.7608 41.6652 11.6456C41.8818 11.5687 42.1182 11.5687 42.3348 11.6456ZM35.0001 26.999C38.8661 26.999 42.0001 23.865 42.0001 19.999C42.0001 23.865 45.1341 26.999 49.0001 26.999H35.0001Z"
          fill="#FF974C"
        />
        <path
          d="M10.1061 9.35712C9.9973 9.67775 9.99867 10.0388 9.99978 10.3323C9.99989 10.3611 10 10.3893 10 10.4167V25.5833C10 25.6107 9.99989 25.6389 9.99978 25.6677C9.99867 25.9612 9.9973 26.3222 10.1061 26.6429C10.306 27.2317 10.7683 27.694 11.3571 27.8939C11.6777 28.0027 12.0388 28.0013 12.3323 28.0002C12.3611 28.0001 12.3893 28 12.4167 28H19C24.5228 28 29 23.5228 29 18C29 12.4772 24.5228 8 19 8H12.4167C12.3893 8 12.3611 7.99989 12.3323 7.99978C12.0388 7.99867 11.6778 7.9973 11.3571 8.10614C10.7683 8.306 10.306 8.76834 10.1061 9.35712Z"
          fill="#FF974C"
          stroke="white"
          stroke-width="2"
        />
        <circle cx="19" cy="18" r="4" fill="#EB8B47" stroke="white" stroke-width="2" />
        <circle cx="19" cy="42" r="4" fill="#EB8B47" stroke="white" stroke-width="2" />
      </g>
      <defs>
        <clipPath id="clip0_7734_50402">
          <rect width="60" height="60" fill="white" />
        </clipPath>
      </defs>
    </svg> `})),CL=a((()=>{oR(),bM=$O`<svg fill="none" viewBox="0 0 60 60">
      <g clip-path="url(#a)">
        <path
          fill="#1DC956"
          d="M0 25.01c0-9.25 0-13.88 1.97-17.33a15 15 0 0 1 5.6-5.6C11.02.11 15.65.11 24.9.11h10.2c9.25 0 13.88 0 17.33 1.97a15 15 0 0 1 5.6 5.6C60 11.13 60 15.76 60 25v10.2c0 9.25 0 13.88-1.97 17.33a15 15 0 0 1-5.6 5.6c-3.45 1.97-8.08 1.97-17.33 1.97H24.9c-9.25 0-13.88 0-17.33-1.97a15 15 0 0 1-5.6-5.6C0 49.1 0 44.46 0 35.21v-10.2Z"
        />
        <path
          fill="#2BEE6C"
          d="M16.1 60c-3.82-.18-6.4-.64-8.53-1.86a15 15 0 0 1-5.6-5.6C.55 50.06.16 46.97.04 41.98L4.2 40.6a4 4 0 0 0 2.48-2.39l4.65-12.4a2 2 0 0 1 2.5-1.2l2.53.84a2 2 0 0 0 2.43-1l2.96-5.94a2 2 0 0 1 3.7.32l3.78 12.58a2 2 0 0 0 3.03 1.09l3.34-2.23a2 2 0 0 0 .65-.7l5.3-9.72a2 2 0 0 1 1.42-1.01l4.14-.69a2 2 0 0 1 1.6.44l3.9 3.24a2 2 0 0 0 2.7-.12l4.62-4.63c.08 2.2.08 4.8.08 7.93v10.2c0 9.25 0 13.88-1.97 17.33a15 15 0 0 1-5.6 5.6c-2.13 1.22-4.7 1.68-8.54 1.86H16.11Z"
        />
        <path
          fill="#fff"
          d="m.07 43.03-.05-2.1 3.85-1.28a3 3 0 0 0 1.86-1.79l4.66-12.4a3 3 0 0 1 3.75-1.8l2.53.84a1 1 0 0 0 1.21-.5l2.97-5.94a3 3 0 0 1 5.56.48l3.77 12.58a1 1 0 0 0 1.51.55l3.34-2.23a1 1 0 0 0 .33-.35l5.3-9.71a3 3 0 0 1 2.14-1.53l4.13-.69a3 3 0 0 1 2.41.66l3.9 3.24a1 1 0 0 0 1.34-.06l5.28-5.28c.05.85.08 1.75.1 2.73L56 22.41a3 3 0 0 1-4.04.19l-3.9-3.25a1 1 0 0 0-.8-.21l-4.13.69a1 1 0 0 0-.72.5l-5.3 9.72a3 3 0 0 1-.97 1.05l-3.34 2.23a3 3 0 0 1-4.53-1.63l-3.78-12.58a1 1 0 0 0-1.85-.16l-2.97 5.94a3 3 0 0 1-3.63 1.5l-2.53-.84a1 1 0 0 0-1.25.6l-4.65 12.4a5 5 0 0 1-3.1 3L.07 43.02Z"
        />
        <path
          fill="#fff"
          fill-rule="evenodd"
          d="M49.5 19a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z"
          clip-rule="evenodd"
        />
        <path fill="#fff" d="M45 .28v59.66l-2 .1V.19c.7.02 1.37.05 2 .1Z" />
        <path fill="#2BEE6C" d="M47.5 19a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" />
        <path
          stroke="#fff"
          stroke-opacity=".1"
          d="M.5 25.01c0-4.63 0-8.08.24-10.8.25-2.7.73-4.64 1.66-6.28a14.5 14.5 0 0 1 5.42-5.41C9.46 1.58 11.39 1.1 14.1.85A133 133 0 0 1 24.9.61h10.2c4.63 0 8.08 0 10.8.24 2.7.25 4.65.73 6.28 1.67a14.5 14.5 0 0 1 5.42 5.4c.93 1.65 1.41 3.58 1.66 6.3.24 2.71.24 6.16.24 10.79v10.2c0 4.64 0 8.08-.24 10.8-.25 2.7-.73 4.65-1.66 6.28a14.5 14.5 0 0 1-5.42 5.42c-1.63.93-3.57 1.41-6.28 1.66-2.72.24-6.17.24-10.8.24H24.9c-4.63 0-8.08 0-10.8-.24-2.7-.25-4.64-.73-6.28-1.66a14.5 14.5 0 0 1-5.42-5.42C1.47 50.66 1 48.72.74 46.01A133 133 0 0 1 .5 35.2v-10.2Z"
        />
      </g>
      <defs>
        <clipPath id="a"><path fill="#fff" d="M0 0h60v60H0z" /></clipPath>
      </defs>
    </svg>`})),kL=a((()=>{oR(),yM=$O`<svg fill="none" viewBox="0 0 60 60">
      <g clip-path="url(#a)">
        <rect width="60" height="60" fill="#C653C6" rx="30" />
        <path
          fill="#E87DE8"
          d="M57.98.01v19.5a4.09 4.09 0 0 0-2.63 2.29L50.7 34.2a2 2 0 0 1-2.5 1.2l-2.53-.84a2 2 0 0 0-2.42 1l-2.97 5.94a2 2 0 0 1-3.7-.32L32.8 28.6a2 2 0 0 0-3.02-1.09l-3.35 2.23a2 2 0 0 0-.64.7l-5.3 9.72a2 2 0 0 1-1.43 1.01l-4.13.69a2 2 0 0 1-1.61-.44l-3.9-3.24a2 2 0 0 0-2.69.12L2.1 42.93.02 43V.01h57.96Z"
        />
        <path
          fill="#fff"
          d="m61.95 16.94.05 2.1-3.85 1.28a3 3 0 0 0-1.86 1.79l-4.65 12.4a3 3 0 0 1-3.76 1.8l-2.53-.84a1 1 0 0 0-1.2.5l-2.98 5.94a3 3 0 0 1-5.55-.48l-3.78-12.58a1 1 0 0 0-1.5-.55l-3.35 2.23a1 1 0 0 0-.32.35l-5.3 9.72a3 3 0 0 1-2.14 1.52l-4.14.69a3 3 0 0 1-2.41-.66l-3.9-3.24a1 1 0 0 0-1.34.06l-5.28 5.28c-.05-.84-.08-1.75-.1-2.73l3.97-3.96a3 3 0 0 1 4.04-.19l3.89 3.25a1 1 0 0 0 .8.21l4.14-.68a1 1 0 0 0 .71-.51l5.3-9.71a3 3 0 0 1 .97-1.06l3.34-2.23a3 3 0 0 1 4.54 1.63l3.77 12.58a1 1 0 0 0 1.86.16l2.96-5.93a3 3 0 0 1 3.64-1.5l2.52.83a1 1 0 0 0 1.25-.6l4.66-12.4a5 5 0 0 1 3.1-2.99l4.43-1.48Z"
        />
        <path
          fill="#fff"
          fill-rule="evenodd"
          d="M35.5 27a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z"
          clip-rule="evenodd"
        />
        <path fill="#fff" d="M31 0v60h-2V0h2Z" />
        <path fill="#E87DE8" d="M33.5 27a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" />
      </g>
      <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="29.5" />
      <defs>
        <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="30" /></clipPath>
      </defs>
    </svg> `})),PL=a((()=>{oR(),wM=$O`<svg fill="none" viewBox="0 0 60 60">
      <g clip-path="url(#a)">
        <rect width="60" height="60" fill="#987DE8" rx="30" />
        <path
          fill="#fff"
          fill-rule="evenodd"
          d="m15.48 28.37 11.97-19.3a3 3 0 0 1 5.1 0l11.97 19.3a6 6 0 0 1 .9 3.14v.03a6 6 0 0 1-1.16 3.56L33.23 50.2a4 4 0 0 1-6.46 0L15.73 35.1a6 6 0 0 1-1.15-3.54v-.03a6 6 0 0 1 .9-3.16Z"
          clip-rule="evenodd"
        />
        <path
          fill="#643CDD"
          d="M30.84 10.11a1 1 0 0 0-.84-.46V24.5l12.6 5.53a2 2 0 0 0-.28-1.4L30.84 10.11Z"
        />
        <path
          fill="#BDADEB"
          d="M30 9.65a1 1 0 0 0-.85.46L17.66 28.64a2 2 0 0 0-.26 1.39L30 24.5V9.65Z"
        />
        <path
          fill="#643CDD"
          d="M30 50.54a1 1 0 0 0 .8-.4l11.24-15.38c.3-.44-.2-1-.66-.73l-9.89 5.68a3 3 0 0 1-1.5.4v10.43Z"
        />
        <path
          fill="#BDADEB"
          d="m17.97 34.76 11.22 15.37c.2.28.5.41.8.41V40.11a3 3 0 0 1-1.49-.4l-9.88-5.68c-.47-.27-.97.3-.65.73Z"
        />
        <path
          fill="#401AB3"
          d="M42.6 30.03 30 24.5v13.14a3 3 0 0 0 1.5-.4l10.14-5.83a2 2 0 0 0 .95-1.38Z"
        />
        <path
          fill="#7C5AE2"
          d="M30 37.64V24.46l-12.6 5.57a2 2 0 0 0 .97 1.39l10.13 5.82a3 3 0 0 0 1.5.4Z"
        />
      </g>
      <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="29.5" />
      <defs>
        <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="30" /></clipPath>
      </defs>
    </svg> `})),IL=a((()=>{oR(),vM=$O`<svg fill="none" viewBox="0 0 60 60">
      <rect width="60" height="60" fill="#1DC956" rx="3" />
      <path
        fill="#1FAD7E"
        stroke="#fff"
        stroke-width="2"
        d="m30.49 29.13-.49-.27-.49.27-12.77 7.1-.05.02c-.86.48-1.58.88-2.1 1.24-.54.37-1.04.81-1.28 1.45a3 3 0 0 0 0 2.12c.24.63.74 1.08 1.27 1.45.53.36 1.25.76 2.11 1.24l.05.03 6.33 3.51.17.1c2.33 1.3 3.72 2.06 5.22 2.32a9 9 0 0 0 3.08 0c1.5-.26 2.9-1.03 5.22-2.32l.18-.1 6.32-3.51.05-.03a26.9 26.9 0 0 0 2.1-1.24 3.21 3.21 0 0 0 1.28-1.45l-.94-.35.94.35a3 3 0 0 0 0-2.12l-.94.35.94-.35a3.21 3.21 0 0 0-1.27-1.45c-.53-.36-1.25-.76-2.11-1.24l-.05-.03-12.77-7.1Z"
      />
      <path
        fill="#2BEE6C"
        stroke="#fff"
        stroke-width="2"
        d="m30.49 19.13-.49-.27-.49.27-12.77 7.1-.05.02c-.86.48-1.58.88-2.1 1.24-.54.37-1.04.81-1.28 1.45a3 3 0 0 0 0 2.12c.24.63.74 1.08 1.27 1.45.53.36 1.25.76 2.11 1.24l.05.03 6.33 3.51.17.1c2.33 1.3 3.72 2.06 5.22 2.32a9 9 0 0 0 3.08 0c1.5-.26 2.9-1.03 5.22-2.32l.18-.1 6.32-3.51.05-.03a26.9 26.9 0 0 0 2.1-1.24 3.21 3.21 0 0 0 1.28-1.45l-.94-.35.94.35a3 3 0 0 0 0-2.12l-.94.35.94-.35a3.21 3.21 0 0 0-1.27-1.45c-.53-.36-1.25-.76-2.11-1.24l-.05-.03-12.77-7.1Z"
      />
      <path
        fill="#86F999"
        stroke="#fff"
        stroke-width="2"
        d="m46.69 21.06-.94-.35.94.35a3 3 0 0 0 0-2.12l-.94.35.94-.35a3.21 3.21 0 0 0-1.27-1.45c-.53-.36-1.25-.76-2.11-1.24l-.05-.03-6.32-3.51-.18-.1c-2.33-1.3-3.72-2.06-5.22-2.33a9 9 0 0 0-3.08 0c-1.5.27-2.9 1.04-5.22 2.33l-.17.1-6.33 3.51-.05.03c-.86.48-1.58.88-2.1 1.24-.54.37-1.04.81-1.28 1.45a3 3 0 0 0 0 2.12c.24.63.74 1.08 1.27 1.45.53.36 1.25.76 2.11 1.24l.05.03 6.33 3.51.17.1c2.33 1.3 3.72 2.06 5.22 2.32a9 9 0 0 0 3.08 0c1.5-.26 2.9-1.03 5.22-2.32l.18-.1 6.32-3.51.05-.03a26.9 26.9 0 0 0 2.1-1.24 3.21 3.21 0 0 0 1.28-1.45Z"
      />
      <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" />
    </svg>`})),SL=a((()=>{oR(),_M=$O`<svg fill="none" viewBox="0 0 60 60">
      <rect width="60" height="60" fill="#C653C6" rx="3" />
      <path
        fill="#fff"
        d="M20.03 15.22C20 15.6 20 16.07 20 17v2.8c0 1.14 0 1.7-.2 2.12-.15.31-.3.5-.58.71-.37.28-1.06.42-2.43.7-.59.12-1.11.29-1.6.51a9 9 0 0 0-4.35 4.36C10 30 10 32.34 10 37c0 4.66 0 7 .84 8.8a9 9 0 0 0 4.36 4.36C17 51 19.34 51 24 51h12c4.66 0 7 0 8.8-.84a9 9 0 0 0 4.36-4.36C50 44 50 41.66 50 37c0-4.66 0-7-.84-8.8a9 9 0 0 0-4.36-4.36c-.48-.22-1-.39-1.6-.5-1.36-.29-2.05-.43-2.42-.7-.27-.22-.43-.4-.58-.72-.2-.42-.2-.98-.2-2.11V17c0-.93 0-1.4-.03-1.78a9 9 0 0 0-8.19-8.19C31.4 7 30.93 7 30 7s-1.4 0-1.78.03a9 9 0 0 0-8.19 8.19Z"
      />
      <path
        fill="#E87DE8"
        d="M22 17c0-.93 0-1.4.04-1.78a7 7 0 0 1 6.18-6.18C28.6 9 29.07 9 30 9s1.4 0 1.78.04a7 7 0 0 1 6.18 6.18c.04.39.04.85.04 1.78v4.5a1.5 1.5 0 0 1-3 0V17c0-.93 0-1.4-.08-1.78a4 4 0 0 0-3.14-3.14C31.39 12 30.93 12 30 12s-1.4 0-1.78.08a4 4 0 0 0-3.14 3.14c-.08.39-.08.85-.08 1.78v4.5a1.5 1.5 0 0 1-3 0V17Z"
      />
      <path
        fill="#E87DE8"
        fill-rule="evenodd"
        d="M12 36.62c0-4.32 0-6.48.92-8.09a7 7 0 0 1 2.61-2.61C17.14 25 19.3 25 23.62 25h6.86c.46 0 .7 0 .9.02 2.73.22 4.37 2.43 4.62 4.98.27-2.7 2.11-5 5.02-5A6.98 6.98 0 0 1 48 31.98v5.4c0 4.32 0 6.48-.92 8.09a7 7 0 0 1-2.61 2.61c-1.61.92-3.77.92-8.09.92h-5.86c-.46 0-.7 0-.9-.02-2.73-.22-4.37-2.43-4.62-4.98-.26 2.58-1.94 4.82-4.71 4.99l-.7.01c-.55 0-.82 0-1.05-.02a7 7 0 0 1-6.52-6.52c-.02-.23-.02-.5-.02-1.05v-4.79Zm21.24-.27a4 4 0 1 0-6.48 0 31.28 31.28 0 0 1 1.57 2.23c.17.4.17.81.17 1.24V42.5a1.5 1.5 0 0 0 3 0V39.82c0-.43 0-.85.17-1.24.09-.2.58-.87 1.57-2.23Z"
        clip-rule="evenodd"
      />
      <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" />
    </svg>`})),AL=a((()=>{oR(),xM=$O`<svg fill="none" viewBox="0 0 60 60">
      <g clip-path="url(#a)">
        <path
          fill="#EB8B47"
          d="M0 24.9c0-9.25 0-13.88 1.97-17.33a15 15 0 0 1 5.6-5.6C11.02 0 15.65 0 24.9 0h10.2c9.25 0 13.88 0 17.33 1.97a15 15 0 0 1 5.6 5.6C60 11.02 60 15.65 60 24.9v10.2c0 9.25 0 13.88-1.97 17.33a15 15 0 0 1-5.6 5.6C48.98 60 44.35 60 35.1 60H24.9c-9.25 0-13.88 0-17.33-1.97a15 15 0 0 1-5.6-5.6C0 48.98 0 44.35 0 35.1V24.9Z"
        />
        <path
          stroke="#062B2B"
          stroke-opacity=".1"
          d="M.5 24.9c0-4.64 0-8.08.24-10.8.25-2.7.73-4.65 1.66-6.28A14.5 14.5 0 0 1 7.82 2.4C9.46 1.47 11.39 1 14.1.74A133 133 0 0 1 24.9.5h10.2c4.63 0 8.08 0 10.8.24 2.7.25 4.65.73 6.28 1.66a14.5 14.5 0 0 1 5.42 5.42c.93 1.63 1.41 3.57 1.66 6.28.24 2.72.24 6.16.24 10.8v10.2c0 4.63 0 8.08-.24 10.8-.25 2.7-.73 4.64-1.66 6.28a14.5 14.5 0 0 1-5.42 5.41c-1.63.94-3.57 1.42-6.28 1.67-2.72.24-6.17.24-10.8.24H24.9c-4.63 0-8.08 0-10.8-.24-2.7-.25-4.64-.73-6.28-1.67a14.5 14.5 0 0 1-5.42-5.4C1.47 50.53 1 48.6.74 45.88A133 133 0 0 1 .5 35.1V24.9Z"
        />
        <path
          fill="#FF974C"
          stroke="#fff"
          stroke-width="2"
          d="M39.2 29.2a13 13 0 1 0-18.4 0l1.3 1.28a12.82 12.82 0 0 1 2.1 2.39 6 6 0 0 1 .6 1.47c.2.76.2 1.56.2 3.17v11.24c0 1.08 0 1.61.13 2.12a4 4 0 0 0 .41.98c.26.45.64.83 1.4 1.6l.3.29c.65.65.98.98 1.36 1.09.26.07.54.07.8 0 .38-.11.7-.44 1.36-1.1l3.48-3.47c.65-.65.98-.98 1.09-1.36a1.5 1.5 0 0 0 0-.8c-.1-.38-.44-.7-1.1-1.36l-.47-.48c-.65-.65-.98-.98-1.09-1.36a1.5 1.5 0 0 1 0-.8c.1-.38.44-.7 1.1-1.36l.47-.48c.65-.65.98-.98 1.09-1.36a1.5 1.5 0 0 0 0-.8c-.1-.38-.44-.7-1.1-1.36l-.48-.5c-.65-.64-.98-.97-1.08-1.35a1.5 1.5 0 0 1 0-.79c.1-.38.42-.7 1.06-1.36l5.46-5.55Z"
        />
        <circle cx="30" cy="17" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2" />
      </g>
      <defs>
        <clipPath id="a"><path fill="#fff" d="M0 0h60v60H0z" /></clipPath>
      </defs>
    </svg> `})),TL=a((()=>{oR(),EM=$O`<svg fill="none" viewBox="0 0 60 60">
      <g clip-path="url(#a)">
        <rect width="60" height="60" fill="#00ACE6" rx="30" />
        <circle cx="64" cy="39" r="50" fill="#1AC6FF" stroke="#fff" stroke-width="2" />
        <circle cx="78" cy="30" r="50" fill="#4DD2FF" stroke="#fff" stroke-width="2" />
        <circle cx="72" cy="15" r="35" fill="#80DFFF" stroke="#fff" stroke-width="2" />
        <circle cx="34" cy="-17" r="45" stroke="#fff" stroke-width="2" />
        <circle cx="34" cy="-5" r="50" stroke="#fff" stroke-width="2" />
        <circle cx="30" cy="45" r="4" fill="#4DD2FF" stroke="#fff" stroke-width="2" />
        <circle cx="39.5" cy="27.5" r="4" fill="#80DFFF" stroke="#fff" stroke-width="2" />
        <circle cx="16" cy="24" r="4" fill="#19C6FF" stroke="#fff" stroke-width="2" />
      </g>
      <rect width="59" height="59" x=".5" y=".5" stroke="#062B2B" stroke-opacity=".1" rx="29.5" />
      <defs>
        <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="30" /></clipPath>
      </defs>
    </svg>`})),OL=a((()=>{oR(),CM=$O`<svg fill="none" viewBox="0 0 60 60">
      <g clip-path="url(#a)">
        <rect width="60" height="60" fill="#C653C6" rx="3" />
        <path
          fill="#E87DE8"
          stroke="#fff"
          stroke-width="2"
          d="M52.1 47.34c0-4.24-1.44-9.55-5.9-12.4a2.86 2.86 0 0 0-1.6-3.89v-.82c0-1.19-.52-2.26-1.35-3a4.74 4.74 0 0 0-2.4-6.26v-5.5a11.31 11.31 0 1 0-22.63 0v2.15a3.34 3.34 0 0 0-1.18 5.05 4.74 4.74 0 0 0-.68 6.44A5.22 5.22 0 0 0 14 35.92c-3.06 4.13-6.1 8.3-6.1 15.64 0 2.67.37 4.86.74 6.39a20.3 20.3 0 0 0 .73 2.39l.02.04v.01l.92-.39-.92.4.26.6h38.26l.3-.49-.87-.51.86.5.02-.01.03-.07a16.32 16.32 0 0 0 .57-1.05c.36-.72.85-1.74 1.33-2.96a25.51 25.51 0 0 0 1.94-9.07Z"
        />
        <path
          fill="#fff"
          fill-rule="evenodd"
          d="M26.5 29.5c-3-.5-5.5-3-5.5-7v-7c0-.47 0-.7.03-.9a3 3 0 0 1 2.58-2.57c.2-.03.42-.03.89-.03 2 0 2.5-2.5 2.5-2.5s0 2.5 2.5 2.5c1.4 0 2.1 0 2.65.23a3 3 0 0 1 1.62 1.62c.23.55.23 1.25.23 2.65v6c0 4-3 7-6.5 7 1.35.23 4 0 6.5-2v9.53C34 38.5 31.5 40 28 40s-6-1.5-6-2.97L24 34l2.5 1.5v-6ZM26 47h4.5c2.5 0 3 4 3 5.5h-3l-1-1.5H26v-4Zm-6.25 5.5H24V57h-8c0-1 1-4.5 3.75-4.5Z"
          clip-rule="evenodd"
        />
      </g>
      <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" />
      <defs>
        <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="3" /></clipPath>
      </defs>
    </svg> `})),RL=a((()=>{oR(),kM=$O`<svg fill="none" viewBox="0 0 60 60">
      <rect width="60" height="60" fill="#794CFF" rx="3" />
      <path
        fill="#987DE8"
        stroke="#fff"
        stroke-width="2"
        d="M33 22.5v-1H16v5H8.5V36H13v-5h3v7.5h17V31h1v7.5h17v-17H34v5h-1v-4Z"
      />
      <path fill="#fff" d="M37.5 25h10v10h-10z" />
      <path fill="#4019B2" d="M42.5 25h5v10h-5z" />
      <path fill="#fff" d="M19.5 25h10v10h-10z" />
      <path fill="#4019B2" d="M24.5 25h5v10h-5z" />
      <path fill="#fff" d="M12 30.5h4V37h-4v-6.5Z" />
      <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" />
    </svg>`})),NL=a((()=>{oR(),PM=$O`<svg
      viewBox="0 0 60 60"
      fill="none"
    >
      <g clip-path="url(#1)">
        <rect width="60" height="60" rx="30" fill="#00ACE6" />
        <path
          d="M59 73C59 89.0163 46.0163 102 30 102C13.9837 102 1 89.0163 1 73C1 56.9837 12 44 30 44C48 44 59 56.9837 59 73Z"
          fill="#1AC6FF"
          stroke="white"
          stroke-width="2"
        />
        <path
          d="M18.6904 19.9015C19.6264 15.3286 23.3466 11.8445 27.9708 11.2096C29.3231 11.024 30.6751 11.0238 32.0289 11.2096C36.6532 11.8445 40.3733 15.3286 41.3094 19.9015C41.4868 20.7681 41.6309 21.6509 41.7492 22.5271C41.8811 23.5041 41.8811 24.4944 41.7492 25.4715C41.6309 26.3476 41.4868 27.2304 41.3094 28.097C40.3733 32.6699 36.6532 36.154 32.0289 36.7889C30.6772 36.9744 29.3216 36.9743 27.9708 36.7889C23.3466 36.154 19.6264 32.6699 18.6904 28.097C18.513 27.2304 18.3689 26.3476 18.2506 25.4715C18.1186 24.4944 18.1186 23.5041 18.2506 22.5271C18.3689 21.6509 18.513 20.7681 18.6904 19.9015Z"
          fill="#1AC6FF"
          stroke="white"
          stroke-width="2"
        />
        <circle cx="24.5" cy="23.5" r="1.5" fill="white" />
        <circle cx="35.5" cy="23.5" r="1.5" fill="white" />
        <path
          d="M31 20L28 28H32"
          stroke="white"
          stroke-width="2"
          stroke-linecap="round"
          stroke-linejoin="round"
        />
      </g>
      <rect x="0.5" y="0.5" width="59" height="59" rx="29.5" stroke="white" stroke-opacity="0.1" />
      <defs>
        <clipPath id="1">
          <rect width="60" height="60" rx="30" fill="white" />
        </clipPath>
      </defs>
    </svg> `})),ML=a((()=>{oR(),IM=$O`<svg viewBox="0 0 60 60" fill="none">
      <g clip-path="url(#1)">
        <path
          d="M0 24.9C0 15.6485 0 11.0228 1.97053 7.56812C3.3015 5.23468 5.23468 3.3015 7.56812 1.97053C11.0228 0 15.6485 0 24.9 0H35.1C44.3514 0 48.9772 0 52.4319 1.97053C54.7653 3.3015 56.6985 5.23468 58.0295 7.56812C60 11.0228 60 15.6485 60 24.9V35.1C60 44.3514 60 48.9772 58.0295 52.4319C56.6985 54.7653 54.7653 56.6985 52.4319 58.0295C48.9772 60 44.3514 60 35.1 60H24.9C15.6485 60 11.0228 60 7.56812 58.0295C5.23468 56.6985 3.3015 54.7653 1.97053 52.4319C0 48.9772 0 44.3514 0 35.1V24.9Z"
          fill="#794CFF"
        />
        <path
          d="M0.5 24.9C0.5 20.2652 0.50047 16.8221 0.744315 14.105C0.987552 11.3946 1.46987 9.45504 2.40484 7.81585C3.69145 5.56019 5.56019 3.69145 7.81585 2.40484C9.45504 1.46987 11.3946 0.987552 14.105 0.744315C16.8221 0.50047 20.2652 0.5 24.9 0.5H35.1C39.7348 0.5 43.1779 0.50047 45.895 0.744315C48.6054 0.987552 50.545 1.46987 52.1841 2.40484C54.4398 3.69145 56.3086 5.56019 57.5952 7.81585C58.5301 9.45504 59.0124 11.3946 59.2557 14.105C59.4995 16.8221 59.5 20.2652 59.5 24.9V35.1C59.5 39.7348 59.4995 43.1779 59.2557 45.895C59.0124 48.6054 58.5301 50.545 57.5952 52.1841C56.3086 54.4398 54.4398 56.3086 52.1841 57.5952C50.545 58.5301 48.6054 59.0124 45.895 59.2557C43.1779 59.4995 39.7348 59.5 35.1 59.5H24.9C20.2652 59.5 16.8221 59.4995 14.105 59.2557C11.3946 59.0124 9.45504 58.5301 7.81585 57.5952C5.56019 56.3086 3.69145 54.4398 2.40484 52.1841C1.46987 50.545 0.987552 48.6054 0.744315 45.895C0.50047 43.1779 0.5 39.7348 0.5 35.1V24.9Z"
          stroke="#062B2B"
          stroke-opacity="0.1"
        />
        <path
          d="M35.1403 31.5016C35.1193 30.9637 35.388 30.4558 35.8446 30.1707C36.1207 29.9982 36.4761 29.8473 36.7921 29.7685C37.3143 29.6382 37.8664 29.7977 38.2386 30.1864C38.8507 30.8257 39.3004 31.6836 39.8033 32.408C40.2796 33.0942 41.4695 33.2512 41.9687 32.5047C42.4839 31.7341 42.9405 30.8229 43.572 30.1399C43.9375 29.7447 44.4866 29.5756 45.0111 29.6967C45.3283 29.7701 45.6863 29.9147 45.9655 30.0823C46.4269 30.3595 46.7045 30.8626 46.6928 31.4008C46.6731 32.3083 46.3764 33.2571 46.2158 34.1473C46.061 35.0048 46.9045 35.8337 47.7592 35.664C48.6464 35.4878 49.5899 35.1747 50.497 35.1391C51.0348 35.1181 51.5427 35.3868 51.8279 35.8433C52.0004 36.1195 52.1513 36.4749 52.2301 36.7908C52.3604 37.3131 52.2009 37.8651 51.8121 38.2374C51.1729 38.8495 50.3151 39.2991 49.5908 39.8019C48.9046 40.2782 48.7473 41.4683 49.4939 41.9675C50.2644 42.4827 51.1757 42.9393 51.8587 43.5708C52.2539 43.9362 52.423 44.4854 52.3018 45.0099C52.2285 45.3271 52.0839 45.6851 51.9162 45.9642C51.6391 46.4257 51.1359 46.7032 50.5978 46.6916C49.6903 46.6719 48.7417 46.3753 47.8516 46.2146C46.9939 46.0598 46.1648 46.9035 46.3346 47.7583C46.5108 48.6454 46.8239 49.5888 46.8594 50.4958C46.8805 51.0336 46.6117 51.5415 46.1552 51.8267C45.879 51.9992 45.5236 52.15 45.2077 52.2289C44.6854 52.3592 44.1334 52.1997 43.7611 51.8109C43.1491 51.1718 42.6996 50.314 42.1968 49.5897C41.7203 48.9034 40.5301 48.7463 40.0309 49.493C39.5157 50.2634 39.0592 51.1746 38.4278 51.8574C38.0623 52.2527 37.5132 52.4218 36.9887 52.3006C36.6715 52.2273 36.3135 52.0826 36.0343 51.915C35.5729 51.6379 35.2953 51.1347 35.307 50.5966C35.3267 49.6891 35.6233 48.7405 35.7839 47.8505C35.9388 46.9928 35.0951 46.1636 34.2402 46.3334C33.3531 46.5096 32.4098 46.8227 31.5028 46.8582C30.9649 46.8793 30.457 46.6105 30.1719 46.154C29.9994 45.8778 29.8485 45.5224 29.7697 45.2065C29.6394 44.6842 29.7989 44.1322 30.1877 43.7599C30.8269 43.1479 31.6847 42.6982 32.4091 42.1954C33.0954 41.7189 33.2522 40.5289 32.5056 40.0297C31.7351 39.5145 30.824 39.058 30.1411 38.4265C29.7459 38.0611 29.5768 37.5119 29.698 36.9875C29.7713 36.6702 29.9159 36.3122 30.0836 36.0331C30.3607 35.5717 30.8638 35.2941 31.402 35.3058C32.3095 35.3255 33.2583 35.6221 34.1485 35.7828C35.006 35.9376 35.8349 35.094 35.6652 34.2393C35.489 33.3521 35.1759 32.4087 35.1403 31.5016Z"
          fill="#906EF7"
          stroke="white"
          stroke-width="2"
        />
        <path
          d="M20.7706 8.22357C20.9036 7.51411 21.5231 7 22.2449 7H23.7551C24.4769 7 25.0964 7.51411 25.2294 8.22357C25.5051 9.69403 25.4829 11.6321 27.1202 12.2606C27.3092 12.3331 27.4958 12.4105 27.6798 12.4926C29.2818 13.2072 30.6374 11.8199 31.8721 10.9752C32.4678 10.5676 33.2694 10.6421 33.7798 11.1525L34.8477 12.2204C35.3581 12.7308 35.4326 13.5323 35.025 14.128C34.1802 15.3627 32.7931 16.7183 33.5077 18.3202C33.5898 18.5043 33.6672 18.6909 33.7398 18.88C34.3683 20.5171 36.3061 20.4949 37.7764 20.7706C38.4859 20.9036 39 21.5231 39 22.2449V23.7551C39 24.4769 38.4859 25.0964 37.7764 25.2294C36.3061 25.5051 34.3685 25.483 33.7401 27.1201C33.6675 27.3093 33.59 27.4961 33.5079 27.6803C32.7934 29.282 34.1803 30.6374 35.025 31.8719C35.4326 32.4677 35.3581 33.2692 34.8477 33.7796L33.7798 34.8475C33.2694 35.3579 32.4678 35.4324 31.8721 35.0248C30.6376 34.1801 29.2823 32.7934 27.6806 33.508C27.4962 33.5903 27.3093 33.6678 27.12 33.7405C25.483 34.3688 25.5051 36.3062 25.2294 37.7764C25.0964 38.4859 24.4769 39 23.7551 39H22.2449C21.5231 39 20.9036 38.4859 20.7706 37.7764C20.4949 36.3062 20.517 34.3688 18.88 33.7405C18.6908 33.6678 18.5039 33.5903 18.3196 33.5081C16.7179 32.7936 15.3625 34.1804 14.1279 35.0251C13.5322 35.4327 12.7307 35.3582 12.2203 34.8478L11.1524 33.7799C10.642 33.2695 10.5675 32.4679 10.9751 31.8722C11.8198 30.6376 13.2067 29.2822 12.4922 27.6804C12.41 27.4962 12.3325 27.3093 12.2599 27.1201C11.6315 25.483 9.69392 25.5051 8.22357 25.2294C7.51411 25.0964 7 24.4769 7 23.7551V22.2449C7 21.5231 7.51411 20.9036 8.22357 20.7706C9.69394 20.4949 11.6317 20.5171 12.2602 18.88C12.3328 18.6909 12.4103 18.5042 12.4924 18.3201C13.207 16.7181 11.8198 15.3625 10.975 14.1278C10.5674 13.5321 10.6419 12.7305 11.1523 12.2201L12.2202 11.1522C12.7306 10.6418 13.5322 10.5673 14.1279 10.9749C15.3626 11.8197 16.7184 13.2071 18.3204 12.4925C18.5044 12.4105 18.6909 12.3331 18.8799 12.2606C20.5171 11.6321 20.4949 9.69403 20.7706 8.22357Z"
          fill="#906EF7"
          stroke="white"
          stroke-width="2"
        />
        <circle cx="23" cy="23" r="6" fill="#794CFF" stroke="white" stroke-width="2" />
        <circle cx="41" cy="41" r="4" fill="#794CFF" stroke="white" stroke-width="2" />
      </g>
      <defs>
        <clipPath id="1">
          <rect width="60" height="60" fill="white" />
        </clipPath>
      </defs>
    </svg> `})),$L=a((()=>{oR(),SM=$O`<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none">
      <g clip-path="url(#clip0_187_29)">
        <path d="M1.18187e-05 15.8055C1.18187e-05 9.8015 -5.19442e-07 6.91338 1.69991e-08 0C4.5 3.72236e-05 9.62249 0 16.5 0L23.5 4.31399e-05C29.9349 4.31399e-05 35.5 0.000206332 40 3.73468e-05C40 2.77754 40 9.36708 40 15.8055V22.8364C40 29.2647 40 33.7962 40 40C31.5 40 29.8337 40 23.4 40H16.6C10.5092 40 6.50004 40 4.04289e-05 40C3.05176e-05 32.2453 1.18187e-05 29.6382 1.18187e-05 22.8364V15.8055Z" fill="#0052FF"/>
        <path d="M20.0236 26.5C16.4342 26.5 13.5236 23.5931 13.5236 20C13.5236 16.4069 16.4342 13.5 20.0236 13.5C23.2411 13.5 25.9134 15.8472 26.4261 18.9167H32.9731C32.4206 12.2433 26.8342 7 20.02 7C12.8411 7 7.02002 12.8211 7.02002 20C7.02002 27.1789 12.8411 33 20.02 33C26.8342 33 32.4206 27.7567 32.9731 21.0833H26.4225C25.9061 24.1528 23.2411 26.5 20.0236 26.5Z" fill="white"/>
      </g>
      <defs>
        <clipPath id="clip0_187_29">
          <rect width="40" height="40" fill="white"/>
        </clipPath>
      </defs>
    </svg>`})),jL=a((()=>{oR(),AM=$O`
      <svg width="40" height="40" fill="none" xmlns="http://www.w3.org/2000/svg">
        <g clip-path="url(#a)">
          <path
            d="M0 16.6c0-6.168 0-9.251 1.314-11.555a10 10 0 0 1 3.731-3.731C7.35 0 10.432 0 16.6 0h6.8c6.168 0 9.252 0 11.555 1.314a10 10 0 0 1 3.731 3.731C40 7.35 40 10.432 40 16.6v6.8c0 6.168 0 9.252-1.314 11.555a10 10 0 0 1-3.731 3.731C32.652 40 29.568 40 23.4 40h-6.8c-6.168 0-9.251 0-11.555-1.314a10 10 0 0 1-3.731-3.731C0 32.652 0 29.568 0 23.4v-6.8Z"
            fill="#7D00FF"
          />
          <path
            d="M.5 16.6c0-3.093 0-5.38.162-7.182.161-1.795.48-3.061 1.086-4.125a9.5 9.5 0 0 1 3.545-3.545C6.357 1.141 7.623.823 9.418.662 11.221.5 13.508.5 16.6.5h6.8c3.093 0 5.38 0 7.182.162 1.795.161 3.062.48 4.125 1.086a9.5 9.5 0 0 1 3.545 3.545c.607 1.064.925 2.33 1.086 4.125.161 1.803.162 4.09.162 7.182v6.8c0 3.093 0 5.38-.162 7.182-.161 1.795-.48 3.062-1.086 4.125a9.5 9.5 0 0 1-3.545 3.545c-1.063.607-2.33.925-4.125 1.086-1.803.161-4.09.162-7.182.162h-6.8c-3.093 0-5.38 0-7.182-.162-1.795-.161-3.061-.48-4.125-1.086a9.5 9.5 0 0 1-3.545-3.545c-.607-1.063-.925-2.33-1.086-4.125C.5 28.779.5 26.492.5 23.4v-6.8Z"
            stroke="#fff"
            stroke-opacity=".05"
          />
          <path
            d="M28.306 15.381a3.69 3.69 0 1 0 0-7.381 3.69 3.69 0 0 0 0 7.381ZM16.987 32a8.991 8.991 0 1 1 .016-17.983A8.991 8.991 0 0 1 16.988 32Z"
            fill="#fff"
          />
        </g>
        <defs>
          <clipPath id="a"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
        </defs>
      </svg>
    `})),LL=a((()=>{oR(),TM=$O`
      <svg width="40" height="40" fill="none" xmlns="http://www.w3.org/2000/svg">
        <g clip-path="url(#a)">
          <path
            d="M0 16.6c0-6.168 0-9.251 1.314-11.555a10 10 0 0 1 3.731-3.731C7.35 0 10.432 0 16.6 0h6.8c6.168 0 9.252 0 11.555 1.314a10 10 0 0 1 3.731 3.731C40 7.35 40 10.432 40 16.6v6.8c0 6.168 0 9.252-1.314 11.555a10 10 0 0 1-3.731 3.731C32.652 40 29.568 40 23.4 40h-6.8c-6.168 0-9.251 0-11.555-1.314a10 10 0 0 1-3.731-3.731C0 32.652 0 29.568 0 23.4v-6.8Z"
            fill="#635BFF"
          />
          <path
            d="M.5 16.6c0-3.093 0-5.38.162-7.182.161-1.795.48-3.061 1.086-4.125a9.5 9.5 0 0 1 3.545-3.545C6.357 1.141 7.623.823 9.418.662 11.221.5 13.508.5 16.6.5h6.8c3.093 0 5.38 0 7.182.162 1.795.161 3.062.48 4.125 1.086a9.5 9.5 0 0 1 3.545 3.545c.607 1.064.925 2.33 1.086 4.125.161 1.803.162 4.09.162 7.182v6.8c0 3.093 0 5.38-.162 7.182-.161 1.795-.48 3.062-1.086 4.125a9.5 9.5 0 0 1-3.545 3.545c-1.063.607-2.33.925-4.125 1.086-1.803.161-4.09.162-7.182.162h-6.8c-3.093 0-5.38 0-7.182-.162-1.795-.161-3.061-.48-4.125-1.086a9.5 9.5 0 0 1-3.545-3.545c-.607-1.063-.925-2.33-1.086-4.125C.5 28.779.5 26.492.5 23.4v-6.8Z"
            stroke="#fff"
            stroke-opacity=".05"
          />
          <path
            fill-rule="evenodd"
            clip-rule="evenodd"
            d="M18.299 15.147c0-1.028.844-1.424 2.242-1.424 2.004 0 4.536.607 6.54 1.688V9.213C24.892 8.343 22.73 8 20.541 8c-5.354 0-8.915 2.796-8.915 7.464 0 7.279 10.022 6.118 10.022 9.257 0 1.213-1.055 1.609-2.531 1.609-2.19 0-4.985-.897-7.2-2.11v6.277a18.283 18.283 0 0 0 7.2 1.503c5.485 0 9.257-2.716 9.257-7.437-.027-7.86-10.075-6.462-10.075-9.416Z"
            fill="#fff"
          />
        </g>
        <defs>
          <clipPath id="a"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
        </defs>
      </svg>
    `})),BL=a((()=>{oR(),OM=$O`
      <svg width="40" height="40" fill="none" xmlns="http://www.w3.org/2000/svg">
        <g clip-path="url(#a)">
          <path
            d="M0 16.6c0-6.168 0-9.251 1.314-11.555a10 10 0 0 1 3.731-3.731C7.35 0 10.432 0 16.6 0h6.8c6.168 0 9.252 0 11.555 1.314a10 10 0 0 1 3.731 3.731C40 7.35 40 10.432 40 16.6v6.8c0 6.168 0 9.252-1.314 11.555a10 10 0 0 1-3.731 3.731C32.652 40 29.568 40 23.4 40h-6.8c-6.168 0-9.251 0-11.555-1.314a10 10 0 0 1-3.731-3.731C0 32.652 0 29.568 0 23.4v-6.8Z"
            fill="#fff"
          />
          <path
            d="M.5 16.6c0-3.093 0-5.38.162-7.182.161-1.795.48-3.061 1.086-4.125a9.5 9.5 0 0 1 3.545-3.545C6.357 1.141 7.623.823 9.418.662 11.221.5 13.508.5 16.6.5h6.8c3.093 0 5.38 0 7.182.162 1.795.161 3.062.48 4.125 1.086a9.5 9.5 0 0 1 3.545 3.545c.607 1.064.925 2.33 1.086 4.125.161 1.803.162 4.09.162 7.182v6.8c0 3.093 0 5.38-.162 7.182-.161 1.795-.48 3.062-1.086 4.125a9.5 9.5 0 0 1-3.545 3.545c-1.063.607-2.33.925-4.125 1.086-1.803.161-4.09.162-7.182.162h-6.8c-3.093 0-5.38 0-7.182-.162-1.795-.161-3.061-.48-4.125-1.086a9.5 9.5 0 0 1-3.545-3.545c-.607-1.063-.925-2.33-1.086-4.125C.5 28.779.5 26.492.5 23.4v-6.8Z"
            stroke="#fff"
            stroke-opacity=".05"
          />
          <path
            d="M18.606 12.642a.781.781 0 0 0-.771.66l-1.281 8.125a.78.78 0 0 1 .77-.66h3.755a7.668 7.668 0 0 0 7.57-6.49 6.26 6.26 0 0 0 .075-.843c-.96-.504-2.089-.792-3.325-.792h-6.793Z"
            fill="#001C64"
          />
          <path
            d="M28.724 13.434c-.006.282-.03.564-.075.843a7.668 7.668 0 0 1-7.57 6.491h-3.754a.78.78 0 0 0-.771.66l-1.916 12.15a.634.634 0 0 0 .626.734h4.075a.781.781 0 0 0 .77-.66l1.074-6.807a.781.781 0 0 1 .772-.66h2.4a7.668 7.668 0 0 0 7.57-6.491c.415-2.651-.92-5.064-3.201-6.26Z"
            fill="#0070E0"
          />
          <path
            d="M13.977 7.226a.78.78 0 0 0-.771.658l-3.198 20.277a.634.634 0 0 0 .626.733h4.742l1.178-7.467 1.281-8.125a.782.782 0 0 1 .771-.66H25.4c1.237 0 2.364.289 3.325.792.065-3.4-2.74-6.208-6.599-6.208h-8.148Z"
            fill="#003087"
          />
        </g>
        <defs>
          <clipPath id="a"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
        </defs>
      </svg>
    `})),DL=a((()=>{oR(),RM=$O`<svg width="60" height="60" viewBox="0 0 60 60" fill="none">
    <g clip-path="url(#clip0_13859_31161)">
      <path d="M0 24.8995C0 15.6481 0 11.0223 1.97053 7.56763C3.3015 5.2342 5.23468 3.30101 7.56812 1.97004C11.0228 -0.000488281 15.6485 -0.000488281 24.9 -0.000488281H35.1C44.3514 -0.000488281 48.9772 -0.000488281 52.4319 1.97004C54.7653 3.30101 56.6985 5.2342 58.0295 7.56763C60 11.0223 60 15.6481 60 24.8995V35.0995C60 44.351 60 48.9767 58.0295 52.4314C56.6985 54.7648 54.7653 56.698 52.4319 58.029C48.9772 59.9995 44.3514 59.9995 35.1 59.9995H24.9C15.6485 59.9995 11.0228 59.9995 7.56812 58.029C5.23468 56.698 3.3015 54.7648 1.97053 52.4314C0 48.9767 0 44.351 0 35.0995V24.8995Z" fill="#EB8B47"/>
      <path d="M0.5 24.8995C0.5 20.2647 0.50047 16.8216 0.744315 14.1045C0.987552 11.3941 1.46987 9.45455 2.40484 7.81536C3.69145 5.55971 5.56019 3.69096 7.81585 2.40435C9.45504 1.46938 11.3946 0.987064 14.105 0.743826C16.8221 0.499981 20.2652 0.499512 24.9 0.499512H35.1C39.7348 0.499512 43.1779 0.499981 45.895 0.743826C48.6054 0.987064 50.545 1.46938 52.1841 2.40435C54.4398 3.69096 56.3086 5.55971 57.5952 7.81536C58.5301 9.45455 59.0124 11.3941 59.2557 14.1045C59.4995 16.8216 59.5 20.2647 59.5 24.8995V35.0995C59.5 39.7343 59.4995 43.1774 59.2557 45.8945C59.0124 48.6049 58.5301 50.5445 57.5952 52.1837C56.3086 54.4393 54.4398 56.3081 52.1841 57.5947C50.545 58.5296 48.6054 59.012 45.895 59.2552C43.1779 59.499 39.7348 59.4995 35.1 59.4995H24.9C20.2652 59.4995 16.8221 59.499 14.105 59.2552C11.3946 59.012 9.45504 58.5296 7.81585 57.5947C5.56019 56.3081 3.69145 54.4393 2.40484 52.1837C1.46987 50.5445 0.987552 48.6049 0.744315 45.8945C0.50047 43.1774 0.5 39.7343 0.5 35.0995V24.8995Z" stroke="#141414" stroke-opacity="0.1"/>
      <path d="M13 26.0335C13 21.7838 13 19.659 14.0822 18.1694C14.4318 17.6883 14.8548 17.2653 15.3359 16.9157C16.8255 15.8335 18.9503 15.8335 23.2 15.8335H36.8C41.0497 15.8335 43.1745 15.8335 44.6641 16.9157C45.1452 17.2653 45.5682 17.6883 45.9178 18.1694C47 19.659 47 21.7838 47 26.0335V33.9668C47 38.2165 47 40.3414 45.9178 41.831C45.5682 42.312 45.1452 42.7351 44.6641 43.0846C43.1745 44.1668 41.0497 44.1668 36.8 44.1668H23.2C18.9503 44.1668 16.8255 44.1668 15.3359 43.0846C14.8548 42.7351 14.4318 42.312 14.0822 41.831C13 40.3414 13 38.2165 13 33.9668V26.0335Z" fill="#FF974C" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
      <path d="M39.5 36.667H36.6666" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
      <path d="M45.2 23.0645H14.8C14.0501 23.0645 13.6751 23.0645 13.4122 23.2554C13.3273 23.3171 13.2527 23.3918 13.191 23.4767C13 23.7395 13 24.1145 13 24.8645V27.2645C13 28.0144 13 28.3894 13.191 28.6522C13.2527 28.7371 13.3273 28.8118 13.4122 28.8735C13.6751 29.0645 14.0501 29.0645 14.8 29.0645H45.2C45.9499 29.0645 46.3249 29.0645 46.5878 28.8735C46.6727 28.8118 46.7473 28.7371 46.809 28.6522C47 28.3894 47 28.0144 47 27.2645V24.8645C47 24.1145 47 23.7395 46.809 23.4767C46.7473 23.3918 46.6727 23.3171 46.5878 23.2554C46.3249 23.0645 45.9499 23.0645 45.2 23.0645Z" fill="white" fill-opacity="0.4" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
    </g>
    <defs>
      <clipPath id="clip0_13859_31161">
        <rect width="60" height="60" fill="white"/>
      </clipPath>
    </defs>
    </svg>`})),UL=a((()=>{oR(),NM=$O`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
      <rect width="64" height="64" rx="30" fill="#1DC956"/>
      <rect x="0.5" y="0.5" width="63" height="63" rx="29.5" stroke="#141414" stroke-opacity="0.1"/>
      <path d="M32.4053 19.8031C35.3901 19.8031 38.0431 20.8349 40.1619 22.8247L45.9656 17.0211C42.4465 13.7416 37.8773 11.7333 32.4053 11.7333C24.4829 11.7333 17.6475 16.2841 14.3127 22.9168L21.056 28.1493C22.6589 23.359 27.136 19.8031 32.4053 19.8031Z" fill="#1DC956" stroke="white" stroke-width="2" stroke-linejoin="round"/>
      <path d="M32.4053 52.2667C37.8773 52.2667 42.465 50.4611 45.8182 47.3658L39.2407 42.2623C37.4351 43.4783 35.1321 44.2153 32.4053 44.2153C27.136 44.2153 22.6589 40.6594 21.056 35.8691L14.3127 41.1016C17.6475 47.7159 24.4829 52.2667 32.4053 52.2667Z" fill="#2BEE6C"/>
      <path d="M21.056 35.8507L19.5636 36.993L14.3127 41.0832M39.2407 42.2623L45.8182 47.3658C42.465 50.4611 37.8773 52.2667 32.4053 52.2667C24.4829 52.2667 17.6475 47.7159 14.3127 41.1016L21.056 35.8691C22.6589 40.6594 27.136 44.2153 32.4053 44.2153C35.1321 44.2153 37.4351 43.4783 39.2407 42.2623Z" stroke="white" stroke-width="2" stroke-linejoin="round"/>
      <path d="M51.8613 32.4606C51.8613 31.0235 51.7323 29.6417 51.4928 28.3151H32.4053V36.1638H43.3124C42.8334 38.688 41.3963 40.8252 39.2407 42.2623L45.8181 47.3658C49.6503 43.8283 51.8613 38.6327 51.8613 32.4606Z" fill="#1FAD7E" stroke="white" stroke-width="2" stroke-linejoin="round"/>
      <path d="M21.056 35.8507C20.6507 34.6347 20.4111 33.345 20.4111 32C20.4111 30.655 20.6507 29.3653 21.056 28.1493L14.3127 22.9169C12.9309 25.6437 12.1387 28.7205 12.1387 32C12.1387 35.2795 12.9309 38.3564 14.3127 41.0831L19.5636 36.993L21.056 35.8507Z" fill="#86F999"/>
      <path d="M21.056 35.8691L14.3127 41.1016M21.056 35.8507C20.6507 34.6347 20.4111 33.345 20.4111 32C20.4111 30.655 20.6507 29.3653 21.056 28.1493L14.3127 22.9169C12.9309 25.6437 12.1387 28.7205 12.1387 32C12.1387 35.2795 12.9309 38.3564 14.3127 41.0831L19.5636 36.993L21.056 35.8507Z" stroke="white" stroke-width="2" stroke-linejoin="round"/>
    </svg>
    `})),FL=a((()=>{oR(),MM=$O`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
      <g clip-path="url(#clip0_241_31635)">
        <path d="M0 26.5595C0 16.6913 0 11.7572 2.1019 8.07217C3.5216 5.58317 5.58366 3.52111 8.07266 2.10141C11.7577 -0.000488281 16.6918 -0.000488281 26.56 -0.000488281H37.44C47.3082 -0.000488281 52.2423 -0.000488281 55.9273 2.10141C58.4163 3.52111 60.4784 5.58317 61.8981 8.07217C64 11.7572 64 16.6913 64 26.5595V37.4395C64 47.3077 64 52.2418 61.8981 55.9268C60.4784 58.4158 58.4163 60.4779 55.9273 61.8976C52.2423 63.9995 47.3082 63.9995 37.44 63.9995H26.56C16.6918 63.9995 11.7577 63.9995 8.07266 61.8976C5.58366 60.4779 3.5216 58.4158 2.1019 55.9268C0 52.2418 0 47.3077 0 37.4395V26.5595Z" fill="#EB8B47"/>
        <path d="M0.5 26.5595C0.5 21.6163 0.50047 17.942 0.760736 15.0418C1.02039 12.1485 1.53555 10.0742 2.53621 8.3199C3.91155 5.90869 5.90917 3.91106 8.32039 2.53572C10.0747 1.53506 12.1489 1.01991 15.0423 0.760247C17.9425 0.499981 21.6168 0.499512 26.56 0.499512H37.44C42.3832 0.499512 46.0575 0.499981 48.9577 0.760247C51.8511 1.01991 53.9253 1.53506 55.6796 2.53572C58.0908 3.91106 60.0885 5.90869 61.4638 8.3199C62.4645 10.0742 62.9796 12.1485 63.2393 15.0418C63.4995 17.942 63.5 21.6163 63.5 26.5595V37.4395C63.5 42.3827 63.4995 46.057 63.2393 48.9572C62.9796 51.8506 62.4645 53.9248 61.4638 55.6791C60.0885 58.0903 58.0908 60.088 55.6796 61.4633C53.9253 62.464 51.8511 62.9791 48.9577 63.2388C46.0575 63.499 42.3832 63.4995 37.44 63.4995H26.56C21.6168 63.4995 17.9425 63.499 15.0423 63.2388C12.1489 62.9791 10.0747 62.464 8.32039 61.4633C5.90917 60.088 3.91155 58.0903 2.53621 55.6791C1.53555 53.9248 1.02039 51.8506 0.760736 48.9572C0.50047 46.057 0.5 42.3827 0.5 37.4395V26.5595Z" stroke="#141414" stroke-opacity="0.1"/>
        <path d="M28.1042 49.2329L13.1024 51.2077L15.0772 36.2059L37.1015 14.1815C39.2441 12.039 40.3154 10.9677 41.5718 10.624C42.4205 10.3918 43.3159 10.3918 44.1645 10.624C45.421 10.9677 46.4922 12.039 48.6348 14.1815L50.1286 15.6753C52.2711 17.8179 53.3424 18.8891 53.6861 20.1456C53.9183 20.9942 53.9183 21.8896 53.6861 22.7383C53.3424 23.9947 52.2711 25.066 50.1286 27.2086L28.1042 49.2329Z" fill="#FF974C" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
        <path d="M38.5962 20.5376L22.4199 36.7139" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
        <path d="M43.7727 25.714L27.5964 41.8903" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
        <path d="M22.3703 36.7635C19.3258 39.808 16.0198 36.6395 16.2616 35.0324" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
        <path d="M27.5466 41.9399C24.5034 44.9831 28.155 48.7098 29.2738 48.0475" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
        <path d="M27.5468 41.9398C23.428 46.0586 18.2516 40.8822 22.3704 36.7634" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
        <path d="M15.8191 50.5214C15.4711 49.5823 14.728 48.8392 13.7889 48.4912" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
        <path d="M49.2862 29.5805L34.7275 15.0219" stroke="#E4E7E7" stroke-width="2" stroke-linejoin="round"/>
      </g>
      <defs>
        <clipPath id="clip0_241_31635">
          <rect width="64" height="64" fill="white"/>
        </clipPath>
      </defs>
    </svg>
    `})),HL=a((()=>{oR(),$M=$O`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
      <g clip-path="url(#clip0_241_31636)">
        <path d="M0 26.5595C0 16.6913 0 11.7572 2.1019 8.07217C3.5216 5.58318 5.58366 3.52111 8.07266 2.10141C11.7577 -0.000488281 16.6918 -0.000488281 26.56 -0.000488281H37.44C47.3082 -0.000488281 52.2423 -0.000488281 55.9273 2.10141C58.4163 3.52111 60.4784 5.58318 61.8981 8.07217C64 11.7572 64 16.6913 64 26.5595V37.4395C64 47.3077 64 52.2418 61.8981 55.9269C60.4784 58.4159 58.4163 60.4779 55.9273 61.8976C52.2423 63.9995 47.3082 63.9995 37.44 63.9995H26.56C16.6918 63.9995 11.7577 63.9995 8.07266 61.8976C5.58366 60.4779 3.5216 58.4159 2.1019 55.9269C0 52.2418 0 47.3077 0 37.4395V26.5595Z" fill="#794CFF"/>
        <path d="M0.5 26.5595C0.5 21.6163 0.50047 17.942 0.760736 15.0418C1.02039 12.1485 1.53555 10.0742 2.53621 8.3199C3.91155 5.90869 5.90917 3.91106 8.32039 2.53572C10.0747 1.53506 12.1489 1.01991 15.0423 0.760247C17.9425 0.499981 21.6168 0.499512 26.56 0.499512H37.44C42.3832 0.499512 46.0575 0.499981 48.9577 0.760247C51.8511 1.01991 53.9253 1.53506 55.6796 2.53572C58.0908 3.91106 60.0885 5.90869 61.4638 8.3199C62.4645 10.0742 62.9796 12.1485 63.2393 15.0418C63.4995 17.942 63.5 21.6163 63.5 26.5595V37.4395C63.5 42.3827 63.4995 46.057 63.2393 48.9572C62.9796 51.8506 62.4645 53.9248 61.4638 55.6791C60.0885 58.0903 58.0908 60.088 55.6796 61.4633C53.9253 62.464 51.8511 62.9791 48.9577 63.2388C46.0575 63.499 42.3832 63.4995 37.44 63.4995H26.56C21.6168 63.4995 17.9425 63.499 15.0423 63.2388C12.1489 62.9791 10.0747 62.464 8.32039 61.4633C5.90917 60.088 3.91155 58.0903 2.53621 55.6791C1.53555 53.9248 1.02039 51.8506 0.760736 48.9572C0.50047 46.057 0.5 42.3827 0.5 37.4395V26.5595Z" stroke="#141414" stroke-opacity="0.1"/>
        <path d="M40 39.4595C44.7824 36.693 48 31.5222 48 25.6C48 16.7634 40.8366 9.59998 32 9.59998C23.1634 9.59998 16 16.7634 16 25.6C16 31.5222 19.2176 36.693 24 39.4595V45.8144H40V39.4595Z" fill="#906EF7"/>
        <path d="M24 49.9689C24 51.8192 24 52.7444 24.3941 53.4353C24.6603 53.902 25.0469 54.2886 25.5136 54.5548C26.2046 54.9489 27.1297 54.9489 28.98 54.9489H35.02C36.8703 54.9489 37.7954 54.9489 38.4864 54.5548C38.9531 54.2886 39.3397 53.902 39.6059 53.4353C40 52.7444 40 51.8192 40 49.9689V45.8144H24V49.9689Z" fill="#906EF7"/>
        <path d="M24 45.8144V39.4595C19.2176 36.693 16 31.5222 16 25.6C16 16.7634 23.1634 9.59998 32 9.59998C40.8366 9.59998 48 16.7634 48 25.6C48 31.5222 44.7824 36.693 40 39.4595V45.8144M24 45.8144H40M24 45.8144V49.9689C24 51.8192 24 52.7444 24.3941 53.4353C24.6603 53.902 25.0469 54.2886 25.5136 54.5548C26.2046 54.9489 27.1297 54.9489 28.98 54.9489H35.02C36.8703 54.9489 37.7954 54.9489 38.4864 54.5548C38.9531 54.2886 39.3397 53.902 39.6059 53.4353C40 52.7444 40 51.8192 40 49.9689V45.8144" stroke="white" stroke-width="2" stroke-linejoin="round"/>
        <path d="M24 49.9689C24 51.8192 24 52.7444 24.3941 53.4353C24.6603 53.902 25.0469 54.2886 25.5136 54.5548C26.2046 54.9489 27.1297 54.9489 28.98 54.9489H35.02C36.8703 54.9489 37.7954 54.9489 38.4864 54.5548C38.9531 54.2886 39.3397 53.902 39.6059 53.4353C40 52.7444 40 51.8192 40 49.9689V45.8144H24V49.9689Z" fill="#643CDD" stroke="white" stroke-width="2" stroke-linejoin="round"/>
        <path d="M29.6735 26.9101V29.1109H34.0753V26.9101C34.0753 25.6945 35.0607 24.7092 36.2762 24.7092C37.4917 24.7092 38.4771 25.6945 38.4771 26.9101C38.4771 28.1256 37.4917 29.1109 36.2762 29.1109H34.0753H29.6735H27.4726C26.2571 29.1109 25.2717 28.1256 25.2717 26.9101C25.2717 25.6945 26.2571 24.7092 27.4726 24.7092C28.6881 24.7092 29.6735 25.6945 29.6735 26.9101Z" fill="#906EF7"/>
        <path d="M29.6735 45.3183V26.9101C29.6735 25.6945 28.6881 24.7092 27.4726 24.7092V24.7092C26.2571 24.7092 25.2717 25.6945 25.2717 26.9101V26.9101C25.2717 28.1256 26.2571 29.1109 27.4726 29.1109H36.2762C37.4917 29.1109 38.4771 28.1256 38.4771 26.9101V26.9101C38.4771 25.6945 37.4917 24.7092 36.2762 24.7092V24.7092C35.0607 24.7092 34.0753 25.6945 34.0753 26.9101V45.3183" stroke="white" stroke-width="2" stroke-linejoin="round"/>
      </g>
      <defs>
        <clipPath id="clip0_241_31636">
          <rect width="64" height="64" fill="white"/>
        </clipPath>
      </defs>
    </svg>
    `})),zL=a((()=>{oR(),jM=IT`
      :host {
        display: block;
        width: var(--local-size);
        height: var(--local-size);
      }
    
      :host svg {
        width: 100%;
        height: 100%;
      }
    `})),qL=a((()=>{oR(),G$(),xL(),EL(),CL(),kL(),PL(),IL(),SL(),AL(),TL(),OL(),RL(),NL(),ML(),yR(),ER(),$L(),jL(),LL(),BL(),DL(),UL(),FL(),HL(),zL(),LM=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},BM={browser:gM,dao:mM,defi:bM,defiAlt:yM,eth:wM,layers:vM,lock:_M,login:xM,network:EM,nft:CM,noun:kM,profile:PM,system:IM,coinbase:SM,onrampCard:RM,moonpay:AM,stripe:TM,paypal:OM,google:NM,pencil:MM,lightbulb:$M},DM=class extends QO{constructor(){super(...arguments),this.name="browser",this.size="md"}render(){return this.style.cssText=`\n           --local-size: var(--wui-visual-size-${this.size});\n       `,MO`${BM[this.name]}`}},DM.styles=[gR,jM],LM([IR()],DM.prototype,"name",void 0),LM([IR()],DM.prototype,"size",void 0),DM=LM([wR("wui-visual")],DM)})),WL=a((()=>{rR(),UM=e=>e??LO})),VL=a((()=>{WL()})),GL=a((()=>{FM={getSpacingStyles:(e,t)=>Array.isArray(e)?e[t]?`var(--wui-spacing-${e[t]})`:void 0:"string"==typeof e?`var(--wui-spacing-${e})`:void 0,getFormattedDate:e=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(e),getHostName:e=>new URL(e).hostname,getTruncateString:({string:e,charsStart:t,charsEnd:r,truncate:i})=>e.length<=t+r?e:"end"===i?`${e.substring(0,t)}...`:"start"===i?`...${e.substring(e.length-r)}`:`${e.substring(0,Math.floor(t))}...${e.substring(e.length-Math.floor(r))}`,generateAvatarColors(e){let t=e.toLowerCase().replace(/^0x/iu,"").substring(0,6),r=this.hexToRgb(t),i=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),n=100-3*Number(i?.replace("px","")),o=`${n}% ${n}% at 65% 40%`,a=[];for(let e=0;e<5;e+=1){let t=this.tintColor(r,.15*e);a.push(`rgb(${t[0]}, ${t[1]}, ${t[2]})`)}return`\n        --local-color-1: ${a[0]};\n        --local-color-2: ${a[1]};\n        --local-color-3: ${a[2]};\n        --local-color-4: ${a[3]};\n        --local-color-5: ${a[4]};\n        --local-radial-circle: ${o}\n       `},hexToRgb(e){let t=parseInt(e,16);return[t>>16&255,t>>8&255,255&t]},tintColor(e,t){let[r,i,n]=e;return[Math.round(r+(255-r)*t),Math.round(i+(255-i)*t),Math.round(n+(255-n)*t)]},isNumber:e=>/^[0-9]+$/u.test(e),getColorTheme:e=>e||(typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"dark"),splitBalance(e){let t=e.split(".");return 2===t.length?[t[0],t[1]]:["0","00"]},roundNumber:(e,t,r)=>Math.abs(e)>=t?Number(e.toFixed(r)):e,formatNumberToLocalString:(e,t=2)=>void 0===e?"0.00":"number"==typeof e?e.toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t}):parseFloat(e).toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t})}})),ZL=a((()=>{oR(),HM=IT`
      :host {
        display: flex;
        width: inherit;
        height: inherit;
      }
    `})),KL=a((()=>{oR(),G$(),yR(),GL(),ER(),ZL(),zM=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},(qM=class extends QO{render(){return this.style.cssText=`\n          flex-direction: ${this.flexDirection};\n          flex-wrap: ${this.flexWrap};\n          flex-basis: ${this.flexBasis};\n          flex-grow: ${this.flexGrow};\n          flex-shrink: ${this.flexShrink};\n          align-items: ${this.alignItems};\n          justify-content: ${this.justifyContent};\n          column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};\n          row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};\n          gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};\n          padding-top: ${this.padding&&FM.getSpacingStyles(this.padding,0)};\n          padding-right: ${this.padding&&FM.getSpacingStyles(this.padding,1)};\n          padding-bottom: ${this.padding&&FM.getSpacingStyles(this.padding,2)};\n          padding-left: ${this.padding&&FM.getSpacingStyles(this.padding,3)};\n          margin-top: ${this.margin&&FM.getSpacingStyles(this.margin,0)};\n          margin-right: ${this.margin&&FM.getSpacingStyles(this.margin,1)};\n          margin-bottom: ${this.margin&&FM.getSpacingStyles(this.margin,2)};\n          margin-left: ${this.margin&&FM.getSpacingStyles(this.margin,3)};\n        `,MO`<slot></slot>`}}).styles=[gR,HM],zM([IR()],qM.prototype,"flexDirection",void 0),zM([IR()],qM.prototype,"flexWrap",void 0),zM([IR()],qM.prototype,"flexBasis",void 0),zM([IR()],qM.prototype,"flexGrow",void 0),zM([IR()],qM.prototype,"flexShrink",void 0),zM([IR()],qM.prototype,"alignItems",void 0),zM([IR()],qM.prototype,"justifyContent",void 0),zM([IR()],qM.prototype,"columnGap",void 0),zM([IR()],qM.prototype,"rowGap",void 0),zM([IR()],qM.prototype,"gap",void 0),zM([IR()],qM.prototype,"padding",void 0),zM([IR()],qM.prototype,"margin",void 0),qM=zM([wR("wui-flex")],qM)})),YL=a((()=>{oR(),WM=IT`
      :host {
        display: block;
        width: var(--wui-icon-box-size-xl);
        height: var(--wui-icon-box-size-xl);
        border-radius: var(--wui-border-radius-3xl);
        box-shadow: 0 0 0 8px var(--wui-gray-glass-005);
        overflow: hidden;
        position: relative;
      }
    
      :host([data-variant='generated']) {
        --mixed-local-color-1: var(--local-color-1);
        --mixed-local-color-2: var(--local-color-2);
        --mixed-local-color-3: var(--local-color-3);
        --mixed-local-color-4: var(--local-color-4);
        --mixed-local-color-5: var(--local-color-5);
      }
    
      @supports (background: color-mix(in srgb, white 50%, black)) {
        :host([data-variant='generated']) {
          --mixed-local-color-1: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--local-color-1)
          );
          --mixed-local-color-2: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--local-color-2)
          );
          --mixed-local-color-3: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--local-color-3)
          );
          --mixed-local-color-4: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--local-color-4)
          );
          --mixed-local-color-5: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--local-color-5)
          );
        }
      }
    
      :host([data-variant='generated']) {
        box-shadow: 0 0 0 8px var(--wui-gray-glass-005);
        background: radial-gradient(
          var(--local-radial-circle),
          #fff 0.52%,
          var(--mixed-local-color-5) 31.25%,
          var(--mixed-local-color-3) 51.56%,
          var(--mixed-local-color-2) 65.63%,
          var(--mixed-local-color-1) 82.29%,
          var(--mixed-local-color-4) 100%
        );
      }
    
      :host([data-variant='default']) {
        box-shadow: 0 0 0 8px var(--wui-gray-glass-005);
        background: radial-gradient(
          75.29% 75.29% at 64.96% 24.36%,
          #fff 0.52%,
          #f5ccfc 31.25%,
          #dba4f5 51.56%,
          #9a8ee8 65.63%,
          #6493da 82.29%,
          #6ebdea 100%
        );
      }
    `})),JL=a((()=>{oR(),G$(),cL(),yR(),GL(),ER(),YL(),VM=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},GM=class extends QO{constructor(){super(...arguments),this.imageSrc=void 0,this.alt=void 0,this.address=void 0}render(){return MO`${this.visualTemplate()}`}visualTemplate(){if(this.imageSrc)return this.dataset.variant="image",MO`<wui-image src=${this.imageSrc} alt=${this.alt??"avatar"}></wui-image>`;if(this.address){this.dataset.variant="generated";let e=FM.generateAvatarColors(this.address);return this.style.cssText=e,null}return this.dataset.variant="default",null}},GM.styles=[gR,WM],VM([IR()],GM.prototype,"imageSrc",void 0),VM([IR()],GM.prototype,"alt",void 0),VM([IR()],GM.prototype,"address",void 0),GM=VM([wR("wui-avatar")],GM)})),QL=a((()=>{oR(),ZM=IT`
      :host {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        position: relative;
        overflow: hidden;
        background-color: var(--wui-gray-glass-020);
        border-radius: var(--local-border-radius);
        border: var(--local-border);
        box-sizing: content-box;
        width: var(--local-size);
        height: var(--local-size);
        min-height: var(--local-size);
        min-width: var(--local-size);
      }
    
      @supports (background: color-mix(in srgb, white 50%, black)) {
        :host {
          background-color: color-mix(in srgb, var(--local-bg-value) var(--local-bg-mix), transparent);
        }
      }
    `})),XL=a((()=>{oR(),G$(),aL(),yR(),ER(),QL(),KM=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},YM=class extends QO{constructor(){super(...arguments),this.size="md",this.backgroundColor="accent-100",this.iconColor="accent-100",this.background="transparent",this.border=!1,this.borderColor="wui-color-bg-125",this.icon="copy"}render(){let e=this.iconSize||this.size,t="lg"===this.size,r="xl"===this.size,i=t?"12%":"16%",n=t?"xxs":r?"s":"3xl",o="gray"===this.background,a="opaque"===this.background,s="accent-100"===this.backgroundColor&&a||"success-100"===this.backgroundColor&&a||"error-100"===this.backgroundColor&&a||"inverse-100"===this.backgroundColor&&a,c=`var(--wui-color-${this.backgroundColor})`;return s?c=`var(--wui-icon-box-bg-${this.backgroundColor})`:o&&(c=`var(--wui-gray-${this.backgroundColor})`),this.style.cssText=`\n           --local-bg-value: ${c};\n           --local-bg-mix: ${s||o?"100%":i};\n           --local-border-radius: var(--wui-border-radius-${n});\n           --local-size: var(--wui-icon-box-size-${this.size});\n           --local-border: ${"wui-color-bg-125"===this.borderColor?"2px":"1px"} solid ${this.border?`var(--${this.borderColor})`:"transparent"}\n       `,MO` <wui-icon color=${this.iconColor} size=${e} name=${this.icon}></wui-icon> `}},YM.styles=[gR,mR,ZM],KM([IR()],YM.prototype,"size",void 0),KM([IR()],YM.prototype,"backgroundColor",void 0),KM([IR()],YM.prototype,"iconColor",void 0),KM([IR()],YM.prototype,"iconSize",void 0),KM([IR()],YM.prototype,"background",void 0),KM([IR({type:Boolean})],YM.prototype,"border",void 0),KM([IR()],YM.prototype,"borderColor",void 0),KM([IR()],YM.prototype,"icon",void 0),YM=KM([wR("wui-icon-box")],YM)})),eB=a((()=>{oR(),JM=IT`
      :host {
        display: block;
      }
    
      button {
        border-radius: var(--wui-border-radius-3xl);
        background: var(--wui-gray-glass-002);
        display: flex;
        gap: var(--wui-spacing-xs);
        padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) var(--wui-spacing-3xs)
          var(--wui-spacing-xs);
        border: 1px solid var(--wui-gray-glass-005);
      }
    
      button:disabled {
        background: var(--wui-gray-glass-015);
      }
    
      button:disabled > wui-text {
        color: var(--wui-gray-glass-015);
      }
    
      button:disabled > wui-flex > wui-text {
        color: var(--wui-gray-glass-015);
      }
    
      button:disabled > wui-image,
      button:disabled > wui-icon-box,
      button:disabled > wui-flex > wui-avatar {
        filter: grayscale(1);
      }
    
      button:has(wui-image) {
        padding: var(--wui-spacing-3xs) var(--wui-spacing-3xs) var(--wui-spacing-3xs)
          var(--wui-spacing-xs);
      }
    
      wui-text {
        color: var(--wui-color-fg-100);
      }
    
      wui-flex > wui-text {
        color: var(--wui-color-fg-200);
      }
    
      wui-image,
      wui-icon-box {
        border-radius: var(--wui-border-radius-3xl);
        width: 24px;
        height: 24px;
        box-shadow: 0 0 0 2px var(--wui-gray-glass-005);
      }
    
      wui-flex {
        border-radius: var(--wui-border-radius-3xl);
        border: 1px solid var(--wui-gray-glass-005);
        background: var(--wui-gray-glass-005);
        padding: 4px var(--wui-spacing-m) 4px var(--wui-spacing-xxs);
      }
    
      button.local-no-balance {
        border-radius: 0px;
        border: none;
        background: transparent;
      }
    
      wui-avatar {
        width: 20px;
        height: 20px;
        box-shadow: 0 0 0 2px var(--wui-accent-glass-010);
      }
    
      @media (max-width: 500px) {
        button {
          gap: 0px;
          padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) !important;
          height: 32px;
        }
        wui-image,
        wui-icon-box,
        button > wui-text {
          visibility: hidden;
          width: 0px;
          height: 0px;
        }
        button {
          border-radius: 0px;
          border: none;
          background: transparent;
          padding: 0px;
        }
      }
    
      @media (hover: hover) and (pointer: fine) {
        button:hover:enabled > wui-flex > wui-text {
          color: var(--wui-color-fg-175);
        }
    
        button:active:enabled > wui-flex > wui-text {
          color: var(--wui-color-fg-175);
        }
      }
    `})),tB=a((()=>{oR(),G$(),VL(),cL(),_L(),KL(),yR(),GL(),ER(),JL(),XL(),eB(),QM=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},XM=class extends QO{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.balance=void 0,this.isUnsupportedChain=void 0,this.disabled=!1,this.isProfileName=!1,this.address="",this.profileName="",this.charsStart=4,this.charsEnd=6}render(){return MO`
          <button
            ?disabled=${this.disabled}
            class=${UM(this.balance?void 0:"local-no-balance")}
          >
            ${this.balanceTemplate()}
            <wui-flex gap="xxs" alignItems="center">
              <wui-avatar
                .imageSrc=${this.avatarSrc}
                alt=${this.address}
                address=${this.address}
              ></wui-avatar>
              <wui-text variant="paragraph-600" color="inherit">
                ${this.address?FM.getTruncateString({string:this.isProfileName?this.profileName:this.address,charsStart:this.isProfileName?18:this.charsStart,charsEnd:this.isProfileName?0:this.charsEnd,truncate:this.isProfileName?"end":"middle"}):null}
              </wui-text>
            </wui-flex>
          </button>
        `}balanceTemplate(){if(this.isUnsupportedChain)return MO` <wui-icon-box
              size="sm"
              iconColor="error-100"
              backgroundColor="error-100"
              icon="warningCircle"
            ></wui-icon-box>
            <wui-text variant="paragraph-600" color="inherit"> Switch Network</wui-text>`;if(this.balance){let e=this.networkSrc?MO`<wui-image src=${this.networkSrc}></wui-image>`:MO`
                <wui-icon-box
                  size="sm"
                  iconColor="fg-200"
                  backgroundColor="fg-300"
                  icon="networkPlaceholder"
                ></wui-icon-box>
              `;return MO`
            ${e}
            <wui-text variant="paragraph-600" color="inherit"> ${this.balance}</wui-text>
          `}return null}},XM.styles=[gR,mR,JM],QM([IR()],XM.prototype,"networkSrc",void 0),QM([IR()],XM.prototype,"avatarSrc",void 0),QM([IR()],XM.prototype,"balance",void 0),QM([IR({type:Boolean})],XM.prototype,"isUnsupportedChain",void 0),QM([IR({type:Boolean})],XM.prototype,"disabled",void 0),QM([IR({type:Boolean})],XM.prototype,"isProfileName",void 0),QM([IR()],XM.prototype,"address",void 0),QM([IR()],XM.prototype,"profileName",void 0),QM([IR()],XM.prototype,"charsStart",void 0),QM([IR()],XM.prototype,"charsEnd",void 0),XM=QM([wR("wui-account-button")],XM)})),rB=a((()=>{oR(),e$=IT`
      :host {
        position: relative;
        background-color: var(--wui-gray-glass-002);
        display: flex;
        justify-content: center;
        align-items: center;
        width: var(--local-size);
        height: var(--local-size);
        border-radius: inherit;
        border-radius: var(--local-border-radius);
      }
    
      :host > wui-flex {
        overflow: hidden;
        border-radius: inherit;
        border-radius: var(--local-border-radius);
      }
    
      :host::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: inherit;
        border: 1px solid var(--wui-gray-glass-010);
        pointer-events: none;
      }
    
      :host([name='Extension'])::after {
        border: 1px solid var(--wui-accent-glass-010);
      }
    
      :host([data-wallet-icon='allWallets']) {
        background-color: var(--wui-all-wallets-bg-100);
      }
    
      :host([data-wallet-icon='allWallets'])::after {
        border: 1px solid var(--wui-accent-glass-010);
      }
    
      wui-icon[data-parent-size='inherit'] {
        width: 75%;
        height: 75%;
        align-items: center;
      }
    
      wui-icon[data-parent-size='sm'] {
        width: 18px;
        height: 18px;
      }
    
      wui-icon[data-parent-size='md'] {
        width: 24px;
        height: 24px;
      }
    
      wui-icon[data-parent-size='lg'] {
        width: 42px;
        height: 42px;
      }
    
      wui-icon[data-parent-size='full'] {
        width: 100%;
        height: 100%;
      }
    
      :host > wui-icon-box {
        position: absolute;
        overflow: hidden;
        right: -1px;
        bottom: -2px;
        z-index: 1;
        border: 2px solid var(--wui-color-bg-base-150, #1e1f1f);
        padding: 1px;
      }
    `})),iB=a((()=>{oR(),G$(),aL(),cL(),yR(),ER(),XL(),rB(),t$=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},r$=class extends QO{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let e="xxs";return e="lg"===this.size?"m":"md"===this.size?"xs":"xxs",this.style.cssText=`\n           --local-border-radius: var(--wui-border-radius-${e});\n           --local-size: var(--wui-wallet-image-size-${this.size});\n       `,this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),MO`
          <wui-flex justifyContent="center" alignItems="center"> ${this.templateVisual()} </wui-flex>
        `}templateVisual(){return this.imageSrc?MO`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:this.walletIcon?MO`<wui-icon
            data-parent-size="md"
            size="md"
            color="inherit"
            name=${this.walletIcon}
          ></wui-icon>`:MO`<wui-icon
          data-parent-size=${this.size}
          size="inherit"
          color="inherit"
          name="walletPlaceholder"
        ></wui-icon>`}},r$.styles=[gR,e$],t$([IR()],r$.prototype,"size",void 0),t$([IR()],r$.prototype,"name",void 0),t$([IR()],r$.prototype,"imageSrc",void 0),t$([IR()],r$.prototype,"walletIcon",void 0),t$([IR({type:Boolean})],r$.prototype,"installed",void 0),t$([IR()],r$.prototype,"badgeSize",void 0),r$=t$([wR("wui-wallet-image")],r$)})),nB=a((()=>{oR(),i$=IT`
      :host {
        position: relative;
        border-radius: var(--wui-border-radius-xxs);
        width: 40px;
        height: 40px;
        overflow: hidden;
        background: var(--wui-gray-glass-002);
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: var(--wui-spacing-4xs);
        padding: 3.75px !important;
      }
    
      :host::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: inherit;
        border: 1px solid var(--wui-gray-glass-010);
        pointer-events: none;
      }
    
      :host > wui-wallet-image {
        width: 14px;
        height: 14px;
        border-radius: var(--wui-border-radius-5xs);
      }
    
      :host > wui-flex {
        padding: 2px;
        position: fixed;
        overflow: hidden;
        left: 34px;
        bottom: 8px;
        background: var(--dark-background-150, #1e1f1f);
        border-radius: 50%;
        z-index: 2;
        display: flex;
      }
    `})),oB=a((()=>{oR(),G$(),VL(),yR(),ER(),iB(),XL(),nB(),n$=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},4,o$=class extends QO{constructor(){super(...arguments),this.walletImages=[]}render(){let e=this.walletImages.length<4;return MO`${this.walletImages.slice(0,4).map((({src:e,walletName:t})=>MO`
                <wui-wallet-image
                  size="inherit"
                  imageSrc=${e}
                  name=${UM(t)}
                ></wui-wallet-image>
              `))}
          ${e?[...Array(4-this.walletImages.length)].map((()=>MO` <wui-wallet-image size="inherit" name=""></wui-wallet-image>`)):null}
          <wui-flex>
            <wui-icon-box
              size="xxs"
              iconSize="xxs"
              iconcolor="success-100"
              backgroundcolor="success-100"
              icon="checkmark"
              background="opaque"
            ></wui-icon-box>
          </wui-flex>`}},o$.styles=[gR,i$],n$([IR({type:Array})],o$.prototype,"walletImages",void 0),o$=n$([wR("wui-all-wallets-image")],o$)})),aB=a((()=>{oR(),a$=IT`
      :host {
        width: var(--local-width);
        position: relative;
      }
    
      button {
        border: 1px solid var(--wui-gray-glass-010);
        border-radius: var(--local-border-radius);
        width: var(--local-width);
        white-space: nowrap;
      }
    
      button:disabled {
        border: 1px solid var(--wui-gray-glass-010);
      }
    
      /* xs settings */
      button[data-size='xs'] {
        padding: var(--wui-spacing-xs) var(--wui-spacing-1xs);
      }
    
      button[data-size='xs'][data-icon-left='true'][data-icon-right='false'] {
        padding-left: var(--wui-spacing-xxs);
      }
    
      button[data-size='xs'][data-icon-right='true'][data-icon-left='false'] {
        padding-right: var(--wui-spacing-xxs);
      }
    
      /* sm settings */
      button[data-size='sm'] {
        padding: var(--wui-spacing-xxs) var(--wui-spacing-s);
      }
    
      button[data-size='sm'][data-icon-left='true'][data-icon-right='false'] {
        padding: var(--wui-spacing-xxs) var(--wui-spacing-s) var(--wui-spacing-xxs)
          var(--wui-spacing-xs);
      }
    
      button[data-size='sm'][data-icon-right='true'][data-icon-left='false'] {
        padding: var(--wui-spacing-xxs) var(--wui-spacing-xs) var(--wui-spacing-xxs)
          var(--wui-spacing-s);
      }
    
      /* md settings */
      button[data-size='md'] {
        padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-l);
      }
    
      button[data-size='md'][data-icon-left='true'][data-icon-right='false'] {
        padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-s);
      }
    
      button[data-size='md'][data-icon-right='true'][data-icon-left='false'] {
        padding: 8.2px var(--wui-spacing-s) 9px var(--wui-spacing-l);
      }
    
      /* lg settings */
      button[data-size='lg'] {
        padding: var(--wui-spacing-m) var(--wui-spacing-2l);
      }
    
      button[data-size='lg'][data-icon-left='true'][data-icon-right='false'] {
        padding-left: var(--wui-spacing-m);
      }
    
      button[data-size='lg'][data-icon-right='true'][data-icon-left='false'] {
        padding-right: var(--wui-spacing-m);
      }
    
      button > wui-text {
        transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
        will-change: opacity;
        opacity: var(--local-opacity-100);
      }
    
      ::slotted(*) {
        transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
        will-change: opacity;
        opacity: var(--local-opacity-100);
      }
    
      wui-loading-spinner {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        opacity: var(--local-opacity-000);
      }
    `})),sB=a((()=>{oR(),G$(),aL(),hL(),_L(),yR(),ER(),aB(),s$=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},c$={xs:"small-600",sm:"paragraph-600",md:"small-600",mdl:"small-600",lg:"paragraph-600"},l$=class extends QO{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="fill",this.hasIconLeft=!1,this.hasIconRight=!1,this.borderRadius="m"}render(){this.style.cssText=`\n        --local-width: ${this.fullWidth?"100%":"auto"};\n        --local-opacity-100: ${this.loading?0:1};\n        --local-opacity-000: ${this.loading?1:0};\n        --local-border-radius: var(--wui-border-radius-${this.borderRadius});\n        `;let e=this.textVariant??c$[this.size];return MO`
          <button
            data-variant=${this.variant}
            data-icon-left=${this.hasIconLeft}
            data-icon-right=${this.hasIconRight}
            data-size=${this.size}
            ?disabled=${this.disabled||this.loading}
            ontouchstart
          >
            ${this.loadingTemplate()}
            <slot name="iconLeft" @slotchange=${()=>this.handleSlotLeftChange()}></slot>
            <wui-text variant=${e} color="inherit">
              <slot></slot>
            </wui-text>
            <slot name="iconRight" @slotchange=${()=>this.handleSlotRightChange()}></slot>
          </button>
        `}handleSlotLeftChange(){this.hasIconLeft=!0}handleSlotRightChange(){this.hasIconRight=!0}loadingTemplate(){return this.loading?MO`<wui-loading-spinner color="fg-300"></wui-loading-spinner>`:MO``}},l$.styles=[gR,mR,a$],s$([IR()],l$.prototype,"size",void 0),s$([IR({type:Boolean})],l$.prototype,"disabled",void 0),s$([IR({type:Boolean})],l$.prototype,"fullWidth",void 0),s$([IR({type:Boolean})],l$.prototype,"loading",void 0),s$([IR()],l$.prototype,"variant",void 0),s$([IR({type:Boolean})],l$.prototype,"hasIconLeft",void 0),s$([IR({type:Boolean})],l$.prototype,"hasIconRight",void 0),s$([IR()],l$.prototype,"borderRadius",void 0),s$([IR()],l$.prototype,"textVariant",void 0),l$=s$([wR("wui-button")],l$)})),cB=a((()=>{oR(),u$=$O`<svg  viewBox="0 0 48 54" fill="none">
      <path
        d="M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z"
      />
    </svg>`})),lB=a((()=>{oR(),d$=IT`
      :host {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 76px;
        row-gap: var(--wui-spacing-xs);
        padding: var(--wui-spacing-xs) 10px;
        background-color: var(--wui-gray-glass-002);
        border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);
        position: relative;
      }
    
      wui-shimmer[data-type='network'] {
        border: none;
        -webkit-clip-path: var(--wui-path-network);
        clip-path: var(--wui-path-network);
      }
    
      svg {
        position: absolute;
        width: 48px;
        height: 54px;
        z-index: 1;
      }
    
      svg > path {
        stroke: var(--wui-gray-glass-010);
        stroke-width: 1px;
      }
    `})),uB=a((()=>{oR(),G$(),cB(),mL(),yR(),ER(),lB(),h$=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},p$=class extends QO{constructor(){super(...arguments),this.type="wallet"}render(){return MO`
          ${this.shimmerTemplate()}
          <wui-shimmer width="56px" height="20px" borderRadius="xs"></wui-shimmer>
        `}shimmerTemplate(){return"network"===this.type?MO` <wui-shimmer
              data-type=${this.type}
              width="48px"
              height="54px"
              borderRadius="xs"
            ></wui-shimmer>
            ${u$}`:MO`<wui-shimmer width="56px" height="56px" borderRadius="xs"></wui-shimmer>`}},p$.styles=[gR,mR,d$],h$([IR()],p$.prototype,"type",void 0),p$=h$([wR("wui-card-select-loader")],p$)})),dB=a((()=>{oR(),f$=$O`
      <svg fill="none" viewBox="0 0 36 40">
        <path
          d="M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z"
        />
      </svg>
    `})),hB=a((()=>{oR(),g$=$O`<svg width="86" height="96" fill="none">
      <path
        d="M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z"
      />
    </svg>`})),pB=a((()=>{oR(),m$=IT`
      :host {
        position: relative;
        border-radius: inherit;
        display: flex;
        justify-content: center;
        align-items: center;
        width: var(--local-width);
        height: var(--local-height);
      }
    
      svg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
        fill: var(--wui-gray-glass-002);
      }
    
      svg > path {
        stroke: var(--local-stroke);
      }
    
      wui-image {
        width: 100%;
        height: 100%;
        -webkit-clip-path: var(--local-path);
        clip-path: var(--local-path);
        background: var(--wui-gray-glass-002);
      }
    
      wui-icon {
        transform: translateY(-5%);
        width: var(--local-icon-size);
        height: var(--local-icon-size);
      }
    `})),fB=a((()=>{oR(),G$(),dB(),cB(),hB(),aL(),cL(),yR(),ER(),pB(),b$=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},y$=class extends QO{constructor(){super(...arguments),this.size="md",this.name="uknown",this.selected=!1}render(){let e={sm:f$,md:u$,lg:g$};return this.style.cssText=`\n          --local-stroke: ${this.selected?"var(--wui-color-accent-100)":"var(--wui-gray-glass-010)"};\n          --local-path: var(--wui-path-network-${this.size});\n          --local-width:  var(--wui-width-network-${this.size});\n          --local-height:  var(--wui-height-network-${this.size});\n          --local-icon-size:  var(--wui-icon-size-network-${this.size});\n        `,MO`${this.templateVisual()} ${e[this.size]}`}templateVisual(){return this.imageSrc?MO`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:MO`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}},y$.styles=[gR,m$],b$([IR()],y$.prototype,"size",void 0),b$([IR()],y$.prototype,"name",void 0),b$([IR()],y$.prototype,"imageSrc",void 0),b$([IR({type:Boolean})],y$.prototype,"selected",void 0),y$=b$([wR("wui-network-image")],y$)})),gB=a((()=>{oR(),w$=IT`
      button {
        flex-direction: column;
        width: 76px;
        row-gap: var(--wui-spacing-xs);
        padding: var(--wui-spacing-xs) var(--wui-spacing-0);
        background-color: var(--wui-gray-glass-002);
        border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);
      }
    
      button > wui-text {
        color: var(--wui-color-fg-100);
        max-width: var(--wui-icon-box-size-xl);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        justify-content: center;
      }
    
      button:disabled > wui-text {
        color: var(--wui-gray-glass-015);
      }
    
      [data-selected='true'] {
        background-color: var(--wui-accent-glass-020);
      }
    
      @media (hover: hover) and (pointer: fine) {
        [data-selected='true']:hover:enabled {
          background-color: var(--wui-accent-glass-015);
        }
      }
    
      [data-selected='true']:active:enabled {
        background-color: var(--wui-accent-glass-010);
      }
    `})),mB=a((()=>{oR(),G$(),VL(),_L(),yR(),ER(),fB(),iB(),gB(),v$=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},_$=class extends QO{constructor(){super(...arguments),this.name="Unknown",this.type="wallet",this.imageSrc=void 0,this.disabled=!1,this.selected=!1,this.installed=!1}render(){return MO`
          <button data-selected=${UM(this.selected)} ?disabled=${this.disabled} ontouchstart>
            ${this.imageTemplate()}
            <wui-text variant="tiny-500" color=${this.selected?"accent-100":"inherit"}>
              ${this.name}
            </wui-text>
          </button>
        `}imageTemplate(){return"network"===this.type?MO`
            <wui-network-image
              .selected=${this.selected}
              imageSrc=${UM(this.imageSrc)}
              name=${this.name}
            >
            </wui-network-image>
          `:MO`
          <wui-wallet-image
            size="md"
            imageSrc=${UM(this.imageSrc)}
            name=${this.name}
            .installed=${this.installed}
            badgeSize="sm"
          >
          </wui-wallet-image>
        `}},_$.styles=[gR,mR,w$],v$([IR()],_$.prototype,"name",void 0),v$([IR()],_$.prototype,"type",void 0),v$([IR()],_$.prototype,"imageSrc",void 0),v$([IR({type:Boolean})],_$.prototype,"disabled",void 0),v$([IR({type:Boolean})],_$.prototype,"selected",void 0),v$([IR({type:Boolean})],_$.prototype,"installed",void 0),_$=v$([wR("wui-card-select")],_$)})),bB=a((()=>{oR(),x$=IT`
      a {
        border: 1px solid var(--wui-gray-glass-010);
        border-radius: var(--wui-border-radius-3xl);
      }
    
      wui-image {
        border-radius: var(--wui-border-radius-3xl);
        overflow: hidden;
      }
    
      a.disabled > wui-icon,
      a.disabled > wui-image {
        filter: grayscale(1);
      }
    
      a[data-variant='fill'] {
        color: var(--wui-color-inverse-100);
        background-color: var(--wui-color-accent-100);
      }
    
      a[data-variant='shade'],
      a[data-variant='shadeSmall'] {
        background-color: transparent;
        background-color: var(--wui-gray-glass-010);
        color: var(--wui-color-fg-200);
      }
    
      a[data-variant='success'] {
        column-gap: var(--wui-spacing-xxs);
        border: 1px solid var(--wui-success-glass-010);
        background-color: var(--wui-success-glass-010);
        color: var(--wui-color-success-100);
      }
    
      a[data-variant='error'] {
        column-gap: var(--wui-spacing-xxs);
        border: 1px solid var(--wui-error-glass-010);
        background-color: var(--wui-error-glass-010);
        color: var(--wui-color-error-100);
      }
    
      a[data-variant='transparent'] {
        column-gap: var(--wui-spacing-xxs);
        background-color: transparent;
        color: var(--wui-color-fg-150);
      }
    
      a[data-variant='transparent'],
      a[data-variant='success'],
      a[data-variant='shadeSmall'],
      a[data-variant='error'] {
        padding: 7px var(--wui-spacing-s) 7px 10px;
      }
    
      a[data-variant='transparent']:has(wui-text:first-child),
      a[data-variant='success']:has(wui-text:first-child),
      a[data-variant='shadeSmall']:has(wui-text:first-child),
      a[data-variant='error']:has(wui-text:first-child) {
        padding: 7px var(--wui-spacing-s);
      }
    
      a[data-variant='fill'],
      a[data-variant='shade'] {
        column-gap: var(--wui-spacing-xs);
        padding: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-xxs)
          var(--wui-spacing-xs);
      }
    
      a[data-variant='fill']:has(wui-text:first-child),
      a[data-variant='shade']:has(wui-text:first-child) {
        padding: 9px var(--wui-spacing-m) 9px var(--wui-spacing-m);
      }
    
      a[data-variant='fill'] > wui-image,
      a[data-variant='shade'] > wui-image {
        width: 24px;
        height: 24px;
      }
    
      a[data-variant='fill'] > wui-image {
        box-shadow: inset 0 0 0 1px var(--wui-color-accent-090);
      }
    
      a[data-variant='shade'] > wui-image,
      a[data-variant='shadeSmall'] > wui-image {
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);
      }
    
      a[data-variant='fill'] > wui-icon,
      a[data-variant='shade'] > wui-icon {
        width: 14px;
        height: 14px;
      }
    
      a[data-variant='transparent'] > wui-image,
      a[data-variant='success'] > wui-image,
      a[data-variant='shadeSmall'] > wui-image,
      a[data-variant='error'] > wui-image {
        width: 14px;
        height: 14px;
      }
    
      a[data-variant='transparent'] > wui-icon,
      a[data-variant='success'] > wui-icon,
      a[data-variant='shadeSmall'] > wui-icon,
      a[data-variant='error'] > wui-icon {
        width: 12px;
        height: 12px;
      }
    
      a[data-variant='fill']:focus-visible {
        background-color: var(--wui-color-accent-090);
      }
    
      a[data-variant='shade']:focus-visible,
      a[data-variant='shadeSmall']:focus-visible {
        background-color: var(--wui-gray-glass-015);
      }
    
      a[data-variant='transparent']:focus-visible {
        background-color: var(--wui-gray-glass-005);
      }
    
      a[data-variant='success']:focus-visible {
        background-color: var(--wui-success-glass-015);
      }
    
      a[data-variant='error']:focus-visible {
        background-color: var(--wui-error-glass-015);
      }
    
      a.disabled {
        color: var(--wui-gray-glass-015);
        background-color: var(--wui-gray-glass-015);
        pointer-events: none;
      }
    
      @media (hover: hover) and (pointer: fine) {
        a[data-variant='fill']:hover {
          background-color: var(--wui-color-accent-090);
        }
    
        a[data-variant='shade']:hover,
        a[data-variant='shadeSmall']:hover {
          background-color: var(--wui-gray-glass-015);
        }
    
        a[data-variant='transparent']:hover {
          background-color: var(--wui-gray-glass-005);
        }
    
        a[data-variant='success']:hover {
          background-color: var(--wui-success-glass-015);
        }
    
        a[data-variant='error']:hover {
          background-color: var(--wui-error-glass-015);
        }
      }
    
      a[data-variant='fill']:active {
        background-color: var(--wui-color-accent-080);
      }
    
      a[data-variant='shade']:active,
      a[data-variant='shadeSmall']:active {
        background-color: var(--wui-gray-glass-020);
      }
    
      a[data-variant='transparent']:active {
        background-color: var(--wui-gray-glass-010);
      }
    
      a[data-variant='success']:active {
        background-color: var(--wui-success-glass-020);
      }
    
      a[data-variant='error']:active {
        background-color: var(--wui-error-glass-020);
      }
    `})),yB=a((()=>{oR(),G$(),aL(),cL(),_L(),yR(),GL(),ER(),bB(),E$=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},C$=class extends QO{constructor(){super(...arguments),this.variant="fill",this.imageSrc=void 0,this.disabled=!1,this.icon="externalLink",this.href="",this.text=void 0}render(){let e="success"===this.variant||"transparent"===this.variant||"shadeSmall"===this.variant?"small-600":"paragraph-600";return MO`
          <a
            rel="noreferrer"
            target="_blank"
            href=${this.href}
            class=${this.disabled?"disabled":""}
            data-variant=${this.variant}
          >
            ${this.imageTemplate()}
            <wui-text variant=${e} color="inherit">
              ${this.title?this.title:FM.getHostName(this.href)}
            </wui-text>
            <wui-icon name=${this.icon} color="inherit" size="inherit"></wui-icon>
          </a>
        `}imageTemplate(){return this.imageSrc?MO`<wui-image src=${this.imageSrc}></wui-image>`:null}},C$.styles=[gR,mR,x$],E$([IR()],C$.prototype,"variant",void 0),E$([IR()],C$.prototype,"imageSrc",void 0),E$([IR({type:Boolean})],C$.prototype,"disabled",void 0),E$([IR()],C$.prototype,"icon",void 0),E$([IR()],C$.prototype,"href",void 0),E$([IR()],C$.prototype,"text",void 0),C$=E$([wR("wui-chip")],C$)})),wB=a((()=>{oR(),k$=IT`
      :host {
        position: relative;
        display: block;
      }
    
      button {
        background: var(--wui-color-accent-100);
        border: 1px solid var(--wui-gray-glass-010);
        border-radius: var(--wui-border-radius-m);
        gap: var(--wui-spacing-xs);
      }
    
      button.loading {
        background: var(--wui-gray-glass-010);
        border: 1px solid var(--wui-gray-glass-010);
        pointer-events: none;
      }
    
      button:disabled {
        background-color: var(--wui-gray-glass-015);
        border: 1px solid var(--wui-gray-glass-010);
      }
    
      button:disabled > wui-text {
        color: var(--wui-gray-glass-015);
      }
    
      @media (hover: hover) and (pointer: fine) {
        button:hover:enabled {
          background-color: var(--wui-color-accent-090);
        }
    
        button:active:enabled {
          background-color: var(--wui-color-accent-080);
        }
      }
    
      button:focus-visible {
        border: 1px solid var(--wui-gray-glass-010);
        background-color: var(--wui-color-accent-090);
        -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
        -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
        box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
      }
    
      button[data-size='sm'] {
        padding: 6.75px 10px 7.25px;
      }
    
      ::slotted(*) {
        transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
        will-change: opacity;
        opacity: var(--local-opacity-100);
      }
    
      button > wui-text {
        transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
        will-change: opacity;
        opacity: var(--local-opacity-100);
        color: var(--wui-color-inverse-100);
      }
    
      button[data-size='md'] {
        padding: 9px var(--wui-spacing-l) 9px var(--wui-spacing-l);
      }
    
      button[data-size='md'] + wui-text {
        padding-left: var(--wui-spacing-3xs);
      }
    
      @media (max-width: 500px) {
        button[data-size='md'] {
          height: 32px;
          padding: 5px 12px;
        }
    
        button[data-size='md'] > wui-text > slot {
          font-size: 14px !important;
        }
      }
    
      wui-loading-spinner {
        width: 14px;
        height: 14px;
      }
    
      wui-loading-spinner::slotted(svg) {
        width: 10px !important;
        height: 10px !important;
      }
    
      button[data-size='sm'] > wui-loading-spinner {
        width: 12px;
        height: 12px;
      }
    `})),vB=a((()=>{oR(),G$(),aL(),hL(),_L(),yR(),ER(),wB(),P$=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},I$=class extends QO{constructor(){super(...arguments),this.size="md",this.loading=!1}render(){let e="md"===this.size?"paragraph-600":"small-600";return MO`
          <button data-size=${this.size} ?disabled=${this.loading} ontouchstart>
            ${this.loadingTemplate()}
            <wui-text variant=${e} color=${this.loading?"accent-100":"inherit"}>
              <slot></slot>
            </wui-text>
          </button>
        `}loadingTemplate(){return this.loading?MO`<wui-loading-spinner size=${this.size} color="accent-100"></wui-loading-spinner>`:null}},I$.styles=[gR,mR,k$],P$([IR()],I$.prototype,"size",void 0),P$([IR({type:Boolean})],I$.prototype,"loading",void 0),I$=P$([wR("wui-connect-button")],I$)})),_B=a((()=>{oR(),S$=IT`
      wui-flex {
        width: 100%;
        background-color: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-xs);
      }
    `})),xB=a((()=>{oR(),G$(),aL(),_L(),sB(),KL(),yR(),ER(),_B(),A$=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},T$=class extends QO{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return MO`
          <wui-flex
            justifyContent="space-between"
            alignItems="center"
            .padding=${["1xs","2l","1xs","2l"]}
          >
            <wui-text variant="paragraph-500" color="fg-200">${this.label}</wui-text>
            <wui-button size="sm" variant="accent">
              ${this.buttonLabel}
              <wui-icon size="xs" color="inherit" slot="iconRight" name="chevronRight"></wui-icon>
            </wui-button>
          </wui-flex>
        `}},T$.styles=[gR,mR,S$],A$([IR({type:Boolean})],T$.prototype,"disabled",void 0),A$([IR()],T$.prototype,"label",void 0),A$([IR()],T$.prototype,"buttonLabel",void 0),T$=A$([wR("wui-cta-button")],T$)})),EB=a((()=>{oR(),O$=IT`
      :host {
        display: block;
        padding: var(--wui-spacing-l) var(--wui-spacing-m);
        background-color: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-xs);
        width: 100%;
      }
    `})),CB=a((()=>{oR(),KL(),yR(),ER(),EB(),R$=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},(N$=class extends QO{render(){return MO`
          <wui-flex gap="xl" flexDirection="column" justifyContent="space-between" alignItems="center">
            <slot></slot>
          </wui-flex>
        `}}).styles=[gR,mR,O$],N$=R$([wR("wui-details-group")],N$)})),kB=a((()=>{oR(),M$=IT`
      :host {
        display: flex;
        flex-direction: row;
        gap: var(--wui-spacing-l);
        width: 100%;
        border-radius: var(--wui-border-radius-xs);
      }
    `})),PB=a((()=>{oR(),G$(),KL(),yR(),ER(),kB(),$$=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},j$=class extends QO{constructor(){super(...arguments),this.name=""}render(){return MO`
          <wui-flex justifyContent="space-between" alignItems="center">
            <wui-text variant="paragraph-500" color="fg-200">${this.name}</wui-text>
            <wui-flex gap="xs" alignItems="center">
              <slot></slot>
            </wui-flex>
          </wui-flex>
        `}},j$.styles=[gR,mR,M$],$$([IR()],j$.prototype,"name",void 0),j$=$$([wR("wui-details-group-item")],j$)})),IB=a((()=>{rR(),({I:L$}=KO),B$=e=>void 0===e.strings}));function SB(e){void 0!==this._$AN?(OB(this),this._$AM=e,RB(this)):this._$AM=e}function AB(e,t=!1,r=0){let i=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(t)if(Array.isArray(i))for(let e=r;e<i.length;e++)TB(i[e],!1),OB(i[e]);else null!=i&&(TB(i,!1),OB(i));else TB(this,e)}var TB,OB,RB,NB,MB,$B,jB,LB,BB,DB,UB,FB,HB,zB,qB,WB,VB,GB,ZB,KB,YB,JB,QB,XB,eD,tD,rD,iD,nD,oD,aD,sD,cD,lD,uD,dD,hD,pD,fD,gD,mD,bD,yD,wD,vD,_D,xD,ED,CD,kD,PD,ID,SD,AD,TD,OD,RD,ND,MD=a((()=>{IB(),bL(),bL(),TB=(e,t)=>{let r=e._$AN;if(void 0===r)return!1;for(let e of r)e._$AO?.(t,!1),TB(e,t);return!0},OB=e=>{let t,r;do{if(void 0===(t=e._$AM))break;r=t._$AN,r.delete(e),e=t}while(0===r?.size)},RB=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(void 0===r)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),NB(t)}},NB=e=>{e.type==cM.CHILD&&(e._$AP??=AB,e._$AQ??=SB)},MB=class extends uM{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),RB(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(TB(this,e),OB(this))}setValue(e){if(B$(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}})),$D=a((()=>{rR(),MD(),bL(),$B=()=>new jB,jB=class{},LB=new WeakMap,BB=lM(class extends MB{render(e){return LO}update(e,[t]){let r=t!==this.Y;return r&&void 0!==this.Y&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.Y=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),LO}rt(e){if("function"==typeof this.Y){let t=this.ht??globalThis,r=LB.get(t);void 0===r&&(r=new WeakMap,LB.set(t,r)),void 0!==r.get(this.Y)&&this.Y.call(this.ht,void 0),r.set(this.Y,e),void 0!==e&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){return"function"==typeof this.Y?LB.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}})})),jD=a((()=>{$D()})),LD=a((()=>{oR(),DB=IT`
      :host {
        position: relative;
        width: 100%;
        display: inline-block;
        color: var(--wui-color-fg-275);
      }
    
      input {
        width: 100%;
        border-radius: var(--wui-border-radius-xs);
        border: 1px solid var(--wui-gray-glass-005);
        background: var(--wui-gray-glass-005);
        font-size: var(--wui-font-size-paragraph);
        font-weight: var(--wui-font-weight-light);
        letter-spacing: var(--wui-letter-spacing-paragraph);
        color: var(--wui-color-fg-100);
        transition:
          background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
          border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
          box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);
        will-change: background-color, border-color, box-shadow;
        caret-color: var(--wui-color-accent-100);
      }
    
      input:disabled {
        cursor: not-allowed;
        border: 1px solid var(--wui-gray-glass-010);
      }
    
      input:disabled::placeholder,
      input:disabled + wui-icon {
        color: var(--wui-color-fg-300);
      }
    
      input::placeholder {
        color: var(--wui-color-fg-275);
      }
    
      input:focus:enabled {
        background-color: var(--wui-gray-glass-010);
        border: 1px solid var(--wui-color-accent-100);
        -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
        -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
        box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
      }
    
      input:hover:enabled {
        background-color: var(--wui-gray-glass-010);
      }
    
      wui-icon {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
      }
    
      .wui-size-sm {
        padding: 9px var(--wui-spacing-m) 10px var(--wui-spacing-s);
      }
    
      wui-icon + .wui-size-sm {
        padding: 9px var(--wui-spacing-m) 10px 36px;
      }
    
      wui-icon[data-input='sm'] {
        left: var(--wui-spacing-s);
      }
    
      .wui-size-md {
        padding: 15px var(--wui-spacing-m) var(--wui-spacing-l) var(--wui-spacing-m);
      }
    
      wui-icon + .wui-size-md,
      wui-loading-spinner + .wui-size-md {
        padding: 10.5px var(--wui-spacing-3xl) 10.5px 40px;
      }
    
      wui-icon[data-input='md'] {
        left: var(--wui-spacing-l);
      }
    
      .wui-size-lg {
        padding: var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-l);
        letter-spacing: var(--wui-letter-spacing-medium-title);
        font-size: var(--wui-font-size-medium-title);
        font-weight: var(--wui-font-weight-light);
        line-height: 130%;
        color: var(--wui-color-fg-100);
        height: 64px;
      }
    
      wui-icon + .wui-size-lg,
      wui-loading-spinner + .wui-size-lg {
        padding-left: 50px;
      }
    
      wui-icon[data-input='lg'] {
        left: var(--wui-spacing-l);
      }
    
      input:placeholder-shown ~ ::slotted(wui-input-element),
      input:placeholder-shown ~ ::slotted(wui-icon) {
        opacity: 0;
        pointer-events: none;
      }
    
      input::-webkit-outer-spin-button,
      input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
      }
    
      input[type='number'] {
        -moz-appearance: textfield;
      }
    
      ::slotted(wui-input-element),
      ::slotted(wui-icon) {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
      }
    
      ::slotted(wui-input-element) {
        right: var(--wui-spacing-m);
      }
    
      ::slotted(wui-icon) {
        right: 0px;
      }
    `})),BD=a((()=>{oR(),G$(),VL(),jD(),aL(),yR(),ER(),LD(),UB=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},FB=class extends QO{constructor(){super(...arguments),this.inputElementRef=$B(),this.size="md",this.disabled=!1,this.placeholder="",this.type="text",this.value=""}render(){let e=`wui-size-${this.size}`;return MO` ${this.templateIcon()}
          <input
            ${BB(this.inputElementRef)}
            class=${e}
            type=${this.type}
            enterkeyhint=${UM(this.enterKeyHint)}
            ?disabled=${this.disabled}
            placeholder=${this.placeholder}
            @input=${this.dispatchInputChangeEvent.bind(this)}
            .value=${this.value||""}
          />
          <slot></slot>`}templateIcon(){return this.icon?MO`<wui-icon
            data-input=${this.size}
            size=${this.size}
            color="inherit"
            name=${this.icon}
          ></wui-icon>`:null}dispatchInputChangeEvent(){this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value?.value,bubbles:!0,composed:!0}))}},FB.styles=[gR,mR,DB],UB([IR()],FB.prototype,"size",void 0),UB([IR()],FB.prototype,"icon",void 0),UB([IR({type:Boolean})],FB.prototype,"disabled",void 0),UB([IR()],FB.prototype,"placeholder",void 0),UB([IR()],FB.prototype,"type",void 0),UB([IR()],FB.prototype,"keyHint",void 0),UB([IR()],FB.prototype,"value",void 0),FB=UB([wR("wui-input-text")],FB)})),DD=a((()=>{oR(),HB=IT`
      :host {
        position: relative;
        display: inline-block;
      }
    
      wui-text {
        margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m);
      }
    `})),UD=a((()=>{oR(),G$(),aL(),_L(),yR(),ER(),BD(),DD(),zB=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},qB=class extends QO{constructor(){super(...arguments),this.disabled=!1}render(){return MO`
          <wui-input-text
            placeholder="Email"
            icon="mail"
            size="md"
            .disabled=${this.disabled}
            .value=${this.value}
            data-testid="wui-email-input"
          ></wui-input-text>
          ${this.templateError()}
        `}templateError(){return this.errorMessage?MO`<wui-text variant="tiny-500" color="error-100">${this.errorMessage}</wui-text>`:null}},qB.styles=[gR,HB],zB([IR()],qB.prototype,"errorMessage",void 0),zB([IR({type:Boolean})],qB.prototype,"disabled",void 0),zB([IR()],qB.prototype,"value",void 0),qB=zB([wR("wui-email-input")],qB)})),FD=a((()=>{oR(),WB=IT`
      button {
        border-radius: var(--local-border-radius);
        color: var(--wui-color-fg-100);
        padding: var(--local-padding);
      }
    
      @media (max-width: 700px) {
        button {
          padding: var(--wui-spacing-s);
        }
      }
    
      button > wui-icon {
        pointer-events: none;
      }
    
      button:disabled > wui-icon {
        color: var(--wui-color-bg-300) !important;
      }
    
      button:disabled {
        background-color: transparent;
      }
    `})),HD=a((()=>{oR(),G$(),aL(),yR(),ER(),FD(),VB=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},GB=class extends QO{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="inherit"}render(){let e="lg"===this.size?"--wui-border-radius-xs":"--wui-border-radius-xxs",t="lg"===this.size?"--wui-spacing-1xs":"--wui-spacing-2xs";return this.style.cssText=`\n        --local-border-radius: var(${e});\n        --local-padding: var(${t});\n    `,MO`
          <button ?disabled=${this.disabled} ontouchstart>
            <wui-icon color=${this.iconColor} size=${this.size} name=${this.icon}></wui-icon>
          </button>
        `}},GB.styles=[gR,mR,bR,WB],VB([IR()],GB.prototype,"size",void 0),VB([IR({type:Boolean})],GB.prototype,"disabled",void 0),VB([IR()],GB.prototype,"icon",void 0),VB([IR()],GB.prototype,"iconColor",void 0),GB=VB([wR("wui-icon-link")],GB)})),zD=a((()=>{oR(),ZB=IT`
      button {
        background-color: var(--wui-color-fg-300);
        border-radius: var(--wui-border-radius-4xs);
        width: 16px;
        height: 16px;
      }
    
      button:disabled {
        background-color: var(--wui-color-bg-300);
      }
    
      wui-icon {
        color: var(--wui-color-bg-200) !important;
      }
    
      button:focus-visible {
        background-color: var(--wui-color-fg-250);
        border: 1px solid var(--wui-color-accent-100);
      }
    
      button:active:enabled {
        background-color: var(--wui-color-fg-225);
      }
    
      @media (hover: hover) and (pointer: fine) {
        button:hover:enabled {
          background-color: var(--wui-color-fg-250);
        }
      }
    `})),qD=a((()=>{oR(),G$(),aL(),yR(),ER(),zD(),KB=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},YB=class extends QO{constructor(){super(...arguments),this.icon="copy"}render(){return MO`
          <button>
            <wui-icon color="inherit" size="xxs" name=${this.icon}></wui-icon>
          </button>
        `}},YB.styles=[gR,mR,ZB],KB([IR()],YB.prototype,"icon",void 0),YB=KB([wR("wui-input-element")],YB)})),WD=a((()=>{oR(),JB=IT`
      :host {
        position: relative;
        display: inline-block;
      }
    
      input {
        width: 50px;
        height: 50px;
        background: var(--wui-gray-glass-010);
        border-radius: var(--wui-border-radius-xs);
        border: 1px solid var(--wui-gray-glass-005);
        font-family: var(--wui-font-family);
        font-size: var(--wui-font-size-large);
        font-weight: var(--wui-font-weight-regular);
        letter-spacing: var(--wui-letter-spacing-large);
        text-align: center;
        color: var(--wui-color-fg-100);
        caret-color: var(--wui-color-accent-100);
        transition:
          background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
          border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
          box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);
        will-change: background-color, border-color, box-shadow;
        box-sizing: border-box;
        -webkit-appearance: none;
        -moz-appearance: textfield;
        padding: 0px;
      }
    
      input::-webkit-outer-spin-button,
      input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
      }
    
      input[type='number'] {
        -moz-appearance: textfield;
      }
    
      input:disabled {
        cursor: not-allowed;
        border: 1px solid var(--wui-gray-glass-010);
        background: var(--wui-gray-glass-005);
      }
    
      input:focus:enabled {
        background-color: var(--wui-gray-glass-015);
        border: 1px solid var(--wui-color-accent-100);
        -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
        -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
        box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
      }
    
      @media (hover: hover) and (pointer: fine) {
        input:hover:enabled {
          background-color: var(--wui-gray-glass-015);
        }
      }
    `})),VD=a((()=>{oR(),G$(),yR(),ER(),WD(),QB=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},XB=class extends QO{constructor(){super(...arguments),this.disabled=!1,this.value=""}render(){return MO`<input
          type="number"
          maxlength="1"
          inputmode="numeric"
          autofocus
          ?disabled=${this.disabled}
          value=${this.value}
        /> `}},XB.styles=[gR,mR,JB],QB([IR({type:Boolean})],XB.prototype,"disabled",void 0),QB([IR({type:String})],XB.prototype,"value",void 0),XB=QB([wR("wui-input-numeric")],XB)})),GD=a((()=>{oR(),eD=IT`
      button {
        padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);
        border-radius: var(--wui-border-radius-3xs);
        background-color: transparent;
        color: var(--wui-color-accent-100);
      }
    
      button:disabled {
        background-color: transparent;
        color: var(--wui-gray-glass-015);
      }
    `})),ZD=a((()=>{oR(),G$(),aL(),_L(),yR(),ER(),GD(),tD=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},rD=class extends QO{constructor(){super(...arguments),this.disabled=!1,this.color="inherit"}render(){return MO`
          <button ?disabled=${this.disabled} ontouchstart>
            <slot name="iconLeft"></slot>
            <wui-text variant="small-600" color=${this.color}>
              <slot></slot>
            </wui-text>
            <slot name="iconRight"></slot>
          </button>
        `}},rD.styles=[gR,mR,eD],tD([IR({type:Boolean})],rD.prototype,"disabled",void 0),tD([IR()],rD.prototype,"color",void 0),rD=tD([wR("wui-link")],rD)})),KD=a((()=>{oR(),iD=IT`
      button {
        column-gap: var(--wui-spacing-s);
        padding: 11px 18px 11px var(--wui-spacing-s);
        width: 100%;
        background-color: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-xs);
        color: var(--wui-color-fg-250);
        transition:
          color var(--wui-ease-out-power-1) var(--wui-duration-md),
          background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
        will-change: color, background-color;
      }
    
      button[data-iconvariant='square'],
      button[data-iconvariant='square-blue'] {
        padding: 6px 18px 6px 9px;
      }
    
      button > wui-flex {
        flex: 1;
      }
    
      button > wui-image {
        width: 32px;
        height: 32px;
        box-shadow: 0 0 0 2px var(--wui-gray-glass-005);
        border-radius: var(--wui-border-radius-3xl);
      }
    
      button > wui-icon {
        width: 36px;
        height: 36px;
        transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
        will-change: opacity;
      }
    
      button > wui-icon-box[data-variant='blue'] {
        box-shadow: 0 0 0 2px var(--wui-accent-glass-005);
      }
    
      button > wui-icon-box[data-variant='overlay'] {
        box-shadow: 0 0 0 2px var(--wui-gray-glass-005);
      }
    
      button > wui-icon-box[data-variant='square-blue'] {
        border-radius: var(--wui-border-radius-3xs);
        position: relative;
        border: none;
        width: 36px;
        height: 36px;
      }
    
      button > wui-icon-box[data-variant='square-blue']::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: inherit;
        border: 1px solid var(--wui-accent-glass-010);
        pointer-events: none;
      }
    
      button > wui-icon:last-child {
        width: 14px;
        height: 14px;
      }
    
      button:disabled {
        background-color: var(--wui-gray-glass-015);
        color: var(--wui-gray-glass-015);
      }
    
      button[data-loading='true'] > wui-icon {
        opacity: 0;
      }
    
      wui-loading-spinner {
        position: absolute;
        right: 18px;
        top: 50%;
        transform: translateY(-50%);
      }
    `})),YD=a((()=>{oR(),G$(),VL(),aL(),cL(),hL(),_L(),KL(),yR(),ER(),XL(),KD(),nD=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},oD=class extends QO{constructor(){super(...arguments),this.variant="icon",this.disabled=!1,this.imageSrc=void 0,this.alt=void 0,this.chevron=!1,this.loading=!1}render(){return MO`
          <button
            ?disabled=${!!this.loading||!!this.disabled}
            data-loading=${this.loading}
            data-iconvariant=${UM(this.iconVariant)}
            ontouchstart
          >
            ${this.loadingTemplate()} ${this.visualTemplate()}
            <wui-flex gap="3xs">
              <slot></slot>
            </wui-flex>
            ${this.chevronTemplate()}
          </button>
        `}visualTemplate(){if("image"===this.variant&&this.imageSrc)return MO`<wui-image src=${this.imageSrc} alt=${this.alt??"list item"}></wui-image>`;if("square"===this.iconVariant&&this.icon&&"icon"===this.variant)return MO`<wui-icon name=${this.icon}></wui-icon>`;if("icon"===this.variant&&this.icon&&this.iconVariant){let e=["blue","square-blue"].includes(this.iconVariant)?"accent-100":"fg-200",t="square-blue"===this.iconVariant?"mdl":"md",r=this.iconSize?this.iconSize:t;return MO`
            <wui-icon-box
              data-variant=${this.iconVariant}
              icon=${this.icon}
              iconSize=${r}
              background="transparent"
              iconColor=${e}
              backgroundColor=${e}
              size=${t}
            ></wui-icon-box>
          `}return null}loadingTemplate(){return this.loading?MO`<wui-loading-spinner color="fg-300"></wui-loading-spinner>`:MO``}chevronTemplate(){return this.chevron?MO`<wui-icon size="inherit" color="fg-200" name="chevronRight"></wui-icon>`:null}},oD.styles=[gR,mR,iD],nD([IR()],oD.prototype,"icon",void 0),nD([IR()],oD.prototype,"iconSize",void 0),nD([IR()],oD.prototype,"variant",void 0),nD([IR()],oD.prototype,"iconVariant",void 0),nD([IR({type:Boolean})],oD.prototype,"disabled",void 0),nD([IR()],oD.prototype,"imageSrc",void 0),nD([IR()],oD.prototype,"alt",void 0),nD([IR({type:Boolean})],oD.prototype,"chevron",void 0),nD([IR({type:Boolean})],oD.prototype,"loading",void 0),oD=nD([wR("wui-list-item")],oD)})),JD=a((()=>{var e;(e=aD||(aD={})).approve="approved",e.bought="bought",e.borrow="borrowed",e.burn="burnt",e.cancel="canceled",e.claim="claimed",e.deploy="deployed",e.deposit="deposited",e.execute="executed",e.mint="minted",e.receive="received",e.repay="repaid",e.send="sent",e.sell="sold",e.stake="staked",e.trade="swapped",e.unstake="unstaked",e.withdraw="withdrawn"})),QD=a((()=>{oR(),sD=IT`
      :host > wui-flex {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        width: 40px;
        height: 40px;
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);
        background-color: var(--wui-gray-glass-005);
      }
    
      :host > wui-flex wui-image {
        display: block;
      }
    
      :host > wui-flex,
      :host > wui-flex wui-image,
      .swap-images-container,
      .swap-images-container.nft,
      wui-image.nft {
        border-top-left-radius: var(--local-left-border-radius);
        border-top-right-radius: var(--local-right-border-radius);
        border-bottom-left-radius: var(--local-left-border-radius);
        border-bottom-right-radius: var(--local-right-border-radius);
      }
    
      wui-icon {
        width: 20px;
        height: 20px;
      }
    
      wui-icon-box {
        position: absolute;
        right: 0;
        bottom: 0;
        transform: translate(20%, 20%);
      }
    
      .swap-images-container {
        position: relative;
        width: 40px;
        height: 40px;
        overflow: hidden;
      }
    
      .swap-images-container wui-image:first-child {
        position: absolute;
        width: 40px;
        height: 40px;
        top: 0;
        left: 0%;
        clip-path: inset(0px calc(50% + 2px) 0px 0%);
      }
    
      .swap-images-container wui-image:last-child {
        clip-path: inset(0px 0px 0px calc(50% + 2px));
      }
    `})),XD=a((()=>{oR(),G$(),ER(),cL(),XL(),QD(),cD=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},lD=class extends QO{constructor(){super(...arguments),this.images=[],this.secondImage={type:void 0,url:""}}render(){let[e,t]=this.images,r="NFT"===e?.type,i=r?"var(--wui-border-radius-xxs)":"var(--wui-border-radius-s)",n=(t?.url?"NFT"===t.type:r)?"var(--wui-border-radius-xxs)":"var(--wui-border-radius-s)";return this.style.cssText=`\n        --local-left-border-radius: ${i};\n        --local-right-border-radius: ${n};\n        `,MO`<wui-flex> ${this.templateVisual()} ${this.templateIcon()} </wui-flex>`}templateVisual(){let[e,t]=this.images,r=e?.type;return 2===this.images.length&&(e?.url||t?.url)?MO`<div class="swap-images-container">
            ${e?.url?MO`<wui-image src=${e.url} alt="Transaction image"></wui-image>`:null}
            ${t?.url?MO`<wui-image src=${t.url} alt="Transaction image"></wui-image>`:null}
          </div>`:e?.url?MO`<wui-image src=${e.url} alt="Transaction image"></wui-image>`:"NFT"===r?MO`<wui-icon size="inherit" color="fg-200" name="nftPlaceholder"></wui-icon>`:MO`<wui-icon size="inherit" color="fg-200" name="coinPlaceholder"></wui-icon>`}templateIcon(){let e,t="accent-100";return e=this.getIcon(),this.status&&(t=this.getStatusColor()),e?MO`
          <wui-icon-box
            size="xxs"
            iconColor=${t}
            backgroundColor=${t}
            background="opaque"
            icon=${e}
            ?border=${!0}
            borderColor="wui-color-bg-125"
          ></wui-icon-box>
        `:null}getDirectionIcon(){switch(this.direction){case"in":return"arrowBottom";case"out":return"arrowTop";default:return}}getIcon(){return this.onlyDirectionIcon?this.getDirectionIcon():"trade"===this.type?"swapHorizontalBold":"approve"===this.type?"checkmark":"cancel"===this.type?"close":this.getDirectionIcon()}getStatusColor(){switch(this.status){case"confirmed":return"success-100";case"failed":return"error-100";case"pending":return"inverse-100";default:return"accent-100"}}},lD.styles=[sD],cD([IR()],lD.prototype,"type",void 0),cD([IR()],lD.prototype,"status",void 0),cD([IR()],lD.prototype,"direction",void 0),cD([IR({type:Boolean})],lD.prototype,"onlyDirectionIcon",void 0),cD([IR({type:Array})],lD.prototype,"images",void 0),cD([IR({type:Object})],lD.prototype,"secondImage",void 0),lD=cD([wR("wui-transaction-visual")],lD)})),eU=a((()=>{oR(),uD=IT`
      :host > wui-flex:first-child {
        align-items: center;
        column-gap: var(--wui-spacing-s);
        padding: 6.5px var(--wui-spacing-xs) 6.5px var(--wui-spacing-xs);
        width: 100%;
      }
    
      :host > wui-flex:first-child wui-text:nth-child(1) {
        text-transform: capitalize;
      }
    
      wui-transaction-visual {
        width: 40px;
        height: 40px;
      }
    
      wui-flex {
        flex: 1;
      }
    
      :host wui-flex wui-flex {
        overflow: hidden;
      }
    
      :host .description-container wui-text span {
        word-break: break-all;
      }
    
      :host .description-container wui-text {
        overflow: hidden;
      }
    
      :host .description-separator-icon {
        margin: 0px 6px;
      }
    
      :host wui-text > span {
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
      }
    `})),tU=a((()=>{oR(),G$(),ER(),JD(),yR(),_L(),XD(),VL(),eU(),dD=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},hD=class extends QO{constructor(){super(...arguments),this.type="approve",this.onlyDirectionIcon=!1,this.images=[],this.price=[],this.amount=[],this.symbol=[]}render(){return MO`
          <wui-flex>
            <wui-transaction-visual
              .status=${this.status}
              direction=${UM(this.direction)}
              type=${this.type}
              onlyDirectionIcon=${UM(this.onlyDirectionIcon)}
              .images=${this.images}
            ></wui-transaction-visual>
            <wui-flex flexDirection="column" gap="3xs">
              <wui-text variant="paragraph-600" color="fg-100">
                ${aD[this.type]||this.type}
              </wui-text>
              <wui-flex class="description-container">
                ${this.templateDescription()} ${this.templateSecondDescription()}
              </wui-flex>
            </wui-flex>
            <wui-text variant="micro-700" color="fg-300"><span>${this.date}</span></wui-text>
          </wui-flex>
        `}templateDescription(){let e=this.descriptions?.[0];return e?MO`
              <wui-text variant="small-500" color="fg-200">
                <span>${e}</span>
              </wui-text>
            `:null}templateSecondDescription(){let e=this.descriptions?.[1];return e?MO`
              <wui-icon class="description-separator-icon" size="xxs" name="arrowRight"></wui-icon>
              <wui-text variant="small-400" color="fg-200">
                <span>${e}</span>
              </wui-text>
            `:null}},hD.styles=[gR,uD],dD([IR()],hD.prototype,"type",void 0),dD([IR({type:Array})],hD.prototype,"descriptions",void 0),dD([IR()],hD.prototype,"date",void 0),dD([IR({type:Boolean})],hD.prototype,"onlyDirectionIcon",void 0),dD([IR()],hD.prototype,"status",void 0),dD([IR()],hD.prototype,"direction",void 0),dD([IR({type:Array})],hD.prototype,"images",void 0),dD([IR({type:Array})],hD.prototype,"price",void 0),dD([IR({type:Array})],hD.prototype,"amount",void 0),dD([IR({type:Array})],hD.prototype,"symbol",void 0),hD=dD([wR("wui-transaction-list-item")],hD)})),rU=a((()=>{oR(),pD=IT`
      :host > wui-flex:first-child {
        column-gap: var(--wui-spacing-s);
        padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
        width: 100%;
      }
    
      wui-flex {
        display: flex;
        flex: 1;
      }
    `})),iU=a((()=>{oR(),ER(),yR(),_L(),XD(),rU(),fD=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},(gD=class extends QO{render(){return MO`
          <wui-flex alignItems="center">
            <wui-shimmer width="40px" height="40px"></wui-shimmer>
            <wui-flex flexDirection="column" gap="2xs">
              <wui-shimmer width="72px" height="16px" borderRadius="4xs"></wui-shimmer>
              <wui-shimmer width="148px" height="14px" borderRadius="4xs"></wui-shimmer>
            </wui-flex>
            <wui-shimmer width="24px" height="12px" borderRadius="5xs"></wui-shimmer>
          </wui-flex>
        `}}).styles=[gR,pD],gD=fD([wR("wui-transaction-list-item-loader")],gD)})),nU=a((()=>{oR(),mD=IT`
      :host {
        display: flex;
        justify-content: center;
        align-items: center;
        height: var(--wui-spacing-m);
        padding: 0 var(--wui-spacing-3xs) !important;
        border-radius: var(--wui-border-radius-5xs);
      }
    
      :host > wui-text {
        transform: translateY(5%);
      }
    
      :host([data-variant='main']) {
        background-color: var(--wui-accent-glass-015);
        color: var(--wui-color-accent-100);
      }
    
      :host([data-variant='shade']) {
        background-color: var(--wui-gray-glass-010);
        color: var(--wui-color-fg-200);
      }
    
      :host([data-variant='success']) {
        background-color: var(--wui-icon-box-bg-success-100);
        color: var(--wui-color-success-100);
      }
    
      :host([data-variant='error']) {
        background-color: var(--wui-icon-box-bg-error-100);
        color: var(--wui-color-error-100);
      }
    
      :host([data-size='lg']) {
        padding: 9px 5px !important;
      }
    
      :host([data-size='lg']) > wui-text {
        transform: translateY(2%);
      }
    `})),oU=a((()=>{oR(),G$(),_L(),yR(),ER(),nU(),bD=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},yD=class extends QO{constructor(){super(...arguments),this.variant="main",this.size="lg"}render(){this.dataset.variant=this.variant,this.dataset.size=this.size;let e="md"===this.size?"mini-700":"micro-700";return MO`
          <wui-text data-variant=${this.variant} variant=${e} color="inherit">
            <slot></slot>
          </wui-text>
        `}},yD.styles=[gR,mD],bD([IR()],yD.prototype,"variant",void 0),bD([IR()],yD.prototype,"size",void 0),yD=bD([wR("wui-tag")],yD)})),aU=a((()=>{oR(),wD=IT`
      button {
        column-gap: var(--wui-spacing-s);
        padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
        width: 100%;
        background-color: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-xs);
        color: var(--wui-color-fg-100);
      }
    
      button > wui-text:nth-child(2) {
        display: flex;
        flex: 1;
      }
    
      wui-icon {
        color: var(--wui-color-fg-200) !important;
      }
    
      button:disabled {
        background-color: var(--wui-gray-glass-015);
        color: var(--wui-gray-glass-015);
      }
    
      button:disabled > wui-tag {
        background-color: var(--wui-gray-glass-010);
        color: var(--wui-color-fg-300);
      }
    `})),sU=a((()=>{oR(),G$(),aL(),XL(),_L(),yR(),ER(),oB(),oU(),iB(),aU(),vD=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},_D=class extends QO{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.installed=!1,this.disabled=!1,this.showAllWallets=!1}render(){return MO`
          <button ?disabled=${this.disabled} ontouchstart>
            ${this.templateAllWallets()} ${this.templateWalletImage()}
            <wui-text variant="paragraph-500" color="inherit">${this.name}</wui-text>
            ${this.templateStatus()}
          </button>
        `}templateAllWallets(){return this.showAllWallets&&this.imageSrc?MO` <wui-all-wallets-image .imageeSrc=${this.imageSrc}> </wui-all-wallets-image> `:this.showAllWallets&&this.walletIcon?MO` <wui-wallet-image .walletIcon=${this.walletIcon} size="sm"> </wui-wallet-image> `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?MO`<wui-wallet-image
            size="sm"
            imageSrc=${this.imageSrc}
            name=${this.name}
            .installed=${this.installed}
          ></wui-wallet-image>`:this.showAllWallets||this.imageSrc?null:MO`<wui-wallet-image size="sm" name=${this.name}></wui-wallet-image>`}templateStatus(){return this.tagLabel&&this.tagVariant?MO`<wui-tag variant=${this.tagVariant}>${this.tagLabel}</wui-tag>`:this.icon?MO`<wui-icon color="inherit" size="sm" name=${this.icon}></wui-icon>`:null}},_D.styles=[gR,mR,wD],vD([IR({type:Array})],_D.prototype,"walletImages",void 0),vD([IR()],_D.prototype,"imageSrc",void 0),vD([IR()],_D.prototype,"name",void 0),vD([IR()],_D.prototype,"tagLabel",void 0),vD([IR()],_D.prototype,"tagVariant",void 0),vD([IR()],_D.prototype,"icon",void 0),vD([IR()],_D.prototype,"walletIcon",void 0),vD([IR({type:Boolean})],_D.prototype,"installed",void 0),vD([IR({type:Boolean})],_D.prototype,"disabled",void 0),vD([IR({type:Boolean})],_D.prototype,"showAllWallets",void 0),_D=vD([wR("wui-list-wallet")],_D)})),cU=a((()=>{oR(),xD=IT`
      :host {
        display: block;
        width: 40px;
        height: 40px;
        border-radius: var(--wui-border-radius-3xl);
        border: 1px solid var(--wui-gray-glass-010);
        overflow: hidden;
      }
    
      wui-icon {
        width: 100%;
        height: 100%;
      }
    `})),lU=a((()=>{oR(),G$(),aL(),yR(),ER(),cU(),ED=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},CD=class extends QO{constructor(){super(...arguments),this.logo="google"}render(){return MO`<wui-icon color="inherit" size="inherit" name=${this.logo}></wui-icon> `}},CD.styles=[gR,xD],ED([IR()],CD.prototype,"logo",void 0),CD=ED([wR("wui-logo")],CD)})),uU=a((()=>{oR(),kD=IT`
      :host {
        display: block;
      }
    
      button {
        width: 50px;
        height: 50px;
        background: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-xs);
      }
    `})),dU=a((()=>{oR(),G$(),yR(),ER(),lU(),uU(),PD=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},ID=class extends QO{constructor(){super(...arguments),this.logo="google",this.disabled=!1}render(){return MO`
          <button ?disabled=${this.disabled} ontouchstart>
            <wui-logo logo=${this.logo}></wui-logo>
          </button>
        `}},ID.styles=[gR,mR,kD],PD([IR()],ID.prototype,"logo",void 0),PD([IR({type:Boolean})],ID.prototype,"disabled",void 0),ID=PD([wR("wui-logo-select")],ID)})),hU=a((()=>{oR(),SD=IT`
      :host {
        display: block;
      }
    
      button {
        border-radius: var(--wui-border-radius-3xl);
        display: flex;
        gap: var(--wui-spacing-xs);
        padding: var(--wui-spacing-2xs) var(--wui-spacing-s) var(--wui-spacing-2xs)
          var(--wui-spacing-xs);
        border: 1px solid var(--wui-gray-glass-010);
        background-color: var(--wui-gray-glass-005);
        color: var(--wui-color-fg-100);
      }
    
      button:disabled {
        border: 1px solid var(--wui-gray-glass-005);
        background-color: var(--wui-gray-glass-015);
        color: var(--wui-gray-glass-015);
      }
    
      @media (hover: hover) and (pointer: fine) {
        button:hover:enabled {
          background-color: var(--wui-gray-glass-010);
        }
    
        button:active:enabled {
          background-color: var(--wui-gray-glass-015);
        }
      }
    
      wui-image,
      wui-icon-box {
        border-radius: var(--wui-border-radius-3xl);
        width: 24px;
        height: 24px;
        box-shadow: 0 0 0 2px var(--wui-gray-glass-005);
      }
    `})),pU=a((()=>{oR(),G$(),cL(),_L(),yR(),ER(),XL(),hU(),AD=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},TD=class extends QO{constructor(){super(...arguments),this.imageSrc=void 0,this.isUnsupportedChain=void 0,this.disabled=!1}render(){return MO`
          <button ?disabled=${this.disabled}>
            ${this.visualTemplate()}
            <wui-text variant="paragraph-600" color="inherit">
              <slot></slot>
            </wui-text>
          </button>
        `}visualTemplate(){return this.isUnsupportedChain?MO`
            <wui-icon-box
              size="sm"
              iconColor="error-100"
              backgroundColor="error-100"
              icon="warningCircle"
            ></wui-icon-box>
          `:this.imageSrc?MO`<wui-image src=${this.imageSrc}></wui-image>`:MO`
          <wui-icon-box
            size="sm"
            iconColor="inverse-100"
            backgroundColor="fg-100"
            icon="networkPlaceholder"
          ></wui-icon-box>
        `}},TD.styles=[gR,mR,SD],AD([IR()],TD.prototype,"imageSrc",void 0),AD([IR({type:Boolean})],TD.prototype,"isUnsupportedChain",void 0),AD([IR({type:Boolean})],TD.prototype,"disabled",void 0),TD=AD([wR("wui-network-button")],TD)})),fU=a((()=>{oR(),OD=IT`
      :host {
        position: relative;
        display: block;
      }
    `})),gU=a((()=>{oR(),G$(),KL(),yR(),GL(),ER(),VD(),VD(),fU(),RD=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},ND=class extends QO{constructor(){super(...arguments),this.length=6,this.otp="",this.values=Array.from({length:this.length}).map((()=>"")),this.numerics=[],this.shouldInputBeEnabled=e=>this.values.slice(0,e).every((e=>""!==e)),this.handleKeyDown=(e,t)=>{let r=e.target,i=this.getInputElement(r);if(!i)return;["ArrowLeft","ArrowRight","Shift","Delete"].includes(e.key)&&e.preventDefault();let n=i.selectionStart;switch(e.key){case"ArrowLeft":n&&i.setSelectionRange(n+1,n+1),this.focusInputField("prev",t);break;case"ArrowRight":case"Shift":this.focusInputField("next",t);break;case"Delete":case"Backspace":""===i.value?this.focusInputField("prev",t):this.updateInput(i,t,"")}},this.focusInputField=(e,t)=>{if("next"===e){let e=t+1;if(!this.shouldInputBeEnabled(e))return;let r=this.numerics[e<this.length?e:t],i=r?this.getInputElement(r):void 0;i&&(i.disabled=!1,i.focus())}if("prev"===e){let e=t-1,r=this.numerics[e>-1?e:t],i=r?this.getInputElement(r):void 0;i&&i.focus()}}}firstUpdated(){this.otp&&(this.values=this.otp.split(""));let e=this.shadowRoot?.querySelectorAll("wui-input-numeric");e&&(this.numerics=Array.from(e)),this.numerics[0]?.focus()}render(){return MO`
          <wui-flex gap="xxs" data-testid="wui-otp-input">
            ${Array.from({length:this.length}).map(((e,t)=>MO`
                <wui-input-numeric
                  @input=${e=>this.handleInput(e,t)}
                  @click=${e=>this.selectInput(e)}
                  @keydown=${e=>this.handleKeyDown(e,t)}
                  .disabled=${!this.shouldInputBeEnabled(t)}
                  .value=${this.values[t]||""}
                >
                </wui-input-numeric>
              `))}
          </wui-flex>
        `}updateInput(e,t,r){let i=this.numerics[t],n=e||(i?this.getInputElement(i):void 0);n&&(n.value=r,this.values=this.values.map(((e,i)=>i===t?r:e)))}selectInput(e){let t=e.target;t&&this.getInputElement(t)?.select()}handleInput(e,t){let r=e.target,i=this.getInputElement(r);if(i){let r=i.value;"insertFromPaste"===e.inputType?this.handlePaste(i,r,t):FM.isNumber(r)&&e.data?(this.updateInput(i,t,e.data),this.focusInputField("next",t)):this.updateInput(i,t,"")}this.dispatchInputChangeEvent()}handlePaste(e,t,r){let i=t[0];if(i&&FM.isNumber(i)){this.updateInput(e,r,i);let n=t.substring(1);if(r+1<this.length&&n.length){let e=this.numerics[r+1],t=e?this.getInputElement(e):void 0;t&&this.handlePaste(t,n,r+1)}else this.focusInputField("next",r)}else this.updateInput(e,r,"")}getInputElement(e){return e.shadowRoot?.querySelector("input")?e.shadowRoot.querySelector("input"):null}dispatchInputChangeEvent(){let e=this.values.join("");this.dispatchEvent(new CustomEvent("inputChange",{detail:e,bubbles:!0,composed:!0}))}},ND.styles=[gR,OD],RD([IR({type:Number})],ND.prototype,"length",void 0),RD([IR({type:String})],ND.prototype,"otp",void 0),RD([OR()],ND.prototype,"values",void 0),ND=RD([wR("wui-otp")],ND)}));function mU(e,t,r){return e!==t&&(e-t<0?t-e:e-t)<=r+yU}var bU,yU,wU,vU,_U,xU,EU,CU,kU,PU,IU,SU,AU,TU,OU,RU,NU,MU,$U,jU,LU,BU,DU,UU,FU,HU,zU,qU,WU,VU,GU,ZU,KU,YU,JU,QU,XU,eF,tF,rF,iF,nF,oF,aF,sF,cF,lF,uF,dF,hF,pF,fF,gF,mF,bF,yF,wF,vF,_F,xF,EF,CF,kF,PF,IF,SF,AF,TF,OF,RF,NF,MF,$F,jF,LF,BF,DF,UF,FF,HF,zF,qF,WF,VF,GF,ZF,KF,YF,JF,QF,XF,eH,tH,rH=a((()=>{oR(),bU=d(Gy(),1),yU=.1,2.5,7,wU={generate(e,t,r){let i="#141414",n=[],o=function(e,t){let r=Array.prototype.slice.call(bU.default.create(e,{errorCorrectionLevel:t}).modules.data,0),i=Math.sqrt(r.length);return r.reduce(((e,t,r)=>(r%i==0?e.push([t]):e[e.length-1].push(t))&&e),[])}(e,"Q"),a=t/o.length,s=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];s.forEach((({x:e,y:t})=>{let r=(o.length-7)*a*e,c=(o.length-7)*a*t,l=.45;for(let e=0;e<s.length;e+=1){let t=a*(7-2*e);n.push($O`
                <rect
                  fill=${2===e?i:"transparent"}
                  width=${0===e?t-5:t}
                  rx= ${0===e?(t-5)*l:t*l}
                  ry= ${0===e?(t-5)*l:t*l}
                  stroke=${i}
                  stroke-width=${0===e?5:0}
                  height=${0===e?t-5:t}
                  x= ${0===e?c+a*e+2.5:c+a*e}
                  y= ${0===e?r+a*e+2.5:r+a*e}
                />
              `)}}));let c=Math.floor((r+25)/a),l=o.length/2-c/2,u=o.length/2+c/2-1,d=[];o.forEach(((e,t)=>{e.forEach(((e,r)=>{if(o[t][r]&&!(t<7&&r<7||t>o.length-8&&r<7||t<7&&r>o.length-8)&&!(t>l&&t<u&&r>l&&r<u)){let e=t*a+a/2,i=r*a+a/2;d.push([e,i])}}))}));let h={};return d.forEach((([e,t])=>{h[e]?h[e]?.push(t):h[e]=[t]})),Object.entries(h).map((([e,t])=>{let r=t.filter((e=>t.every((t=>!mU(e,t,a)))));return[Number(e),r]})).forEach((([e,t])=>{t.forEach((t=>{n.push($O`<circle cx=${e} cy=${t} fill=${i} r=${a/2.5} />`)}))})),Object.entries(h).filter((([e,t])=>t.length>1)).map((([e,t])=>{let r=t.filter((e=>t.some((t=>mU(e,t,a)))));return[Number(e),r]})).map((([e,t])=>{t.sort(((e,t)=>e<t?-1:1));let r=[];for(let e of t){let t=r.find((t=>t.some((t=>mU(e,t,a)))));t?t.push(e):r.push([e])}return[e,r.map((e=>[e[0],e[e.length-1]]))]})).forEach((([e,t])=>{t.forEach((([t,r])=>{n.push($O`
                  <line
                    x1=${e}
                    x2=${e}
                    y1=${t}
                    y2=${r}
                    stroke=${i}
                    stroke-width=${a/1.25}
                    stroke-linecap="round"
                  />
                `)}))})),n}}})),iH=a((()=>{oR(),vU=IT`
      :host {
        position: relative;
        user-select: none;
        display: block;
        overflow: hidden;
        aspect-ratio: 1 / 1;
        width: var(--local-size);
      }
    
      :host([data-theme='dark']) {
        border-radius: clamp(0px, var(--wui-border-radius-l), 40px);
        background-color: var(--wui-color-inverse-100);
        padding: var(--wui-spacing-l);
      }
    
      :host([data-theme='light']) {
        box-shadow: 0 0 0 1px var(--wui-color-bg-125);
        background-color: var(--wui-color-bg-125);
      }
    
      :host([data-clear='true']) > wui-icon {
        display: none;
      }
    
      svg:first-child,
      wui-image,
      wui-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translateY(-50%) translateX(-50%);
      }
    
      wui-image {
        width: 25%;
        height: 25%;
        border-radius: var(--wui-border-radius-xs);
      }
    
      wui-icon {
        width: 100%;
        height: 100%;
        color: #3396ff !important;
        transform: translateY(-50%) translateX(-50%) scale(0.25);
      }
    `})),nH=a((()=>{oR(),G$(),aL(),cL(),rH(),yR(),ER(),iH(),_U=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},xU=class extends QO{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),this.style.cssText=`--local-size: ${this.size}px`,MO`${this.templateVisual()} ${this.templateSvg()}`}templateSvg(){let e="light"===this.theme?this.size:this.size-32;return $O`
          <svg height=${e} width=${e}>
            ${wU.generate(this.uri,e,this.arenaClear?0:e/4)}
          </svg>
        `}templateVisual(){return this.imageSrc?MO`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:MO`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}},xU.styles=[gR,vU],_U([IR()],xU.prototype,"uri",void 0),_U([IR({type:Number})],xU.prototype,"size",void 0),_U([IR()],xU.prototype,"theme",void 0),_U([IR()],xU.prototype,"imageSrc",void 0),_U([IR()],xU.prototype,"alt",void 0),_U([IR({type:Boolean})],xU.prototype,"arenaClear",void 0),xU=_U([wR("wui-qr-code")],xU)})),oH=a((()=>{oR(),EU=IT`
      :host {
        position: relative;
        display: inline-block;
        width: 100%;
      }
    `})),aH=a((()=>{oR(),jD(),qD(),yR(),ER(),BD(),oH(),CU=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},kU=class extends QO{constructor(){super(...arguments),this.inputComponentRef=$B()}render(){return MO`
          <wui-input-text
            ${BB(this.inputComponentRef)}
            placeholder="Search wallet"
            icon="search"
            type="search"
            enterKeyHint="search"
            size="sm"
          >
            <wui-input-element @click=${this.clearValue} icon="close"></wui-input-element>
          </wui-input-text>
        `}clearValue(){let e=this.inputComponentRef.value?.inputElementRef.value;e&&(e.value="",e.focus(),e.dispatchEvent(new Event("input")))}},kU.styles=[gR,EU],kU=CU([wR("wui-search-bar")],kU)})),sH=a((()=>{oR(),PU=IT`
      :host {
        display: flex;
        column-gap: var(--wui-spacing-xs);
        align-items: center;
        padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs);
        border-radius: var(--wui-border-radius-3xl);
        border: 1px solid var(--wui-gray-glass-005);
        box-sizing: border-box;
        max-height: 40px;
        background-color: var(--wui-color-bg-175);
        box-shadow:
          0px 14px 64px -4px rgba(0, 0, 0, 0.15),
          0px 8px 22px -6px rgba(0, 0, 0, 0.15);
      }
    `})),cH=a((()=>{oR(),G$(),_L(),yR(),ER(),XL(),sH(),IU=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},SU=class extends QO{constructor(){super(...arguments),this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="checkmark",this.message=""}render(){return MO`
          <wui-icon-box
            size="sm"
            iconSize="xs"
            iconColor=${this.iconColor}
            backgroundColor=${this.backgroundColor}
            icon=${this.icon}
            background="opaque"
          ></wui-icon-box>
          <wui-text variant="paragraph-500" color="fg-100">${this.message}</wui-text>
        `}},SU.styles=[gR,PU],IU([IR()],SU.prototype,"backgroundColor",void 0),IU([IR()],SU.prototype,"iconColor",void 0),IU([IR()],SU.prototype,"icon",void 0),IU([IR()],SU.prototype,"message",void 0),SU=IU([wR("wui-snackbar")],SU)})),lH=a((()=>{oR(),AU=IT`
      :host {
        display: inline-flex;
        background-color: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-3xl);
        padding: var(--wui-spacing-3xs);
        position: relative;
        height: 36px;
        overflow: hidden;
      }
    
      :host::before {
        content: '';
        position: absolute;
        pointer-events: none;
        top: 4px;
        left: 4px;
        display: block;
        width: var(--local-tab-width);
        height: 28px;
        border-radius: var(--wui-border-radius-3xl);
        background-color: var(--wui-gray-glass-002);
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);
        transform: translateX(calc(var(--local-tab) * var(--local-tab-width)));
        transition: transform var(--wui-ease-out-power-1) var(--wui-duration-md);
        will-change: background-color, opacity;
      }
    
      :host([data-type='flex'])::before {
        left: 3px;
        transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px)));
      }
    
      :host([data-type='flex']) {
        display: flex;
        padding: 0px 0px 0px 12px;
        gap: 4px;
      }
    
      :host([data-type='flex']) > button > wui-text {
        position: absolute;
        left: 18px;
        opacity: 0;
      }
    
      button[data-active='true'] > wui-icon,
      button[data-active='true'] > wui-text {
        color: var(--wui-color-fg-100);
      }
    
      button[data-active='false'] > wui-icon,
      button[data-active='false'] > wui-text {
        color: var(--wui-color-fg-200);
      }
    
      button[data-active='true']:disabled,
      button[data-active='false']:disabled {
        background-color: transparent;
        opacity: 0.5;
        cursor: not-allowed;
      }
    
      button[data-active='true']:disabled > wui-text {
        color: var(--wui-color-fg-200);
      }
    
      button[data-active='false']:disabled > wui-text {
        color: var(--wui-color-fg-300);
      }
    
      button > wui-icon,
      button > wui-text {
        pointer-events: none;
        transition: color var(--wui-e ase-out-power-1) var(--wui-duration-md);
        will-change: color;
      }
    
      button {
        width: var(--local-tab-width);
        transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
        will-change: background-color;
      }
    
      :host([data-type='flex']) > button {
        width: 34px;
        position: relative;
        display: flex;
        justify-content: flex-start;
      }
    
      button:hover:enabled,
      button:active:enabled {
        background-color: transparent !important;
      }
    
      button:hover:enabled > wui-icon,
      button:active:enabled > wui-icon {
        color: var(--wui-color-fg-125);
      }
    
      button:hover:enabled > wui-text,
      button:active:enabled > wui-text {
        color: var(--wui-color-fg-125);
      }
    
      button {
        border-radius: var(--wui-border-radius-3xl);
      }
    `})),uH=a((()=>{oR(),G$(),yR(),aL(),ER(),lH(),TU=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},OU=class extends QO{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.buttons=[],this.disabled=!1,this.localTabWidth="100px",this.activeTab=0,this.isDense=!1}render(){return this.isDense=this.tabs.length>3,this.style.cssText=`\n          --local-tab: ${this.activeTab};\n          --local-tab-width: ${this.localTabWidth};\n        `,this.dataset.type=this.isDense?"flex":"block",this.tabs.map(((e,t)=>{let r=t===this.activeTab;return MO`
            <button
              ?disabled=${this.disabled}
              @click=${()=>this.onTabClick(t)}
              data-active=${r}
              data-testid="tab-${e.label?.toLowerCase()}"
            >
              ${this.iconTemplate(e)}
              <wui-text variant="small-600" color="inherit"> ${e.label} </wui-text>
            </button>
          `}))}firstUpdated(){this.shadowRoot&&this.isDense&&(this.buttons=[...this.shadowRoot.querySelectorAll("button")],setTimeout((()=>{this.animateTabs(0,!0)}),0))}iconTemplate(e){return e.icon?MO`<wui-icon size="xs" color="inherit" name=${e.icon}></wui-icon>`:null}onTabClick(e){this.buttons&&this.animateTabs(e,!1),this.activeTab=e,this.onTabChange(e)}animateTabs(e,t){let r=this.buttons[this.activeTab],i=this.buttons[e],n=r?.querySelector("wui-text"),o=i?.querySelector("wui-text"),a=i?.getBoundingClientRect(),s=o?.getBoundingClientRect();r&&n&&!t&&e!==this.activeTab&&(n.animate([{opacity:0}],{duration:50,easing:"ease",fill:"forwards"}),r.animate([{width:"34px"}],{duration:500,easing:"ease",fill:"forwards"})),i&&a&&s&&o&&(e!==this.activeTab||t)&&(this.localTabWidth=`${Math.round(a.width+s.width)+6}px`,i.animate([{width:`${a.width+s.width}px`}],{duration:t?0:500,fill:"forwards",easing:"ease"}),o.animate([{opacity:1}],{duration:t?0:125,delay:t?0:200,fill:"forwards",easing:"ease"}))}},OU.styles=[gR,mR,AU],TU([IR({type:Array})],OU.prototype,"tabs",void 0),TU([IR()],OU.prototype,"onTabChange",void 0),TU([IR({type:Array})],OU.prototype,"buttons",void 0),TU([IR({type:Boolean})],OU.prototype,"disabled",void 0),TU([IR()],OU.prototype,"localTabWidth",void 0),TU([OR()],OU.prototype,"activeTab",void 0),TU([OR()],OU.prototype,"isDense",void 0),OU=TU([wR("wui-tabs")],OU)})),dH=a((()=>{oR(),RU=IT`
      :host {
        display: block;
      }
    
      :host > button {
        gap: var(--wui-spacing-xxs);
        padding: var(--wui-spacing-xs);
        padding-right: var(--wui-spacing-1xs);
        height: 40px;
        border-radius: var(--wui-border-radius-3xl);
        background: var(--wui-gray-glass-002);
        border-width: 0px;
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);
      }
    
      :host > button wui-image {
        width: 24px;
        height: 24px;
        border-radius: var(--wui-border-radius-s);
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);
      }
    `})),hH=a((()=>{oR(),G$(),ER(),yR(),_L(),cL(),XL(),dH(),NU=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},MU=class extends QO{constructor(){super(...arguments),this.text=""}render(){return MO`
          <button ontouchstart>
            ${this.tokenTemplate()}
            <wui-text variant="paragraph-600" color="fg-100">${this.text}</wui-text>
          </button>
        `}tokenTemplate(){return this.imageSrc?MO`<wui-image src=${this.imageSrc}></wui-image>`:MO`
          <wui-icon-box
            size="sm"
            iconColor="fg-200"
            backgroundColor="fg-300"
            icon="networkPlaceholder"
          ></wui-icon-box>
        `}},MU.styles=[gR,mR,RU],NU([IR()],MU.prototype,"imageSrc",void 0),NU([IR()],MU.prototype,"text",void 0),MU=NU([wR("wui-token-button")],MU)})),pH=a((()=>{oR(),$U=IT`
      :host {
        display: block;
        padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s);
        border-radius: var(--wui-border-radius-xxs);
    
        color: var(--wui-color-bg-100);
        position: relative;
      }
    
      :host([data-variant='shade']) {
        background-color: var(--wui-color-bg-150);
        border: 1px solid var(--wui-gray-glass-005);
      }
    
      :host([data-variant='shade']) > wui-text {
        color: var(--wui-color-fg-150);
      }
    
      :host([data-variant='fill']) {
        background-color: var(--wui-color-fg-100);
        border: none;
      }
    
      wui-icon {
        position: absolute;
        width: 12px !important;
        height: 4px !important;
      }
    
      wui-icon[data-placement='top'] {
        bottom: 0px;
        left: 50%;
        transform: translate(-50%, 95%);
      }
    
      wui-icon[data-placement='bottom'] {
        top: 0;
        left: 50%;
        transform: translate(-50%, -95%) rotate(180deg);
      }
    
      wui-icon[data-placement='right'] {
        top: 50%;
        left: 0;
        transform: translate(-65%, -50%) rotate(90deg);
      }
    
      wui-icon[data-placement='left'] {
        top: 50%;
        right: 0%;
        transform: translate(65%, -50%) rotate(270deg);
      }
    `})),fH=a((()=>{oR(),G$(),aL(),_L(),yR(),ER(),pH(),jU=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},LU=class extends QO{constructor(){super(...arguments),this.placement="top",this.variant="fill",this.message=""}render(){return this.dataset.variant=this.variant,MO`<wui-icon
            data-placement=${this.placement}
            color="fg-100"
            size="inherit"
            name=${"fill"===this.variant?"cursor":"cursorTransparent"}
          ></wui-icon>
          <wui-text color="inherit" variant="small-500">${this.message}</wui-text>`}},LU.styles=[gR,mR,$U],jU([IR()],LU.prototype,"placement",void 0),jU([IR()],LU.prototype,"variant",void 0),jU([IR()],LU.prototype,"message",void 0),LU=jU([wR("wui-tooltip")],LU)})),gH=a((()=>{oR(),BU=IT`
      :host {
        position: relative;
      }
    
      button {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 48px;
        width: 100%;
        background-color: var(--wui-accent-glass-010);
        border-radius: var(--wui-border-radius-xs);
        border: 1px solid var(--wui-accent-glass-010);
        transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
        will-change: background-color;
      }
    
      wui-tooltip {
        padding: 7px var(--wui-spacing-s) 8px var(--wui-spacing-s);
        position: absolute;
        top: -8px;
        left: 50%;
        transform: translate(-50%, -100%);
        opacity: 0;
        display: none;
      }
    
      @media (hover: hover) and (pointer: fine) {
        button:hover:enabled {
          background-color: var(--wui-accent-glass-015);
        }
    
        button:active:enabled {
          background-color: var(--wui-accent-glass-020);
        }
      }
    `})),mH=a((()=>{oR(),G$(),ER(),gH(),fH(),aL(),yR(),DU=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},UU=class extends QO{constructor(){super(...arguments),this.text="",this.icon="card"}render(){return MO`<button
            @mouseenter=${this.onMouseEnter.bind(this)}
            @mouseleave=${this.onMouseLeave.bind(this)}
            ontouchstart
          >
            <wui-icon color="accent-100" name=${this.icon} size="lg"></wui-icon>
          </button>
          <wui-tooltip variant="shade" message=${this.text} placement="top"></wui-tooltip>`}onMouseEnter(){let e=this.shadowRoot?.querySelector("wui-tooltip");e&&(e.style.display="flex",e?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease",duration:250}))}onMouseLeave(){let e=this.shadowRoot?.querySelector("wui-tooltip");e&&(e.style.display="none",e?.animate([{opacity:1},{opacity:0}],{fill:"forwards",easing:"ease",duration:200}))}},UU.styles=[gR,mR,BU],DU([IR()],UU.prototype,"text",void 0),DU([IR()],UU.prototype,"icon",void 0),UU=DU([wR("wui-tooltip-select")],UU)})),bH=a((()=>{oR(),FU=IT`
      :host > wui-flex {
        cursor: pointer;
        display: flex;
        column-gap: var(--wui-spacing-s);
        padding: var(--wui-spacing-xs);
        padding-right: var(--wui-spacing-l);
        width: 100%;
        background-color: transparent;
        border-radius: var(--wui-border-radius-xs);
        color: var(--wui-color-fg-250);
        transition: background-color 0.2s linear;
      }
    
      :host > wui-flex:hover {
        background-color: var(--wui-gray-glass-002);
      }
    
      :host([disabled]) > wui-flex {
        opacity: 0.6;
      }
    
      :host([disabled]) > wui-flex:hover {
        background-color: transparent;
      }
    
      :host > wui-flex > wui-flex {
        flex: 1;
      }
    
      :host > wui-flex > wui-image {
        width: 40px;
        height: 40px;
        border-radius: var(--wui-border-radius-3xl);
        position: relative;
      }
    
      :host > wui-flex > wui-image::after {
        position: absolute;
        content: '';
        inset: 0;
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);
        border-radius: var(--wui-border-radius-l);
      }
    
      button > wui-icon-box[data-variant='square-blue'] {
        border-radius: var(--wui-border-radius-3xs);
        position: relative;
        border: none;
        width: 36px;
        height: 36px;
      }
    `})),yH=a((()=>{oR(),G$(),aL(),cL(),hL(),_L(),KL(),yR(),ER(),XL(),bH(),GL(),GT(),HU=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},zU=class extends QO{constructor(){super(...arguments),this.imageSrc=void 0,this.name=void 0,this.symbol=void 0,this.price=void 0,this.amount=void 0}render(){let e=WA.multiply(this.price,this.amount)?.toFixed(3);return MO`
          <wui-flex alignItems="center">
            ${this.visualTemplate()}
            <wui-flex flexDirection="column" gap="3xs">
              <wui-flex justifyContent="space-between">
                <wui-text variant="paragraph-500" color="fg-100">${this.name}</wui-text>
                ${e?MO`
                      <wui-text variant="paragraph-500" color="fg-100">
                        $${FM.formatNumberToLocalString(e,3)}
                      </wui-text>
                    `:null}
              </wui-flex>
              <wui-flex justifyContent="space-between">
                <wui-text variant="small-400" color="fg-200">${this.symbol}</wui-text>
                ${this.amount&&MO`<wui-text variant="small-400" color="fg-200"
                  >${FM.formatNumberToLocalString(this.amount,4)}</wui-text
                >`}
              </wui-flex>
            </wui-flex>
          </wui-flex>
        `}visualTemplate(){return this.imageSrc?MO`<wui-image width="40" height="40" src=${this.imageSrc}></wui-image>`:null}},zU.styles=[gR,mR,FU],HU([IR()],zU.prototype,"imageSrc",void 0),HU([IR()],zU.prototype,"name",void 0),HU([IR()],zU.prototype,"symbol",void 0),HU([IR()],zU.prototype,"price",void 0),HU([IR()],zU.prototype,"amount",void 0),zU=HU([wR("wui-token-list-item")],zU)})),wH=a((()=>{oR(),qU=IT`
      :host {
        display: flex;
        justify-content: center;
        align-items: center;
        width: var(--wui-icon-box-size-xl);
        height: var(--wui-icon-box-size-xl);
        box-shadow: 0 0 0 8px var(--wui-thumbnail-border);
        border-radius: var(--local-border-radius);
        overflow: hidden;
      }
    
      wui-icon {
        width: 32px;
        height: 32px;
      }
    `})),vH=a((()=>{oR(),G$(),cL(),aL(),yR(),ER(),wH(),WU=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},(VU=class extends QO{render(){return this.style.cssText=`--local-border-radius: ${this.borderRadiusFull?"1000px":"20px"};`,MO`${this.templateVisual()}`}templateVisual(){return this.imageSrc?MO`<wui-image src=${this.imageSrc} alt=${this.alt??""}></wui-image>`:MO`<wui-icon
          data-parent-size="md"
          size="inherit"
          color="inherit"
          name="walletPlaceholder"
        ></wui-icon>`}}).styles=[gR,qU],WU([IR()],VU.prototype,"imageSrc",void 0),WU([IR()],VU.prototype,"alt",void 0),WU([IR({type:Boolean})],VU.prototype,"borderRadiusFull",void 0),VU=WU([wR("wui-visual-thumbnail")],VU)})),_H=a((()=>{oR(),GU=IT`
      :host {
        display: block;
      }
    
      button {
        width: 100%;
        display: block;
        padding-top: var(--wui-spacing-l);
        padding-bottom: var(--wui-spacing-l);
        padding-left: var(--wui-spacing-s);
        padding-right: var(--wui-spacing-2l);
        border-radius: var(--wui-border-radius-s);
        background-color: var(--wui-accent-glass-015);
      }
    
      button:hover {
        background-color: var(--wui-accent-glass-010) !important;
      }
    
      button:active {
        background-color: var(--wui-accent-glass-020) !important;
      }
    `})),xH=a((()=>{oR(),KL(),_L(),sB(),XL(),yR(),ER(),_H(),G$(),ZU=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},KU=class extends QO{constructor(){super(...arguments),this.label="",this.description="",this.icon="wallet"}render(){return MO`
          <button>
            <wui-flex gap="m" alignItems="center" justifyContent="space-between">
              <wui-icon-box
                size="lg"
                iconcolor="accent-100"
                backgroundcolor="accent-100"
                icon=${this.icon}
                background="transparent"
              ></wui-icon-box>
    
              <wui-flex flexDirection="column" gap="3xs">
                <wui-text variant="paragraph-500" color="fg-100">${this.label}</wui-text>
                <wui-text variant="small-400" color="fg-200">${this.description}</wui-text>
              </wui-flex>
    
              <wui-icon size="md" color="fg-200" name="chevronRight"></wui-icon>
            </wui-flex>
          </button>
        `}},KU.styles=[gR,mR,GU],ZU([IR()],KU.prototype,"label",void 0),ZU([IR()],KU.prototype,"description",void 0),ZU([IR()],KU.prototype,"icon",void 0),KU=ZU([wR("wui-notice-card")],KU)})),EH=a((()=>{oR(),YU=IT`
      button {
        height: auto;
        position: relative;
        flex-direction: column;
        gap: var(--wui-spacing-s);
        padding: 17px 18px 17px var(--wui-spacing-m);
        width: 100%;
        background-color: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-xs);
        color: var(--wui-color-fg-250);
      }
    
      .overflowedContent {
        width: 100%;
        overflow: hidden;
      }
    
      .overflowedContent[data-active='false']:after {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(to top, var(--wui-color-bg-200), transparent);
        border-bottom-left-radius: var(--wui-border-radius-xs);
        border-bottom-right-radius: var(--wui-border-radius-xs);
      }
    
      .heightContent {
        max-height: 100px;
      }
    
      pre {
        text-align: left;
        white-space: pre-wrap;
        height: auto;
        overflow-x: auto;
        overflow-wrap: anywhere;
      }
    `})),CH=a((()=>{oR(),G$(),aL(),_L(),KL(),yR(),ER(),EH(),JU=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},100,QU=class extends QO{constructor(){super(...arguments),this.textTitle="",this.overflowedContent="",this.toggled=!1,this.enableAccordion=!1,this.scrollElement=void 0,this.scrollHeightElement=0}updated(e){super.updated(e),(e.has("textTitle")||e.has("overflowedContent"))&&setTimeout((()=>{this.checkHeight()}),1)}checkHeight(){this.updateComplete.then((()=>{let e=this.shadowRoot?.querySelector(".heightContent"),t=this.shadowRoot?.querySelector(".textContent");if(e&&t){this.scrollElement=e;let r=t?.scrollHeight;r&&r>100&&(this.enableAccordion=!0,this.scrollHeightElement=r,this.requestUpdate())}}))}render(){return MO`
          <button ontouchstart @click=${()=>this.onClick()}>
            <wui-flex justifyContent="space-between" alignItems="center">
              <wui-text variant="paragraph-500" color="fg-100">${this.textTitle}</wui-text>
              ${this.chevronTemplate()}
            </wui-flex>
            <div
              data-active=${!this.enableAccordion||!!this.toggled}
              class="overflowedContent"
            >
              <div class="heightContent">
                <wui-text class="textContent" variant="paragraph-400" color="fg-200">
                  <pre>${this.overflowedContent}</pre>
                </wui-text>
              </div>
            </div>
          </button>
        `}onClick(){let e=this.shadowRoot?.querySelector("wui-icon");this.enableAccordion&&(this.toggled=!this.toggled,this.requestUpdate(),this.scrollElement&&this.scrollElement.animate([{maxHeight:this.toggled?"100px":`${this.scrollHeightElement}px`},{maxHeight:this.toggled?`${this.scrollHeightElement}px`:"100px"}],{duration:300,fill:"forwards",easing:"ease"}),e&&e.animate([{transform:this.toggled?"rotate(0deg)":"rotate(180deg)"},{transform:this.toggled?"rotate(180deg)":"rotate(0deg)"}],{duration:300,fill:"forwards",easing:"ease"}))}chevronTemplate(){return this.enableAccordion?MO` <wui-icon color="fg-100" size="sm" name="chevronBottom"></wui-icon>`:null}},QU.styles=[gR,mR,YU],JU([IR()],QU.prototype,"textTitle",void 0),JU([IR()],QU.prototype,"overflowedContent",void 0),QU=JU([wR("wui-list-accordion")],QU)})),kH=a((()=>{oR(),XU=IT`
      :host {
        display: flex;
        column-gap: var(--wui-spacing-s);
        padding: 17px 18px 17px var(--wui-spacing-m);
        width: 100%;
        background-color: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-xs);
        color: var(--wui-color-fg-250);
      }
    
      wui-image {
        width: var(--wui-icon-size-lg);
        height: var(--wui-icon-size-lg);
        border-radius: var(--wui-border-radius-3xl);
      }
    
      wui-icon {
        width: var(--wui-icon-size-lg);
        height: var(--wui-icon-size-lg);
      }
    `})),PH=a((()=>{oR(),G$(),aL(),cL(),_L(),KL(),yR(),ER(),kH(),eF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},tF=class extends QO{constructor(){super(...arguments),this.imageSrc=void 0,this.textTitle="",this.textValue=void 0}render(){return MO`
          <wui-flex justifyContent="space-between" alignItems="center">
            <wui-text variant="paragraph-500" color=${this.textValue?"fg-200":"fg-100"}>
              ${this.textTitle}
            </wui-text>
            ${this.templateContent()}
          </wui-flex>
        `}templateContent(){return this.imageSrc?MO`<wui-image src=${this.imageSrc} alt=${this.textTitle}></wui-image>`:this.textValue?MO` <wui-text variant="paragraph-400" color="fg-100"> ${this.textValue} </wui-text>`:MO`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}},tF.styles=[gR,mR,XU],eF([IR()],tF.prototype,"imageSrc",void 0),eF([IR()],tF.prototype,"textTitle",void 0),eF([IR()],tF.prototype,"textValue",void 0),tF=eF([wR("wui-list-content")],tF)})),IH=a((()=>{oR(),rF=IT`
      button {
        column-gap: var(--wui-spacing-s);
        padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
        width: 100%;
        background-color: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-xs);
        color: var(--wui-color-fg-100);
      }
    
      button > wui-text:nth-child(2) {
        display: flex;
        flex: 1;
      }
    
      button[data-transparent='true'] {
        pointer-events: none;
        background-color: transparent;
      }
    
      wui-icon {
        color: var(--wui-color-fg-200) !important;
      }
    
      button:disabled {
        background-color: var(--wui-gray-glass-015);
        color: var(--wui-gray-glass-015);
      }
    
      button:disabled > wui-tag {
        background-color: var(--wui-gray-glass-010);
        color: var(--wui-color-fg-300);
      }
    `})),SH=a((()=>{oR(),G$(),_L(),yR(),ER(),fB(),IH(),iF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},nF=class extends QO{constructor(){super(...arguments),this.imageSrc="",this.name="",this.disabled=!1,this.transparent=!1}render(){return MO`
          <button data-transparent=${this.transparent} ?disabled=${this.disabled} ontouchstart>
            ${this.templateNetworkImage()}
            <wui-text variant="paragraph-500" color="inherit">${this.name}</wui-text>
          </button>
        `}templateNetworkImage(){return this.imageSrc?MO`<wui-network-image
            size="sm"
            imageSrc=${this.imageSrc}
            name=${this.name}
          ></wui-network-image>`:this.imageSrc?null:MO`<wui-network-image size="sm" name=${this.name}></wui-network-image>`}},nF.styles=[gR,mR,rF],iF([IR()],nF.prototype,"imageSrc",void 0),iF([IR()],nF.prototype,"name",void 0),iF([IR({type:Boolean})],nF.prototype,"disabled",void 0),iF([IR({type:Boolean})],nF.prototype,"transparent",void 0),nF=iF([wR("wui-list-network")],nF)})),AH=a((()=>{oR(),oF=IT`
      :host {
        display: flex;
        flex-direction: column;
        gap: var(--wui-spacing-l);
        padding: 17px 18px 17px var(--wui-spacing-m);
        width: 100%;
        background-color: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-xs);
        color: var(--wui-color-fg-250);
      }
    
      wui-image {
        width: var(--wui-icon-size-lg);
        height: var(--wui-icon-size-lg);
        border-radius: var(--wui-border-radius-3xl);
      }
    
      wui-icon {
        width: var(--wui-icon-size-lg);
        height: var(--wui-icon-size-lg);
      }
    `})),TH=a((()=>{oR(),G$(),aL(),cL(),_L(),yB(),KL(),yR(),ER(),AH(),aF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},sF=class extends QO{constructor(){super(...arguments),this.amount="",this.networkCurreny="",this.networkImageUrl="",this.receiverAddress="",this.addressExplorerUrl=""}render(){return MO`
          <wui-flex justifyContent="space-between" alignItems="center">
            <wui-text variant="paragraph-500" color="fg-200">Sending</wui-text>
            <wui-flex gap="xs" alignItems="center">
              <wui-text variant="paragraph-400" color="fg-100">
                ${this.amount} ${this.networkCurreny}
              </wui-text>
              ${this.templateNetworkVisual()}
            </wui-flex>
          </wui-flex>
          <wui-flex justifyContent="space-between" alignItems="center">
            <wui-text variant="paragraph-500" color="fg-200">To</wui-text>
            <wui-chip
              icon="externalLink"
              variant="shadeSmall"
              href=${this.addressExplorerUrl}
              title=${this.receiverAddress}
            ></wui-chip>
          </wui-flex>
        `}templateNetworkVisual(){return this.networkImageUrl?MO`<wui-image src=${this.networkImageUrl} alt="Network Image"></wui-image>`:MO`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}},sF.styles=[gR,mR,oF],aF([IR()],sF.prototype,"amount",void 0),aF([IR()],sF.prototype,"networkCurreny",void 0),aF([IR()],sF.prototype,"networkImageUrl",void 0),aF([IR()],sF.prototype,"receiverAddress",void 0),aF([IR()],sF.prototype,"addressExplorerUrl",void 0),sF=aF([wR("wui-list-wallet-transaction")],sF)})),OH=a((()=>{oR(),cF=IT`
      :host {
        width: 100%;
      }
    
      :host > wui-flex {
        width: 100%;
        padding: var(--wui-spacing-s);
        border-radius: var(--wui-border-radius-xs);
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: var(--wui-spacing-s);
      }
    
      :host > wui-flex:hover {
        background-color: var(--wui-gray-glass-002);
      }
    
      .purchase-image-container {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        width: var(--wui-icon-box-size-lg);
        height: var(--wui-icon-box-size-lg);
      }
    
      .purchase-image-container wui-image {
        width: 100%;
        height: 100%;
        position: relative;
        border-radius: calc(var(--wui-icon-box-size-lg) / 2);
      }
    
      .purchase-image-container wui-image::after {
        content: '';
        display: block;
        width: 100%;
        height: 100%;
        position: absolute;
        inset: 0;
        border-radius: calc(var(--wui-icon-box-size-lg) / 2);
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);
      }
    
      .purchase-image-container wui-icon-box {
        position: absolute;
        right: 0;
        bottom: 0;
        transform: translate(20%, 20%);
      }
    `})),RH=a((()=>{oR(),G$(),aL(),_L(),yR(),ER(),OH(),cO(),lF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},uF=class extends QO{constructor(){super(...arguments),this.disabled=!1,this.color="inherit",this.label="Bought",this.purchaseValue="",this.purchaseCurrency="",this.date="",this.completed=!1,this.inProgress=!1,this.failed=!1,this.onClick=null,this.symbol=""}firstUpdated(){this.icon||this.fetchTokenImage()}render(){return MO`
          <wui-flex>
            ${this.imageTemplate()}
            <wui-flex flexDirection="column" gap="4xs" flexGrow="1">
              <wui-flex gap="xxs" alignItems="center" justifyContent="flex-start">
                ${this.statusIconTemplate()}
                <wui-text variant="paragraph-500" color="fg-100"> ${this.label}</wui-text>
              </wui-flex>
              <wui-text variant="small-400" color="fg-200">
                + ${this.purchaseValue} ${this.purchaseCurrency}
              </wui-text>
            </wui-flex>
            ${this.inProgress?MO`<wui-loading-spinner color="fg-200" size="md"></wui-loading-spinner>`:MO`<wui-text variant="micro-700" color="fg-300"><span>${this.date}</span></wui-text>`}
          </wui-flex>
        `}async fetchTokenImage(){await uT._fetchTokenImage(this.purchaseCurrency)}statusIconTemplate(){return this.inProgress?null:this.completed?this.boughtIconTemplate():this.errorIconTemplate()}errorIconTemplate(){return MO`<wui-icon-box
          size="xxs"
          iconColor="error-100"
          backgroundColor="error-100"
          background="opaque"
          icon="close"
          borderColor="wui-color-bg-125"
        ></wui-icon-box>`}imageTemplate(){let e=this.icon||`https://avatar.vercel.sh/andrew.svg?size=50&text=${this.symbol}`;return MO`<wui-flex class="purchase-image-container">
          <wui-image src=${e}></wui-image>
        </wui-flex>`}boughtIconTemplate(){return MO`<wui-icon-box
          size="xxs"
          iconColor="success-100"
          backgroundColor="success-100"
          background="opaque"
          icon="arrowBottom"
          borderColor="wui-color-bg-125"
        ></wui-icon-box>`}},uF.styles=[gR,mR,cF],lF([IR({type:Boolean})],uF.prototype,"disabled",void 0),lF([IR()],uF.prototype,"color",void 0),lF([IR()],uF.prototype,"label",void 0),lF([IR()],uF.prototype,"purchaseValue",void 0),lF([IR()],uF.prototype,"purchaseCurrency",void 0),lF([IR()],uF.prototype,"date",void 0),lF([IR({type:Boolean})],uF.prototype,"completed",void 0),lF([IR({type:Boolean})],uF.prototype,"inProgress",void 0),lF([IR({type:Boolean})],uF.prototype,"failed",void 0),lF([IR()],uF.prototype,"onClick",void 0),lF([IR()],uF.prototype,"symbol",void 0),lF([IR()],uF.prototype,"icon",void 0),uF=lF([wR("wui-onramp-activity-item")],uF)})),NH=a((()=>{oR(),dF=IT`
      button {
        padding: var(--wui-spacing-s);
        border-radius: var(--wui-border-radius-xs);
        background-color: var(--wui-gray-glass-002);
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: var(--wui-spacing-s);
        transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
        will-change: background-color;
      }
    
      button:hover {
        background-color: var(--wui-gray-glass-005);
      }
    
      .provider-image {
        width: var(--wui-spacing-3xl);
        min-width: var(--wui-spacing-3xl);
        height: var(--wui-spacing-3xl);
        border-radius: calc(var(--wui-border-radius-xs) - calc(var(--wui-spacing-s) / 2));
        position: relative;
        overflow: hidden;
      }
    
      .provider-image::after {
        content: '';
        display: block;
        width: 100%;
        height: 100%;
        position: absolute;
        inset: 0;
        border-radius: calc(var(--wui-border-radius-xs) - calc(var(--wui-spacing-s) / 2));
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);
      }
    
      .network-icon {
        width: var(--wui-spacing-m);
        height: var(--wui-spacing-m);
        border-radius: calc(var(--wui-spacing-m) / 2);
        overflow: hidden;
        box-shadow:
          0 0 0 3px var(--wui-gray-glass-002),
          0 0 0 3px var(--wui-color-modal-bg);
        transition: box-shadow var(--wui-ease-out-power-1) var(--wui-duration-md);
        will-change: box-shadow;
      }
    
      button:hover .network-icon {
        box-shadow:
          0 0 0 3px var(--wui-gray-glass-005),
          0 0 0 3px var(--wui-color-modal-bg);
      }
    `})),MH=a((()=>{oR(),G$(),cO(),aL(),_L(),yR(),ER(),NH(),VL(),hF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},pF=class extends QO{constructor(){super(...arguments),this.disabled=!1,this.color="inherit",this.label="",this.feeRange="",this.loading=!1,this.onClick=null}render(){return MO`
          <button ?disabled=${this.disabled} ontouchstart>
            <wui-visual name=${UM(this.name)} class="provider-image"></wui-visual>
            <wui-flex flexDirection="column" gap="4xs">
              <wui-text variant="paragraph-500" color="fg-100">${this.label}</wui-text>
              <wui-flex alignItems="center" justifyContent="flex-start" gap="l">
                <wui-text variant="tiny-500" color="fg-100">
                  <wui-text variant="tiny-400" color="fg-200">Fees</wui-text>
                  ${this.feeRange}
                </wui-text>
                <wui-flex gap="xxs">
                  <wui-icon name="bank" size="xs" color="fg-150"></wui-icon>
                  <wui-icon name="card" size="xs" color="fg-150"></wui-icon>
                </wui-flex>
                ${this.networksTemplate()}
              </wui-flex>
            </wui-flex>
            ${this.loading?MO`<wui-loading-spinner color="fg-200" size="md"></wui-loading-spinner>`:MO`<wui-icon name="chevronRight" color="fg-200" size="sm"></wui-icon>`}
          </button>
        `}networksTemplate(){let e=GA.getRequestedCaipNetworks()?.filter((e=>e?.imageId))?.slice(0,5);return MO`
          <wui-flex class="networks">
            ${e?.map((e=>MO`
                <wui-flex class="network-icon">
                  <wui-image src=${UM(wT.getNetworkImage(e))}></wui-image>
                </wui-flex>
              `))}
          </wui-flex>
        `}},pF.styles=[gR,mR,dF],hF([IR({type:Boolean})],pF.prototype,"disabled",void 0),hF([IR()],pF.prototype,"color",void 0),hF([IR()],pF.prototype,"name",void 0),hF([IR()],pF.prototype,"label",void 0),hF([IR()],pF.prototype,"feeRange",void 0),hF([IR({type:Boolean})],pF.prototype,"loading",void 0),hF([IR()],pF.prototype,"onClick",void 0),pF=hF([wR("wui-onramp-provider-item")],pF)})),$H=a((()=>{oR(),fF=IT`
      button {
        display: flex;
        gap: var(--wui-spacing-3xs);
        align-items: center;
        padding: 6.25px var(--wui-spacing-xs) 7.25px var(--wui-spacing-s);
        background-color: var(--wui-gray-glass-090);
        border-radius: var(--wui-border-radius-3xl);
        border: 1px solid var(--wui-gray-glass-060);
        transition: background-color var(--wui-duration-md) var(--wui-ease-inout-power-1);
        will-change: background-color;
      }
    
      @media (hover: hover) and (pointer: fine) {
        button:hover:enabled {
          background-color: var(--wui-gray-glass-080);
        }
    
        button:active:enabled {
          background-color: var(--wui-gray-glass-060);
        }
      }
    `})),jH=a((()=>{oR(),G$(),ER(),$H(),_L(),aL(),yR(),gF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},mF=class extends QO{constructor(){super(...arguments),this.text=""}render(){return MO`<button ontouchstart>
          <wui-text variant="small-600" color="bg-100">${this.text}</wui-text>
          <wui-icon color="bg-100" size="xs" name="arrowRight"></wui-icon>
        </button>`}},mF.styles=[gR,mR,fF],gF([IR()],mF.prototype,"text",void 0),mF=gF([wR("wui-promo")],mF)})),LH=a((()=>{oR(),bF=IT`
      span {
        font-weight: 500;
        font-size: 40px;
        color: var(--wui-color-fg-100);
        line-height: 130%; /* 52px */
        letter-spacing: -1.6px;
        text-align: center;
      }
    
      .pennies {
        color: var(--wui-color-fg-200);
      }
    `})),BH=a((()=>{oR(),G$(),ER(),LH(),yR(),yF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},wF=class extends QO{constructor(){super(...arguments),this.dollars="0",this.pennies="00"}render(){return MO`<span>$${this.dollars}<span class="pennies">.${this.pennies}</span></span>`}},wF.styles=[gR,bF],yF([IR()],wF.prototype,"dollars",void 0),yF([IR()],wF.prototype,"pennies",void 0),wF=yF([wR("wui-balance")],wF)})),DH=a((()=>{oR(),vF=IT`
      button {
        background-color: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-3xl);
        border: 1px solid var(--wui-gray-glass-002);
        padding: var(--wui-spacing-xs) var(--wui-spacing-s) var(--wui-spacing-xs) var(--wui-spacing-xs);
        position: relative;
      }
    
      wui-avatar {
        width: 32px;
        height: 32px;
        box-shadow: 0 0 0 0;
        outline: 3px solid var(--wui-gray-glass-005);
      }
    
      wui-icon-box,
      wui-image {
        width: 16px;
        height: 16px;
        border-radius: var(--wui-border-radius-3xl);
        position: absolute;
        left: 26px;
        top: 24px;
      }
    
      wui-image {
        outline: 2px solid var(--wui-color-bg-125);
      }
    
      wui-icon-box {
        outline: 2px solid var(--wui-color-bg-200);
        background-color: var(--wui-color-bg-250);
      }
    `})),UH=a((()=>{oR(),G$(),aL(),_L(),cL(),KL(),JL(),XL(),yR(),ER(),DH(),GL(),_F=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},xF=class extends QO{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.isProfileName=!1,this.address="",this.icon="chevronBottom"}render(){return MO`<button ontouchstart data-testid="wui-profile-button">
          <wui-flex gap="xs" alignItems="center">
            <wui-avatar
              .imageSrc=${this.avatarSrc}
              alt=${this.address}
              address=${this.address}
            ></wui-avatar>
            ${this.networkImageTemplate()}
            <wui-flex gap="xs" alignItems="center">
              <wui-text variant="large-600" color="fg-100">
                ${FM.getTruncateString({string:this.address,charsStart:this.isProfileName?18:4,charsEnd:this.isProfileName?0:4,truncate:this.isProfileName?"end":"middle"})}
              </wui-text>
              <wui-icon size="sm" color="fg-200" name=${this.icon}></wui-icon>
            </wui-flex>
          </wui-flex>
        </button>`}networkImageTemplate(){return this.networkSrc?MO`<wui-image src=${this.networkSrc}></wui-image>`:MO`
          <wui-icon-box
            size="xxs"
            iconColor="fg-200"
            backgroundColor="bg-100"
            icon="networkPlaceholder"
          ></wui-icon-box>
        `}},xF.styles=[gR,mR,vF],_F([IR()],xF.prototype,"networkSrc",void 0),_F([IR()],xF.prototype,"avatarSrc",void 0),_F([IR({type:Boolean})],xF.prototype,"isProfileName",void 0),_F([IR()],xF.prototype,"address",void 0),_F([IR()],xF.prototype,"icon",void 0),xF=_F([wR("wui-profile-button")],xF)})),FH=a((()=>{oR(),EF=IT`
      button {
        border: 1px solid var(--wui-gray-glass-010);
        border-radius: var(--wui-border-radius-3xl);
      }
    
      wui-image {
        border-radius: var(--wui-border-radius-3xl);
        overflow: hidden;
      }
    
      button.disabled > wui-icon,
      button.disabled > wui-image {
        filter: grayscale(1);
      }
    
      button[data-variant='fill'] {
        color: var(--wui-color-inverse-100);
        background-color: var(--wui-color-accent-100);
      }
    
      button[data-variant='shade'],
      button[data-variant='shadeSmall'] {
        background-color: transparent;
        background-color: var(--wui-gray-glass-010);
        color: var(--wui-color-fg-200);
      }
    
      button[data-variant='success'] {
        column-gap: var(--wui-spacing-xxs);
        border: 1px solid var(--wui-success-glass-010);
        background-color: var(--wui-success-glass-010);
        color: var(--wui-color-success-100);
      }
    
      button[data-variant='error'] {
        column-gap: var(--wui-spacing-xxs);
        border: 1px solid var(--wui-error-glass-010);
        background-color: var(--wui-error-glass-010);
        color: var(--wui-color-error-100);
      }
    
      button[data-variant='transparent'] {
        column-gap: var(--wui-spacing-xxs);
        background-color: transparent;
        color: var(--wui-color-fg-150);
      }
    
      button[data-variant='transparent'],
      button[data-variant='success'],
      button[data-variant='shadeSmall'],
      button[data-variant='error'] {
        padding: 7px var(--wui-spacing-s) 7px 8px;
      }
    
      button[data-variant='transparent']:has(wui-text:first-child),
      button[data-variant='success']:has(wui-text:first-child),
      button[data-variant='shadeSmall']:has(wui-text:first-child),
      button[data-variant='error']:has(wui-text:first-child) {
        padding: 7px var(--wui-spacing-s);
      }
    
      button[data-variant='fill'],
      button[data-variant='shade'] {
        column-gap: var(--wui-spacing-xs);
        padding: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-xxs)
          var(--wui-spacing-xs);
      }
    
      button[data-variant='fill']:has(wui-text:first-child),
      button[data-variant='shade']:has(wui-text:first-child) {
        padding: 9px var(--wui-spacing-m) 9px var(--wui-spacing-m);
      }
    
      button[data-variant='fill'] > wui-image,
      button[data-variant='shade'] > wui-image {
        width: 24px;
        height: 24px;
      }
    
      button[data-variant='fill'] > wui-image {
        box-shadow: inset 0 0 0 1px var(--wui-color-accent-090);
      }
    
      button[data-variant='shade'] > wui-image,
      button[data-variant='shadeSmall'] > wui-image {
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);
      }
    
      button[data-variant='fill'] > wui-icon,
      button[data-variant='shade'] > wui-icon {
        width: 14px;
        height: 14px;
      }
    
      button[data-variant='transparent'] > wui-image,
      button[data-variant='success'] > wui-image,
      button[data-variant='shadeSmall'] > wui-image,
      button[data-variant='error'] > wui-image {
        width: 14px;
        height: 14px;
      }
    
      button[data-variant='transparent'] > wui-icon,
      button[data-variant='success'] > wui-icon,
      button[data-variant='shadeSmall'] > wui-icon,
      button[data-variant='error'] > wui-icon {
        width: 12px;
        height: 12px;
      }
    
      button[data-variant='fill']:focus-visible {
        background-color: var(--wui-color-accent-090);
      }
    
      button[data-variant='shade']:focus-visible,
      button[data-variant='shadeSmall']:focus-visible {
        background-color: var(--wui-gray-glass-015);
      }
    
      button[data-variant='transparent']:focus-visible {
        background-color: var(--wui-gray-glass-005);
      }
    
      button[data-variant='success']:focus-visible {
        background-color: var(--wui-success-glass-015);
      }
    
      button[data-variant='error']:focus-visible {
        background-color: var(--wui-error-glass-015);
      }
    
      button.disabled {
        color: var(--wui-gray-glass-015);
        background-color: var(--wui-gray-glass-015);
        pointer-events: none;
      }
    
      @media (hover: hover) and (pointer: fine) {
        button[data-variant='fill']:hover {
          background-color: var(--wui-color-accent-090);
        }
    
        button[data-variant='shade']:hover,
        button[data-variant='shadeSmall']:hover {
          background-color: var(--wui-gray-glass-015);
        }
    
        button[data-variant='transparent']:hover {
          background-color: var(--wui-gray-glass-005);
        }
    
        button[data-variant='success']:hover {
          background-color: var(--wui-success-glass-015);
        }
    
        button[data-variant='error']:hover {
          background-color: var(--wui-error-glass-015);
        }
      }
    
      button[data-variant='fill']:active {
        background-color: var(--wui-color-accent-080);
      }
    
      button[data-variant='shade']:active,
      button[data-variant='shadeSmall']:active {
        background-color: var(--wui-gray-glass-020);
      }
    
      button[data-variant='transparent']:active {
        background-color: var(--wui-gray-glass-010);
      }
    
      button[data-variant='success']:active {
        background-color: var(--wui-success-glass-020);
      }
    
      button[data-variant='error']:active {
        background-color: var(--wui-error-glass-020);
      }
    `})),HH=a((()=>{oR(),G$(),aL(),cL(),_L(),yR(),ER(),FH(),CF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},kF=class extends QO{constructor(){super(...arguments),this.variant="fill",this.imageSrc="",this.disabled=!1,this.icon="externalLink",this.text=""}render(){let e="success"===this.variant||"transparent"===this.variant||"shadeSmall"===this.variant?"small-600":"paragraph-600";return MO`
          <button class=${this.disabled?"disabled":""} data-variant=${this.variant}>
            <wui-image src=${this.imageSrc}></wui-image>
            <wui-text variant=${e} color="inherit"> ${this.text} </wui-text>
            <wui-icon name=${this.icon} color="inherit" size="inherit"></wui-icon>
          </button>
        `}},kF.styles=[gR,mR,EF],CF([IR()],kF.prototype,"variant",void 0),CF([IR()],kF.prototype,"imageSrc",void 0),CF([IR({type:Boolean})],kF.prototype,"disabled",void 0),CF([IR()],kF.prototype,"icon",void 0),CF([IR()],kF.prototype,"text",void 0),kF=CF([wR("wui-chip-button")],kF)})),zH=a((()=>{oR(),PF=IT`
      button {
        display: flex;
        gap: var(--wui-spacing-xl);
        width: 100%;
        background-color: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-xxs);
        padding: var(--wui-spacing-m) var(--wui-spacing-s);
      }
    
      wui-text {
        width: 100%;
      }
    
      wui-flex {
        width: auto;
      }
    
      .network-icon {
        width: var(--wui-spacing-2l);
        height: var(--wui-spacing-2l);
        border-radius: calc(var(--wui-spacing-2l) / 2);
        overflow: hidden;
        box-shadow:
          0 0 0 3px var(--wui-gray-glass-002),
          0 0 0 3px var(--wui-color-modal-bg);
      }
    `})),qH=a((()=>{oR(),G$(),aL(),_L(),cL(),KL(),yR(),ER(),zH(),IF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},SF=class extends QO{constructor(){super(...arguments),this.networkImages=[""],this.text=""}render(){return MO`
          <button ontouchstart>
            <wui-text variant="small-400" color="fg-200">${this.text}</wui-text>
            <wui-flex gap="3xs" alignItems="center">
              ${this.networksTemplate()}
              <wui-icon name="chevronRight" size="sm" color="fg-200"></wui-icon>
            </wui-flex>
          </button>
        `}networksTemplate(){let e=this.networkImages.slice(0,5);return MO` <wui-flex class="networks">
          ${e?.map((e=>MO` <wui-flex class="network-icon"> <wui-image src=${e}></wui-image> </wui-flex>`))}
        </wui-flex>`}},SF.styles=[gR,mR,PF],IF([IR({type:Array})],SF.prototype,"networkImages",void 0),IF([IR()],SF.prototype,"text",void 0),SF=IF([wR("wui-compatible-network")],SF)})),WH=a((()=>{oR(),AF=IT`
      wui-flex {
        width: 100%;
        background-color: var(--wui-gray-glass-005);
        border-radius: var(--wui-border-radius-s);
        padding: var(--wui-spacing-1xs) var(--wui-spacing-s) var(--wui-spacing-1xs)
          var(--wui-spacing-1xs);
      }
    `})),VH=a((()=>{oR(),G$(),_L(),XL(),yR(),ER(),WH(),TF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},OF=class extends QO{constructor(){super(...arguments),this.icon="externalLink",this.text=""}render(){return MO`
          <wui-flex gap="1xs" alignItems="center">
            <wui-icon-box
              size="sm"
              iconcolor="fg-200"
              backgroundcolor="fg-200"
              icon=${this.icon}
              background="transparent"
            ></wui-icon-box>
            <wui-text variant="small-400" color="fg-200">${this.text}</wui-text>
          </wui-flex>
        `}},OF.styles=[gR,mR,AF],TF([IR()],OF.prototype,"icon",void 0),TF([IR()],OF.prototype,"text",void 0),OF=TF([wR("wui-banner")],OF)})),GH=a((()=>{oR(),RF=IT`
      button {
        padding: 6.5px var(--wui-spacing-l) 6.5px var(--wui-spacing-xs);
        display: flex;
        justify-content: space-between;
        width: 100%;
        border-radius: var(--wui-border-radius-xs);
        background-color: var(--wui-gray-glass-002);
      }
    
      button[data-clickable='false'] {
        pointer-events: none;
        background-color: transparent;
      }
    
      wui-image {
        width: var(--wui-spacing-3xl);
        height: var(--wui-spacing-3xl);
        border-radius: var(--wui-border-radius-3xl);
      }
    `})),ZH=a((()=>{oR(),G$(),_L(),cL(),KL(),yR(),ER(),GH(),GL(),NF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},MF=class extends QO{constructor(){super(...arguments),this.tokenName="",this.tokenImageUrl="",this.tokenValue=0,this.tokenAmount="0.0",this.tokenCurrency="",this.clickable=!1}render(){return MO`
          <button data-clickable=${String(this.clickable)} ontouchstart>
            <wui-flex gap="s" alignItems="center">
              <wui-image alt=${this.tokenName} src=${this.tokenImageUrl}></wui-image>
              <wui-flex flexDirection="column" justifyContent="spaceBetween">
                <wui-text variant="paragraph-500" color="fg-100">${this.tokenName}</wui-text>
                <wui-text variant="small-400" color="fg-200">
                  ${FM.formatNumberToLocalString(this.tokenAmount,4)} ${this.tokenCurrency}
                </wui-text>
              </wui-flex>
            </wui-flex>
            <wui-text variant="paragraph-500" color="fg-100">$${this.tokenValue.toFixed(2)}</wui-text>
          </button>
        `}},MF.styles=[gR,mR,RF],NF([IR()],MF.prototype,"tokenName",void 0),NF([IR()],MF.prototype,"tokenImageUrl",void 0),NF([IR({type:Number})],MF.prototype,"tokenValue",void 0),NF([IR()],MF.prototype,"tokenAmount",void 0),NF([IR()],MF.prototype,"tokenCurrency",void 0),NF([IR({type:Boolean})],MF.prototype,"clickable",void 0),MF=NF([wR("wui-list-token")],MF)})),KH=a((()=>{oR(),$F=IT`
      button {
        width: 100%;
        display: flex;
        gap: var(--wui-spacing-s);
        align-items: center;
        justify-content: flex-start;
        padding: var(--wui-spacing-s) var(--wui-spacing-m) var(--wui-spacing-s) var(--wui-spacing-s);
        background-color: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-xs);
      }
    
      wui-icon-box {
        width: var(--wui-spacing-2xl);
        height: var(--wui-spacing-2xl);
      }
    
      wui-flex {
        width: auto;
      }
    `})),YH=a((()=>{oR(),G$(),_L(),cL(),KL(),yR(),ER(),KH(),jF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},LF=class extends QO{constructor(){super(...arguments),this.icon="card",this.text="",this.description="",this.tag=void 0,this.iconBackgroundColor="accent-100",this.iconColor="accent-100",this.disabled=!1}render(){return MO`
          <button ontouchstart ?disabled=${this.disabled}>
            <wui-icon-box
              iconColor=${this.iconColor}
              backgroundColor=${this.iconBackgroundColor}
              size="inherit"
              icon=${this.icon}
              iconSize="md"
            ></wui-icon-box>
            <wui-flex flexDirection="column" justifyContent="spaceBetween">
              ${this.titleTemplate()}
              <wui-text variant="small-400" color="fg-200"> ${this.description}</wui-text></wui-flex
            >
          </button>
        `}titleTemplate(){return this.tag?MO` <wui-flex alignItems="center" gap="xxs"
            ><wui-text variant="paragraph-500" color="fg-100">${this.text}</wui-text
            ><wui-tag tagType="main" size="md">${this.tag}</wui-tag>
          </wui-flex>`:MO`<wui-text variant="paragraph-500" color="fg-100">${this.text}</wui-text>`}},LF.styles=[gR,mR,$F],jF([IR()],LF.prototype,"icon",void 0),jF([IR()],LF.prototype,"text",void 0),jF([IR()],LF.prototype,"description",void 0),jF([IR()],LF.prototype,"tag",void 0),jF([IR()],LF.prototype,"iconBackgroundColor",void 0),jF([IR()],LF.prototype,"iconColor",void 0),jF([IR({type:Boolean})],LF.prototype,"disabled",void 0),LF=jF([wR("wui-list-description")],LF)})),JH=a((()=>{oR(),BF=IT`
      :host {
        position: relative;
        display: inline-block;
      }
    
      input {
        background: transparent;
        width: 100%;
        height: auto;
        font-family: var(--wui-font-family);
        color: var(--wui-color-fg-100);
    
        font-feature-settings: 'case' on;
        font-size: 32px;
        font-weight: var(--wui-font-weight-light);
        caret-color: var(--wui-color-accent-100);
        line-height: 130%;
        letter-spacing: -1.28px;
        box-sizing: border-box;
        -webkit-appearance: none;
        -moz-appearance: textfield;
        padding: 0px;
      }
    
      input::-webkit-outer-spin-button,
      input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
      }
    
      input::placeholder {
        color: var(--wui-color-fg-275);
      }
    `})),QH=a((()=>{DF=/[.*+?^${}()|[\]\\]/gu,UF=/[0-9,.]/u})),XH=a((()=>{oR(),G$(),yR(),ER(),JH(),jD(),QH(),FF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},HF=class extends QO{constructor(){super(...arguments),this.inputElementRef=$B(),this.disabled=!1,this.value="",this.placeholder="0"}render(){return this.inputElementRef?.value&&this.value&&(this.inputElementRef.value.value=this.value),MO`<input
          ${BB(this.inputElementRef)}
          type="text"
          inputmode="numeric"
          pattern="[0-9,.]*"
          placeholder=${this.placeholder}
          ?disabled=${this.disabled}
          autofocus
          value=${this.value??""}
          @input=${this.dispatchInputChangeEvent.bind(this)}
        /> `}dispatchInputChangeEvent(e){let t=e.data;t&&!UF.test(t)&&this.inputElementRef?.value&&(this.inputElementRef.value.value=this.value.replace(new RegExp(t.replace(DF,"\\$&"),"gu"),"")),this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value?.value,bubbles:!0,composed:!0}))}},HF.styles=[gR,mR,BF],FF([IR({type:Boolean})],HF.prototype,"disabled",void 0),FF([IR({type:String})],HF.prototype,"value",void 0),FF([IR({type:String})],HF.prototype,"placeholder",void 0),HF=FF([wR("wui-input-amount")],HF)})),ez=a((()=>{oR(),zF=IT`
      :host {
        display: flex;
        gap: var(--wui-spacing-xs);
        border-radius: var(--wui-border-radius-3xl);
        border: 1px solid var(--wui-gray-glass-002);
        background: var(--wui-gray-glass-002);
        padding: var(--wui-spacing-2xs) var(--wui-spacing-xs) var(--wui-spacing-2xs)
          var(--wui-spacing-s);
        align-items: center;
      }
    
      wui-avatar,
      wui-icon,
      wui-image {
        width: 32px;
        height: 32px;
        border: 1px solid var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-3xl);
        box-shadow: 0 0 0 2px var(--wui-gray-glass-002);
      }
    `})),tz=a((()=>{oR(),G$(),_L(),cL(),aL(),JL(),KL(),yR(),ER(),ez(),qF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},WF=class extends QO{constructor(){super(...arguments),this.text="",this.address="",this.isAddress=!1}render(){return MO`<wui-text variant="large-500" color="fg-100">${this.text}</wui-text>
          ${this.imageTemplate()}`}imageTemplate(){return this.isAddress?MO`<wui-avatar address=${this.address} .imageSrc=${this.imageSrc}></wui-avatar>`:this.imageSrc?MO`<wui-image src=${this.imageSrc}></wui-image>`:MO`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}},WF.styles=[gR,mR,zF],qF([IR()],WF.prototype,"text",void 0),qF([IR()],WF.prototype,"address",void 0),qF([IR()],WF.prototype,"imageSrc",void 0),qF([IR({type:Boolean})],WF.prototype,"isAddress",void 0),WF=qF([wR("wui-preview-item")],WF)})),rz=a((()=>{oR(),VF=IT`
      :host {
        display: grid;
        width: inherit;
        height: inherit;
      }
    `})),iz=a((()=>{oR(),G$(),yR(),GL(),ER(),rz(),GF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},(ZF=class extends QO{render(){return this.style.cssText=`\n          grid-template-rows: ${this.gridTemplateRows};\n          grid-template-columns: ${this.gridTemplateColumns};\n          justify-items: ${this.justifyItems};\n          align-items: ${this.alignItems};\n          justify-content: ${this.justifyContent};\n          align-content: ${this.alignContent};\n          column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};\n          row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};\n          gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};\n          padding-top: ${this.padding&&FM.getSpacingStyles(this.padding,0)};\n          padding-right: ${this.padding&&FM.getSpacingStyles(this.padding,1)};\n          padding-bottom: ${this.padding&&FM.getSpacingStyles(this.padding,2)};\n          padding-left: ${this.padding&&FM.getSpacingStyles(this.padding,3)};\n          margin-top: ${this.margin&&FM.getSpacingStyles(this.margin,0)};\n          margin-right: ${this.margin&&FM.getSpacingStyles(this.margin,1)};\n          margin-bottom: ${this.margin&&FM.getSpacingStyles(this.margin,2)};\n          margin-left: ${this.margin&&FM.getSpacingStyles(this.margin,3)};\n        `,MO`<slot></slot>`}}).styles=[gR,VF],GF([IR()],ZF.prototype,"gridTemplateRows",void 0),GF([IR()],ZF.prototype,"gridTemplateColumns",void 0),GF([IR()],ZF.prototype,"justifyItems",void 0),GF([IR()],ZF.prototype,"alignItems",void 0),GF([IR()],ZF.prototype,"justifyContent",void 0),GF([IR()],ZF.prototype,"alignContent",void 0),GF([IR()],ZF.prototype,"columnGap",void 0),GF([IR()],ZF.prototype,"rowGap",void 0),GF([IR()],ZF.prototype,"gap",void 0),GF([IR()],ZF.prototype,"padding",void 0),GF([IR()],ZF.prototype,"margin",void 0),ZF=GF([wR("wui-grid")],ZF)})),nz=a((()=>{oR(),KF=IT`
      :host {
        position: relative;
        display: flex;
        width: 100%;
        height: 1px;
        background-color: var(--wui-gray-glass-005);
        justify-content: center;
        align-items: center;
      }
    
      :host > wui-text {
        position: absolute;
        padding: 0px 10px;
        background-color: var(--wui-color-modal-bg);
      }
    `})),oz=a((()=>{oR(),G$(),_L(),yR(),ER(),nz(),YF=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},JF=class extends QO{constructor(){super(...arguments),this.text=""}render(){return MO`${this.template()}`}template(){return this.text?MO`<wui-text variant="small-500" color="fg-200">${this.text}</wui-text>`:null}},JF.styles=[gR,KF],YF([IR()],JF.prototype,"text",void 0),JF=YF([wR("wui-separator")],JF)})),az=a((()=>{QF={interpolate(e,t,r){if(2!==e.length||2!==t.length)throw new Error("inputRange and outputRange must be an array of length 2");let i=e[0]||0,n=e[1]||0,o=t[0]||0,a=t[1]||0;return r<i?o:r>n?a:(a-o)/(n-i)*(r-i)+o}}})),sz=a((()=>{GT(),GL(),3,XF=["receive","deposit","borrow","claim"],eH=["withdraw","repay","burn"],tH={getMonthName(e){let t=new Date;return t.setMonth(e),t.toLocaleString("en-US",{month:"long"})},getTransactionGroupTitle(e,t){let r=tA.getYear(),i=this.getMonthName(t);return e===r?i:`${i} ${e}`},getTransactionImages(e){let[t,r]=e,i=!!t&&e?.every((e=>!!e.nft_info)),n=e?.length>1;return 2!==e?.length||i?n?e.map((e=>this.getTransactionImage(e))):[this.getTransactionImage(t)]:[this.getTransactionImage(t),this.getTransactionImage(r)]},getTransactionImage:e=>({type:tH.getTransactionTransferTokenType(e),url:tH.getTransactionImageURL(e)}),getTransactionImageURL(e){let t,r=!!e?.nft_info,i=!!e?.fungible_info;return e&&r?t=e?.nft_info?.content?.preview?.url:e&&i&&(t=e?.fungible_info?.icon?.url),t},getTransactionTransferTokenType:e=>e?.fungible_info?"FUNGIBLE":e?.nft_info?"NFT":void 0,getTransactionDescriptions(e){let t=e?.metadata?.operationType,r=e?.transfers,i=e?.transfers?.length>0,n=e?.transfers?.length>1,o=i&&r?.every((e=>!!e?.fungible_info)),[a,s]=r,c=this.getTransferDescription(a),l=this.getTransferDescription(s);if(!i)return"send"!==t&&"receive"!==t||!o?[e.metadata.status]:(c=FM.getTruncateString({string:e?.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),l=FM.getTruncateString({string:e?.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"}),[c,l]);if(n)return r.map((e=>this.getTransferDescription(e)));let u="";return XF.includes(t)?u="+":eH.includes(t)&&(u="-"),c=u.concat(c),[c]},getTransferDescription(e){let t="";return e&&(e?.nft_info?t=e?.nft_info?.name||"-":e?.fungible_info&&(t=this.getFungibleTransferDescription(e)||"-")),t},getFungibleTransferDescription(e){return e?[this.getQuantityFixedValue(e?.quantity.numeric),e?.fungible_info?.symbol].join(" ").trim():null},getQuantityFixedValue:e=>e?parseFloat(e).toFixed(3):null}})),cz={};c(cz,{MathUtil:()=>QF,TransactionUtil:()=>tH,UiHelperUtil:()=>FM,WuiAccountButton:()=>XM,WuiAllWalletsImage:()=>o$,WuiAvatar:()=>GM,WuiBalance:()=>wF,WuiBanner:()=>OF,WuiButton:()=>l$,WuiCard:()=>xR,WuiCardSelect:()=>_$,WuiCardSelectLoader:()=>p$,WuiChip:()=>C$,WuiChipButton:()=>kF,WuiCompatibleNetwork:()=>SF,WuiConnectButton:()=>I$,WuiCtaButton:()=>T$,WuiDetailsGroup:()=>N$,WuiDetailsGroupItem:()=>j$,WuiEmailInput:()=>qB,WuiFlex:()=>qM,WuiGrid:()=>ZF,WuiIcon:()=>VN,WuiIconBox:()=>YM,WuiIconLink:()=>GB,WuiImage:()=>KN,WuiInputAmount:()=>HF,WuiInputElement:()=>YB,WuiInputNumeric:()=>XB,WuiInputText:()=>FB,WuiLink:()=>rD,WuiListAccordion:()=>QU,WuiListContent:()=>tF,WuiListDescription:()=>LF,WuiListItem:()=>oD,WuiListNetwork:()=>nF,WuiListToken:()=>MF,WuiListWallet:()=>_D,WuiListWalletTransaction:()=>sF,WuiLoadingHexagon:()=>QN,WuiLoadingSpinner:()=>tM,WuiLoadingThumbnail:()=>nM,WuiLogo:()=>CD,WuiLogoSelect:()=>ID,WuiNetworkButton:()=>TD,WuiNetworkImage:()=>y$,WuiNoticeCard:()=>KU,WuiOnRampActivityItem:()=>uF,WuiOnRampProviderItem:()=>pF,WuiOtp:()=>ND,WuiPreviewItem:()=>WF,WuiProfileButton:()=>xF,WuiPromo:()=>mF,WuiQrCode:()=>xU,WuiSearchBar:()=>kU,WuiSeparator:()=>JF,WuiShimmer:()=>sM,WuiSnackbar:()=>SU,WuiTabs:()=>OU,WuiTag:()=>yD,WuiText:()=>fM,WuiTokenButton:()=>MU,WuiTokenListItem:()=>zU,WuiTooltip:()=>LU,WuiTooltipSelect:()=>UU,WuiTransactionListItem:()=>hD,WuiTransactionListItemLoader:()=>gD,WuiTransactionVisual:()=>lD,WuiVisual:()=>DM,WuiVisualThumbnail:()=>VU,WuiWalletImage:()=>r$,convertInputMaskBottomSvg:()=>eR,convertInputMaskTopSvg:()=>tR,customElement:()=>wR,initializeTheming:()=>cR,setColorTheme:()=>lR,setThemeVariables:()=>uR});var lz,uz,dz,hz,pz,fz,gz,mz,bz,yz,wz,vz,_z,xz,Ez,Cz,kz,Pz,Iz,Sz,Az,Tz,Oz,Rz,Nz=a((()=>{aR(),sR(),kR(),aL(),cL(),uL(),hL(),fL(),mL(),_L(),qL(),tB(),oB(),JL(),sB(),uB(),mB(),yB(),vB(),xB(),CB(),PB(),UD(),XL(),HD(),qD(),VD(),BD(),ZD(),YD(),tU(),iU(),sU(),dU(),lU(),pU(),fB(),gU(),nH(),aH(),cH(),uH(),hH(),oU(),fH(),mH(),yH(),oU(),XD(),vH(),iB(),xH(),CH(),PH(),SH(),TH(),RH(),MH(),jH(),BH(),UH(),HH(),qH(),VH(),ZH(),YH(),XH(),hH(),tz(),KL(),iz(),oz(),az(),yR(),GL(),sz(),ER()})),Mz=a((()=>{lz=globalThis,uz=lz.ShadowRoot&&(void 0===lz.ShadyCSS||lz.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,dz=Symbol(),hz=new WeakMap,pz=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==dz)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(uz&&void 0===e){let r=void 0!==t&&1===t.length;r&&(e=hz.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&hz.set(t,e))}return e}toString(){return this.cssText}},fz=e=>new pz("string"==typeof e?e:e+"",void 0,dz),gz=(e,...t)=>{let r=1===e.length?e[0]:t.reduce(((t,r,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[i+1]),e[0]);return new pz(r,e,dz)},mz=(e,t)=>{if(uz)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let r of t){let t=document.createElement("style"),i=lz.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=r.cssText,e.appendChild(t)}},bz=uz?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return fz(t)})(e):e})),$z=a((()=>{Mz(),Mz(),({is:yz,defineProperty:wz,getOwnPropertyDescriptor:vz,getOwnPropertyNames:_z,getOwnPropertySymbols:xz,getPrototypeOf:Ez}=Object),Cz=globalThis,kz=Cz.trustedTypes,Pz=kz?kz.emptyScript:"",Iz=Cz.reactiveElementPolyfillSupport,Sz=(e,t)=>e,Az={toAttribute(e,t){switch(t){case Boolean:e=e?Pz:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},Tz=(e,t)=>!yz(e,t),Oz={attribute:!0,type:String,converter:Az,reflect:!1,hasChanged:Tz},Symbol.metadata??=Symbol("metadata"),Cz.litPropertyMetadata??=new WeakMap,(Rz=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Oz){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(e,r,t);void 0!==i&&wz(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){let{get:i,set:n}=vz(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return i?.call(this)},set(t){let o=i?.call(this);n.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Oz}static _$Ei(){if(this.hasOwnProperty(Sz("elementProperties")))return;let e=Ez(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Sz("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Sz("properties"))){let e=this.properties,t=[..._z(e),...xz(e)];for(let r of t)this.createProperty(r,e[r])}let e=this[Symbol.metadata];if(null!==e){let t=litPropertyMetadata.get(e);if(void 0!==t)for(let[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let e of r)t.unshift(bz(e))}else void 0!==e&&t.push(bz(e));return t}static _$Eu(e,t){let r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return mz(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){let r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(void 0!==i&&!0===r.reflect){let n=(void 0!==r.converter?.toAttribute?r.converter:Az).toAttribute(t,r.type);this._$Em=e,null==n?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,t){let r=this.constructor,i=r._$Eh.get(e);if(void 0!==i&&this._$Em!==i){let e=r.getPropertyOptions(i),n="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Az;this._$Em=i,this[i]=n.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??Tz)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}).elementStyles=[],Rz.shadowRootOptions={mode:"open"},Rz[Sz("elementProperties")]=new Map,Rz[Sz("finalized")]=new Map,Iz?.({ReactiveElement:Rz}),(Cz.reactiveElementVersions??=[]).push("2.0.4")}));function jz(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Uz?Uz.createHTML(t):t}function Lz(e,t,r=e,i){if(t===aq)return t;let n=void 0!==i?r._$Co?.[i]:r._$Cl,o=Gz(t)?void 0:t._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),void 0===o?n=void 0:(n=new o(e),n._$AT(e,r,i)),void 0!==i?(r._$Co??=[])[i]=n:r._$Cl=n),void 0!==n&&(t=Lz(e,n._$AS(e,t.values),n,i)),t}var Bz,Dz,Uz,Fz,Hz,zz,qz,Wz,Vz,Gz,Zz,Kz,Yz,Jz,Qz,Xz,eq,tq,rq,iq,nq,oq,aq,sq,cq,lq,uq,dq,hq,pq,fq,gq,mq,bq,yq,wq,vq,_q,xq,Eq,Cq=a((()=>{Bz=globalThis,Dz=Bz.trustedTypes,Uz=Dz?Dz.createPolicy("lit-html",{createHTML:e=>e}):void 0,Fz="$lit$",Hz=`lit$${Math.random().toFixed(9).slice(2)}$`,qz=`<${zz="?"+Hz}>`,Wz=document,Vz=()=>Wz.createComment(""),Gz=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Zz=Array.isArray,Kz=e=>Zz(e)||"function"==typeof e?.[Symbol.iterator],Yz="[ \t\n    \f\r]",Jz=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Qz=/-->/g,Xz=/>/g,eq=RegExp(`>|${Yz}(?:([^\\s"'>=/]+)(${Yz}*=${Yz}*(?:[^ \t\n    \f\r"'\`<>=]|("|')|))|$)`,"g"),tq=/'/g,rq=/"/g,iq=/^(?:script|style|textarea|title)$/i,oq=(nq=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}))(1),nq(2),aq=Symbol.for("lit-noChange"),sq=Symbol.for("lit-nothing"),cq=new WeakMap,lq=Wz.createTreeWalker(Wz,129),uq=(e,t)=>{let r,i=e.length-1,n=[],o=2===t?"<svg>":"",a=Jz;for(let t=0;t<i;t++){let i,s,c=e[t],l=-1,u=0;for(;u<c.length&&(a.lastIndex=u,s=a.exec(c),null!==s);)u=a.lastIndex,a===Jz?"!--"===s[1]?a=Qz:void 0!==s[1]?a=Xz:void 0!==s[2]?(iq.test(s[2])&&(r=RegExp("</"+s[2],"g")),a=eq):void 0!==s[3]&&(a=eq):a===eq?">"===s[0]?(a=r??Jz,l=-1):void 0===s[1]?l=-2:(l=a.lastIndex-s[2].length,i=s[1],a=void 0===s[3]?eq:'"'===s[3]?rq:tq):a===rq||a===tq?a=eq:a===Qz||a===Xz?a=Jz:(a=eq,r=void 0);let d=a===eq&&e[t+1].startsWith("/>")?" ":"";o+=a===Jz?c+qz:l>=0?(n.push(i),c.slice(0,l)+Fz+c.slice(l)+Hz+d):c+Hz+(-2===l?t:d)}return[jz(e,o+(e[i]||"<?>")+(2===t?"</svg>":"")),n]},dq=class e{constructor({strings:t,_$litType$:r},i){let n;this.parts=[];let o=0,a=0,s=t.length-1,c=this.parts,[l,u]=uq(t,r);if(this.el=e.createElement(l,i),lq.currentNode=this.el.content,2===r){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=lq.nextNode())&&c.length<s;){if(1===n.nodeType){if(n.hasAttributes())for(let e of n.getAttributeNames())if(e.endsWith(Fz)){let t=u[a++],r=n.getAttribute(e).split(Hz),i=/([.?@])?(.*)/.exec(t);c.push({type:1,index:o,name:i[2],strings:r,ctor:"."===i[1]?gq:"?"===i[1]?mq:"@"===i[1]?bq:fq}),n.removeAttribute(e)}else e.startsWith(Hz)&&(c.push({type:6,index:o}),n.removeAttribute(e));if(iq.test(n.tagName)){let e=n.textContent.split(Hz),t=e.length-1;if(t>0){n.textContent=Dz?Dz.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],Vz()),lq.nextNode(),c.push({type:2,index:++o});n.append(e[t],Vz())}}}else if(8===n.nodeType)if(n.data===zz)c.push({type:2,index:o});else{let e=-1;for(;-1!==(e=n.data.indexOf(Hz,e+1));)c.push({type:7,index:o}),e+=Hz.length-1}o++}}static createElement(e,t){let r=Wz.createElement("template");return r.innerHTML=e,r}},hq=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,i=(e?.creationScope??Wz).importNode(t,!0);lq.currentNode=i;let n=lq.nextNode(),o=0,a=0,s=r[0];for(;void 0!==s;){if(o===s.index){let t;2===s.type?t=new pq(n,n.nextSibling,this,e):1===s.type?t=new s.ctor(n,s.name,s.strings,this,e):6===s.type&&(t=new yq(n,this,e)),this._$AV.push(t),s=r[++a]}o!==s?.index&&(n=lq.nextNode(),o++)}return lq.currentNode=Wz,i}p(e){let t=0;for(let r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},pq=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,i){this.type=2,this._$AH=sq,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Lz(this,e,t),Gz(e)?e===sq||null==e||""===e?(this._$AH!==sq&&this._$AR(),this._$AH=sq):e!==this._$AH&&e!==aq&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):Kz(e)?this.k(e):this._(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}_(e){this._$AH!==sq&&Gz(this._$AH)?this._$AA.nextSibling.data=e:this.T(Wz.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,i="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=dq.createElement(jz(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(t);else{let e=new hq(i,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=cq.get(e.strings);return void 0===t&&cq.set(e.strings,t=new dq(e)),t}k(t){Zz(this._$AH)||(this._$AH=[],this._$AR());let r,i=this._$AH,n=0;for(let o of t)n===i.length?i.push(r=new e(this.S(Vz()),this.S(Vz()),this,this.options)):r=i[n],r._$AI(o),n++;n<i.length&&(this._$AR(r&&r._$AB.nextSibling,n),i.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){let t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}},fq=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,i,n){this.type=1,this._$AH=sq,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=n,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=sq}_$AI(e,t=this,r,i){let n=this.strings,o=!1;if(void 0===n)e=Lz(this,e,t,0),o=!Gz(e)||e!==this._$AH&&e!==aq,o&&(this._$AH=e);else{let i,a,s=e;for(e=n[0],i=0;i<n.length-1;i++)a=Lz(this,s[r+i],t,i),a===aq&&(a=this._$AH[i]),o||=!Gz(a)||a!==this._$AH[i],a===sq?e=sq:e!==sq&&(e+=(a??"")+n[i+1]),this._$AH[i]=a}o&&!i&&this.j(e)}j(e){e===sq?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},gq=class extends fq{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===sq?void 0:e}},mq=class extends fq{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==sq)}},bq=class extends fq{constructor(e,t,r,i,n){super(e,t,r,i,n),this.type=5}_$AI(e,t=this){if((e=Lz(this,e,t,0)??sq)===aq)return;let r=this._$AH,i=e===sq&&r!==sq||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==sq&&(r===sq||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},yq=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Lz(this,e)}},wq={P:Fz,A:Hz,C:zz,M:1,L:uq,R:hq,D:Kz,V:Lz,I:pq,H:fq,N:mq,U:bq,B:gq,F:yq},vq=Bz.litHtmlPolyfillSupport,vq?.(dq,pq),(Bz.litHtmlVersions??=[]).push("3.1.3"),_q=(e,t,r)=>{let i=r?.renderBefore??t,n=i._$litPart$;if(void 0===n){let e=r?.renderBefore??null;i._$litPart$=n=new pq(t.insertBefore(Vz(),e),e,void 0,r??{})}return n._$AI(e),n}})),kq=a((()=>{$z(),$z(),Cq(),Cq(),xq=class extends Rz{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=_q(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return aq}},xq._$litElement$=!0,xq.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:xq}),Eq=globalThis.litElementPolyfillSupport,Eq?.({LitElement:xq}),(globalThis.litElementVersions??=[]).push("4.0.5")})),Pq=a((()=>{})),Iq=a((()=>{$z(),Cq(),kq(),Pq()})),Sq=a((()=>{}));function Aq(e){return(t,r)=>"object"==typeof r?Oq(e,t,r):((e,t,r)=>{let i=t.hasOwnProperty(r);return t.constructor.createProperty(r,i?{...e,wrapped:!0}:e),i?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}var Tq,Oq,Rq=a((()=>{$z(),Tq={attribute:!0,type:String,converter:Az,reflect:!1,hasChanged:Tz},Oq=(e=Tq,t,r)=>{let{kind:i,metadata:n}=r,o=globalThis.litPropertyMetadata.get(n);if(void 0===o&&globalThis.litPropertyMetadata.set(n,o=new Map),o.set(r.name,e),"accessor"===i){let{name:i}=r;return{set(r){let n=t.get.call(this);t.set.call(this,r),this.requestUpdate(i,n,e)},init(t){return void 0!==t&&this.P(i,void 0,e),t}}}if("setter"===i){let{name:i}=r;return function(r){let n=this[i];t.call(this,r),this.requestUpdate(i,n,e)}}throw Error("Unsupported decorator location: "+i)}}));function Nq(e){return Aq({...e,state:!0,attribute:!1})}var Mq,$q,jq,Lq,Bq,Dq,Uq,Fq,Hq,zq,qq,Wq,Vq,Gq,Zq,Kq,Yq,Jq,Qq,Xq,eW,tW,rW,iW,nW,oW,aW,sW,cW,lW=a((()=>{Rq()})),uW=a((()=>{})),dW=a((()=>{})),hW=a((()=>{dW()})),pW=a((()=>{dW()})),fW=a((()=>{dW()})),gW=a((()=>{dW()})),mW=a((()=>{dW()})),bW=a((()=>{Sq(),Rq(),lW(),uW(),hW(),pW(),fW(),gW(),mW()})),yW=a((()=>{Iq(),Mq=gz`
      :host {
        z-index: var(--w3m-z-index);
        display: block;
        backface-visibility: hidden;
        will-change: opacity;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        pointer-events: none;
        opacity: 0;
        background-color: var(--wui-cover);
      }
    
      @keyframes zoom-in {
        0% {
          transform: scale(0.95) translateY(0);
        }
        100% {
          transform: scale(1) translateY(0);
        }
      }
    
      @keyframes slide-in {
        0% {
          transform: scale(1) translateY(50px);
        }
        100% {
          transform: scale(1) translateY(0);
        }
      }
    
      wui-card {
        max-width: 360px;
        width: 100%;
        position: relative;
        animation-duration: 0.2s;
        animation-name: zoom-in;
        animation-fill-mode: backwards;
        animation-timing-function: var(--wui-ease-out-power-2);
        outline: none;
      }
    
      wui-flex {
        overflow-x: hidden;
        overflow-y: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
      }
    
      @media (max-height: 700px) and (min-width: 431px) {
        wui-flex {
          align-items: flex-start;
        }
    
        wui-card {
          margin: var(--wui-spacing-xxl) 0px;
        }
      }
    
      @media (max-width: 430px) {
        wui-flex {
          align-items: flex-end;
        }
    
        wui-card {
          max-width: 100%;
          border-bottom-left-radius: 0;
          border-bottom-right-radius: 0;
          border-bottom: none;
          animation-name: slide-in;
        }
      }
    `})),wW=a((()=>{$q={FIVE_MINUTES_IN_MS:3e5}})),vW=a((()=>{cO(),GT(),wW(),jq=class{constructor(e){let{enabled:t=!0,nonceRefetchIntervalMs:r=$q.FIVE_MINUTES_IN_MS,sessionRefetchIntervalMs:i=$q.FIVE_MINUTES_IN_MS,signOutOnAccountChange:n=!0,signOutOnDisconnect:o=!0,signOutOnNetworkChange:a=!0,...s}=e;this.options={enabled:t,nonceRefetchIntervalMs:r,sessionRefetchIntervalMs:i,signOutOnDisconnect:o,signOutOnAccountChange:n,signOutOnNetworkChange:a},this.methods=s}async getNonce(e){let t=await this.methods.getNonce(e);if(!t)throw new Error("siweControllerClient:getNonce - nonce is undefined");return t}createMessage(e){let t=this.methods.createMessage(e);if(!t)throw new Error("siweControllerClient:createMessage - message is undefined");return t}async verifyMessage(e){return await this.methods.verifyMessage(e)}async getSession(){let e=await this.methods.getSession();if(!e)throw new Error("siweControllerClient:getSession - session is undefined");return e}async signIn(){let{address:e}=eT.state,t=await this.methods.getNonce(e);if(!e)throw new Error("An address is required to create a SIWE message.");let r=rA.caipNetworkIdToNumber(GA.state.caipNetwork?.id);if(!r)throw new Error("A chainId is required to create a SIWE message.");let i=this.methods.createMessage({address:e,nonce:t,chainId:r}),n=await KS.signMessage(i);if(!await this.methods.verifyMessage({message:i,signature:n}))throw new Error("Error verifying SIWE signature");let o=await this.methods.getSession();if(!o)throw new Error("Error verifying SIWE signature");return this.methods.onSignIn&&this.methods.onSignIn(o),vT.navigateAfterNetworkSwitch(),o}async signOut(){return this.methods.signOut()}}})),_W=a((()=>{iA(),Op(),cO(),Lq=_p({status:"uninitialized"}),Bq={state:Lq,subscribeKey:(e,t)=>xS(Lq,e,t),subscribe:e=>xp(Lq,(()=>e(Lq))),_getClient(){if(!Lq._client)throw new Error("SIWEController client not set");return Lq._client},async getNonce(e){let t=await this._getClient().getNonce(e);return this.setNonce(t),t},async getSession(){let e=await this._getClient().getSession();return e&&(this.setSession(e),this.setStatus("success")),e},createMessage(e){let t=this._getClient().createMessage(e);return this.setMessage(t),t},async verifyMessage(e){return await this._getClient().verifyMessage(e)},async signIn(){return await this._getClient().signIn()},async signOut(){let e=this._getClient();await e.signOut(),this.setStatus("ready"),e.onSignOut?.()},onSignIn(e){this._getClient().onSignIn?.(e)},onSignOut(){this._getClient().onSignOut?.()},setSIWEClient(e){Lq._client=Cp(e),Lq.status="ready",AS.setIsSiweEnabled(e.options.enabled)},setNonce(e){Lq.nonce=e},setStatus(e){Lq.status=e},setMessage(e){Lq.message=e},setSession(e){Lq.session=e}}})),xW=a((()=>{Dq=globalThis,Uq=Dq.ShadowRoot&&(void 0===Dq.ShadyCSS||Dq.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Fq=Symbol(),Hq=new WeakMap,zq=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Fq)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(Uq&&void 0===e){let r=void 0!==t&&1===t.length;r&&(e=Hq.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Hq.set(t,e))}return e}toString(){return this.cssText}},qq=e=>new zq("string"==typeof e?e:e+"",void 0,Fq),Wq=(e,...t)=>{let r=1===e.length?e[0]:t.reduce(((t,r,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[i+1]),e[0]);return new zq(r,e,Fq)},Vq=(e,t)=>{if(Uq)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let r of t){let t=document.createElement("style"),i=Dq.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=r.cssText,e.appendChild(t)}},Gq=Uq?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return qq(t)})(e):e})),EW=a((()=>{xW(),xW(),({is:Zq,defineProperty:Kq,getOwnPropertyDescriptor:Yq,getOwnPropertyNames:Jq,getOwnPropertySymbols:Qq,getPrototypeOf:Xq}=Object),eW=globalThis,tW=eW.trustedTypes,rW=tW?tW.emptyScript:"",iW=eW.reactiveElementPolyfillSupport,nW=(e,t)=>e,oW={toAttribute(e,t){switch(t){case Boolean:e=e?rW:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},aW=(e,t)=>!Zq(e,t),sW={attribute:!0,type:String,converter:oW,reflect:!1,hasChanged:aW},Symbol.metadata??=Symbol("metadata"),eW.litPropertyMetadata??=new WeakMap,(cW=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=sW){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(e,r,t);void 0!==i&&Kq(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){let{get:i,set:n}=Yq(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return i?.call(this)},set(t){let o=i?.call(this);n.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??sW}static _$Ei(){if(this.hasOwnProperty(nW("elementProperties")))return;let e=Xq(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(nW("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(nW("properties"))){let e=this.properties,t=[...Jq(e),...Qq(e)];for(let r of t)this.createProperty(r,e[r])}let e=this[Symbol.metadata];if(null!==e){let t=litPropertyMetadata.get(e);if(void 0!==t)for(let[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let e of r)t.unshift(Gq(e))}else void 0!==e&&t.push(Gq(e));return t}static _$Eu(e,t){let r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Vq(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){let r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(void 0!==i&&!0===r.reflect){let n=(void 0!==r.converter?.toAttribute?r.converter:oW).toAttribute(t,r.type);this._$Em=e,null==n?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,t){let r=this.constructor,i=r._$Eh.get(e);if(void 0!==i&&this._$Em!==i){let e=r.getPropertyOptions(i),n="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:oW;this._$Em=i,this[i]=n.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??aW)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}).elementStyles=[],cW.shadowRootOptions={mode:"open"},cW[nW("elementProperties")]=new Map,cW[nW("finalized")]=new Map,iW?.({ReactiveElement:cW}),(eW.reactiveElementVersions??=[]).push("2.0.4")}));function CW(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==SW?SW.createHTML(t):t}function kW(e,t,r=e,i){if(t===ZW)return t;let n=void 0!==i?r._$Co?.[i]:r._$Cl,o=$W(t)?void 0:t._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),void 0===o?n=void 0:(n=new o(e),n._$AT(e,r,i)),void 0!==i?(r._$Co??=[])[i]=n:r._$Cl=n),void 0!==n&&(t=kW(e,n._$AS(e,t.values),n,i)),t}var PW,IW,SW,AW,TW,OW,RW,NW,MW,$W,jW,LW,BW,DW,UW,FW,HW,zW,qW,WW,VW,GW,ZW,KW,YW,JW,QW,XW,eV,tV,rV,iV,nV,oV,aV,sV,cV,lV,uV,dV,hV,pV,fV=a((()=>{PW=globalThis,IW=PW.trustedTypes,SW=IW?IW.createPolicy("lit-html",{createHTML:e=>e}):void 0,AW="$lit$",TW=`lit$${Math.random().toFixed(9).slice(2)}$`,RW=`<${OW="?"+TW}>`,NW=document,MW=()=>NW.createComment(""),$W=e=>null===e||"object"!=typeof e&&"function"!=typeof e,jW=Array.isArray,LW=e=>jW(e)||"function"==typeof e?.[Symbol.iterator],BW="[ \t\n    \f\r]",DW=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,UW=/-->/g,FW=/>/g,HW=RegExp(`>|${BW}(?:([^\\s"'>=/]+)(${BW}*=${BW}*(?:[^ \t\n    \f\r"'\`<>=]|("|')|))|$)`,"g"),zW=/'/g,qW=/"/g,WW=/^(?:script|style|textarea|title)$/i,GW=(VW=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}))(1),VW(2),ZW=Symbol.for("lit-noChange"),KW=Symbol.for("lit-nothing"),YW=new WeakMap,JW=NW.createTreeWalker(NW,129),QW=(e,t)=>{let r,i=e.length-1,n=[],o=2===t?"<svg>":"",a=DW;for(let t=0;t<i;t++){let i,s,c=e[t],l=-1,u=0;for(;u<c.length&&(a.lastIndex=u,s=a.exec(c),null!==s);)u=a.lastIndex,a===DW?"!--"===s[1]?a=UW:void 0!==s[1]?a=FW:void 0!==s[2]?(WW.test(s[2])&&(r=RegExp("</"+s[2],"g")),a=HW):void 0!==s[3]&&(a=HW):a===HW?">"===s[0]?(a=r??DW,l=-1):void 0===s[1]?l=-2:(l=a.lastIndex-s[2].length,i=s[1],a=void 0===s[3]?HW:'"'===s[3]?qW:zW):a===qW||a===zW?a=HW:a===UW||a===FW?a=DW:(a=HW,r=void 0);let d=a===HW&&e[t+1].startsWith("/>")?" ":"";o+=a===DW?c+RW:l>=0?(n.push(i),c.slice(0,l)+AW+c.slice(l)+TW+d):c+TW+(-2===l?t:d)}return[CW(e,o+(e[i]||"<?>")+(2===t?"</svg>":"")),n]},XW=class e{constructor({strings:t,_$litType$:r},i){let n;this.parts=[];let o=0,a=0,s=t.length-1,c=this.parts,[l,u]=QW(t,r);if(this.el=e.createElement(l,i),JW.currentNode=this.el.content,2===r){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=JW.nextNode())&&c.length<s;){if(1===n.nodeType){if(n.hasAttributes())for(let e of n.getAttributeNames())if(e.endsWith(AW)){let t=u[a++],r=n.getAttribute(e).split(TW),i=/([.?@])?(.*)/.exec(t);c.push({type:1,index:o,name:i[2],strings:r,ctor:"."===i[1]?iV:"?"===i[1]?nV:"@"===i[1]?oV:rV}),n.removeAttribute(e)}else e.startsWith(TW)&&(c.push({type:6,index:o}),n.removeAttribute(e));if(WW.test(n.tagName)){let e=n.textContent.split(TW),t=e.length-1;if(t>0){n.textContent=IW?IW.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],MW()),JW.nextNode(),c.push({type:2,index:++o});n.append(e[t],MW())}}}else if(8===n.nodeType)if(n.data===OW)c.push({type:2,index:o});else{let e=-1;for(;-1!==(e=n.data.indexOf(TW,e+1));)c.push({type:7,index:o}),e+=TW.length-1}o++}}static createElement(e,t){let r=NW.createElement("template");return r.innerHTML=e,r}},eV=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,i=(e?.creationScope??NW).importNode(t,!0);JW.currentNode=i;let n=JW.nextNode(),o=0,a=0,s=r[0];for(;void 0!==s;){if(o===s.index){let t;2===s.type?t=new tV(n,n.nextSibling,this,e):1===s.type?t=new s.ctor(n,s.name,s.strings,this,e):6===s.type&&(t=new aV(n,this,e)),this._$AV.push(t),s=r[++a]}o!==s?.index&&(n=JW.nextNode(),o++)}return JW.currentNode=NW,i}p(e){let t=0;for(let r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},tV=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,i){this.type=2,this._$AH=KW,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=kW(this,e,t),$W(e)?e===KW||null==e||""===e?(this._$AH!==KW&&this._$AR(),this._$AH=KW):e!==this._$AH&&e!==ZW&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):LW(e)?this.k(e):this._(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}_(e){this._$AH!==KW&&$W(this._$AH)?this._$AA.nextSibling.data=e:this.T(NW.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,i="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=XW.createElement(CW(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(t);else{let e=new eV(i,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=YW.get(e.strings);return void 0===t&&YW.set(e.strings,t=new XW(e)),t}k(t){jW(this._$AH)||(this._$AH=[],this._$AR());let r,i=this._$AH,n=0;for(let o of t)n===i.length?i.push(r=new e(this.S(MW()),this.S(MW()),this,this.options)):r=i[n],r._$AI(o),n++;n<i.length&&(this._$AR(r&&r._$AB.nextSibling,n),i.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){let t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}},rV=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,i,n){this.type=1,this._$AH=KW,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=n,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=KW}_$AI(e,t=this,r,i){let n=this.strings,o=!1;if(void 0===n)e=kW(this,e,t,0),o=!$W(e)||e!==this._$AH&&e!==ZW,o&&(this._$AH=e);else{let i,a,s=e;for(e=n[0],i=0;i<n.length-1;i++)a=kW(this,s[r+i],t,i),a===ZW&&(a=this._$AH[i]),o||=!$W(a)||a!==this._$AH[i],a===KW?e=KW:e!==KW&&(e+=(a??"")+n[i+1]),this._$AH[i]=a}o&&!i&&this.j(e)}j(e){e===KW?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},iV=class extends rV{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===KW?void 0:e}},nV=class extends rV{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==KW)}},oV=class extends rV{constructor(e,t,r,i,n){super(e,t,r,i,n),this.type=5}_$AI(e,t=this){if((e=kW(this,e,t,0)??KW)===ZW)return;let r=this._$AH,i=e===KW&&r!==KW||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==KW&&(r===KW||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},aV=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){kW(this,e)}},sV=PW.litHtmlPolyfillSupport,sV?.(XW,tV),(PW.litHtmlVersions??=[]).push("3.1.3"),cV=(e,t,r)=>{let i=r?.renderBefore??t,n=i._$litPart$;if(void 0===n){let e=r?.renderBefore??null;i._$litPart$=n=new tV(t.insertBefore(MW(),e),e,void 0,r??{})}return n._$AI(e),n}})),gV=a((()=>{EW(),EW(),fV(),fV(),lV=class extends cW{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=cV(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ZW}},lV._$litElement$=!0,lV.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:lV}),uV=globalThis.litElementPolyfillSupport,uV?.({LitElement:lV}),(globalThis.litElementVersions??=[]).push("4.0.5")})),mV=a((()=>{})),bV=a((()=>{EW(),fV(),gV(),mV()})),yV=a((()=>{bV(),dV=Wq`
      :host {
        display: flex;
        justify-content: center;
        gap: var(--wui-spacing-2xl);
      }
    
      wui-visual-thumbnail:nth-child(1) {
        z-index: 1;
      }
    `})),wV=a((()=>{Nz(),bV(),yV(),cO(),hV=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},pV=class extends lV{constructor(){super(...arguments),this.dappImageUrl=AS.state.metadata?.icons,this.walletImageUrl=US.getConnectedWalletImageUrl()}firstUpdated(){let e=this.shadowRoot?.querySelectorAll("wui-visual-thumbnail");e?.[0]&&this.createAnimation(e[0],"translate(18px)"),e?.[1]&&this.createAnimation(e[1],"translate(-18px)")}render(){return GW`
          <wui-visual-thumbnail
            ?borderRadiusFull=${!0}
            .imageSrc=${this.dappImageUrl?.[0]}
          ></wui-visual-thumbnail>
          <wui-visual-thumbnail .imageSrc=${this.walletImageUrl}></wui-visual-thumbnail>
        `}createAnimation(e,t){e.animate([{transform:"translateX(0px)"},{transform:t}],{duration:1600,easing:"cubic-bezier(0.56, 0, 0.48, 1)",direction:"alternate",iterations:1/0})}},pV.styles=dV,pV=hV([wR("w3m-connecting-siwe")],pV)})),vV=a((()=>{}));var _V,xV,EV=a((()=>{EW(),_V={attribute:!0,type:String,converter:oW,reflect:!1,hasChanged:aW},xV=(e=_V,t,r)=>{let{kind:i,metadata:n}=r,o=globalThis.litPropertyMetadata.get(n);if(void 0===o&&globalThis.litPropertyMetadata.set(n,o=new Map),o.set(r.name,e),"accessor"===i){let{name:i}=r;return{set(r){let n=t.get.call(this);t.set.call(this,r),this.requestUpdate(i,n,e)},init(t){return void 0!==t&&this.P(i,void 0,e),t}}}if("setter"===i){let{name:i}=r;return function(r){let n=this[i];t.call(this,r),this.requestUpdate(i,n,e)}}throw Error("Unsupported decorator location: "+i)}}));function CV(e){return function(e){return(t,r)=>"object"==typeof r?xV(e,t,r):((e,t,r)=>{let i=t.hasOwnProperty(r);return t.constructor.createProperty(r,i?{...e,wrapped:!0}:e),i?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}({...e,state:!0,attribute:!1})}var kV,PV,IV=a((()=>{EV()})),SV=a((()=>{})),AV=a((()=>{})),TV=a((()=>{AV()})),OV=a((()=>{AV()})),RV=a((()=>{AV()})),NV=a((()=>{AV()})),MV=a((()=>{AV()})),$V=a((()=>{vV(),EV(),IV(),SV(),TV(),OV(),RV(),NV(),MV()})),jV=a((()=>{cO(),Nz(),bV(),$V(),_W(),kV=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},PV=class extends lV{constructor(){super(...arguments),this.dappName=AS.state.metadata?.name,this.isSigning=!1}render(){return GW`
          <wui-flex justifyContent="center" .padding=${["2xl","0","xxl","0"]}>
            <w3m-connecting-siwe></w3m-connecting-siwe>
          </wui-flex>
          <wui-flex
            .padding=${["0","4xl","l","4xl"]}
            gap="s"
            justifyContent="space-between"
          >
            <wui-text variant="paragraph-500" align="center" color="fg-100"
              >${this.dappName??"Dapp"} needs to connect to your wallet</wui-text
            >
          </wui-flex>
          <wui-flex
            .padding=${["0","3xl","l","3xl"]}
            gap="s"
            justifyContent="space-between"
          >
            <wui-text variant="small-400" align="center" color="fg-200"
              >Sign this message to prove you own this wallet and proceed. Canceling will disconnect
              you.</wui-text
            >
          </wui-flex>
          <wui-flex .padding=${["l","xl","xl","xl"]} gap="s" justifyContent="space-between">
            <wui-button
              size="md"
              ?fullwidth=${!0}
              variant="shade"
              @click=${this.onCancel.bind(this)}
              data-testid="w3m-connecting-siwe-cancel"
            >
              Cancel
            </wui-button>
            <wui-button
              size="md"
              ?fullwidth=${!0}
              variant="fill"
              @click=${this.onSign.bind(this)}
              ?loading=${this.isSigning}
              data-testid="w3m-connecting-siwe-sign"
            >
              ${this.isSigning?"Signing...":"Sign"}
            </wui-button>
          </wui-flex>
        `}async onSign(){this.isSigning=!0,WS.sendEvent({event:"CLICK_SIGN_SIWE_MESSAGE",type:"track"});try{Bq.setStatus("loading");let e=await Bq.signIn();return Bq.setStatus("success"),WS.sendEvent({event:"SIWE_AUTH_SUCCESS",type:"track"}),e}catch{return $S.showError("Signature declined"),Bq.setStatus("error"),WS.sendEvent({event:"SIWE_AUTH_ERROR",type:"track"})}finally{this.isSigning=!1}}async onCancel(){let{isConnected:e}=eT.state;e?(await KS.disconnect(),hT.close()):YA.push("Connect"),WS.sendEvent({event:"CLICK_CANCEL_SIWE",type:"track"})}},kV([CV()],PV.prototype,"isSigning",void 0),PV=kV([wR("w3m-connecting-siwe-view")],PV)})),LV={};function BV(e){return new jq(e)}c(LV,{SIWEController:()=>Bq,W3mConnectingSiwe:()=>pV,W3mConnectingSiweView:()=>PV,createSIWEConfig:()=>BV});var DV=a((()=>{vW(),_W(),wV(),jV()})),UV={};c(UV,{W3mModal:()=>zV});var FV,HV,zV,qV=a((()=>{cO(),Nz(),Iq(),bW(),yW(),FV=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},HV="scroll-lock",(zV=class extends xq{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.open=hT.state.open,this.caipAddress=eT.state.caipAddress,this.isSiweEnabled=AS.state.isSiweEnabled,this.initializeTheming(),uT.prefetch(),this.unsubscribe.push(hT.subscribeKey("open",(e=>e?this.onOpen():this.onClose())),eT.subscribe((e=>this.onNewAccountState(e)))),WS.sendEvent({type:"track",event:"MODAL_LOADED"})}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),this.onRemoveKeyboardListener()}render(){return this.open?oq`
              <wui-flex @click=${this.onOverlayClick.bind(this)}>
                <wui-card role="alertdialog" aria-modal="true" tabindex="0">
                  <w3m-header></w3m-header>
                  <w3m-router></w3m-router>
                  <w3m-snackbar></w3m-snackbar>
                </wui-card>
              </wui-flex>
            `:null}async onOverlayClick(e){e.target===e.currentTarget&&await this.handleClose()}async handleClose(){if(this.isSiweEnabled){let{SIWEController:e}=await Promise.resolve().then((()=>(DV(),LV)));"success"!==e.state.status&&await KS.disconnect()}hT.close()}initializeTheming(){let{themeVariables:e,themeMode:t}=nT.state;cR(e,FM.getColorTheme(t))}async onClose(){this.onScrollUnlock(),await this.animate([{opacity:1},{opacity:0}],{duration:200,easing:"ease",fill:"forwards"}).finished,$S.hide(),this.open=!1,this.onRemoveKeyboardListener()}async onOpen(){this.onScrollLock(),this.open=!0,await this.animate([{opacity:0},{opacity:1}],{duration:200,easing:"ease",fill:"forwards"}).finished,this.onAddKeyboardListener()}onScrollLock(){let e=document.createElement("style");e.dataset.w3m=HV,e.textContent="\n          html, body {\n            touch-action: none;\n            overflow: hidden;\n            overscroll-behavior: contain;\n          }\n          w3m-modal {\n            pointer-events: auto;\n          }\n        ",document.head.appendChild(e)}onScrollUnlock(){let e=document.head.querySelector(`style[data-w3m="${HV}"]`);e&&e.remove()}onAddKeyboardListener(){this.abortController=new AbortController;let e=this.shadowRoot?.querySelector("wui-card");e?.focus(),window.addEventListener("keydown",(t=>{if("Escape"===t.key)this.handleClose();else if("Tab"===t.key){let{tagName:r}=t.target;r&&!r.includes("W3M-")&&!r.includes("WUI-")&&e?.focus()}}),this.abortController)}onRemoveKeyboardListener(){this.abortController?.abort(),this.abortController=void 0}async onNewAccountState(e){let{isConnected:t,caipAddress:r}=e;if(this.isSiweEnabled){let{SIWEController:e}=await Promise.resolve().then((()=>(DV(),LV)));t&&!this.caipAddress&&(this.caipAddress=r),t&&r&&this.caipAddress!==r&&(await e.signOut(),this.onSiweNavigation(),this.caipAddress=r);try{let r=await e.getSession();r&&!t?await e.signOut():t&&!r&&this.onSiweNavigation()}catch{t&&this.onSiweNavigation()}}}onSiweNavigation(){this.open?YA.push("ConnectingSiwe"):hT.open({view:"ConnectingSiwe"})}}).styles=Mq,FV([Nq()],zV.prototype,"open",void 0),FV([Nq()],zV.prototype,"caipAddress",void 0),FV([Nq()],zV.prototype,"isSiweEnabled",void 0),zV=FV([wR("w3m-modal")],zV)})),WV=s((e=>{"use strict";e.byteLength=function(e){var t=a(e),r=t[0],i=t[1];return 3*(r+i)/4-i},e.toByteArray=function(e){var t,r,o=a(e),s=o[0],c=o[1],l=new n(function(e,t,r){return 3*(t+r)/4-r}(0,s,c)),u=0,d=c>0?s-4:s;for(r=0;r<d;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===c&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,l[u++]=255&t),1===c&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},e.fromByteArray=function(e){for(var t,i=e.length,n=i%3,o=[],a=16383,s=0,l=i-n;s<l;s+=a)o.push(c(e,s,s+a>l?l:s+a));return 1===n?(t=e[i-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===n&&(t=(e[i-2]<<8)+e[i-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};var t,r=[],i=[],n=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(t=0,64;t<64;++t)r[t]=o[t],i[o.charCodeAt(t)]=t;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function s(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function c(e,t,r){for(var i,n=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),n.push(s(i));return n.join("")}i[45]=62,i[95]=63})),VV=s((e=>{e.read=function(e,t,r,i,n){var o,a,s=8*n-i-1,c=(1<<s)-1,l=c>>1,u=-7,d=r?n-1:0,h=r?-1:1,p=e[t+d];for(d+=h,o=p&(1<<-u)-1,p>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=i;u>0;a=256*a+e[t+d],d+=h,u-=8);if(0===o)o=1-l;else{if(o===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,i),o-=l}return(p?-1:1)*a*Math.pow(2,o-i)},e.write=function(e,t,r,i,n,o){var a,s,c,l=8*o-n-1,u=(1<<l)-1,d=u>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:o-1,f=i?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*c-1)*Math.pow(2,n),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,n),a=0));n>=8;e[r+p]=255&s,p+=f,s/=256,n-=8);for(a=a<<n|s,l+=n;l>0;e[r+p]=255&a,p+=f,a/=256,l-=8);e[r+p-f]|=128*g}})),GV=s((e=>{"use strict";var t=WV(),r=VV(),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},e.INSPECT_MAX_BYTES=50;var n=2147483647;function o(e){if(e>n)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=0|p(e,t),i=o(r),n=i.write(e,t);return n!==r&&(i=i.slice(0,n)),i}(e,t);if(ArrayBuffer.isView(e))return function(e){if(G(e,Uint8Array)){let t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return u(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');let i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return a.from(i,t,r);let n=function(e){if(a.isBuffer(e)){let t=0|h(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||Z(e.length)?o(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(e.data)}(e);if(n)return n;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return c(e),o(e<0?0:0|h(e))}function u(e){let t=e.length<0?0:0|h(e.length),r=o(t);for(let i=0;i<t;i+=1)r[i]=255&e[i];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let i;return i=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(i,a.prototype),i}function h(e){if(e>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(n)return i?-1:q(e).length;t=(""+t).toLowerCase(),n=!0}}function f(e,t,r){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,r);case"utf8":case"utf-8":return C(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function g(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function m(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Z(r=+r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=a.from(t,i)),a.isBuffer(t))return 0===t.length?-1:b(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,i,n){let o,a=1,s=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(n){let i=-1;for(o=r;o<s;o++)if(l(e,o)===l(t,-1===i?0:o-i)){if(-1===i&&(i=o),o-i+1===c)return i*a}else-1!==i&&(o-=o-i),i=-1}else for(r+c>s&&(r=s-c),o=r;o>=0;o--){let r=!0;for(let i=0;i<c;i++)if(l(e,o+i)!==l(t,i)){r=!1;break}if(r)return o}return-1}function y(e,t,r,i){r=Number(r)||0;let n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;let o,a=t.length;for(i>a/2&&(i=a/2),o=0;o<i;++o){let i=parseInt(t.substr(2*o,2),16);if(Z(i))return o;e[r+o]=i}return o}function w(e,t,r,i){return V(q(t,e.length-r),e,r,i)}function v(e,t,r,i){return V(function(e){let t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,i)}function _(e,t,r,i){return V(W(t),e,r,i)}function x(e,t,r,i){return V(function(e,t){let r,i,n,o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),i=r>>8,n=r%256,o.push(n),o.push(i);return o}(t,e.length-r),e,r,i)}function E(e,r,i){return 0===r&&i===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,i))}function C(e,t,r){r=Math.min(e.length,r);let i=[],n=t;for(;n<r;){let t=e[n],o=null,a=t>239?4:t>223?3:t>191?2:1;if(n+a<=r){let r,i,s,c;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[n+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(o=c));break;case 3:r=e[n+1],i=e[n+2],128==(192&r)&&128==(192&i)&&(c=(15&t)<<12|(63&r)<<6|63&i,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=e[n+1],i=e[n+2],s=e[n+3],128==(192&r)&&128==(192&i)&&128==(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&i)<<6|63&s,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),n+=a}return function(e){let t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);let r="",i=0;for(;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=k));return r}(i)}e.kMaxLength=n,a.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch{return!1}}(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return s(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return function(e,t,r){return c(e),e<=0?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)}(e,t,r)},a.allocUnsafe=function(e){return l(e)},a.allocUnsafeSlow=function(e){return l(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(G(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,i=t.length;for(let n=0,o=Math.min(r,i);n<o;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;let i=a.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){let t=e[r];if(G(t,Uint8Array))n+t.length>i.length?(a.isBuffer(t)||(t=a.from(t)),t.copy(i,n)):Uint8Array.prototype.set.call(i,t,n);else{if(!a.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,n)}n+=t.length}return i},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},a.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},a.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},a.prototype.toString=function(){let e=this.length;return 0===e?"":0===arguments.length?C(this,0,e):f.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){let t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(e,t,r,i,n){if(G(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(t>>>=0),c=Math.min(o,s),l=this.slice(i,n),u=e.slice(t,r);for(let e=0;e<c;++e)if(l[e]!==u[e]){o=l[e],s=u[e];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},a.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}let n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let o=!1;for(;;)switch(i){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return v(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function P(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}function I(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function S(e,t,r){let i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);let n="";for(let i=t;i<r;++i)n+=K[e[i]];return n}function A(e,t,r){let i=e.slice(t,r),n="";for(let e=0;e<i.length-1;e+=2)n+=String.fromCharCode(i[e]+256*i[e+1]);return n}function T(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,r,i,n,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function R(e,t,r,i,n){U(t,i,n,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function N(e,t,r,i,n){U(t,i,n,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function M(e,t,r,i,n,o){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function $(e,t,i,n,o){return t=+t,i>>>=0,o||M(e,0,i,4),r.write(e,t,i,n,23,4),i+4}function j(e,t,i,n,o){return t=+t,i>>>=0,o||M(e,0,i,8),r.write(e,t,i,n,52,8),i+8}a.prototype.slice=function(e,t){let r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);let i=this.subarray(e,t);return Object.setPrototypeOf(i,a.prototype),i},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);let i=this[e],n=1,o=0;for(;++o<t&&(n*=256);)i+=this[e+o]*n;return i},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);let i=this[e+--t],n=1;for(;t>0&&(n*=256);)i+=this[e+--t]*n;return i},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=Y((function(e){F(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&H(e,this.length-8);let i=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,n=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(i)+(BigInt(n)<<BigInt(32))})),a.prototype.readBigUInt64BE=Y((function(e){F(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&H(e,this.length-8);let i=t*2**24+65536*this[++e]+256*this[++e]+this[++e],n=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(i)<<BigInt(32))+BigInt(n)})),a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);let i=this[e],n=1,o=0;for(;++o<t&&(n*=256);)i+=this[e+o]*n;return n*=128,i>=n&&(i-=Math.pow(2,8*t)),i},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);let i=t,n=1,o=this[e+--i];for(;i>0&&(n*=256);)o+=this[e+--i]*n;return n*=128,o>=n&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=Y((function(e){F(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&H(e,this.length-8);let i=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),a.prototype.readBigInt64BE=Y((function(e){F(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&H(e,this.length-8);let i=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),a.prototype.readFloatLE=function(e,t){return e>>>=0,t||T(e,4,this.length),r.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),r.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),r.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),r.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,i){if(e=+e,t>>>=0,r>>>=0,!i){O(this,e,t,r,Math.pow(2,8*r)-1,0)}let n=1,o=0;for(this[t]=255&e;++o<r&&(n*=256);)this[t+o]=e/n&255;return t+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,i){if(e=+e,t>>>=0,r>>>=0,!i){O(this,e,t,r,Math.pow(2,8*r)-1,0)}let n=r-1,o=1;for(this[t+n]=255&e;--n>=0&&(o*=256);)this[t+n]=e/o&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=Y((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeBigUInt64BE=Y((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t>>>=0,!i){let i=Math.pow(2,8*r-1);O(this,e,t,r,i-1,-i)}let n=0,o=1,a=0;for(this[t]=255&e;++n<r&&(o*=256);)e<0&&0===a&&0!==this[t+n-1]&&(a=1),this[t+n]=(e/o>>0)-a&255;return t+r},a.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t>>>=0,!i){let i=Math.pow(2,8*r-1);O(this,e,t,r,i-1,-i)}let n=r-1,o=1,a=0;for(this[t+n]=255&e;--n>=0&&(o*=256);)e<0&&0===a&&0!==this[t+n+1]&&(a=1),this[t+n]=(e/o>>0)-a&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=Y((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeBigInt64BE=Y((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeFloatLE=function(e,t,r){return $(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return $(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,i){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!i&&0!==i&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r||0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);let n=i-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,i):Uint8Array.prototype.set.call(e,this.subarray(r,i),t),n},a.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){let t=e.charCodeAt(0);("utf8"===i&&t<128||"latin1"===i)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let n;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n<r;++n)this[n]=e;else{let o=a.isBuffer(e)?e:a.from(e,i),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<r-t;++n)this[n+t]=o[n%s]}return this};var L={};function B(e,t,r){L[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function D(e){let t="",r=e.length,i="-"===e[0]?1:0;for(;r>=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function U(e,t,r,i,n,o){if(e>r||e<t){let i,n="bigint"==typeof t?"n":"";throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new L.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){F(t,"offset"),(void 0===e[t]||void 0===e[t+r])&&H(t,e.length-(r+1))}(i,n,o)}function F(e,t){if("number"!=typeof e)throw new L.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){throw Math.floor(e)!==e?(F(e,r),new L.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new L.ERR_BUFFER_OUT_OF_BOUNDS:new L.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),B("ERR_OUT_OF_RANGE",(function(e,t,r){let i=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=D(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=D(n)),n+="n"),i+=` It must be ${t}. Received ${n}`,i}),RangeError);var z=/[^+/0-9A-Za-z-_]/g;function q(e,t){t=t||1/0;let r,i=e.length,n=null,o=[];for(let a=0;a<i;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,r,i){let n;for(n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function G(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}var K=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let i=16*r;for(let n=0;n<16;++n)t[i+n]=e[r]+e[n]}return t}();function Y(e){return typeof BigInt>"u"?J:e}function J(){throw new Error("BigInt not supported")}})),ZV=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.walletLogo=void 0;e.walletLogo=(e,t)=>{let r;switch(e){case"standard":default:return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' 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 r=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${r}' 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 r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' 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 r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' 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 r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' 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 r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' 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`}}})),KV=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LINK_API_URL=void 0,e.LINK_API_URL="https://www.walletlink.org"})),YV=s((()=>{})),JV=s(((e,t)=>{!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function n(e,t,r){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;try{o=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:YV().Buffer}catch{}function a(e,t){var i=e.charCodeAt(t);return i>=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void r(!1,"Invalid character in "+e)}function s(e,t,r){var i=a(e,r);return r-1>=t&&(i|=a(e,r-1)<<4),i}function c(e,t,i,n){for(var o=0,a=0,s=Math.min(e.length,i),c=t;c<s;c++){var l=e.charCodeAt(c)-48;o*=n,a=l>=49?l-49+10:l>=17?l-17+10:l,r(l>=0&&a<n,"Invalid character"),o+=a}return o}function l(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(n.isBN=function(e){return e instanceof n||null!==e&&"object"==typeof e&&e.constructor.wordSize===n.wordSize&&Array.isArray(e.words)},n.max=function(e,t){return e.cmp(t)>0?e:t},n.min=function(e,t){return e.cmp(t)<0?e:t},n.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,i):(this._parseBase(e,t,n),"le"===i&&this._initArray(this.toArray(),t,i)))},n.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},n.prototype._initArray=function(e,t,i){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,a,s=0;if("be"===i)for(n=e.length-1,o=0;n>=0;n-=3)a=e[n]|e[n-1]<<8|e[n-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"===i)for(n=0,o=0;n<e.length;n+=3)a=e[n]|e[n+1]<<8|e[n+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()},n.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,a=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=s(e,t,i)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=s(e,t,i)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this._strip()},n.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,a=o%i,s=Math.min(o,o-a)+r,l=0,u=r;u<s;u+=i)l=c(e,u,u+i,t),this.imuln(n),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==a){var d=1;for(l=c(e,u,e.length,t),u=0;u<a;u++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},n.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},n.prototype._move=function(e){l(e,this)},n.prototype.clone=function(){var e=new n(null);return this.copy(e),e},n.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},typeof Symbol<"u"&&"function"==typeof Symbol.for)try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch{n.prototype.inspect=u}else n.prototype.inspect=u;function u(){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"],h=[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];n.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,o=0,a=0;a<this.length;a++){var s=this.words[a],c=(16777215&(s<<n|o)).toString(16);o=s>>>24-n&16777215,(n+=2)>=26&&(n-=26,a--),i=0!==o||a!==this.length-1?d[6-c.length]+c+i:c+i}for(0!==o&&(i=o.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var l=h[e],u=p[e];i="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(u).toString(e);i=(f=f.idivn(u)).isZero()?g+i:d[l-g.length]+g+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16,2)},o&&(n.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),n.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function f(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],a=n*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var l=1;l<i;l++){for(var u=c>>>26,d=67108863&c,h=Math.min(l,t.length-1),p=Math.max(0,l-e.length+1);p<=h;p++){var f=l-p|0;u+=(a=(n=0|e.words[f])*(o=0|t.words[p])+d)/67108864|0,d=67108863&a}r.words[l]=0|d,c=0|u}return 0!==c?r.words[l]=0|c:r.length--,r._strip()}n.prototype.toArrayLike=function(e,t,i){this._strip();var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,n),a},n.prototype._toArrayLikeLE=function(e,t){for(var r=0,i=0,n=0,o=0;n<this.length;n++){var a=this.words[n]<<o|i;e[r++]=255&a,r<e.length&&(e[r++]=a>>8&255),r<e.length&&(e[r++]=a>>16&255),6===o?(r<e.length&&(e[r++]=a>>24&255),i=0,o=0):(i=a>>>24,o+=2)}if(r<e.length)for(e[r++]=i;r<e.length;)e[r++]=0},n.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,i=0,n=0,o=0;n<this.length;n++){var a=this.words[n]<<o|i;e[r--]=255&a,r>=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),i=0,o=0):(i=a>>>24,o+=2)}if(r>=0)for(e[r--]=i;r>=0;)e[r--]=0},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},n.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},n.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},n.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},n.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},n.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},n.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},n.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this._strip()},n.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},n.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<n:this.words[i]&~(1<<n),this._strip()},n.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},n.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,a=0;a<i.length;a++)o=(t=(0|r.words[a])-(0|i.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,r){var i,n,o,a=e.words,s=t.words,c=r.words,l=0,u=0|a[0],d=8191&u,h=u>>>13,p=0|a[1],f=8191&p,g=p>>>13,m=0|a[2],b=8191&m,y=m>>>13,w=0|a[3],v=8191&w,_=w>>>13,x=0|a[4],E=8191&x,C=x>>>13,k=0|a[5],P=8191&k,I=k>>>13,S=0|a[6],A=8191&S,T=S>>>13,O=0|a[7],R=8191&O,N=O>>>13,M=0|a[8],$=8191&M,j=M>>>13,L=0|a[9],B=8191&L,D=L>>>13,U=0|s[0],F=8191&U,H=U>>>13,z=0|s[1],q=8191&z,W=z>>>13,V=0|s[2],G=8191&V,Z=V>>>13,K=0|s[3],Y=8191&K,J=K>>>13,Q=0|s[4],X=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ie=te>>>13,ne=0|s[6],oe=8191&ne,ae=ne>>>13,se=0|s[7],ce=8191&se,le=se>>>13,ue=0|s[8],de=8191&ue,he=ue>>>13,pe=0|s[9],fe=8191&pe,ge=pe>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(l+(i=Math.imul(d,F))|0)+((8191&(n=(n=Math.imul(d,H))+Math.imul(h,F)|0))<<13)|0;l=((o=Math.imul(h,H))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(f,F),n=(n=Math.imul(f,H))+Math.imul(g,F)|0,o=Math.imul(g,H);var be=(l+(i=i+Math.imul(d,q)|0)|0)+((8191&(n=(n=n+Math.imul(d,W)|0)+Math.imul(h,q)|0))<<13)|0;l=((o=o+Math.imul(h,W)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(b,F),n=(n=Math.imul(b,H))+Math.imul(y,F)|0,o=Math.imul(y,H),i=i+Math.imul(f,q)|0,n=(n=n+Math.imul(f,W)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,W)|0;var ye=(l+(i=i+Math.imul(d,G)|0)|0)+((8191&(n=(n=n+Math.imul(d,Z)|0)+Math.imul(h,G)|0))<<13)|0;l=((o=o+Math.imul(h,Z)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(v,F),n=(n=Math.imul(v,H))+Math.imul(_,F)|0,o=Math.imul(_,H),i=i+Math.imul(b,q)|0,n=(n=n+Math.imul(b,W)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,W)|0,i=i+Math.imul(f,G)|0,n=(n=n+Math.imul(f,Z)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,Z)|0;var we=(l+(i=i+Math.imul(d,Y)|0)|0)+((8191&(n=(n=n+Math.imul(d,J)|0)+Math.imul(h,Y)|0))<<13)|0;l=((o=o+Math.imul(h,J)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(E,F),n=(n=Math.imul(E,H))+Math.imul(C,F)|0,o=Math.imul(C,H),i=i+Math.imul(v,q)|0,n=(n=n+Math.imul(v,W)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,W)|0,i=i+Math.imul(b,G)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,Z)|0,i=i+Math.imul(f,Y)|0,n=(n=n+Math.imul(f,J)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,J)|0;var ve=(l+(i=i+Math.imul(d,X)|0)|0)+((8191&(n=(n=n+Math.imul(d,ee)|0)+Math.imul(h,X)|0))<<13)|0;l=((o=o+Math.imul(h,ee)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(P,F),n=(n=Math.imul(P,H))+Math.imul(I,F)|0,o=Math.imul(I,H),i=i+Math.imul(E,q)|0,n=(n=n+Math.imul(E,W)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,W)|0,i=i+Math.imul(v,G)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,Z)|0,i=i+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,J)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,J)|0,i=i+Math.imul(f,X)|0,n=(n=n+Math.imul(f,ee)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,ee)|0;var _e=(l+(i=i+Math.imul(d,re)|0)|0)+((8191&(n=(n=n+Math.imul(d,ie)|0)+Math.imul(h,re)|0))<<13)|0;l=((o=o+Math.imul(h,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(A,F),n=(n=Math.imul(A,H))+Math.imul(T,F)|0,o=Math.imul(T,H),i=i+Math.imul(P,q)|0,n=(n=n+Math.imul(P,W)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,W)|0,i=i+Math.imul(E,G)|0,n=(n=n+Math.imul(E,Z)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,Z)|0,i=i+Math.imul(v,Y)|0,n=(n=n+Math.imul(v,J)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,J)|0,i=i+Math.imul(b,X)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,ee)|0,i=i+Math.imul(f,re)|0,n=(n=n+Math.imul(f,ie)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ie)|0;var xe=(l+(i=i+Math.imul(d,oe)|0)|0)+((8191&(n=(n=n+Math.imul(d,ae)|0)+Math.imul(h,oe)|0))<<13)|0;l=((o=o+Math.imul(h,ae)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(R,F),n=(n=Math.imul(R,H))+Math.imul(N,F)|0,o=Math.imul(N,H),i=i+Math.imul(A,q)|0,n=(n=n+Math.imul(A,W)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,W)|0,i=i+Math.imul(P,G)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,Z)|0,i=i+Math.imul(E,Y)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,J)|0,i=i+Math.imul(v,X)|0,n=(n=n+Math.imul(v,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(b,re)|0,n=(n=n+Math.imul(b,ie)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ie)|0,i=i+Math.imul(f,oe)|0,n=(n=n+Math.imul(f,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(l+(i=i+Math.imul(d,ce)|0)|0)+((8191&(n=(n=n+Math.imul(d,le)|0)+Math.imul(h,ce)|0))<<13)|0;l=((o=o+Math.imul(h,le)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul($,F),n=(n=Math.imul($,H))+Math.imul(j,F)|0,o=Math.imul(j,H),i=i+Math.imul(R,q)|0,n=(n=n+Math.imul(R,W)|0)+Math.imul(N,q)|0,o=o+Math.imul(N,W)|0,i=i+Math.imul(A,G)|0,n=(n=n+Math.imul(A,Z)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,Z)|0,i=i+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,J)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,J)|0,i=i+Math.imul(E,X)|0,n=(n=n+Math.imul(E,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,i=i+Math.imul(v,re)|0,n=(n=n+Math.imul(v,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(b,oe)|0,n=(n=n+Math.imul(b,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,i=i+Math.imul(f,ce)|0,n=(n=n+Math.imul(f,le)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,le)|0;var Ce=(l+(i=i+Math.imul(d,de)|0)|0)+((8191&(n=(n=n+Math.imul(d,he)|0)+Math.imul(h,de)|0))<<13)|0;l=((o=o+Math.imul(h,he)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(B,F),n=(n=Math.imul(B,H))+Math.imul(D,F)|0,o=Math.imul(D,H),i=i+Math.imul($,q)|0,n=(n=n+Math.imul($,W)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,W)|0,i=i+Math.imul(R,G)|0,n=(n=n+Math.imul(R,Z)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,Z)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,J)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,i=i+Math.imul(E,re)|0,n=(n=n+Math.imul(E,ie)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ie)|0,i=i+Math.imul(v,oe)|0,n=(n=n+Math.imul(v,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,i=i+Math.imul(b,ce)|0,n=(n=n+Math.imul(b,le)|0)+Math.imul(y,ce)|0,o=o+Math.imul(y,le)|0,i=i+Math.imul(f,de)|0,n=(n=n+Math.imul(f,he)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,he)|0;var ke=(l+(i=i+Math.imul(d,fe)|0)|0)+((8191&(n=(n=n+Math.imul(d,ge)|0)+Math.imul(h,fe)|0))<<13)|0;l=((o=o+Math.imul(h,ge)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(B,q),n=(n=Math.imul(B,W))+Math.imul(D,q)|0,o=Math.imul(D,W),i=i+Math.imul($,G)|0,n=(n=n+Math.imul($,Z)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,Z)|0,i=i+Math.imul(R,Y)|0,n=(n=n+Math.imul(R,J)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,J)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,ee)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,ee)|0,i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ie)|0,i=i+Math.imul(E,oe)|0,n=(n=n+Math.imul(E,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,i=i+Math.imul(v,ce)|0,n=(n=n+Math.imul(v,le)|0)+Math.imul(_,ce)|0,o=o+Math.imul(_,le)|0,i=i+Math.imul(b,de)|0,n=(n=n+Math.imul(b,he)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,he)|0;var Pe=(l+(i=i+Math.imul(f,fe)|0)|0)+((8191&(n=(n=n+Math.imul(f,ge)|0)+Math.imul(g,fe)|0))<<13)|0;l=((o=o+Math.imul(g,ge)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,i=Math.imul(B,G),n=(n=Math.imul(B,Z))+Math.imul(D,G)|0,o=Math.imul(D,Z),i=i+Math.imul($,Y)|0,n=(n=n+Math.imul($,J)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,J)|0,i=i+Math.imul(R,X)|0,n=(n=n+Math.imul(R,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,i=i+Math.imul(A,re)|0,n=(n=n+Math.imul(A,ie)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ie)|0,i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,i=i+Math.imul(E,ce)|0,n=(n=n+Math.imul(E,le)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,le)|0,i=i+Math.imul(v,de)|0,n=(n=n+Math.imul(v,he)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,he)|0;var Ie=(l+(i=i+Math.imul(b,fe)|0)|0)+((8191&(n=(n=n+Math.imul(b,ge)|0)+Math.imul(y,fe)|0))<<13)|0;l=((o=o+Math.imul(y,ge)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(B,Y),n=(n=Math.imul(B,J))+Math.imul(D,Y)|0,o=Math.imul(D,J),i=i+Math.imul($,X)|0,n=(n=n+Math.imul($,ee)|0)+Math.imul(j,X)|0,o=o+Math.imul(j,ee)|0,i=i+Math.imul(R,re)|0,n=(n=n+Math.imul(R,ie)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ie)|0,i=i+Math.imul(A,oe)|0,n=(n=n+Math.imul(A,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,i=i+Math.imul(P,ce)|0,n=(n=n+Math.imul(P,le)|0)+Math.imul(I,ce)|0,o=o+Math.imul(I,le)|0,i=i+Math.imul(E,de)|0,n=(n=n+Math.imul(E,he)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,he)|0;var Se=(l+(i=i+Math.imul(v,fe)|0)|0)+((8191&(n=(n=n+Math.imul(v,ge)|0)+Math.imul(_,fe)|0))<<13)|0;l=((o=o+Math.imul(_,ge)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(B,X),n=(n=Math.imul(B,ee))+Math.imul(D,X)|0,o=Math.imul(D,ee),i=i+Math.imul($,re)|0,n=(n=n+Math.imul($,ie)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ie)|0,i=i+Math.imul(R,oe)|0,n=(n=n+Math.imul(R,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,i=i+Math.imul(A,ce)|0,n=(n=n+Math.imul(A,le)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,le)|0,i=i+Math.imul(P,de)|0,n=(n=n+Math.imul(P,he)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,he)|0;var Ae=(l+(i=i+Math.imul(E,fe)|0)|0)+((8191&(n=(n=n+Math.imul(E,ge)|0)+Math.imul(C,fe)|0))<<13)|0;l=((o=o+Math.imul(C,ge)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(B,re),n=(n=Math.imul(B,ie))+Math.imul(D,re)|0,o=Math.imul(D,ie),i=i+Math.imul($,oe)|0,n=(n=n+Math.imul($,ae)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,ae)|0,i=i+Math.imul(R,ce)|0,n=(n=n+Math.imul(R,le)|0)+Math.imul(N,ce)|0,o=o+Math.imul(N,le)|0,i=i+Math.imul(A,de)|0,n=(n=n+Math.imul(A,he)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,he)|0;var Te=(l+(i=i+Math.imul(P,fe)|0)|0)+((8191&(n=(n=n+Math.imul(P,ge)|0)+Math.imul(I,fe)|0))<<13)|0;l=((o=o+Math.imul(I,ge)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(B,oe),n=(n=Math.imul(B,ae))+Math.imul(D,oe)|0,o=Math.imul(D,ae),i=i+Math.imul($,ce)|0,n=(n=n+Math.imul($,le)|0)+Math.imul(j,ce)|0,o=o+Math.imul(j,le)|0,i=i+Math.imul(R,de)|0,n=(n=n+Math.imul(R,he)|0)+Math.imul(N,de)|0,o=o+Math.imul(N,he)|0;var Oe=(l+(i=i+Math.imul(A,fe)|0)|0)+((8191&(n=(n=n+Math.imul(A,ge)|0)+Math.imul(T,fe)|0))<<13)|0;l=((o=o+Math.imul(T,ge)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,i=Math.imul(B,ce),n=(n=Math.imul(B,le))+Math.imul(D,ce)|0,o=Math.imul(D,le),i=i+Math.imul($,de)|0,n=(n=n+Math.imul($,he)|0)+Math.imul(j,de)|0,o=o+Math.imul(j,he)|0;var Re=(l+(i=i+Math.imul(R,fe)|0)|0)+((8191&(n=(n=n+Math.imul(R,ge)|0)+Math.imul(N,fe)|0))<<13)|0;l=((o=o+Math.imul(N,ge)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,i=Math.imul(B,de),n=(n=Math.imul(B,he))+Math.imul(D,de)|0,o=Math.imul(D,he);var Ne=(l+(i=i+Math.imul($,fe)|0)|0)+((8191&(n=(n=n+Math.imul($,ge)|0)+Math.imul(j,fe)|0))<<13)|0;l=((o=o+Math.imul(j,ge)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Me=(l+(i=Math.imul(B,fe))|0)+((8191&(n=(n=Math.imul(B,ge))+Math.imul(D,fe)|0))<<13)|0;return l=((o=Math.imul(D,ge))+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,c[0]=me,c[1]=be,c[2]=ye,c[3]=we,c[4]=ve,c[5]=_e,c[6]=xe,c[7]=Ee,c[8]=Ce,c[9]=ke,c[10]=Pe,c[11]=Ie,c[12]=Se,c[13]=Ae,c[14]=Te,c[15]=Oe,c[16]=Re,c[17]=Ne,c[18]=Me,0!==l&&(c[19]=l,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var a=n;n=0;for(var s=67108863&i,c=Math.min(o,t.length-1),l=Math.max(0,o-e.length+1);l<=c;l++){var u=o-l,d=(0|e.words[u])*(0|t.words[l]),h=67108863&d;s=67108863&(h=h+s|0),n+=(a=(a=a+(d/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r._strip()}function b(e,t,r){return m(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(g=f),n.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?f(this,e,t):r<1024?m(this,e,t):b(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=n.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},y.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},y.prototype.permute=function(e,t,r,i,n,o){for(var a=0;a<o;a++)i[a]=t[e[a]],n[a]=r[e[a]]},y.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var a=1;a<n;a<<=1)for(var s=a<<1,c=Math.cos(2*Math.PI/s),l=Math.sin(2*Math.PI/s),u=0;u<n;u+=s)for(var d=c,h=l,p=0;p<a;p++){var f=r[u+p],g=i[u+p],m=r[u+p+a],b=i[u+p+a],y=d*m-h*b;b=d*b+h*m,m=y,r[u+p]=f+m,i[u+p]=g+b,r[u+p+a]=f-m,i[u+p+a]=g-b,p!==s&&(y=c*d-l*h,h=c*h+l*d,d=y)}},y.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},y.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},y.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},y.prototype.convert13b=function(e,t,i,n){for(var o=0,a=0;a<t;a++)o+=0|e[a],i[2*a]=8191&o,o>>>=13,i[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<n;++a)i[a]=0;r(0===o),r(0==(-8192&o))},y.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},y.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),a=new Array(i),s=new Array(i),c=new Array(i),l=new Array(i),u=new Array(i),d=new Array(i),h=r.words;h.length=i,this.convert13b(e.words,e.length,a,i),this.convert13b(t.words,t.length,l,i),this.transform(a,o,s,c,i,n),this.transform(l,o,u,d,i,n);for(var p=0;p<i;p++){var f=s[p]*u[p]-c[p]*d[p];c[p]=s[p]*d[p]+c[p]*u[p],s[p]=f}return this.conjugate(s,c,i),this.transform(s,c,h,o,i,n),this.conjugate(h,o,i),this.normalize13b(h,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},n.prototype.mul=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},n.prototype.mulf=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),b(this,e,t)},n.prototype.imul=function(e){return this.clone().mulTo(e,this)},n.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var i=0,n=0;n<this.length;n++){var o=(0|this.words[n])*e,a=(67108863&o)+(67108863&i);i>>=26,i+=o/67108864|0,i+=a>>>26,this.words[n]=67108863&a}return 0!==i&&(this.words[n]=i,this.length++),t?this.ineg():this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=e.words[i]>>>n&1}return t}(e);if(0===t.length)return new n(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var o=r.sqr();i<t.length;i++,o=o.sqr())0!==t[i]&&(r=r.mul(o));return r},n.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,i=e%26,n=(e-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,c=(0|this.words[t])-s<<i;this.words[t]=c|a,a=s>>>26-i}a&&(this.words[t]=a,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this._strip()},n.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},n.prototype.iushrn=function(e,t,i){var n;r("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,c=i;if(n-=a,n=Math.max(0,n),c){for(var l=0;l<a;l++)c.words[l]=this.words[l];c.length=a}if(0!==a)if(this.length>a)for(this.length-=a,l=0;l<this.length;l++)this.words[l]=this.words[l+a];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;l>=0&&(0!==u||l>=n);l--){var d=0|this.words[l];this.words[l]=u<<26-o|d>>>o,u=d&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<<t;return!(this.length<=i)&&!!(this.words[i]&n)},n.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this._strip()},n.prototype.maskn=function(e){return this.clone().imaskn(e)},n.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},n.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},n.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},n.prototype.addn=function(e){return this.clone().iaddn(e)},n.prototype.subn=function(e){return this.clone().isubn(e)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(e,t,i){var n,o=e.length+i;this._expand(o);var a,s=0;for(n=0;n<e.length;n++){a=(0|this.words[n+i])+s;var c=(0|e.words[n])*t;s=((a-=67108863&c)>>26)-(c/67108864|0),this.words[n+i]=67108863&a}for(;n<this.length-i;n++)s=(a=(0|this.words[n+i])+s)>>26,this.words[n+i]=67108863&a;if(0===s)return this._strip();for(r(-1===s),s=0,n=0;n<this.length;n++)s=(a=-(0|this.words[n])+s)>>26,this.words[n]=67108863&a;return this.negative=1,this._strip()},n.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),o=e,a=0|o.words[o.length-1];0!==(r=26-this._countBits(a))&&(o=o.ushln(r),i.iushln(r),a=0|o.words[o.length-1]);var s,c=i.length-o.length;if("mod"!==t){(s=new n(null)).length=c+1,s.words=new Array(s.length);for(var l=0;l<s.length;l++)s.words[l]=0}var u=i.clone()._ishlnsubmul(o,1,c);0===u.negative&&(i=u,s&&(s.words[c]=1));for(var d=c-1;d>=0;d--){var h=67108864*(0|i.words[o.length+d])+(0|i.words[o.length+d-1]);for(h=Math.min(h/a|0,67108863),i._ishlnsubmul(o,h,d);0!==i.negative;)h--,i.negative=0,i._ishlnsubmul(o,1,d),i.isZero()||(i.negative^=1);s&&(s.words[d]=h)}return s&&s._strip(),i._strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},n.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),i&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):this.negative&e.negative?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),i&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new n(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},n.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(i*n+(0|this.words[o]))%e;return t?-n:n},n.prototype.modn=function(e){return this.modrn(e)},n.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*i;this.words[n]=o/e|0,i=o%e}return this._strip(),t?this.ineg():this},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new n(1),a=new n(0),s=new n(0),c=new n(1),l=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++l;for(var u=i.clone(),d=t.clone();!t.isZero();){for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(u),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var f=0,g=1;!(i.words[0]&g)&&f<26;++f,g<<=1);if(f>0)for(i.iushrn(f);f-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(i)>=0?(t.isub(i),o.isub(s),a.isub(c)):(i.isub(t),s.isub(o),c.isub(a))}return{a:s,b:c,gcd:i.iushln(l)}},n.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t,i=this,o=e.clone();i=0!==i.negative?i.umod(e):i.clone();for(var a=new n(1),s=new n(0),c=o.clone();i.cmpn(1)>0&&o.cmpn(1)>0;){for(var l=0,u=1;!(i.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,h=1;!(o.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(o.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);i.cmp(o)>=0?(i.isub(o),a.isub(s)):(o.isub(i),s.isub(a))}return(t=0===i.cmpn(1)?a:s).cmpn(0)<0&&t.iadd(e),t},n.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},n.prototype.invm=function(e){return this.egcd(e).a.umod(e)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(e){return this.words[0]&e},n.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,a=i;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},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},n.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},n.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},n.prototype.gtn=function(e){return 1===this.cmpn(e)},n.prototype.gt=function(e){return 1===this.cmp(e)},n.prototype.gten=function(e){return this.cmpn(e)>=0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.ltn=function(e){return-1===this.cmpn(e)},n.prototype.lt=function(e){return-1===this.cmp(e)},n.prototype.lten=function(e){return this.cmpn(e)<=0},n.prototype.lte=function(e){return this.cmp(e)<=0},n.prototype.eqn=function(e){return 0===this.cmpn(e)},n.prototype.eq=function(e){return 0===this.cmp(e)},n.red=function(e){return new k(e)},n.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(e){return this.red=e,this},n.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},n.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},n.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},n.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},n.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},n.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},n.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},n.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new n(t,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=n._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function P(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(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 e=new n(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(_,v),_.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var a=0|e.words[n];e.words[n-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(x,v),i(E,v),i(C,v),C.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},n._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new x;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return w[e]=t,t},k.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new n(1)).iushrn(2);return this.pow(e,i)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new n(1).toRed(this),c=s.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new n(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var d=this.pow(u,o),h=this.pow(e,o.addn(1).iushrn(1)),p=this.pow(e,o),f=a;0!==p.cmp(s);){for(var g=p,m=0;0!==g.cmp(s);m++)g=g.redSqr();r(m<f);var b=this.pow(d,new n(1).iushln(f-m-1));h=h.redMul(b),d=b.redSqr(),p=p.redMul(d),f=m}return h},k.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},k.prototype.pow=function(e,t){if(t.isZero())return new n(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new n(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var o=r[0],a=0,s=0,c=t.bitLength()%26;for(0===c&&(c=26),i=t.length-1;i>=0;i--){for(var l=t.words[i],u=c-1;u>=0;u--){var d=l>>u&1;(o!==r[0]&&(o=this.sqr(o)),0!==d||0!==a)?(a<<=1,a|=d,(4===++s||0===i&&0===u)&&(o=this.mul(o,r[a]),s=0,a=0)):s=0}c=26}return o},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},n.mont=function(e){return new P(e)},i(P,k),P.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},P.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},P.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},P.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new n(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},P.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(typeof t>"u"||t,e)})),QV=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.standardErrorCodes=void 0,e.standardErrorCodes={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,unsupportedChain:4902}},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."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}}})),XV=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;var t=QV(),r="Unspecified error message.";function i(i,n=r){if(i&&Number.isInteger(i)){let r=i.toString();if(s(t.errorValues,r))return t.errorValues[r].message;if(o(i))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function n(e){if(!Number.isInteger(e))return!1;let r=e.toString();return!(!t.errorValues[r]&&!o(e))}function o(e){return e>=-32099&&e<=-32e3}function a(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return"object"==typeof e&&null!==e&&t in e&&"string"==typeof e[t]}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=i,e.isValidCode=n,e.getErrorCode=function(e){var t;return"number"==typeof e?e:function(e){return"object"==typeof e&&null!==e&&("number"==typeof e.code||"number"==typeof e.errorCode)}(e)?null!==(t=e.code)&&void 0!==t?t:e.errorCode:void 0},e.serialize=function(e,{shouldIncludeStack:o=!1}={}){let l={};if(e&&"object"==typeof e&&!Array.isArray(e)&&s(e,"code")&&n(e.code)){let t=e;l.code=t.code,t.message&&"string"==typeof t.message?(l.message=t.message,s(t,"data")&&(l.data=t.data)):(l.message=i(l.code),l.data={originalError:a(e)})}else l.code=t.standardErrorCodes.rpc.internal,l.message=c(e,"message")?e.message:r,l.data={originalError:a(e)};return o&&(l.stack=c(e,"stack")?e.stack:void 0),l}})),eG=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=void 0;var t=QV(),r=XV();function i(e,t){let[i,n]=o(t);return new a(e,i||(0,r.getMessageFromCode)(e),n)}function n(e,t){let[i,n]=o(t);return new s(e,i||(0,r.getMessageFromCode)(e),n)}function o(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){let{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}e.standardErrors={rpc:{parse:e=>i(t.standardErrorCodes.rpc.parse,e),invalidRequest:e=>i(t.standardErrorCodes.rpc.invalidRequest,e),invalidParams:e=>i(t.standardErrorCodes.rpc.invalidParams,e),methodNotFound:e=>i(t.standardErrorCodes.rpc.methodNotFound,e),internal:e=>i(t.standardErrorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");let{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return i(t,e)},invalidInput:e=>i(t.standardErrorCodes.rpc.invalidInput,e),resourceNotFound:e=>i(t.standardErrorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>i(t.standardErrorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>i(t.standardErrorCodes.rpc.transactionRejected,e),methodNotSupported:e=>i(t.standardErrorCodes.rpc.methodNotSupported,e),limitExceeded:e=>i(t.standardErrorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>n(t.standardErrorCodes.provider.userRejectedRequest,e),unauthorized:e=>n(t.standardErrorCodes.provider.unauthorized,e),unsupportedMethod:e=>n(t.standardErrorCodes.provider.unsupportedMethod,e),disconnected:e=>n(t.standardErrorCodes.provider.disconnected,e),chainDisconnected:e=>n(t.standardErrorCodes.provider.chainDisconnected,e),unsupportedChain:e=>n(t.standardErrorCodes.provider.unsupportedChain,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");let{code:t,message:r,data:i}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new s(t,r,i)}}};var a=class extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}},s=class extends a{constructor(e,t,r){if(i=e,!(Number.isInteger(i)&&i>=1e3&&i<=4999))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');var i;super(e,t,r)}}})),tG=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isErrorResponse=void 0,e.isErrorResponse=function(e){return void 0!==e.errorMessage}})),rG=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LIB_VERSION=void 0,e.LIB_VERSION="3.9.1"})),iG=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=void 0;var t=tG(),r=rG(),i=QV(),n=XV();e.serializeError=function(e,o){let a=(0,n.serialize)(function(e){return"string"==typeof e?{message:e,code:i.standardErrorCodes.rpc.internal}:(0,t.isErrorResponse)(e)?Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method}}):e}(e),{shouldIncludeStack:!0}),s=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");s.searchParams.set("version",r.LIB_VERSION),s.searchParams.set("code",a.code.toString());let c=function(e,t){let r=e?.method;if(r)return r;if(void 0!==t){if("string"==typeof t)return t;if(!Array.isArray(t))return t.method;if(t.length>0)return t[0].method}}(a.data,o);return c&&s.searchParams.set("method",c),s.searchParams.set("message",a.message),Object.assign(Object.assign({},a),{docUrl:s.href})}})),nG=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;var t=QV();Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});var r=eG();Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}});var i=iG();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}});var n=XV();Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return n.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return n.getMessageFromCode}})})),oG=s((e=>{"use strict";function t(){return e=>e}var r,i;Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=e.RegExpString=e.IntNumber=e.BigIntString=e.AddressString=e.HexString=e.OpaqueType=void 0,e.OpaqueType=t,e.HexString=e=>e,e.AddressString=e=>e,e.BigIntString=e=>e,e.IntNumber=function(e){return Math.floor(e)},e.RegExpString=e=>e,(i=r||(e.ProviderType=r={})).CoinbaseWallet="CoinbaseWallet",i.MetaMask="MetaMask",i.Unselected=""})),aG=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.isMobileWeb=e.getLocation=e.isInIFrame=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;var r=t(JV()),i=nG(),n=oG(),o=/^[0-9]*$/,a=/^[a-f0-9]*$/;function s(e){return[...e].map((e=>e.toString(16).padStart(2,"0"))).join("")}function c(e){return e.startsWith("0x")||e.startsWith("0X")}function l(e){return c(e)?e.slice(2):e}function u(e){return c(e)?`0x${e.slice(2)}`:`0x${e}`}function d(e){if("string"!=typeof e)return!1;let t=l(e).toLowerCase();return a.test(t)}function h(e,t=!1){if("string"==typeof e){let r=l(e).toLowerCase();if(a.test(r))return(0,n.HexString)(t?`0x${r}`:r)}throw i.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}function p(e,t=!1){let r=h(e,!1);return r.length%2==1&&(r=(0,n.HexString)(`0${r}`)),t?(0,n.HexString)(`0x${r}`):r}function f(e){if("number"==typeof e&&Number.isInteger(e))return(0,n.IntNumber)(e);if("string"==typeof e){if(o.test(e))return(0,n.IntNumber)(Number(e));if(d(e))return(0,n.IntNumber)(new r.default(p(e,!1),16).toNumber())}throw i.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}function g(e){if(null==e||"function"!=typeof e.constructor)return!1;let{constructor:t}=e;return"function"==typeof t.config&&"number"==typeof t.EUCLID}function m(){try{return null!==window.frameElement}catch{return!1}}e.randomBytesHex=function(e){return s(crypto.getRandomValues(new Uint8Array(e)))},e.uint8ArrayToHex=s,e.hexStringToUint8Array=function(e){return new Uint8Array(e.match(/.{1,2}/g).map((e=>parseInt(e,16))))},e.hexStringFromBuffer=function(e,t=!1){let r=e.toString("hex");return(0,n.HexString)(t?`0x${r}`:r)},e.bigIntStringFromBN=function(e){return(0,n.BigIntString)(e.toString(10))},e.intNumberFromHexString=function(e){return(0,n.IntNumber)(new r.default(p(e,!1),16).toNumber())},e.hexStringFromIntNumber=function(e){return(0,n.HexString)(`0x${new r.default(e).toString(16)}`)},e.has0xPrefix=c,e.strip0x=l,e.prepend0x=u,e.isHexString=d,e.ensureHexString=h,e.ensureEvenLengthHexString=p,e.ensureAddressString=function(e){if("string"==typeof e){let t=l(e).toLowerCase();if(d(t)&&40===t.length)return(0,n.AddressString)(u(t))}throw i.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)},e.ensureBuffer=function(e){if(Buffer.isBuffer(e))return e;if("string"==typeof e){if(d(e)){let t=p(e,!1);return Buffer.from(t,"hex")}return Buffer.from(e,"utf8")}throw i.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)},e.ensureIntNumber=f,e.ensureRegExpString=function(e){if(e instanceof RegExp)return(0,n.RegExpString)(e.toString());throw i.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)},e.ensureBN=function(e){if(null!==e&&(r.default.isBN(e)||g(e)))return new r.default(e.toString(10),10);if("number"==typeof e)return new r.default(f(e));if("string"==typeof e){if(o.test(e))return new r.default(e,10);if(d(e))return new r.default(p(e,!1),16)}throw i.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)},e.ensureParsedJSONObject=function(e){if("string"==typeof e)return JSON.parse(e);if("object"==typeof e)return e;throw i.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)},e.isBigNumber=g,e.range=function(e,t){return Array.from({length:t-e},((t,r)=>e+r))},e.getFavicon=function(){let e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:r}=document.location,i=e?e.getAttribute("href"):null;return!i||i.startsWith("javascript:")||i.startsWith("vbscript:")?null:i.startsWith("http://")||i.startsWith("https://")||i.startsWith("data:")?i:i.startsWith("//")?t+i:`${t}//${r}${i}`},e.createQrUrl=function(e,t,r,i,n,o){return`${r}/#/link?${new URLSearchParams({[i?"parent-id":"id"]:e,secret:t,server:r,v:n,chainId:o.toString()}).toString()}`},e.isInIFrame=m,e.getLocation=function(){try{return m()&&window.top?window.top.location:window.location}catch{return window.location}},e.isMobileWeb=function(){var e;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(null===(e=window?.navigator)||void 0===e?void 0:e.userAgent)}})),sG=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScopedLocalStorage=void 0;e.ScopedLocalStorage=class{constructor(e){this.scope=e}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){let e=this.scopedKey(""),t=[];for(let r=0;r<localStorage.length;r++){let i=localStorage.key(r);"string"==typeof i&&i.startsWith(e)&&t.push(i)}t.forEach((e=>localStorage.removeItem(e)))}scopedKey(e){return`${this.scope}:${e}`}}})),cG=s((e=>{"use strict";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",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}})),lG=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RelayAbstract=e.APP_VERSION_KEY=e.LOCAL_STORAGE_ADDRESSES_KEY=e.WALLET_USER_NAME_KEY=void 0;var t=nG();e.WALLET_USER_NAME_KEY="walletUsername",e.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",e.APP_VERSION_KEY="AppVersion";e.RelayAbstract=class{async makeEthereumJSONRPCRequest(e,r){if(!r)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(r,{method:"POST",body:JSON.stringify(e),mode:"cors",headers:{"Content-Type":"application/json"}}).then((e=>e.json())).then((r=>{if(!r)throw t.standardErrors.rpc.parse({});let i=r,{error:n}=i;if(n)throw(0,t.serializeError)(n,e.method);return i}))}}})),uG=s(((e,t)=>{"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),dG=s(((e,t)=>{var r=GV(),i=r.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(n(r,e),e.Buffer=o),n(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}})),hG=s(((e,t)=>{var r=dG().Buffer;function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var i=this._block,n=this._blockSize,o=e.length,a=this._len,s=0;s<o;){for(var c=a%n,l=Math.min(o-s,n-c),u=0;u<l;u++)i[c+u]=e[s+u];s+=l,(a+=l)%n==0&&this._update(i)}return this._len+=o,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(4294967295&r)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i})),pG=s(((e,t)=>{var r=uG(),i=hG(),n=dG().Buffer,o=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function s(){this.init(),this._w=a,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function u(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}r(s,i),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(e){for(var t=this._w,r=0|this._a,i=0|this._b,n=0|this._c,a=0|this._d,s=0|this._e,d=0;d<16;++d)t[d]=e.readInt32BE(4*d);for(;d<80;++d)t[d]=t[d-3]^t[d-8]^t[d-14]^t[d-16];for(var h=0;h<80;++h){var p=~~(h/20),f=c(r)+u(p,i,n,a)+s+t[h]+o[p]|0;s=a,a=n,n=l(i),i=r,r=f}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},s.prototype._hash=function(){var e=n.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=s})),fG=s(((e,t)=>{var r=uG(),i=hG(),n=dG().Buffer,o=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function s(){this.init(),this._w=a,i.call(this,64,56)}function c(e){return e<<1|e>>>31}function l(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function d(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}r(s,i),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(e){for(var t=this._w,r=0|this._a,i=0|this._b,n=0|this._c,a=0|this._d,s=0|this._e,h=0;h<16;++h)t[h]=e.readInt32BE(4*h);for(;h<80;++h)t[h]=c(t[h-3]^t[h-8]^t[h-14]^t[h-16]);for(var p=0;p<80;++p){var f=~~(p/20),g=l(r)+d(f,i,n,a)+s+t[p]+o[f]|0;s=a,a=n,n=u(i),i=r,r=g}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},s.prototype._hash=function(){var e=n.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=s})),gG=s(((e,t)=>{var r=uG(),i=hG(),n=dG().Buffer,o=[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],a=new Array(64);function s(){this.init(),this._w=a,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function u(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function p(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}r(s,i),s.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},s.prototype._update=function(e){for(var t=this._w,r=0|this._a,i=0|this._b,n=0|this._c,a=0|this._d,s=0|this._e,f=0|this._f,g=0|this._g,m=0|this._h,b=0;b<16;++b)t[b]=e.readInt32BE(4*b);for(;b<64;++b)t[b]=p(t[b-2])+t[b-7]+h(t[b-15])+t[b-16]|0;for(var y=0;y<64;++y){var w=m+d(s)+c(s,f,g)+o[y]+t[y]|0,v=u(r)+l(r,i,n)|0;m=g,g=f,f=s,s=a+w|0,a=n,n=i,i=r,r=w+v|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0,this._f=f+this._f|0,this._g=g+this._g|0,this._h=m+this._h|0},s.prototype._hash=function(){var e=n.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=s})),mG=s(((e,t)=>{var r=uG(),i=gG(),n=hG(),o=dG().Buffer,a=new Array(64);function s(){this.init(),this._w=a,n.call(this,64,56)}r(s,i),s.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},s.prototype._hash=function(){var e=o.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=s})),bG=s(((e,t)=>{var r=uG(),i=hG(),n=dG().Buffer,o=[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],a=new Array(160);function s(){this.init(),this._w=a,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function u(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function f(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0<t>>>0?1:0}r(s,i),s.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},s.prototype._update=function(e){for(var t=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,a=0|this._dh,s=0|this._eh,b=0|this._fh,y=0|this._gh,w=0|this._hh,v=0|this._al,_=0|this._bl,x=0|this._cl,E=0|this._dl,C=0|this._el,k=0|this._fl,P=0|this._gl,I=0|this._hl,S=0;S<32;S+=2)t[S]=e.readInt32BE(4*S),t[S+1]=e.readInt32BE(4*S+4);for(;S<160;S+=2){var A=t[S-30],T=t[S-30+1],O=h(A,T),R=p(T,A),N=f(A=t[S-4],T=t[S-4+1]),M=g(T,A),$=t[S-14],j=t[S-14+1],L=t[S-32],B=t[S-32+1],D=R+j|0,U=O+$+m(D,R)|0;U=(U=U+N+m(D=D+M|0,M)|0)+L+m(D=D+B|0,B)|0,t[S]=U,t[S+1]=D}for(var F=0;F<160;F+=2){U=t[F],D=t[F+1];var H=l(r,i,n),z=l(v,_,x),q=u(r,v),W=u(v,r),V=d(s,C),G=d(C,s),Z=o[F],K=o[F+1],Y=c(s,b,y),J=c(C,k,P),Q=I+G|0,X=w+V+m(Q,I)|0;X=(X=(X=X+Y+m(Q=Q+J|0,J)|0)+Z+m(Q=Q+K|0,K)|0)+U+m(Q=Q+D|0,D)|0;var ee=W+z|0,te=q+H+m(ee,W)|0;w=y,I=P,y=b,P=k,b=s,k=C,s=a+X+m(C=E+Q|0,E)|0,a=n,E=x,n=i,x=_,i=r,_=v,r=X+te+m(v=Q+ee|0,Q)|0}this._al=this._al+v|0,this._bl=this._bl+_|0,this._cl=this._cl+x|0,this._dl=this._dl+E|0,this._el=this._el+C|0,this._fl=this._fl+k|0,this._gl=this._gl+P|0,this._hl=this._hl+I|0,this._ah=this._ah+r+m(this._al,v)|0,this._bh=this._bh+i+m(this._bl,_)|0,this._ch=this._ch+n+m(this._cl,x)|0,this._dh=this._dh+a+m(this._dl,E)|0,this._eh=this._eh+s+m(this._el,C)|0,this._fh=this._fh+b+m(this._fl,k)|0,this._gh=this._gh+y+m(this._gl,P)|0,this._hh=this._hh+w+m(this._hl,I)|0},s.prototype._hash=function(){var e=n.allocUnsafe(64);function t(t,r,i){e.writeInt32BE(t,i),e.writeInt32BE(r,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=s})),yG=s(((e,t)=>{var r=uG(),i=bG(),n=hG(),o=dG().Buffer,a=new Array(160);function s(){this.init(),this._w=a,n.call(this,128,112)}r(s,i),s.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},s.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,r,i){e.writeInt32BE(t,i),e.writeInt32BE(r,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=s})),wG=s(((e,t)=>{(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r}).sha=pG(),e.sha1=fG(),e.sha224=mG(),e.sha256=gG(),e.sha384=yG(),e.sha512=bG()})),vG=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Session=void 0;var t=wG(),r=aG(),i="session:id",n="session:secret",o="session:linked";e.Session=class e{constructor(e,i,n,o){this._storage=e,this._id=i||(0,r.randomBytesHex)(16),this._secret=n||(0,r.randomBytesHex)(32),this._key=(new t.sha256).update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!o}static load(t){let r=t.getItem(i),a=t.getItem(o),s=t.getItem(n);return r&&s?new e(t,r,s,"1"===a):null}static hash(e){return(new t.sha256).update(e).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(i,this._id),this._storage.setItem(n,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(o,this._linked?"1":"0")}}})),_G=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Cipher=void 0;var t=aG();e.Cipher=class{constructor(e){this.secret=e}async encrypt(e){let r=this.secret;if(64!==r.length)throw Error("secret must be 256 bits");let i=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.importKey("raw",(0,t.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=new TextEncoder,a=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:i},n,o.encode(e)),s=a.slice(a.byteLength-16),c=a.slice(0,a.byteLength-16),l=new Uint8Array(s),u=new Uint8Array(c),d=new Uint8Array([...i,...l,...u]);return(0,t.uint8ArrayToHex)(d)}async decrypt(e){let r=this.secret;if(64!==r.length)throw Error("secret must be 256 bits");return new Promise(((i,n)=>{!async function(){let o=await crypto.subtle.importKey("raw",(0,t.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),a=(0,t.hexStringToUint8Array)(e),s=a.slice(0,12),c=a.slice(12,28),l=a.slice(28),u=new Uint8Array([...l,...c]),d={name:"AES-GCM",iv:new Uint8Array(s)};try{let e=await window.crypto.subtle.decrypt(d,o,u),t=new TextDecoder;i(t.decode(e))}catch(e){n(e)}}()}))}}})),xG=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkHTTP=void 0;e.WalletLinkHTTP=class{constructor(e,t,r){this.linkAPIUrl=e,this.sessionId=t;let i=`${t}:${r}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map((e=>fetch(`${this.linkAPIUrl}/events/${e.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}})))).catch((e=>console.error("Unabled to mark event as failed:",e)))}async fetchUnseenEvents(){var e;let t=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(t.ok){let{events:r,error:i}=await t.json();if(i)throw new Error(`Check unseen events failed: ${i}`);let n=null!==(e=r?.filter((e=>"Web3Response"===e.event)).map((e=>({type:"Event",sessionId:this.sessionId,eventId:e.id,event:e.event,data:e.data}))))&&void 0!==e?e:[];return this.markUnseenEventsAsSeen(n),n}throw new Error(`Check unseen events failed: ${t.status}`)}}})),EG=s((e=>{"use strict";var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkWebSocket=e.ConnectionState=void 0,(r=t||(e.ConnectionState=t={}))[r.DISCONNECTED=0]="DISCONNECTED",r[r.CONNECTING=1]="CONNECTING",r[r.CONNECTED=2]="CONNECTED";e.WalletLinkWebSocket=class{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,t=WebSocket){this.WebSocketClass=t,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise(((e,r)=>{var i;let n;try{this.webSocket=n=new this.WebSocketClass(this.url)}catch(e){return void r(e)}null===(i=this.connectionStateListener)||void 0===i||i.call(this,t.CONNECTING),n.onclose=e=>{var i;this.clearWebSocket(),r(new Error(`websocket error ${e.code}: ${e.reason}`)),null===(i=this.connectionStateListener)||void 0===i||i.call(this,t.DISCONNECTED)},n.onopen=r=>{var i;e(),null===(i=this.connectionStateListener)||void 0===i||i.call(this,t.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach((e=>this.sendData(e))),this.pendingData=[])},n.onmessage=e=>{var t,r;if("h"===e.data)null===(t=this.incomingDataListener)||void 0===t||t.call(this,{type:"Heartbeat"});else try{let t=JSON.parse(e.data);null===(r=this.incomingDataListener)||void 0===r||r.call(this,t)}catch{}}}))}disconnect(){var e;let{webSocket:r}=this;if(r){this.clearWebSocket(),null===(e=this.connectionStateListener)||void 0===e||e.call(this,t.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{r.close()}catch{}}}sendData(e){let{webSocket:t}=this;if(!t)return this.pendingData.push(e),void this.connect();t.send(e)}clearWebSocket(){let{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}})),CG=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkConnection=void 0;var t=oG(),r=_G(),i=cG(),n=lG(),o=vG(),a=xG(),s=EG();e.WalletLinkConnection=class{constructor({session:e,linkAPIUrl:c,listener:l,diagnostic:u,WebSocketClass:d=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,t.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=e=>{e&&new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",t=>e.JsonRpcUrl&&this.handleChainUpdated(t,e.JsonRpcUrl)]]).forEach(((t,r)=>{let i=e[r];void 0!==i&&t(i)}))},this.handleDestroyed=e=>{var t,r;"1"===e&&(null===(t=this.listener)||void 0===t||t.resetAndReload(),null===(r=this.diagnostic)||void 0===r||r.log(i.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:o.Session.hash(this.session.id)}))},this.handleAccountUpdated=async e=>{var t,r;try{let r=await this.cipher.decrypt(e);null===(t=this.listener)||void 0===t||t.accountUpdated(r)}catch{null===(r=this.diagnostic)||void 0===r||r.log(i.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(e,t)=>{var r,n;try{let i=await this.cipher.decrypt(t);null===(r=this.listener)||void 0===r||r.metadataUpdated(e,i)}catch{null===(n=this.diagnostic)||void 0===n||n.log(i.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:e})}},this.handleWalletUsernameUpdated=async e=>{this.handleMetadataUpdated(n.WALLET_USER_NAME_KEY,e)},this.handleAppVersionUpdated=async e=>{this.handleMetadataUpdated(n.APP_VERSION_KEY,e)},this.handleChainUpdated=async(e,t)=>{var r,n;try{let i=await this.cipher.decrypt(e),n=await this.cipher.decrypt(t);null===(r=this.listener)||void 0===r||r.chainUpdated(i,n)}catch{null===(n=this.diagnostic)||void 0===n||n.log(i.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=e,this.cipher=new r.Cipher(e.secret),this.diagnostic=u,this.listener=l;let h=new s.WalletLinkWebSocket(`${c}/rpc`,d);h.setConnectionStateListener((async t=>{var r;null===(r=this.diagnostic)||void 0===r||r.log(i.EVENTS.CONNECTED_STATE_CHANGE,{state:t,sessionIdHash:o.Session.hash(e.id)});let n=!1;switch(t){case s.ConnectionState.DISCONNECTED:if(!this.destroyed){let e=async()=>{await new Promise((e=>setTimeout(e,5e3))),this.destroyed||h.connect().catch((()=>{e()}))};e()}break;case s.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),n=!0}catch{}this.updateLastHeartbeat(),setInterval((()=>{this.heartbeat()}),1e4),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();case s.ConnectionState.CONNECTING:}this.connected!==n&&(this.connected=n)})),h.setIncomingDataListener((t=>{var r,n,a;switch(t.type){case"Heartbeat":return void this.updateLastHeartbeat();case"IsLinkedOK":case"Linked":{let n="IsLinkedOK"===t.type?t.linked:void 0;null===(r=this.diagnostic)||void 0===r||r.log(i.EVENTS.LINKED,{sessionIdHash:o.Session.hash(e.id),linked:n,type:t.type,onlineGuests:t.onlineGuests}),this.linked=n||t.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":null===(n=this.diagnostic)||void 0===n||n.log(i.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:o.Session.hash(e.id),metadata_keys:t&&t.metadata?Object.keys(t.metadata):void 0}),this.handleSessionMetadataUpdated(t.metadata);break;case"Event":this.handleIncomingEvent(t)}void 0!==t.id&&(null===(a=this.requestResolutions.get(t.id))||void 0===a||a(t))})),this.ws=h,this.http=new a.WalletLinkHTTP(c,e.id,e.key)}connect(){var e;if(this.destroyed)throw new Error("instance is destroyed");null===(e=this.diagnostic)||void 0===e||e.log(i.EVENTS.STARTED_CONNECTING,{sessionIdHash:o.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var e;this.destroyed=!0,this.ws.disconnect(),null===(e=this.diagnostic)||void 0===e||e.log(i.EVENTS.DISCONNECTED,{sessionIdHash:o.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(e){var t,r;this._connected=e,e&&(null===(t=this.onceConnected)||void 0===t||t.call(this)),null===(r=this.listener)||void 0===r||r.connectedUpdated(e)}setOnceConnected(e){return new Promise((t=>{this.connected?e().then(t):this.onceConnected=()=>{e().then(t),this.onceConnected=void 0}}))}get linked(){return this._linked}set linked(e){var t,r;this._linked=e,e&&(null===(t=this.onceLinked)||void 0===t||t.call(this)),null===(r=this.listener)||void 0===r||r.linkedUpdated(e)}setOnceLinked(e){return new Promise((t=>{this.linked?e().then(t):this.onceLinked=()=>{e().then(t),this.onceLinked=void 0}}))}async handleIncomingEvent(e){var t,r;if("Event"===e.type&&"Web3Response"===e.event)try{let r=await this.cipher.decrypt(e.data),i=JSON.parse(r);if("WEB3_RESPONSE"!==i.type)return;null===(t=this.listener)||void 0===t||t.handleWeb3ResponseMessage(i)}catch{null===(r=this.diagnostic)||void 0===r||r.log(i.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(this.connected){await new Promise((e=>setTimeout(e,250)));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}else this.shouldFetchUnseenEventsOnConnect=!0}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach((e=>this.handleIncomingEvent(e)))}async setSessionMetadata(e,r){let i={type:"SetSessionConfig",id:(0,t.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[e]:r}};return this.setOnceConnected((async()=>{let e=await this.makeRequest(i);if("Fail"===e.type)throw new Error(e.error||"failed to set session metadata")}))}async publishEvent(e,r,i=!1){let n=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},r),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),o={type:"PublishEvent",id:(0,t.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:e,data:n,callWebhook:i};return this.setOnceLinked((async()=>{let e=await this.makeRequest(o);if("Fail"===e.type)throw new Error(e.error||"failed to publish event");return e.eventId}))}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch{}}async makeRequest(e,t=6e4){let r,i=e.id;return this.sendData(e),Promise.race([new Promise(((e,n)=>{r=window.setTimeout((()=>{n(new Error(`request ${i} timed out`))}),t)})),new Promise((e=>{this.requestResolutions.set(i,(t=>{clearTimeout(r),e(t),this.requestResolutions.delete(i)}))}))])}async authenticate(){let e={type:"HostSession",id:(0,t.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},r=await this.makeRequest(e);if("Fail"===r.type)throw new Error(r.error||"failed to authentcate")}sendIsLinked(){let e={type:"IsLinked",id:(0,t.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}sendGetSessionConfig(){let e={type:"GetSessionConfig",id:(0,t.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}}})),kG=s((e=>{"use strict";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;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;counter-increment:none;counter-reset:none;direction:ltr;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;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;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";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;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;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;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}'})),PG=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.injectCssReset=void 0;var r=t(kG());e.injectCssReset=function(){let e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(r.default)),document.documentElement.appendChild(e)}})),IG={};function SG(e,t){for(var r in t)e[r]=t[r];return e}function AG(e){var t=e.parentNode;t&&t.removeChild(e)}function TG(e,t,r){var i,n,o,a={};for(o in t)"key"==o?i=t[o]:"ref"==o?n=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?tZ.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return OG(e,a,i,n,null)}function OG(e,t,r,i,n){var o={type:e,props:t,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:n??++iZ,__i:-1,__u:0};return null==n&&null!=rZ.vnode&&rZ.vnode(o),o}function RG(){return{current:null}}function NG(e){return e.children}function MG(e,t){this.props=e,this.context=t}function $G(e,t){if(null==t)return e.__?$G(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?$G(e):null}function jG(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return jG(e)}}function LG(e){(!e.__d&&(e.__d=!0)&&oZ.push(e)&&!BG.__r++||aZ!==rZ.debounceRendering)&&((aZ=rZ.debounceRendering)||sZ)(BG)}function BG(){var e,t,r,i,n,o,a,s;for(oZ.sort(cZ);e=oZ.shift();)e.__d&&(t=oZ.length,i=void 0,o=(n=(r=e).__v).__e,a=[],s=[],r.__P&&((i=SG({},n)).__v=n.__v+1,rZ.vnode&&rZ.vnode(i),VG(r.__P,i,n,r.__n,void 0!==r.__P.ownerSVGElement,32&n.__u?[o]:null,a,o??$G(n),!!(32&n.__u),s),i.__v=n.__v,i.__.__k[i.__i]=i,GG(a,i,s),i.__e!=o&&jG(i)),oZ.length>t&&oZ.sort(cZ));BG.__r=0}function DG(e,t,r,i,n,o,a,s,c,l,u){var d,h,p,f,g,m=i&&i.__k||fZ,b=t.length;for(r.__d=c,function(e,t,r){var i,n,o,a,s,c=t.length,l=r.length,u=l,d=0;for(e.__k=[],i=0;i<c;i++)a=i+d,null!=(n=e.__k[i]=null==(n=t[i])||"boolean"==typeof n||"function"==typeof n?null:"string"==typeof n||"number"==typeof n||"bigint"==typeof n||n.constructor==String?OG(null,n,null,null,null):mZ(n)?OG(NG,{children:n},null,null,null):void 0===n.constructor&&n.__b>0?OG(n.type,n.props,n.key,n.ref?n.ref:null,n.__v):n)?(n.__=e,n.__b=e.__b+1,s=HG(n,r,a,u),n.__i=s,o=null,-1!==s&&(u--,(o=r[s])&&(o.__u|=131072)),null==o||null===o.__v?(-1==s&&d--,"function"!=typeof n.type&&(n.__u|=65536)):s!==a&&(s===a+1?d++:s>a?u>c-a?d+=s-a:d--:s<a?s==a-1&&(d=s-a):d=0,s!==i+d&&(n.__u|=65536))):(o=r[a])&&null==o.key&&o.__e&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=$G(o)),KG(o,o,!1),r[a]=null,u--);if(u)for(i=0;i<l;i++)null!=(o=r[i])&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=$G(o)),KG(o,o))}(r,t,m),c=r.__d,d=0;d<b;d++)null!=(p=r.__k[d])&&"boolean"!=typeof p&&"function"!=typeof p&&(h=-1===p.__i?pZ:m[p.__i]||pZ,p.__i=d,VG(e,p,h,n,o,a,s,c,l,u),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&ZG(h.ref,null,p),u.push(p.ref,p.__c||f,p)),null==g&&null!=f&&(g=f),65536&p.__u||h.__k===p.__k?(c&&!c.isConnected&&(c=$G(h)),c=UG(p,c,e)):"function"==typeof p.type&&void 0!==p.__d?c=p.__d:f&&(c=f.nextSibling),p.__d=void 0,p.__u&=-196609);r.__d=c,r.__e=g}function UG(e,t,r){var i,n;if("function"==typeof e.type){for(i=e.__k,n=0;i&&n<i.length;n++)i[n]&&(i[n].__=e,t=UG(i[n],t,r));return t}e.__e!=t&&(r.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function FG(e,t){return t=t||[],null==e||"boolean"==typeof e||(mZ(e)?e.some((function(e){FG(e,t)})):t.push(e)),t}function HG(e,t,r,i){var n=e.key,o=e.type,a=r-1,s=r+1,c=t[r];if(null===c||c&&n==c.key&&o===c.type&&!(131072&c.__u))return r;if(i>(null==c||131072&c.__u?0:1))for(;a>=0||s<t.length;){if(a>=0){if((c=t[a])&&!(131072&c.__u)&&n==c.key&&o===c.type)return a;a--}if(s<t.length){if((c=t[s])&&!(131072&c.__u)&&n==c.key&&o===c.type)return s;s++}}return-1}function zG(e,t,r){"-"===t[0]?e.setProperty(t,r??""):e[t]=null==r?"":"number"!=typeof r||gZ.test(t)?r:r+"px"}function qG(e,t,r,i,n){var o;e:if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)r&&t in r||zG(e.style,t,"");if(r)for(t in r)i&&r[t]===i[t]||zG(e.style,t,r[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?i?r.u=i.u:(r.u=lZ,e.addEventListener(t,o?dZ:uZ,o)):e.removeEventListener(t,o?dZ:uZ,o);else{if(n)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&t in e)try{e[t]=r??"";break e}catch{}"function"==typeof r||(null==r||!1===r&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,r))}}function WG(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t.t)t.t=lZ++;else if(t.t<r.u)return;return r(rZ.event?rZ.event(t):t)}}}function VG(e,t,r,i,n,o,a,s,c,l){var u,d,h,p,f,g,m,b,y,w,v,_,x,E,C,k=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(c=!!(32&r.__u),o=[s=t.__e=r.__e]),(u=rZ.__b)&&u(t);e:if("function"==typeof k)try{if(b=t.props,y=(u=k.contextType)&&i[u.__c],w=u?y?y.props.value:u.__:i,r.__c?m=(d=t.__c=r.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(b,w):(t.__c=d=new MG(b,w),d.constructor=k,d.render=YG),y&&y.sub(d),d.props=b,d.state||(d.state={}),d.context=w,d.__n=i,h=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=k.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=SG({},d.__s)),SG(d.__s,k.getDerivedStateFromProps(b,d.__s))),p=d.props,f=d.state,d.__v=t,h)null==k.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==k.getDerivedStateFromProps&&b!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(b,w),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(b,d.__s,w)||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=b,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),v=0;v<d._sb.length;v++)d.__h.push(d._sb[v]);d._sb=[],d.__h.length&&a.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(b,d.__s,w),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,g)}))}if(d.context=w,d.props=b,d.__P=e,d.__e=!1,_=rZ.__r,x=0,"prototype"in k&&k.prototype.render){for(d.state=d.__s,d.__d=!1,_&&_(t),u=d.render(d.props,d.state,d.context),E=0;E<d._sb.length;E++)d.__h.push(d._sb[E]);d._sb=[]}else do{d.__d=!1,_&&_(t),u=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++x<25);d.state=d.__s,null!=d.getChildContext&&(i=SG(SG({},i),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(p,f)),DG(e,mZ(C=null!=u&&u.type===NG&&null==u.key?u.props.children:u)?C:[C],t,r,i,n,o,a,s,c,l),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),m&&(d.__E=d.__=null)}catch(e){t.__v=null,c||null!=o?(t.__e=s,t.__u|=c?160:32,o[o.indexOf(s)]=null):(t.__e=r.__e,t.__k=r.__k),rZ.__e(e,t,r)}else null==o&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=function(e,t,r,i,n,o,a,s,c){var l,u,d,h,p,f,g,m=r.props,b=t.props,y=t.type;if("svg"===y&&(n=!0),null!=o)for(l=0;l<o.length;l++)if((p=o[l])&&"setAttribute"in p==!!y&&(y?p.localName===y:3===p.nodeType)){e=p,o[l]=null;break}if(null==e){if(null===y)return document.createTextNode(b);e=n?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,b.is&&b),o=null,s=!1}if(null===y)m===b||s&&e.data===b||(e.data=b);else{if(o=o&&tZ.call(e.childNodes),m=r.props||pZ,!s&&null!=o)for(m={},l=0;l<e.attributes.length;l++)m[(p=e.attributes[l]).name]=p.value;for(l in m)if(p=m[l],"children"!=l)if("dangerouslySetInnerHTML"==l)d=p;else if("key"!==l&&!(l in b)){if("value"==l&&"defaultValue"in b||"checked"==l&&"defaultChecked"in b)continue;qG(e,l,null,p,n)}for(l in b)p=b[l],"children"==l?h=p:"dangerouslySetInnerHTML"==l?u=p:"value"==l?f=p:"checked"==l?g=p:"key"===l||s&&"function"!=typeof p||m[l]===p||qG(e,l,p,m[l],n);if(u)s||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=""),DG(e,mZ(h)?h:[h],t,r,i,n&&"foreignObject"!==y,o,a,o?o[0]:r.__k&&$G(r,0),s,c),null!=o)for(l=o.length;l--;)null!=o[l]&&AG(o[l]);s||(l="value",void 0!==f&&(f!==e[l]||"progress"===y&&!f||"option"===y&&f!==m[l])&&qG(e,l,f,m[l],!1),l="checked",void 0!==g&&g!==e[l]&&qG(e,l,g,m[l],!1))}return e}(r.__e,t,r,i,n,o,a,c,l);(u=rZ.diffed)&&u(t)}function GG(e,t,r){t.__d=void 0;for(var i=0;i<r.length;i++)ZG(r[i],r[++i],r[++i]);rZ.__c&&rZ.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){rZ.__e(e,t.__v)}}))}function ZG(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(e){rZ.__e(e,r)}}function KG(e,t,r){var i,n;if(rZ.unmount&&rZ.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||ZG(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){rZ.__e(e,t)}i.base=i.__P=null}if(i=e.__k)for(n=0;n<i.length;n++)i[n]&&KG(i[n],t,r||"function"!=typeof e.type);r||null==e.__e||AG(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function YG(e,t,r){return this.constructor(e,r)}function JG(e,t,r){var i,n,o,a;rZ.__&&rZ.__(e,t),n=(i="function"==typeof r)?null:r&&r.__k||t.__k,o=[],a=[],VG(t,e=(!i&&r||t).__k=TG(NG,null,[e]),n||pZ,pZ,void 0!==t.ownerSVGElement,!i&&r?[r]:n?null:t.firstChild?tZ.call(t.childNodes):null,o,!i&&r?r:n?n.__e:t.firstChild,i,a),GG(o,e,a)}function QG(e,t){JG(e,t,QG)}function XG(e,t,r){var i,n,o,a,s=SG({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==o?i=t[o]:"ref"==o?n=t[o]:s[o]=void 0===t[o]&&void 0!==a?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?tZ.call(arguments,2):r),OG(e.type,s,i||e.key,n||e.ref,null)}function eZ(e,t){var r={__c:t="__cC"+hZ++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i;return this.getChildContext||(r=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some((function(e){e.__e=!0,LG(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}c(IG,{Component:()=>MG,Fragment:()=>NG,cloneElement:()=>XG,createContext:()=>eZ,createElement:()=>TG,createRef:()=>RG,h:()=>TG,hydrate:()=>QG,isValidElement:()=>nZ,options:()=>rZ,render:()=>JG,toChildArray:()=>FG});var tZ,rZ,iZ,nZ,oZ,aZ,sZ,cZ,lZ,uZ,dZ,hZ,pZ,fZ,gZ,mZ,bZ=a((()=>{pZ={},fZ=[],gZ=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,mZ=Array.isArray,tZ=fZ.slice,rZ={__e:function(e,t,r,i){for(var n,o,a;t=t.__;)if((n=t.__c)&&!n.__)try{if((o=n.constructor)&&null!=o.getDerivedStateFromError&&(n.setState(o.getDerivedStateFromError(e)),a=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e,i||{}),a=n.__d),a)return n.__E=n}catch(t){e=t}throw e}},iZ=0,nZ=function(e){return null!=e&&null==e.constructor},MG.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=SG({},this.state),"function"==typeof e&&(e=e(SG({},r),this.props)),e&&SG(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),LG(this))},MG.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),LG(this))},MG.prototype.render=NG,oZ=[],sZ="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,cZ=function(e,t){return e.__v.__b-t.__v.__b},BG.__r=0,lZ=0,uZ=WG(!1),dZ=WG(!0),hZ=0})),yZ=s(((e,t)=>{function r(e){var t,i,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(i=r(e[t]))&&(n&&(n+=" "),n+=i);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function i(){for(var e,t,i=0,n="";i<arguments.length;)(e=arguments[i++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}t.exports=i,t.exports.clsx=i})),wZ={};function vZ(e,t){VZ.__h&&VZ.__h(UZ,e,zZ||t),zZ=0;var r=UZ.__H||(UZ.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:WZ}),r.__[e]}function _Z(e){return zZ=1,xZ(BZ,e)}function xZ(e,t,r){var i=vZ(DZ++,2);if(i.t=e,!i.__c&&(i.__=[r?r(t):BZ(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],r=i.t(t,e);t!==r&&(i.__N=[r,i.__[1]],i.__c.setState({}))}],i.__c=UZ,!UZ.u)){var n=function(e,t,r){if(!i.__c.__H)return!0;var n=i.__c.__H.__.filter((function(e){return!!e.__c}));if(n.every((function(e){return!e.__N})))return!o||o.call(this,e,t,r);var a=!1;return n.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&i.__c.props===e)&&(!o||o.call(this,e,t,r))};UZ.u=!0;var o=UZ.shouldComponentUpdate,a=UZ.componentWillUpdate;UZ.componentWillUpdate=function(e,t,r){if(this.__e){var i=o;o=void 0,n(e,t,r),o=i}a&&a.call(this,e,t,r)},UZ.shouldComponentUpdate=n}return i.__N||i.__}function EZ(e,t){var r=vZ(DZ++,3);!VZ.__s&&LZ(r.__H,t)&&(r.__=e,r.i=t,UZ.__H.__h.push(r))}function CZ(e,t){var r=vZ(DZ++,4);!VZ.__s&&LZ(r.__H,t)&&(r.__=e,r.i=t,UZ.__h.push(r))}function kZ(e){return zZ=5,IZ((function(){return{current:e}}),[])}function PZ(e,t,r){zZ=6,CZ((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==r?r:r.concat(e))}function IZ(e,t){var r=vZ(DZ++,7);return LZ(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function SZ(e,t){return zZ=8,IZ((function(){return e}),t)}function AZ(e){var t=UZ.context[e.__c],r=vZ(DZ++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(UZ)),t.props.value):e.__}function TZ(e,t){VZ.useDebugValue&&VZ.useDebugValue(t?t(e):e)}function OZ(e){var t=vZ(DZ++,10),r=_Z();return t.__=e,UZ.componentDidCatch||(UZ.componentDidCatch=function(e,i){t.__&&t.__(e,i),r[1](e)}),[r[0],function(){r[1](void 0)}]}function RZ(){var e=vZ(DZ++,11);if(!e.__){for(var t=UZ.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function NZ(){for(var e;e=qZ.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach($Z),e.__H.__h.forEach(jZ),e.__H.__h=[]}catch(t){e.__H.__h=[],VZ.__e(t,e.__v)}}function MZ(e){var t,r=function(){clearTimeout(i),XZ&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(r,100);XZ&&(t=requestAnimationFrame(r))}function $Z(e){var t=UZ,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),UZ=t}function jZ(e){var t=UZ;e.__c=e.__(),UZ=t}function LZ(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function BZ(e,t){return"function"==typeof t?t(e):t}c(wZ,{useCallback:()=>SZ,useContext:()=>AZ,useDebugValue:()=>TZ,useEffect:()=>EZ,useErrorBoundary:()=>OZ,useId:()=>RZ,useImperativeHandle:()=>PZ,useLayoutEffect:()=>CZ,useMemo:()=>IZ,useReducer:()=>xZ,useRef:()=>kZ,useState:()=>_Z});var DZ,UZ,FZ,HZ,zZ,qZ,WZ,VZ,GZ,ZZ,KZ,YZ,JZ,QZ,XZ,eK=a((()=>{bZ(),zZ=0,qZ=[],WZ=[],GZ=(VZ=rZ).__b,ZZ=VZ.__r,KZ=VZ.diffed,YZ=VZ.__c,JZ=VZ.unmount,QZ=VZ.__,VZ.__b=function(e){UZ=null,GZ&&GZ(e)},VZ.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),QZ&&QZ(e,t)},VZ.__r=function(e){ZZ&&ZZ(e),DZ=0;var t=(UZ=e.__c).__H;t&&(FZ===UZ?(t.__h=[],UZ.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=WZ,e.__N=e.i=void 0}))):(t.__h.forEach($Z),t.__h.forEach(jZ),t.__h=[],DZ=0)),FZ=UZ},VZ.diffed=function(e){KZ&&KZ(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==qZ.push(t)&&HZ===VZ.requestAnimationFrame||((HZ=VZ.requestAnimationFrame)||MZ)(NZ)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==WZ&&(e.__=e.__V),e.i=void 0,e.__V=WZ}))),FZ=UZ=null},VZ.__c=function(e,t){t.some((function(e){try{e.__h.forEach($Z),e.__h=e.__h.filter((function(e){return!e.__||jZ(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],VZ.__e(r,e.__v)}})),YZ&&YZ(e,t)},VZ.unmount=function(e){JZ&&JZ(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{$Z(e)}catch(e){t=e}})),r.__H=void 0,t&&VZ.__e(t,r.__v))},XZ="function"==typeof requestAnimationFrame})),tK=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CloseIcon=void 0;var t=(bZ(),h(IG));e.CloseIcon=function(e){return(0,t.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),(0,t.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}})),rK=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletRound=void 0;var t=(bZ(),h(IG));e.CoinbaseWalletRound=function(e){return(0,t.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),(0,t.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,t.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,t.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}})),iK=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QRCodeIcon=void 0;var t=(bZ(),h(IG));e.QRCodeIcon=function(e){return(0,t.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),(0,t.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,t.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,t.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,t.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}})),nK=s(((e,t)=>{function r(e){this.mode=o.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,r=this.data.length;t<r;t++){var i=[],n=this.data.charCodeAt(t);n>65536?(i[0]=240|(1835008&n)>>>18,i[1]=128|(258048&n)>>>12,i[2]=128|(4032&n)>>>6,i[3]=128|63&n):n>2048?(i[0]=224|(61440&n)>>>12,i[1]=128|(4032&n)>>>6,i[2]=128|63&n):n>128?(i[0]=192|(1984&n)>>>6,i[1]=128|63&n):i[0]=n,this.parsedData.push(i)}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 i(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}r.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,r=this.parsedData.length;t<r;t++)e.put(this.parsedData[t],8)}},i.prototype={addData:function(e){var t=new r(e);this.dataList.push(t),this.dataCache=null},isDark:function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=i.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1||this.moduleCount<=e+r))for(var i=-1;i<=7;i++)t+i<=-1||this.moduleCount<=t+i||(this.modules[e+r][t+i]=0<=r&&r<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=i&&i<=4)},getBestMaskPattern:function(){for(var e=0,t=0,r=0;r<8;r++){this.makeImpl(!0,r);var i=y.getLostPoint(this);(0==r||e>i)&&(e=i,t=r)}return t},createMovieClip:function(e,t,r){var i=e.createEmptyMovieClip(t,r);this.make();for(var n=0;n<this.modules.length;n++)for(var o=1*n,a=0;a<this.modules[n].length;a++){var s=1*a;this.modules[n][a]&&(i.beginFill(0,100),i.moveTo(s,o),i.lineTo(s+1,o),i.lineTo(s+1,o+1),i.lineTo(s,o+1),i.endFill())}return i},setupTimingPattern:function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},setupPositionAdjustPattern:function(){for(var e=y.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var r=0;r<e.length;r++){var i=e[t],n=e[r];if(null==this.modules[i][n])for(var o=-2;o<=2;o++)for(var a=-2;a<=2;a++)this.modules[i+o][n+a]=-2==o||2==o||-2==a||2==a||0==o&&0==a}},setupTypeNumber:function(e){for(var t=y.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var i=!e&&1==(t>>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=i}for(r=0;r<18;r++){i=!e&&1==(t>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=i}},setupTypeInfo:function(e,t){for(var r=this.errorCorrectLevel<<3|t,i=y.getBCHTypeInfo(r),n=0;n<15;n++){var o=!e&&1==(i>>n&1);n<6?this.modules[n][8]=o:n<8?this.modules[n+1][8]=o:this.modules[this.moduleCount-15+n][8]=o}for(n=0;n<15;n++){o=!e&&1==(i>>n&1);n<8?this.modules[8][this.moduleCount-n-1]=o:n<9?this.modules[8][15-n-1+1]=o:this.modules[8][15-n-1]=o}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var r=-1,i=this.moduleCount-1,n=7,o=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var s=0;s<2;s++)if(null==this.modules[i][a-s]){var c=!1;o<e.length&&(c=1==(e[o]>>>n&1)),y.getMask(t,i,a-s)&&(c=!c),this.modules[i][a-s]=c,-1==--n&&(o++,n=7)}if((i+=r)<0||this.moduleCount<=i){i-=r,r=-r;break}}}},i.PAD0=236,i.PAD1=17,i.createData=function(e,t,r){for(var n=_.getRSBlocks(e,t),o=new x,a=0;a<r.length;a++){var s=r[a];o.put(s.mode,4),o.put(s.getLength(),y.getLengthInBits(s.mode,e)),s.write(o)}var c=0;for(a=0;a<n.length;a++)c+=n[a].dataCount;if(o.getLengthInBits()>8*c)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+8*c+")");for(o.getLengthInBits()+4<=8*c&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*c||(o.put(i.PAD0,8),o.getLengthInBits()>=8*c));)o.put(i.PAD1,8);return i.createBytes(o,n)},i.createBytes=function(e,t){for(var r=0,i=0,n=0,o=new Array(t.length),a=new Array(t.length),s=0;s<t.length;s++){var c=t[s].dataCount,l=t[s].totalCount-c;i=Math.max(i,c),n=Math.max(n,l),o[s]=new Array(c);for(var u=0;u<o[s].length;u++)o[s][u]=255&e.buffer[u+r];r+=c;var d=y.getErrorCorrectPolynomial(l),h=new v(o[s],d.getLength()-1).mod(d);a[s]=new Array(d.getLength()-1);for(u=0;u<a[s].length;u++){var p=u+h.getLength()-a[s].length;a[s][u]=p>=0?h.get(p):0}}var f=0;for(u=0;u<t.length;u++)f+=t[u].totalCount;var g=new Array(f),m=0;for(u=0;u<i;u++)for(s=0;s<t.length;s++)u<o[s].length&&(g[m++]=o[s][u]);for(u=0;u<n;u++)for(s=0;s<t.length;s++)u<a[s].length&&(g[m++]=a[s][u]);return g};var n,o={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},a=1,s=0,c=3,l=2,u=0,d=1,h=2,p=3,f=4,g=5,m=6,b=7,y={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;y.getBCHDigit(t)-y.getBCHDigit(y.G15)>=0;)t^=y.G15<<y.getBCHDigit(t)-y.getBCHDigit(y.G15);return(e<<10|t)^y.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;y.getBCHDigit(t)-y.getBCHDigit(y.G18)>=0;)t^=y.G18<<y.getBCHDigit(t)-y.getBCHDigit(y.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return y.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case u:return(t+r)%2==0;case d:return t%2==0;case h:return r%3==0;case p:return(t+r)%3==0;case f:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case g:return t*r%2+t*r%3==0;case m:return(t*r%2+t*r%3)%2==0;case b:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new v([1],0),r=0;r<e;r++)t=t.multiply(new v([1,w.gexp(r)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case o.MODE_NUMBER:return 10;case o.MODE_ALPHA_NUM:return 9;case o.MODE_8BIT_BYTE:case o.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case o.MODE_NUMBER:return 12;case o.MODE_ALPHA_NUM:return 11;case o.MODE_8BIT_BYTE:return 16;case o.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case o.MODE_NUMBER:return 14;case o.MODE_ALPHA_NUM:return 13;case o.MODE_8BIT_BYTE:return 16;case o.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),r=0,i=0;i<t;i++)for(var n=0;n<t;n++){for(var o=0,a=e.isDark(i,n),s=-1;s<=1;s++)if(!(i+s<0||t<=i+s))for(var c=-1;c<=1;c++)n+c<0||t<=n+c||0==s&&0==c||a==e.isDark(i+s,n+c)&&o++;o>5&&(r+=3+o-5)}for(i=0;i<t-1;i++)for(n=0;n<t-1;n++){var l=0;e.isDark(i,n)&&l++,e.isDark(i+1,n)&&l++,e.isDark(i,n+1)&&l++,e.isDark(i+1,n+1)&&l++,(0==l||4==l)&&(r+=3)}for(i=0;i<t;i++)for(n=0;n<t-6;n++)e.isDark(i,n)&&!e.isDark(i,n+1)&&e.isDark(i,n+2)&&e.isDark(i,n+3)&&e.isDark(i,n+4)&&!e.isDark(i,n+5)&&e.isDark(i,n+6)&&(r+=40);for(n=0;n<t;n++)for(i=0;i<t-6;i++)e.isDark(i,n)&&!e.isDark(i+1,n)&&e.isDark(i+2,n)&&e.isDark(i+3,n)&&e.isDark(i+4,n)&&!e.isDark(i+5,n)&&e.isDark(i+6,n)&&(r+=40);var u=0;for(n=0;n<t;n++)for(i=0;i<t;i++)e.isDark(i,n)&&u++;return r+=10*(Math.abs(100*u/t/t-50)/5)}},w={glog:function(e){if(e<1)throw new Error("glog("+e+")");return w.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return w.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(n=0;n<8;n++)w.EXP_TABLE[n]=1<<n;for(n=8;n<256;n++)w.EXP_TABLE[n]=w.EXP_TABLE[n-4]^w.EXP_TABLE[n-5]^w.EXP_TABLE[n-6]^w.EXP_TABLE[n-8];for(n=0;n<255;n++)w.LOG_TABLE[w.EXP_TABLE[n]]=n;function v(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var r=0;r<e.length&&0==e[r];)r++;this.num=new Array(e.length-r+t);for(var i=0;i<e.length-r;i++)this.num[i]=e[i+r]}function _(e,t){this.totalCount=e,this.dataCount=t}function x(){this.buffer=[],this.length=0}v.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),r=0;r<this.getLength();r++)for(var i=0;i<e.getLength();i++)t[r+i]^=w.gexp(w.glog(this.get(r))+w.glog(e.get(i)));return new v(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=w.glog(this.get(0))-w.glog(e.get(0)),r=new Array(this.getLength()),i=0;i<this.getLength();i++)r[i]=this.get(i);for(i=0;i<e.getLength();i++)r[i]^=w.gexp(w.glog(e.get(i))+t);return new v(r,0).mod(e)}},_.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]],_.getRSBlocks=function(e,t){var r=_.getRsBlockTable(e,t);if(null==r)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var i=r.length/3,n=[],o=0;o<i;o++)for(var a=r[3*o+0],s=r[3*o+1],c=r[3*o+2],l=0;l<a;l++)n.push(new _(s,c));return n},_.getRsBlockTable=function(e,t){switch(t){case a:return _.RS_BLOCK_TABLE[4*(e-1)+0];case s:return _.RS_BLOCK_TABLE[4*(e-1)+1];case c:return _.RS_BLOCK_TABLE[4*(e-1)+2];case l:return _.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},x.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var E=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function C(e){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},"string"==typeof e&&(e={content:e}),e)for(var t in e)this.options[t]=e[t];if("string"!=typeof this.options.content)throw new Error("Expected 'content' as string!");if(0===this.options.content.length)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0&&this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");var r=this.options.content,n=function(e,t){for(var r=function(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=e?3:0)}(e),i=1,n=0,o=0,a=E.length;o<=a;o++){var s=E[o];if(!s)throw new Error("Content too long: expected "+n+" but got "+r);switch(t){case"L":n=s[0];break;case"M":n=s[1];break;case"Q":n=s[2];break;case"H":n=s[3];break;default:throw new Error("Unknwon error correction level: "+t)}if(r<=n)break;i++}if(i>E.length)throw new Error("Content too long");return i}(r,this.options.ecl),o=function(e){switch(e){case"L":return a;case"M":return s;case"Q":return c;case"H":return l;default:throw new Error("Unknwon error correction level: "+e)}}(this.options.ecl);this.qrcode=new i(n,o),this.qrcode.addData(r),this.qrcode.make()}C.prototype.svg=function(e){var t=this.options||{},r=this.qrcode.modules;typeof e>"u"&&(e={container:t.container||"svg"});for(var i=!(typeof t.pretty<"u")||!!t.pretty,n=i?"  ":"",o=i?"\r\n    ":"",a=t.width,s=t.height,c=r.length,l=a/(c+2*t.padding),u=s/(c+2*t.padding),d=typeof t.join<"u"&&!!t.join,h=typeof t.swap<"u"&&!!t.swap,p=!(typeof t.xmlDeclaration<"u")||!!t.xmlDeclaration,f=typeof t.predefined<"u"&&!!t.predefined,g=f?n+'<defs><path id="qrmodule" d="M0 0 h'+u+" v"+l+' H0 z" style="fill:'+t.color+';shape-rendering:crispEdges;" /></defs>'+o:"",m=n+'<rect x="0" y="0" width="'+a+'" height="'+s+'" style="fill:'+t.background+';shape-rendering:crispEdges;"/>'+o,b="",y="",w=0;w<c;w++)for(var v=0;v<c;v++){if(r[v][w]){var _=v*l+t.padding*l,x=w*u+t.padding*u;if(h){var E=_;_=x,x=E}if(d){var C=l+_,k=u+x;_=Number.isInteger(_)?Number(_):_.toFixed(2),x=Number.isInteger(x)?Number(x):x.toFixed(2),C=Number.isInteger(C)?Number(C):C.toFixed(2),y+="M"+_+","+x+" V"+(k=Number.isInteger(k)?Number(k):k.toFixed(2))+" H"+C+" V"+x+" H"+_+" Z "}else b+=f?n+'<use x="'+_.toString()+'" y="'+x.toString()+'" href="#qrmodule" />'+o:n+'<rect x="'+_.toString()+'" y="'+x.toString()+'" width="'+l+'" height="'+u+'" style="fill:'+t.color+';shape-rendering:crispEdges;"/>'+o}}d&&(b=n+'<path x="0" y="0" style="fill:'+t.color+';shape-rendering:crispEdges;" d="'+y+'" />');let P="";if(void 0!==this.options.image&&this.options.image.svg){let e=a*this.options.image.width/100,t=s*this.options.image.height/100;P+=`<svg x="${a/2-e/2}" y="${s/2-t/2}" width="${e}" height="${t}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,P+=this.options.image.svg+o,P+="</svg>"}var I="";switch(e.container){case"svg":p&&(I+='<?xml version="1.0" standalone="yes"?>'+o),I+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+a+'" height="'+s+'">'+o,I+=g+m+b,I+=P,I+="</svg>";break;case"svg-viewbox":p&&(I+='<?xml version="1.0" standalone="yes"?>'+o),I+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+a+" "+s+'">'+o,I+=g+m+b,I+=P,I+="</svg>";break;case"g":I+='<g width="'+a+'" height="'+s+'">'+o,I+=g+m+b,I+=P,I+="</g>";break;default:I+=(g+m+b+P).replace(/^\s+/,"")}return I},t.exports=C})),oK=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.QRCode=void 0;var r=(bZ(),h(IG)),i=(eK(),h(wZ)),n=t(nK());e.QRCode=e=>{let[t,o]=(0,i.useState)("");return(0,i.useEffect)((()=>{var t,r;let i=new n.default({content:e.content,background:e.bgColor||"#ffffff",color:e.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(t=e.width)&&void 0!==t?t:256,height:null!==(r=e.height)&&void 0!==r?r:256,padding:0,image:e.image}),a=Buffer.from(i.svg(),"utf8").toString("base64");o(`data:image/svg+xml;base64,${a}`)}),[e.bgColor,e.content,e.fgColor,e.height,e.image,e.width]),t?(0,r.h)("img",{src:t,alt:"QR Code"}):null}})),aK=s((e=>{"use strict";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)}}"})),sK=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Spinner=void 0;var r=(bZ(),h(IG)),i=t(aK());e.Spinner=e=>{var t;let n=null!==(t=e.size)&&void 0!==t?t:64,o=e.color||"#000";return(0,r.h)("div",{class:"-cbwsdk-spinner"},(0,r.h)("style",null,i.default),(0,r.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:n,height:n}},(0,r.h)("circle",{style:{cx:50,cy:50,r:45,stroke:o}})))}})),cK=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-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-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}"})),lK=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletSteps=e.ConnectContent=void 0;var r=t(yZ()),i=(bZ(),h(IG)),n=aG(),o=rG(),a=tK(),s=rK(),c=iK(),l=oK(),u=sK(),d=t(cK()),p="Coinbase Wallet app",f="Connect with your self-custody wallet",g=y,m=e=>"light"===e?"#FFFFFF":"#0A0B0D";function b({title:e,description:t,theme:n}){return(0,i.h)("div",{className:(0,r.default)("-cbwsdk-connect-item",n)},(0,i.h)("div",null,(0,i.h)(s.CoinbaseWalletRound,null)),(0,i.h)("div",{className:"-cbwsdk-connect-item-copy-wrapper"},(0,i.h)("h3",{className:"-cbwsdk-connect-item-title"},e),(0,i.h)("p",{className:"-cbwsdk-connect-item-description"},t)))}function y({theme:e}){return(0,i.h)("ol",{className:"-cbwsdk-wallet-steps"},(0,i.h)("li",{className:(0,r.default)("-cbwsdk-wallet-steps-item",e)},(0,i.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,i.h)("li",{className:(0,r.default)("-cbwsdk-wallet-steps-item",e)},(0,i.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},(0,i.h)("span",null,"Tap ",(0,i.h)("strong",null,"Scan")," "),(0,i.h)("span",{className:(0,r.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",e)},(0,i.h)(c.QRCodeIcon,{fill:m(e)})))))}e.ConnectContent=function(e){let{theme:t}=e,s=(0,n.createQrUrl)(e.sessionId,e.sessionSecret,e.linkAPIUrl,e.isParentConnection,e.version,e.chainId),c=g;return(0,i.h)("div",{"data-testid":"connect-content",className:(0,r.default)("-cbwsdk-connect-content",t)},(0,i.h)("style",null,d.default),(0,i.h)("div",{className:"-cbwsdk-connect-content-header"},(0,i.h)("h2",{className:(0,r.default)("-cbwsdk-connect-content-heading",t)},"Scan to connect with our mobile app"),e.onCancel&&(0,i.h)("button",{type:"button",className:"-cbwsdk-cancel-button",onClick:e.onCancel},(0,i.h)(a.CloseIcon,{fill:"light"===t?"#0A0B0D":"#FFFFFF"}))),(0,i.h)("div",{className:"-cbwsdk-connect-content-layout"},(0,i.h)("div",{className:"-cbwsdk-connect-content-column-left"},(0,i.h)(b,{title:p,description:f,theme:t})),(0,i.h)("div",{className:"-cbwsdk-connect-content-column-right"},(0,i.h)("div",{className:"-cbwsdk-connect-content-qr-wrapper"},(0,i.h)(l.QRCode,{content:s,width:200,height:200,fgColor:"#000",bgColor:"transparent"}),(0,i.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:o.LIB_VERSION}),(0,i.h)("input",{type:"hidden",value:s})),(0,i.h)(c,{theme:t}),!e.isConnected&&(0,i.h)("div",{"data-testid":"connecting-spinner",className:(0,r.default)("-cbwsdk-connect-content-qr-connecting",t)},(0,i.h)(u.Spinner,{size:36,color:"dark"===t?"#FFF":"#000"}),(0,i.h)("p",null,"Connecting...")))))},e.CoinbaseWalletSteps=y})),uK=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrowLeftIcon=void 0;var t=(bZ(),h(IG));e.ArrowLeftIcon=function(e){return(0,t.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},e),(0,t.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}})),dK=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LaptopIcon=void 0;var t=(bZ(),h(IG));e.LaptopIcon=function(e){return(0,t.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},e),(0,t.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,t.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}})),hK=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SafeIcon=void 0;var t=(bZ(),h(IG));e.SafeIcon=function(e){return(0,t.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},e),(0,t.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}})),pK=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}"})),fK=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.TryExtensionContent=void 0;var r=t(yZ()),i=(bZ(),h(IG)),n=(eK(),h(wZ)),o=uK(),a=dK(),s=hK(),c=t(pK());e.TryExtensionContent=function({theme:e}){let[t,l]=(0,n.useState)(!1),u=(0,n.useCallback)((()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}),[]),d=(0,n.useCallback)((()=>{t?window.location.reload():(u(),l(!0))}),[u,t]);return(0,i.h)("div",{class:(0,r.default)("-cbwsdk-try-extension",e)},(0,i.h)("style",null,c.default),(0,i.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,i.h)("h3",{class:(0,r.default)("-cbwsdk-try-extension-heading",e)},"Or try the Coinbase Wallet browser extension"),(0,i.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,i.h)("button",{class:(0,r.default)("-cbwsdk-try-extension-cta",e),onClick:d},t?"Refresh":"Install"),(0,i.h)("div",null,!t&&(0,i.h)(o.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:"light"===e?"#0052FF":"#588AF5"})))),(0,i.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,i.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,i.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,i.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,i.h)("span",{class:(0,r.default)("-cbwsdk-try-extension-list-item-icon",e)},(0,i.h)(a.LaptopIcon,{fill:"light"===e?"#0A0B0D":"#FFFFFF"}))),(0,i.h)("div",{class:(0,r.default)("-cbwsdk-try-extension-list-item-copy",e)},"Connect with dapps with just one click on your desktop browser")),(0,i.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,i.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,i.h)("span",{class:(0,r.default)("-cbwsdk-try-extension-list-item-icon",e)},(0,i.h)(s.SafeIcon,{fill:"light"===e?"#0A0B0D":"#FFFFFF"}))),(0,i.h)("div",{class:(0,r.default)("-cbwsdk-try-extension-list-item-copy",e)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}})),gK=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-cbwsdk-connect-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-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}"})),mK=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectDialog=void 0;var r=t(yZ()),i=(bZ(),h(IG)),n=(eK(),h(wZ)),o=lK(),a=fK(),s=t(gK());e.ConnectDialog=e=>{let{isOpen:t,darkMode:c}=e,[l,u]=(0,n.useState)(!t),[d,h]=(0,n.useState)(!t);(0,n.useEffect)((()=>{let e=[window.setTimeout((()=>{h(!t)}),10)];return t?u(!1):e.push(window.setTimeout((()=>{u(!0)}),360)),()=>{e.forEach(window.clearTimeout)}}),[t]);let p=c?"dark":"light";return(0,i.h)("div",{class:(0,r.default)("-cbwsdk-connect-dialog-container",l&&"-cbwsdk-connect-dialog-container-hidden")},(0,i.h)("style",null,s.default),(0,i.h)("div",{class:(0,r.default)("-cbwsdk-connect-dialog-backdrop",p,d&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,i.h)("div",{class:"-cbwsdk-connect-dialog"},(0,i.h)("div",{class:(0,r.default)("-cbwsdk-connect-dialog-box",d&&"-cbwsdk-connect-dialog-box-hidden")},e.connectDisabled?null:(0,i.h)(o.ConnectContent,{theme:p,version:e.version,sessionId:e.sessionId,sessionSecret:e.sessionSecret,linkAPIUrl:e.linkAPIUrl,isConnected:e.isConnected,isParentConnection:e.isParentConnection,chainId:e.chainId,onCancel:e.onCancel}),(0,i.h)(a.TryExtensionContent,{theme:p}))))}})),bK=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkFlow=void 0;var t=(bZ(),h(IG)),r=mK();e.LinkFlow=class{constructor(e){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=e.darkMode,this.version=e.version,this.sessionId=e.sessionId,this.sessionSecret=e.sessionSecret,this.linkAPIUrl=e.linkAPIUrl,this.isParentConnection=e.isParentConnection}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",e.appendChild(this.root),this.render()}setConnected(e){this.connected!==e&&(this.connected=e,this.render())}setChainId(e){this.chainId!==e&&(this.chainId=e,this.render())}detach(){var e;this.root&&((0,t.render)(null,this.root),null===(e=this.root.parentElement)||void 0===e||e.removeChild(this.root))}setConnectDisabled(e){this.connectDisabled=e}open(e){this.isOpen=!0,this.onCancel=e.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,t.render)((0,t.h)(r.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}}})),yK=s((e=>{"use strict";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}"})),wK=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;var r=t(yZ()),i=(bZ(),h(IG)),n=(eK(),h(wZ)),o=t(yK());e.Snackbar=class{constructor(e){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=e.darkMode}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){let t=this.nextItemKey++;return this.items.set(t,e),this.render(),()=>{this.items.delete(t),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,i.render)((0,i.h)("div",null,(0,i.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((([t,r])=>(0,i.h)(e.SnackbarInstance,Object.assign({},r,{key:t})))))),this.root)}};e.SnackbarContainer=e=>(0,i.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-container")},(0,i.h)("style",null,o.default),(0,i.h)("div",{class:"-cbwsdk-snackbar"},e.children));e.SnackbarInstance=({autoExpand:e,message:t,menuItems:o})=>{let[a,s]=(0,n.useState)(!0),[c,l]=(0,n.useState)(e??!1);(0,n.useEffect)((()=>{let e=[window.setTimeout((()=>{s(!1)}),1),window.setTimeout((()=>{l(!0)}),1e4)];return()=>{e.forEach(window.clearTimeout)}}));return(0,i.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance",a&&"-cbwsdk-snackbar-instance-hidden",c&&"-cbwsdk-snackbar-instance-expanded")},(0,i.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{l(!c)}},(0,i.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,i.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},t),(0,i.h)("div",{class:"-gear-container"},!c&&(0,i.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,i.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),o&&o.length>0&&(0,i.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},o.map(((e,t)=>(0,i.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:e.onClick,key:t},(0,i.h)("svg",{width:e.svgWidth,height:e.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("path",{"fill-rule":e.defaultFillRule,"clip-rule":e.defaultClipRule,d:e.path,fill:"#AAAAAA"})),(0,i.h)("span",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item-info",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},e.info))))))}})),vK=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkRelayUI=void 0;var t=PG(),r=bK(),i=wK();e.WalletLinkRelayUI=class{constructor(e){this.standalone=null,this.attached=!1,this.snackbar=new i.Snackbar({darkMode:e.darkMode}),this.linkFlow=new r.LinkFlow({darkMode:e.darkMode,version:e.version,sessionId:e.session.id,sessionSecret:e.session.secret,linkAPIUrl:e.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");let e=document.documentElement,r=document.createElement("div");r.className="-cbwsdk-css-reset",e.appendChild(r),this.linkFlow.attach(r),this.snackbar.attach(r),this.attached=!0,(0,t.injectCssReset)()}setConnected(e){this.linkFlow.setConnected(e)}setChainId(e){this.linkFlow.setChainId(e)}setConnectDisabled(e){this.linkFlow.setConnectDisabled(e)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(e){this.linkFlow.open({onCancel:e.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(e){let t;return t=e.isUnlinkedErrorState?{autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:{message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(t)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(e){this.standalone=e}isStandalone(){var e;return null!==(e=this.standalone)&&void 0!==e&&e}}})),_K=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkRelay=void 0;var t=nG(),r=oG(),i=aG(),n=cG(),o=lG(),a=vG(),s=CG(),c=tG(),l=vK(),u=class e extends o.RelayAbstract{constructor(t){var r;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.linkedUpdated=e=>{var t;this.isLinked=e;let r=this.storage.getItem(o.LOCAL_STORAGE_ADDRESSES_KEY);if(e&&(this.session.linked=e),this.isUnlinkedErrorState=!1,r){let i=r.split(" "),o="true"===this.storage.getItem("IsStandaloneSigning");if(""!==i[0]&&!e&&this.session.linked&&!o){this.isUnlinkedErrorState=!0;let e=this.getSessionIdHash();null===(t=this.diagnostic)||void 0===t||t.log(n.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:e})}}},this.metadataUpdated=(e,t)=>{this.storage.setItem(e,t)},this.chainUpdated=(e,t)=>{this.chainCallbackParams.chainId===e&&this.chainCallbackParams.jsonRpcUrl===t||(this.chainCallbackParams={chainId:e,jsonRpcUrl:t},this.chainCallback&&this.chainCallback(e,t))},this.accountUpdated=t=>{this.accountsCallback&&this.accountsCallback([t]),e.accountRequestCallbackIds.size>0&&(Array.from(e.accountRequestCallbackIds.values()).forEach((e=>{let r={type:"WEB3_RESPONSE",id:e,response:{method:"requestEthereumAccounts",result:[t]}};this.invokeCallback(Object.assign(Object.assign({},r),{id:e}))})),e.accountRequestCallbackIds.clear())},this.connectedUpdated=e=>{this.ui.setConnected(e)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=t.linkAPIUrl,this.storage=t.storage,this.options=t;let{session:i,ui:a,connection:s}=this.subscribe();this._session=i,this.connection=s,this.relayEventManager=t.relayEventManager,this.diagnostic=t.diagnosticLogger,this._reloadOnDisconnect=null===(r=t.reloadOnDisconnect)||void 0===r||r,this.ui=a}subscribe(){let e=a.Session.load(this.storage)||new a.Session(this.storage).save(),{linkAPIUrl:t,diagnostic:r}=this,i=new s.WalletLinkConnection({session:e,linkAPIUrl:t,diagnostic:r,listener:this}),{version:n,darkMode:o}=this.options,c=this.options.uiConstructor({linkAPIUrl:t,version:n,darkMode:o,session:e});return i.connect(),{session:e,ui:c,connection:i}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise((e=>setTimeout((()=>e(null)),1e3)))]).then((()=>{var e,t;let r=this.ui.isStandalone();null===(e=this.diagnostic)||void 0===e||e.log(n.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();let i=a.Session.load(this.storage);if(i?.id===this._session.id?this.storage.clear():i&&(null===(t=this.diagnostic)||void 0===t||t.log(n.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:a.Session.hash(i.id)})),this._reloadOnDisconnect)return void this.ui.reloadUI();this.accountsCallback&&this.accountsCallback([],!0);let{session:o,ui:s,connection:c}=this.subscribe();this._session=o,this.connection=c,this.ui=s,r&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.attachUI()})).catch((e=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(n.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${e}`,sessionIdHash:this.getSessionIdHash()})}))}setAppInfo(e,t){this.appName=e,this.appLogoUrl=t}getStorageItem(e){return this.storage.getItem(e)}get session(){return this._session}setStorageItem(e,t){this.storage.setItem(e,t)}signEthereumMessage(e,t,r,n){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,i.hexStringFromBuffer)(e,!0),address:t,addPrefix:r,typedDataJson:n||null}})}ethereumAddressFromSignedMessage(e,t,r){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,i.hexStringFromBuffer)(e,!0),signature:(0,i.hexStringFromBuffer)(t,!0),addPrefix:r}})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,i.bigIntStringFromBN)(e.weiValue),data:(0,i.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,i.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,i.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,i.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,i.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,i.bigIntStringFromBN)(e.weiValue),data:(0,i.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,i.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,i.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,i.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,i.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,i.hexStringFromBuffer)(e,!0),chainId:t}})}scanQRCode(e){return this.sendRequest({method:"scanQRCode",params:{regExp:e}})}getQRCodeUrl(){return(0,i.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(e,t){return this.sendRequest({method:"generic",params:{action:t,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let t=null,r=(0,i.randomBytesHex)(8),n=i=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,i),t?.()};return{promise:new Promise(((i,o)=>{this.ui.isStandalone()||(t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:n,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(r,(e=>{if(t?.(),(0,c.isErrorResponse)(e))return o(new Error(e.errorMessage));i(e)})),this.ui.isStandalone()?this.sendRequestStandalone(r,e):this.publishWeb3RequestEvent(r,e)})),cancel:n}}setConnectDisabled(e){this.ui.setConnectDisabled(e)}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChain=e,this.ui instanceof l.WalletLinkRelayUI&&this.ui.setChainId(e)}publishWeb3RequestEvent(e,t){var r;let i={type:"WEB3_REQUEST",id:e,request:t},o=a.Session.load(this.storage);null===(r=this.diagnostic)||void 0===r||r.log(n.EVENTS.WEB3_REQUEST,{eventId:i.id,method:`relay::${t.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:o?a.Session.hash(o.id):"",isSessionMismatched:(o?.id!==this._session.id).toString()}),this.publishEvent("Web3Request",i,!0).then((e=>{var r;null===(r=this.diagnostic)||void 0===r||r.log(n.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:i.id,method:`relay::${t.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:o?a.Session.hash(o.id):"",isSessionMismatched:(o?.id!==this._session.id).toString()})})).catch((e=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i.id,response:{method:t.method,errorMessage:e.message}})}))}publishWeb3RequestCanceledEvent(e){let t={type:"WEB3_REQUEST_CANCELED",id:e};this.publishEvent("Web3RequestCanceled",t,!1).then()}publishEvent(e,t,r){return this.connection.publishEvent(e,t,r)}handleWeb3ResponseMessage(t){var r;let{response:i}=t;if(null===(r=this.diagnostic)||void 0===r||r.log(n.EVENTS.WEB3_RESPONSE,{eventId:t.id,method:`relay::${i.method}`,sessionIdHash:this.getSessionIdHash()}),"requestEthereumAccounts"===i.method)return e.accountRequestCallbackIds.forEach((e=>this.invokeCallback(Object.assign(Object.assign({},t),{id:e})))),void e.accountRequestCallbackIds.clear();this.invokeCallback(t)}handleErrorResponse(e,r,i,n){var o;let a=null!==(o=i?.message)&&void 0!==o?o:(0,t.getMessageFromCode)(n);this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:{method:r,errorMessage:a,errorCode:n}})}invokeCallback(e){let t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){let r={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},n=(0,i.randomBytesHex)(8),o=e=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,r.method,e)};return{promise:new Promise(((i,a)=>{if(this.relayEventManager.callbacks.set(n,(e=>{if(this.ui.hideRequestEthereumAccounts(),(0,c.isErrorResponse)(e))return a(new Error(e.errorMessage));i(e)})),this.ui.inlineAccountsResponse()){let e=e=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"requestEthereumAccounts",result:e}})};this.ui.requestEthereumAccounts({onCancel:o,onAccounts:e})}else{let e=t.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>o(e)})}e.accountRequestCallbackIds.add(n),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(n,r)})),cancel:o}}selectProvider(e){let t="selectProvider",n=(0,i.randomBytesHex)(8);return{cancel:e=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,t,e)},promise:new Promise(((t,i)=>{this.relayEventManager.callbacks.set(n,(e=>{if((0,c.isErrorResponse)(e))return i(new Error(e.errorMessage));t(e)}));this.ui.selectProvider&&this.ui.selectProvider({onApprove:e=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:e}})},onCancel:e=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:r.ProviderType.Unselected}})},providerOptions:e})}))}}watchAsset(e,t,r,n,o,a){let s={method:"watchAsset",params:{type:e,options:{address:t,symbol:r,decimals:n,image:o},chainId:a}},l=null,u=(0,i.randomBytesHex)(8),d=e=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,s.method,e),l?.()};return this.ui.inlineWatchAsset()||(l=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload})),{cancel:d,promise:new Promise(((i,d)=>{this.relayEventManager.callbacks.set(u,(e=>{if(l?.(),(0,c.isErrorResponse)(e))return d(new Error(e.errorMessage));i(e)}));this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:()=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"watchAsset",result:!0}})},onCancel:e=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"watchAsset",result:!1}})},type:e,address:t,symbol:r,decimals:n,image:o,chainId:a}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(u,s)}))}}addEthereumChain(e,t,r,n,o,a){let s={method:"addEthereumChain",params:{chainId:e,rpcUrls:t,blockExplorerUrls:n,chainName:o,iconUrls:r,nativeCurrency:a}},l=null,u=(0,i.randomBytesHex)(8),d=e=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,s.method,e),l?.()};return this.ui.inlineAddEthereumChain(e)||(l=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload})),{promise:new Promise(((t,r)=>{this.relayEventManager.callbacks.set(u,(e=>{if(l?.(),(0,c.isErrorResponse)(e))return r(new Error(e.errorMessage));t(e)}));this.ui.inlineAddEthereumChain(e)&&this.ui.addEthereumChain({onCancel:e=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"addEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},onApprove:e=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"addEthereumChain",result:{isApproved:!0,rpcUrl:e}}})},chainId:s.params.chainId,rpcUrls:s.params.rpcUrls,blockExplorerUrls:s.params.blockExplorerUrls,chainName:s.params.chainName,iconUrls:s.params.iconUrls,nativeCurrency:s.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(e)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(u,s)})),cancel:d}}switchEthereumChain(e,r){let n={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:r})},o=(0,i.randomBytesHex)(8);return{promise:new Promise(((r,i)=>{this.relayEventManager.callbacks.set(o,(e=>(0,c.isErrorResponse)(e)&&e.errorCode?i(t.standardErrors.provider.custom({code:e.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):(0,c.isErrorResponse)(e)?i(new Error(e.errorMessage)):void r(e)));this.ui.switchEthereumChain({onCancel:r=>{var i;if(r){let n=null!==(i=(0,t.getErrorCode)(r))&&void 0!==i?i:t.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(o,"switchEthereumChain",r instanceof Error?r:t.standardErrors.provider.unsupportedChain(e),n)}else this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:o,response:{method:"switchEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},onApprove:e=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:o,response:{method:"switchEthereumChain",result:{isApproved:!0,rpcUrl:e}}})},chainId:n.params.chainId,address:n.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(o,n)})),cancel:e=>{this.publishWeb3RequestCanceledEvent(o),this.handleErrorResponse(o,n.method,e)}}}inlineAddEthereumChain(e){return this.ui.inlineAddEthereumChain(e)}getSessionIdHash(){return a.Session.hash(this._session.id)}sendRequestStandalone(e,t){let r=r=>{this.handleErrorResponse(e,t.method,r)},i=t=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:t})};switch(t.method){case"signEthereumMessage":this.ui.signEthereumMessage({request:t,onSuccess:i,onCancel:r});break;case"signEthereumTransaction":this.ui.signEthereumTransaction({request:t,onSuccess:i,onCancel:r});break;case"submitEthereumTransaction":this.ui.submitEthereumTransaction({request:t,onSuccess:i,onCancel:r});break;case"ethereumAddressFromSignedMessage":this.ui.ethereumAddressFromSignedMessage({request:t,onSuccess:i});break;default:r()}}};e.WalletLinkRelay=u,u.accountRequestCallbackIds=new Set})),xK=s((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var i in e)"default"!==i&&!Object.prototype.hasOwnProperty.call(r,i)&&t(r,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(wK(),e)})),EK=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}"})),CK=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.RedirectDialog=void 0;var r=t(yZ()),i=(bZ(),h(IG)),n=PG(),o=xK(),a=t(EK());e.RedirectDialog=class{constructor(){this.root=null}attach(){let e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),(0,n.injectCssReset)()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&((0,i.render)(null,this.root),e&&(0,i.render)((0,i.h)(s,Object.assign({},e,{onDismiss:()=>{this.clear()}})),this.root))}};var s=({title:e,buttonText:t,darkMode:n,onButtonClick:s,onDismiss:c})=>{let l=n?"dark":"light";return(0,i.h)(o.SnackbarContainer,{darkMode:n},(0,i.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,i.h)("style",null,a.default),(0,i.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:c}),(0,i.h)("div",{class:(0,r.default)("-cbwsdk-redirect-dialog-box",l)},(0,i.h)("p",null,e),(0,i.h)("button",{onClick:s},t))))}})),kK=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MobileRelayUI=void 0;var t=CK();e.MobileRelayUI=class{constructor(e){this.attached=!1,this.darkMode=!1,this.openedWindow=null,this.redirectDialog=new t.RedirectDialog,this.darkMode=e.darkMode}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}setConnected(e){}closeOpenedWindow(){var e;null===(e=this.openedWindow)||void 0===e||e.close(),this.openedWindow=null}redirectToCoinbaseWallet(e){let t=new URL("https://go.cb-w.com/walletlink");t.searchParams.append("redirect_url",window.location.href),e&&t.searchParams.append("wl_url",e),this.openedWindow=window.open(t.href,"cbw-opener"),this.openedWindow&&setTimeout((()=>this.closeOpenedWindow()),5e3)}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout((()=>{this.redirectToCoinbaseWallet(e)}),99)}showConnecting(e){return()=>{this.closeOpenedWindow(),this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.closeOpenedWindow(),this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}}})),PK=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MobileRelay=void 0;var t=aG(),r=_K(),i=kK(),n=class extends r.WalletLinkRelay{constructor(e){var t;super(e),this._enableMobileWalletLink=null!==(t=e.enableMobileWalletLink)&&void 0!==t&&t}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise((()=>{let e=(0,t.getLocation)();e.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(e.href)}`})),cancel:()=>{}}}publishWeb3RequestEvent(e,t){if(super.publishWeb3RequestEvent(e,t),!(this._enableMobileWalletLink&&this.ui instanceof i.MobileRelayUI))return;let r=!1;switch(t.method){case"requestEthereumAccounts":case"connectAndSignIn":r=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case"switchEthereumChain":return;default:r=!0,this.ui.openCoinbaseWalletDeeplink()}r&&window.addEventListener("blur",(()=>{window.addEventListener("focus",(()=>{this.connection.checkUnseenEvents()}),{once:!0})}),{once:!0})}handleWeb3ResponseMessage(e){super.handleWeb3ResponseMessage(e),this._enableMobileWalletLink&&this.ui instanceof i.MobileRelayUI&&this.ui.closeOpenedWindow()}connectAndSignIn(e){if(!this._enableMobileWalletLink)throw new Error("connectAndSignIn is supported only when enableMobileWalletLink is on");return this.sendRequest({method:"connectAndSignIn",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:"1",type:"eip4361",nonce:e.nonce,iat:(new Date).toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:e.statement,resources:e.resources}})}};e.MobileRelay=n})),IK=s(((e,t)=>{t.exports=p().EventEmitter})),SK=s((()=>{})),AK=s(((e,t)=>{"use strict";function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function i(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var s=GV().Buffer,c=SK().inspect,l=c&&c.custom||"inspect";function u(e,t,r){s.prototype.copy.call(e,t,r)}t.exports=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.head=null,this.tail=null,this.length=0}return function(e,t,r){t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1})}(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t=s.allocUnsafe(e>>>0),r=this.head,i=0;r;)u(r.data,t,i),i+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,i=t.data;for(e-=i.length;t=t.next;){var n=t.data,o=e>n.length?n.length:e;if(o===n.length?i+=n:i+=n.slice(0,e),0===(e-=o)){o===n.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(o));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var n=r.data,o=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,o),0===(e-=o)){o===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(o));break}++i}return this.length-=i,t}},{key:l,value:function(e,t){return c(this,i(i({},t),{},{depth:0,customInspect:!1}))}}]),e}()})),TK=s(((e,t)=>{"use strict";function r(e,t){n(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var o=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?o._writableState?o._writableState.errorEmitted?process.nextTick(i,o):(o._writableState.errorEmitted=!0,process.nextTick(r,o,e)):process.nextTick(r,o,e):t?(process.nextTick(i,o),t(e)):process.nextTick(i,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}}})),OK=s(((e,t)=>{"use strict";var r={};function i(e,t,i){i||(i=Error);var n=function(e){function r(r,i,n){return e.call(this,function(e,r,i){return"string"==typeof t?t:t(e,r,i)}(r,i,n))||this}return function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(r,e),r}(i);n.prototype.name=i.name,n.prototype.code=e,r[e]=n}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o;if("string"==typeof t&&function(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))o="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var a=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(a," ").concat(i," ").concat(n(t,"type"))}return o+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r})),RK=s(((e,t)=>{"use strict";var r=OK().codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,i,n){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,n,i);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(n?i:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}})),NK=s(((e,t)=>{function r(e){try{if(!global.localStorage)return!1}catch{return!1}var t=global.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var i=!1;return function(){if(!i){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}}})),MK=s(((e,t)=>{"use strict";function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}var i;t.exports=E,E.WritableState=x;var n={deprecate:NK()},o=IK(),a=GV().Buffer,s=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var c,l=TK(),u=RK().getHighWaterMark,d=OK().codes,h=d.ERR_INVALID_ARG_TYPE,p=d.ERR_METHOD_NOT_IMPLEMENTED,f=d.ERR_MULTIPLE_CALLBACK,g=d.ERR_STREAM_CANNOT_PIPE,m=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,y=d.ERR_STREAM_WRITE_AFTER_END,w=d.ERR_UNKNOWN_ENCODING,v=l.errorOrDestroy;function _(){}function x(e,t,n){i=i||$K(),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=u(this,e,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if("function"!=typeof n)throw new f;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,n){--t.pendingcb,r?(process.nextTick(n,i),process.nextTick(A,e,t),e._writableState.errorEmitted=!0,v(e,i)):(n(i),e._writableState.errorEmitted=!0,v(e,i),A(e,t))}(e,r,i,t,n);else{var o=I(r)||e.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&P(e,r),i?process.nextTick(k,e,r,o,n):k(e,r,o,n)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function E(e){var t=this instanceof(i=i||$K());if(!t&&!c.call(E,this))return new E(e);this._writableState=new x(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function C(e,t,r,i,n,o,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new m("write")):r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function k(e,t,r,i){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),A(e,t)}function P(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=i;for(var s=0,c=!0;i;)o[s]=i,i.isBuf||(c=!1),i=i.next,s+=1;o.allBuffers=c,C(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;i;){var l=i.chunk,u=i.encoding,d=i.callback;if(C(e,t,!1,t.objectMode?1:l.length,l,u,d),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(r){t.pendingcb--,r&&v(e,r),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var r=I(t);if(r&&(function(e,t){!t.prefinished&&!t.finalCalled&&("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(S,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}uG()(E,o),x.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(x.prototype,"buffer",{get:n.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===E&&(e&&e._writableState instanceof x)}})):c=function(e){return e instanceof this},E.prototype.pipe=function(){v(this,new g)},E.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=!i.objectMode&&function(e){return a.isBuffer(e)||e instanceof s}(e);return o&&!a.isBuffer(e)&&(e=function(e){return a.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=_),i.ending?function(e,t){var r=new y;v(e,r),process.nextTick(t,r)}(this,r):(o||function(e,t,r,i){var n;return null===r?n=new b:"string"!=typeof r&&!t.objectMode&&(n=new h("chunk",["string","Buffer"],r)),!n||(v(e,n),process.nextTick(i,n),!1)}(this,i,e,r))&&(i.pendingcb++,n=function(e,t,r,i,n,o){if(!r){var s=function(e,t,r){return!e.objectMode&&!1!==e.decodeStrings&&"string"==typeof t&&(t=a.from(t,r)),t}(t,i,n);i!==s&&(r=!0,n="buffer",i=s)}var c=t.objectMode?1:i.length;t.length+=c;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else C(e,t,!1,c,i,n,o);return l}(this,i,o,e,t,r)),n},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&P(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(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(e,t,r){r(new p("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,A(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,i,r),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(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=l.destroy,E.prototype._undestroy=l.undestroy,E.prototype._destroy=function(e,t){t(e)}})),$K=s(((e,t)=>{"use strict";var r=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=c;var i,n,o,a=FK(),s=MK();for(uG()(c,a),i=r(s.prototype),o=0;o<i.length;o++)n=i[o],c.prototype[n]||(c.prototype[n]=s.prototype[n]);function c(e){if(!(this instanceof c))return new c(e);a.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||process.nextTick(u,this)}function u(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0===this._readableState||void 0===this._writableState||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})})),jK=s(((e,t)=>{var r=GV(),i=r.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(n(r,e),e.Buffer=o),o.prototype=Object.create(i.prototype),n(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}})),LK=s((e=>{"use strict";var t=jK().Buffer,r=t.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var i;switch(this.encoding=function(e){var i=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof i&&(t.isEncoding===r||!r(e)))throw new Error("Unknown encoding: "+e);return i||e}(e),this.encoding){case"utf16le":this.text=a,this.end=s,i=4;break;case"utf8":this.fillLast=o,i=4;break;case"base64":this.text=c,this.end=l,i=3;break;default:return this.write=u,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(i)}function n(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function a(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}e.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var i=t.length-1;if(i<r)return 0;var o=n(t[i]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--i<r||-2===o?0:(o=n(t[i]),o>=0?(o>0&&(e.lastNeed=o-2),o):--i<r||-2===o?0:(o=n(t[i]),o>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0))}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}})),BK=s(((e,t)=>{"use strict";var r=OK().codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}(o||i);var a=n.readable||!1!==n.readable&&t.readable,s=n.writable||!1!==n.writable&&t.writable,c=function(){t.writable||u()},l=t._writableState&&t._writableState.finished,u=function(){s=!1,l=!0,a||o.call(t)},d=t._readableState&&t._readableState.endEmitted,h=function(){a=!1,d=!0,s||o.call(t)},p=function(e){o.call(t,e)},f=function(){var e;return a&&!d?((!t._readableState||!t._readableState.ended)&&(e=new r),o.call(t,e)):s&&!l?((!t._writableState||!t._writableState.ended)&&(e=new r),o.call(t,e)):void 0},g=function(){t.req.on("finish",u)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",u),t.on("abort",f),t.req?g():t.on("request",g)):s&&!t._writableState&&(t.on("end",c),t.on("close",c)),t.on("end",h),t.on("finish",u),!1!==n.error&&t.on("error",p),t.on("close",f),function(){t.removeListener("complete",u),t.removeListener("abort",f),t.removeListener("request",g),t.req&&t.req.removeListener("finish",u),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("end",h),t.removeListener("error",p),t.removeListener("close",f)}}})),DK=s(((e,t)=>{"use strict";var r;function i(e,t,r){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var n=BK(),o=Symbol("lastResolve"),a=Symbol("lastReject"),s=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function h(e,t){return{value:e,done:t}}function p(e){var t=e[o];if(null!==t){var r=e[d].read();null!==r&&(e[l]=null,e[o]=null,e[a]=null,t(h(r,!1)))}}function f(e){process.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(r={get stream(){return this[d]},next:function(){var e=this,t=this[s];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(h(void 0,!0));if(this[d].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[s]?r(e[s]):t(h(void 0,!0))}))}));var r,i=this[l];if(i)r=new Promise(function(e,t){return function(r,i){e.then((function(){t[c]?r(h(void 0,!0)):t[u](r,i)}),i)}}(i,this));else{var n=this[d].read();if(null!==n)return Promise.resolve(h(n,!1));r=new Promise(this[u])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(h(void 0,!0))}))}))})),r),g);t.exports=function(e){var t,r=Object.create(m,(i(t={},d,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,u,{value:function(e,t){var i=r[d].read();i?(r[l]=null,r[o]=null,r[a]=null,e(h(i,!1))):(r[o]=e,r[a]=t)},writable:!0}),t));return r[l]=null,n(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[l]=null,r[o]=null,r[a]=null,t(e)),void(r[s]=e)}var i=r[o];null!==i&&(r[l]=null,r[o]=null,r[a]=null,i(h(void 0,!0))),r[c]=!0})),e.on("readable",f.bind(null,r)),r}})),UK=s(((e,t)=>{t.exports=function(){throw new Error("Readable.from is not available in the browser")}})),FK=s(((e,t)=>{"use strict";var r;t.exports=C,C.ReadableState=E;p().EventEmitter;var i=function(e,t){return e.listeners(t).length},n=IK(),o=GV().Buffer,a=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var s,c=SK();s=c&&c.debuglog?c.debuglog("stream"):function(){};var l,u,d,h=AK(),f=TK(),g=RK().getHighWaterMark,m=OK().codes,b=m.ERR_INVALID_ARG_TYPE,y=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;uG()(C,n);var _=f.errorOrDestroy,x=["error","close","destroy","pause","resume"];function E(e,t,i){r=r||$K(),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=LK().StringDecoder),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function C(e){if(r=r||$K(),!(this instanceof C))return new C(e);var t=this instanceof r;this._readableState=new E(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),n.call(this)}function k(e,t,r,i,n){s("readableAddChunk",t);var c,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(s("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?A(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,T(e)))}}(e,l);else if(n||(c=function(e,t){var r;return!function(e){return o.isBuffer(e)||e instanceof a}(t)&&"string"!=typeof t&&void 0!==t&&!e.objectMode&&(r=new b("chunk",["string","Buffer","Uint8Array"],t)),r}(l,t)),c)_(e,c);else if(l.objectMode||t&&t.length>0)if("string"!=typeof t&&!l.objectMode&&Object.getPrototypeOf(t)!==o.prototype&&(t=function(e){return o.from(e)}(t)),i)l.endEmitted?_(e,new v):P(e,l,t,!0);else if(l.ended)_(e,new y);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!r?(t=l.decoder.write(t),l.objectMode||0!==t.length?P(e,l,t,!1):O(e,l)):P(e,l,t,!1)}else i||(l.reading=!1,O(e,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function P(e,t,r,i){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&A(e)),O(e,t)}Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),C.prototype.destroy=f.destroy,C.prototype._undestroy=f.undestroy,C.prototype._destroy=function(e,t){t(e)},C.prototype.push=function(e,t){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=o.from(e,t),t=""),r=!0),k(this,e,t,!1,r)},C.prototype.unshift=function(e){return k(this,e,null,!0,!1)},C.prototype.isPaused=function(){return!1===this._readableState.flowing},C.prototype.setEncoding=function(e){l||(l=LK().StringDecoder);var t=new l(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var I=1073741824;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function A(e){var t=e._readableState;s("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(s("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(T,e))}function T(e){var t=e._readableState;s("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function O(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(s("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function N(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function M(e){s("readable nexttick read 0"),e.read(0)}function $(e,t){s("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(s("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function B(e){var t=e._readableState;s("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(D,t,e))}function D(e,t){if(s("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}C.prototype.read=function(e){s("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return s("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):A(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&B(this),null;var i,n=t.needReadable;return s("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&s("length less than watermark",n=!0),t.ended||t.reading?s("reading or ended",n=!1):n&&(s("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(i=e>0?L(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==i&&this.emit("data",i),i},C.prototype._read=function(e){_(this,new w("_read()"))},C.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,s("pipe count=%d opts=%j",n.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?c:g;function a(t,i){s("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,s("cleanup"),e.removeListener("close",p),e.removeListener("finish",f),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",a),r.removeListener("end",c),r.removeListener("end",g),r.removeListener("data",d),u=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l())}function c(){s("onend"),e.end()}n.endEmitted?process.nextTick(o):r.once("end",o),e.on("unpipe",a);var l=function(e){return function(){var t=e._readableState;s("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,j(e))}}(r);e.on("drain",l);var u=!1;function d(t){s("ondata");var i=e.write(t);s("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==U(n.pipes,e))&&!u&&(s("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){s("onerror",t),g(),e.removeListener("error",h),0===i(e,"error")&&_(e,t)}function p(){e.removeListener("finish",f),g()}function f(){s("onfinish"),e.removeListener("close",p),g()}function g(){s("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",f),e.emit("pipe",r),n.flowing||(s("pipe resume"),r.resume()),e},C.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=U(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},C.prototype.on=function(e,t){var r=n.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,s("on readable",i.length,i.reading),i.length?A(this):i.reading||process.nextTick(M,this)),r},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(e,t){var r=n.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(N,this),r},C.prototype.removeAllListeners=function(e){var t=n.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&process.nextTick(N,this),t},C.prototype.resume=function(){var e=this._readableState;return e.flowing||(s("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick($,e,t))}(this,e)),e.paused=!1,this},C.prototype.pause=function(){return s("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(s("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},C.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var n in e.on("end",(function(){if(s("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(s("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n||!(r.objectMode||n&&n.length))||(t.push(n)||(i=!0,e.pause()))})),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var o=0;o<x.length;o++)e.on(x[o],this.emit.bind(this,x[o]));return this._read=function(t){s("wrapped _read",t),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(C.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=DK()),u(this)}),Object.defineProperty(C.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(C.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(C.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),C._fromList=L,Object.defineProperty(C.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(C.from=function(e,t){return void 0===d&&(d=UK()),d(C,e,t)})})),HK=s(((e,t)=>{"use strict";t.exports=l;var r=OK().codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,n=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,s=$K();function c(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new n);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),i(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);s.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",u)}function u(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(t,r){d(e,t,r)}))}function d(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}uG()(l,s),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){s.prototype._destroy.call(this,e,(function(e){t(e)}))}})),zK=s(((e,t)=>{"use strict";t.exports=i;var r=HK();function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}uG()(i,r),i.prototype._transform=function(e,t,r){r(null,e)}})),qK=s(((e,t)=>{"use strict";var r;var i=OK().codes,n=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function s(e){e()}function c(e,t){return e.pipe(t)}t.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var l=function(e){return e.length&&"function"==typeof e[e.length-1]?e.pop():a}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new n("streams");var u,d=t.map((function(e,i){var n=i<t.length-1;return function(e,t,i,n){n=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(n);var a=!1;e.on("close",(function(){a=!0})),void 0===r&&(r=BK()),r(e,{readable:t,writable:i},(function(e){if(e)return n(e);a=!0,n()}));var s=!1;return function(t){if(!a&&!s){if(s=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e))return e.abort();if("function"==typeof e.destroy)return e.destroy();n(t||new o("pipe"))}}}(e,n,i>0,(function(e){u||(u=e),e&&d.forEach(s),!n&&(d.forEach(s),l(u))}))}));return t.reduce(c)}})),WK=s(((e,t)=>{(e=t.exports=FK()).Stream=e,e.Readable=e,e.Writable=MK(),e.Duplex=$K(),e.Transform=HK(),e.PassThrough=zK(),e.finished=BK(),e.pipeline=qK()})),VK=s(((e,t)=>{var{Transform:r}=WK();t.exports=e=>class t extends r{constructor(t,r,i,n,o){super(o),this._rate=t,this._capacity=r,this._delimitedSuffix=i,this._hashBitLength=n,this._options=o,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let i=null;try{this.update(e,t)}catch(e){i=e}r(i)}_flush(e){let t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let e=new t(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}})),GK=s(((e,t)=>{var{Transform:r}=WK();t.exports=e=>class t extends r{constructor(t,r,i,n){super(n),this._rate=t,this._capacity=r,this._delimitedSuffix=i,this._options=n,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let i=null;try{this.update(e,t)}catch(e){i=e}r(i)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let e=new t(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}})),ZK=s(((e,t)=>{var r=VK(),i=GK();t.exports=function(e){let t=r(e),n=i(e);return function(e,r){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,r);case"keccak256":return new t(1088,512,null,256,r);case"keccak384":return new t(832,768,null,384,r);case"keccak512":return new t(576,1024,null,512,r);case"sha3-224":return new t(1152,448,6,224,r);case"sha3-256":return new t(1088,512,6,256,r);case"sha3-384":return new t(832,768,6,384,r);case"sha3-512":return new t(576,1024,6,512,r);case"shake128":return new n(1344,256,31,r);case"shake256":return new n(1088,512,31,r);default:throw new Error("Invald algorithm: "+e)}}}})),KK=s((e=>{var t=[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(e){for(let r=0;r<24;++r){let i=e[0]^e[10]^e[20]^e[30]^e[40],n=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],u=e[7]^e[17]^e[27]^e[37]^e[47],d=e[8]^e[18]^e[28]^e[38]^e[48],h=e[9]^e[19]^e[29]^e[39]^e[49],p=d^(o<<1|a>>>31),f=h^(a<<1|o>>>31),g=e[0]^p,m=e[1]^f,b=e[10]^p,y=e[11]^f,w=e[20]^p,v=e[21]^f,_=e[30]^p,x=e[31]^f,E=e[40]^p,C=e[41]^f;p=i^(s<<1|c>>>31),f=n^(c<<1|s>>>31);let k=e[2]^p,P=e[3]^f,I=e[12]^p,S=e[13]^f,A=e[22]^p,T=e[23]^f,O=e[32]^p,R=e[33]^f,N=e[42]^p,M=e[43]^f;p=o^(l<<1|u>>>31),f=a^(u<<1|l>>>31);let $=e[4]^p,j=e[5]^f,L=e[14]^p,B=e[15]^f,D=e[24]^p,U=e[25]^f,F=e[34]^p,H=e[35]^f,z=e[44]^p,q=e[45]^f;p=s^(d<<1|h>>>31),f=c^(h<<1|d>>>31);let W=e[6]^p,V=e[7]^f,G=e[16]^p,Z=e[17]^f,K=e[26]^p,Y=e[27]^f,J=e[36]^p,Q=e[37]^f,X=e[46]^p,ee=e[47]^f;p=l^(i<<1|n>>>31),f=u^(n<<1|i>>>31);let te=e[8]^p,re=e[9]^f,ie=e[18]^p,ne=e[19]^f,oe=e[28]^p,ae=e[29]^f,se=e[38]^p,ce=e[39]^f,le=e[48]^p,ue=e[49]^f,de=g,he=m,pe=y<<4|b>>>28,fe=b<<4|y>>>28,ge=w<<3|v>>>29,me=v<<3|w>>>29,be=x<<9|_>>>23,ye=_<<9|x>>>23,we=E<<18|C>>>14,ve=C<<18|E>>>14,_e=k<<1|P>>>31,xe=P<<1|k>>>31,Ee=S<<12|I>>>20,Ce=I<<12|S>>>20,ke=A<<10|T>>>22,Pe=T<<10|A>>>22,Ie=R<<13|O>>>19,Se=O<<13|R>>>19,Ae=N<<2|M>>>30,Te=M<<2|N>>>30,Oe=j<<30|$>>>2,Re=$<<30|j>>>2,Ne=L<<6|B>>>26,Me=B<<6|L>>>26,$e=U<<11|D>>>21,je=D<<11|U>>>21,Le=F<<15|H>>>17,Be=H<<15|F>>>17,De=q<<29|z>>>3,Ue=z<<29|q>>>3,Fe=W<<28|V>>>4,He=V<<28|W>>>4,ze=Z<<23|G>>>9,qe=G<<23|Z>>>9,We=K<<25|Y>>>7,Ve=Y<<25|K>>>7,Ge=J<<21|Q>>>11,Ze=Q<<21|J>>>11,Ke=ee<<24|X>>>8,Ye=X<<24|ee>>>8,Je=te<<27|re>>>5,Qe=re<<27|te>>>5,Xe=ie<<20|ne>>>12,et=ne<<20|ie>>>12,tt=ae<<7|oe>>>25,rt=oe<<7|ae>>>25,it=se<<8|ce>>>24,nt=ce<<8|se>>>24,ot=le<<14|ue>>>18,at=ue<<14|le>>>18;e[0]=de^~Ee&$e,e[1]=he^~Ce&je,e[10]=Fe^~Xe&ge,e[11]=He^~et&me,e[20]=_e^~Ne&We,e[21]=xe^~Me&Ve,e[30]=Je^~pe&ke,e[31]=Qe^~fe&Pe,e[40]=Oe^~ze&tt,e[41]=Re^~qe&rt,e[2]=Ee^~$e&Ge,e[3]=Ce^~je&Ze,e[12]=Xe^~ge&Ie,e[13]=et^~me&Se,e[22]=Ne^~We&it,e[23]=Me^~Ve&nt,e[32]=pe^~ke&Le,e[33]=fe^~Pe&Be,e[42]=ze^~tt&be,e[43]=qe^~rt&ye,e[4]=$e^~Ge&ot,e[5]=je^~Ze&at,e[14]=ge^~Ie&De,e[15]=me^~Se&Ue,e[24]=We^~it&we,e[25]=Ve^~nt&ve,e[34]=ke^~Le&Ke,e[35]=Pe^~Be&Ye,e[44]=tt^~be&Ae,e[45]=rt^~ye&Te,e[6]=Ge^~ot&de,e[7]=Ze^~at&he,e[16]=Ie^~De&Fe,e[17]=Se^~Ue&He,e[26]=it^~we&_e,e[27]=nt^~ve&xe,e[36]=Le^~Ke&Je,e[37]=Be^~Ye&Qe,e[46]=be^~Ae&Oe,e[47]=ye^~Te&Re,e[8]=ot^~de&Ee,e[9]=at^~he&Ce,e[18]=De^~Fe&Xe,e[19]=Ue^~He&et,e[28]=we^~_e&Ne,e[29]=ve^~xe&Me,e[38]=Ke^~Je&pe,e[39]=Ye^~Qe&fe,e[48]=Ae^~Oe&ze,e[49]=Te^~Re&qe,e[0]^=t[2*r],e[1]^=t[2*r+1]}}})),YK=s(((e,t)=>{var r=KK();function i(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}i.prototype.initialize=function(e,t){for(let e=0;e<50;++e)this.state[e]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(r.p1600(this.state),this.count=0)},i.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<this.count%4*8,128&e&&this.count===this.blockSize-1&&r.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,r.p1600(this.state),this.count=0,this.squeezing=!0},i.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);let t=Buffer.alloc(e);for(let i=0;i<e;++i)t[i]=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 t},i.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},t.exports=i})),JK=s(((e,t)=>{t.exports=ZK()(YK())})),QK=s(((e,t)=>{var r=JK(),i=JV();function n(e){return Buffer.allocUnsafe(e).fill(0)}function o(e,t,r){let i=n(t);return e=a(e),r?e.length<t?(e.copy(i),i):e.slice(0,t):e.length<t?(e.copy(i,t-e.length),i):e.slice(-t)}function a(e){if(!Buffer.isBuffer(e))if(Array.isArray(e))e=Buffer.from(e);else if("string"==typeof e)e=s(e)?Buffer.from(function(e){return e.length%2?"0"+e:e}(c(e)),"hex"):Buffer.from(e);else if("number"==typeof e)e=intToBuffer(e);else if(null==e)e=Buffer.allocUnsafe(0);else if(i.isBN(e))e=e.toArrayLike(Buffer);else{if(!e.toArray)throw new Error("invalid type");e=Buffer.from(e.toArray())}return e}function s(e){return"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)}function c(e){return"string"==typeof e&&e.startsWith("0x")?e.slice(2):e}t.exports={zeros:n,setLength:o,setLengthRight:function(e,t){return o(e,t,!0)},isHexString:s,stripHexPrefix:c,toBuffer:a,bufferToHex:function(e){return"0x"+(e=a(e)).toString("hex")},keccak:function(e,t){return e=a(e),t||(t=256),r("keccak"+t).update(e).digest()}}})),XK=s(((e,t)=>{var r=QK(),i=JV();function n(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}function o(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function a(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function s(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function c(e){var t=typeof e;if("string"===t)return r.isHexString(e)?new i(r.stripHexPrefix(e),16):new i(e,10);if("number"===t)return new i(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function l(e,t){var n,u,d,h;if("address"===e)return l("uint160",c(t));if("bool"===e)return l("uint8",t?1:0);if("string"===e)return l("bytes",new Buffer(t,"utf8"));if(function(e){return e.lastIndexOf("]")===e.length-1}(e)){if(typeof t.length>"u")throw new Error("Not an array?");if("dynamic"!==(n=s(e))&&0!==n&&t.length>n)throw new Error("Elements exceed array size: "+n);for(h in d=[],e=e.slice(0,e.lastIndexOf("[")),"string"==typeof t&&(t=JSON.parse(t)),t)d.push(l(e,t[h]));if("dynamic"===n){var p=l("uint256",t.length);d.unshift(p)}return Buffer.concat(d)}if("bytes"===e)return t=new Buffer(t),d=Buffer.concat([l("uint256",t.length),t]),t.length%32!=0&&(d=Buffer.concat([d,r.zeros(32-t.length%32)])),d;if(e.startsWith("bytes")){if((n=o(e))<1||n>32)throw new Error("Invalid bytes<N> width: "+n);return r.setLengthRight(t,32)}if(e.startsWith("uint")){if((n=o(e))%8||n<8||n>256)throw new Error("Invalid uint<N> width: "+n);if((u=c(t)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+u.bitLength());if(u<0)throw new Error("Supplied uint is negative");return u.toArrayLike(Buffer,"be",32)}if(e.startsWith("int")){if((n=o(e))%8||n<8||n>256)throw new Error("Invalid int<N> width: "+n);if((u=c(t)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+u.bitLength());return u.toTwos(256).toArrayLike(Buffer,"be",32)}if(e.startsWith("ufixed")){if(n=a(e),(u=c(t))<0)throw new Error("Supplied ufixed is negative");return l("uint256",u.mul(new i(2).pow(new i(n[1]))))}if(e.startsWith("fixed"))return n=a(e),l("int256",c(t).mul(new i(2).pow(new i(n[1]))));throw new Error("Unsupported or invalid type: "+e)}function u(e){return"string"===e||"bytes"===e||"dynamic"===s(e)}function d(e,t){if(e.length!==t.length)throw new Error("Number of types are not matching the values");for(var i,a,s=[],l=0;l<e.length;l++){var u=n(e[l]),d=t[l];if("bytes"===u)s.push(d);else if("string"===u)s.push(new Buffer(d,"utf8"));else if("bool"===u)s.push(new Buffer(d?"01":"00","hex"));else if("address"===u)s.push(r.setLength(d,20));else if(u.startsWith("bytes")){if((i=o(u))<1||i>32)throw new Error("Invalid bytes<N> width: "+i);s.push(r.setLengthRight(d,i))}else if(u.startsWith("uint")){if((i=o(u))%8||i<8||i>256)throw new Error("Invalid uint<N> width: "+i);if((a=c(d)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+a.bitLength());s.push(a.toArrayLike(Buffer,"be",i/8))}else{if(!u.startsWith("int"))throw new Error("Unsupported or invalid type: "+u);if((i=o(u))%8||i<8||i>256)throw new Error("Invalid int<N> width: "+i);if((a=c(d)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+a.bitLength());s.push(a.toTwos(i).toArrayLike(Buffer,"be",i/8))}}return Buffer.concat(s)}t.exports={rawEncode:function(e,t){var r=[],i=[],o=32*e.length;for(var a in e){var s=n(e[a]),c=l(s,t[a]);u(s)?(r.push(l("uint256",o)),i.push(c),o+=c.length):r.push(c)}return Buffer.concat(r.concat(i))},solidityPack:d,soliditySHA3:function(e,t){return r.keccak(d(e,t))}}})),eY=s(((e,t)=>{var r=QK(),i=XK(),n={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"]},o={encodeData(e,t,n,o=!0){let a=["bytes32"],s=[this.hashType(e,n)];if(o){let c=(e,t,a)=>{if(void 0!==n[t])return["bytes32",null==a?"0x0000000000000000000000000000000000000000000000000000000000000000":r.keccak(this.encodeData(t,a,n,o))];if(void 0===a)throw new Error(`missing value for field ${e} of type ${t}`);if("bytes"===t)return["bytes32",r.keccak(a)];if("string"===t)return"string"==typeof a&&(a=Buffer.from(a,"utf8")),["bytes32",r.keccak(a)];if(t.lastIndexOf("]")===t.length-1){let n=t.slice(0,t.lastIndexOf("[")),o=a.map((t=>c(e,n,t)));return["bytes32",r.keccak(i.rawEncode(o.map((([e])=>e)),o.map((([,e])=>e))))]}return[t,a]};for(let r of n[e]){let[e,i]=c(r.name,r.type,t[r.name]);a.push(e),s.push(i)}}else for(let i of n[e]){let e=t[i.name];if(void 0!==e)if("bytes"===i.type)a.push("bytes32"),e=r.keccak(e),s.push(e);else if("string"===i.type)a.push("bytes32"),"string"==typeof e&&(e=Buffer.from(e,"utf8")),e=r.keccak(e),s.push(e);else if(void 0!==n[i.type])a.push("bytes32"),e=r.keccak(this.encodeData(i.type,e,n,o)),s.push(e);else{if(i.type.lastIndexOf("]")===i.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");a.push(i.type),s.push(e)}}return i.rawEncode(a,s)},encodeType(e,t){let r="",i=this.findTypeDependencies(e,t).filter((t=>t!==e));i=[e].concat(i.sort());for(let e of i){if(!t[e])throw new Error("No type definition specified: "+e);r+=e+"("+t[e].map((({name:e,type:t})=>t+" "+e)).join(",")+")"}return r},findTypeDependencies(e,t,r=[]){if(e=e.match(/^\w*/)[0],r.includes(e)||void 0===t[e])return r;r.push(e);for(let i of t[e])for(let e of this.findTypeDependencies(i.type,t,r))!r.includes(e)&&r.push(e);return r},hashStruct(e,t,i,n=!0){return r.keccak(this.encodeData(e,t,i,n))},hashType(e,t){return r.keccak(this.encodeType(e,t))},sanitizeData(e){let t={};for(let r in n.properties)e[r]&&(t[r]=e[r]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash(e,t=!0){let i=this.sanitizeData(e),n=[Buffer.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",i.domain,i.types,t)),"EIP712Domain"!==i.primaryType&&n.push(this.hashStruct(i.primaryType,i.message,i.types,t)),r.keccak(Buffer.concat(n))}};t.exports={TYPED_MESSAGE_SCHEMA:n,TypedDataUtils:o,hashForSignTypedDataLegacy:function(e){return function(e){let t=new Error("Expect argument to be non-empty array");if("object"!=typeof e||!e.length)throw t;let n=e.map((function(e){return"bytes"===e.type?r.toBuffer(e.value):e.value})),o=e.map((function(e){return e.type})),a=e.map((function(e){if(!e.name)throw t;return e.type+" "+e.name}));return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(new Array(e.length).fill("string"),a),i.soliditySHA3(o,n)])}(e.data)},hashForSignTypedData_v3:function(e){return o.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return o.hash(e.data)}}})),tY=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.filterFromParam=e.FilterPolyfill=void 0;var t=oG(),r=aG(),i={jsonrpc:"2.0",id:0};function n(e){return{fromBlock:a(e.fromBlock),toBlock:a(e.toBlock),addresses:void 0===e.address?null:Array.isArray(e.address)?e.address:[e.address],topics:e.topics||[]}}function o(e){let t={fromBlock:s(e.fromBlock),toBlock:s(e.toBlock),topics:e.topics};return null!==e.addresses&&(t.address=e.addresses),t}function a(e){if(void 0===e||"latest"===e||"pending"===e)return"latest";if("earliest"===e)return(0,t.IntNumber)(0);if((0,r.isHexString)(e))return(0,r.intNumberFromHexString)(e);throw new Error(`Invalid block option: ${String(e)}`)}function s(e){return"latest"===e?e:(0,r.hexStringFromIntNumber)(e)}function c(){return Object.assign(Object.assign({},i),{error:{code:-32e3,message:"filter not found"}})}function l(){return Object.assign(Object.assign({},i),{result:[]})}e.FilterPolyfill=class{constructor(e){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,t.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=e}async newFilter(e){let t=n(e),i=this.makeFilterId(),o=await this.setInitialCursorPosition(i,t.fromBlock);return console.info(`Installing new log filter(${i}):`,t,"initial cursor position:",o),this.logFilters.set(i,t),this.setFilterTimeout(i),(0,r.hexStringFromIntNumber)(i)}async newBlockFilter(){let e=this.makeFilterId(),t=await this.setInitialCursorPosition(e,"latest");return console.info(`Installing new block filter (${e}) with initial cursor position:`,t),this.blockFilters.add(e),this.setFilterTimeout(e),(0,r.hexStringFromIntNumber)(e)}async newPendingTransactionFilter(){let e=this.makeFilterId(),t=await this.setInitialCursorPosition(e,"latest");return console.info(`Installing new block filter (${e}) with initial cursor position:`,t),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),(0,r.hexStringFromIntNumber)(e)}uninstallFilter(e){let t=(0,r.intNumberFromHexString)(e);return console.info(`Uninstalling filter (${t})`),this.deleteFilter(t),!0}getFilterChanges(e){let t=(0,r.intNumberFromHexString)(e);return this.timeouts.has(t)&&this.setFilterTimeout(t),this.logFilters.has(t)?this.getLogFilterChanges(t):this.blockFilters.has(t)?this.getBlockFilterChanges(t):this.pendingTransactionFilters.has(t)?this.getPendingTransactionFilterChanges(t):Promise.resolve(c())}async getFilterLogs(e){let t=(0,r.intNumberFromHexString)(e),n=this.logFilters.get(t);return n?this.sendAsyncPromise(Object.assign(Object.assign({},i),{method:"eth_getLogs",params:[o(n)]})):c()}makeFilterId(){return(0,t.IntNumber)(++this.nextFilterId)}sendAsyncPromise(e){return new Promise(((t,r)=>{this.provider.sendAsync(e,((e,i)=>e?r(e):Array.isArray(i)||null==i?r(new Error(`unexpected response received: ${JSON.stringify(i)}`)):void t(i)))}))}deleteFilter(e){console.info(`Deleting filter (${e})`),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}async getLogFilterChanges(e){let n=this.logFilters.get(e),a=this.cursors.get(e);if(!a||!n)return c();let s=await this.getCurrentBlockHeight(),u="latest"===n.toBlock?s:n.toBlock;if(a>s||a>Number(n.toBlock))return l();console.info(`Fetching logs from ${a} to ${u} for filter ${e}`);let d=await this.sendAsyncPromise(Object.assign(Object.assign({},i),{method:"eth_getLogs",params:[o(Object.assign(Object.assign({},n),{fromBlock:a,toBlock:u}))]}));if(Array.isArray(d.result)){let i=d.result.map((e=>(0,r.intNumberFromHexString)(e.blockNumber||"0x0"))),n=Math.max(...i);if(n&&n>a){let r=(0,t.IntNumber)(n+1);console.info(`Moving cursor position for filter (${e}) from ${a} to ${r}`),this.cursors.set(e,r)}}return d}async getBlockFilterChanges(e){let n=this.cursors.get(e);if(!n)return c();let o=await this.getCurrentBlockHeight();if(n>o)return l();console.info(`Fetching blocks from ${n} to ${o} for filter (${e})`);let a=(await Promise.all((0,r.range)(n,o+1).map((e=>this.getBlockHashByNumber((0,t.IntNumber)(e)))))).filter((e=>!!e)),s=(0,t.IntNumber)(n+a.length);return console.info(`Moving cursor position for filter (${e}) from ${n} to ${s}`),this.cursors.set(e,s),Object.assign(Object.assign({},i),{result:a})}async getPendingTransactionFilterChanges(e){return Promise.resolve(l())}async setInitialCursorPosition(e,t){let r=await this.getCurrentBlockHeight(),i="number"==typeof t&&t>r?t:r;return this.cursors.set(e,i),i}setFilterTimeout(e){let t=this.timeouts.get(e);t&&window.clearTimeout(t);let r=window.setTimeout((()=>{console.info(`Filter (${e}) timed out`),this.deleteFilter(e)}),3e5);this.timeouts.set(e,r)}async getCurrentBlockHeight(){let e=new Date;if(e.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=e;let t=await this._getCurrentBlockHeight();this.currentBlockHeight=t,this.resolvers.forEach((e=>e(t))),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise((e=>this.resolvers.push(e)))}async _getCurrentBlockHeight(){let{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},i),{method:"eth_blockNumber",params:[]}));return(0,r.intNumberFromHexString)((0,r.ensureHexString)(e))}async getBlockHashByNumber(e){let t=await this.sendAsyncPromise(Object.assign(Object.assign({},i),{method:"eth_getBlockByNumber",params:[(0,r.hexStringFromIntNumber)(e),!1]}));return t.result&&"string"==typeof t.result.hash?(0,r.ensureHexString)(t.result.hash):null}},e.filterFromParam=n})),rY=s(((e,t)=>{t.exports=function(e){var t=(e=e||{}).max||Number.MAX_SAFE_INTEGER,r=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return r%=t,r++}}})),iY=s(((e,t)=>{"use strict";var r=(e,t)=>function(){let r=t.promiseModule,i=new Array(arguments.length);for(let e=0;e<arguments.length;e++)i[e]=arguments[e];return new r(((r,n)=>{t.errorFirst?i.push((function(e,i){if(t.multiArgs){let t=new Array(arguments.length-1);for(let e=1;e<arguments.length;e++)t[e-1]=arguments[e];e?(t.unshift(e),n(t)):r(t)}else e?n(e):r(i)})):i.push((function(e){if(t.multiArgs){let e=new Array(arguments.length-1);for(let t=0;t<arguments.length;t++)e[t]=arguments[t];r(e)}else r(e)})),e.apply(this,i)}))};t.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);let i,n=e=>{let r=t=>"string"==typeof t?e===t:t.test(e);return t.include?t.include.some(r):!t.exclude.some(r)};i="function"==typeof e?function(){return t.excludeMain?e.apply(this,arguments):r(e,t).apply(this,arguments)}:Object.create(Object.getPrototypeOf(e));for(let o in e){let a=e[o];i[o]="function"==typeof a&&n(o)?r(a,t):a}return i}})),nY=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=p();function r(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}var i=class extends t.EventEmitter{emit(e,...t){let i="error"===e,n=this._events;if(void 0!==n)i=i&&void 0===n.error;else if(!i)return!1;if(i){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;let r=new Error("Unhandled error."+(e?` (${e.message})`:""));throw r.context=e,r}let o=n[e];if(void 0===o)return!1;if("function"==typeof o)r(o,this,t);else{let e=o.length,i=function(e){let t=e.length,r=new Array(t);for(let i=0;i<t;i+=1)r[i]=e[i];return r}(o);for(let n=0;n<e;n+=1)r(i[n],this,t)}return!0}};e.default=i})),oY=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.BaseBlockTracker=void 0;var r=t(nY()),i=(e,t)=>e+t,n=["sync","latest"],o=class extends r.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||2e4,this._usePastBlocks=e.usePastBlocks||!1,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()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise((e=>this.once("latest",e)))}removeAllListeners(e){return e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e){n.includes(e)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return n.map((e=>this.listenerCount(e))).reduce(i)}_shouldUseNewBlock(e){let t=this._currentBlock;if(!t)return!0;let r=a(e),i=a(t);return this._usePastBlocks&&r<i||r>i}_newPotentialLatest(e){this._shouldUseNewBlock(e)&&this._setCurrentBlock(e)}_setCurrentBlock(e){let t=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:t,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}};function a(e){return Number.parseInt(e,16)}e.BaseBlockTracker=o})),aY=s(((e,t)=>{var r,i;r=e,i=function(e){"use strict";class t extends TypeError{constructor(e,t){let r,{message:i,explanation:n,...o}=e,{path:a}=e,s=0===a.length?i:`At path: ${a.join(".")} -- ${i}`;super(n??s),null!=n&&(this.cause=s),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function r(e){return"object"==typeof e&&null!=e}function i(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function n(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function o(e,t,r,i){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});let{path:o,branch:a}=t,{type:s}=r,{refinement:c,message:l=`Expected a value of type \`${s}\`${c?` with refinement \`${c}\``:""}, but received: \`${n(i)}\``}=e;return{value:i,type:s,refinement:c,key:o[o.length-1],path:o,branch:a,...e,message:l}}function*a(e,t,i,n){(function(e){return r(e)&&"function"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(let r of e){let e=o(r,t,i,n);e&&(yield e)}}function*s(e,t,i={}){let{path:n=[],branch:o=[e],coerce:a=!1,mask:c=!1}=i,l={path:n,branch:o};if(a&&(e=t.coercer(e,l),c&&"type"!==t.type&&r(t.schema)&&r(e)&&!Array.isArray(e)))for(let r in e)void 0===t.schema[r]&&delete e[r];let u="valid";for(let r of t.validator(e,l))r.explanation=i.message,u="not_valid",yield[r,void 0];for(let[d,h,p]of t.entries(e,l)){let t=s(h,p,{path:void 0===d?n:[...n,d],branch:void 0===d?o:[...o,h],coerce:a,mask:c,message:i.message});for(let i of t)i[0]?(u=null!=i[0].refinement?"not_refined":"not_valid",yield[i[0],void 0]):a&&(h=i[1],void 0===d?e=h:e instanceof Map?e.set(d,h):e instanceof Set?e.add(h):r(e)&&(void 0!==h||d in e)&&(e[d]=h))}if("not_valid"!==u)for(let r of t.refiner(e,l))r.explanation=i.message,u="not_refined",yield[r,void 0];"valid"===u&&(yield[void 0,e])}class c{constructor(e){let{type:t,schema:r,validator:i,refiner:n,coercer:o=(e=>e),entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=o,this.validator=i?(e,t)=>a(i(e,t),t,this,e):()=>[],this.refiner=n?(e,t)=>a(n(e,t),t,this,e):()=>[]}assert(e,t){return l(e,this,t)}create(e,t){return u(e,this,t)}is(e){return h(e,this)}mask(e,t){return d(e,this,t)}validate(e,t={}){return p(e,this,t)}}function l(e,t,r){let i=p(e,t,{message:r});if(i[0])throw i[0]}function u(e,t,r){let i=p(e,t,{coerce:!0,message:r});if(i[0])throw i[0];return i[1]}function d(e,t,r){let i=p(e,t,{coerce:!0,mask:!0,message:r});if(i[0])throw i[0];return i[1]}function h(e,t){return!p(e,t)[0]}function p(e,r,i={}){let n=s(e,r,i),o=function(e){let{done:t,value:r}=e.next();return t?void 0:r}(n);return o[0]?[new t(o[0],(function*(){for(let e of n)e[0]&&(yield e[0])})),void 0]:[void 0,o[1]]}function f(e,t){return new c({type:e,schema:null,validator:t})}function g(){return f("never",(()=>!1))}function m(e){let t=e?Object.keys(e):[],i=g();return new c({type:"object",schema:e||null,*entries(n){if(e&&r(n)){let r=new Set(Object.keys(n));for(let i of t)r.delete(i),yield[i,n[i],e[i]];for(let e of r)yield[e,n[e],i]}},validator:e=>r(e)||`Expected an object, but received: ${n(e)}`,coercer:e=>r(e)?{...e}:e})}function b(e){return new c({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function y(){return f("string",(e=>"string"==typeof e||`Expected a string, but received: ${n(e)}`))}function w(e){let t=Object.keys(e);return new c({type:"type",schema:e,*entries(i){if(r(i))for(let r of t)yield[r,i[r],e[r]]},validator:e=>r(e)||`Expected an object, but received: ${n(e)}`,coercer:e=>r(e)?{...e}:e})}function v(){return f("unknown",(()=>!0))}function _(e,t,r){return new c({...e,coercer:(i,n)=>h(i,t)?e.coercer(r(i,n),n):e.coercer(i,n)})}function x(e){return e instanceof Map||e instanceof Set?e.size:e.length}function E(e,t,r){return new c({...e,*refiner(i,n){yield*e.refiner(i,n);let o=a(r(i,n),n,e,i);for(let e of o)yield{...e,refinement:t}}})}e.Struct=c,e.StructError=t,e.any=function(){return f("any",(()=>!0))},e.array=function(e){return new c({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(let[r,i]of t.entries())yield[r,i,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${n(e)}`})},e.assert=l,e.assign=function(...e){let t="type"===e[0].type,r=e.map((e=>e.schema)),i=Object.assign({},...r);return t?w(i):m(i)},e.bigint=function(){return f("bigint",(e=>"bigint"==typeof e))},e.boolean=function(){return f("boolean",(e=>"boolean"==typeof e))},e.coerce=_,e.create=u,e.date=function(){return f("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${n(e)}`))},e.defaulted=function(e,t,r={}){return _(e,v(),(e=>{let n="function"==typeof t?t():t;if(void 0===e)return n;if(!r.strict&&i(e)&&i(n)){let t={...e},r=!1;for(let e in n)void 0===t[e]&&(t[e]=n[e],r=!0);if(r)return t}return e}))},e.define=f,e.deprecated=function(e,t){return new c({...e,refiner:(t,r)=>void 0===t||e.refiner(t,r),validator:(r,i)=>void 0===r||(t(r,i),e.validator(r,i))})},e.dynamic=function(e){return new c({type:"dynamic",schema:null,*entries(t,r){yield*e(t,r).entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})},e.empty=function(e){return E(e,"empty",(t=>{let r=x(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))},e.enums=function(e){let t={},r=e.map((e=>n(e))).join();for(let r of e)t[r]=r;return new c({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${n(t)}`})},e.func=function(){return f("func",(e=>"function"==typeof e||`Expected a function, but received: ${n(e)}`))},e.instance=function(e){return f("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${n(t)}`))},e.integer=function(){return f("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${n(e)}`))},e.intersection=function(e){return new c({type:"intersection",schema:null,*entries(t,r){for(let i of e)yield*i.entries(t,r)},*validator(t,r){for(let i of e)yield*i.validator(t,r)},*refiner(t,r){for(let i of e)yield*i.refiner(t,r)}})},e.is=h,e.lazy=function(e){let t;return new c({type:"lazy",schema:null,*entries(r,i){t??(t=e()),yield*t.entries(r,i)},validator:(r,i)=>(t??(t=e()),t.validator(r,i)),coercer:(r,i)=>(t??(t=e()),t.coercer(r,i)),refiner:(r,i)=>(t??(t=e()),t.refiner(r,i))})},e.literal=function(e){let t=n(e),r=typeof e;return new c({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${n(r)}`})},e.map=function(e,t){return new c({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(let[i,n]of r.entries())yield[i,i,e],yield[i,n,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${n(e)}`})},e.mask=d,e.max=function(e,t,r={}){let{exclusive:i}=r;return E(e,"max",(r=>i?r<t:r<=t||`Expected a ${e.type} less than ${i?"":"or equal to "}${t} but received \`${r}\``))},e.min=function(e,t,r={}){let{exclusive:i}=r;return E(e,"min",(r=>i?r>t:r>=t||`Expected a ${e.type} greater than ${i?"":"or equal to "}${t} but received \`${r}\``))},e.never=g,e.nonempty=function(e){return E(e,"nonempty",(t=>x(t)>0||`Expected a nonempty ${e.type} but received an empty one`))},e.nullable=function(e){return new c({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})},e.number=function(){return f("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${n(e)}`))},e.object=m,e.omit=function(e,t){let{schema:r}=e,i={...r};for(let e of t)delete i[e];return"type"===e.type?w(i):m(i)},e.optional=b,e.partial=function(e){let t=e instanceof c,r=t?{...e.schema}:{...e};for(let e in r)r[e]=b(r[e]);return t&&"type"===e.type?w(r):m(r)},e.pattern=function(e,t){return E(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))},e.pick=function(e,t){let{schema:r}=e,i={};for(let e of t)i[e]=r[e];return"type"===e.type?w(i):m(i)},e.record=function(e,t){return new c({type:"record",schema:null,*entries(i){if(r(i))for(let r in i){let n=i[r];yield[r,r,e],yield[r,n,t]}},validator:e=>r(e)||`Expected an object, but received: ${n(e)}`})},e.refine=E,e.regexp=function(){return f("regexp",(e=>e instanceof RegExp))},e.set=function(e){return new c({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(let r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${n(e)}`})},e.size=function(e,t,r=t){let i=`Expected a ${e.type}`,n=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return E(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${i} ${n} but received \`${e}\``;if(e instanceof Map||e instanceof Set){let{size:o}=e;return t<=o&&o<=r||`${i} with a size ${n} but received one with a size of \`${o}\``}{let{length:o}=e;return t<=o&&o<=r||`${i} with a length ${n} but received one with a length of \`${o}\``}}))},e.string=y,e.struct=function(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),f(e,t)},e.trimmed=function(e){return _(e,y(),(e=>e.trim()))},e.tuple=function(e){let t=g();return new c({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let i=Math.max(e.length,r.length);for(let n=0;n<i;n++)yield[n,r[n],e[n]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${n(e)}`})},e.type=w,e.union=function(e){let t=e.map((e=>e.type)).join(" | ");return new c({type:"union",schema:null,coercer(t){for(let r of e){let[e,i]=r.validate(t,{coerce:!0});if(!e)return i}return t},validator(r,i){let o=[];for(let t of e){let[...e]=s(r,t,i),[n]=e;if(!n[0])return[];for(let[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${n(r)}`,...o]}})},e.unknown=v,e.validate=p},"object"==typeof e&&typeof t<"u"?i(e):"function"==typeof define&&define.amd?define(["exports"],i):i((r=typeof globalThis<"u"?globalThis:r||self).Superstruct={})})),sY=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertExhaustive=e.assertStruct=e.assert=e.AssertionError=void 0;var t=aY();function r(e,t){return function(e){var t,r;return"string"==typeof(null===(r=null===(t=e?.prototype)||void 0===t?void 0:t.constructor)||void 0===r?void 0:r.name)}(e)?new e({message:t}):e({message:t})}var i=class extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}};e.AssertionError=i,e.assert=function(e,t="Assertion failed.",n=i){if(!e)throw t instanceof Error?t:r(n,t)},e.assertStruct=function(e,n,o="Assertion failed",a=i){try{(0,t.assert)(e,n)}catch(e){throw r(a,`${o}: ${function(e){let t=function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}(e)}.`)}},e.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}})),cY=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.base64=void 0;var t=aY(),r=sY();e.base64=(e,i={})=>{var n,o;let a,s,c=null!==(n=i.paddingRequired)&&void 0!==n&&n,l=null!==(o=i.characterSet)&&void 0!==o?o:"base64";return"base64"===l?a=String.raw`[A-Za-z0-9+\/]`:((0,r.assert)("base64url"===l),a=String.raw`[-_A-Za-z0-9]`),s=c?new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),(0,t.pattern)(e,s)}})),lY=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.StrictHexStruct=e.HexStruct=void 0;var t=aY(),r=sY();function i(r){return(0,t.is)(r,e.HexStruct)}function n(r){return(0,t.is)(r,e.StrictHexStruct)}e.HexStruct=(0,t.pattern)((0,t.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]+$/iu),e.isHexString=i,e.isStrictHexString=n,e.assertIsHexString=function(e){(0,r.assert)(i(e),"Value must be a hexadecimal string.")},e.assertIsStrictHexString=function(e){(0,r.assert)(n(e),'Value must be a hexadecimal string, starting with "0x".')},e.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},e.remove0x=function(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}})),uY=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDataView=e.concatBytes=e.valueToBytes=e.stringToBytes=e.numberToBytes=e.signedBigIntToBytes=e.bigIntToBytes=e.hexToBytes=e.bytesToString=e.bytesToNumber=e.bytesToSignedBigInt=e.bytesToBigInt=e.bytesToHex=e.assertIsBytes=e.isBytes=void 0;var t=sY(),r=lY(),i=48,n=58,o=87;var a=function(){let e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function s(e){return e instanceof Uint8Array}function c(e){(0,t.assert)(s(e),"Value must be a Uint8Array.")}function l(e){if(c(e),0===e.length)return"0x";let t=a(),i=new Array(e.length);for(let r=0;r<e.length;r++)i[r]=t[e[r]];return(0,r.add0x)(i.join(""))}function u(e){c(e);let t=l(e);return BigInt(t)}function d(e){var t;if("0x"===(null===(t=e?.toLowerCase)||void 0===t?void 0:t.call(e)))return new Uint8Array;(0,r.assertIsHexString)(e);let a=(0,r.remove0x)(e).toLowerCase(),s=a.length%2==0?a:`0${a}`,c=new Uint8Array(s.length/2);for(let e=0;e<c.length;e++){let t=s.charCodeAt(2*e),r=s.charCodeAt(2*e+1),a=t-(t<n?i:o),l=r-(r<n?i:o);c[e]=16*a+l}return c}function h(e){return(0,t.assert)("bigint"==typeof e,"Value must be a bigint."),(0,t.assert)(e>=BigInt(0),"Value must be a non-negative bigint."),d(e.toString(16))}function p(e){return(0,t.assert)("number"==typeof e,"Value must be a number."),(0,t.assert)(e>=0,"Value must be a non-negative number."),(0,t.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead."),d(e.toString(16))}function f(e){return(0,t.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function g(e){if("bigint"==typeof e)return h(e);if("number"==typeof e)return p(e);if("string"==typeof e)return e.startsWith("0x")?d(e):f(e);if(s(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}e.isBytes=s,e.assertIsBytes=c,e.bytesToHex=l,e.bytesToBigInt=u,e.bytesToSignedBigInt=function(e){c(e);let t=BigInt(0);for(let r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},e.bytesToNumber=function(e){c(e);let r=u(e);return(0,t.assert)(r<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(r)},e.bytesToString=function(e){return c(e),(new TextDecoder).decode(e)},e.hexToBytes=d,e.bigIntToBytes=h,e.signedBigIntToBytes=function(e,r){(0,t.assert)("bigint"==typeof e,"Value must be a bigint."),(0,t.assert)("number"==typeof r,"Byte length must be a number."),(0,t.assert)(r>0,"Byte length must be greater than 0."),(0,t.assert)(function(e,r){(0,t.assert)(r>0);let i=e>>BigInt(31);return!((~e&i)+(e&~i)>>BigInt(8*r-1))}(e,r),"Byte length is too small to represent the given value.");let i=e,n=new Uint8Array(r);for(let e=0;e<n.length;e++)n[e]=Number(BigInt.asUintN(8,i)),i>>=BigInt(8);return n.reverse()},e.numberToBytes=p,e.stringToBytes=f,e.valueToBytes=g,e.concatBytes=function(e){let t=new Array(e.length),r=0;for(let i=0;i<e.length;i++){let n=g(e[i]);t[i]=n,r+=n.length}let i=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)i.set(t[e],r),r+=t[e].length;return i},e.createDataView=function(e){if(typeof Buffer<"u"&&e instanceof Buffer){let t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}})),dY=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChecksumStruct=void 0;var t=aY(),r=cY();e.ChecksumStruct=(0,t.size)((0,r.base64)((0,t.string)(),{paddingRequired:!0}),44,44)})),hY=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createHex=e.createBytes=e.createBigInt=e.createNumber=void 0;var t=aY(),r=sY(),i=uY(),n=lY(),o=(0,t.union)([(0,t.number)(),(0,t.bigint)(),(0,t.string)(),n.StrictHexStruct]),a=(0,t.coerce)((0,t.number)(),o,Number),s=(0,t.coerce)((0,t.bigint)(),o,BigInt),c=((0,t.union)([n.StrictHexStruct,(0,t.instance)(Uint8Array)]),(0,t.coerce)((0,t.instance)(Uint8Array),(0,t.union)([n.StrictHexStruct]),i.hexToBytes)),l=(0,t.coerce)(n.StrictHexStruct,(0,t.instance)(Uint8Array),i.bytesToHex);e.createNumber=function(e){try{let i=(0,t.create)(e,a);return(0,r.assert)(Number.isFinite(i),`Expected a number-like value, got "${e}".`),i}catch(r){throw r instanceof t.StructError?new Error(`Expected a number-like value, got "${e}".`):r}},e.createBigInt=function(e){try{return(0,t.create)(e,s)}catch(e){throw e instanceof t.StructError?new Error(`Expected a number-like value, got "${String(e.value)}".`):e}},e.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,t.create)(e,c)}catch(e){throw e instanceof t.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}},e.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,t.create)(e,l)}catch(e){throw e instanceof t.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}}})),pY=s((e=>{"use strict";var t,r,i=e&&e.__classPrivateFieldSet||function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r},n=e&&e.__classPrivateFieldGet||function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)};Object.defineProperty(e,"__esModule",{value:!0}),e.FrozenSet=e.FrozenMap=void 0;var o=class{constructor(e){t.set(this,void 0),i(this,t,new Map(e),"f"),Object.freeze(this)}get size(){return n(this,t,"f").size}[(t=new WeakMap,Symbol.iterator)](){return n(this,t,"f")[Symbol.iterator]()}entries(){return n(this,t,"f").entries()}forEach(e,r){return n(this,t,"f").forEach(((t,i,n)=>e.call(r,t,i,this)))}get(e){return n(this,t,"f").get(e)}has(e){return n(this,t,"f").has(e)}keys(){return n(this,t,"f").keys()}values(){return n(this,t,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}};e.FrozenMap=o;var a=class{constructor(e){r.set(this,void 0),i(this,r,new Set(e),"f"),Object.freeze(this)}get size(){return n(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return n(this,r,"f")[Symbol.iterator]()}entries(){return n(this,r,"f").entries()}forEach(e,t){return n(this,r,"f").forEach(((r,i,n)=>e.call(t,r,i,this)))}has(e){return n(this,r,"f").has(e)}keys(){return n(this,r,"f").keys()}values(){return n(this,r,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}};e.FrozenSet=a,Object.freeze(o),Object.freeze(o.prototype),Object.freeze(a),Object.freeze(a.prototype)})),fY=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),gY=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=void 0;var t=aY(),r=sY();e.UnsafeJsonStruct=(0,t.union)([(0,t.literal)(null),(0,t.boolean)(),(0,t.define)("finite number",(e=>(0,t.is)(e,(0,t.number)())&&Number.isFinite(e))),(0,t.string)(),(0,t.array)((0,t.lazy)((()=>e.UnsafeJsonStruct))),(0,t.record)((0,t.string)(),(0,t.lazy)((()=>e.UnsafeJsonStruct)))]),e.JsonStruct=(0,t.define)("Json",((t,r)=>{function i(e,t){let i=[...t.validator(e,r)];return!(i.length>0)||i}try{let r=i(t,e.UnsafeJsonStruct);return!0!==r?r:i(JSON.parse(JSON.stringify(t)),e.UnsafeJsonStruct)}catch(e){return e instanceof RangeError&&"Circular reference detected"}})),e.isValidJson=function(r){return(0,t.is)(r,e.JsonStruct)},e.getJsonSize=function(t){(0,r.assertStruct)(t,e.JsonStruct,"Invalid JSON value");let i=JSON.stringify(t);return(new TextEncoder).encode(i).byteLength},e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,t.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,t.nullable)((0,t.union)([(0,t.number)(),(0,t.string)()])),e.JsonRpcErrorStruct=(0,t.object)({code:(0,t.integer)(),message:(0,t.string)(),data:(0,t.optional)(e.JsonStruct),stack:(0,t.optional)((0,t.string)())}),e.JsonRpcParamsStruct=(0,t.optional)((0,t.union)([(0,t.record)((0,t.string)(),e.JsonStruct),(0,t.array)(e.JsonStruct)])),e.JsonRpcRequestStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:e.JsonRpcParamsStruct}),e.JsonRpcNotificationStruct=(0,t.omit)(e.JsonRpcRequestStruct,["id"]),e.isJsonRpcNotification=function(r){return(0,t.is)(r,e.JsonRpcNotificationStruct)},e.assertIsJsonRpcNotification=function(t,i){(0,r.assertStruct)(t,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",i)},e.isJsonRpcRequest=function(r){return(0,t.is)(r,e.JsonRpcRequestStruct)},e.assertIsJsonRpcRequest=function(t,i){(0,r.assertStruct)(t,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",i)},e.PendingJsonRpcResponseStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,t.optional)((0,t.unknown)()),error:(0,t.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,t.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]),e.isPendingJsonRpcResponse=function(r){return(0,t.is)(r,e.PendingJsonRpcResponseStruct)},e.assertIsPendingJsonRpcResponse=function(t,i){(0,r.assertStruct)(t,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",i)},e.isJsonRpcResponse=function(r){return(0,t.is)(r,e.JsonRpcResponseStruct)},e.assertIsJsonRpcResponse=function(t,i){(0,r.assertStruct)(t,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",i)},e.isJsonRpcSuccess=function(r){return(0,t.is)(r,e.JsonRpcSuccessStruct)},e.assertIsJsonRpcSuccess=function(t,i){(0,r.assertStruct)(t,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",i)},e.isJsonRpcFailure=function(r){return(0,t.is)(r,e.JsonRpcFailureStruct)},e.assertIsJsonRpcFailure=function(t,i){(0,r.assertStruct)(t,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",i)},e.isJsonRpcError=function(r){return(0,t.is)(r,e.JsonRpcErrorStruct)},e.assertIsJsonRpcError=function(t,i){(0,r.assertStruct)(t,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",i)},e.getJsonRpcIdValidator=function(e){let{permitEmptyString:t,permitFractions:r,permitNull:i}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},e);return e=>!!("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||i&&null===e)}})),mY=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),bY=s(((e,t)=>{var r=1e3,i=6e4,n=60*i,o=24*n,a=7*o,s=365.25*o;function c(e,t,r,i){var n=t>=1.5*r;return Math.round(e/r)+" "+i+(n?"s":"")}t.exports=function(e,t){t=t||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*a;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*i;case"seconds":case"second":case"secs":case"sec":case"s":return c*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}}}(e);if("number"===l&&isFinite(e))return t.long?function(e){var t=Math.abs(e);return t>=o?c(e,t,o,"day"):t>=n?c(e,t,n,"hour"):t>=i?c(e,t,i,"minute"):t>=r?c(e,t,r,"second"):e+" ms"}(e):function(e){var t=Math.abs(e);return t>=o?Math.round(e/o)+"d":t>=n?Math.round(e/n)+"h":t>=i?Math.round(e/i)+"m":t>=r?Math.round(e/r)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}})),yY=s(((e,t)=>{t.exports=function(e){function t(e){let i,n,o,a=null;function s(...e){if(!s.enabled)return;let r=s,n=Number(new Date),o=n-(i||n);r.diff=o,r.prev=i,r.curr=n,i=n,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((i,n)=>{if("%%"===i)return"%";a++;let o=t.formatters[n];if("function"==typeof o){let t=e[a];i=o.call(r,t),e.splice(a,1),a--}return i})),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(n!==t.namespaces&&(n=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,r){let i=t(this.namespace+(typeof r>"u"?":":r)+e);return i.log=this.log,i}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){let e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];let r,i=("string"==typeof e?e:"").split(/[\s,]+/),n=i.length;for(r=0;r<n;r++)i[r]&&("-"===(e=i[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,i;for(r=0,i=t.skips.length;r<i;r++)if(t.skips[r].test(e))return!1;for(r=0,i=t.names.length;r<i;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=bY(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}})),wY=s(((e,t)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;e.splice(1,0,r,"color: inherit");let i=0,n=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(n=i))})),e.splice(n,0,r)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch{}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!(!(typeof window<"u"&&window.process)||"renderer"!==window.process.type&&!window.process.__nwjs)||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch{}}(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=yY()(e);var{formatters:r}=t.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}})),vY=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.createModuleLogger=e.createProjectLogger=void 0;var r=(0,t(wY()).default)("metamask");e.createProjectLogger=function(e){return r.extend(e)},e.createModuleLogger=function(e,t){return e.extend(t)}})),_Y=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0,e.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},e.isNullOrUndefined=function(e){return null==e},e.isObject=function(e){return!!e&&"object"==typeof e&&!Array.isArray(e)};var t;function r(e){return e.charCodeAt(0)<=127}e.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),(t=e.JsonSize||(e.JsonSize={}))[t.Null=4]="Null",t[t.Comma=1]="Comma",t[t.Wrapper=1]="Wrapper",t[t.True=4]="True",t[t.False=5]="False",t[t.Quote=1]="Quote",t[t.Colon=1]="Colon",t[t.Date=24]="Date",e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,e.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch{return!1}},e.isASCII=r,e.calculateStringSize=function(t){var i;return t.split("").reduce(((e,t)=>r(t)?e+1:e+2),0)+(null!==(i=t.match(e.ESCAPE_CHARACTERS_REGEXP))&&void 0!==i?i:[]).length},e.calculateNumberSize=function(e){return e.toString().length}})),xY=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hexToBigInt=e.hexToNumber=e.bigIntToHex=e.numberToHex=void 0;var t=sY(),r=lY();e.numberToHex=e=>((0,t.assert)("number"==typeof e,"Value must be a number."),(0,t.assert)(e>=0,"Value must be a non-negative number."),(0,t.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,r.add0x)(e.toString(16)));e.bigIntToHex=e=>((0,t.assert)("bigint"==typeof e,"Value must be a bigint."),(0,t.assert)(e>=0,"Value must be a non-negative bigint."),(0,r.add0x)(e.toString(16)));e.hexToNumber=e=>{(0,r.assertIsHexString)(e);let i=parseInt(e,16);return(0,t.assert)(Number.isSafeInteger(i),"Value is not a safe integer. Use `hexToBigInt` instead."),i};e.hexToBigInt=e=>((0,r.assertIsHexString)(e),BigInt((0,r.add0x)(e)))})),EY=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),CY=s((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,(t=e.Duration||(e.Duration={}))[t.Millisecond=1]="Millisecond",t[t.Second=1e3]="Second",t[t.Minute=6e4]="Minute",t[t.Hour=36e5]="Hour",t[t.Day=864e5]="Day",t[t.Week=6048e5]="Week",t[t.Year=31536e6]="Year";var r=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};e.inMilliseconds=function(e,t){return r(e,"count"),e*t},e.timeSince=function(e){return r(e,"timestamp"),Date.now()-e}})),kY=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),PY=s(((e,t)=>{var r=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),IY=s(((e,t)=>{var r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};t.exports=r})),SY=s(((e,t)=>{var{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:n}=PY(),o=IY(),a=(e=t.exports={}).re=[],s=e.safeRe=[],c=e.src=[],l=e.t={},u=0,d="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",n],[d,i]],p=(e,t,r)=>{let i=(e=>{for(let[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),n=u++;o(e,n,t),l[e]=n,c[n]=t,a[n]=new RegExp(t,r?"g":void 0),s[n]=new RegExp(i,r?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),p("FULL",`^${c[l.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),p("LOOSE",`^${c[l.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),p("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),p("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",c[l.COERCE],!0),p("COERCERTLFULL",c[l.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",p("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",p("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})),AY=s(((e,t)=>{var r=Object.freeze({loose:!0}),i=Object.freeze({});t.exports=e=>e?"object"!=typeof e?r:e:i})),TY=s(((e,t)=>{var r=/^[0-9]+$/,i=(e,t)=>{let i=r.test(e),n=r.test(t);return i&&n&&(e=+e,t=+t),e===t?0:i&&!n?-1:n&&!i?1:e<t?-1:1};t.exports={compareIdentifiers:i,rcompareIdentifiers:(e,t)=>i(t,e)}})),OY=s(((e,t)=>{var r=IY(),{MAX_LENGTH:i,MAX_SAFE_INTEGER:n}=PY(),{safeRe:o,t:a}=SY(),s=AY(),{compareIdentifiers:c}=TY();t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>i)throw new TypeError(`version is longer than ${i} characters`);r("SemVer",t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?o[a.LOOSE]:o[a.FULL]);if(!l)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");l[4]?this.prerelease=l[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<n)return t}return e})):this.prerelease=[],this.build=l[5]?l[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(r("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),c(this.major,t.major)||c(this.minor,t.minor)||c(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let i=0;do{let e=this.prerelease[i],n=t.prerelease[i];if(r("prerelease compare",i,e,n),void 0===e&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===e)return-1;if(e!==n)return c(e,n)}while(++i)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let i=0;do{let e=this.build[i],n=t.build[i];if(r("prerelease compare",i,e,n),void 0===e&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===e)return-1;if(e!==n)return c(e,n)}while(++i)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===r&&(i=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}})),RY=s(((e,t)=>{var r=OY();t.exports=(e,t,i=!1)=>{if(e instanceof r)return e;try{return new r(e,t)}catch(e){if(!i)return null;throw e}}})),NY=s(((e,t)=>{var r=RY();t.exports=(e,t)=>{let i=r(e,t);return i?i.version:null}})),MY=s(((e,t)=>{var r=RY();t.exports=(e,t)=>{let i=r(e.trim().replace(/^[=v]+/,""),t);return i?i.version:null}})),$Y=s(((e,t)=>{var r=OY();t.exports=(e,t,i,n,o)=>{"string"==typeof i&&(o=n,n=i,i=void 0);try{return new r(e instanceof r?e.version:e,i).inc(t,n,o).version}catch{return null}}})),jY=s(((e,t)=>{var r=RY();t.exports=(e,t)=>{let i=r(e,null,!0),n=r(t,null,!0),o=i.compare(n);if(0===o)return null;let a=o>0,s=a?i:n,c=a?n:i,l=!!s.prerelease.length;if(c.prerelease.length&&!l)return c.patch||c.minor?s.patch?"patch":s.minor?"minor":"major":"major";let u=l?"pre":"";return i.major!==n.major?u+"major":i.minor!==n.minor?u+"minor":i.patch!==n.patch?u+"patch":"prerelease"}})),LY=s(((e,t)=>{var r=OY();t.exports=(e,t)=>new r(e,t).major})),BY=s(((e,t)=>{var r=OY();t.exports=(e,t)=>new r(e,t).minor})),DY=s(((e,t)=>{var r=OY();t.exports=(e,t)=>new r(e,t).patch})),UY=s(((e,t)=>{var r=RY();t.exports=(e,t)=>{let i=r(e,t);return i&&i.prerelease.length?i.prerelease:null}})),FY=s(((e,t)=>{var r=OY();t.exports=(e,t,i)=>new r(e,i).compare(new r(t,i))})),HY=s(((e,t)=>{var r=FY();t.exports=(e,t,i)=>r(t,e,i)})),zY=s(((e,t)=>{var r=FY();t.exports=(e,t)=>r(e,t,!0)})),qY=s(((e,t)=>{var r=OY();t.exports=(e,t,i)=>{let n=new r(e,i),o=new r(t,i);return n.compare(o)||n.compareBuild(o)}})),WY=s(((e,t)=>{var r=qY();t.exports=(e,t)=>e.sort(((e,i)=>r(e,i,t)))})),VY=s(((e,t)=>{var r=qY();t.exports=(e,t)=>e.sort(((e,i)=>r(i,e,t)))})),GY=s(((e,t)=>{var r=FY();t.exports=(e,t,i)=>r(e,t,i)>0})),ZY=s(((e,t)=>{var r=FY();t.exports=(e,t,i)=>r(e,t,i)<0})),KY=s(((e,t)=>{var r=FY();t.exports=(e,t,i)=>0===r(e,t,i)})),YY=s(((e,t)=>{var r=FY();t.exports=(e,t,i)=>0!==r(e,t,i)})),JY=s(((e,t)=>{var r=FY();t.exports=(e,t,i)=>r(e,t,i)>=0})),QY=s(((e,t)=>{var r=FY();t.exports=(e,t,i)=>r(e,t,i)<=0})),XY=s(((e,t)=>{var r=KY(),i=YY(),n=GY(),o=JY(),a=ZY(),s=QY();t.exports=(e,t,c,l)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof c&&(c=c.version),e===c;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof c&&(c=c.version),e!==c;case"":case"=":case"==":return r(e,c,l);case"!=":return i(e,c,l);case">":return n(e,c,l);case">=":return o(e,c,l);case"<":return a(e,c,l);case"<=":return s(e,c,l);default:throw new TypeError(`Invalid operator: ${t}`)}}})),eJ=s(((e,t)=>{var r=OY(),i=RY(),{safeRe:n,t:o}=SY();t.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let a=null;if((t=t||{}).rtl){let r,i=t.includePrerelease?n[o.COERCERTLFULL]:n[o.COERCERTL];for(;(r=i.exec(e))&&(!a||a.index+a[0].length!==e.length);)(!a||r.index+r[0].length!==a.index+a[0].length)&&(a=r),i.lastIndex=r.index+r[1].length+r[2].length;i.lastIndex=-1}else a=e.match(t.includePrerelease?n[o.COERCEFULL]:n[o.COERCE]);if(null===a)return null;let s=a[2],c=a[3]||"0",l=a[4]||"0",u=t.includePrerelease&&a[5]?`-${a[5]}`:"",d=t.includePrerelease&&a[6]?`+${a[6]}`:"";return i(`${s}.${c}.${l}${u}${d}`,t)}})),tJ=s(((e,t)=>{"use strict";t.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}})),rJ=s(((e,t)=>{"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var i=0,n=arguments.length;i<n;i++)t.push(arguments[i]);return t}function i(e,t,r){var i=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===i.next&&(e.tail=i),null===i.prev&&(e.head=i),e.length++,i}function n(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function o(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,i){if(!(this instanceof a))return new a(e,t,r,i);this.list=i,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}t.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)n(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,i=0;null!==r;i++)e.call(t,r.value,i,this),r=r.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,i=this.length-1;null!==r;i--)e.call(t,r.value,i,this),r=r.prev},r.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},r.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},r.prototype.map=function(e,t){t=t||this;for(var i=new r,n=this.head;null!==n;)i.push(e.call(t,n.value,this)),n=n.next;return i},r.prototype.mapReverse=function(e,t){t=t||this;for(var i=new r,n=this.tail;null!==n;)i.push(e.call(t,n.value,this)),n=n.prev;return i},r.prototype.reduce=function(e,t){var r,i=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");i=this.head.next,r=this.head.value}for(var n=0;null!==i;n++)r=e(r,i.value,n),i=i.next;return r},r.prototype.reduceReverse=function(e,t){var r,i=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");i=this.tail.prev,r=this.tail.value}for(var n=this.length-1;null!==i;n--)r=e(r,i.value,n),i=i.prev;return r},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var i=new r;if(t<e||t<0)return i;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=0,o=this.head;null!==o&&n<e;n++)o=o.next;for(;null!==o&&n<t;n++,o=o.next)i.push(o.value);return i},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var i=new r;if(t<e||t<0)return i;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=this.length,o=this.tail;null!==o&&n>t;n--)o=o.prev;for(;null!==o&&n>e;n--,o=o.prev)i.push(o.value);return i},r.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,o=this.head;null!==o&&n<e;n++)o=o.next;var a=[];for(n=0;o&&n<t;n++)a.push(o.value),o=this.removeNode(o);null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(n=0;n<r.length;n++)o=i(this,o,r[n]);return a},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var i=r.prev;r.prev=r.next,r.next=i}return this.head=t,this.tail=e,this};try{tJ()(r)}catch{}})),iJ=s(((e,t)=>{"use strict";var r=rJ(),i=Symbol("max"),n=Symbol("length"),o=Symbol("lengthCalculator"),a=Symbol("allowStale"),s=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),u=Symbol("lruList"),d=Symbol("cache"),h=Symbol("updateAgeOnGet"),p=()=>1,f=(e,t,r)=>{let i=e[d].get(t);if(i){let t=i.value;if(g(e,t)){if(b(e,i),!e[a])return}else r&&(e[h]&&(i.value.now=Date.now()),e[u].unshiftNode(i));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[s])return!1;let r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[s]&&r>e[s]},m=e=>{if(e[n]>e[i])for(let t=e[u].tail;e[n]>e[i]&&null!==t;){let r=t.prev;b(e,t),t=r}},b=(e,t)=>{if(t){let r=t.value;e[c]&&e[c](r.key,r.value),e[n]-=r.length,e[d].delete(r.key),e[u].removeNode(t)}},y=class{constructor(e,t,r,i,n){this.key=e,this.value=t,this.length=r,this.now=i,this.maxAge=n||0}},w=(e,t,r,i)=>{let n=r.value;g(e,n)&&(b(e,r),e[a]||(n=void 0)),n&&t.call(i,n.value,n.key,e)};t.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;let t=e.length||p;if(this[o]="function"!=typeof t?p:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[s]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,m(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[s]=e,m(this)}get maxAge(){return this[s]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[o]&&(this[o]=e,this[n]=0,this[u].forEach((e=>{e.length=this[o](e.value,e.key),this[n]+=e.length}))),m(this)}get lengthCalculator(){return this[o]}get length(){return this[n]}get itemCount(){return this[u].length}rforEach(e,t){t=t||this;for(let r=this[u].tail;null!==r;){let i=r.prev;w(this,e,r,t),r=i}}forEach(e,t){t=t||this;for(let r=this[u].head;null!==r;){let i=r.next;w(this,e,r,t),r=i}}keys(){return this[u].toArray().map((e=>e.key))}values(){return this[u].toArray().map((e=>e.value))}reset(){this[c]&&this[u]&&this[u].length&&this[u].forEach((e=>this[c](e.key,e.value))),this[d]=new Map,this[u]=new r,this[n]=0}dump(){return this[u].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[u]}set(e,t,r){if((r=r||this[s])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");let a=r?Date.now():0,h=this[o](t,e);if(this[d].has(e)){if(h>this[i])return b(this,this[d].get(e)),!1;let o=this[d].get(e).value;return this[c]&&(this[l]||this[c](e,o.value)),o.now=a,o.maxAge=r,o.value=t,this[n]+=h-o.length,o.length=h,this.get(e),m(this),!0}let p=new y(e,t,h,a,r);return p.length>this[i]?(this[c]&&this[c](e,t),!1):(this[n]+=p.length,this[u].unshift(p),this[d].set(e,this[u].head),m(this),!0)}has(e){if(!this[d].has(e))return!1;let t=this[d].get(e).value;return!g(this,t)}get(e){return f(this,e,!0)}peek(e){return f(this,e,!1)}pop(){let e=this[u].tail;return e?(b(this,e),e.value):null}del(e){b(this,this[d].get(e))}load(e){this.reset();let t=Date.now();for(let r=e.length-1;r>=0;r--){let i=e[r],n=i.e||0;if(0===n)this.set(i.k,i.v);else{let e=n-t;e>0&&this.set(i.k,i.v,e)}}}prune(){this[d].forEach(((e,t)=>f(this,t,!1)))}}})),nJ=s(((e,t)=>{t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof n)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter((e=>!f(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(let e of this.set)if(1===e.length&&g(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&h)|(this.options.loose&&p))+":"+e,i=r.get(t);if(i)return i;let a=this.options.loose,g=a?s[c.HYPHENRANGELOOSE]:s[c.HYPHENRANGE];e=e.replace(g,I(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(s[c.COMPARATORTRIM],l),o("comparator trim",e),e=e.replace(s[c.TILDETRIM],u),o("tilde trim",e),e=e.replace(s[c.CARETTRIM],d),o("caret trim",e);let m=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>P(e,this.options)));a&&(m=m.filter((e=>(o("loose invalid filter",e,this.options),!!e.match(s[c.COMPARATORLOOSE]))))),o("range list",m);let y=new Map,w=m.map((e=>new n(e,this.options)));for(let e of w){if(f(e))return[e];y.set(e.value,e)}y.size>1&&y.has("")&&y.delete("");let v=[...y.values()];return r.set(t,v),v}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((e=>m(e,r)&&t.set.some((t=>m(t,r)&&e.every((e=>t.every((t=>e.intersects(t,r)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new a(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(S(this.set[t],e,this.options))return!0;return!1}};var r=new(iJ())({max:1e3}),i=AY(),n=oJ(),o=IY(),a=OY(),{safeRe:s,t:c,comparatorTrimReplace:l,tildeTrimReplace:u,caretTrimReplace:d}=SY(),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:p}=PY(),f=e=>"<0.0.0-0"===e.value,g=e=>""===e.value,m=(e,t)=>{let r=!0,i=e.slice(),n=i.pop();for(;r&&i.length;)r=i.every((e=>n.intersects(e,t))),n=i.pop();return r},b=(e,t)=>(o("comp",e,t),e=_(e,t),o("caret",e),e=w(e,t),o("tildes",e),e=E(e,t),o("xrange",e),e=k(e,t),o("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,t)=>e.trim().split(/\s+/).map((e=>v(e,t))).join(" "),v=(e,t)=>{let r=t.loose?s[c.TILDELOOSE]:s[c.TILDE];return e.replace(r,((t,r,i,n,a)=>{let s;return o("tilde",e,t,r,i,n,a),y(r)?s="":y(i)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:y(n)?s=`>=${r}.${i}.0 <${r}.${+i+1}.0-0`:a?(o("replaceTilde pr",a),s=`>=${r}.${i}.${n}-${a} <${r}.${+i+1}.0-0`):s=`>=${r}.${i}.${n} <${r}.${+i+1}.0-0`,o("tilde return",s),s}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{o("caret",e,t);let r=t.loose?s[c.CARETLOOSE]:s[c.CARET],i=t.includePrerelease?"-0":"";return e.replace(r,((t,r,n,a,s)=>{let c;return o("caret",e,t,r,n,a,s),y(r)?c="":y(n)?c=`>=${r}.0.0${i} <${+r+1}.0.0-0`:y(a)?c="0"===r?`>=${r}.${n}.0${i} <${r}.${+n+1}.0-0`:`>=${r}.${n}.0${i} <${+r+1}.0.0-0`:s?(o("replaceCaret pr",s),c="0"===r?"0"===n?`>=${r}.${n}.${a}-${s} <${r}.${n}.${+a+1}-0`:`>=${r}.${n}.${a}-${s} <${r}.${+n+1}.0-0`:`>=${r}.${n}.${a}-${s} <${+r+1}.0.0-0`):(o("no pr"),c="0"===r?"0"===n?`>=${r}.${n}.${a}${i} <${r}.${n}.${+a+1}-0`:`>=${r}.${n}.${a}${i} <${r}.${+n+1}.0-0`:`>=${r}.${n}.${a} <${+r+1}.0.0-0`),o("caret return",c),c}))},E=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map((e=>C(e,t))).join(" ")),C=(e,t)=>{e=e.trim();let r=t.loose?s[c.XRANGELOOSE]:s[c.XRANGE];return e.replace(r,((r,i,n,a,s,c)=>{o("xRange",e,r,i,n,a,s,c);let l=y(n),u=l||y(a),d=u||y(s),h=d;return"="===i&&h&&(i=""),c=t.includePrerelease?"-0":"",l?r=">"===i||"<"===i?"<0.0.0-0":"*":i&&h?(u&&(a=0),s=0,">"===i?(i=">=",u?(n=+n+1,a=0,s=0):(a=+a+1,s=0)):"<="===i&&(i="<",u?n=+n+1:a=+a+1),"<"===i&&(c="-0"),r=`${i+n}.${a}.${s}${c}`):u?r=`>=${n}.0.0${c} <${+n+1}.0.0-0`:d&&(r=`>=${n}.${a}.0${c} <${n}.${+a+1}.0-0`),o("xRange return",r),r}))},k=(e,t)=>(o("replaceStars",e,t),e.trim().replace(s[c.STAR],"")),P=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),I=e=>(t,r,i,n,o,a,s,c,l,u,d,h,p)=>`${r=y(i)?"":y(n)?`>=${i}.0.0${e?"-0":""}`:y(o)?`>=${i}.${n}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=y(l)?"":y(u)?`<${+l+1}.0.0-0`:y(d)?`<${l}.${+u+1}.0-0`:h?`<=${l}.${u}.${d}-${h}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`}`.trim(),S=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(o(e[r].semver),e[r].semver!==n.ANY&&e[r].semver.prerelease.length>0){let i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}})),oJ=s(((e,t)=>{var r=Symbol("SemVer ANY");t.exports=class e{static get ANY(){return r}constructor(t,n){if(n=i(n),t instanceof e){if(t.loose===!!n.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),s("comparator",t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===r?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(e){let t=this.options.loose?n[o.COMPARATORLOOSE]:n[o.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new c(i[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(s("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch{return!1}return a(e,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(t.value,r).test(this.value):""===t.operator?""===t.value||new l(this.value,r).test(t.semver):!((r=i(r)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===t.value)||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||a(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||a(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">"))}};var i=AY(),{safeRe:n,t:o}=SY(),a=XY(),s=IY(),c=OY(),l=nJ()})),aJ=s(((e,t)=>{var r=nJ();t.exports=(e,t,i)=>{try{t=new r(t,i)}catch{return!1}return t.test(e)}})),sJ=s(((e,t)=>{var r=nJ();t.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))})),cJ=s(((e,t)=>{var r=OY(),i=nJ();t.exports=(e,t,n)=>{let o=null,a=null,s=null;try{s=new i(t,n)}catch{return null}return e.forEach((e=>{s.test(e)&&(!o||-1===a.compare(e))&&(o=e,a=new r(o,n))})),o}})),lJ=s(((e,t)=>{var r=OY(),i=nJ();t.exports=(e,t,n)=>{let o=null,a=null,s=null;try{s=new i(t,n)}catch{return null}return e.forEach((e=>{s.test(e)&&(!o||1===a.compare(e))&&(o=e,a=new r(o,n))})),o}})),uJ=s(((e,t)=>{var r=OY(),i=nJ(),n=GY();t.exports=(e,t)=>{e=new i(e,t);let o=new r("0.0.0");if(e.test(o)||(o=new r("0.0.0-0"),e.test(o)))return o;o=null;for(let t=0;t<e.set.length;++t){let i=e.set[t],a=null;i.forEach((e=>{let t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!a||n(t,a))&&(a=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),a&&(!o||n(o,a))&&(o=a)}return o&&e.test(o)?o:null}})),dJ=s(((e,t)=>{var r=nJ();t.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch{return null}}})),hJ=s(((e,t)=>{var r=OY(),i=oJ(),{ANY:n}=i,o=nJ(),a=aJ(),s=GY(),c=ZY(),l=QY(),u=JY();t.exports=(e,t,d,h)=>{let p,f,g,m,b;switch(e=new r(e,h),t=new o(t,h),d){case">":p=s,f=l,g=c,m=">",b=">=";break;case"<":p=c,f=u,g=s,m="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h))return!1;for(let r=0;r<t.set.length;++r){let o=t.set[r],a=null,s=null;if(o.forEach((e=>{e.semver===n&&(e=new i(">=0.0.0")),a=a||e,s=s||e,p(e.semver,a.semver,h)?a=e:g(e.semver,s.semver,h)&&(s=e)})),a.operator===m||a.operator===b||(!s.operator||s.operator===m)&&f(e,s.semver))return!1;if(s.operator===b&&g(e,s.semver))return!1}return!0}})),pJ=s(((e,t)=>{var r=hJ();t.exports=(e,t,i)=>r(e,t,">",i)})),fJ=s(((e,t)=>{var r=hJ();t.exports=(e,t,i)=>r(e,t,"<",i)})),gJ=s(((e,t)=>{var r=nJ();t.exports=(e,t,i)=>(e=new r(e,i),t=new r(t,i),e.intersects(t,i))})),mJ=s(((e,t)=>{var r=aJ(),i=FY();t.exports=(e,t,n)=>{let o=[],a=null,s=null,c=e.sort(((e,t)=>i(e,t,n)));for(let e of c)r(e,t,n)?(s=e,a||(a=e)):(s&&o.push([a,s]),s=null,a=null);a&&o.push([a,null]);let l=[];for(let[e,t]of o)e===t?l.push(e):t||e!==c[0]?t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`):l.push("*");let u=l.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return u.length<d.length?u:t}})),bJ=s(((e,t)=>{var r=nJ(),i=oJ(),{ANY:n}=i,o=aJ(),a=FY(),s=[new i(">=0.0.0-0")],c=[new i(">=0.0.0")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===n){if(1===t.length&&t[0].semver===n)return!0;e=r.includePrerelease?s:c}if(1===t.length&&t[0].semver===n){if(r.includePrerelease)return!0;t=c}let i,l,h,p=new Set;for(let t of e)">"===t.operator||">="===t.operator?i=u(i,t,r):"<"===t.operator||"<="===t.operator?l=d(l,t,r):p.add(t.semver);if(p.size>1)return null;if(i&&l){if(h=a(i.semver,l.semver,r),h>0)return null;if(0===h&&(">="!==i.operator||"<="!==l.operator))return null}for(let e of p){if(i&&!o(e,String(i),r)||l&&!o(e,String(l),r))return null;for(let i of t)if(!o(e,String(i),r))return!1;return!0}let f,g,m,b,y=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,w=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;y&&1===y.prerelease.length&&"<"===l.operator&&0===y.prerelease[0]&&(y=!1);for(let e of t){if(b=b||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,i)if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),">"===e.operator||">="===e.operator){if(f=u(i,e,r),f===e&&f!==i)return!1}else if(">="===i.operator&&!o(i.semver,String(e),r))return!1;if(l)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(g=d(l,e,r),g===e&&g!==l)return!1}else if("<="===l.operator&&!o(l.semver,String(e),r))return!1;if(!e.operator&&(l||i)&&0!==h)return!1}return!(i&&m&&!l&&0!==h||l&&b&&!i&&0!==h||w||y)},u=(e,t,r)=>{if(!e)return t;let i=a(e.semver,t.semver,r);return i>0?e:i<0||">"===t.operator&&">="===e.operator?t:e},d=(e,t,r)=>{if(!e)return t;let i=a(e.semver,t.semver,r);return i<0?e:i>0||"<"===t.operator&&"<="===e.operator?t:e};t.exports=(e,t,i={})=>{if(e===t)return!0;e=new r(e,i),t=new r(t,i);let n=!1;e:for(let r of e.set){for(let e of t.set){let t=l(r,e,i);if(n=n||null!==t,t)continue e}if(n)return!1}return!0}})),yJ=s(((e,t)=>{var r=SY(),i=PY(),n=OY(),o=TY(),a=RY(),s=NY(),c=MY(),l=$Y(),u=jY(),d=LY(),h=BY(),p=DY(),f=UY(),g=FY(),m=HY(),b=zY(),y=qY(),w=WY(),v=VY(),_=GY(),x=ZY(),E=KY(),C=YY(),k=JY(),P=QY(),I=XY(),S=eJ(),A=oJ(),T=nJ(),O=aJ(),R=sJ(),N=cJ(),M=lJ(),$=uJ(),j=dJ(),L=hJ(),B=pJ(),D=fJ(),U=gJ(),F=mJ(),H=bJ();t.exports={parse:a,valid:s,clean:c,inc:l,diff:u,major:d,minor:h,patch:p,prerelease:f,compare:g,rcompare:m,compareLoose:b,compareBuild:y,sort:w,rsort:v,gt:_,lt:x,eq:E,neq:C,gte:k,lte:P,cmp:I,coerce:S,Comparator:A,Range:T,satisfies:O,toComparators:R,maxSatisfying:N,minSatisfying:M,minVersion:$,validRange:j,outside:L,gtr:B,ltr:D,intersects:U,simplifyRange:F,subset:H,SemVer:n,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}})),wJ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;var t=yJ(),r=aY(),i=sY();e.VersionStruct=(0,r.refine)((0,r.string)(),"Version",(e=>null!==(0,t.valid)(e)||`Expected SemVer version, got "${e}"`)),e.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",(e=>null!==(0,t.validRange)(e)||`Expected SemVer range, got "${e}"`)),e.isValidSemVerVersion=function(t){return(0,r.is)(t,e.VersionStruct)},e.isValidSemVerRange=function(t){return(0,r.is)(t,e.VersionRangeStruct)},e.assertIsSemVerVersion=function(t){(0,i.assertStruct)(t,e.VersionStruct)},e.assertIsSemVerRange=function(t){(0,i.assertStruct)(t,e.VersionRangeStruct)},e.gtVersion=function(e,r){return(0,t.gt)(e,r)},e.gtRange=function(e,r){return(0,t.gtr)(e,r)},e.satisfiesVersionRange=function(e,r){return(0,t.satisfies)(e,r,{includePrerelease:!0})}})),vJ=s((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var i in e)"default"!==i&&!Object.prototype.hasOwnProperty.call(r,i)&&t(r,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(sY(),e),r(cY(),e),r(uY(),e),r(dY(),e),r(hY(),e),r(pY(),e),r(fY(),e),r(lY(),e),r(gY(),e),r(mY(),e),r(vY(),e),r(_Y(),e),r(xY(),e),r(EY(),e),r(CY(),e),r(kY(),e),r(wJ(),e)})),_J=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createModuleLogger=e.projectLogger=void 0;var t=vJ();Object.defineProperty(e,"createModuleLogger",{enumerable:!0,get:function(){return t.createModuleLogger}}),e.projectLogger=(0,t.createProjectLogger)("eth-block-tracker")})),xJ=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.PollingBlockTracker=void 0;var r=t(rY()),i=t(iY()),n=oY(),o=_J(),a=(0,o.createModuleLogger)(o.projectLogger,"polling-block-tracker"),s=(0,r.default)(),c=class extends n.BaseBlockTracker{constructor(e={}){var t;if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");super(Object.assign(Object.assign({},e),{blockResetDuration:null!==(t=e.blockResetDuration)&&void 0!==t?t:e.pollingInterval})),this._provider=e.provider,this._pollingInterval=e.pollingInterval||2e4,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=void 0===e.keepEventLoopActive||e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var e;this._isRunning;)try{await this._updateLatestBlock();let e=l(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await e}catch(t){let r=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n    ${null!==(e=t.stack)&&void 0!==e?e:t}`);try{this.emit("error",r)}catch{console.error(r)}let i=l(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await i}}async _updateLatestBlock(){let e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){let e={jsonrpc:"2.0",id:s(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0),a("Making request",e);let t=await(0,i.default)((t=>this._provider.sendAsync(e,t)))();if(a("Got response",t),t.error)throw new Error(`PollingBlockTracker - encountered error fetching block:\n    ${t.error.message}`);return t.result}};function l(e,t){return new Promise((r=>{let i=setTimeout(r,e);i.unref&&t&&i.unref()}))}e.PollingBlockTracker=c})),EJ=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.SubscribeBlockTracker=void 0;var r=t(rY()),i=oY(),n=(0,r.default)(),o=class extends i.BaseBlockTracker{constructor(e={}){if(!e.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(e),this._provider=e.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(void 0===this._subscriptionId||null===this._subscriptionId)try{let e=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(e)}catch(e){this.emit("error",e)}}async _end(){if(null!==this._subscriptionId&&void 0!==this._subscriptionId)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(e){this.emit("error",e)}}_call(e,...t){return new Promise(((r,i)=>{this._provider.sendAsync({id:n(),method:e,params:t,jsonrpc:"2.0"},((e,t)=>{e?i(e):r(t.result)}))}))}_handleSubData(e,t){var r;"eth_subscription"===t.method&&(null===(r=t.params)||void 0===r?void 0:r.subscription)===this._subscriptionId&&this._newPotentialLatest(t.params.result.number)}};e.SubscribeBlockTracker=o})),CJ=s((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var i in e)"default"!==i&&!Object.prototype.hasOwnProperty.call(r,i)&&t(r,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(xJ(),e),r(EJ(),e)})),kJ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;var t=4294967295,r=Math.floor(Math.random()*t);e.getUniqueId=function(){return r=(r+1)%t}})),PJ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createIdRemapMiddleware=void 0;var t=kJ();e.createIdRemapMiddleware=function(){return(e,r,i,n)=>{let o=e.id,a=t.getUniqueId();e.id=a,r.id=a,i((t=>{e.id=o,r.id=o,t()}))}}})),IJ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(e){return async(t,r,i,n)=>{let o,a=new Promise((e=>{o=e})),s=null,c=!1,l=async()=>{c=!0,i((e=>{s=e,o()})),await a};try{await e(t,r,l),c?(await a,s(null)):n(null)}catch(e){s?s(e):n(e)}}}})),SJ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(e){return(t,r,i,n)=>{let o=e[t.method];return void 0===o?i():"function"==typeof o?o(t,r,i,n):(r.result=o,n())}}})),AJ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=p();function r(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}var i=class extends t.EventEmitter{emit(e,...t){let i="error"===e,n=this._events;if(void 0!==n)i=i&&void 0===n.error;else if(!i)return!1;if(i){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;let r=new Error("Unhandled error."+(e?` (${e.message})`:""));throw r.context=e,r}let o=n[e];if(void 0===o)return!1;if("function"==typeof o)r(o,this,t);else{let e=o.length,i=function(e){let t=e.length,r=new Array(t);for(let i=0;i<t;i+=1)r[i]=e[i];return r}(o);for(let n=0;n<e;n+=1)r(i[n],this,t)}return!0}};e.default=i})),TJ=s(((e,t)=>{t.exports=s,s.default=s,s.stable=d,s.stableStringify=d;var r="[...]",i="[Circular]",n=[],o=[];function a(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,r,i){var s;typeof i>"u"&&(i=a()),l(e,"",0,[],void 0,0,i);try{s=0===o.length?JSON.stringify(e,t,r):JSON.stringify(e,p(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return s}function c(e,t,r,i){var a=Object.getOwnPropertyDescriptor(i,r);void 0!==a.get?a.configurable?(Object.defineProperty(i,r,{value:e}),n.push([i,r,t,a])):o.push([t,r,e]):(i[r]=e,n.push([i,r,t]))}function l(e,t,n,o,a,s,u){var d;if(s+=1,"object"==typeof e&&null!==e){for(d=0;d<o.length;d++)if(o[d]===e)return void c(i,e,t,a);if(typeof u.depthLimit<"u"&&s>u.depthLimit)return void c(r,e,t,a);if(typeof u.edgesLimit<"u"&&n+1>u.edgesLimit)return void c(r,e,t,a);if(o.push(e),Array.isArray(e))for(d=0;d<e.length;d++)l(e[d],d,d,o,e,s,u);else{var h=Object.keys(e);for(d=0;d<h.length;d++){var p=h[d];l(e[p],p,d,o,e,s,u)}}o.pop()}}function u(e,t){return e<t?-1:e>t?1:0}function d(e,t,r,i){typeof i>"u"&&(i=a());var s,c=h(e,"",0,[],void 0,0,i)||e;try{s=0===o.length?JSON.stringify(c,t,r):JSON.stringify(c,p(t),r)}catch{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 s}function h(e,t,o,a,s,l,d){var p;if(l+=1,"object"==typeof e&&null!==e){for(p=0;p<a.length;p++)if(a[p]===e)return void c(i,e,t,s);try{if("function"==typeof e.toJSON)return}catch{return}if(typeof d.depthLimit<"u"&&l>d.depthLimit)return void c(r,e,t,s);if(typeof d.edgesLimit<"u"&&o+1>d.edgesLimit)return void c(r,e,t,s);if(a.push(e),Array.isArray(e))for(p=0;p<e.length;p++)h(e[p],p,p,a,e,l,d);else{var f={},g=Object.keys(e).sort(u);for(p=0;p<g.length;p++){var m=g[p];h(e[m],m,p,a,e,l,d),f[m]=e[m]}if(!(typeof s<"u"))return f;n.push([s,t,e]),s[t]=f}a.pop()}}function p(e){return e=typeof e<"u"?e:function(e,t){return t},function(t,r){if(o.length>0)for(var i=0;i<o.length;i++){var n=o[i];if(n[1]===t&&n[0]===r){r=n[2],o.splice(i,1);break}}return e.call(this,t,r)}}})),OJ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;var t=TJ(),r=class extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){let e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return t.default(this.serialize(),i,2)}};e.EthereumRpcError=r;function i(e,t){if("[Circular]"!==t)return t}e.EthereumProviderError=class extends r{constructor(e,t,r){if(i=e,!(Number.isInteger(i)&&i>=1e3&&i<=4999))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');var i;super(e,t,r)}}})),RJ=s((e=>{"use strict";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."}}})),NJ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;var t=RJ(),r=OJ(),i=t.errorCodes.rpc.internal,n="Unspecified error message. This is a bug, please report it.",o={code:i,message:a(i)};function a(r,i=n){if(Number.isInteger(r)){let i=r.toString();if(u(t.errorValues,i))return t.errorValues[i].message;if(c(r))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return i}function s(e){if(!Number.isInteger(e))return!1;let r=e.toString();return!(!t.errorValues[r]&&!c(e))}function c(e){return e>=-32099&&e<=-32e3}function l(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=a,e.isValidCode=s,e.serializeError=function(e,{fallbackError:t=o,shouldIncludeStack:i=!1}={}){var n,c;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof r.EthereumRpcError)return e.serialize();let d={};if(e&&"object"==typeof e&&!Array.isArray(e)&&u(e,"code")&&s(e.code)){let t=e;d.code=t.code,t.message&&"string"==typeof t.message?(d.message=t.message,u(t,"data")&&(d.data=t.data)):(d.message=a(d.code),d.data={originalError:l(e)})}else{d.code=t.code;let r=null===(n=e)||void 0===n?void 0:n.message;d.message=r&&"string"==typeof r?r:t.message,d.data={originalError:l(e)}}let h=null===(c=e)||void 0===c?void 0:c.stack;return i&&e&&h&&"string"==typeof h&&(d.stack=h),d}})),MJ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;var t=OJ(),r=NJ(),i=RJ();function n(e,i){let[n,o]=a(i);return new t.EthereumRpcError(e,n||r.getMessageFromCode(e),o)}function o(e,i){let[n,o]=a(i);return new t.EthereumProviderError(e,n||r.getMessageFromCode(e),o)}function a(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){let{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}e.ethErrors={rpc:{parse:e=>n(i.errorCodes.rpc.parse,e),invalidRequest:e=>n(i.errorCodes.rpc.invalidRequest,e),invalidParams:e=>n(i.errorCodes.rpc.invalidParams,e),methodNotFound:e=>n(i.errorCodes.rpc.methodNotFound,e),internal:e=>n(i.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");let{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return n(t,e)},invalidInput:e=>n(i.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>n(i.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>n(i.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>n(i.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>n(i.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>n(i.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>o(i.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>o(i.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>o(i.errorCodes.provider.unsupportedMethod,e),disconnected:e=>o(i.errorCodes.provider.disconnected,e),chainDisconnected:e=>o(i.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");let{code:r,message:i,data:n}=e;if(!i||"string"!=typeof i)throw new Error('"message" must be a nonempty string');return new t.EthereumProviderError(r,i,n)}}}})),$J=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;var t=OJ();Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});var r=NJ();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});var i=MJ();Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return i.ethErrors}});var n=RJ();Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return n.errorCodes}})})),jJ=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.JsonRpcEngine=void 0;var r=t(AJ()),i=$J(),n=class e extends r.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(t,r,i,n)=>{try{let[o,a,s]=await e._runAllMiddleware(t,r,this._middleware);return a?(await e._runReturnHandlers(s),n(o)):i((async t=>{try{await e._runReturnHandlers(s)}catch(e){return t(e)}return t()}))}catch(e){return n(e)}}}async _handleBatch(e,t){try{let r=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise((t=>{this._handle(e,((e,r)=>{t(r)}))}))}async _handle(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){let r=new i.EthereumRpcError(i.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(r,{id:void 0,jsonrpc:"2.0",error:r})}if("string"!=typeof e.method){let r=new i.EthereumRpcError(i.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return t(r,{id:e.id,jsonrpc:"2.0",error:r})}let r=Object.assign({},e),n={id:r.id,jsonrpc:r.jsonrpc},o=null;try{await this._processRequest(r,n)}catch(e){o=e}return o&&(delete n.result,n.error||(n.error=i.serializeError(o))),t(o,n)}async _processRequest(t,r){let[i,n,o]=await e._runAllMiddleware(t,r,this._middleware);if(e._checkForCompletion(t,r,n),await e._runReturnHandlers(o),i)throw i}static async _runAllMiddleware(t,r,i){let n=[],o=null,a=!1;for(let s of i)if([o,a]=await e._runMiddleware(t,r,s,n),a)break;return[o,a,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise((a=>{let s=e=>{let r=e||t.error;r&&(t.error=i.serializeError(r)),a([r,!0])},c=r=>{t.error?s(t.error):(r&&("function"!=typeof r&&s(new i.EthereumRpcError(i.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n    ${o(e)}`,{request:e})),n.push(r)),a([null,!1]))};try{r(e,t,c,s)}catch(e){s(e)}}))}static async _runReturnHandlers(e){for(let t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new i.EthereumRpcError(i.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n    ${o(e)}`,{request:e});if(!r)throw new i.EthereumRpcError(i.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n    ${o(e)}`,{request:e})}};function o(e){return JSON.stringify(e,null,2)}e.JsonRpcEngine=n})),LJ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;var t=jJ();e.mergeMiddleware=function(e){let r=new t.JsonRpcEngine;return e.forEach((e=>r.push(e))),r.asMiddleware()}})),BJ=s((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var i in e)"default"!==i&&!Object.prototype.hasOwnProperty.call(r,i)&&t(r,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(PJ(),e),r(IJ(),e),r(SJ(),e),r(kJ(),e),r(jJ(),e),r(LJ(),e)})),DJ={};function UJ(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}gQ(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function FJ(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r}function HJ(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function zJ(e,t){return function(r,i){t(r,i,e)}}function qJ(e,t,r,i,n,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=i.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?i.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,i.name):{}),h=!1,p=r.length-1;p>=0;p--){var f={};for(var g in i)f[g]="access"===g?{}:i[g];for(var g in i.access)f.access[g]=i.access[g];f.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var m=(0,r[p])("accessor"===c?{get:d.get,set:d.set}:d[l],f);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(s=a(m.get))&&(d.get=s),(s=a(m.set))&&(d.set=s),(s=a(m.init))&&n.unshift(s)}else(s=a(m))&&("field"===c?n.unshift(s):d[l]=s)}u&&Object.defineProperty(u,i.name,d),h=!0}function WJ(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0}function VJ(e){return"symbol"==typeof e?e:"".concat(e)}function GJ(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function ZJ(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function KJ(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(a,s)}c((i=i.apply(e,t||[])).next())}))}function YJ(e,t){var r,i,n,o,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[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(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,i&&(n=2&s[0]?i.return:s[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;switch(i=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){a.label=s[1];break}if(6===s[0]&&a.label<n[1]){a.label=n[1],n=s;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(s);break}n[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],i=0}finally{r=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function JJ(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&bQ(t,e,r)}function QJ(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function XJ(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return a}function eQ(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(XJ(arguments[t]));return e}function tQ(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var i=Array(e),n=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,n++)i[n]=o[a];return i}function rQ(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function iQ(e){return this instanceof iQ?(this.v=e,this):new iQ(e)}function nQ(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,n=r.apply(e,t||[]),o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(e){n[e]&&(i[e]=function(t){return new Promise((function(r,i){o.push([e,t,r,i])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof iQ?Promise.resolve(e.value.v).then(c,l):u(o[0][2],e)}(n[e](t))}catch(e){u(o[0][3],e)}}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function oQ(e){var t,r;return t={},i("next"),i("throw",(function(e){throw e})),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,n){t[i]=e[i]?function(t){return(r=!r)?{value:iQ(e[i](t)),done:!1}:n?n(t):t}:n}}function aQ(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=QJ(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(r){t[r]=e[r]&&function(t){return new Promise((function(i,n){(function(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)})(i,n,(t=e[r](t)).done,t.value)}))}}}function sQ(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function cQ(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&bQ(t,e,r);return yQ(t,e),t}function lQ(e){return e&&e.__esModule?e:{default:e}}function uQ(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)}function dQ(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r}function hQ(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function pQ(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose]}if("function"!=typeof i)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:i,async:r})}else r&&e.stack.push({async:!0});return t}function fQ(e){function t(t){e.error=e.hasError?new wQ(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var i=e.stack.pop();try{var n=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(n).then(r,(function(e){return t(e),r()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}c(DJ,{__addDisposableResource:()=>pQ,__assign:()=>mQ,__asyncDelegator:()=>oQ,__asyncGenerator:()=>nQ,__asyncValues:()=>aQ,__await:()=>iQ,__awaiter:()=>KJ,__classPrivateFieldGet:()=>uQ,__classPrivateFieldIn:()=>hQ,__classPrivateFieldSet:()=>dQ,__createBinding:()=>bQ,__decorate:()=>HJ,__disposeResources:()=>fQ,__esDecorate:()=>qJ,__exportStar:()=>JJ,__extends:()=>UJ,__generator:()=>YJ,__importDefault:()=>lQ,__importStar:()=>cQ,__makeTemplateObject:()=>sQ,__metadata:()=>ZJ,__param:()=>zJ,__propKey:()=>VJ,__read:()=>XJ,__rest:()=>FJ,__runInitializers:()=>WJ,__setFunctionName:()=>GJ,__spread:()=>eQ,__spreadArray:()=>rQ,__spreadArrays:()=>tQ,__values:()=>QJ,default:()=>vQ});var gQ,mQ,bQ,yQ,wQ,vQ,_Q=a((()=>{gQ=function(e,t){return(gQ=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},mQ=function(){return mQ=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},mQ.apply(this,arguments)},bQ=Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]},yQ=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},wQ="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var i=new Error(r);return i.name="SuppressedError",i.error=e,i.suppressed=t,i},vQ={__extends:UJ,__assign:mQ,__rest:FJ,__decorate:HJ,__param:zJ,__metadata:ZJ,__awaiter:KJ,__generator:YJ,__createBinding:bQ,__exportStar:JJ,__values:QJ,__read:XJ,__spread:eQ,__spreadArrays:tQ,__spreadArray:rQ,__await:iQ,__asyncGenerator:nQ,__asyncDelegator:oQ,__asyncValues:aQ,__makeTemplateObject:sQ,__importStar:cQ,__importDefault:lQ,__classPrivateFieldGet:uQ,__classPrivateFieldSet:dQ,__classPrivateFieldIn:hQ,__addDisposableResource:pQ,__disposeResources:fQ}})),xQ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=(_Q(),h(DJ)),r=function(){function e(e){if(this._maxConcurrency=e,this._queue=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}return e.prototype.acquire=function(){var e=this,t=this.isLocked(),r=new Promise((function(t){return e._queue.push(t)}));return t||this._dispatch(),r},e.prototype.runExclusive=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,i,n;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.acquire()];case 1:r=t.sent(),i=r[0],n=r[1],t.label=2;case 2:return t.trys.push([2,,4,5]),[4,e(i)];case 3:return[2,t.sent()];case 4:return n(),[7];case 5:return[2]}}))}))},e.prototype.isLocked=function(){return this._value<=0},e.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var e=this._currentReleaser;this._currentReleaser=void 0,e()}},e.prototype._dispatch=function(){var e=this,t=this._queue.shift();if(t){var r=!1;this._currentReleaser=function(){r||(r=!0,e._value++,e._dispatch())},t([this._value--,this._currentReleaser])}},e}();e.default=r})),EQ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=(_Q(),h(DJ)),r=xQ(),i=function(){function e(){this._semaphore=new r.default(1)}return e.prototype.acquire=function(){return t.__awaiter(this,void 0,void 0,(function(){var e;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this._semaphore.acquire()];case 1:return e=t.sent(),[2,e[1]]}}))}))},e.prototype.runExclusive=function(e){return this._semaphore.runExclusive((function(){return e()}))},e.prototype.isLocked=function(){return this._semaphore.isLocked()},e.prototype.release=function(){this._semaphore.release()},e}();e.default=i})),CQ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withTimeout=void 0;var t=(_Q(),h(DJ));e.withTimeout=function(e,r,i){var n=this;return void 0===i&&(i=new Error("timeout")),{acquire:function(){return new Promise((function(o,a){return t.__awaiter(n,void 0,void 0,(function(){var n,s;return t.__generator(this,(function(t){switch(t.label){case 0:return n=!1,setTimeout((function(){n=!0,a(i)}),r),[4,e.acquire()];case 1:return s=t.sent(),n?(Array.isArray(s)?s[1]:s)():o(s),[2]}}))}))}))},runExclusive:function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,i;return t.__generator(this,(function(t){switch(t.label){case 0:r=function(){},t.label=1;case 1:return t.trys.push([1,,7,8]),[4,this.acquire()];case 2:return i=t.sent(),Array.isArray(i)?(r=i[1],[4,e(i[0])]):[3,4];case 3:return[2,t.sent()];case 4:return r=i,[4,e()];case 5:return[2,t.sent()];case 6:return[3,8];case 7:return r(),[7];case 8:return[2]}}))}))},release:function(){e.release()},isLocked:function(){return e.isLocked()}}}})),kQ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withTimeout=e.Semaphore=e.Mutex=void 0;var t=EQ();Object.defineProperty(e,"Mutex",{enumerable:!0,get:function(){return t.default}});var r=xQ();Object.defineProperty(e,"Semaphore",{enumerable:!0,get:function(){return r.default}});var i=CQ();Object.defineProperty(e,"withTimeout",{enumerable:!0,get:function(){return i.withTimeout}})})),PQ=s(((e,t)=>{t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var i=arguments[t];for(var n in i)r.call(i,n)&&(e[n]=i[n])}return e};var r=Object.prototype.hasOwnProperty})),IQ=s(((e,t)=>{var r=PQ(),i=rY()();function n(e){this.currentProvider=e}function o(e){return function(){var t=[].slice.call(arguments),r=t.pop();this.sendAsync({method:e,params:t},r)}}function a(e,t){return function(){var r=[].slice.call(arguments),i=r.pop();r.length<e&&r.push("latest"),this.sendAsync({method:t,params:r},i)}}t.exports=n,n.prototype.getBalance=a(2,"eth_getBalance"),n.prototype.getCode=a(2,"eth_getCode"),n.prototype.getTransactionCount=a(2,"eth_getTransactionCount"),n.prototype.getStorageAt=a(3,"eth_getStorageAt"),n.prototype.call=a(2,"eth_call"),n.prototype.protocolVersion=o("eth_protocolVersion"),n.prototype.syncing=o("eth_syncing"),n.prototype.coinbase=o("eth_coinbase"),n.prototype.mining=o("eth_mining"),n.prototype.hashrate=o("eth_hashrate"),n.prototype.gasPrice=o("eth_gasPrice"),n.prototype.accounts=o("eth_accounts"),n.prototype.blockNumber=o("eth_blockNumber"),n.prototype.getBlockTransactionCountByHash=o("eth_getBlockTransactionCountByHash"),n.prototype.getBlockTransactionCountByNumber=o("eth_getBlockTransactionCountByNumber"),n.prototype.getUncleCountByBlockHash=o("eth_getUncleCountByBlockHash"),n.prototype.getUncleCountByBlockNumber=o("eth_getUncleCountByBlockNumber"),n.prototype.sign=o("eth_sign"),n.prototype.sendTransaction=o("eth_sendTransaction"),n.prototype.sendRawTransaction=o("eth_sendRawTransaction"),n.prototype.estimateGas=o("eth_estimateGas"),n.prototype.getBlockByHash=o("eth_getBlockByHash"),n.prototype.getBlockByNumber=o("eth_getBlockByNumber"),n.prototype.getTransactionByHash=o("eth_getTransactionByHash"),n.prototype.getTransactionByBlockHashAndIndex=o("eth_getTransactionByBlockHashAndIndex"),n.prototype.getTransactionByBlockNumberAndIndex=o("eth_getTransactionByBlockNumberAndIndex"),n.prototype.getTransactionReceipt=o("eth_getTransactionReceipt"),n.prototype.getUncleByBlockHashAndIndex=o("eth_getUncleByBlockHashAndIndex"),n.prototype.getUncleByBlockNumberAndIndex=o("eth_getUncleByBlockNumberAndIndex"),n.prototype.getCompilers=o("eth_getCompilers"),n.prototype.compileLLL=o("eth_compileLLL"),n.prototype.compileSolidity=o("eth_compileSolidity"),n.prototype.compileSerpent=o("eth_compileSerpent"),n.prototype.newFilter=o("eth_newFilter"),n.prototype.newBlockFilter=o("eth_newBlockFilter"),n.prototype.newPendingTransactionFilter=o("eth_newPendingTransactionFilter"),n.prototype.uninstallFilter=o("eth_uninstallFilter"),n.prototype.getFilterChanges=o("eth_getFilterChanges"),n.prototype.getFilterLogs=o("eth_getFilterLogs"),n.prototype.getLogs=o("eth_getLogs"),n.prototype.getWork=o("eth_getWork"),n.prototype.submitWork=o("eth_submitWork"),n.prototype.submitHashrate=o("eth_submitHashrate"),n.prototype.sendAsync=function(e,t){this.currentProvider.sendAsync(function(e){return r({id:i(),jsonrpc:"2.0",params:[]},e)}(e),(function(e,r){if(!e&&r.error&&(e=new Error("EthQuery - RPC Error - "+r.error.message)),e)return t(e);t(null,r.result)}))}})),SQ=s(((e,t)=>{"use strict";var r=(e,t,r,i)=>function(...n){return new(0,t.promiseModule)(((o,a)=>{t.multiArgs?n.push(((...e)=>{t.errorFirst?e[0]?a(e):(e.shift(),o(e)):o(e)})):t.errorFirst?n.push(((e,t)=>{e?a(e):o(t)})):n.push(o),Reflect.apply(e,this===r?i:this,n)}))},i=new WeakMap;t.exports=(e,t)=>{t={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...t};let n=typeof e;if(null===e||"object"!==n&&"function"!==n)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===e?"null":n}\``);let o=new WeakMap,a=new Proxy(e,{apply(e,i,n){let s=o.get(e);if(s)return Reflect.apply(s,i,n);let c=t.excludeMain?e:r(e,t,a,e);return o.set(e,c),Reflect.apply(c,i,n)},get(e,n){let s=e[n];if(!((e,r)=>{let n=i.get(e);if(n||(n={},i.set(e,n)),r in n)return n[r];let o=e=>"string"==typeof e||"symbol"==typeof r?r===e:e.test(r),a=Reflect.getOwnPropertyDescriptor(e,r),s=void 0===a||a.writable||a.configurable,c=(t.include?t.include.some(o):!t.exclude.some(o))&&s;return n[r]=c,c})(e,n)||s===Function.prototype[n])return s;let c=o.get(s);if(c)return c;if("function"==typeof s){let i=r(s,t,a,e);return o.set(s,i),i}return s}});return a}})),AQ=s(((e,t)=>{var r=nY().default;t.exports=class extends r{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(e){this.updates=this.updates.concat(e),e.forEach((e=>this.emit("update",e)))}addInitialResults(e){}getChangesAndClear(){let e=this.updates;return this.updates=[],e}}})),TQ=s(((e,t)=>{var r=AQ();t.exports=class extends r{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(e){this.allResults=this.allResults.concat(e),super.addResults(e)}addInitialResults(e){this.allResults=this.allResults.concat(e),super.addInitialResults(e)}getAllResults(){return this.allResults}}})),OQ=s(((e,t)=>{function r(e){return e.sort(((e,t)=>"latest"===e||"earliest"===t?1:"latest"===t||"earliest"===e?-1:i(e)-i(t)))}function i(e){return null==e?e:Number.parseInt(e,16)}function n(e){if(null==e)return e;let t=e.toString(16);return t.length%2&&(t="0"+t),"0x"+t}function o(){return Math.floor(16*Math.random()).toString(16)}t.exports={minBlockRef:function(...e){return r(e)[0]},maxBlockRef:function(...e){let t=r(e);return t[t.length-1]},sortBlockRefs:r,bnToHex:function(e){return"0x"+e.toString(16)},blockRefIsNumber:function(e){return e&&!["earliest","latest","pending"].includes(e)},hexToInt:i,incrementHexInt:function(e){if(null==e)return e;return n(i(e)+1)},intToHex:n,unsafeRandomBytes:function(e){let t="0x";for(let r=0;r<e;r++)t+=o(),t+=o();return t}}})),RQ=s(((e,t)=>{var r=IQ(),i=SQ(),n=TQ(),{bnToHex:o,hexToInt:a,incrementHexInt:s,minBlockRef:c,blockRefIsNumber:l}=OQ();t.exports=class extends n{constructor({provider:e,params:t}){super(),this.type="log",this.ethQuery=new r(e),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},t),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map((e=>e.toLowerCase())))}async initialize({currentBlock:e}){let t=this.params.fromBlock;["latest","pending"].includes(t)&&(t=e),"earliest"===t&&(t="0x0"),this.params.fromBlock=t;let r=c(this.params.toBlock,e),i=Object.assign({},this.params,{toBlock:r}),n=await this._fetchLogs(i);this.addInitialResults(n)}async update({oldBlock:e,newBlock:t}){let r,i=t;r=e?s(e):t;let n=Object.assign({},this.params,{fromBlock:r,toBlock:i}),o=(await this._fetchLogs(n)).filter((e=>this.matchLog(e)));this.addResults(o)}async _fetchLogs(e){return await i((t=>this.ethQuery.getLogs(e,t)))()}matchLog(e){if(a(this.params.fromBlock)>=a(e.blockNumber)||l(this.params.toBlock)&&a(this.params.toBlock)<=a(e.blockNumber))return!1;let t=e.address&&e.address.toLowerCase();return!(this.params.address&&t&&!this.params.address.includes(t))&&this.params.topics.every(((t,r)=>{let i=e.topics[r];if(!i)return!1;i=i.toLowerCase();let n=Array.isArray(t)?t:[t];return!!n.includes(null)||(n=n.map((e=>e.toLowerCase())),n.includes(i))}))}}})),NQ=s(((e,t)=>{function r(e){return null==e?e:Number.parseInt(e,16)}function i(e){return null==e?e:"0x"+e.toString(16)}function n(e,t){return new Promise(((r,i)=>{e.sendAsync(t,((e,t)=>{e?i(e):t.error?i(t.error):t.result?r(t.result):i(new Error("Result was empty"))}))}))}t.exports=async function({provider:e,fromBlock:t,toBlock:o}){t||(t=o);let a=r(t),s=r(o)-a+1,c=Array(s).fill().map(((e,t)=>a+t)).map(i),l=await Promise.all(c.map((t=>async function(e,t,r){for(let i=0;i<3;i++)try{return await n(e,{id:1,jsonrpc:"2.0",method:t,params:r})}catch(e){console.error(`provider.sendAsync failed: ${e.stack||e.message||e}`)}return null}(e,"eth_getBlockByNumber",[t,!1]))));return l=l.filter((e=>null!==e)),l}})),MQ=s(((e,t)=>{var r=AQ(),i=NQ(),{incrementHexInt:n}=OQ();t.exports=class extends r{constructor({provider:e,params:t}){super(),this.type="block",this.provider=e}async update({oldBlock:e,newBlock:t}){let r=t,o=n(e),a=(await i({provider:this.provider,fromBlock:o,toBlock:r})).map((e=>e.hash));this.addResults(a)}}})),$Q=s(((e,t)=>{var r=AQ(),i=NQ(),{incrementHexInt:n}=OQ();t.exports=class extends r{constructor({provider:e}){super(),this.type="tx",this.provider=e}async update({oldBlock:e}){let t=e,r=n(e),o=await i({provider:this.provider,fromBlock:r,toBlock:t}),a=[];for(let e of o)a.push(...e.transactions);this.addResults(a)}}})),jQ=s(((e,t)=>{var r=kQ().Mutex,{createAsyncMiddleware:i,createScaffoldMiddleware:n}=BJ(),o=RQ(),a=MQ(),s=$Q(),{intToHex:c,hexToInt:l}=OQ();function u(e){return d((async(...t)=>{let r=await e(...t);return c(r.id)}))}function d(e){return i((async(t,r)=>{let i=await e.apply(null,t.params);r.result=i}))}function h(e,t){let r=[];for(let t in e)r.push(e[t]);return r}t.exports=function({blockTracker:e,provider:t}){let i=0,p={},f=new r,g=function({mutex:e}){return t=>async(r,i,n,o)=>{(await e.acquire())(),t(r,i,n,o)}}({mutex:f}),m=n({eth_newFilter:g(u(y)),eth_newBlockFilter:g(u(w)),eth_newPendingTransactionFilter:g(u(v)),eth_uninstallFilter:g(d(E)),eth_getFilterChanges:g(d(_)),eth_getFilterLogs:g(d(x))}),b=async({oldBlock:e,newBlock:t})=>{if(0===p.length)return;let r=await f.acquire();try{await Promise.all(h(p).map((async r=>{try{await r.update({oldBlock:e,newBlock:t})}catch(e){console.error(e)}})))}catch(e){console.error(e)}r()};return m.newLogFilter=y,m.newBlockFilter=w,m.newPendingTransactionFilter=v,m.uninstallFilter=E,m.getFilterChanges=_,m.getFilterLogs=x,m.destroy=()=>{!async function(){let e=h(p).length;p={},k({prevFilterCount:e,newFilterCount:0})}()},m;async function y(e){let r=new o({provider:t,params:e});await C(r);return r}async function w(){let e=new a({provider:t});await C(e);return e}async function v(){let e=new s({provider:t});await C(e);return e}async function _(e){let t=l(e),r=p[t];if(!r)throw new Error(`No filter for index "${t}"`);return r.getChangesAndClear()}async function x(e){let t=l(e),r=p[t];if(!r)throw new Error(`No filter for index "${t}"`);let i=[];return"log"===r.type&&(i=r.getAllResults()),i}async function E(e){let t=l(e),r=!!p[t];return r&&await async function(e){let t=h(p).length;delete p[e];let r=h(p).length;k({prevFilterCount:t,newFilterCount:r})}(t),r}async function C(t){let r=h(p).length,n=await e.getLatestBlock();return await t.initialize({currentBlock:n}),i++,p[i]=t,t.id=i,t.idHex=c(i),k({prevFilterCount:r,newFilterCount:h(p).length}),i}function k({prevFilterCount:t,newFilterCount:r}){0===t&&r>0?e.on("sync",b):t>0&&0===r&&e.removeListener("sync",b)}}})),LQ=s(((e,t)=>{var r=nY().default,{createAsyncMiddleware:i,createScaffoldMiddleware:n}=BJ(),o=jQ(),{unsafeRandomBytes:a,incrementHexInt:s}=OQ(),c=NQ();function l(e){return null==e?null:{hash:e.hash,parentHash:e.parentHash,sha3Uncles:e.sha3Uncles,miner:e.miner,stateRoot:e.stateRoot,transactionsRoot:e.transactionsRoot,receiptsRoot:e.receiptsRoot,logsBloom:e.logsBloom,difficulty:e.difficulty,number:e.number,gasLimit:e.gasLimit,gasUsed:e.gasUsed,nonce:e.nonce,mixHash:e.mixHash,timestamp:e.timestamp,extraData:e.extraData}}t.exports=function({blockTracker:e,provider:t}){let u={},d=o({blockTracker:e,provider:t}),h=!1,p=new r,f=n({eth_subscribe:i((async function(r,i){if(h)throw new Error("SubscriptionManager - attempting to use after destroying");let n,o=r.params[0],p=a(16);switch(o){case"newHeads":n=f({subId:p});break;case"logs":let e=r.params[1];n=m({subId:p,filter:await d.newLogFilter(e)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${o}"`)}return u[p]=n,void(i.result=p);function f({subId:r}){let i={type:o,destroy:async()=>{e.removeListener("sync",i.update)},update:async({oldBlock:e,newBlock:i})=>{let n=i,o=s(e);(await c({provider:t,fromBlock:o,toBlock:n})).map(l).filter((e=>null!==e)).forEach((e=>{g(r,e)}))}};return e.on("sync",i.update),i}function m({subId:e,filter:t}){return t.on("update",(t=>g(e,t))),{type:o,destroy:async()=>await d.uninstallFilter(t.idHex)}}})),eth_unsubscribe:i((async function(e,t){if(h)throw new Error("SubscriptionManager - attempting to use after destroying");let r=e.params[0],i=u[r];if(!i)return void(t.result=!1);delete u[r],await i.destroy(),t.result=!0}))});return f.destroy=function(){p.removeAllListeners();for(let e in u)u[e].destroy(),delete u[e];h=!0},{events:p,middleware:f};function g(e,t){p.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:e,result:t}})}}})),BQ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionManager=void 0;var t=CJ(),r=LQ(),i=()=>{};e.SubscriptionManager=class{constructor(e){let i=new t.PollingBlockTracker({provider:e,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:o}=r({blockTracker:i,provider:e});this.events=n,this.subscriptionMiddleware=o}async handleRequest(e){let t={};return await this.subscriptionMiddleware(e,t,i,i),t}destroy(){this.subscriptionMiddleware.destroy()}}})),DQ=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=void 0;var r=t(JV()),i=_S(),n=nG(),o=aG(),a=PK(),s=lG(),c=vG(),l=tG(),u=t(eY()),d=cG(),h=tY(),p=BQ(),f="DefaultChainId",g="DefaultJsonRpcUrl",m=class extends i.EventEmitter{constructor(e){var t,r;super(),this._filterPolyfill=new h.FilterPolyfill(this),this._subscriptionManager=new p.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,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._chainIdFromOpts=e.chainId,this._jsonRpcUrlFromOpts=e.jsonRpcUrl,this._overrideIsMetaMask=e.overrideIsMetaMask,this._relayProvider=e.relayProvider,this._storage=e.storage,this._relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=null===(t=e.overrideIsCoinbaseWallet)||void 0===t||t,this.isCoinbaseBrowser=null!==(r=e.overrideIsCoinbaseBrowser)&&void 0!==r&&r,this.qrUrl=e.qrUrl;let i=this.getChainId(),n=(0,o.prepend0x)(i.toString(16));this.emit("connect",{chainIdStr:n});let a=this._storage.getItem(s.LOCAL_STORAGE_ADDRESSES_KEY);if(a){let e=a.split(" ");""!==e[0]&&(this._addresses=e.map((e=>(0,o.ensureAddressString)(e))),this.emit("accountsChanged",e))}this._subscriptionManager.events.on("notification",(e=>{this.emit("message",{type:e.method,data:e.params})})),this._isAuthorized()&&this.initializeRelay(),window.addEventListener("message",(e=>{var t;if(e.origin===location.origin&&e.source===window&&"walletLinkMessage"===e.data.type&&"dappChainSwitched"===e.data.data.action){let r=e.data.data.chainId,i=null!==(t=e.data.data.jsonRpcUrl)&&void 0!==t?t:this.jsonRpcUrl;this.updateProviderInfo(i,Number(r))}}))}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,o.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var e;return null!==(e=this._storage.getItem(g))&&void 0!==e?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(g,e)}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(e,t){this.isCoinbaseBrowser||(this._chainIdFromOpts=t,this._jsonRpcUrlFromOpts=e),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}updateProviderInfo(e,t){this.jsonRpcUrl=e;let r=this.getChainId();this._storage.setItem(f,t.toString(10)),((0,o.ensureIntNumber)(t)!==r||!this.hasMadeFirstChainChangedEmission)&&(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,t,r,i,n,o){let a=await(await this.initializeRelay()).watchAsset(e,t,r,i,n,o?.toString()).promise;return!(0,l.isErrorResponse)(a)&&!!a.result}async addEthereumChain(e,t,r,i,n,a){var s,c;if((0,o.ensureIntNumber)(e)===this.getChainId())return!1;let u=await this.initializeRelay(),d=u.inlineAddEthereumChain(e.toString());!this._isAuthorized()&&!d&&await u.requestEthereumAccounts().promise;let h=await u.addEthereumChain(e.toString(),t,n,r,i,a).promise;return!(0,l.isErrorResponse)(h)&&(!0===(null===(s=h.result)||void 0===s?void 0:s.isApproved)&&this.updateProviderInfo(t[0],e),!0===(null===(c=h.result)||void 0===c?void 0:c.isApproved))}async switchEthereumChain(e){let t=await(await this.initializeRelay()).switchEthereumChain(e.toString(10),this.selectedAddress||void 0).promise;if((0,l.isErrorResponse)(t)){if(!t.errorCode)return;throw t.errorCode===n.standardErrorCodes.provider.unsupportedChain?n.standardErrors.provider.unsupportedChain():n.standardErrors.provider.custom({message:t.errorMessage,code:t.errorCode})}let r=t.result;r.isApproved&&r.rpcUrl.length>0&&this.updateProviderInfo(r.rpcUrl,e)}setAppInfo(e,t){this.initializeRelay().then((r=>r.setAppInfo(e,t)))}async enable(){var e;return null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?c.Session.hash(this._relay.session.id):void 0}),this._isAuthorized()?[...this._addresses]:await this.send("eth_requestAccounts")}async close(){(await this.initializeRelay()).resetAndReload()}send(e,t){try{let r=this._send(e,t);if(r instanceof Promise)return r.catch((t=>{throw(0,n.serializeError)(t,e)}))}catch(t){throw(0,n.serializeError)(t,e)}}_send(e,t){if("string"==typeof e){let r={jsonrpc:"2.0",id:0,method:e,params:Array.isArray(t)?t:void 0!==t?[t]:[]};return this._sendRequestAsync(r).then((e=>e.result))}if("function"==typeof t){let r=e,i=t;return this._sendAsync(r,i)}if(Array.isArray(e))return e.map((e=>this._sendRequest(e)));let r=e;return this._sendRequest(r)}async sendAsync(e,t){try{return this._sendAsync(e,t).catch((t=>{throw(0,n.serializeError)(t,e)}))}catch(t){return Promise.reject((0,n.serializeError)(t,e))}}async _sendAsync(e,t){if("function"!=typeof t)throw new Error("callback is required");if(Array.isArray(e)){let r=t;return void this._sendMultipleRequestsAsync(e).then((e=>r(null,e))).catch((e=>r(e,null)))}let r=t;return this._sendRequestAsync(e).then((e=>r(null,e))).catch((e=>r(e,null)))}async request(e){try{return this._request(e).catch((t=>{throw(0,n.serializeError)(t,e.method)}))}catch(t){return Promise.reject((0,n.serializeError)(t,e.method))}}async _request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw n.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});let{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw n.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(void 0!==r&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw n.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});let i=void 0===r?[]:r,o=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:t,params:i,jsonrpc:"2.0",id:o})).result}async scanQRCode(e){let t=await(await this.initializeRelay()).scanQRCode((0,o.ensureRegExpString)(e)).promise;if((0,l.isErrorResponse)(t))throw(0,n.serializeError)(t.errorMessage,"scanQRCode");if("string"!=typeof t.result)throw(0,n.serializeError)("result was not a string","scanQRCode");return t.result}async genericRequest(e,t){let r=await(await this.initializeRelay()).genericRequest(e,t).promise;if((0,l.isErrorResponse)(r))throw(0,n.serializeError)(r.errorMessage,"generic");if("string"!=typeof r.result)throw(0,n.serializeError)("result was not a string","generic");return r.result}async connectAndSignIn(e){var t;let r;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::connectAndSignIn",sessionIdHash:this._relay?c.Session.hash(this._relay.session.id):void 0});try{let t=await this.initializeRelay();if(!(t instanceof a.MobileRelay))throw new Error("connectAndSignIn is only supported on mobile");if(r=await t.connectAndSignIn(e).promise,(0,l.isErrorResponse)(r))throw new Error(r.errorMessage)}catch(e){throw"string"==typeof e.message&&e.message.match(/(denied|rejected)/i)?n.standardErrors.provider.userRejectedRequest("User denied account authorization"):e}if(!r.result)throw new Error("accounts received is empty");let{accounts:i}=r.result;return this._setAddresses(i),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),r.result}async selectProvider(e){let t=await(await this.initializeRelay()).selectProvider(e).promise;if((0,l.isErrorResponse)(t))throw(0,n.serializeError)(t.errorMessage,"selectProvider");if("string"!=typeof t.result)throw(0,n.serializeError)("result was not a string","selectProvider");return t.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(e){let t={jsonrpc:"2.0",id:e.id},{method:r}=e;if(t.result=this._handleSynchronousMethods(e),void 0===t.result)throw new Error(`Coinbase Wallet does not support calling ${r} synchronously without a callback. Please provide a callback parameter to call ${r} asynchronously.`);return t}_setAddresses(e,t){if(!Array.isArray(e))throw new Error("addresses is not an array");let r=e.map((e=>(0,o.ensureAddressString)(e)));JSON.stringify(r)!==JSON.stringify(this._addresses)&&(this._addresses=r,this.emit("accountsChanged",this._addresses),this._storage.setItem(s.LOCAL_STORAGE_ADDRESSES_KEY,r.join(" ")))}_sendRequestAsync(e){return new Promise(((t,r)=>{try{let i=this._handleSynchronousMethods(e);if(void 0!==i)return t({jsonrpc:"2.0",id:e.id,result:i});let n=this._handleAsynchronousFilterMethods(e);if(void 0!==n)return void n.then((r=>t(Object.assign(Object.assign({},r),{id:e.id})))).catch((e=>r(e)));let o=this._handleSubscriptionMethods(e);if(void 0!==o)return void o.then((r=>t({jsonrpc:"2.0",id:e.id,result:r.result}))).catch((e=>r(e)))}catch(e){return r(e)}this._handleAsynchronousMethods(e).then((r=>r&&t(Object.assign(Object.assign({},r),{id:e.id})))).catch((e=>r(e)))}))}_sendMultipleRequestsAsync(e){return Promise.all(e.map((e=>this._sendRequestAsync(e))))}_handleSynchronousMethods(e){let{method:t}=e,r=e.params||[];switch(t){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"eth_uninstallFilter":return this._eth_uninstallFilter(r);case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){let{method:t}=e,r=e.params||[];switch(t){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(r);case"eth_ecRecover":return this._eth_ecRecover(r);case"personal_sign":return this._personal_sign(r);case"personal_ecRecover":return this._personal_ecRecover(r);case"eth_signTransaction":return this._eth_signTransaction(r);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(r);case"eth_sendTransaction":return this._eth_sendTransaction(r);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(r);case"eth_signTypedData_v2":return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(r);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(r);case"cbWallet_arbitrary":return this._cbwallet_arbitrary(r);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(r);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(r);case"wallet_watchAsset":return this._wallet_watchAsset(r)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(e,this.jsonRpcUrl).catch((t=>{var r;throw(t.code===n.standardErrorCodes.rpc.methodNotFound||t.code===n.standardErrorCodes.rpc.methodNotSupported)&&(null===(r=this.diagnostic)||void 0===r||r.log(d.EVENTS.METHOD_NOT_IMPLEMENTED,{method:e.method,sessionIdHash:this._relay?c.Session.hash(this._relay.session.id):void 0})),t}))}_handleAsynchronousFilterMethods(e){let{method:t}=e,r=e.params||[];switch(t){case"eth_newFilter":return this._eth_newFilter(r);case"eth_newBlockFilter":return this._eth_newBlockFilter();case"eth_newPendingTransactionFilter":return this._eth_newPendingTransactionFilter();case"eth_getFilterChanges":return this._eth_getFilterChanges(r);case"eth_getFilterLogs":return this._eth_getFilterLogs(r)}}_handleSubscriptionMethods(e){switch(e.method){case"eth_subscribe":case"eth_unsubscribe":return this._subscriptionManager.handleRequest(e)}}_isKnownAddress(e){try{let t=(0,o.ensureAddressString)(e);return this._addresses.map((e=>(0,o.ensureAddressString)(e))).includes(t)}catch{}return!1}_ensureKnownAddress(e){var t;if(!this._isKnownAddress(e))throw null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){let t=e.from?(0,o.ensureAddressString)(e.from):this.selectedAddress;if(!t)throw new Error("Ethereum address is unavailable");return this._ensureKnownAddress(t),{fromAddress:t,toAddress:e.to?(0,o.ensureAddressString)(e.to):null,weiValue:null!=e.value?(0,o.ensureBN)(e.value):new r.default(0),data:e.data?(0,o.ensureBuffer)(e.data):Buffer.alloc(0),nonce:null!=e.nonce?(0,o.ensureIntNumber)(e.nonce):null,gasPriceInWei:null!=e.gasPrice?(0,o.ensureBN)(e.gasPrice):null,maxFeePerGas:null!=e.maxFeePerGas?(0,o.ensureBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:null!=e.maxPriorityFeePerGas?(0,o.ensureBN)(e.maxPriorityFeePerGas):null,gasLimit:null!=e.gas?(0,o.ensureBN)(e.gas):null,chainId:e.chainId?(0,o.ensureIntNumber)(e.chainId):this.getChainId()}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw n.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw n.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,t,r,i){this._ensureKnownAddress(t);try{let n=await(await this.initializeRelay()).signEthereumMessage(e,t,r,i).promise;if((0,l.isErrorResponse)(n))throw new Error(n.errorMessage);return{jsonrpc:"2.0",id:0,result:n.result}}catch(e){throw"string"==typeof e.message&&e.message.match(/(denied|rejected)/i)?n.standardErrors.provider.userRejectedRequest("User denied message signature"):e}}async _ethereumAddressFromSignedMessage(e,t,r){let i=await(await this.initializeRelay()).ethereumAddressFromSignedMessage(e,t,r).promise;if((0,l.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,o.hexStringFromIntNumber)(this.getChainId())}getChainId(){let e=this._storage.getItem(f);if(!e)return(0,o.ensureIntNumber)(this._chainIdFromOpts);let t=parseInt(e,10);return(0,o.ensureIntNumber)(t)}async _eth_requestAccounts(){var e;if(null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?c.Session.hash(this._relay.session.id):void 0}),this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let t;try{if(t=await(await this.initializeRelay()).requestEthereumAccounts().promise,(0,l.isErrorResponse)(t))throw new Error(t.errorMessage)}catch(e){throw"string"==typeof e.message&&e.message.match(/(denied|rejected)/i)?n.standardErrors.provider.userRejectedRequest("User denied account authorization"):e}if(!t.result)throw new Error("accounts received is empty");return this._setAddresses(t.result),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();let t=(0,o.ensureAddressString)(e[0]),r=(0,o.ensureBuffer)(e[1]);return this._signEthereumMessage(r,t,!1)}_eth_ecRecover(e){let t=(0,o.ensureBuffer)(e[0]),r=(0,o.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,r,!1)}_personal_sign(e){this._requireAuthorization();let t=(0,o.ensureBuffer)(e[0]),r=(0,o.ensureAddressString)(e[1]);return this._signEthereumMessage(t,r,!0)}_personal_ecRecover(e){let t=(0,o.ensureBuffer)(e[0]),r=(0,o.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,r,!0)}async _eth_signTransaction(e){this._requireAuthorization();let t=this._prepareTransactionParams(e[0]||{});try{let e=await(await this.initializeRelay()).signEthereumTransaction(t).promise;if((0,l.isErrorResponse)(e))throw new Error(e.errorMessage);return{jsonrpc:"2.0",id:0,result:e.result}}catch(e){throw"string"==typeof e.message&&e.message.match(/(denied|rejected)/i)?n.standardErrors.provider.userRejectedRequest("User denied transaction signature"):e}}async _eth_sendRawTransaction(e){let t=(0,o.ensureBuffer)(e[0]),r=await(await this.initializeRelay()).submitEthereumTransaction(t,this.getChainId()).promise;if((0,l.isErrorResponse)(r))throw new Error(r.errorMessage);return{jsonrpc:"2.0",id:0,result:r.result}}async _eth_sendTransaction(e){this._requireAuthorization();let t=this._prepareTransactionParams(e[0]||{});try{let e=await(await this.initializeRelay()).signAndSubmitEthereumTransaction(t).promise;if((0,l.isErrorResponse)(e))throw new Error(e.errorMessage);return{jsonrpc:"2.0",id:0,result:e.result}}catch(e){throw"string"==typeof e.message&&e.message.match(/(denied|rejected)/i)?n.standardErrors.provider.userRejectedRequest("User denied transaction signature"):e}}async _eth_signTypedData_v1(e){this._requireAuthorization();let t=(0,o.ensureParsedJSONObject)(e[0]),r=(0,o.ensureAddressString)(e[1]);this._ensureKnownAddress(r);let i=u.default.hashForSignTypedDataLegacy({data:t}),n=JSON.stringify(t,null,2);return this._signEthereumMessage(i,r,!1,n)}async _eth_signTypedData_v3(e){this._requireAuthorization();let t=(0,o.ensureAddressString)(e[0]),r=(0,o.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);let i=u.default.hashForSignTypedData_v3({data:r}),n=JSON.stringify(r,null,2);return this._signEthereumMessage(i,t,!1,n)}async _eth_signTypedData_v4(e){this._requireAuthorization();let t=(0,o.ensureAddressString)(e[0]),r=(0,o.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);let i=u.default.hashForSignTypedData_v4({data:r}),n=JSON.stringify(r,null,2);return this._signEthereumMessage(i,t,!1,n)}async _cbwallet_arbitrary(e){let t=e[0],r=e[1];if("string"!=typeof r)throw new Error("parameter must be a string");if("object"!=typeof t||null===t)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(t,r)}}async _wallet_addEthereumChain(e){var t,r,i,o;let a=e[0];if(0===(null===(t=a.rpcUrls)||void 0===t?void 0:t.length))return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!a.chainName||""===a.chainName.trim())throw n.standardErrors.rpc.invalidParams("chainName is a required field");if(!a.nativeCurrency)throw n.standardErrors.rpc.invalidParams("nativeCurrency is a required field");let s=parseInt(a.chainId,16);return await this.addEthereumChain(s,null!==(r=a.rpcUrls)&&void 0!==r?r:[],null!==(i=a.blockExplorerUrls)&&void 0!==i?i:[],a.chainName,null!==(o=a.iconUrls)&&void 0!==o?o:[],a.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){let t=e[0];return await this.switchEthereumChain(parseInt(t.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){let t=Array.isArray(e)?e[0]:e;if(!t.type)throw n.standardErrors.rpc.invalidParams("Type is required");if("ERC20"!==t?.type)throw n.standardErrors.rpc.invalidParams(`Asset of type '${t.type}' is not supported`);if(!t?.options)throw n.standardErrors.rpc.invalidParams("Options are required");if(!t?.options.address)throw n.standardErrors.rpc.invalidParams("Address is required");let r=this.getChainId(),{address:i,symbol:o,image:a,decimals:s}=t.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(t.type,i,o,s,a,r)}}_eth_uninstallFilter(e){let t=(0,o.ensureHexString)(e[0]);return this._filterPolyfill.uninstallFilter(t)}async _eth_newFilter(e){let t=e[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(t)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(e){let t=(0,o.ensureHexString)(e[0]);return this._filterPolyfill.getFilterChanges(t)}_eth_getFilterLogs(e){let t=(0,o.ensureHexString)(e[0]);return this._filterPolyfill.getFilterLogs(t)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then((e=>(e.setAccountsCallback(((e,t)=>this._setAddresses(e,t))),e.setChainCallback(((e,t)=>{this.updateProviderInfo(t,parseInt(e,10))})),e.setDappDefaultChainCallback(this._chainIdFromOpts),this._relay=e,e)))}};e.CoinbaseWalletProvider=m})),UQ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RelayEventManager=void 0;var t=aG();e.RelayEventManager=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;let e=this._nextRequestId,r=(0,t.prepend0x)(e.toString(16));return this.callbacks.get(r)&&this.callbacks.delete(r),e}}})),FQ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletSDK=void 0;var t=ZV(),r=KV(),i=aG(),n=sG(),o=DQ(),a=PK(),s=kK(),c=UQ(),l=vK(),u=_K(),d=rG(),h=class e{constructor(t){var o,h,p;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;let f=t.linkAPIUrl||r.LINK_API_URL;typeof t.overrideIsMetaMask>"u"?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=t.overrideIsMetaMask,this._overrideIsCoinbaseWallet=null===(o=t.overrideIsCoinbaseWallet)||void 0===o||o,this._overrideIsCoinbaseBrowser=null!==(h=t.overrideIsCoinbaseBrowser)&&void 0!==h&&h,this._diagnosticLogger=t.diagnosticLogger,this._reloadOnDisconnect=null===(p=t.reloadOnDisconnect)||void 0===p||p;let g=new URL(f),m=`${g.protocol}//${g.host}`;if(this._storage=new n.ScopedLocalStorage(`-walletlink:${m}`),this._storage.setItem("version",e.VERSION),this.walletExtension||this.coinbaseBrowser)return;this._relayEventManager=new c.RelayEventManager;let b=(0,i.isMobileWeb)(),y=t.uiConstructor||(e=>b?new s.MobileRelayUI(e):new l.WalletLinkRelayUI(e)),w={linkAPIUrl:f,version:d.LIB_VERSION,darkMode:!!t.darkMode,uiConstructor:y,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect,enableMobileWalletLink:t.enableMobileWalletLink};this._relay=b?new a.MobileRelay(w):new u.WalletLinkRelay(w),this.setAppInfo(t.appName,t.appLogoUrl),!t.headlessMode&&this._relay.attachUI()}makeWeb3Provider(e="",t=1){let r=this.walletExtension;if(r)return this.isCipherProvider(r)||r.setProviderInfo(e,t),!1===this._reloadOnDisconnect&&"function"==typeof r.disableReloadOnDisconnect&&r.disableReloadOnDisconnect(),r;let i=this.coinbaseBrowser;if(i)return i;let n=this._relay;if(!n||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||n.setConnectDisabled(!0),new o.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(n),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:t,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(e,t){var r;this._appName=e||"DApp",this._appLogoUrl=t||(0,i.getFavicon)();let n=this.walletExtension;n?this.isCipherProvider(n)||n.setAppInfo(this._appName,this._appLogoUrl):null===(r=this._relay)||void 0===r||r.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var e;let t=null==this?void 0:this.walletExtension;t?t.close():null===(e=this._relay)||void 0===e||e.resetAndReload()}getQrUrl(){var e,t;return null!==(t=null===(e=this._relay)||void 0===e?void 0:e.getQRCodeUrl())&&void 0!==t?t:null}getCoinbaseWalletLogo(e,r=240){return(0,t.walletLogo)(e,r)}get walletExtension(){var e;return null!==(e=window.coinbaseWalletExtension)&&void 0!==e?e:window.walletLinkExtension}get coinbaseBrowser(){var e,t;try{let r=null!==(e=window.ethereum)&&void 0!==e?e:null===(t=window.top)||void 0===t?void 0:t.ethereum;return r&&"isCoinbaseBrowser"in r&&r.isCoinbaseBrowser?r:void 0}catch{return}}isCipherProvider(e){return"boolean"==typeof e.isCipher&&e.isCipher}};e.CoinbaseWalletSDK=h,h.VERSION=d.LIB_VERSION})),HQ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=e.CoinbaseWalletSDK=void 0;var t=FQ(),r=DQ(),i=FQ();Object.defineProperty(e,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return i.CoinbaseWalletSDK}});var n=DQ();Object.defineProperty(e,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return n.CoinbaseWalletProvider}}),e.default=t.CoinbaseWalletSDK,typeof window<"u"&&(window.CoinbaseWalletSDK=t.CoinbaseWalletSDK,window.CoinbaseWalletProvider=r.CoinbaseWalletProvider,window.WalletLink=t.CoinbaseWalletSDK,window.WalletLinkProvider=r.CoinbaseWalletProvider)})),zQ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLowerCase=void 0,e.getLowerCase=function(e){return e&&e.toLowerCase()}})),qQ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppProvider=void 0;var t=p(),r=zQ(),i=class extends t.EventEmitter{constructor(e,t){super(),this.submittedTxs=new Map,this.safe=e,this.sdk=t}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(e){let{method:t,params:i=[]}=e;switch(t){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return`0x${this.chainId.toString(16)}`;case"personal_sign":{let[e,t]=i;if(this.safe.safeAddress.toLowerCase()!==t.toLowerCase())throw new Error("The address or message hash is invalid");let r=await this.sdk.txs.signMessage(e);return("signature"in r?r.signature:void 0)||"0x"}case"eth_sign":{let[e,t]=i;if(this.safe.safeAddress.toLowerCase()!==e.toLowerCase()||!t.startsWith("0x"))throw new Error("The address or message hash is invalid");let r=await this.sdk.txs.signMessage(t);return("signature"in r?r.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{let[e,t]=i,r="string"==typeof t?JSON.parse(t):t;if(this.safe.safeAddress.toLowerCase()!==e.toLowerCase())throw new Error("The address is invalid");let n=await this.sdk.txs.signTypedMessage(r);return("signature"in n?n.signature:void 0)||"0x"}case"eth_sendTransaction":let t=Object.assign(Object.assign({},i[0]),{value:i[0].value||"0",data:i[0].data||"0x"});"string"==typeof t.gas&&t.gas.startsWith("0x")&&(t.gas=parseInt(t.gas,16));let n=await this.sdk.txs.send({txs:[t],params:{safeTxGas:t.gas}});return this.submittedTxs.set(n.safeTxHash,{from:this.safe.safeAddress,hash:n.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:t.data,value:t.value,to:t.to,blockHash:null,blockNumber:null,transactionIndex:null}),n.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,r.getLowerCase)(i[0]),i[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,r.getLowerCase)(i[0]),i[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,r.getLowerCase)(i[0]),i[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,r.getLowerCase)(i[0]),i[1],i[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([i[0],i[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([i[0],i[1]]);case"eth_getTransactionByHash":let o=i[0];try{o=(await this.sdk.txs.getBySafeTxHash(o)).txHash||o}catch{}return this.submittedTxs.has(o)?this.submittedTxs.get(o):this.sdk.eth.getTransactionByHash([o]).then((e=>(e&&(e.hash=i[0]),e)));case"eth_getTransactionReceipt":{let e=i[0];try{e=(await this.sdk.txs.getBySafeTxHash(e)).txHash||e}catch{}return this.sdk.eth.getTransactionReceipt([e]).then((e=>(e&&(e.transactionHash=i[0]),e)))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(i[0]);case"eth_call":return this.sdk.eth.call([i[0],i[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([i[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(i[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([i[0]]);default:throw Error(`"${e.method}" not implemented`)}}send(e,t){e||t("Undefined request"),this.request(e).then((r=>t(null,{jsonrpc:"2.0",id:e.id,result:r}))).catch((e=>t(e,null)))}};e.SafeAppProvider=i})),WQ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppProvider=void 0;var t=qQ();Object.defineProperty(e,"SafeAppProvider",{enumerable:!0,get:function(){return t.SafeAppProvider}})})),VQ=s(((e,t)=>{t.exports={name:"@safe-global/safe-apps-sdk",version:"8.1.0",description:"SDK developed to integrate third-party apps with Safe app.",main:"dist/src/index.js",typings:"dist/src/index.d.ts",_files:["dist/**/*","src/**/*","CHANGELOG.md","README.md"],sideEffects:!1,keywords:["Safe","sdk","apps"],scripts:{test:"jest","format-dist":"sed -i '' 's/\"files\":/\"_files\":/' dist/package.json",build:"yarn rimraf dist && tsc && yarn format-dist"},author:"Safe (https://safe.global)",license:"MIT",dependencies:{"@safe-global/safe-gateway-typescript-sdk":"^3.5.3",viem:"^1.0.0"},repository:{type:"git",url:"git+https://github.com/safe-global/safe-apps-sdk.git"},bugs:{url:"https://github.com/safe-global/safe-apps-sdk/issues"},homepage:"https://github.com/safe-global/safe-apps-sdk#readme",publishConfig:{access:"public"}}})),GQ=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getSDKVersion=void 0;var r=t(VQ());e.getSDKVersion=()=>r.default.version.split("-")[0]})),ZQ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateRequestId=void 0;var t=e=>e.toString(16).padStart(2,"0");e.generateRequestId=()=>typeof window<"u"?(e=>{let r=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(r),Array.from(r,t).join("")})(10):(new Date).getTime().toString(36)})),KQ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageFormatter=void 0;var t=GQ(),r=ZQ(),i=class{};e.MessageFormatter=i,i.makeRequest=(e,i)=>({id:(0,r.generateRequestId)(),method:e,params:i,env:{sdkVersion:(0,t.getSDKVersion)()}}),i.makeResponse=(e,t,r)=>({id:e,success:!0,version:r,data:t}),i.makeErrorResponse=(e,t,r)=>({id:e,success:!1,error:t,version:r})})),YQ=s((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.RestrictedMethods=e.Methods=void 0,(t=e.Methods||(e.Methods={})).sendTransactions="sendTransactions",t.rpcCall="rpcCall",t.getChainInfo="getChainInfo",t.getSafeInfo="getSafeInfo",t.getTxBySafeTxHash="getTxBySafeTxHash",t.getSafeBalances="getSafeBalances",t.signMessage="signMessage",t.signTypedMessage="signTypedMessage",t.getEnvironmentInfo="getEnvironmentInfo",t.getOffChainSignature="getOffChainSignature",t.requestAddressBook="requestAddressBook",t.wallet_getPermissions="wallet_getPermissions",t.wallet_requestPermissions="wallet_requestPermissions",function(e){e.requestAddressBook="requestAddressBook"}(e.RestrictedMethods||(e.RestrictedMethods={}))})),JQ=s((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var i in e)"default"!==i&&!Object.prototype.hasOwnProperty.call(r,i)&&t(r,e,i)};Object.defineProperty(e,"__esModule",{value:!0});var i=KQ();e.default=class{constructor(e=null,t=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:e,data:t,source:r})=>{let i=!t,n=!this.isServer&&r===window.parent,o=(typeof t.version<"u"&&parseInt(t.version.split(".")[0]))>=1,a=!0;return Array.isArray(this.allowedOrigins)&&(a=void 0!==this.allowedOrigins.find((t=>t.test(e)))),!i&&n&&o&&a},this.logIncomingMessage=e=>{console.info(`Safe Apps SDK v1: A message was received from origin ${e.origin}. `,e.data)},this.onParentMessage=e=>{this.isValidMessage(e)&&(this.debugMode&&this.logIncomingMessage(e),this.handleIncomingMessage(e.data))},this.handleIncomingMessage=e=>{let{id:t}=e,r=this.callbacks.get(t);r&&(r(e),this.callbacks.delete(t))},this.send=(e,t)=>{let r=i.MessageFormatter.makeRequest(e,t);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(r,"*"),new Promise(((e,t)=>{this.callbacks.set(r.id,(r=>{r.success?e(r):t(new Error(r.error))}))}))},this.allowedOrigins=e,this.debugMode=t,this.isServer||window.addEventListener("message",this.onParentMessage)}},r(YQ(),e)})),QQ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isObjectEIP712TypedData=void 0;e.isObjectEIP712TypedData=e=>"object"==typeof e&&null!=e&&"domain"in e&&"types"in e&&"message"in e})),XQ=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),eX=s((e=>{"use strict";var t=e&&e.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(a,s)}c((i=i.apply(e,t||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.fetchData=e.stringifyQuery=e.insertParams=void 0;var r=e=>"object"==typeof e&&null!==e&&"code"in e&&"message"in e;function i(e){return t(this,void 0,void 0,(function*(){let t;try{t=204===e.status?{}:yield e.json()}catch{if(e.headers&&"0"!==e.headers.get("content-length"))throw new Error(`Invalid response content: ${e.statusText}`)}if(!e.ok){let i=r(t)?`${t.code}: ${t.message}`:e.statusText;throw new Error(i)}return t}))}e.insertParams=function(e,t){return t?Object.keys(t).reduce(((e,r)=>function(e,t,r){return e.replace(new RegExp(`\\{${t}\\}`,"g"),r)}(e,r,String(t[r]))),e):e},e.stringifyQuery=function(e){if(!e)return"";let t=new URLSearchParams;Object.keys(e).forEach((r=>{null!=e[r]&&t.append(r,String(e[r]))}));let r=t.toString();return r?`?${r}`:""},e.fetchData=function(e,r,n,o){return t(this,void 0,void 0,(function*(){let t=Object.assign({"Content-Type":"application/json"},o),a={method:r??"POST",headers:t};return null!=n&&(a.body="string"==typeof n?n:JSON.stringify(n)),i(yield fetch(e,a))}))},e.getData=function(e,r){return t(this,void 0,void 0,(function*(){let t={method:"GET"};return r&&(t.headers=Object.assign(Object.assign({},r),{"Content-Type":"application/json"})),i(yield fetch(e,t))}))}})),tX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEndpoint=e.deleteEndpoint=e.putEndpoint=e.postEndpoint=void 0;var t=eX();function r(e,r,i,n){return`${e}${(0,t.insertParams)(r,i)}${(0,t.stringifyQuery)(n)}`}e.postEndpoint=function(e,i,n){let o=r(e,i,n?.path,n?.query);return(0,t.fetchData)(o,"POST",n?.body,n?.headers)},e.putEndpoint=function(e,i,n){let o=r(e,i,n?.path,n?.query);return(0,t.fetchData)(o,"PUT",n?.body,n?.headers)},e.deleteEndpoint=function(e,i,n){let o=r(e,i,n?.path,n?.query);return(0,t.fetchData)(o,"DELETE",n?.body,n?.headers)},e.getEndpoint=function(e,i,n,o){if(o)return(0,t.getData)(o);let a=r(e,i,n?.path,n?.query);return(0,t.getData)(a,n?.headers)}})),rX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_BASE_URL=void 0,e.DEFAULT_BASE_URL="https://safe-client.safe.global"})),iX=s((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationVersionState=void 0,(t=e.ImplementationVersionState||(e.ImplementationVersionState={})).UP_TO_DATE="UP_TO_DATE",t.OUTDATED="OUTDATED",t.UNKNOWN="UNKNOWN"})),nX=s((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppSocialPlatforms=e.SafeAppFeatures=e.SafeAppAccessPolicyTypes=void 0,(t=e.SafeAppAccessPolicyTypes||(e.SafeAppAccessPolicyTypes={})).NoRestrictions="NO_RESTRICTIONS",t.DomainAllowlist="DOMAIN_ALLOWLIST",function(e){e.BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS"}(e.SafeAppFeatures||(e.SafeAppFeatures={})),function(e){e.TWITTER="TWITTER",e.GITHUB="GITHUB",e.DISCORD="DISCORD"}(e.SafeAppSocialPlatforms||(e.SafeAppSocialPlatforms={}))})),oX=s((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.LabelValue=e.DetailedExecutionInfoType=e.TransactionListItemType=e.ConflictType=e.TransactionInfoType=e.SettingsInfoType=e.TransactionTokenType=e.TransferDirection=e.TransactionStatus=e.Operation=void 0,(t=e.Operation||(e.Operation={}))[t.CALL=0]="CALL",t[t.DELEGATE=1]="DELEGATE",function(e){e.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",e.AWAITING_EXECUTION="AWAITING_EXECUTION",e.CANCELLED="CANCELLED",e.FAILED="FAILED",e.SUCCESS="SUCCESS"}(e.TransactionStatus||(e.TransactionStatus={})),function(e){e.INCOMING="INCOMING",e.OUTGOING="OUTGOING",e.UNKNOWN="UNKNOWN"}(e.TransferDirection||(e.TransferDirection={})),function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_COIN="NATIVE_COIN"}(e.TransactionTokenType||(e.TransactionTokenType={})),function(e){e.SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",e.ADD_OWNER="ADD_OWNER",e.REMOVE_OWNER="REMOVE_OWNER",e.SWAP_OWNER="SWAP_OWNER",e.CHANGE_THRESHOLD="CHANGE_THRESHOLD",e.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",e.ENABLE_MODULE="ENABLE_MODULE",e.DISABLE_MODULE="DISABLE_MODULE",e.SET_GUARD="SET_GUARD",e.DELETE_GUARD="DELETE_GUARD"}(e.SettingsInfoType||(e.SettingsInfoType={})),function(e){e.TRANSFER="Transfer",e.SETTINGS_CHANGE="SettingsChange",e.CUSTOM="Custom",e.CREATION="Creation",e.SWAP_ORDER="SwapOrder"}(e.TransactionInfoType||(e.TransactionInfoType={})),function(e){e.NONE="None",e.HAS_NEXT="HasNext",e.END="End"}(e.ConflictType||(e.ConflictType={})),function(e){e.TRANSACTION="TRANSACTION",e.LABEL="LABEL",e.CONFLICT_HEADER="CONFLICT_HEADER",e.DATE_LABEL="DATE_LABEL"}(e.TransactionListItemType||(e.TransactionListItemType={})),function(e){e.MULTISIG="MULTISIG",e.MODULE="MODULE"}(e.DetailedExecutionInfoType||(e.DetailedExecutionInfoType={})),function(e){e.Queued="Queued",e.Next="Next"}(e.LabelValue||(e.LabelValue={}))})),aX=s((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.FEATURES=e.GAS_PRICE_TYPE=e.RPC_AUTHENTICATION=void 0,(t=e.RPC_AUTHENTICATION||(e.RPC_AUTHENTICATION={})).API_KEY_PATH="API_KEY_PATH",t.NO_AUTHENTICATION="NO_AUTHENTICATION",t.UNKNOWN="UNKNOWN",function(e){e.ORACLE="ORACLE",e.FIXED="FIXED",e.FIXED_1559="FIXED1559",e.UNKNOWN="UNKNOWN"}(e.GAS_PRICE_TYPE||(e.GAS_PRICE_TYPE={})),function(e){e.ERC721="ERC721",e.SAFE_APPS="SAFE_APPS",e.CONTRACT_INTERACTION="CONTRACT_INTERACTION",e.DOMAIN_LOOKUP="DOMAIN_LOOKUP",e.SPENDING_LIMIT="SPENDING_LIMIT",e.EIP1559="EIP1559",e.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",e.TX_SIMULATION="TX_SIMULATION",e.EIP1271="EIP1271"}(e.FEATURES||(e.FEATURES={}))})),sX=s((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TokenType=void 0,(t=e.TokenType||(e.TokenType={})).ERC20="ERC20",t.ERC721="ERC721",t.NATIVE_TOKEN="NATIVE_TOKEN"})),cX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),lX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),uX=s((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SafeMessageStatus=e.SafeMessageListItemType=void 0,(t=e.SafeMessageListItemType||(e.SafeMessageListItemType={})).DATE_LABEL="DATE_LABEL",t.MESSAGE="MESSAGE",function(e){e.NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",e.CONFIRMED="CONFIRMED"}(e.SafeMessageStatus||(e.SafeMessageStatus={}))})),dX=s((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceType=void 0,(t=e.DeviceType||(e.DeviceType={})).ANDROID="ANDROID",t.IOS="IOS",t.WEB="WEB"})),hX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),pX=s((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var i in e)"default"!==i&&!Object.prototype.hasOwnProperty.call(r,i)&&t(r,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),e.getContract=e.getSafeOverviews=e.unsubscribeAll=e.unsubscribeSingle=e.registerRecoveryModule=e.deleteRegisteredEmail=e.getRegisteredEmail=e.verifyEmail=e.resendEmailVerificationCode=e.changeEmail=e.registerEmail=e.unregisterDevice=e.unregisterSafe=e.registerDevice=e.getDelegates=e.confirmSafeMessage=e.proposeSafeMessage=e.getSafeMessage=e.getSafeMessages=e.getDecodedData=e.getMasterCopies=e.getSafeApps=e.getChainConfig=e.getChainsConfig=e.getConfirmationView=e.proposeTransaction=e.fetchNonces=e.postSafeGasEstimation=e.deleteTransaction=e.getTransactionDetails=e.getTransactionQueue=e.getTransactionHistory=e.getCollectiblesPage=e.getCollectibles=e.getAllOwnedSafes=e.getOwnedSafes=e.getFiatCurrencies=e.getBalances=e.getMultisigTransactions=e.getModuleTransactions=e.getIncomingTransfers=e.getSafeInfo=e.getRelayCount=e.relayTransaction=e.setBaseUrl=void 0;var i=tX(),n=rX();r(iX(),e),r(nX(),e),r(oX(),e),r(aX(),e),r(sX(),e),r(cX(),e),r(lX(),e),r(uX(),e),r(dX(),e),r(hX(),e);var o=n.DEFAULT_BASE_URL;e.setBaseUrl=e=>{o=e},e.relayTransaction=function(e,t){return(0,i.postEndpoint)(o,"/v1/chains/{chainId}/relay",{path:{chainId:e},body:t})},e.getRelayCount=function(e,t){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/relay/{address}",{path:{chainId:e,address:t}})},e.getSafeInfo=function(e,t){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:e,address:t}})},e.getIncomingTransfers=function(e,t,r,n){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:e,address:t},query:r},n)},e.getModuleTransactions=function(e,t,r,n){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:e,address:t},query:r},n)},e.getMultisigTransactions=function(e,t,r,n){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:e,address:t},query:r},n)},e.getBalances=function(e,t,r="usd",n={}){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:e,address:t,currency:r},query:n})},e.getFiatCurrencies=function(){return(0,i.getEndpoint)(o,"/v1/balances/supported-fiat-codes")},e.getOwnedSafes=function(e,t){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:e,address:t}})},e.getAllOwnedSafes=function(e){return(0,i.getEndpoint)(o,"/v1/owners/{address}/safes",{path:{address:e}})},e.getCollectibles=function(e,t,r={}){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:r})},e.getCollectiblesPage=function(e,t,r={},n){return(0,i.getEndpoint)(o,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:r},n)},e.getTransactionHistory=function(e,t,r={},n){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:e,safe_address:t},query:r},n)},e.getTransactionQueue=function(e,t,r={},n){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:e,safe_address:t},query:r},n)},e.getTransactionDetails=function(e,t){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:e,transactionId:t}})},e.deleteTransaction=function(e,t,r){return(0,i.deleteEndpoint)(o,"/v1/chains/{chainId}/transactions/{safeTxHash}",{path:{chainId:e,safeTxHash:t},body:{signature:r}})},e.postSafeGasEstimation=function(e,t,r){return(0,i.postEndpoint)(o,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:e,safe_address:t},body:r})},e.fetchNonces=function(e,t){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/nonces",{path:{chainId:e,safe_address:t}})},e.proposeTransaction=function(e,t,r){return(0,i.postEndpoint)(o,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:e,safe_address:t},body:r})},e.getConfirmationView=function(e,t,r,n){return(0,i.postEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/views/transaction-confirmation",{path:{chainId:e,safe_address:t},body:{data:r,to:n}})},e.getChainsConfig=function(e){return(0,i.getEndpoint)(o,"/v1/chains",{query:e})},e.getChainConfig=function(e){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}",{path:{chainId:e}})},e.getSafeApps=function(e,t={}){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/safe-apps",{path:{chainId:e},query:t})},e.getMasterCopies=function(e){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:e}})},e.getDecodedData=function(e,t,r){return(0,i.postEndpoint)(o,"/v1/chains/{chainId}/data-decoder",{path:{chainId:e},body:{data:t,to:r}})},e.getSafeMessages=function(e,t,r){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},query:{}},r)},e.getSafeMessage=function(e,t){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:e,message_hash:t}})},e.proposeSafeMessage=function(e,t,r){return(0,i.postEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},body:r})},e.confirmSafeMessage=function(e,t,r){return(0,i.postEndpoint)(o,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:e,message_hash:t},body:r})},e.getDelegates=function(e,t={}){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/delegates",{path:{chainId:e},query:t})},e.registerDevice=function(e){return(0,i.postEndpoint)(o,"/v1/register/notifications",{body:e})},e.unregisterSafe=function(e,t,r){return(0,i.deleteEndpoint)(o,"/v1/chains/{chainId}/notifications/devices/{uuid}/safes/{safe_address}",{path:{chainId:e,safe_address:t,uuid:r}})},e.unregisterDevice=function(e,t){return(0,i.deleteEndpoint)(o,"/v1/chains/{chainId}/notifications/devices/{uuid}",{path:{chainId:e,uuid:t}})},e.registerEmail=function(e,t,r,n){return(0,i.postEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/emails",{path:{chainId:e,safe_address:t},body:r,headers:n})},e.changeEmail=function(e,t,r,n,a){return(0,i.putEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:e,safe_address:t,signer:r},body:n,headers:a})},e.resendEmailVerificationCode=function(e,t,r){return(0,i.postEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify-resend",{path:{chainId:e,safe_address:t,signer:r},body:""})},e.verifyEmail=function(e,t,r,n){return(0,i.putEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify",{path:{chainId:e,safe_address:t,signer:r},body:n})},e.getRegisteredEmail=function(e,t,r,n){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:e,safe_address:t,signer:r},headers:n})},e.deleteRegisteredEmail=function(e,t,r,n){return(0,i.deleteEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:e,safe_address:t,signer:r},headers:n})},e.registerRecoveryModule=function(e,t,r){return(0,i.postEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/recovery",{path:{chainId:e,safe_address:t},body:r})},e.unsubscribeSingle=function(e){return(0,i.deleteEndpoint)(o,"/v1/subscriptions",{query:e})},e.unsubscribeAll=function(e){return(0,i.deleteEndpoint)(o,"/v1/subscriptions/all",{query:e})},e.getSafeOverviews=function(e,t){return(0,i.getEndpoint)(o,"/v1/safes",{query:Object.assign(Object.assign({},t),{safes:e.join(",")})})},e.getContract=function(e,t){return(0,i.getEndpoint)(o,"/v1/chains/{chainId}/contracts/{contractAddress}",{path:{chainId:e,contractAddress:t}})}})),fX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TransferDirection=e.TransactionStatus=e.TokenType=e.Operation=void 0;var t=pX();Object.defineProperty(e,"Operation",{enumerable:!0,get:function(){return t.Operation}}),Object.defineProperty(e,"TokenType",{enumerable:!0,get:function(){return t.TokenType}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return t.TransactionStatus}}),Object.defineProperty(e,"TransferDirection",{enumerable:!0,get:function(){return t.TransferDirection}})})),gX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});YQ()})),mX=s((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var i in e)"default"!==i&&!Object.prototype.hasOwnProperty.call(r,i)&&t(r,e,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(QQ(),e),r(XQ(),e),r(fX(),e),r(gX(),e)})),bX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TXs=void 0;var t=YQ(),r=mX();e.TXs=class{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(t.Methods.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){let r={message:e};return(await this.communicator.send(t.Methods.signMessage,r)).data}async signTypedMessage(e){if(!(0,r.isObjectEIP712TypedData)(e))throw new Error("Invalid typed data");return(await this.communicator.send(t.Methods.signTypedMessage,{typedData:e})).data}async send({txs:e,params:r}){if(!e||!e.length)throw new Error("No transactions were passed");let i={txs:e,params:r};return(await this.communicator.send(t.Methods.sendTransactions,i)).data}}})),yX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RPC_CALLS=void 0,e.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"}})),wX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Eth=void 0;var t=yX(),r=YQ(),i={defaultBlockParam:(e="latest")=>e,returnFullTxObjectParam:(e=!1)=>e,blockNumberToHex:e=>Number.isInteger(e)?`0x${e.toString(16)}`:e};e.Eth=class{constructor(e){this.communicator=e,this.call=this.buildRequest({call:t.RPC_CALLS.eth_call,formatters:[null,i.defaultBlockParam]}),this.getBalance=this.buildRequest({call:t.RPC_CALLS.eth_getBalance,formatters:[null,i.defaultBlockParam]}),this.getCode=this.buildRequest({call:t.RPC_CALLS.eth_getCode,formatters:[null,i.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:t.RPC_CALLS.eth_getStorageAt,formatters:[null,i.blockNumberToHex,i.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:t.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:t.RPC_CALLS.eth_getBlockByHash,formatters:[null,i.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:t.RPC_CALLS.eth_getBlockByNumber,formatters:[i.blockNumberToHex,i.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:t.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:t.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:t.RPC_CALLS.eth_getTransactionCount,formatters:[null,i.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:t.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=e=>this.buildRequest({call:t.RPC_CALLS.eth_estimateGas})([e]),this.setSafeSettings=this.buildRequest({call:t.RPC_CALLS.safe_setSettings})}buildRequest(e){let{call:t,formatters:i}=e;return async e=>{i&&Array.isArray(e)&&i.forEach(((t,r)=>{t&&(e[r]=t(e[r]))}));let n={call:t,params:e||[]};return(await this.communicator.send(r.Methods.rpcCall,n)).data}}}})),vX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.version=void 0,e.version="0.9.8"})),_X=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseError=void 0;var t=vX(),r=class e extends Error{constructor(r,i={}){let n=i.cause instanceof e?i.cause.details:i.cause?.message?i.cause.message:i.details,o=i.cause instanceof e&&i.cause.docsPath||i.docsPath;super([r||"An error occurred.","",...i.metaMessages?[...i.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${t.version}`].join("\n    ")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),i.cause&&(this.cause=i.cause),this.details=n,this.docsPath=o,this.metaMessages=i.metaMessages,this.shortMessage=r}};e.BaseError=r})),xX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.narrow=void 0,e.narrow=function(e){return e}})),EX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTupleRegex=e.integerRegex=e.bytesRegex=e.execTyped=void 0,e.execTyped=function(e,t){return e.exec(t)?.groups},e.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,e.integerRegex=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,e.isTupleRegex=/^\(.+?\).*?$/})),CX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatAbiParameter=void 0;var t=EX(),r=/^tuple(?<array>(\[(\d*)\])*)$/;e.formatAbiParameter=function e(i){let n=i.type;if(r.test(i.type)&&"components"in i){n="(";let o=i.components.length;for(let t=0;t<o;t++){n+=e(i.components[t]),t<o-1&&(n+=", ")}let a=(0,t.execTyped)(r,i.type);return n+=`)${a?.array??""}`,e({...i,type:n})}return"indexed"in i&&i.indexed&&(n=`${n} indexed`),i.name?`${n} ${i.name}`:n}})),kX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatAbiParameters=void 0;var t=CX();e.formatAbiParameters=function(e){let r="",i=e.length;for(let n=0;n<i;n++){let o=e[n];r+=(0,t.formatAbiParameter)(o),n!==i-1&&(r+=", ")}return r}})),PX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatAbiItem=void 0;var t=kX();e.formatAbiItem=function(e){return"function"===e.type?`function ${e.name}(${(0,t.formatAbiParameters)(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs.length?` returns (${(0,t.formatAbiParameters)(e.outputs)})`:""}`:"event"===e.type?`event ${e.name}(${(0,t.formatAbiParameters)(e.inputs)})`:"error"===e.type?`error ${e.name}(${(0,t.formatAbiParameters)(e.inputs)})`:"constructor"===e.type?`constructor(${(0,t.formatAbiParameters)(e.inputs)})${"payable"===e.stateMutability?" payable":""}`:"fallback"===e.type?"fallback()":"receive() external payable"}})),IX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatAbi=void 0;var t=PX();e.formatAbi=function(e){let r=[],i=e.length;for(let n=0;n<i;n++){let i=e[n],o=(0,t.formatAbiItem)(i);r.push(o)}return r}})),SX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.functionModifiers=e.eventModifiers=e.modifiers=e.isReceiveSignature=e.isFallbackSignature=e.execConstructorSignature=e.isConstructorSignature=e.execStructSignature=e.isStructSignature=e.execFunctionSignature=e.isFunctionSignature=e.execEventSignature=e.isEventSignature=e.execErrorSignature=e.isErrorSignature=void 0;var t=EX(),r=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;e.isErrorSignature=function(e){return r.test(e)},e.execErrorSignature=function(e){return(0,t.execTyped)(r,e)};var i=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;e.isEventSignature=function(e){return i.test(e)},e.execEventSignature=function(e){return(0,t.execTyped)(i,e)};var n=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;e.isFunctionSignature=function(e){return n.test(e)},e.execFunctionSignature=function(e){return(0,t.execTyped)(n,e)};var o=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;e.isStructSignature=function(e){return o.test(e)},e.execStructSignature=function(e){return(0,t.execTyped)(o,e)};var a=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;e.isConstructorSignature=function(e){return a.test(e)},e.execConstructorSignature=function(e){return(0,t.execTyped)(a,e)};var s=/^fallback\(\)$/;e.isFallbackSignature=function(e){return s.test(e)};var c=/^receive\(\) external payable$/;e.isReceiveSignature=function(e){return c.test(e)},e.modifiers=new Set(["memory","indexed","storage","calldata"]),e.eventModifiers=new Set(["indexed"]),e.functionModifiers=new Set(["calldata","memory","storage"])})),AX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnknownSolidityTypeError=e.UnknownTypeError=e.InvalidAbiItemError=void 0;var t=_X(),r=class extends t.BaseError{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}};e.InvalidAbiItemError=r;var i=class extends t.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}};e.UnknownTypeError=i;var n=class extends t.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}};e.UnknownSolidityTypeError=n})),TX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidAbiTypeParameterError=e.InvalidFunctionModifierError=e.InvalidModifierError=e.SolidityProtectedKeywordError=e.InvalidParameterError=e.InvalidAbiParametersError=e.InvalidAbiParameterError=void 0;var t=_X(),r=class extends t.BaseError{constructor({param:e}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}};e.InvalidAbiParameterError=r;var i=class extends t.BaseError{constructor({params:e}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:"/api/human.html#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}};e.InvalidAbiParametersError=i;var n=class extends t.BaseError{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}};e.InvalidParameterError=n;var o=class extends t.BaseError{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}};e.SolidityProtectedKeywordError=o;var a=class extends t.BaseError{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}};e.InvalidModifierError=a;var s=class extends t.BaseError{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}};e.InvalidFunctionModifierError=s;var c=class extends t.BaseError{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}};e.InvalidAbiTypeParameterError=c})),OX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidStructSignatureError=e.UnknownSignatureError=e.InvalidSignatureError=void 0;var t=_X(),r=class extends t.BaseError{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}};e.InvalidSignatureError=r;var i=class extends t.BaseError{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}};e.UnknownSignatureError=i;var n=class extends t.BaseError{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}};e.InvalidStructSignatureError=n})),RX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CircularReferenceError=void 0;var t=_X(),r=class extends t.BaseError{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}};e.CircularReferenceError=r})),NX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidParenthesisError=void 0;var t=_X(),r=class extends t.BaseError{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}};e.InvalidParenthesisError=r})),MX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parameterCache=e.getParameterCacheKey=void 0,e.getParameterCacheKey=function(e,t){return t?`${t}:${e}`:e},e.parameterCache=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]])})),$X=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isValidDataLocation=e.isSolidityKeyword=e.isSolidityType=e.splitParameters=e.parseAbiParameter=e.parseSignature=void 0;var t=EX(),r=AX(),i=TX(),n=OX(),o=NX(),a=MX(),s=SX();e.parseSignature=function(e,t={}){if((0,s.isFunctionSignature)(e)){let r=(0,s.execFunctionSignature)(e);if(!r)throw new n.InvalidSignatureError({signature:e,type:"function"});let i=h(r.parameters),o=[],a=i.length;for(let e=0;e<a;e++)o.push(d(i[e],{modifiers:s.functionModifiers,structs:t,type:"function"}));let c=[];if(r.returns){let e=h(r.returns),i=e.length;for(let r=0;r<i;r++)c.push(d(e[r],{modifiers:s.functionModifiers,structs:t,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:o,outputs:c}}if((0,s.isEventSignature)(e)){let r=(0,s.execEventSignature)(e);if(!r)throw new n.InvalidSignatureError({signature:e,type:"event"});let i=h(r.parameters),o=[],a=i.length;for(let e=0;e<a;e++)o.push(d(i[e],{modifiers:s.eventModifiers,structs:t,type:"event"}));return{name:r.name,type:"event",inputs:o}}if((0,s.isErrorSignature)(e)){let r=(0,s.execErrorSignature)(e);if(!r)throw new n.InvalidSignatureError({signature:e,type:"error"});let i=h(r.parameters),o=[],a=i.length;for(let e=0;e<a;e++)o.push(d(i[e],{structs:t,type:"error"}));return{name:r.name,type:"error",inputs:o}}if((0,s.isConstructorSignature)(e)){let r=(0,s.execConstructorSignature)(e);if(!r)throw new n.InvalidSignatureError({signature:e,type:"constructor"});let i=h(r.parameters),o=[],a=i.length;for(let e=0;e<a;e++)o.push(d(i[e],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:o}}if((0,s.isFallbackSignature)(e))return{type:"fallback"};if((0,s.isReceiveSignature)(e))return{type:"receive",stateMutability:"payable"};throw new n.UnknownSignatureError({signature:e})};var c=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,l=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,u=/^u?int$/;function d(e,n){let o=(0,a.getParameterCacheKey)(e,n?.type);if(a.parameterCache.has(o))return a.parameterCache.get(o);let f=t.isTupleRegex.test(e),b=(0,t.execTyped)(f?l:c,e);if(!b)throw new i.InvalidParameterError({param:e});if(b.name&&g(b.name))throw new i.SolidityProtectedKeywordError({param:e,name:b.name});let y,w=b.name?{name:b.name}:{},v="indexed"===b.modifier?{indexed:!0}:{},_=n?.structs??{},x={};if(f){y="tuple";let e=h(b.type),t=[],r=e.length;for(let i=0;i<r;i++)t.push(d(e[i],{structs:_}));x={components:t}}else if(b.type in _)y="tuple",x={components:_[b.type]};else if(u.test(b.type))y=`${b.type}256`;else if(y=b.type,"struct"!==n?.type&&!p(y))throw new r.UnknownSolidityTypeError({type:y});if(b.modifier){if(!n?.modifiers?.has?.(b.modifier))throw new i.InvalidModifierError({param:e,type:n?.type,modifier:b.modifier});if(s.functionModifiers.has(b.modifier)&&!m(y,!!b.array))throw new i.InvalidFunctionModifierError({param:e,type:n?.type,modifier:b.modifier})}let E={type:`${y}${b.array??""}`,...w,...v,...x};return a.parameterCache.set(o,E),E}function h(e,t=[],r="",i=0){if(""===e){if(""===r)return t;if(0!==i)throw new o.InvalidParenthesisError({current:r,depth:i});return t.push(r.trim()),t}let n=e.length;for(let o=0;o<n;o++){let n=e[o],a=e.slice(o+1);switch(n){case",":return 0===i?h(a,[...t,r.trim()]):h(a,t,`${r}${n}`,i);case"(":return h(a,t,`${r}${n}`,i+1);case")":return h(a,t,`${r}${n}`,i-1);default:return h(a,t,`${r}${n}`,i)}}return[]}function p(e){return"address"===e||"bool"===e||"function"===e||"string"===e||t.bytesRegex.test(e)||t.integerRegex.test(e)}e.parseAbiParameter=d,e.splitParameters=h,e.isSolidityType=p;var f=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function g(e){return"address"===e||"bool"===e||"function"===e||"string"===e||"tuple"===e||t.bytesRegex.test(e)||t.integerRegex.test(e)||f.test(e)}function m(e,t){return t||"bytes"===e||"string"===e||"tuple"===e}e.isSolidityKeyword=g,e.isValidDataLocation=m})),jX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseStructs=void 0;var t=EX(),r=AX(),i=TX(),n=OX(),o=RX(),a=SX(),s=$X();e.parseStructs=function(e){let t={},r=e.length;for(let i=0;i<r;i++){let r=e[i];if(!(0,a.isStructSignature)(r))continue;let o=(0,a.execStructSignature)(r);if(!o)throw new n.InvalidSignatureError({signature:r,type:"struct"});let c=o.properties.split(";"),l=[],u=c.length;for(let e=0;e<u;e++){let t=c[e].trim();if(!t)continue;let r=(0,s.parseAbiParameter)(t,{type:"struct"});l.push(r)}if(!l.length)throw new n.InvalidStructSignatureError({signature:r});t[o.name]=l}let i={},o=Object.entries(t),c=o.length;for(let e=0;e<c;e++){let[r,n]=o[e];i[r]=l(n,t)}return i};var c=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function l(e,n,a=new Set){let u=[],d=e.length;for(let h=0;h<d;h++){let d=e[h];if(t.isTupleRegex.test(d.type))u.push(d);else{let e=(0,t.execTyped)(c,d.type);if(!e?.type)throw new i.InvalidAbiTypeParameterError({abiParameter:d});let{array:h,type:p}=e;if(p in n){if(a.has(p))throw new o.CircularReferenceError({type:p});u.push({...d,type:`tuple${h??""}`,components:l(n[p]??[],n,new Set([...a,p]))})}else{if(!(0,s.isSolidityType)(p))throw new r.UnknownTypeError({type:p});u.push(d)}}}return u}})),LX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseAbi=void 0;var t=SX(),r=jX(),i=$X();e.parseAbi=function(e){let n=(0,r.parseStructs)(e),o=[],a=e.length;for(let r=0;r<a;r++){let a=e[r];(0,t.isStructSignature)(a)||o.push((0,i.parseSignature)(a,n))}return o}})),BX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseAbiItem=void 0;var t=FX(),r=SX(),i=jX(),n=$X();e.parseAbiItem=function(e){let o;if("string"==typeof e)o=(0,n.parseSignature)(e);else{let t=(0,i.parseStructs)(e),a=e.length;for(let i=0;i<a;i++){let a=e[i];if(!(0,r.isStructSignature)(a)){o=(0,n.parseSignature)(a,t);break}}}if(!o)throw new t.InvalidAbiItemError({signature:e});return o}})),DX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseAbiParameter=void 0;var t=FX(),r=SX(),i=jX(),n=$X();e.parseAbiParameter=function(e){let o;if("string"==typeof e)o=(0,n.parseAbiParameter)(e,{modifiers:r.modifiers});else{let t=(0,i.parseStructs)(e),a=e.length;for(let i=0;i<a;i++){let a=e[i];if(!(0,r.isStructSignature)(a)){o=(0,n.parseAbiParameter)(a,{modifiers:r.modifiers,structs:t});break}}}if(!o)throw new t.InvalidAbiParameterError({param:e});return o}})),UX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseAbiParameters=void 0;var t=FX(),r=SX(),i=jX(),n=$X(),o=$X();e.parseAbiParameters=function(e){let a=[];if("string"==typeof e){let t=(0,n.splitParameters)(e),i=t.length;for(let e=0;e<i;e++)a.push((0,o.parseAbiParameter)(t[e],{modifiers:r.modifiers}))}else{let t=(0,i.parseStructs)(e),s=e.length;for(let i=0;i<s;i++){let s=e[i];if((0,r.isStructSignature)(s))continue;let c=(0,n.splitParameters)(s),l=c.length;for(let e=0;e<l;e++)a.push((0,o.parseAbiParameter)(c[e],{modifiers:r.modifiers,structs:t}))}}if(0===a.length)throw new t.InvalidAbiParametersError({params:e});return a}})),FX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CircularReferenceError=e.InvalidParenthesisError=e.UnknownSignatureError=e.InvalidSignatureError=e.InvalidStructSignatureError=e.InvalidAbiParameterError=e.InvalidAbiParametersError=e.InvalidParameterError=e.SolidityProtectedKeywordError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.UnknownSolidityTypeError=e.InvalidAbiItemError=e.UnknownTypeError=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.formatAbiParameters=e.formatAbiParameter=e.formatAbiItem=e.formatAbi=e.narrow=e.BaseError=void 0;var t=_X();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return t.BaseError}});var r=xX();Object.defineProperty(e,"narrow",{enumerable:!0,get:function(){return r.narrow}});var i=IX();Object.defineProperty(e,"formatAbi",{enumerable:!0,get:function(){return i.formatAbi}});var n=PX();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return n.formatAbiItem}});var o=CX();Object.defineProperty(e,"formatAbiParameter",{enumerable:!0,get:function(){return o.formatAbiParameter}});var a=kX();Object.defineProperty(e,"formatAbiParameters",{enumerable:!0,get:function(){return a.formatAbiParameters}});var s=LX();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return s.parseAbi}});var c=BX();Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return c.parseAbiItem}});var l=DX();Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return l.parseAbiParameter}});var u=UX();Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return u.parseAbiParameters}});var d=AX();Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return d.UnknownTypeError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return d.InvalidAbiItemError}}),Object.defineProperty(e,"UnknownSolidityTypeError",{enumerable:!0,get:function(){return d.UnknownSolidityTypeError}});var h=TX();Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return h.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return h.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return h.InvalidModifierError}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return h.SolidityProtectedKeywordError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return h.InvalidParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return h.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return h.InvalidAbiParameterError}});var p=OX();Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return p.InvalidStructSignatureError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return p.InvalidSignatureError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return p.UnknownSignatureError}});var f=NX();Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return f.InvalidParenthesisError}});var g=RX();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return g.CircularReferenceError}})})),HX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAction=void 0,e.getAction=function(e,t,r){return i=>e[t.name||r]?.(i)??t(e,i)}})),zX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatAbiParams=e.formatAbiItem=void 0;var t=KX();function r(e,{includeName:t=!1}={}){return e?e.map((e=>function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${r(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t}))).join(t?", ":","):""}e.formatAbiItem=function(e,{includeName:i=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new t.InvalidDefinitionTypeError(e.type);return`${e.name}(${r(e.inputs,{includeName:i})})`},e.formatAbiParams=r})),qX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isHex=void 0,e.isHex=function(e,{strict:t=!0}={}){return!(!e||"string"!=typeof e)&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}})),WX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.size=void 0;var t=qX();e.size=function(e){return(0,t.isHex)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}})),VX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.version=void 0,e.version="1.21.3"})),GX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getVersion=e.getUrl=e.getContractAddress=void 0;var t=VX();e.getContractAddress=e=>e;e.getUrl=e=>e;e.getVersion=()=>`viem@${t.version}`})),ZX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseError=void 0;var t=GX(),r=class e extends Error{constructor(r,i={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:(0,t.getVersion)()});let n=i.cause instanceof e?i.cause.details:i.cause?.message?i.cause.message:i.details,o=i.cause instanceof e&&i.cause.docsPath||i.docsPath;this.message=[r||"An error occurred.","",...i.metaMessages?[...i.metaMessages,""]:[],...o?[`Docs: https://viem.sh${o}.html${i.docsSlug?`#${i.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join("\n    "),i.cause&&(this.cause=i.cause),this.details=n,this.docsPath=o,this.metaMessages=i.metaMessages,this.shortMessage=r}walk(e){return i(this,e)}};function i(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e?i(e.cause,t):t?null:e}e.BaseError=r})),KX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnsupportedPackedAbiType=e.InvalidDefinitionTypeError=e.InvalidArrayError=e.InvalidAbiDecodingTypeError=e.InvalidAbiEncodingTypeError=e.DecodeLogTopicsMismatch=e.DecodeLogDataMismatch=e.BytesSizeMismatchError=e.AbiItemAmbiguityError=e.AbiFunctionSignatureNotFoundError=e.AbiFunctionOutputsNotFoundError=e.AbiFunctionNotFoundError=e.AbiEventNotFoundError=e.AbiEventSignatureNotFoundError=e.AbiEventSignatureEmptyTopicsError=e.AbiErrorSignatureNotFoundError=e.AbiErrorNotFoundError=e.AbiErrorInputsNotFoundError=e.AbiEncodingLengthMismatchError=e.AbiEncodingBytesSizeMismatchError=e.AbiEncodingArrayLengthMismatchError=e.AbiDecodingZeroDataError=e.AbiDecodingDataSizeTooSmallError=e.AbiDecodingDataSizeInvalidError=e.AbiConstructorParamsNotFoundError=e.AbiConstructorNotFoundError=void 0;var t=zX(),r=WX(),i=ZX(),n=class extends i.BaseError{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join("\n    "),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}};e.AbiConstructorNotFoundError=n;var o=class extends i.BaseError{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join("\n    "),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}};e.AbiConstructorParamsNotFoundError=o;var a=class extends i.BaseError{constructor({data:e,size:t}){super([`Data size of ${t} bytes is invalid.`,"Size must be in increments of 32 bytes (size % 32 === 0)."].join("\n    "),{metaMessages:[`Data: ${e} (${t} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeInvalidError"})}};e.AbiDecodingDataSizeInvalidError=a;var s=class extends i.BaseError{constructor({data:e,params:r,size:i}){super([`Data size of ${i} bytes is too small for given parameters.`].join("\n    "),{metaMessages:[`Params: (${(0,t.formatAbiParams)(r,{includeName:!0})})`,`Data:   ${e} (${i} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=r,this.size=i}};e.AbiDecodingDataSizeTooSmallError=s;var c=class extends i.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}};e.AbiDecodingZeroDataError=c;var l=class extends i.BaseError{constructor({expectedLength:e,givenLength:t,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n    ")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}};e.AbiEncodingArrayLengthMismatchError=l;var u=class extends i.BaseError{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,r.size)(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}};e.AbiEncodingBytesSizeMismatchError=u;var d=class extends i.BaseError{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n    ")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}};e.AbiEncodingLengthMismatchError=d;var h=class extends i.BaseError{constructor(e,{docsPath:t}){super([`Arguments (\`args\`) were provided to "${e}", but "${e}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join("\n    "),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorInputsNotFoundError"})}};e.AbiErrorInputsNotFoundError=h;var p=class extends i.BaseError{constructor(e,{docsPath:t}={}){super([`Error ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join("\n    "),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorNotFoundError"})}};e.AbiErrorNotFoundError=p;var f=class extends i.BaseError{constructor(e,{docsPath:t}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n    "),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}};e.AbiErrorSignatureNotFoundError=f;var g=class extends i.BaseError{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}};e.AbiEventSignatureEmptyTopicsError=g;var m=class extends i.BaseError{constructor(e,{docsPath:t}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n    "),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}};e.AbiEventSignatureNotFoundError=m;var b=class extends i.BaseError{constructor(e,{docsPath:t}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join("\n    "),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}};e.AbiEventNotFoundError=b;var y=class extends i.BaseError{constructor(e,{docsPath:t}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n    "),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}};e.AbiFunctionNotFoundError=y;var w=class extends i.BaseError{constructor(e,{docsPath:t}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join("\n    "),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}};e.AbiFunctionOutputsNotFoundError=w;var v=class extends i.BaseError{constructor(e,{docsPath:t}){super([`Encoded function signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n    "),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionSignatureNotFoundError"})}};e.AbiFunctionSignatureNotFoundError=v;var _=class extends i.BaseError{constructor(e,r){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,t.formatAbiItem)(e.abiItem)}\`, and`,`\`${r.type}\` in \`${(0,t.formatAbiItem)(r.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItemAmbiguityError"})}};e.AbiItemAmbiguityError=_;var x=class extends i.BaseError{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}};e.BytesSizeMismatchError=x;var E=class extends i.BaseError{constructor({abiItem:e,data:r,params:i,size:n}){super([`Data size of ${n} bytes is too small for non-indexed event parameters.`].join("\n    "),{metaMessages:[`Params: (${(0,t.formatAbiParams)(i,{includeName:!0})})`,`Data:   ${r} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=r,this.params=i,this.size=n}};e.DecodeLogDataMismatch=E;var C=class extends i.BaseError{constructor({abiItem:e,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${(0,t.formatAbiItem)(e,{includeName:!0})}".`].join("\n    ")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}};e.DecodeLogTopicsMismatch=C;var k=class extends i.BaseError{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n    "),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}};e.InvalidAbiEncodingTypeError=k;var P=class extends i.BaseError{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join("\n    "),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}};e.InvalidAbiDecodingTypeError=P;var I=class extends i.BaseError{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n    ")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}};e.InvalidArrayError=I;var S=class extends i.BaseError{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n    ")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}};e.InvalidDefinitionTypeError=S;var A=class extends i.BaseError{constructor(e){super(`Type "${e}" is not supported for packed encoding.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedPackedAbiType"})}};e.UnsupportedPackedAbiType=A})),YX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FilterTypeNotSupportedError=void 0;var t=ZX(),r=class extends t.BaseError{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}};e.FilterTypeNotSupportedError=r})),JX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SizeExceedsPaddingSizeError=e.SliceOffsetOutOfBoundsError=void 0;var t=ZX(),r=class extends t.BaseError{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}};e.SliceOffsetOutOfBoundsError=r;var i=class extends t.BaseError{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}};e.SizeExceedsPaddingSizeError=i})),QX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.padBytes=e.padHex=e.pad=void 0;var t=JX();function r(e,{dir:r,size:i=32}={}){if(null===i)return e;let n=e.replace("0x","");if(n.length>2*i)throw new t.SizeExceedsPaddingSizeError({size:Math.ceil(n.length/2),targetSize:i,type:"hex"});return`0x${n["right"===r?"padEnd":"padStart"](2*i,"0")}`}function i(e,{dir:r,size:i=32}={}){if(null===i)return e;if(e.length>i)throw new t.SizeExceedsPaddingSizeError({size:e.length,targetSize:i,type:"bytes"});let n=new Uint8Array(i);for(let t=0;t<i;t++){let o="right"===r;n[o?t:i-t-1]=e[o?t:e.length-t-1]}return n}e.pad=function(e,{dir:t,size:n=32}={}){return"string"==typeof e?r(e,{dir:t,size:n}):i(e,{dir:t,size:n})},e.padHex=r,e.padBytes=i})),XX=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SizeOverflowError=e.OffsetOutOfBoundsError=e.InvalidHexValueError=e.InvalidHexBooleanError=e.InvalidBytesBooleanError=e.IntegerOutOfRangeError=e.DataLengthTooShortError=e.DataLengthTooLongError=void 0;var t=ZX(),r=class extends t.BaseError{constructor({consumed:e,length:t}){super(`Consumed bytes (${e}) is shorter than data length (${t-1}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DataLengthTooLongError"})}};e.DataLengthTooLongError=r;var i=class extends t.BaseError{constructor({length:e,dataLength:t}){super(`Data length (${t-1}) is shorter than consumed bytes length (${e-1}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DataLengthTooShortError"})}};e.DataLengthTooShortError=i;var n=class extends t.BaseError{constructor({max:e,min:t,signed:r,size:i,value:n}){super(`Number "${n}" is not in safe ${i?`${8*i}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}};e.IntegerOutOfRangeError=n;var o=class extends t.BaseError{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesBooleanError"})}};e.InvalidBytesBooleanError=o;var a=class extends t.BaseError{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}};e.InvalidHexBooleanError=a;var s=class extends t.BaseError{constructor(e){super(`Hex value "${e}" is an odd length (${e.length}). It must be an even length.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexValueError"})}};e.InvalidHexValueError=s;var c=class extends t.BaseError{constructor({nextOffset:e,offset:t}){super(`Next offset (${e}) is greater than previous offset + consumed bytes (${t})`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffsetOutOfBoundsError"})}};e.OffsetOutOfBoundsError=c;var l=class extends t.BaseError{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}};e.SizeOverflowError=l})),e0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.trim=void 0,e.trim=function(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,i=0;for(let e=0;e<r.length-1&&"0"===r["left"===t?e:r.length-e-1].toString();e++)i++;return r="left"===t?r.slice(i):r.slice(0,r.length-i),"string"==typeof e?(1===r.length&&"right"===t&&(r=`${r}0`),`0x${r.length%2==1?`0${r}`:r}`):r}})),t0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hexToString=e.hexToNumber=e.hexToBool=e.hexToBigInt=e.fromHex=e.assertSize=void 0;var t=XX(),r=WX(),i=e0(),n=i0();function o(e,{size:i}){if((0,r.size)(e)>i)throw new t.SizeOverflowError({givenSize:(0,r.size)(e),maxSize:i})}function a(e,t={}){let{signed:r}=t;t.size&&o(e,{size:t.size});let i=BigInt(e);if(!r)return i;let n=(e.length-2)/2;return i<=(1n<<8n*BigInt(n)-1n)-1n?i:i-BigInt(`0x${"f".padStart(2*n,"f")}`)-1n}function s(e,r={}){let n=e;if(r.size&&(o(n,{size:r.size}),n=(0,i.trim)(n)),"0x00"===(0,i.trim)(n))return!1;if("0x01"===(0,i.trim)(n))return!0;throw new t.InvalidHexBooleanError(n)}function c(e,t={}){return Number(a(e,t))}function l(e,t={}){let r=(0,n.hexToBytes)(e);return t.size&&(o(r,{size:t.size}),r=(0,i.trim)(r,{dir:"right"})),(new TextDecoder).decode(r)}e.assertSize=o,e.fromHex=function(e,t){let r="string"==typeof t?{to:t}:t,i=r.to;return"number"===i?c(e,r):"bigint"===i?a(e,r):"string"===i?l(e,r):"boolean"===i?s(e,r):(0,n.hexToBytes)(e,r)},e.hexToBigInt=a,e.hexToBool=s,e.hexToNumber=c,e.hexToString=l})),r0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stringToHex=e.numberToHex=e.bytesToHex=e.boolToHex=e.toHex=void 0;var t=XX(),r=QX(),i=t0(),n=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function o(e,t={}){let n=`0x${Number(e)}`;return"number"==typeof t.size?((0,i.assertSize)(n,{size:t.size}),(0,r.pad)(n,{size:t.size})):n}function a(e,t={}){let o="";for(let t=0;t<e.length;t++)o+=n[e[t]];let a=`0x${o}`;return"number"==typeof t.size?((0,i.assertSize)(a,{size:t.size}),(0,r.pad)(a,{dir:"right",size:t.size})):a}function s(e,i={}){let n,{signed:o,size:a}=i,s=BigInt(e);a?n=o?(1n<<8n*BigInt(a)-1n)-1n:2n**(8n*BigInt(a))-1n:"number"==typeof e&&(n=BigInt(Number.MAX_SAFE_INTEGER));let c="bigint"==typeof n&&o?-n-1n:0;if(n&&s>n||s<c){let r="bigint"==typeof e?"n":"";throw new t.IntegerOutOfRangeError({max:n?`${n}${r}`:void 0,min:`${c}${r}`,signed:o,size:a,value:`${e}${r}`})}let l=`0x${(o&&s<0?(1n<<BigInt(8*a))+BigInt(s):s).toString(16)}`;return a?(0,r.pad)(l,{size:a}):l}e.toHex=function(e,t={}){return"number"==typeof e||"bigint"==typeof e?s(e,t):"string"==typeof e?l(e,t):"boolean"==typeof e?o(e,t):a(e,t)},e.boolToHex=o,e.bytesToHex=a,e.numberToHex=s;var c=new TextEncoder;function l(e,t={}){return a(c.encode(e),t)}e.stringToHex=l})),i0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stringToBytes=e.numberToBytes=e.hexToBytes=e.boolToBytes=e.toBytes=void 0;var t=ZX(),r=qX(),i=QX(),n=t0(),o=r0(),a=new TextEncoder;function s(e,t={}){let r=new Uint8Array(1);return r[0]=Number(e),"number"==typeof t.size?((0,n.assertSize)(r,{size:t.size}),(0,i.pad)(r,{size:t.size})):r}e.toBytes=function(e,t={}){return"number"==typeof e||"bigint"==typeof e?d(e,t):"boolean"==typeof e?s(e,t):(0,r.isHex)(e)?u(e,t):h(e,t)},e.boolToBytes=s;var c={zero:48,nine:57,A:65,F:70,a:97,f:102};function l(e){return e>=c.zero&&e<=c.nine?e-c.zero:e>=c.A&&e<=c.F?e-(c.A-10):e>=c.a&&e<=c.f?e-(c.a-10):void 0}function u(e,r={}){let o=e;r.size&&((0,n.assertSize)(o,{size:r.size}),o=(0,i.pad)(o,{dir:"right",size:r.size}));let a=o.slice(2);a.length%2&&(a=`0${a}`);let s=a.length/2,c=new Uint8Array(s);for(let e=0,r=0;e<s;e++){let i=l(a.charCodeAt(r++)),n=l(a.charCodeAt(r++));if(void 0===i||void 0===n)throw new t.BaseError(`Invalid byte sequence ("${a[r-2]}${a[r-1]}" in "${a}").`);c[e]=16*i+n}return c}function d(e,t){return u((0,o.numberToHex)(e,t))}function h(e,t={}){let r=a.encode(e);return"number"==typeof t.size?((0,n.assertSize)(r,{size:t.size}),(0,i.pad)(r,{dir:"right",size:t.size})):r}e.hexToBytes=u,e.numberToBytes=d,e.stringToBytes=h})),n0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeSignature=void 0;var t=ZX();e.normalizeSignature=function(e){let r=!0,i="",n=0,o="",a=!1;for(let t=0;t<e.length;t++){let s=e[t];if(["(",")",","].includes(s)&&(r=!0),"("===s&&n++,")"===s&&n--,r){if(0===n){if(" "===s&&["event","function",""].includes(o))o="";else if(o+=s,")"===s){a=!0;break}continue}if(" "===s){","!==e[t-1]&&","!==i&&",("!==i&&(i="",r=!1);continue}o+=s,i+=s}}if(!a)throw new t.BaseError("Unable to normalize signature.");return o}})),o0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFunctionSignature=void 0;var t=FX(),r=n0();e.getFunctionSignature=e=>{let i="string"==typeof e?e:(0,t.formatAbiItem)(e);return(0,r.normalizeSignature)(i)}})),a0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEventSignature=void 0;var t=o0();e.getEventSignature=e=>(0,t.getFunctionSignature)(e)})),s0=s((e=>{"use strict";function t(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function r(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function n(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");t(e.outputLen),t(e.blockLen)}function o(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a(e,t){i(e);let r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(e,"__esModule",{value:!0}),e.output=e.exists=e.hash=e.bytes=e.bool=e.number=void 0,e.number=t,e.bool=r,e.bytes=i,e.hash=n,e.exists=o,e.output=a;var s={number:t,bool:r,bytes:i,hash:n,exists:o,output:a};e.default=s})),c0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.add5L=e.add5H=e.add4H=e.add4L=e.add3H=e.add3L=e.add=e.rotlBL=e.rotlBH=e.rotlSL=e.rotlSH=e.rotr32L=e.rotr32H=e.rotrBL=e.rotrBH=e.rotrSL=e.rotrSH=e.shrSL=e.shrSH=e.toBig=e.split=e.fromBig=void 0;var t=BigInt(2**32-1),r=BigInt(32);function i(e,i=!1){return i?{h:Number(e&t),l:Number(e>>r&t)}:{h:0|Number(e>>r&t),l:0|Number(e&t)}}function n(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){let{h:a,l:s}=i(e[o],t);[r[o],n[o]]=[a,s]}return[r,n]}e.fromBig=i,e.split=n;var o=(e,t)=>BigInt(e>>>0)<<r|BigInt(t>>>0);e.toBig=o;var a=(e,t,r)=>e>>>r;e.shrSH=a;var s=(e,t,r)=>e<<32-r|t>>>r;e.shrSL=s;var c=(e,t,r)=>e>>>r|t<<32-r;e.rotrSH=c;var l=(e,t,r)=>e<<32-r|t>>>r;e.rotrSL=l;var u=(e,t,r)=>e<<64-r|t>>>r-32;e.rotrBH=u;var d=(e,t,r)=>e>>>r-32|t<<64-r;e.rotrBL=d;var h=(e,t)=>t;e.rotr32H=h;var p=(e,t)=>e;e.rotr32L=p;var f=(e,t,r)=>e<<r|t>>>32-r;e.rotlSH=f;var g=(e,t,r)=>t<<r|e>>>32-r;e.rotlSL=g;var m=(e,t,r)=>t<<r-32|e>>>64-r;e.rotlBH=m;var b=(e,t,r)=>e<<r-32|t>>>64-r;function y(e,t,r,i){let n=(t>>>0)+(i>>>0);return{h:e+r+(n/2**32|0)|0,l:0|n}}e.rotlBL=b,e.add=y;var w=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);e.add3L=w;var v=(e,t,r,i)=>t+r+i+(e/2**32|0)|0;e.add3H=v;var _=(e,t,r,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0);e.add4L=_;var x=(e,t,r,i,n)=>t+r+i+n+(e/2**32|0)|0;e.add4H=x;var E=(e,t,r,i,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0)+(n>>>0);e.add5L=E;var C=(e,t,r,i,n,o)=>t+r+i+n+o+(e/2**32|0)|0;e.add5H=C;var k={fromBig:i,split:n,toBig:o,shrSH:a,shrSL:s,rotrSH:c,rotrSL:l,rotrBH:u,rotrBL:d,rotr32H:h,rotr32L:p,rotlSH:f,rotlSL:g,rotlBH:m,rotlBL:b,add:y,add3L:w,add3H:v,add4L:_,add4H:x,add5H:C,add5L:E};e.default=k})),l0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.crypto=void 0,e.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0})),u0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.isLE=e.rotr=e.createView=e.u32=e.u8=void 0;var t=l0(),r=e=>e instanceof Uint8Array;e.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);e.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));e.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.rotr=(e,t)=>e<<32-t|e>>>t,e.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!e.isLE)throw new Error("Non little-endian hardware is not supported");var i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));e.bytesToHex=function(e){if(!r(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=i[e[r]];return t},e.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);let t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){let i=2*t,n=e.slice(i,i+2),o=Number.parseInt(n,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[t]=o}return r};function n(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function o(e){if("string"==typeof e&&(e=n(e)),!r(e))throw new Error("expected Uint8Array, got "+typeof e);return e}e.nextTick=async()=>{},e.asyncLoop=async function(t,r,i){let n=Date.now();for(let o=0;o<t;o++){i(o);let t=Date.now()-n;t>=0&&t<r||(await(0,e.nextTick)(),n+=t)}},e.utf8ToBytes=n,e.toBytes=o,e.concatBytes=function(...e){let t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0)),i=0;return e.forEach((e=>{if(!r(e))throw new Error("Uint8Array expected");t.set(e,i),i+=e.length})),t};e.Hash=class{clone(){return this._cloneInto()}};var a={}.toString;e.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==a.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},e.wrapConstructor=function(e){let t=t=>e().update(o(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},e.wrapConstructorWithOpts=function(e){let t=(t,r)=>e(r).update(o(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},e.wrapXOFConstructorWithOpts=function(e){let t=(t,r)=>e(r).update(o(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},e.randomBytes=function(e=32){if(t.crypto&&"function"==typeof t.crypto.getRandomValues)return t.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}})),d0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shake256=e.shake128=e.keccak_512=e.keccak_384=e.keccak_256=e.keccak_224=e.sha3_512=e.sha3_384=e.sha3_256=e.sha3_224=e.Keccak=e.keccakP=void 0;var t=s0(),r=c0(),i=u0(),[n,o,a]=[[],[],[]],s=BigInt(0),c=BigInt(1),l=BigInt(2),u=BigInt(7),d=BigInt(256),h=BigInt(113);for(let e=0,t=c,r=1,i=0;e<24;e++){[r,i]=[i,(2*r+3*i)%5],n.push(2*(5*i+r)),o.push((e+1)*(e+2)/2%64);let p=s;for(let e=0;e<7;e++)t=(t<<c^(t>>u)*h)%d,t&l&&(p^=c<<(c<<BigInt(e))-c);a.push(p)}var[p,f]=(0,r.split)(a,!0),g=(e,t,i)=>i>32?(0,r.rotlBH)(e,t,i):(0,r.rotlSH)(e,t,i),m=(e,t,i)=>i>32?(0,r.rotlBL)(e,t,i):(0,r.rotlSL)(e,t,i);function b(e,t=24){let r=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let i=(t+8)%10,n=(t+2)%10,o=r[n],a=r[n+1],s=g(o,a,1)^r[i],c=m(o,a,1)^r[i+1];for(let r=0;r<50;r+=10)e[t+r]^=s,e[t+r+1]^=c}let t=e[2],a=e[3];for(let r=0;r<24;r++){let i=o[r],s=g(t,a,i),c=m(t,a,i),l=n[r];t=e[l],a=e[l+1],e[l]=s,e[l+1]=c}for(let t=0;t<50;t+=10){for(let i=0;i<10;i++)r[i]=e[t+i];for(let i=0;i<10;i++)e[t+i]^=~r[(i+2)%10]&r[(i+4)%10]}e[0]^=p[i],e[1]^=f[i]}r.fill(0)}e.keccakP=b;var y=class e extends i.Hash{constructor(e,r,n,o=!1,a=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=o,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,t.number)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,i.u32)(this.state)}keccak(){b(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,t.exists)(this);let{blockLen:r,state:n}=this,o=(e=(0,i.toBytes)(e)).length;for(let t=0;t<o;){let i=Math.min(r-this.pos,o-t);for(let r=0;r<i;r++)n[this.pos++]^=e[t++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:r,blockLen:i}=this;e[r]^=t,128&t&&r===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){(0,t.exists)(this,!1),(0,t.bytes)(e),this.finish();let r=this.state,{blockLen:i}=this;for(let t=0,n=e.length;t<n;){this.posOut>=i&&this.keccak();let o=Math.min(i-this.posOut,n-t);e.set(r.subarray(this.posOut,this.posOut+o),t),this.posOut+=o,t+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,t.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,t.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:i,outputLen:n,rounds:o,enableXOF:a}=this;return t||(t=new e(r,i,n,a,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=i,t.outputLen=n,t.enableXOF=a,t.destroyed=this.destroyed,t}};e.Keccak=y;var w=(e,t,r)=>(0,i.wrapConstructor)((()=>new y(t,e,r)));e.sha3_224=w(6,144,28),e.sha3_256=w(6,136,32),e.sha3_384=w(6,104,48),e.sha3_512=w(6,72,64),e.keccak_224=w(1,144,28),e.keccak_256=w(1,136,32),e.keccak_384=w(1,104,48),e.keccak_512=w(1,72,64);var v=(e,t,r)=>(0,i.wrapXOFConstructorWithOpts)(((i={})=>new y(t,e,void 0===i.dkLen?r:i.dkLen,!0)));e.shake128=v(31,168,16),e.shake256=v(31,136,32)})),h0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.keccak256=void 0;var t=d0(),r=qX(),i=i0(),n=r0();e.keccak256=function(e,o){let a=o||"hex",s=(0,t.keccak_256)((0,r.isHex)(e,{strict:!1})?(0,i.toBytes)(e):e);return"bytes"===a?s:(0,n.toHex)(s)}})),p0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEventSelector=void 0;var t=i0(),r=a0(),i=h0();e.getEventSelector=e=>(e=>(0,i.keccak256)((0,t.toBytes)(e)))((0,r.getEventSignature)(e))})),f0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidAddressError=void 0;var t=ZX(),r=class extends t.BaseError{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}};e.InvalidAddressError=r})),g0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAddress=void 0;var t=/^0x[a-fA-F0-9]{40}$/;e.isAddress=function(e){return t.test(e)}})),m0=s((e=>{"use strict";function t(e){let t=0;for(let r of e)t+=r.length;let r=new Uint8Array(t),i=0;for(let t of e)r.set(t,i),i+=t.length;return r}function r(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}Object.defineProperty(e,"__esModule",{value:!0}),e.concatHex=e.concatBytes=e.concat=void 0,e.concat=function(e){return"string"==typeof e[0]?r(e):t(e)},e.concatBytes=t,e.concatHex=r})),b0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sliceHex=e.sliceBytes=e.slice=void 0;var t=JX(),r=qX(),i=WX();function n(e,r){if("number"==typeof r&&r>0&&r>(0,i.size)(e)-1)throw new t.SliceOffsetOutOfBoundsError({offset:r,position:"start",size:(0,i.size)(e)})}function o(e,r,n){if("number"==typeof r&&"number"==typeof n&&(0,i.size)(e)!==n-r)throw new t.SliceOffsetOutOfBoundsError({offset:n,position:"end",size:(0,i.size)(e)})}function a(e,t,r,{strict:i}={}){n(e,t);let a=e.slice(t,r);return i&&o(a,t,r),a}function s(e,t,r,{strict:i}={}){n(e,t);let a=`0x${e.replace("0x","").slice(2*(t??0),2*(r??e.length))}`;return i&&o(a,t,r),a}e.slice=function(e,t,i,{strict:n}={}){return(0,r.isHex)(e,{strict:!1})?s(e,t,i,{strict:n}):a(e,t,i,{strict:n})},e.sliceBytes=a,e.sliceHex=s})),y0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getArrayComponents=e.encodeAbiParameters=void 0;var t=KX(),r=f0(),i=g0(),n=m0(),o=QX(),a=WX(),s=b0(),c=r0();function l({param:e,value:h}){let p=d(e.type);if(p){let[r,i]=p;return function(e,{length:r,param:i}){let o=null===r;if(!Array.isArray(e))throw new t.InvalidArrayError(e);if(!o&&e.length!==r)throw new t.AbiEncodingArrayLengthMismatchError({expectedLength:r,givenLength:e.length,type:`${i.type}[${r}]`});let a=!1,s=[];for(let t=0;t<e.length;t++){let r=l({param:i,value:e[t]});r.dynamic&&(a=!0),s.push(r)}if(o||a){let e=u(s);if(o){let t=(0,c.numberToHex)(s.length,{size:32});return{dynamic:!0,encoded:s.length>0?(0,n.concat)([t,e]):t}}if(a)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,n.concat)(s.map((({encoded:e})=>e)))}}(h,{length:r,param:{...e,type:i}})}if("tuple"===e.type)return function(e,{param:t}){let r=!1,i=[];for(let n=0;n<t.components.length;n++){let o=t.components[n],a=l({param:o,value:e[Array.isArray(e)?n:o.name]});i.push(a),a.dynamic&&(r=!0)}return{dynamic:r,encoded:r?u(i):(0,n.concat)(i.map((({encoded:e})=>e)))}}(h,{param:e});if("address"===e.type)return function(e){if(!(0,i.isAddress)(e))throw new r.InvalidAddressError({address:e});return{dynamic:!1,encoded:(0,o.padHex)(e.toLowerCase())}}(h);if("bool"===e.type)return function(e){return{dynamic:!1,encoded:(0,o.padHex)((0,c.boolToHex)(e))}}(h);if(e.type.startsWith("uint")||e.type.startsWith("int")){return function(e,{signed:t}){return{dynamic:!1,encoded:(0,c.numberToHex)(e,{size:32,signed:t})}}(h,{signed:e.type.startsWith("int")})}if(e.type.startsWith("bytes"))return function(e,{param:r}){let[,i]=r.type.split("bytes"),s=(0,a.size)(e);if(!i){let t=e;return s%32!=0&&(t=(0,o.padHex)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,n.concat)([(0,o.padHex)((0,c.numberToHex)(s,{size:32})),t])}}if(s!==parseInt(i))throw new t.AbiEncodingBytesSizeMismatchError({expectedSize:parseInt(i),value:e});return{dynamic:!1,encoded:(0,o.padHex)(e,{dir:"right"})}}(h,{param:e});if("string"===e.type)return function(e){let t=(0,c.stringToHex)(e),r=Math.ceil((0,a.size)(t)/32),i=[];for(let e=0;e<r;e++)i.push((0,o.padHex)((0,s.slice)(t,32*e,32*(e+1)),{dir:"right"}));return{dynamic:!0,encoded:(0,n.concat)([(0,o.padHex)((0,c.numberToHex)((0,a.size)(t),{size:32})),...i])}}(h);throw new t.InvalidAbiEncodingTypeError(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function u(e){let t=0;for(let r=0;r<e.length;r++){let{dynamic:i,encoded:n}=e[r];t+=i?32:(0,a.size)(n)}let r=[],i=[],o=0;for(let n=0;n<e.length;n++){let{dynamic:s,encoded:l}=e[n];s?(r.push((0,c.numberToHex)(t+o,{size:32})),i.push(l),o+=(0,a.size)(l)):r.push(l)}return(0,n.concat)([...r,...i])}function d(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}e.encodeAbiParameters=function(e,r){if(e.length!==r.length)throw new t.AbiEncodingLengthMismatchError({expectedLength:e.length,givenLength:r.length});let i=u(function({params:e,values:t}){let r=[];for(let i=0;i<e.length;i++)r.push(l({param:e[i],value:t[i]}));return r}({params:e,values:r}));return 0===i.length?"0x":i},e.getArrayComponents=d})),w0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFunctionSelector=void 0;var t=b0(),r=i0(),i=o0(),n=h0();e.getFunctionSelector=e=>(0,t.slice)((e=>(0,n.keccak256)((0,r.toBytes)(e)))((0,i.getFunctionSignature)(e)),0,4)})),v0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAmbiguousTypes=e.isArgOfType=e.getAbiItem=void 0;var t=KX(),r=qX(),i=p0(),n=w0(),o=g0();function a(e,t){let r=typeof e,i=t.type;switch(i){case"address":return(0,o.isAddress)(e);case"bool":return"boolean"===r;case"function":case"string":return"string"===r;default:return"tuple"===i&&"components"in t?Object.values(t.components).every(((t,r)=>a(Object.values(e)[r],t))):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i)?"number"===r||"bigint"===r:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i)?"string"===r||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i)&&(Array.isArray(e)&&e.every((e=>a(e,{...t,type:i.replace(/(\[[0-9]{0,}\])$/,"")}))))}}function s(e,t,r){for(let i in e){let n=e[i],a=t[i];if("tuple"===n.type&&"tuple"===a.type&&"components"in n&&"components"in a)return s(n.components,a.components,r[i]);let c=[n.type,a.type];if(c.includes("address")&&c.includes("bytes20")||(c.includes("address")&&c.includes("string")||c.includes("address")&&c.includes("bytes"))&&(0,o.isAddress)(r[i]))return c}}e.getAbiItem=function({abi:e,args:o=[],name:c}){let l,u=(0,r.isHex)(c,{strict:!1}),d=e.filter((e=>u?"function"===e.type?(0,n.getFunctionSelector)(e)===c:"event"===e.type&&(0,i.getEventSelector)(e)===c:"name"in e&&e.name===c));if(0!==d.length){if(1===d.length)return d[0];for(let e of d)if("inputs"in e)if(o&&0!==o.length){if(e.inputs&&0!==e.inputs.length&&e.inputs.length===o.length&&o.every(((t,r)=>{let i="inputs"in e&&e.inputs[r];return!!i&&a(t,i)}))){if(l&&"inputs"in l&&l.inputs){let r=s(e.inputs,l.inputs,o);if(r)throw new t.AbiItemAmbiguityError({abiItem:e,type:r[0]},{abiItem:l,type:r[1]})}l=e}}else if(!e.inputs||0===e.inputs.length)return e;return l||d[0]}},e.isArgOfType=a,e.getAmbiguousTypes=s})),_0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeEventTopics=void 0;var t=KX(),r=YX(),i=i0(),n=p0(),o=h0(),a=y0(),s=zX(),c=v0();function l({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,o.keccak256)((0,i.toBytes)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new r.FilterTypeNotSupportedError(e.type);return(0,a.encodeAbiParameters)([e],[t])}e.encodeEventTopics=function({abi:e,eventName:r,args:i}){let o=e[0];if(r&&(o=(0,c.getAbiItem)({abi:e,args:i,name:r}),!o))throw new t.AbiEventNotFoundError(r,{docsPath:"/docs/contract/encodeEventTopics"});if("event"!==o.type)throw new t.AbiEventNotFoundError(void 0,{docsPath:"/docs/contract/encodeEventTopics"});let a=(0,s.formatAbiItem)(o),u=(0,n.getEventSelector)(a),d=[];if(i&&"inputs"in o){let e=o.inputs?.filter((e=>"indexed"in e&&e.indexed)),t=Array.isArray(i)?i:Object.values(i).length>0?e?.map((e=>i[e.name]))??[]:[];t.length>0&&(d=e?.map(((e,r)=>Array.isArray(t[r])?t[r].map(((i,n)=>l({param:e,value:t[r][n]}))):t[r]?l({param:e,value:t[r]}):null))??[])}return[u,...d]}})),x0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFilterRequestScope=void 0,e.createFilterRequestScope=function(e,{method:t}){let r={};return"fallback"===e.transport.type&&e.transport.onResponse?.((({method:e,response:i,status:n,transport:o})=>{"success"===n&&t===e&&(r[i]=o.request)})),t=>r[t]||e.request}})),E0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createContractEventFilter=void 0;var t=_0(),r=r0(),i=x0();e.createContractEventFilter=async function(e,{address:n,abi:o,args:a,eventName:s,fromBlock:c,strict:l,toBlock:u}){let d=(0,i.createFilterRequestScope)(e,{method:"eth_newFilter"}),h=s?(0,t.encodeEventTopics)({abi:o,args:a,eventName:s}):void 0,p=await e.request({method:"eth_newFilter",params:[{address:n,fromBlock:"bigint"==typeof c?(0,r.numberToHex)(c):c,toBlock:"bigint"==typeof u?(0,r.numberToHex)(u):u,topics:h}]});return{abi:o,args:a,eventName:s,id:p,request:d(p),strict:l,type:"event"}}})),C0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseAccount=void 0,e.parseAccount=function(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}})),k0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeFunctionData=void 0;var t=KX(),r=m0(),i=w0(),n=y0(),o=zX(),a=v0();e.encodeFunctionData=function({abi:e,args:s,functionName:c}){let l=e[0];if(c&&(l=(0,a.getAbiItem)({abi:e,args:s,name:c}),!l))throw new t.AbiFunctionNotFoundError(c,{docsPath:"/docs/contract/encodeFunctionData"});if("function"!==l.type)throw new t.AbiFunctionNotFoundError(void 0,{docsPath:"/docs/contract/encodeFunctionData"});let u=(0,o.formatAbiItem)(l),d=(0,i.getFunctionSelector)(u),h="inputs"in l&&l.inputs?(0,n.encodeAbiParameters)(l.inputs,s??[]):void 0;return(0,r.concatHex)([d,h??"0x"])}})),P0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.solidityPanic=e.solidityError=e.panicReasons=void 0,e.panicReasons={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},e.solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},e.solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}})),I0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAddress=e.checksumAddress=void 0;var t=f0(),r=i0(),i=h0(),n=g0();function o(e,t){let n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),o=(0,i.keccak256)((0,r.stringToBytes)(n),"bytes"),a=(t?n.substring(`${t}0x`.length):n).split("");for(let e=0;e<40;e+=2)o[e>>1]>>4>=8&&a[e]&&(a[e]=a[e].toUpperCase()),(15&o[e>>1])>=8&&a[e+1]&&(a[e+1]=a[e+1].toUpperCase());return`0x${a.join("")}`}e.checksumAddress=o,e.getAddress=function(e,r){if(!(0,n.isAddress)(e))throw new t.InvalidAddressError({address:e});return o(e,r)}})),S0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeAbiParameters=void 0;var t=KX(),r=I0(),i=WX(),n=b0(),o=e0(),a=t0(),s=y0();function c({data:e,param:i,position:u}){let d=(0,s.getArrayComponents)(i.type);if(d){let[t,r]=d;return function(e,{param:t,length:r,position:i}){if(!r){let r=(0,a.hexToNumber)((0,n.slice)(e,i,i+32,{strict:!0})),o=(0,a.hexToNumber)((0,n.slice)(e,r,r+32,{strict:!0})),s=0,l=[];for(let i=0;i<o;++i){let i=c({data:(0,n.slice)(e,r+32),param:t,position:s});s+=i.consumed,l.push(i.value)}return{value:l,consumed:32}}if(l(t)){let o=!(0,s.getArrayComponents)(t.type)?.[0],l=0,u=[];for(let s=0;s<r;++s){let r=(0,a.hexToNumber)((0,n.slice)(e,i,i+32,{strict:!0})),d=c({data:(0,n.slice)(e,r),param:t,position:o?l:32*s});l+=d.consumed,u.push(d.value)}return{value:u,consumed:32}}let o=0,u=[];for(let n=0;n<r;++n){let r=c({data:e,param:t,position:i+o});o+=r.consumed,u.push(r.value)}return{value:u,consumed:o}}(e,{length:t,param:{...i,type:r},position:u})}if("tuple"===i.type)return function(e,{param:t,position:r}){let i=0===t.components.length||t.components.some((({name:e})=>!e)),o=i?[]:{},s=0;if(l(t)){let l=(0,a.hexToNumber)((0,n.slice)(e,r,r+32,{strict:!0}));for(let r=0;r<t.components.length;++r){let a=t.components[r],u=c({data:(0,n.slice)(e,l),param:a,position:s});s+=u.consumed,o[i?r:a?.name]=u.value}return{consumed:32,value:o}}for(let n=0;n<t.components.length;++n){let a=t.components[n],l=c({data:e,param:a,position:r+s});s+=l.consumed,o[i?n:a?.name]=l.value}return{consumed:s,value:o}}(e,{param:i,position:u});if("string"===i.type)return function(e,{position:t}){let r=(0,a.hexToNumber)((0,n.slice)(e,t,t+32,{strict:!0})),i=(0,a.hexToNumber)((0,n.slice)(e,r,r+32,{strict:!0}));return 0===i?{consumed:32,value:""}:{consumed:32,value:(0,a.hexToString)((0,o.trim)((0,n.slice)(e,r+32,r+32+i,{strict:!0})))}}(e,{position:u});if(i.type.startsWith("bytes"))return function(e,{param:t,position:r}){let[i,o]=t.type.split("bytes");if(!o){let t=(0,a.hexToNumber)((0,n.slice)(e,r,r+32,{strict:!0})),i=(0,a.hexToNumber)((0,n.slice)(e,t,t+32,{strict:!0}));return 0===i?{consumed:32,value:"0x"}:{consumed:32,value:(0,n.slice)(e,t+32,t+32+i,{strict:!0})}}return{consumed:32,value:(0,n.slice)(e,r,r+parseInt(o),{strict:!0})}}(e,{param:i,position:u});let h=(0,n.slice)(e,u,u+32,{strict:!0});if(i.type.startsWith("uint")||i.type.startsWith("int"))return function(e,{param:t}){let r=t.type.startsWith("int");return{consumed:32,value:parseInt(t.type.split("int")[1]||"256")>48?(0,a.hexToBigInt)(e,{signed:r}):(0,a.hexToNumber)(e,{signed:r})}}(h,{param:i});if("address"===i.type)return function(e){return{consumed:32,value:(0,r.checksumAddress)((0,n.slice)(e,-20))}}(h);if("bool"===i.type)return function(e){return{consumed:32,value:(0,a.hexToBool)(e)}}(h);throw new t.InvalidAbiDecodingTypeError(i.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function l(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(l);let r=(0,s.getArrayComponents)(e.type);return!(!r||!l({...e,type:r[1]}))}e.decodeAbiParameters=function(e,r){if("0x"===r&&e.length>0)throw new t.AbiDecodingZeroDataError;if((0,i.size)(r)&&(0,i.size)(r)<32)throw new t.AbiDecodingDataSizeTooSmallError({data:r,params:e,size:(0,i.size)(r)});return function({data:e,params:r}){let n=[],o=0;for(let a=0;a<r.length;a++){if(o>=(0,i.size)(e))throw new t.AbiDecodingDataSizeTooSmallError({data:e,params:r,size:(0,i.size)(e)});let s=r[a],{consumed:l,value:u}=c({data:e,param:s,position:o});n.push(u),o+=l}return n}({data:r,params:e})}})),A0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeErrorResult=void 0;var t=P0(),r=KX(),i=b0(),n=w0(),o=S0(),a=zX();e.decodeErrorResult=function({abi:e,data:s}){let c=(0,i.slice)(s,0,4);if("0x"===c)throw new r.AbiDecodingZeroDataError;let l=[...e||[],t.solidityError,t.solidityPanic].find((e=>"error"===e.type&&c===(0,n.getFunctionSelector)((0,a.formatAbiItem)(e))));if(!l)throw new r.AbiErrorSignatureNotFoundError(c,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:l,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,o.decodeAbiParameters)(l.inputs,(0,i.slice)(s,4)):void 0,errorName:l.name}}})),T0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stringify=void 0;e.stringify=(e,t,r)=>JSON.stringify(e,((e,r)=>{let i="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,i):i}),r)})),O0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatAbiItemWithArgs=void 0;var t=T0();e.formatAbiItemWithArgs=function({abiItem:e,args:r,includeFunctionName:i=!0,includeName:n=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${i?e.name:""}(${e.inputs.map(((e,i)=>`${n&&e.name?`${e.name}: `:""}${"object"==typeof r[i]?(0,t.stringify)(r[i]):r[i]}`)).join(", ")})`}})),R0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.weiUnits=e.gweiUnits=e.etherUnits=void 0,e.etherUnits={gwei:9,wei:18},e.gweiUnits={ether:-9,wei:9},e.weiUnits={ether:-18,gwei:-9}})),N0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatUnits=void 0,e.formatUnits=function(e,t){let r=e.toString(),i=r.startsWith("-");i&&(r=r.slice(1)),r=r.padStart(t,"0");let[n,o]=[r.slice(0,r.length-t),r.slice(r.length-t)];return o=o.replace(/(0+)$/,""),`${i?"-":""}${n||"0"}${o?`.${o}`:""}`}})),M0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatEther=void 0;var t=R0(),r=N0();e.formatEther=function(e,i="wei"){return(0,r.formatUnits)(e,t.etherUnits[i])}})),$0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatGwei=void 0;var t=R0(),r=N0();e.formatGwei=function(e,i="wei"){return(0,r.formatUnits)(e,t.gweiUnits[i])}})),j0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WaitForTransactionReceiptTimeoutError=e.TransactionReceiptNotFoundError=e.TransactionNotFoundError=e.TransactionExecutionError=e.InvalidStorageKeySizeError=e.InvalidSerializedTransactionError=e.InvalidSerializedTransactionTypeError=e.InvalidSerializableTransactionError=e.InvalidLegacyVError=e.FeeConflictError=e.prettyPrint=void 0;var t=M0(),r=$0(),i=ZX();function n(e){let t=Object.entries(e).map((([e,t])=>void 0===t||!1===t?null:[e,t])).filter(Boolean),r=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>`  ${`${e}:`.padEnd(r+1)}  ${t}`)).join("\n    ")}e.prettyPrint=n;var o=class extends i.BaseError{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join("\n    ")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}};e.FeeConflictError=o;var a=class extends i.BaseError{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}};e.InvalidLegacyVError=a;var s=class extends i.BaseError{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",n(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}};e.InvalidSerializableTransactionError=s;var c=class extends i.BaseError{constructor({serializedType:e}){super(`Serialized transaction type "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=e}};e.InvalidSerializedTransactionTypeError=c;var l=class extends i.BaseError{constructor({attributes:e,serializedTransaction:t,type:r}){let i=Object.entries(e).map((([e,t])=>typeof t>"u"?e:void 0)).filter(Boolean);super(`Invalid serialized transaction of type "${r}" was provided.`,{metaMessages:[`Serialized Transaction: "${t}"`,i.length>0?`Missing Attributes: ${i.join(", ")}`:""].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=t,this.type=r}};e.InvalidSerializedTransactionError=l;var u=class extends i.BaseError{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}};e.InvalidStorageKeySizeError=u;var d=class extends i.BaseError{constructor(e,{account:i,docsPath:o,chain:a,data:s,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:d,nonce:h,to:p,value:f}){let g=n({chain:a&&`${a?.name} (id: ${a?.id})`,from:i?.address,to:p,value:typeof f<"u"&&`${(0,t.formatEther)(f)} ${a?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:c,gasPrice:typeof l<"u"&&`${(0,r.formatGwei)(l)} gwei`,maxFeePerGas:typeof u<"u"&&`${(0,r.formatGwei)(u)} gwei`,maxPriorityFeePerGas:typeof d<"u"&&`${(0,r.formatGwei)(d)} gwei`,nonce:h});super(e.shortMessage,{cause:e,docsPath:o,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",g].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}};e.TransactionExecutionError=d;var h=class extends i.BaseError{constructor({blockHash:e,blockNumber:t,blockTag:r,hash:i,index:n}){let o="Transaction";r&&void 0!==n&&(o=`Transaction at block time "${r}" at index "${n}"`),e&&void 0!==n&&(o=`Transaction at block hash "${e}" at index "${n}"`),t&&void 0!==n&&(o=`Transaction at block number "${t}" at index "${n}"`),i&&(o=`Transaction with hash "${i}"`),super(`${o} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}};e.TransactionNotFoundError=h;var p=class extends i.BaseError{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}};e.TransactionReceiptNotFoundError=p;var f=class extends i.BaseError{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}};e.WaitForTransactionReceiptTimeoutError=f})),L0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RawContractError=e.ContractFunctionZeroDataError=e.ContractFunctionRevertedError=e.ContractFunctionExecutionError=e.CallExecutionError=void 0;var t=C0(),r=P0(),i=A0(),n=zX(),o=O0(),a=v0(),s=M0(),c=$0(),l=KX(),u=ZX(),d=j0(),h=GX(),p=class extends u.BaseError{constructor(e,{account:r,docsPath:i,chain:n,data:o,gas:a,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:h,nonce:p,to:f,value:g}){let m=r?(0,t.parseAccount)(r):void 0,b=(0,d.prettyPrint)({from:m?.address,to:f,value:typeof g<"u"&&`${(0,s.formatEther)(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:a,gasPrice:typeof l<"u"&&`${(0,c.formatGwei)(l)} gwei`,maxFeePerGas:typeof u<"u"&&`${(0,c.formatGwei)(u)} gwei`,maxPriorityFeePerGas:typeof h<"u"&&`${(0,c.formatGwei)(h)} gwei`,nonce:p});super(e.shortMessage,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",b].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}};e.CallExecutionError=p;var f=class extends u.BaseError{constructor(e,{abi:t,args:r,contractAddress:i,docsPath:s,functionName:c,sender:l}){let u=(0,a.getAbiItem)({abi:t,args:r,name:c}),p=u?(0,o.formatAbiItemWithArgs)({abiItem:u,args:r,includeFunctionName:!1,includeName:!1}):void 0,f=u?(0,n.formatAbiItem)(u,{includeName:!0}):void 0,g=(0,d.prettyPrint)({address:i&&(0,h.getContractAddress)(i),function:f,args:p&&"()"!==p&&`${[...Array(c?.length??0).keys()].map((()=>" ")).join("")}${p}`,sender:l});super(e.shortMessage||`An unknown error occurred while executing the contract function "${c}".`,{cause:e,docsPath:s,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",g].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=t,this.args=r,this.cause=e,this.contractAddress=i,this.functionName=c,this.sender=l}};e.ContractFunctionExecutionError=f;var g=class extends u.BaseError{constructor({abi:e,data:t,functionName:a,message:s}){let c,u,d,h,p;if(t&&"0x"!==t)try{u=(0,i.decodeErrorResult)({abi:e,data:t});let{abiItem:a,errorName:s,args:c}=u;if("Error"===s)h=c[0];else if("Panic"===s){let[e]=c;h=r.panicReasons[e]}else{let e=a?(0,n.formatAbiItem)(a,{includeName:!0}):void 0,t=a&&c?(0,o.formatAbiItemWithArgs)({abiItem:a,args:c,includeFunctionName:!1,includeName:!1}):void 0;d=[e?`Error: ${e}`:"",t&&"()"!==t?`       ${[...Array(s?.length??0).keys()].map((()=>" ")).join("")}${t}`:""]}}catch(e){c=e}else s&&(h=s);c instanceof l.AbiErrorSignatureNotFoundError&&(p=c.signature,d=[`Unable to decode signature "${p}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${p}.`]),super(h&&"execution reverted"!==h||p?[`The contract function "${a}" reverted with the following ${p?"signature":"reason"}:`,h||p].join("\n    "):`The contract function "${a}" reverted.`,{cause:c,metaMessages:d}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=u,this.reason=h,this.signature=p}};e.ContractFunctionRevertedError=g;var m=class extends u.BaseError{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",`  - The contract does not have the function "${e}",`,"  - The parameters passed to the contract function may be invalid, or","  - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}};e.ContractFunctionZeroDataError=m;var b=class extends u.BaseError{constructor({data:e,message:t}){super(t||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}};e.RawContractError=b})),B0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimeoutError=e.RpcRequestError=e.WebSocketRequestError=e.HttpRequestError=void 0;var t=T0(),r=ZX(),i=GX(),n=class extends r.BaseError{constructor({body:e,details:r,headers:n,status:o,url:a}){super("HTTP request failed.",{details:r,metaMessages:[o&&`Status: ${o}`,`URL: ${(0,i.getUrl)(a)}`,e&&`Request body: ${(0,t.stringify)(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=o,this.url=a}};e.HttpRequestError=n;var o=class extends r.BaseError{constructor({body:e,details:r,url:n}){super("WebSocket request failed.",{details:r,metaMessages:[`URL: ${(0,i.getUrl)(n)}`,`Request body: ${(0,t.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}};e.WebSocketRequestError=o;var a=class extends r.BaseError{constructor({body:e,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${(0,i.getUrl)(n)}`,`Request body: ${(0,t.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code}};e.RpcRequestError=a;var s=class extends r.BaseError{constructor({body:e,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,i.getUrl)(r)}`,`Request body: ${(0,t.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}};e.TimeoutError=s})),D0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnknownRpcError=e.SwitchChainError=e.ChainDisconnectedError=e.ProviderDisconnectedError=e.UnsupportedProviderMethodError=e.UnauthorizedProviderError=e.UserRejectedRequestError=e.JsonRpcVersionUnsupportedError=e.LimitExceededRpcError=e.MethodNotSupportedRpcError=e.TransactionRejectedRpcError=e.ResourceUnavailableRpcError=e.ResourceNotFoundRpcError=e.InvalidInputRpcError=e.InternalRpcError=e.InvalidParamsRpcError=e.MethodNotFoundRpcError=e.InvalidRequestRpcError=e.ParseRpcError=e.ProviderRpcError=e.RpcError=void 0;var t=ZX(),r=B0(),i=class extends t.BaseError{constructor(e,{code:t,docsPath:i,metaMessages:n,shortMessage:o}){super(o,{cause:e,docsPath:i,metaMessages:n||e?.metaMessages}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof r.RpcRequestError?e.code:t??-1}};e.RpcError=i;var n=class extends i{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}};e.ProviderRpcError=n;var o=class e extends i{constructor(t){super(t,{code:e.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}};Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700}),e.ParseRpcError=o;var a=class e extends i{constructor(t){super(t,{code:e.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}};Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600}),e.InvalidRequestRpcError=a;var s=class e extends i{constructor(t){super(t,{code:e.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}};Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601}),e.MethodNotFoundRpcError=s;var c=class e extends i{constructor(t){super(t,{code:e.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join("\n    ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}};Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602}),e.InvalidParamsRpcError=c;var l=class e extends i{constructor(t){super(t,{code:e.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}};Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603}),e.InternalRpcError=l;var u=class e extends i{constructor(t){super(t,{code:e.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join("\n    ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}};Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3}),e.InvalidInputRpcError=u;var d=class e extends i{constructor(t){super(t,{code:e.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}};Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001}),e.ResourceNotFoundRpcError=d;var h=class e extends i{constructor(t){super(t,{code:e.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}};Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002}),e.ResourceUnavailableRpcError=h;var p=class e extends i{constructor(t){super(t,{code:e.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}};Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003}),e.TransactionRejectedRpcError=p;var f=class e extends i{constructor(t){super(t,{code:e.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}};Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004}),e.MethodNotSupportedRpcError=f;var g=class e extends i{constructor(t){super(t,{code:e.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}};Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005}),e.LimitExceededRpcError=g;var m=class e extends i{constructor(t){super(t,{code:e.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}};Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006}),e.JsonRpcVersionUnsupportedError=m;var b=class e extends n{constructor(t){super(t,{code:e.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}};Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001}),e.UserRejectedRequestError=b;var y=class e extends n{constructor(t){super(t,{code:e.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}};Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100}),e.UnauthorizedProviderError=y;var w=class e extends n{constructor(t){super(t,{code:e.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}};Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200}),e.UnsupportedProviderMethodError=w;var v=class e extends n{constructor(t){super(t,{code:e.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}};Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900}),e.ProviderDisconnectedError=v;var _=class e extends n{constructor(t){super(t,{code:e.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}};Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901}),e.ChainDisconnectedError=_;var x=class e extends n{constructor(t){super(t,{code:e.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}};Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902}),e.SwitchChainError=x;e.UnknownRpcError=class extends i{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}})),U0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getContractError=void 0;var t=KX(),r=ZX(),i=L0(),n=D0(),o=3;e.getContractError=function(e,{abi:a,address:s,args:c,docsPath:l,functionName:u,sender:d}){let{code:h,data:p,message:f,shortMessage:g}=e instanceof i.RawContractError?e:e instanceof r.BaseError?e.walk((e=>"data"in e))||e.walk():{},m=e instanceof t.AbiDecodingZeroDataError?new i.ContractFunctionZeroDataError({functionName:u}):[o,n.InternalRpcError.code].includes(h)&&(p||f||g)?new i.ContractFunctionRevertedError({abi:a,data:"object"==typeof p?p.data:p,functionName:u,message:g??f}):e;return new i.ContractFunctionExecutionError(m,{abi:a,args:c,contractAddress:s,docsPath:l,functionName:u,sender:d})}})),F0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccountNotFoundError=void 0;var t=ZX(),r=class extends t.BaseError{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join("\n    "),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}};e.AccountNotFoundError=r})),H0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EstimateGasExecutionError=void 0;var t=M0(),r=$0(),i=ZX(),n=j0(),o=class extends i.BaseError{constructor(e,{account:i,docsPath:o,chain:a,data:s,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:d,nonce:h,to:p,value:f}){let g=(0,n.prettyPrint)({from:i?.address,to:p,value:typeof f<"u"&&`${(0,t.formatEther)(f)} ${a?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:c,gasPrice:typeof l<"u"&&`${(0,r.formatGwei)(l)} gwei`,maxFeePerGas:typeof u<"u"&&`${(0,r.formatGwei)(u)} gwei`,maxPriorityFeePerGas:typeof d<"u"&&`${(0,r.formatGwei)(d)} gwei`,nonce:h});super(e.shortMessage,{cause:e,docsPath:o,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",g].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}};e.EstimateGasExecutionError=o})),z0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnknownNodeError=e.TipAboveFeeCapError=e.TransactionTypeNotSupportedError=e.IntrinsicGasTooLowError=e.IntrinsicGasTooHighError=e.InsufficientFundsError=e.NonceMaxValueError=e.NonceTooLowError=e.NonceTooHighError=e.FeeCapTooLowError=e.FeeCapTooHighError=e.ExecutionRevertedError=void 0;var t=$0(),r=ZX(),i=class extends r.BaseError{constructor({cause:e,message:t}={}){let r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}};Object.defineProperty(i,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/}),e.ExecutionRevertedError=i;var n=class extends r.BaseError{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${(0,t.formatGwei)(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}};Object.defineProperty(n,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/}),e.FeeCapTooHighError=n;var o=class extends r.BaseError{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${(0,t.formatGwei)(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}};Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/}),e.FeeCapTooLowError=o;var a=class extends r.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}};Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/}),e.NonceTooHighError=a;var s=class extends r.BaseError{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n    "),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}};Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/}),e.NonceTooLowError=s;var c=class extends r.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}};Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/}),e.NonceMaxValueError=c;var l=class extends r.BaseError{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n    "),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}};Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/}),e.InsufficientFundsError=l;var u=class extends r.BaseError{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}};Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/}),e.IntrinsicGasTooHighError=u;var d=class extends r.BaseError{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}};Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/}),e.IntrinsicGasTooLowError=d;var h=class extends r.BaseError{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}};Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/}),e.TransactionTypeNotSupportedError=h;var p=class extends r.BaseError{constructor({cause:e,maxPriorityFeePerGas:r,maxFeePerGas:i}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${(0,t.formatGwei)(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${i?` = ${(0,t.formatGwei)(i)} gwei`:""}).`].join("\n    "),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}};Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/}),e.TipAboveFeeCapError=p;var f=class extends r.BaseError{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}};e.UnknownNodeError=f})),q0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNodeError=e.containsNodeError=void 0;var t=ZX(),r=z0(),i=B0(),n=D0();e.containsNodeError=function(e){return e instanceof n.TransactionRejectedRpcError||e instanceof n.InvalidInputRpcError||e instanceof i.RpcRequestError&&e.code===r.ExecutionRevertedError.code},e.getNodeError=function(e,i){let n=(e.details||"").toLowerCase(),o=e.walk((e=>e.code===r.ExecutionRevertedError.code));return o instanceof t.BaseError?new r.ExecutionRevertedError({cause:e,message:o.details}):r.ExecutionRevertedError.nodeMessage.test(n)?new r.ExecutionRevertedError({cause:e,message:e.details}):r.FeeCapTooHighError.nodeMessage.test(n)?new r.FeeCapTooHighError({cause:e,maxFeePerGas:i?.maxFeePerGas}):r.FeeCapTooLowError.nodeMessage.test(n)?new r.FeeCapTooLowError({cause:e,maxFeePerGas:i?.maxFeePerGas}):r.NonceTooHighError.nodeMessage.test(n)?new r.NonceTooHighError({cause:e,nonce:i?.nonce}):r.NonceTooLowError.nodeMessage.test(n)?new r.NonceTooLowError({cause:e,nonce:i?.nonce}):r.NonceMaxValueError.nodeMessage.test(n)?new r.NonceMaxValueError({cause:e,nonce:i?.nonce}):r.InsufficientFundsError.nodeMessage.test(n)?new r.InsufficientFundsError({cause:e}):r.IntrinsicGasTooHighError.nodeMessage.test(n)?new r.IntrinsicGasTooHighError({cause:e,gas:i?.gas}):r.IntrinsicGasTooLowError.nodeMessage.test(n)?new r.IntrinsicGasTooLowError({cause:e,gas:i?.gas}):r.TransactionTypeNotSupportedError.nodeMessage.test(n)?new r.TransactionTypeNotSupportedError({cause:e}):r.TipAboveFeeCapError.nodeMessage.test(n)?new r.TipAboveFeeCapError({cause:e,maxFeePerGas:i?.maxFeePerGas,maxPriorityFeePerGas:i?.maxPriorityFeePerGas}):new r.UnknownNodeError({cause:e})}})),W0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEstimateGasError=void 0;var t=H0(),r=z0(),i=q0();e.getEstimateGasError=function(e,{docsPath:n,...o}){let a=(()=>{let t=(0,i.getNodeError)(e,o);return t instanceof r.UnknownNodeError?e:t})();return new t.EstimateGasExecutionError(a,{docsPath:n,...o})}})),V0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extract=void 0,e.extract=function(e,{format:t}){if(!t)return{};let r={};return function t(i){let n=Object.keys(i);for(let o of n)o in e&&(r[o]=e[o]),i[o]&&"object"==typeof i[o]&&!Array.isArray(i[o])&&t(i[o])}(t(e||{})),r}})),G0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defineFormatter=void 0,e.defineFormatter=function(e,t){return({exclude:r,format:i})=>({exclude:r,format:e=>{let n=t(e);if(r)for(let e of r)delete n[e];return{...n,...i(e)}},type:e})}})),Z0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransactionRequest=e.formatTransactionRequest=e.rpcTransactionType=void 0;var t=r0(),r=G0();function i(r){return{...r,gas:typeof r.gas<"u"?(0,t.numberToHex)(r.gas):void 0,gasPrice:typeof r.gasPrice<"u"?(0,t.numberToHex)(r.gasPrice):void 0,maxFeePerGas:typeof r.maxFeePerGas<"u"?(0,t.numberToHex)(r.maxFeePerGas):void 0,maxPriorityFeePerGas:typeof r.maxPriorityFeePerGas<"u"?(0,t.numberToHex)(r.maxPriorityFeePerGas):void 0,nonce:typeof r.nonce<"u"?(0,t.numberToHex)(r.nonce):void 0,type:typeof r.type<"u"?e.rpcTransactionType[r.type]:void 0,value:typeof r.value<"u"?(0,t.numberToHex)(r.value):void 0}}e.rpcTransactionType={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"},e.formatTransactionRequest=i,e.defineTransactionRequest=(0,r.defineFormatter)("transactionRequest",i)})),K0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertRequest=void 0;var t=C0(),r=f0(),i=z0(),n=j0(),o=g0();e.assertRequest=function(e){let{account:a,gasPrice:s,maxFeePerGas:c,maxPriorityFeePerGas:l,to:u}=e,d=a?(0,t.parseAccount)(a):void 0;if(d&&!(0,o.isAddress)(d.address))throw new r.InvalidAddressError({address:d.address});if(u&&!(0,o.isAddress)(u))throw new r.InvalidAddressError({address:u});if(typeof s<"u"&&(typeof c<"u"||typeof l<"u"))throw new n.FeeConflictError;if(c&&c>2n**256n-1n)throw new i.FeeCapTooHighError({maxFeePerGas:c});if(l&&c&&l>c)throw new i.TipAboveFeeCapError({maxFeePerGas:c,maxPriorityFeePerGas:l})}})),Y0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MaxFeePerGasTooLowError=e.Eip1559FeesNotSupportedError=e.BaseFeeScalarError=void 0;var t=$0(),r=ZX(),i=class extends r.BaseError{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}};e.BaseFeeScalarError=i;var n=class extends r.BaseError{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}};e.Eip1559FeesNotSupportedError=n;var o=class extends r.BaseError{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,t.formatGwei)(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}};e.MaxFeePerGasTooLowError=o})),J0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockNotFoundError=void 0;var t=ZX(),r=class extends t.BaseError{constructor({blockHash:e,blockNumber:t}){let r="Block";e&&(r=`Block at hash "${e}"`),t&&(r=`Block at number "${t}"`),super(`${r} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}};e.BlockNotFoundError=r})),Q0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransaction=e.formatTransaction=e.transactionType=void 0;var t=t0(),r=G0();function i(r){let i={...r,blockHash:r.blockHash?r.blockHash:null,blockNumber:r.blockNumber?BigInt(r.blockNumber):null,chainId:r.chainId?(0,t.hexToNumber)(r.chainId):void 0,gas:r.gas?BigInt(r.gas):void 0,gasPrice:r.gasPrice?BigInt(r.gasPrice):void 0,maxFeePerGas:r.maxFeePerGas?BigInt(r.maxFeePerGas):void 0,maxPriorityFeePerGas:r.maxPriorityFeePerGas?BigInt(r.maxPriorityFeePerGas):void 0,nonce:r.nonce?(0,t.hexToNumber)(r.nonce):void 0,to:r.to?r.to:null,transactionIndex:r.transactionIndex?Number(r.transactionIndex):null,type:r.type?e.transactionType[r.type]:void 0,typeHex:r.type?r.type:void 0,value:r.value?BigInt(r.value):void 0,v:r.v?BigInt(r.v):void 0};return i.yParity=(()=>{if(r.yParity)return Number(r.yParity);if("bigint"==typeof i.v){if(0n===i.v||27n===i.v)return 0;if(1n===i.v||28n===i.v)return 1;if(i.v>=35n)return i.v%2n===0n?1:0}})(),"legacy"===i.type&&(delete i.accessList,delete i.maxFeePerGas,delete i.maxPriorityFeePerGas,delete i.yParity),"eip2930"===i.type&&(delete i.maxFeePerGas,delete i.maxPriorityFeePerGas),i}e.transactionType={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"},e.formatTransaction=i,e.defineTransaction=(0,r.defineFormatter)("transaction",i)})),X0=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defineBlock=e.formatBlock=void 0;var t=G0(),r=Q0();function i(e){let t=e.transactions?.map((e=>"string"==typeof e?e:(0,r.formatTransaction)(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}e.formatBlock=i,e.defineBlock=(0,t.defineFormatter)("block",i)})),e1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBlock=void 0;var t=J0(),r=r0(),i=X0();e.getBlock=async function(e,{blockHash:n,blockNumber:o,blockTag:a,includeTransactions:s}={}){let c=a??"latest",l=s??!1,u=void 0!==o?(0,r.numberToHex)(o):void 0,d=null;if(d=n?await e.request({method:"eth_getBlockByHash",params:[n,l]}):await e.request({method:"eth_getBlockByNumber",params:[u||c,l]}),!d)throw new t.BlockNotFoundError({blockHash:n,blockNumber:o});return(e.chain?.formatters?.block?.format||i.formatBlock)(d)}})),t1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getGasPrice=void 0,e.getGasPrice=async function(e){let t=await e.request({method:"eth_gasPrice"});return BigInt(t)}})),r1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.internal_estimateMaxPriorityFeePerGas=e.estimateMaxPriorityFeePerGas=void 0;var t=Y0(),r=t0(),i=HX(),n=e1(),o=t1();async function a(e,a){let{block:s,chain:c=e.chain,request:l}=a||{};if("function"==typeof c?.fees?.defaultPriorityFee){let t=s||await(0,i.getAction)(e,n.getBlock,"getBlock")({});return c.fees.defaultPriorityFee({block:t,client:e,request:l})}if(typeof c?.fees?.defaultPriorityFee<"u")return c?.fees?.defaultPriorityFee;try{let t=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,r.hexToBigInt)(t)}catch{let[r,a]=await Promise.all([s?Promise.resolve(s):(0,i.getAction)(e,n.getBlock,"getBlock")({}),(0,i.getAction)(e,o.getGasPrice,"getGasPrice")({})]);if("bigint"!=typeof r.baseFeePerGas)throw new t.Eip1559FeesNotSupportedError;let c=a-r.baseFeePerGas;return c<0n?0n:c}}e.estimateMaxPriorityFeePerGas=async function(e,t){return a(e,t)},e.internal_estimateMaxPriorityFeePerGas=a})),i1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.internal_estimateFeesPerGas=e.estimateFeesPerGas=void 0;var t=Y0(),r=HX(),i=r1(),n=e1(),o=t1();async function a(e,a){let{block:s,chain:c=e.chain,request:l,type:u="eip1559"}=a||{},d=await(async()=>"function"==typeof c?.fees?.baseFeeMultiplier?c.fees.baseFeeMultiplier({block:s,client:e,request:l}):c?.fees?.baseFeeMultiplier??1.2)();if(d<1)throw new t.BaseFeeScalarError;let h=10**(d.toString().split(".")[1]?.length??0),p=e=>e*BigInt(Math.ceil(d*h))/BigInt(h),f=s||await(0,r.getAction)(e,n.getBlock,"getBlock")({});if("function"==typeof c?.fees?.estimateFeesPerGas)return c.fees.estimateFeesPerGas({block:s,client:e,multiply:p,request:l,type:u});if("eip1559"===u){if("bigint"!=typeof f.baseFeePerGas)throw new t.Eip1559FeesNotSupportedError;let r=l?.maxPriorityFeePerGas?l.maxPriorityFeePerGas:await(0,i.internal_estimateMaxPriorityFeePerGas)(e,{block:f,chain:c,request:l}),n=p(f.baseFeePerGas);return{maxFeePerGas:l?.maxFeePerGas??n+r,maxPriorityFeePerGas:r}}return{gasPrice:l?.gasPrice??p(await(0,r.getAction)(e,o.getGasPrice,"getGasPrice")({}))}}e.estimateFeesPerGas=async function(e,t){return a(e,t)},e.internal_estimateFeesPerGas=a})),n1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTransactionCount=void 0;var t=t0(),r=r0();e.getTransactionCount=async function(e,{address:i,blockTag:n="latest",blockNumber:o}){let a=await e.request({method:"eth_getTransactionCount",params:[i,o?(0,r.numberToHex)(o):n]});return(0,t.hexToNumber)(a)}})),o1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTransactionType=void 0;var t=j0();e.getTransactionType=function(e){if(e.type)return e.type;if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new t.InvalidSerializableTransactionError({transaction:e})}})),a1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prepareTransactionRequest=void 0;var t=C0(),r=i1(),i=s1(),n=e1(),o=n1(),a=F0(),s=Y0(),c=HX(),l=K0(),u=o1();e.prepareTransactionRequest=async function(e,d){let{account:h=e.account,chain:p,gas:f,nonce:g,type:m}=d;if(!h)throw new a.AccountNotFoundError;let b=(0,t.parseAccount)(h),y=await(0,c.getAction)(e,n.getBlock,"getBlock")({blockTag:"latest"}),w={...d,from:b.address};if(typeof g>"u"&&(w.nonce=await(0,c.getAction)(e,o.getTransactionCount,"getTransactionCount")({address:b.address,blockTag:"pending"})),typeof m>"u")try{w.type=(0,u.getTransactionType)(w)}catch{w.type="bigint"==typeof y.baseFeePerGas?"eip1559":"legacy"}if("eip1559"===w.type){let{maxFeePerGas:t,maxPriorityFeePerGas:i}=await(0,r.internal_estimateFeesPerGas)(e,{block:y,chain:p,request:w});if(typeof d.maxPriorityFeePerGas>"u"&&d.maxFeePerGas&&d.maxFeePerGas<i)throw new s.MaxFeePerGasTooLowError({maxPriorityFeePerGas:i});w.maxPriorityFeePerGas=i,w.maxFeePerGas=t}else{if(typeof d.maxFeePerGas<"u"||typeof d.maxPriorityFeePerGas<"u")throw new s.Eip1559FeesNotSupportedError;let{gasPrice:t}=await(0,r.internal_estimateFeesPerGas)(e,{block:y,chain:p,request:w,type:"legacy"});w.gasPrice=t}return typeof f>"u"&&(w.gas=await(0,c.getAction)(e,i.estimateGas,"estimateGas")({...w,account:{address:b.address,type:"json-rpc"}})),(0,l.assertRequest)(w),w}})),s1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.estimateGas=void 0;var t=C0(),r=F0(),i=r0(),n=W0(),o=V0(),a=Z0(),s=K0(),c=a1();e.estimateGas=async function(e,l){let u=l.account??e.account;if(!u)throw new r.AccountNotFoundError({docsPath:"/docs/actions/public/estimateGas"});let d=(0,t.parseAccount)(u);try{let{accessList:t,blockNumber:r,blockTag:n,data:u,gas:h,gasPrice:p,maxFeePerGas:f,maxPriorityFeePerGas:g,nonce:m,to:b,value:y,...w}="local"===d.type?await(0,c.prepareTransactionRequest)(e,l):l,v=(r?(0,i.numberToHex)(r):void 0)||n;(0,s.assertRequest)(l);let _=e.chain?.formatters?.transactionRequest?.format,x=(_||a.formatTransactionRequest)({...(0,o.extract)(w,{format:_}),from:d.address,accessList:t,data:u,gas:h,gasPrice:p,maxFeePerGas:f,maxPriorityFeePerGas:g,nonce:m,to:b,value:y}),E=await e.request({method:"eth_estimateGas",params:v?[x,v]:[x]});return BigInt(E)}catch(t){throw(0,n.getEstimateGasError)(t,{...l,account:d,chain:e.chain})}}})),c1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.estimateContractGas=void 0;var t=C0(),r=k0(),i=U0(),n=HX(),o=s1();e.estimateContractGas=async function(e,{abi:a,address:s,args:c,functionName:l,...u}){let d=(0,r.encodeFunctionData)({abi:a,args:c,functionName:l});try{return await(0,n.getAction)(e,o.estimateGas,"estimateGas")({data:d,to:s,...u})}catch(e){let r=u.account?(0,t.parseAccount)(u.account):void 0;throw(0,i.getContractError)(e,{abi:a,address:s,args:c,docsPath:"/docs/contract/estimateContractGas",functionName:l,sender:r?.address})}}})),l1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeEventLog=void 0;var t=KX(),r=p0(),i=S0(),n=zX(),o="/docs/contract/decodeEventLog";function a({param:e,value:t}){return"string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/)?t:((0,i.decodeAbiParameters)([e],t)||[])[0]}e.decodeEventLog=function({abi:e,data:s,strict:c,topics:l}){let u=c??!0,[d,...h]=l;if(!d)throw new t.AbiEventSignatureEmptyTopicsError({docsPath:o});let p=e.find((e=>"event"===e.type&&d===(0,r.getEventSelector)((0,n.formatAbiItem)(e))));if(!p||!("name"in p)||"event"!==p.type)throw new t.AbiEventSignatureNotFoundError(d,{docsPath:o});let{name:f,inputs:g}=p,m=g?.some((e=>!("name"in e&&e.name))),b=m?[]:{},y=g.filter((e=>"indexed"in e&&e.indexed));for(let e=0;e<y.length;e++){let r=y[e],i=h[e];if(!i)throw new t.DecodeLogTopicsMismatch({abiItem:p,param:r});b[r.name||e]=a({param:r,value:i})}let w=g.filter((e=>!("indexed"in e&&e.indexed)));if(w.length>0)if(s&&"0x"!==s)try{let e=(0,i.decodeAbiParameters)(w,s);if(e)if(m)b=[...b,...e];else for(let t=0;t<w.length;t++)b[w[t].name]=e[t]}catch(e){if(u)throw e instanceof t.AbiDecodingDataSizeTooSmallError?new t.DecodeLogDataMismatch({abiItem:p,data:e.data,params:e.params,size:e.size}):e}else if(u)throw new t.DecodeLogDataMismatch({abiItem:p,data:"0x",params:w,size:0});return{eventName:f,args:Object.values(b).length>0?b:void 0}}})),u1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatLog=void 0,e.formatLog=function(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}})),d1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLogs=void 0;var t=KX(),r=l1(),i=_0(),n=r0(),o=u1();e.getLogs=async function(e,{address:a,blockHash:s,fromBlock:c,toBlock:l,event:u,events:d,args:h,strict:p}={}){let f,g=p??!1,m=d??(u?[u]:void 0),b=[];return m&&(b=[m.flatMap((e=>(0,i.encodeEventTopics)({abi:[e],eventName:e.name,args:h})))],u&&(b=b[0])),f=s?await e.request({method:"eth_getLogs",params:[{address:a,topics:b,blockHash:s}]}):await e.request({method:"eth_getLogs",params:[{address:a,topics:b,fromBlock:"bigint"==typeof c?(0,n.numberToHex)(c):c,toBlock:"bigint"==typeof l?(0,n.numberToHex)(l):l}]}),f.map((e=>{try{let{eventName:t,args:i}=m?(0,r.decodeEventLog)({abi:m,data:e.data,topics:e.topics,strict:g}):{eventName:void 0,args:void 0};return(0,o.formatLog)(e,{args:i,eventName:t})}catch(r){let i,n;if(r instanceof t.DecodeLogDataMismatch||r instanceof t.DecodeLogTopicsMismatch){if(g)return;i=r.abiItem.name,n=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,o.formatLog)(e,{args:n?[]:{},eventName:i})}})).filter(Boolean)}})),h1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getContractEvents=void 0;var t=v0(),r=HX(),i=d1();e.getContractEvents=async function(e,{abi:n,address:o,args:a,blockHash:s,eventName:c,fromBlock:l,toBlock:u,strict:d}){let h=c?(0,t.getAbiItem)({abi:n,name:c}):void 0,p=h?void 0:n.filter((e=>"event"===e.type));return(0,r.getAction)(e,i.getLogs,"getLogs")({address:o,args:a,blockHash:s,event:h,events:p,fromBlock:l,toBlock:u,strict:d})}})),p1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeFunctionResult=void 0;var t=KX(),r=S0(),i=v0(),n="/docs/contract/decodeFunctionResult";e.decodeFunctionResult=function({abi:e,args:o,functionName:a,data:s}){let c=e[0];if(a&&(c=(0,i.getAbiItem)({abi:e,args:o,name:a}),!c))throw new t.AbiFunctionNotFoundError(a,{docsPath:n});if("function"!==c.type)throw new t.AbiFunctionNotFoundError(void 0,{docsPath:n});if(!c.outputs)throw new t.AbiFunctionOutputsNotFoundError(c.name,{docsPath:n});let l=(0,r.decodeAbiParameters)(c.outputs,s);return l&&l.length>1?l:l&&1===l.length?l[0]:void 0}})),f1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.universalSignatureValidatorAbi=e.smartAccountAbi=e.addressResolverAbi=e.textResolverAbi=e.universalResolverReverseAbi=e.universalResolverResolveAbi=e.multicall3Abi=void 0,e.multicall3Abi=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}];var t=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}];e.universalResolverResolveAbi=[...t,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],e.universalResolverReverseAbi=[...t,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],e.textResolverAbi=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],e.addressResolverAbi=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],e.smartAccountAbi=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],e.universalSignatureValidatorAbi=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}]})),g1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.aggregate3Signature=void 0,e.aggregate3Signature="0x82ad56cb"})),m1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidChainIdError=e.ClientChainNotConfiguredError=e.ChainNotFoundError=e.ChainMismatchError=e.ChainDoesNotSupportContract=void 0;var t=ZX(),r=class extends t.BaseError{constructor({blockNumber:e,chain:t,contract:r}){super(`Chain "${t.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...e&&r.blockCreated&&r.blockCreated>e?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${r.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}};e.ChainDoesNotSupportContract=r;var i=class extends t.BaseError{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID:  ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}};e.ChainMismatchError=i;var n=class extends t.BaseError{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join("\n    ")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}};e.ChainNotFoundError=n;var o=class extends t.BaseError{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}};e.ClientChainNotConfiguredError=o;var a=class extends t.BaseError{constructor({chainId:e}){super(`Chain ID "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}};e.InvalidChainIdError=a})),b1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getChainContractAddress=void 0;var t=m1();e.getChainContractAddress=function({blockNumber:e,chain:r,contract:i}){let n=r?.contracts?.[i];if(!n)throw new t.ChainDoesNotSupportContract({chain:r,contract:{name:i}});if(e&&n.blockCreated&&n.blockCreated>e)throw new t.ChainDoesNotSupportContract({blockNumber:e,chain:r,contract:{name:i,blockCreated:n.blockCreated}});return n.address}})),y1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCallError=void 0;var t=L0(),r=z0(),i=q0();e.getCallError=function(e,{docsPath:n,...o}){let a=(()=>{let t=(0,i.getNodeError)(e,o);return t instanceof r.UnknownNodeError?e:t})();return new t.CallExecutionError(a,{docsPath:n,...o})}})),w1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createBatchScheduler=void 0;var t=new Map;e.createBatchScheduler=function({fn:e,id:r,shouldSplitBatch:i,wait:n=0,sort:o}){let a=async()=>{let t=c();s();let r=t.map((({args:e})=>e));0!==r.length&&e(r).then((e=>{o&&Array.isArray(e)&&e.sort(o);for(let r=0;r<t.length;r++){let{pendingPromise:i}=t[r];i.resolve?.([e[r],e])}})).catch((e=>{for(let r=0;r<t.length;r++){let{pendingPromise:i}=t[r];i.reject?.(e)}}))},s=()=>t.delete(r),c=()=>t.get(r)||[],l=e=>t.set(r,[...c(),e]);return{flush:s,async schedule(e){let t={},r=new Promise(((e,r)=>{t.resolve=e,t.reject=r}));return i?.([...c().map((({args:e})=>e)),e])&&a(),c().length>0?(l({args:e,pendingPromise:t}),r):(l({args:e,pendingPromise:t}),setTimeout(a,n),r)}}}})),v1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OffchainLookupSenderMismatchError=e.OffchainLookupResponseMalformedError=e.OffchainLookupError=void 0;var t=T0(),r=ZX(),i=GX(),n=class extends r.BaseError{constructor({callbackSelector:e,cause:t,data:r,extraData:n,sender:o,urls:a}){super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],t.metaMessages?.length?"":[],"Offchain Gateway Call:",a&&["  Gateway URL(s):",...a.map((e=>`    ${(0,i.getUrl)(e)}`))],`  Sender: ${o}`,`  Data: ${r}`,`  Callback selector: ${e}`,`  Extra data: ${n}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}};e.OffchainLookupError=n;var o=class extends r.BaseError{constructor({result:e,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,i.getUrl)(r)}`,`Response: ${(0,t.stringify)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}};e.OffchainLookupResponseMalformedError=o;var a=class extends r.BaseError{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}};e.OffchainLookupSenderMismatchError=a})),_1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAddressEqual=void 0;var t=f0(),r=g0();e.isAddressEqual=function(e,i){if(!(0,r.isAddress)(e))throw new t.InvalidAddressError({address:e});if(!(0,r.isAddress)(i))throw new t.InvalidAddressError({address:i});return e.toLowerCase()===i.toLowerCase()}})),x1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ccipFetch=e.offchainLookup=e.offchainLookupAbiItem=e.offchainLookupSignature=void 0;var t=E1(),r=v1(),i=B0(),n=A0(),o=y0(),a=_1(),s=m0(),c=qX(),l=T0();async function u({data:e,sender:t,urls:n}){let o=new Error("An unknown error occurred.");for(let a=0;a<n.length;a++){let s=n[a],u=s.includes("{data}")?"GET":"POST",d="POST"===u?{data:e,sender:t}:void 0;try{let n,a=await fetch(s.replace("{sender}",t).replace("{data}",e),{body:JSON.stringify(d),method:u});if(n=a.headers.get("Content-Type")?.startsWith("application/json")?(await a.json()).data:await a.text(),!a.ok){o=new i.HttpRequestError({body:d,details:n?.error?(0,l.stringify)(n.error):a.statusText,headers:a.headers,status:a.status,url:s});continue}if(!(0,c.isHex)(n)){o=new r.OffchainLookupResponseMalformedError({result:n,url:s});continue}return n}catch(e){o=new i.HttpRequestError({body:d,details:e.message,url:s})}}throw o}e.offchainLookupSignature="0x556f1830",e.offchainLookupAbiItem={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]},e.offchainLookup=async function(i,{blockNumber:c,blockTag:l,data:d,to:h}){let{args:p}=(0,n.decodeErrorResult)({data:d,abi:[e.offchainLookupAbiItem]}),[f,g,m,b,y]=p;try{if(!(0,a.isAddressEqual)(h,f))throw new r.OffchainLookupSenderMismatchError({sender:f,to:h});let e=await u({data:m,sender:f,urls:g}),{data:n}=await(0,t.call)(i,{blockNumber:c,blockTag:l,data:(0,s.concat)([b,(0,o.encodeAbiParameters)([{type:"bytes"},{type:"bytes"}],[e,y])]),to:h});return n}catch(e){throw new r.OffchainLookupError({callbackSelector:b,cause:e,data:d,extraData:y,sender:f,urls:g})}},e.ccipFetch=u})),E1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRevertErrorData=e.call=void 0;var t=C0(),r=f1(),i=g1(),n=ZX(),o=m1(),a=L0(),s=p1(),c=k0(),l=b1(),u=r0(),d=y1(),h=V0(),p=Z0(),f=w1(),g=K0();function m(e){if(!(e instanceof n.BaseError))return;let t=e.walk();return"object"==typeof t.data?t.data.data:t.data}e.call=async function(e,n){let{account:b=e.account,batch:y=!!e.batch?.multicall,blockNumber:w,blockTag:v="latest",accessList:_,data:x,gas:E,gasPrice:C,maxFeePerGas:k,maxPriorityFeePerGas:P,nonce:I,to:S,value:A,...T}=n,O=b?(0,t.parseAccount)(b):void 0;try{(0,g.assertRequest)(n);let t=(w?(0,u.numberToHex)(w):void 0)||v,d=e.chain?.formatters?.transactionRequest?.format,m=(d||p.formatTransactionRequest)({...(0,h.extract)(T,{format:d}),from:O?.address,accessList:_,data:x,gas:E,gasPrice:C,maxFeePerGas:k,maxPriorityFeePerGas:P,nonce:I,to:S,value:A});if(y&&function({request:e}){let{data:t,to:r,...n}=e;return!(!t||t.startsWith(i.aggregate3Signature)||!r||Object.values(n).filter((e=>typeof e<"u")).length>0)}({request:m}))try{return await async function(e,t){let{batchSize:i=1024,wait:n=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:d,blockTag:h="latest",data:p,multicallAddress:g,to:m}=t,b=g;if(!b){if(!e.chain)throw new o.ClientChainNotConfiguredError;b=(0,l.getChainContractAddress)({blockNumber:d,chain:e.chain,contract:"multicall3"})}let y=(d?(0,u.numberToHex)(d):void 0)||h,{schedule:w}=(0,f.createBatchScheduler)({id:`${e.uid}.${y}`,wait:n,shouldSplitBatch:e=>e.reduce(((e,{data:t})=>e+(t.length-2)),0)>2*i,fn:async t=>{let i=t.map((e=>({allowFailure:!0,callData:e.data,target:e.to}))),n=(0,c.encodeFunctionData)({abi:r.multicall3Abi,args:[i],functionName:"aggregate3"}),o=await e.request({method:"eth_call",params:[{data:n,to:b},y]});return(0,s.decodeFunctionResult)({abi:r.multicall3Abi,args:[i],functionName:"aggregate3",data:o||"0x"})}}),[{returnData:v,success:_}]=await w({data:p,to:m});if(!_)throw new a.RawContractError({data:v});return"0x"===v?{data:void 0}:{data:v}}(e,{...m,blockNumber:w,blockTag:v})}catch(e){if(!(e instanceof o.ClientChainNotConfiguredError||e instanceof o.ChainDoesNotSupportContract))throw e}let b=await e.request({method:"eth_call",params:t?[m,t]:[m]});return"0x"===b?{data:void 0}:{data:b}}catch(t){let r=m(t),{offchainLookup:i,offchainLookupSignature:o}=await Promise.resolve().then((()=>x1()));if(r?.slice(0,10)===o&&S)return{data:await i(e,{data:r,to:S})};throw(0,d.getCallError)(t,{...n,account:O,chain:e.chain})}},e.getRevertErrorData=m})),C1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readContract=void 0;var t=p1(),r=k0(),i=U0(),n=HX(),o=E1();e.readContract=async function(e,{abi:a,address:s,args:c,functionName:l,...u}){let d=(0,r.encodeFunctionData)({abi:a,args:c,functionName:l});try{let{data:r}=await(0,n.getAction)(e,o.call,"call")({data:d,to:s,...u});return(0,t.decodeFunctionResult)({abi:a,args:c,functionName:l,data:r||"0x"})}catch(e){throw(0,i.getContractError)(e,{abi:a,address:s,args:c,docsPath:"/docs/contract/readContract",functionName:l})}}})),k1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.simulateContract=void 0;var t=C0(),r=p1(),i=k0(),n=U0(),o=HX(),a=E1();e.simulateContract=async function(e,{abi:s,address:c,args:l,dataSuffix:u,functionName:d,...h}){let p=h.account?(0,t.parseAccount)(h.account):void 0,f=(0,i.encodeFunctionData)({abi:s,args:l,functionName:d});try{let{data:t}=await(0,o.getAction)(e,a.call,"call")({batch:!1,data:`${f}${u?u.replace("0x",""):""}`,to:c,...h});return{result:(0,r.decodeFunctionResult)({abi:s,args:l,functionName:d,data:t||"0x"}),request:{abi:s,address:c,args:l,dataSuffix:u,functionName:d,...h}}}catch(e){throw(0,n.getContractError)(e,{abi:s,address:c,args:l,docsPath:"/docs/contract/simulateContract",functionName:d,sender:p?.address})}}})),P1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.observe=e.cleanupCache=e.listenersCache=void 0,e.listenersCache=new Map,e.cleanupCache=new Map;var t=0;e.observe=function(r,i,n){let o=++t,a=()=>e.listenersCache.get(r)||[],s=()=>{let t=e.cleanupCache.get(r);1===a().length&&t&&t(),(()=>{let t=a();e.listenersCache.set(r,t.filter((e=>e.id!==o)))})()},c=a();if(e.listenersCache.set(r,[...c,{id:o,fns:i}]),c&&c.length>0)return s;let l={};for(let e in i)l[e]=(...t)=>{let r=a();if(0!==r.length)for(let i of r)i.fns[e]?.(...t)};let u=n(l);return"function"==typeof u&&e.cleanupCache.set(r,u),s}})),I1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wait=void 0,e.wait=async function(e){return new Promise((t=>setTimeout(t,e)))}})),S1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.poll=void 0;var t=I1();e.poll=function(e,{emitOnBegin:r,initialWaitTime:i,interval:n}){let o=!0,a=()=>o=!1;return(async()=>{let s;r&&(s=await e({unpoll:a}));let c=await(i?.(s))??n;await(0,t.wait)(c);let l=async()=>{o&&(await e({unpoll:a}),await(0,t.wait)(n),l())};l()})(),a}})),A1=s((e=>{"use strict";function t(t){let r=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:r=>t.set(e,r)}),i=r(t,e.promiseCache),n=r(t,e.responseCache);return{clear:()=>{i.clear(),n.clear()},promise:i,response:n}}Object.defineProperty(e,"__esModule",{value:!0}),e.withCache=e.getCache=e.responseCache=e.promiseCache=void 0,e.promiseCache=new Map,e.responseCache=new Map,e.getCache=t,e.withCache=async function(e,{cacheKey:r,cacheTime:i=1/0}){let n=t(r),o=n.response.get();if(o&&i>0&&(new Date).getTime()-o.created.getTime()<i)return o.data;let a=n.promise.get();a||(a=e(),n.promise.set(a));try{let e=await a;return n.response.set({created:new Date,data:e}),e}finally{n.promise.clear()}}})),T1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBlockNumber=e.getBlockNumberCache=void 0;var t=A1(),r=e=>`blockNumber.${e}`;e.getBlockNumberCache=function(e){return(0,t.getCache)(r(e))},e.getBlockNumber=async function(e,{cacheTime:i=e.cacheTime,maxAge:n}={}){let o=await(0,t.withCache)((()=>e.request({method:"eth_blockNumber"})),{cacheKey:r(e.uid),cacheTime:n??i});return BigInt(o)}})),O1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFilterChanges=void 0;var t=KX(),r=l1(),i=u1();e.getFilterChanges=async function(e,{filter:n}){let o="strict"in n&&n.strict;return(await n.request({method:"eth_getFilterChanges",params:[n.id]})).map((e=>{if("string"==typeof e)return e;try{let{eventName:t,args:a}="abi"in n&&n.abi?(0,r.decodeEventLog)({abi:n.abi,data:e.data,topics:e.topics,strict:o}):{eventName:void 0,args:void 0};return(0,i.formatLog)(e,{args:a,eventName:t})}catch(r){let o,a;if(r instanceof t.DecodeLogDataMismatch||r instanceof t.DecodeLogTopicsMismatch){if("strict"in n&&n.strict)return;o=r.abiItem.name,a=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,i.formatLog)(e,{args:a?[]:{},eventName:o})}})).filter(Boolean)}})),R1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uninstallFilter=void 0,e.uninstallFilter=async function(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}})),N1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.watchContractEvent=void 0;var t=P1(),r=S1(),i=T0(),n=KX(),o=D0(),a=l1(),s=_0(),c=u1(),l=HX(),u=E0(),d=T1(),h=h1(),p=O1(),f=R1();e.watchContractEvent=function(e,{abi:g,address:m,args:b,batch:y=!0,eventName:w,onError:v,onLogs:_,poll:x,pollingInterval:E=e.pollingInterval,strict:C}){return(typeof x<"u"?x:"webSocket"!==e.transport.type)?(()=>{let n=(0,i.stringify)(["watchContractEvent",m,b,y,e.uid,w,E]),a=C??!1;return(0,t.observe)(n,{onLogs:_,onError:v},(t=>{let i,n,s=!1,c=(0,r.poll)((async()=>{if(s)try{let r;if(n)r=await(0,l.getAction)(e,p.getFilterChanges,"getFilterChanges")({filter:n});else{let t=await(0,l.getAction)(e,d.getBlockNumber,"getBlockNumber")({});r=i&&i!==t?await(0,l.getAction)(e,h.getContractEvents,"getContractEvents")({abi:g,address:m,args:b,eventName:w,fromBlock:i+1n,toBlock:t,strict:a}):[],i=t}if(0===r.length)return;if(y)t.onLogs(r);else for(let e of r)t.onLogs([e])}catch(e){n&&e instanceof o.InvalidInputRpcError&&(s=!1),t.onError?.(e)}else{try{n=await(0,l.getAction)(e,u.createContractEventFilter,"createContractEventFilter")({abi:g,address:m,args:b,eventName:w,strict:a})}catch{}s=!0}}),{emitOnBegin:!0,interval:E});return async()=>{n&&await(0,l.getAction)(e,f.uninstallFilter,"uninstallFilter")({filter:n}),c()}}))})():(()=>{let t=!0,r=()=>t=!1;return(async()=>{try{let i=w?(0,s.encodeEventTopics)({abi:g,eventName:w,args:b}):[],{unsubscribe:o}=await e.transport.subscribe({params:["logs",{address:m,topics:i}],onData(e){if(!t)return;let r=e.result;try{let{eventName:e,args:t}=(0,a.decodeEventLog)({abi:g,data:r.data,topics:r.topics,strict:C}),i=(0,c.formatLog)(r,{args:t,eventName:e});_([i])}catch(e){let t,i;if(e instanceof n.DecodeLogDataMismatch||e instanceof n.DecodeLogTopicsMismatch){if(C)return;t=e.abiItem.name,i=e.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}let o=(0,c.formatLog)(r,{args:i?[]:{},eventName:t});_([o])}},onError(e){v?.(e)}});r=o,t||r()}catch(e){v?.(e)}})(),r})()}})),M1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertCurrentChain=void 0;var t=m1();e.assertCurrentChain=function({chain:e,currentChainId:r}){if(!e)throw new t.ChainNotFoundError;if(r!==e.id)throw new t.ChainMismatchError({chain:e,currentChainId:r})}})),$1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTransactionError=void 0;var t=z0(),r=j0(),i=q0();e.getTransactionError=function(e,{docsPath:n,...o}){let a=(()=>{let r=(0,i.getNodeError)(e,o);return r instanceof t.UnknownNodeError?e:r})();return new r.TransactionExecutionError(a,{docsPath:n,...o})}})),j1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=void 0;var t=t0();e.getChainId=async function(e){let r=await e.request({method:"eth_chainId"});return(0,t.hexToNumber)(r)}})),L1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sendRawTransaction=void 0,e.sendRawTransaction=async function(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]})}})),B1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sendTransaction=void 0;var t=C0(),r=F0(),i=M1(),n=$1(),o=V0(),a=Z0(),s=HX(),c=K0(),l=j1(),u=a1(),d=L1();e.sendTransaction=async function(e,h){let{account:p=e.account,chain:f=e.chain,accessList:g,data:m,gas:b,gasPrice:y,maxFeePerGas:w,maxPriorityFeePerGas:v,nonce:_,to:x,value:E,...C}=h;if(!p)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});let k=(0,t.parseAccount)(p);try{let t;if((0,c.assertRequest)(h),null!==f&&(t=await(0,s.getAction)(e,l.getChainId,"getChainId")({}),(0,i.assertCurrentChain)({currentChainId:t,chain:f})),"local"===k.type){let r=await(0,s.getAction)(e,u.prepareTransactionRequest,"prepareTransactionRequest")({account:k,accessList:g,chain:f,data:m,gas:b,gasPrice:y,maxFeePerGas:w,maxPriorityFeePerGas:v,nonce:_,to:x,value:E,...C});t||(t=await(0,s.getAction)(e,l.getChainId,"getChainId")({}));let i=f?.serializers?.transaction,n=await k.signTransaction({...r,chainId:t},{serializer:i});return await(0,s.getAction)(e,d.sendRawTransaction,"sendRawTransaction")({serializedTransaction:n})}let r=e.chain?.formatters?.transactionRequest?.format,n=(r||a.formatTransactionRequest)({...(0,o.extract)(C,{format:r}),accessList:g,data:m,from:k.address,gas:b,gasPrice:y,maxFeePerGas:w,maxPriorityFeePerGas:v,nonce:_,to:x,value:E});return await e.request({method:"eth_sendTransaction",params:[n]})}catch(e){throw(0,n.getTransactionError)(e,{...h,account:k,chain:h.chain||void 0})}}})),D1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.writeContract=void 0;var t=k0(),r=HX(),i=B1();e.writeContract=async function(e,{abi:n,address:o,args:a,dataSuffix:s,functionName:c,...l}){let u=(0,t.encodeFunctionData)({abi:n,args:a,functionName:c});return await(0,r.getAction)(e,i.sendTransaction,"sendTransaction")({data:`${u}${s?s.replace("0x",""):""}`,to:o,...l})}})),U1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEventParameters=e.getFunctionParameters=e.getContract=void 0;var t=HX(),r=E0(),i=c1(),n=h1(),o=C1(),a=k1(),s=N1(),c=D1();function l(e){let t=e.length&&Array.isArray(e[0]);return{args:t?e[0]:[],options:(t?e[1]:e[0])??{}}}function u(e,t){let r=!1;return Array.isArray(e[0])?r=!0:1===e.length?r=t.inputs.some((e=>e.indexed)):2===e.length&&(r=!0),{args:r?e[0]:void 0,options:(r?e[1]:e[0])??{}}}e.getContract=function({abi:e,address:d,publicClient:h,walletClient:p}){let f=null!=h,g=null!=p,m={},b=!1,y=!1,w=!1;for(let t of e)if("function"===t.type?"view"===t.stateMutability||"pure"===t.stateMutability?b=!0:y=!0:"event"===t.type&&(w=!0),b&&y&&w)break;return f&&(b&&(m.read=new Proxy({},{get:(r,i)=>(...r)=>{let{args:n,options:a}=l(r);return(0,t.getAction)(h,o.readContract,"readContract")({abi:e,address:d,functionName:i,args:n,...a})}})),y&&(m.simulate=new Proxy({},{get:(r,i)=>(...r)=>{let{args:n,options:o}=l(r);return(0,t.getAction)(h,a.simulateContract,"simulateContract")({abi:e,address:d,functionName:i,args:n,...o})}})),w&&(m.createEventFilter=new Proxy({},{get:(i,n)=>(...i)=>{let o=e.find((e=>"event"===e.type&&e.name===n)),{args:a,options:s}=u(i,o);return(0,t.getAction)(h,r.createContractEventFilter,"createContractEventFilter")({abi:e,address:d,eventName:n,args:a,...s})}}),m.getEvents=new Proxy({},{get:(r,i)=>(...r)=>{let o=e.find((e=>"event"===e.type&&e.name===i)),{args:a,options:s}=u(r,o);return(0,t.getAction)(h,n.getContractEvents,"getContractEvents")({abi:e,address:d,eventName:i,args:a,...s})}}),m.watchEvent=new Proxy({},{get:(r,i)=>(...r)=>{let n=e.find((e=>"event"===e.type&&e.name===i)),{args:o,options:a}=u(r,n);return(0,t.getAction)(h,s.watchContractEvent,"watchContractEvent")({abi:e,address:d,eventName:i,args:o,...a})}}))),g&&y&&(m.write=new Proxy({},{get:(r,i)=>(...r)=>{let{args:n,options:o}=l(r);return(0,t.getAction)(p,c.writeContract,"writeContract")({abi:e,address:d,functionName:i,args:n,...o})}})),(f||g)&&y&&(m.estimateGas=new Proxy({},{get:(r,n)=>(...r)=>{let{args:o,options:a}=l(r),s=h??p;return(0,t.getAction)(s,i.estimateContractGas,"estimateContractGas")({abi:e,address:d,functionName:n,args:o,...a,account:a.account??p.account})}})),m.address=d,m.abi=e,m},e.getFunctionParameters=l,e.getEventParameters=u})),F1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.publicKeyToAddress=void 0;var t=I0(),r=h0();e.publicKeyToAddress=function(e){let i=(0,r.keccak256)(`0x${e.substring(4)}`).substring(26);return(0,t.checksumAddress)(`0x${i}`)}})),H1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.publicKeyToAddress=e.parseAccount=void 0;var t=C0();Object.defineProperty(e,"parseAccount",{enumerable:!0,get:function(){return t.parseAccount}});var r=F1();Object.defineProperty(e,"publicKeyToAddress",{enumerable:!0,get:function(){return r.publicKeyToAddress}})})),z1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uid=void 0;var t,r=256;e.uid=function(e=11){if(!t||r+e>512){t="",r=0;for(let e=0;e<256;e++)t+=(256+256*Math.random()|0).toString(16).substring(1)}return t.substring(r,r+++e)}})),q1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createClient=void 0;var t=H1(),r=z1();e.createClient=function(e){let{batch:i,cacheTime:n=e.pollingInterval??4e3,key:o="base",name:a="Base Client",pollingInterval:s=4e3,type:c="base"}=e,l=e.chain,u=e.account?(0,t.parseAccount)(e.account):void 0,{config:d,request:h,value:p}=e.transport({chain:l,pollingInterval:s}),f={account:u,batch:i,cacheTime:n,chain:l,key:o,name:a,pollingInterval:s,request:h,transport:{...d,...p},type:c,uid:(0,r.uid)()};return Object.assign(f,{extend:function e(t){return r=>{let i=r(t);for(let e in f)delete i[e];let n={...t,...i};return Object.assign(n,{extend:e(n)})}}(f)})}})),W1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withRetry=void 0;var t=I1();e.withRetry=function(e,{delay:r=100,retryCount:i=2,shouldRetry:n=(()=>!0)}={}){return new Promise(((o,a)=>{let s=async({count:c=0}={})=>{try{let t=await e();o(t)}catch(e){if(c<i&&await n({count:c,error:e}))return(async({error:e})=>{let i="function"==typeof r?r({count:c,error:e}):r;i&&await(0,t.wait)(i),s({count:c+1})})({error:e});a(e)}};s()}))}})),V1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildRequest=e.isDeterministicError=void 0;var t=ZX(),r=B0(),i=D0(),n=W1();e.isDeterministicError=e=>"code"in e?-1!==e.code&&-32004!==e.code&&-32005!==e.code&&-32042!==e.code&&-32603!==e.code:!!(e instanceof r.HttpRequestError&&e.status)&&(403!==e.status&&408!==e.status&&413!==e.status&&429!==e.status&&500!==e.status&&502!==e.status&&503!==e.status&&504!==e.status),e.buildRequest=function(o,{retryDelay:a=150,retryCount:s=3}={}){return async c=>(0,n.withRetry)((async()=>{try{return await o(c)}catch(e){let r=e;switch(r.code){case i.ParseRpcError.code:throw new i.ParseRpcError(r);case i.InvalidRequestRpcError.code:throw new i.InvalidRequestRpcError(r);case i.MethodNotFoundRpcError.code:throw new i.MethodNotFoundRpcError(r);case i.InvalidParamsRpcError.code:throw new i.InvalidParamsRpcError(r);case i.InternalRpcError.code:throw new i.InternalRpcError(r);case i.InvalidInputRpcError.code:throw new i.InvalidInputRpcError(r);case i.ResourceNotFoundRpcError.code:throw new i.ResourceNotFoundRpcError(r);case i.ResourceUnavailableRpcError.code:throw new i.ResourceUnavailableRpcError(r);case i.TransactionRejectedRpcError.code:throw new i.TransactionRejectedRpcError(r);case i.MethodNotSupportedRpcError.code:throw new i.MethodNotSupportedRpcError(r);case i.LimitExceededRpcError.code:throw new i.LimitExceededRpcError(r);case i.JsonRpcVersionUnsupportedError.code:throw new i.JsonRpcVersionUnsupportedError(r);case i.UserRejectedRequestError.code:throw new i.UserRejectedRequestError(r);case i.UnauthorizedProviderError.code:throw new i.UnauthorizedProviderError(r);case i.UnsupportedProviderMethodError.code:throw new i.UnsupportedProviderMethodError(r);case i.ProviderDisconnectedError.code:throw new i.ProviderDisconnectedError(r);case i.ChainDisconnectedError.code:throw new i.ChainDisconnectedError(r);case i.SwitchChainError.code:throw new i.SwitchChainError(r);case 5e3:throw new i.UserRejectedRequestError(r);default:throw e instanceof t.BaseError?e:new i.UnknownRpcError(r)}}}),{delay:({count:e,error:t})=>{if(t&&t instanceof r.HttpRequestError){let e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*parseInt(e)}return~~(1<<e)*a},retryCount:s,shouldRetry:({error:t})=>!(0,e.isDeterministicError)(t)})}})),G1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTransport=void 0;var t=V1();e.createTransport=function({key:e,name:r,request:i,retryCount:n=3,retryDelay:o=150,timeout:a,type:s},c){return{config:{key:e,name:r,request:i,retryCount:n,retryDelay:o,timeout:a,type:s},request:(0,t.buildRequest)(i,{retryCount:n,retryDelay:o}),value:c}}})),Z1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.custom=void 0;var t=G1();e.custom=function(e,r={}){let{key:i="custom",name:n="Custom Provider",retryDelay:o}=r;return({retryCount:a})=>(0,t.createTransport)({key:i,name:n,request:e.request.bind(e),retryCount:r.retryCount??a,retryDelay:o,type:"custom"})}})),K1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rankTransports=e.fallback=void 0;var t=V1(),r=I1(),i=G1();function n({chain:e,interval:t=4e3,onTransports:i,sampleCount:n=10,timeout:o=1e3,transports:a,weights:s={}}){let{stability:c=.7,latency:l=.3}=s,u=[],d=async()=>{let s=await Promise.all(a.map((async t=>{let r,i,n=t({chain:e,retryCount:0,timeout:o}),a=Date.now();try{await n.request({method:"net_listening"}),i=1}catch{i=0}finally{r=Date.now()}return{latency:r-a,success:i}})));u.push(s),u.length>n&&u.shift();let h=Math.max(...u.map((e=>Math.max(...e.map((({latency:e})=>e)))))),p=a.map(((e,t)=>{let r=u.map((e=>e[t].latency)),i=1-r.reduce(((e,t)=>e+t),0)/r.length/h,n=u.map((e=>e[t].success)),o=n.reduce(((e,t)=>e+t),0)/n.length;return 0===o?[0,t]:[l*i+c*o,t]})).sort(((e,t)=>t[0]-e[0]));i(p.map((([,e])=>a[e]))),await(0,r.wait)(t),d()};d()}e.fallback=function(e,r={}){let{key:o="fallback",name:a="Fallback",rank:s=!1,retryCount:c,retryDelay:l}=r;return({chain:r,pollingInterval:u=4e3,timeout:d})=>{let h=e,p=()=>{},f=(0,i.createTransport)({key:o,name:a,async request({method:e,params:i}){let n=async(o=0)=>{let a=h[o]({chain:r,retryCount:0,timeout:d});try{let t=await a.request({method:e,params:i});return p({method:e,params:i,response:t,transport:a,status:"success"}),t}catch(r){if(p({error:r,method:e,params:i,transport:a,status:"error"}),(0,t.isDeterministicError)(r)||o===h.length-1)throw r;return n(o+1)}};return n()},retryCount:c,retryDelay:l,type:"fallback"},{onResponse:e=>p=e,transports:h.map((e=>e({chain:r,retryCount:0})))});if(s){let e="object"==typeof s?s:{};n({chain:r,interval:e.interval??u,onTransports:e=>h=e,sampleCount:e.sampleCount,timeout:e.timeout,transports:h,weights:e.weights})}return f}},e.rankTransports=n})),Y1=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UrlRequiredError=void 0;var t=ZX(),r=class extends t.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}};e.UrlRequiredError=r}));var J1=a((()=>{})),Q1={};c(Q1,{WebSocket:()=>X1});var X1,e2=a((()=>{J1(),X1=function(){if(typeof WebSocket<"u")return WebSocket;if(typeof global.WebSocket<"u")return global.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}()})),t2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withTimeout=void 0,e.withTimeout=function(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:i}){return new Promise(((n,o)=>{(async()=>{let a;try{let s=new AbortController;r>0&&(a=setTimeout((()=>{i?s.abort():o(t)}),r)),n(await e({signal:s?.signal}))}catch(e){"AbortError"===e.name&&o(t),o(e)}finally{clearTimeout(a)}})()}))}})),r2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rpc=e.getSocket=e.socketsCache=void 0;var t=(e2(),h(Q1)),r=B0(),i=w1(),n=t2(),o=T0(),a=0;e.socketsCache=new Map,e.getSocket=async function(r){let n=e.socketsCache.get(r);if(n)return n;let{schedule:o}=(0,i.createBatchScheduler)({id:r,fn:async()=>{let i=new t.WebSocket(r),o=new Map,a=new Map,s=({data:e})=>{let t=JSON.parse(e),r="eth_subscription"===t.method,i=r?t.params.subscription:t.id,n=r?a:o,s=n.get(i);s&&s({data:e}),r||n.delete(i)},c=()=>{e.socketsCache.delete(r),i.removeEventListener("close",c),i.removeEventListener("message",s)};return i.addEventListener("close",c),i.addEventListener("message",s),i.readyState===t.WebSocket.CONNECTING&&await new Promise(((e,t)=>{i&&(i.onopen=e,i.onerror=t)})),n=Object.assign(i,{requests:o,subscriptions:a}),e.socketsCache.set(r,n),[n]}}),[a,[s]]=await o();return s},e.rpc={http:async function(e,{body:t,fetchOptions:i={},timeout:s=1e4}){let{headers:c,method:l,signal:u}=i;try{let d,h=await(0,n.withTimeout)((async({signal:r})=>await fetch(e,{...i,body:Array.isArray(t)?(0,o.stringify)(t.map((e=>({jsonrpc:"2.0",id:e.id??a++,...e})))):(0,o.stringify)({jsonrpc:"2.0",id:t.id??a++,...t}),headers:{...c,"Content-Type":"application/json"},method:l||"POST",signal:u||(s>0?r:void 0)})),{errorInstance:new r.TimeoutError({body:t,url:e}),timeout:s,signal:!0});if(d=h.headers.get("Content-Type")?.startsWith("application/json")?await h.json():await h.text(),!h.ok)throw new r.HttpRequestError({body:t,details:(0,o.stringify)(d.error)||h.statusText,headers:h.headers,status:h.status,url:e});return d}catch(i){throw i instanceof r.HttpRequestError||i instanceof r.TimeoutError?i:new r.HttpRequestError({body:t,details:i.message,url:e})}},webSocket:function(e,{body:t,onResponse:i}){if(e.readyState===e.CLOSED||e.readyState===e.CLOSING)throw new r.WebSocketRequestError({body:t,url:e.url,details:"Socket is closed."});let n=a++,o=({data:r})=>{let a=JSON.parse(r);"number"==typeof a.id&&n!==a.id||(i?.(a),"eth_subscribe"===t.method&&"string"==typeof a.result&&e.subscriptions.set(a.result,o),"eth_unsubscribe"===t.method&&e.subscriptions.delete(t.params?.[0]))};return e.requests.set(n,o),e.send(JSON.stringify({jsonrpc:"2.0",...t,id:n})),e},webSocketAsync:async function(t,{body:i,timeout:o=1e4}){return(0,n.withTimeout)((()=>new Promise((r=>e.rpc.webSocket(t,{body:i,onResponse:r})))),{errorInstance:new r.TimeoutError({body:i,url:t.url}),timeout:o})}}})),i2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.http=void 0;var t=B0(),r=Y1(),i=w1(),n=r2(),o=G1();e.http=function(e,a={}){let{batch:s,fetchOptions:c,key:l="http",name:u="HTTP JSON-RPC",retryDelay:d}=a;return({chain:h,retryCount:p,timeout:f})=>{let{batchSize:g=1e3,wait:m=0}="object"==typeof s?s:{},b=a.retryCount??p,y=f??a.timeout??1e4,w=e||h?.rpcUrls.default.http[0];if(!w)throw new r.UrlRequiredError;return(0,o.createTransport)({key:l,name:u,async request({method:r,params:o}){let a={method:r,params:o},{schedule:l}=(0,i.createBatchScheduler)({id:`${e}`,wait:m,shouldSplitBatch:e=>e.length>g,fn:e=>n.rpc.http(w,{body:e,fetchOptions:c,timeout:y}),sort:(e,t)=>e.id-t.id}),[{error:u,result:d}]=await(async e=>s?l(e):[await n.rpc.http(w,{body:e,fetchOptions:c,timeout:y})])(a);if(u)throw new t.RpcRequestError({body:a,error:u,url:w});return d},retryCount:b,retryDelay:d,timeout:y,type:"http"},{fetchOptions:c,url:e})}}})),n2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isNullUniversalResolverError=void 0;var t=P0(),r=ZX(),i=L0();e.isNullUniversalResolverError=function(e,n){if(!(e instanceof r.BaseError))return!1;let o=e.walk((e=>e instanceof i.ContractFunctionRevertedError));return o instanceof i.ContractFunctionRevertedError&&!!("ResolverNotFound"===o.data?.errorName||"ResolverWildcardNotSupported"===o.data?.errorName||o.reason?.includes("Wildcard on non-extended resolvers is not supported")||"reverse"===n&&o.reason===t.panicReasons[50])}})),o2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodedLabelToLabelhash=void 0;var t=qX();e.encodedLabelToLabelhash=function(e){if(66!==e.length||0!==e.indexOf("[")||65!==e.indexOf("]"))return null;let r=`0x${e.slice(1,65)}`;return(0,t.isHex)(r)?r:null}})),a2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.namehash=void 0;var t=m0(),r=i0(),i=r0(),n=h0(),o=o2();e.namehash=function(e){let a=new Uint8Array(32).fill(0);if(!e)return(0,i.bytesToHex)(a);let s=e.split(".");for(let e=s.length-1;e>=0;e-=1){let i=(0,o.encodedLabelToLabelhash)(s[e]),c=i?(0,r.toBytes)(i):(0,n.keccak256)((0,r.stringToBytes)(s[e]),"bytes");a=(0,n.keccak256)((0,t.concat)([a,c]),"bytes")}return(0,i.bytesToHex)(a)}})),s2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeLabelhash=void 0,e.encodeLabelhash=function(e){return`[${e.slice(2)}]`}})),c2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.labelhash=void 0;var t=i0(),r=r0(),i=h0(),n=o2();e.labelhash=function(e){let o=new Uint8Array(32).fill(0);return e?(0,n.encodedLabelToLabelhash)(e)||(0,i.keccak256)((0,t.stringToBytes)(e)):(0,r.bytesToHex)(o)}})),l2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packetToBytes=void 0;var t=i0(),r=s2(),i=c2();e.packetToBytes=function(e){let n=e.replace(/^\.|\.$/gm,"");if(0===n.length)return new Uint8Array(1);let o=new Uint8Array((0,t.stringToBytes)(n).byteLength+2),a=0,s=n.split(".");for(let e=0;e<s.length;e++){let n=(0,t.stringToBytes)(s[e]);n.byteLength>255&&(n=(0,t.stringToBytes)((0,r.encodeLabelhash)((0,i.labelhash)(s[e])))),o[a]=n.length,o.set(n,a+1),a+=n.length+1}return o.byteLength!==a+1?o.slice(0,a+1):o}})),u2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnsAddress=void 0;var t=f1(),r=p1(),i=k0(),n=b1(),o=e0(),a=r0(),s=n2(),c=a2(),l=l2(),u=HX(),d=C1();e.getEnsAddress=async function(e,{blockNumber:h,blockTag:p,coinType:f,name:g,universalResolverAddress:m}){let b=m;if(!b){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");b=(0,n.getChainContractAddress)({blockNumber:h,chain:e.chain,contract:"ensUniversalResolver"})}try{let n=(0,i.encodeFunctionData)({abi:t.addressResolverAbi,functionName:"addr",...null!=f?{args:[(0,c.namehash)(g),BigInt(f)]}:{args:[(0,c.namehash)(g)]}}),s=await(0,u.getAction)(e,d.readContract,"readContract")({address:b,abi:t.universalResolverResolveAbi,functionName:"resolve",args:[(0,a.toHex)((0,l.packetToBytes)(g)),n],blockNumber:h,blockTag:p});if("0x"===s[0])return null;let m=(0,r.decodeFunctionResult)({abi:t.addressResolverAbi,args:null!=f?[(0,c.namehash)(g),BigInt(f)]:void 0,functionName:"addr",data:s[0]});return"0x"===m||"0x00"===(0,o.trim)(m)?null:m}catch(e){if((0,s.isNullUniversalResolverError)(e,"resolve"))return null;throw e}}})),d2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnsAvatarUnsupportedNamespaceError=e.EnsAvatarUriResolutionError=e.EnsAvatarInvalidNftUriError=e.EnsAvatarInvalidMetadataError=void 0;var t=ZX(),r=class extends t.BaseError{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}};e.EnsAvatarInvalidMetadataError=r;var i=class extends t.BaseError{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}};e.EnsAvatarInvalidNftUriError=i;var n=class extends t.BaseError{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}};e.EnsAvatarUriResolutionError=n;var o=class extends t.BaseError{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}};e.EnsAvatarUnsupportedNamespaceError=o})),h2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNftTokenUri=e.parseNftUri=e.parseAvatarUri=e.getMetadataAvatarUri=e.getJsonImage=e.resolveAvatarUri=e.getGateway=e.isImageUri=void 0;var t=C1(),r=d2(),i=/(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,n=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,o=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,a=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function s(e){try{let t=await fetch(e,{method:"HEAD"});return 200===t.status&&t.headers.get("content-type")?.startsWith("image/")}catch(t){return!("object"==typeof t&&typeof t.response<"u"||!globalThis.hasOwnProperty("Image"))&&new Promise((t=>{let r=new Image;r.onload=()=>{t(!0)},r.onerror=()=>{t(!1)},r.src=e}))}}function c(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function l({uri:e,gatewayUrls:t}){let s=o.test(e);if(s)return{uri:e,isOnChain:!0,isEncoded:s};let l=c(t?.ipfs,"https://ipfs.io"),u=c(t?.arweave,"https://arweave.net"),d=e.match(i),{protocol:h,subpath:p,target:f,subtarget:g=""}=d?.groups||{},m="ipns:/"===h||"ipns/"===p,b="ipfs:/"===h||"ipfs/"===p||n.test(e);if(e.startsWith("http")&&!m&&!b){let r=e;return t?.arweave&&(r=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:r,isOnChain:!1,isEncoded:!1}}if((m||b)&&f)return{uri:`${l}/${m?"ipns":"ipfs"}/${f}${g}`,isOnChain:!1,isEncoded:!1};if("ar:/"===h&&f)return{uri:`${u}/${f}${g||""}`,isOnChain:!1,isEncoded:!1};let y=e.replace(a,"");if(y.startsWith("<svg")&&(y=`data:image/svg+xml;base64,${btoa(y)}`),y.startsWith("data:")||y.startsWith("{"))return{uri:y,isOnChain:!0,isEncoded:!1};throw new r.EnsAvatarUriResolutionError({uri:e})}function u(e){if("object"!=typeof e||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new r.EnsAvatarInvalidMetadataError({data:e});return e.image||e.image_url||e.image_data}async function d({gatewayUrls:e,uri:t}){let{uri:i,isOnChain:n}=l({uri:t,gatewayUrls:e});if(n||await s(i))return i;throw new r.EnsAvatarUriResolutionError({uri:t})}e.isImageUri=s,e.getGateway=c,e.resolveAvatarUri=l,e.getJsonImage=u,e.getMetadataAvatarUri=async function({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then((e=>e.json()));return await d({gatewayUrls:e,uri:u(r)})}catch{throw new r.EnsAvatarUriResolutionError({uri:t})}},e.parseAvatarUri=d,e.parseNftUri=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[i,n,o]=t.split("/"),[a,s]=i.split(":"),[c,l]=n.split(":");if(!a||"eip155"!==a.toLowerCase())throw new r.EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!s)throw new r.EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!l)throw new r.EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!o)throw new r.EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!c)throw new r.EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:parseInt(s),namespace:c.toLowerCase(),contractAddress:l,tokenID:o}},e.getNftTokenUri=async function(e,{nft:i}){if("erc721"===i.namespace)return(0,t.readContract)(e,{address:i.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(i.tokenID)]});if("erc1155"===i.namespace)return(0,t.readContract)(e,{address:i.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(i.tokenID)]});throw new r.EnsAvatarUnsupportedNamespaceError({namespace:i.namespace})}})),p2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseAvatarRecord=void 0;var t=h2();e.parseAvatarRecord=async function(e,{gatewayUrls:r,record:i}){return/eip155:/i.test(i)?async function(e,{gatewayUrls:r,record:i}){let n=(0,t.parseNftUri)(i),o=await(0,t.getNftTokenUri)(e,{nft:n}),{uri:a,isOnChain:s,isEncoded:c}=(0,t.resolveAvatarUri)({uri:o,gatewayUrls:r});if(s&&(a.includes("data:application/json;base64,")||a.startsWith("{"))){let e=c?atob(a.replace("data:application/json;base64,","")):a,i=JSON.parse(e);return(0,t.parseAvatarUri)({uri:(0,t.getJsonImage)(i),gatewayUrls:r})}let l=n.tokenID;return"erc1155"===n.namespace&&(l=l.replace("0x","").padStart(64,"0")),(0,t.getMetadataAvatarUri)({gatewayUrls:r,uri:a.replace(/(?:0x)?{id}/,l)})}(e,{gatewayUrls:r,record:i}):(0,t.parseAvatarUri)({uri:i,gatewayUrls:r})}})),f2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnsText=void 0;var t=f1(),r=p1(),i=k0(),n=b1(),o=r0(),a=n2(),s=a2(),c=l2(),l=HX(),u=C1();e.getEnsText=async function(e,{blockNumber:d,blockTag:h,name:p,key:f,universalResolverAddress:g}){let m=g;if(!m){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");m=(0,n.getChainContractAddress)({blockNumber:d,chain:e.chain,contract:"ensUniversalResolver"})}try{let n=await(0,l.getAction)(e,u.readContract,"readContract")({address:m,abi:t.universalResolverResolveAbi,functionName:"resolve",args:[(0,o.toHex)((0,c.packetToBytes)(p)),(0,i.encodeFunctionData)({abi:t.textResolverAbi,functionName:"text",args:[(0,s.namehash)(p),f]})],blockNumber:d,blockTag:h});if("0x"===n[0])return null;let a=(0,r.decodeFunctionResult)({abi:t.textResolverAbi,functionName:"text",data:n[0]});return""===a?null:a}catch(e){if((0,a.isNullUniversalResolverError)(e,"resolve"))return null;throw e}}})),g2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnsAvatar=void 0;var t=p2(),r=HX(),i=f2();e.getEnsAvatar=async function(e,{blockNumber:n,blockTag:o,gatewayUrls:a,name:s,universalResolverAddress:c}){let l=await(0,r.getAction)(e,i.getEnsText,"getEnsText")({blockNumber:n,blockTag:o,key:"avatar",name:s,universalResolverAddress:c});if(!l)return null;try{return await(0,t.parseAvatarRecord)(e,{record:l,gatewayUrls:a})}catch{return null}}})),m2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnsName=void 0;var t=f1(),r=b1(),i=r0(),n=n2(),o=l2(),a=HX(),s=C1();e.getEnsName=async function(e,{address:c,blockNumber:l,blockTag:u,universalResolverAddress:d}){let h=d;if(!h){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");h=(0,r.getChainContractAddress)({blockNumber:l,chain:e.chain,contract:"ensUniversalResolver"})}let p=`${c.toLowerCase().substring(2)}.addr.reverse`;try{let[r,n]=await(0,a.getAction)(e,s.readContract,"readContract")({address:h,abi:t.universalResolverReverseAbi,functionName:"reverse",args:[(0,i.toHex)((0,o.packetToBytes)(p))],blockNumber:l,blockTag:u});return c.toLowerCase()!==n.toLowerCase()?null:r}catch(e){if((0,n.isNullUniversalResolverError)(e,"reverse"))return null;throw e}}})),b2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnsResolver=void 0;var t=b1(),r=r0(),i=l2(),n=HX(),o=C1();e.getEnsResolver=async function(e,{blockNumber:a,blockTag:s,name:c,universalResolverAddress:l}){let u=l;if(!u){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");u=(0,t.getChainContractAddress)({blockNumber:a,chain:e.chain,contract:"ensUniversalResolver"})}let[d]=await(0,n.getAction)(e,o.readContract,"readContract")({address:u,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,r.toHex)((0,i.packetToBytes)(c))],blockNumber:a,blockTag:s});return d}})),y2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createBlockFilter=void 0;var t=x0();e.createBlockFilter=async function(e){let r=(0,t.createFilterRequestScope)(e,{method:"eth_newBlockFilter"}),i=await e.request({method:"eth_newBlockFilter"});return{id:i,request:r(i),type:"block"}}})),w2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createEventFilter=void 0;var t=_0(),r=r0(),i=x0();e.createEventFilter=async function(e,{address:n,args:o,event:a,events:s,fromBlock:c,strict:l,toBlock:u}={}){let d=s??(a?[a]:void 0),h=(0,i.createFilterRequestScope)(e,{method:"eth_newFilter"}),p=[];d&&(p=[d.flatMap((e=>(0,t.encodeEventTopics)({abi:[e],eventName:e.name,args:o})))],a&&(p=p[0]));let f=await e.request({method:"eth_newFilter",params:[{address:n,fromBlock:"bigint"==typeof c?(0,r.numberToHex)(c):c,toBlock:"bigint"==typeof u?(0,r.numberToHex)(u):u,...p.length?{topics:p}:{}}]});return{abi:d,args:o,eventName:a?a.name:void 0,fromBlock:c,id:f,request:h(f),strict:l,toBlock:u,type:"event"}}})),v2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createPendingTransactionFilter=void 0;var t=x0();e.createPendingTransactionFilter=async function(e){let r=(0,t.createFilterRequestScope)(e,{method:"eth_newPendingTransactionFilter"}),i=await e.request({method:"eth_newPendingTransactionFilter"});return{id:i,request:r(i),type:"transaction"}}})),_2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBalance=void 0;var t=r0();e.getBalance=async function(e,{address:r,blockNumber:i,blockTag:n="latest"}){let o=i?(0,t.numberToHex)(i):void 0,a=await e.request({method:"eth_getBalance",params:[r,o||n]});return BigInt(a)}})),x2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBlockTransactionCount=void 0;var t=t0(),r=r0();e.getBlockTransactionCount=async function(e,{blockHash:i,blockNumber:n,blockTag:o="latest"}={}){let a,s=void 0!==n?(0,r.numberToHex)(n):void 0;return a=i?await e.request({method:"eth_getBlockTransactionCountByHash",params:[i]}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[s||o]}),(0,t.hexToNumber)(a)}})),E2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBytecode=void 0;var t=r0();e.getBytecode=async function(e,{address:r,blockNumber:i,blockTag:n="latest"}){let o=void 0!==i?(0,t.numberToHex)(i):void 0,a=await e.request({method:"eth_getCode",params:[r,o||n]});if("0x"!==a)return a}})),C2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatFeeHistory=void 0,e.formatFeeHistory=function(e){return{baseFeePerGas:e.baseFeePerGas.map((e=>BigInt(e))),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map((e=>e.map((e=>BigInt(e)))))}}})),k2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFeeHistory=void 0;var t=r0(),r=C2();e.getFeeHistory=async function(e,{blockCount:i,blockNumber:n,blockTag:o="latest",rewardPercentiles:a}){let s=n?(0,t.numberToHex)(n):void 0,c=await e.request({method:"eth_feeHistory",params:[(0,t.numberToHex)(i),s||o,a]});return(0,r.formatFeeHistory)(c)}})),P2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFilterLogs=void 0;var t=KX(),r=l1(),i=u1();e.getFilterLogs=async function(e,{filter:n}){let o=n.strict??!1;return(await n.request({method:"eth_getFilterLogs",params:[n.id]})).map((e=>{try{let{eventName:t,args:a}="abi"in n&&n.abi?(0,r.decodeEventLog)({abi:n.abi,data:e.data,topics:e.topics,strict:o}):{eventName:void 0,args:void 0};return(0,i.formatLog)(e,{args:a,eventName:t})}catch(r){let o,a;if(r instanceof t.DecodeLogDataMismatch||r instanceof t.DecodeLogTopicsMismatch){if("strict"in n&&n.strict)return;o=r.abiItem.name,a=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return(0,i.formatLog)(e,{args:a?[]:{},eventName:o})}})).filter(Boolean)}})),I2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defineChain=void 0,e.defineChain=function(e,t={}){let{fees:r=e.fees,formatters:i=e.formatters,serializers:n=e.serializers}=t;return{...e,fees:r,formatters:i,serializers:n}}})),S2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extractChain=void 0,e.extractChain=function({chains:e,id:t}){return e.find((e=>e.id===t))}})),A2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.integerRegex=e.bytesRegex=e.arrayRegex=void 0,e.arrayRegex=/^(.*)\[([0-9]*)\]$/,e.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,e.integerRegex=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/})),T2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hashDomain=e.hashTypedData=void 0;var t=y0(),r=m0(),i=r0(),n=h0(),o=O2();function a({domain:e,types:t}){return s({data:e,primaryType:"EIP712Domain",types:t})}function s({data:e,primaryType:t,types:r}){let i=c({data:e,primaryType:t,types:r});return(0,n.keccak256)(i)}function c({data:e,primaryType:r,types:i}){let n=[{type:"bytes32"}],o=[l({primaryType:r,types:i})];for(let t of i[r]){let[r,a]=d({types:i,name:t.name,type:t.type,value:e[t.name]});n.push(r),o.push(a)}return(0,t.encodeAbiParameters)(n,o)}function l({primaryType:e,types:t}){let r=(0,i.toHex)(function({primaryType:e,types:t}){let r="",i=u({primaryType:e,types:t});i.delete(e);let n=[e,...Array.from(i).sort()];for(let e of n)r+=`${e}(${t[e].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`;return r}({primaryType:e,types:t}));return(0,n.keccak256)(r)}function u({primaryType:e,types:t},r=new Set){let i=e.match(/^\w*/u)?.[0];if(r.has(i)||void 0===t[i])return r;r.add(i);for(let e of t[i])u({primaryType:e.type,types:t},r);return r}function d({types:e,name:r,type:o,value:a}){if(void 0!==e[o])return[{type:"bytes32"},(0,n.keccak256)(c({data:a,primaryType:o,types:e}))];if("bytes"===o)return a="0x"+((a.length%2?"0":"")+a.slice(2)),[{type:"bytes32"},(0,n.keccak256)(a)];if("string"===o)return[{type:"bytes32"},(0,n.keccak256)((0,i.toHex)(a))];if(o.lastIndexOf("]")===o.length-1){let i=o.slice(0,o.lastIndexOf("[")),s=a.map((t=>d({name:r,type:i,types:e,value:t})));return[{type:"bytes32"},(0,n.keccak256)((0,t.encodeAbiParameters)(s.map((([e])=>e)),s.map((([,e])=>e))))]}return[{type:o},a]}e.hashTypedData=function({domain:e,message:t,primaryType:i,types:c}){let l=typeof e>"u"?{}:e,u={EIP712Domain:(0,o.getTypesForEIP712Domain)({domain:l}),...c};(0,o.validateTypedData)({domain:l,message:t,primaryType:i,types:u});let d=["0x1901"];return l&&d.push(a({domain:l,types:u})),"EIP712Domain"!==i&&d.push(s({data:t,primaryType:i,types:u})),(0,n.keccak256)((0,r.concat)(d))},e.hashDomain=a})),O2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.domainSeparator=e.getTypesForEIP712Domain=e.validateTypedData=void 0;var t=KX(),r=f0(),i=g0(),n=WX(),o=r0(),a=A2(),s=T2();function c({domain:e}){return["string"==typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},"number"==typeof e?.chainId&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}e.validateTypedData=function({domain:e,message:s,primaryType:c,types:l}){let u=l,d=(e,s)=>{for(let c of e){let{name:e,type:l}=c,h=l,p=s[e],f=h.match(a.integerRegex);if(f&&("number"==typeof p||"bigint"==typeof p)){let[e,t,r]=f;(0,o.numberToHex)(p,{signed:"int"===t,size:parseInt(r)/8})}if("address"===h&&"string"==typeof p&&!(0,i.isAddress)(p))throw new r.InvalidAddressError({address:p});let g=h.match(a.bytesRegex);if(g){let[e,r]=g;if(r&&(0,n.size)(p)!==parseInt(r))throw new t.BytesSizeMismatchError({expectedSize:parseInt(r),givenSize:(0,n.size)(p)})}let m=u[h];m&&d(m,p)}};if(u.EIP712Domain&&e&&d(u.EIP712Domain,e),"EIP712Domain"!==c){let e=u[c];d(e,s)}},e.getTypesForEIP712Domain=c,e.domainSeparator=function({domain:e}){return(0,s.hashDomain)({domain:e,types:{EIP712Domain:c({domain:e})}})}})),R2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeFunctionData=void 0;var t=KX(),r=b0(),i=w0(),n=S0(),o=zX();e.decodeFunctionData=function({abi:e,data:a}){let s=(0,r.slice)(a,0,4),c=e.find((e=>"function"===e.type&&s===(0,i.getFunctionSelector)((0,o.formatAbiItem)(e))));if(!c)throw new t.AbiFunctionSignatureNotFoundError(s,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:c.name,args:"inputs"in c&&c.inputs&&c.inputs.length>0?(0,n.decodeAbiParameters)(c.inputs,(0,r.slice)(a,4)):void 0}}})),N2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeDeployData=void 0;var t=KX(),r=m0(),i=y0(),n="/docs/contract/encodeDeployData";e.encodeDeployData=function({abi:e,args:o,bytecode:a}){if(!o||0===o.length)return a;let s=e.find((e=>"type"in e&&"constructor"===e.type));if(!s)throw new t.AbiConstructorNotFoundError({docsPath:n});if(!("inputs"in s))throw new t.AbiConstructorParamsNotFoundError({docsPath:n});if(!s.inputs||0===s.inputs.length)throw new t.AbiConstructorParamsNotFoundError({docsPath:n});let c=(0,i.encodeAbiParameters)(s.inputs,o);return(0,r.concatHex)([a,c])}})),M2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeErrorResult=void 0;var t=KX(),r=m0(),i=w0(),n=y0(),o=zX(),a=v0(),s="/docs/contract/encodeErrorResult";e.encodeErrorResult=function({abi:e,errorName:c,args:l}){let u=e[0];if(c&&(u=(0,a.getAbiItem)({abi:e,args:l,name:c}),!u))throw new t.AbiErrorNotFoundError(c,{docsPath:s});if("error"!==u.type)throw new t.AbiErrorNotFoundError(void 0,{docsPath:s});let d=(0,o.formatAbiItem)(u),h=(0,i.getFunctionSelector)(d),p="0x";if(l&&l.length>0){if(!u.inputs)throw new t.AbiErrorInputsNotFoundError(u.name,{docsPath:s});p=(0,n.encodeAbiParameters)(u.inputs,l)}return(0,r.concatHex)([h,p])}})),$2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeFunctionResult=void 0;var t=KX(),r=y0(),i=v0();e.encodeFunctionResult=function({abi:e,functionName:n,result:o}){let a=e[0];if(n&&(a=(0,i.getAbiItem)({abi:e,name:n}),!a))throw new t.AbiFunctionNotFoundError(n,{docsPath:"/docs/contract/encodeFunctionResult"});if("function"!==a.type)throw new t.AbiFunctionNotFoundError(void 0,{docsPath:"/docs/contract/encodeFunctionResult"});if(!a.outputs)throw new t.AbiFunctionOutputsNotFoundError(a.name,{docsPath:"/docs/contract/encodeFunctionResult"});let s=Array.isArray(o)?o:[o];return 0===a.outputs.length&&!s[0]&&(s=[]),(0,r.encodeAbiParameters)(a.outputs,s)}})),j2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodePacked=void 0;var t=KX(),r=f0(),i=g0(),n=m0(),o=QX(),a=r0(),s=A2();function c(e,l,u=!1){if("address"===e){let e=l;if(!(0,i.isAddress)(e))throw new r.InvalidAddressError({address:e});return(0,o.pad)(e.toLowerCase(),{size:u?32:null})}if("string"===e)return(0,a.stringToHex)(l);if("bytes"===e)return l;if("bool"===e)return(0,o.pad)((0,a.boolToHex)(l),{size:u?32:1});let d=e.match(s.integerRegex);if(d){let[e,t,r="256"]=d,i=parseInt(r)/8;return(0,a.numberToHex)(l,{size:u?32:i,signed:"int"===t})}let h=e.match(s.bytesRegex);if(h){let[e,r]=h;if(parseInt(r)!==(l.length-2)/2)throw new t.BytesSizeMismatchError({expectedSize:parseInt(r),givenSize:(l.length-2)/2});return(0,o.pad)(l,{dir:"right",size:u?32:null})}let p=e.match(s.arrayRegex);if(p&&Array.isArray(l)){let[e,t]=p,r=[];for(let e=0;e<l.length;e++)r.push(c(t,l[e],!0));return 0===r.length?"0x":(0,n.concatHex)(r)}throw new t.UnsupportedPackedAbiType(e)}e.encodePacked=function(e,r){if(e.length!==r.length)throw new t.AbiEncodingLengthMismatchError({expectedLength:e.length,givenLength:r.length});let i=[];for(let t=0;t<e.length;t++){let n=e[t],o=r[t];i.push(c(n,o))}return(0,n.concatHex)(i)}})),L2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isBytes=void 0,e.isBytes=function(e){return!(!e||"object"!=typeof e||!("BYTES_PER_ELEMENT"in e))&&(1===e.BYTES_PER_ELEMENT&&"Uint8Array"===e.constructor.name)}})),B2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PositionOutOfBoundsError=e.NegativeOffsetError=void 0;var t=ZX(),r=class extends t.BaseError{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}};e.NegativeOffsetError=r;var i=class extends t.BaseError{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}};e.PositionOutOfBoundsError=i})),D2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCursor=void 0;var t=B2(),r={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,assertPosition(e){if(e<0||e>this.bytes.length-1)throw new t.PositionOutOfBoundsError({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new t.NegativeOffsetError({offset:e});let r=this.position-e;this.assertPosition(r),this.position=r},incrementPosition(e){if(e<0)throw new t.NegativeOffsetError({offset:e});let r=this.position+e;this.assertPosition(r),this.position=r},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){let e=this.inspectByte();return this.position++,e},readBytes(e){let t=this.inspectBytes(e);return this.position+=e,t},readUint8(){let e=this.inspectUint8();return this.position+=1,e},readUint16(){let e=this.inspectUint16();return this.position+=2,e},readUint24(){let e=this.inspectUint24();return this.position+=3,e},readUint32(){let e=this.inspectUint32();return this.position+=4,e},setPosition(e){this.assertPosition(e),this.position=e}};e.createCursor=function(e){let t=Object.create(r);return t.bytes=e,t.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),t}})),U2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hexToRlp=e.bytesToRlp=e.toRlp=void 0;var t=q5(),r=D2(),i=i0(),n=r0();function o(e,t="hex"){let i=a(e),o=(0,r.createCursor)(new Uint8Array(i.length));return i.encode(o),"hex"===t?(0,n.bytesToHex)(o.bytes):o.bytes}function a(e){return Array.isArray(e)?function(e){let t=e.reduce(((e,t)=>e+t.length),0),r=s(t);return{length:t<=55?1+t:1+r+t,encode(i){t<=55?i.pushByte(192+t):(i.pushByte(247+r),1===r?i.pushUint8(t):2===r?i.pushUint16(t):3===r?i.pushUint24(t):i.pushUint32(t));for(let{encode:t}of e)t(i)}}}(e.map((e=>a(e)))):function(e){let t="string"==typeof e?(0,i.hexToBytes)(e):e,r=s(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+r),1===r?e.pushUint8(t.length):2===r?e.pushUint16(t.length):3===r?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(e)}function s(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new t.BaseError("Length is too large.")}e.toRlp=o,e.bytesToRlp=function(e,t="bytes"){return o(e,t)},e.hexToRlp=function(e,t="hex"){return o(e,t)}})),F2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCreate2Address=e.getCreateAddress=e.getContractAddress=void 0;var t=m0(),r=L2(),i=QX(),n=b0(),o=i0(),a=U2(),s=h0(),c=I0();function l(e){let t=(0,o.toBytes)((0,c.getAddress)(e.from)),r=(0,o.toBytes)(e.nonce);return 0===r[0]&&(r=new Uint8Array([])),(0,c.getAddress)(`0x${(0,s.keccak256)((0,a.toRlp)([t,r],"bytes")).slice(26)}`)}function u(e){let a=(0,o.toBytes)((0,c.getAddress)(e.from)),l=(0,i.pad)((0,r.isBytes)(e.salt)?e.salt:(0,o.toBytes)(e.salt),{size:32}),u="bytecodeHash"in e?(0,r.isBytes)(e.bytecodeHash)?e.bytecodeHash:(0,o.toBytes)(e.bytecodeHash):(0,s.keccak256)(e.bytecode,"bytes");return(0,c.getAddress)((0,n.slice)((0,s.keccak256)((0,t.concat)([(0,o.toBytes)("0xff"),a,l,u])),12))}e.getContractAddress=function(e){return"CREATE2"===e.opcode?u(e):l(e)},e.getCreateAddress=l,e.getCreate2Address=u})),H2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extractFunctionType=e.extractFunctionParams=e.extractFunctionName=e.extractFunctionParts=void 0;var t=/((function|event)\s)?(.*)(\((.*)\))/;function r(e){let r=e.match(t),i=r?.[2]||void 0,n=r?.[3];return{type:i,name:n,params:r?.[5]||void 0}}e.extractFunctionParts=r,e.extractFunctionName=function(e){return r(e).name},e.extractFunctionParams=function(e){return r(e).params?.split(",").map((e=>e.trim().split(" ")))?.map((e=>({type:e[0],name:"indexed"===e[1]?e[2]:e[1],..."indexed"===e[1]?{indexed:!0}:{}})))},e.extractFunctionType=function(e){return r(e).type}})),z2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransactionReceipt=e.formatTransactionReceipt=void 0;var t=t0(),r=G0(),i=u1(),n=Q0(),o={"0x0":"reverted","0x1":"success"};function a(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>(0,i.formatLog)(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,t.hexToNumber)(e.transactionIndex):null,status:e.status?o[e.status]:null,type:e.type?n.transactionType[e.type]||e.type:null}}e.formatTransactionReceipt=a,e.defineTransactionReceipt=(0,r.defineFormatter)("transactionReceipt",a)})),q2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigInt=e.fromBytes=void 0;var t=XX(),r=e0(),i=t0(),n=r0();function o(e,t={}){typeof t.size<"u"&&(0,i.assertSize)(e,{size:t.size});let r=(0,n.bytesToHex)(e,t);return(0,i.hexToBigInt)(r)}function a(e,n={}){let o=e;if(typeof n.size<"u"&&((0,i.assertSize)(o,{size:n.size}),o=(0,r.trim)(o)),o.length>1||o[0]>1)throw new t.InvalidBytesBooleanError(o);return!!o[0]}function s(e,t={}){typeof t.size<"u"&&(0,i.assertSize)(e,{size:t.size});let r=(0,n.bytesToHex)(e,t);return(0,i.hexToNumber)(r)}function c(e,t={}){let n=e;return typeof t.size<"u"&&((0,i.assertSize)(n,{size:t.size}),n=(0,r.trim)(n,{dir:"right"})),(new TextDecoder).decode(n)}e.fromBytes=function(e,t){let r="string"==typeof t?{to:t}:t,i=r.to;return"number"===i?s(e,r):"bigint"===i?o(e,r):"boolean"===i?a(e,r):"string"===i?c(e,r):(0,n.bytesToHex)(e,r)},e.bytesToBigInt=o,e.bytesToBool=a,e.bytesToNumber=s,e.bytesToString=c})),W2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rlpToHex=e.rlpToBytes=e.fromRlp=void 0;var t=ZX(),r=XX(),i=D2(),n=i0(),o=r0();function a(e,t="hex"){let o=(()=>{if("string"==typeof e){if(e.length>3&&e.length%2!=0)throw new r.InvalidHexValueError(e);return(0,n.hexToBytes)(e)}return e})();return s((0,i.createCursor)(o),t)}function s(e,t="hex"){if(0===e.bytes.length)return"hex"===t?(0,o.bytesToHex)(e.bytes):e.bytes;let r=e.readByte();if(r<128&&e.decrementPosition(1),r<192){let i=c(e,r,128),n=e.readBytes(i);return"hex"===t?(0,o.bytesToHex)(n):n}return function(e,t,r){let i=e.position,n=[];for(;e.position-i<t;)n.push(s(e,r));return n}(e,c(e,r,192),t)}function c(e,r,i){if(128===i&&r<128)return 1;if(r<=i+55)return r-i;if(r===i+55+1)return e.readUint8();if(r===i+55+2)return e.readUint16();if(r===i+55+3)return e.readUint24();if(r===i+55+4)return e.readUint32();throw new t.BaseError("Invalid RLP prefix")}e.fromRlp=a,e.rlpToBytes=function(e,t="bytes"){return a(e,t)},e.rlpToHex=function(e,t="hex"){return a(e,t)}})),V2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isHash=void 0;var t=qX(),r=WX();e.isHash=function(e){return(0,t.isHex)(e)&&32===(0,r.size)(e)}})),G2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHA2=void 0;var t=s0(),r=u0();var i=class extends r.Hash{constructor(e,t,i,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=i,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,r.createView)(this.buffer)}update(e){(0,t.exists)(this);let{view:i,buffer:n,blockLen:o}=this,a=(e=(0,r.toBytes)(e)).length;for(let t=0;t<a;){let s=Math.min(o-this.pos,a-t);if(s!==o)n.set(e.subarray(t,t+s),this.pos),this.pos+=s,t+=s,this.pos===o&&(this.process(i,0),this.pos=0);else{let i=(0,r.createView)(e);for(;o<=a-t;t+=o)this.process(i,t)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,t.exists)(this),(0,t.output)(e,this),this.finished=!0;let{buffer:i,view:n,blockLen:o,isLE:a}=this,{pos:s}=this;i[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>o-s&&(this.process(n,0),s=0);for(let e=s;e<o;e++)i[e]=0;(function(e,t,r,i){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,i);let n=BigInt(32),o=BigInt(4294967295),a=Number(r>>n&o),s=Number(r&o),c=i?4:0,l=i?0:4;e.setUint32(t+c,a,i),e.setUint32(t+l,s,i)})(n,o-8,BigInt(8*this.length),a),this.process(n,0);let c=(0,r.createView)(e),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let u=l/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<u;e++)c.setUint32(4*e,d[e],a)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:i,finished:n,destroyed:o,pos:a}=this;return e.length=i,e.pos=a,e.finished=n,e.destroyed=o,i%t&&e.buffer.set(r),e}};e.SHA2=i})),Z2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sha224=e.sha256=void 0;var t=G2(),r=u0(),i=(e,t,r)=>e&t^~e&r,n=(e,t,r)=>e&t^e&r^t&r,o=new Uint32Array([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]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),s=new Uint32Array(64),c=class extends t.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){let{A:e,B:t,C:r,D:i,E:n,F:o,G:a,H:s}=this;return[e,t,r,i,n,o,a,s]}set(e,t,r,i,n,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|i,this.E=0|n,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)s[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=s[e-15],i=s[e-2],n=(0,r.rotr)(t,7)^(0,r.rotr)(t,18)^t>>>3,o=(0,r.rotr)(i,17)^(0,r.rotr)(i,19)^i>>>10;s[e]=o+s[e-7]+n+s[e-16]|0}let{A:a,B:c,C:l,D:u,E:d,F:h,G:p,H:f}=this;for(let e=0;e<64;e++){let t=f+((0,r.rotr)(d,6)^(0,r.rotr)(d,11)^(0,r.rotr)(d,25))+i(d,h,p)+o[e]+s[e]|0,g=((0,r.rotr)(a,2)^(0,r.rotr)(a,13)^(0,r.rotr)(a,22))+n(a,c,l)|0;f=p,p=h,h=d,d=u+t|0,u=l,l=c,c=a,a=t+g|0}a=a+this.A|0,c=c+this.B|0,l=l+this.C|0,u=u+this.D|0,d=d+this.E|0,h=h+this.F|0,p=p+this.G|0,f=f+this.H|0,this.set(a,c,l,u,d,h,p,f)}roundClean(){s.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},l=class extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}};e.sha256=(0,r.wrapConstructor)((()=>new c)),e.sha224=(0,r.wrapConstructor)((()=>new l))})),K2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sha256=void 0;var t=Z2(),r=qX(),i=i0(),n=r0();e.sha256=function(e,o){let a=o||"hex",s=(0,t.sha256)((0,r.isHex)(e,{strict:!1})?(0,i.toBytes)(e):e);return"bytes"===a?s:(0,n.toHex)(s)}})),Y2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ripemd160=e.RIPEMD160=void 0;var t=G2(),r=u0(),i=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),n=Uint8Array.from({length:16},((e,t)=>t)),o=n.map((e=>(9*e+5)%16)),a=[n],s=[o];for(let e=0;e<4;e++)for(let t of[a,s])t.push(t[e].map((e=>i[e])));var c=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map((e=>new Uint8Array(e))),l=a.map(((e,t)=>e.map((e=>c[t][e])))),u=s.map(((e,t)=>e.map((e=>c[t][e])))),d=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),h=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),p=(e,t)=>e<<t|e>>>32-t;function f(e,t,r,i){return 0===e?t^r^i:1===e?t&r|~t&i:2===e?(t|~r)^i:3===e?t&i|r&~i:t^(r|~i)}var g=new Uint32Array(16),m=class extends t.SHA2{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){let{h0:e,h1:t,h2:r,h3:i,h4:n}=this;return[e,t,r,i,n]}set(e,t,r,i,n){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|i,this.h4=0|n}process(e,t){for(let r=0;r<16;r++,t+=4)g[r]=e.getUint32(t,!0);let r=0|this.h0,i=r,n=0|this.h1,o=n,c=0|this.h2,m=c,b=0|this.h3,y=b,w=0|this.h4,v=w;for(let e=0;e<5;e++){let t=4-e,_=d[e],x=h[e],E=a[e],C=s[e],k=l[e],P=u[e];for(let t=0;t<16;t++){let i=p(r+f(e,n,c,b)+g[E[t]]+_,k[t])+w|0;r=w,w=b,b=0|p(c,10),c=n,n=i}for(let e=0;e<16;e++){let r=p(i+f(t,o,m,y)+g[C[e]]+x,P[e])+v|0;i=v,v=y,y=0|p(m,10),m=o,o=r}}this.set(this.h1+c+y|0,this.h2+b+v|0,this.h3+w+i|0,this.h4+r+o|0,this.h0+n+m|0)}roundClean(){g.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}};e.RIPEMD160=m,e.ripemd160=(0,r.wrapConstructor)((()=>new m))})),J2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ripemd160=void 0;var t=Y2(),r=qX(),i=i0(),n=r0();e.ripemd160=function(e,o){let a=o||"hex",s=(0,t.ripemd160)((0,r.isHex)(e,{strict:!1})?(0,i.toBytes)(e):e);return"bytes"===a?s:(0,n.toHex)(s)}})),Q2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateObject=e.createHmacDrbg=e.bitMask=e.bitSet=e.bitGet=e.bitLen=e.utf8ToBytes=e.equalBytes=e.concatBytes=e.ensureBytes=e.numberToVarBytesBE=e.numberToBytesLE=e.numberToBytesBE=e.bytesToNumberLE=e.bytesToNumberBE=e.hexToBytes=e.hexToNumber=e.numberToHexUnpadded=e.bytesToHex=void 0;var t=BigInt(0),r=BigInt(1),i=BigInt(2),n=e=>e instanceof Uint8Array,o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e){if(!n(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=o[e[r]];return t}function s(e){let t=e.toString(16);return 1&t.length?`0${t}`:t}function c(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}function l(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);let t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){let i=2*t,n=e.slice(i,i+2),o=Number.parseInt(n,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[t]=o}return r}function u(e,t){return l(e.toString(16).padStart(2*t,"0"))}function d(...e){let t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0)),r=0;return e.forEach((e=>{if(!n(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t}e.bytesToHex=a,e.numberToHexUnpadded=s,e.hexToNumber=c,e.hexToBytes=l,e.bytesToNumberBE=function(e){return c(a(e))},e.bytesToNumberLE=function(e){if(!n(e))throw new Error("Uint8Array expected");return c(a(Uint8Array.from(e).reverse()))},e.numberToBytesBE=u,e.numberToBytesLE=function(e,t){return u(e,t).reverse()},e.numberToVarBytesBE=function(e){return l(s(e))},e.ensureBytes=function(e,t,r){let i;if("string"==typeof t)try{i=l(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!n(t))throw new Error(`${e} must be hex string or Uint8Array`);i=Uint8Array.from(t)}let o=i.length;if("number"==typeof r&&o!==r)throw new Error(`${e} expected ${r} bytes, got ${o}`);return i},e.concatBytes=d,e.equalBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},e.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))},e.bitLen=function(e){let i;for(i=0;e>t;e>>=r,i+=1);return i},e.bitGet=function(e,t){return e>>BigInt(t)&r};e.bitSet=(e,i,n)=>e|(n?r:t)<<BigInt(i);e.bitMask=e=>(i<<BigInt(e-1))-r;var h=e=>new Uint8Array(e),p=e=>Uint8Array.from(e);e.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let i=h(e),n=h(e),o=0,a=()=>{i.fill(1),n.fill(0),o=0},s=(...e)=>r(n,i,...e),c=(e=h())=>{n=s(p([0]),e),i=s(),0!==e.length&&(n=s(p([1]),e),i=s())},l=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0,r=[];for(;e<t;){i=s();let t=i.slice();r.push(t),e+=i.length}return d(...r)};return(e,t)=>{let r;for(a(),c(e);!(r=t(l()));)c();return a(),r}};var f={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};e.validateObject=function(e,t,r={}){let i=(t,r,i)=>{let n=f[r];if("function"!=typeof n)throw new Error(`Invalid validator "${r}", expected function`);let o=e[t];if(!(i&&void 0===o||n(o,e)))throw new Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(let[e,r]of Object.entries(t))i(e,r,!1);for(let[e,t]of Object.entries(r))i(e,t,!0);return e}})),X2=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mapHashToField=e.getMinHashLength=e.getFieldBytesLength=e.hashToPrivateScalar=e.FpSqrtEven=e.FpSqrtOdd=e.Field=e.nLength=e.FpIsSquare=e.FpDiv=e.FpInvertBatch=e.FpPow=e.validateField=e.isNegativeLE=e.FpSqrt=e.tonelliShanks=e.invert=e.pow2=e.pow=e.mod=void 0;var t=Q2(),r=BigInt(0),i=BigInt(1),n=BigInt(2),o=BigInt(3),a=BigInt(4),s=BigInt(5),c=BigInt(8);BigInt(9),BigInt(16);function l(e,t){let i=e%t;return i>=r?i:t+i}function u(e,t,n){if(n<=r||t<r)throw new Error("Expected power/modulo > 0");if(n===i)return r;let o=i;for(;t>r;)t&i&&(o=o*e%n),e=e*e%n,t>>=i;return o}function d(e,t){if(e===r||t<=r)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=l(e,t),o=t,a=r,s=i,c=i,u=r;for(;n!==r;){let e=o/n,t=o%n,r=a-c*e,i=s-u*e;o=n,n=t,a=c,s=u,c=r,u=i}if(o!==i)throw new Error("invert: does not exist");return l(a,t)}function h(e){let t,o,s,c=(e-i)/n;for(t=e-i,o=0;t%n===r;t/=n,o++);for(s=n;s<e&&u(s,c,e)!==e-i;s++);if(1===o){let t=(e+i)/a;return function(e,r){let i=e.pow(r,t);if(!e.eql(e.sqr(i),r))throw new Error("Cannot find square root");return i}}let l=(t+i)/n;return function(e,r){if(e.pow(r,c)===e.neg(e.ONE))throw new Error("Cannot find square root");let n=o,a=e.pow(e.mul(e.ONE,s),t),u=e.pow(r,l),d=e.pow(r,t);for(;!e.eql(d,e.ONE);){if(e.eql(d,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(d);t<n&&!e.eql(r,e.ONE);t++)r=e.sqr(r);let r=e.pow(a,i<<BigInt(n-t-1));a=e.sqr(r),u=e.mul(u,r),d=e.mul(d,a),n=t}return u}}function p(e){if(e%a===o){let t=(e+i)/a;return function(e,r){let i=e.pow(r,t);if(!e.eql(e.sqr(i),r))throw new Error("Cannot find square root");return i}}if(e%c===s){let t=(e-s)/c;return function(e,r){let i=e.mul(r,n),o=e.pow(i,t),a=e.mul(r,o),s=e.mul(e.mul(a,n),o),c=e.mul(a,e.sub(s,e.ONE));if(!e.eql(e.sqr(c),r))throw new Error("Cannot find square root");return c}}return h(e)}e.mod=l,e.pow=u,e.pow2=function(e,t,i){let n=e;for(;t-- >r;)n*=n,n%=i;return n},e.invert=d,e.tonelliShanks=h,e.FpSqrt=p;e.isNegativeLE=(e,t)=>(l(e,t)&i)===i;var f=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function g(e,t,n){if(n<r)throw new Error("Expected power > 0");if(n===r)return e.ONE;if(n===i)return t;let o=e.ONE,a=t;for(;n>r;)n&i&&(o=e.mul(o,a)),a=e.sqr(a),n>>=i;return o}function m(e,t){let r=new Array(t.length),i=t.reduce(((t,i,n)=>e.is0(i)?t:(r[n]=t,e.mul(t,i))),e.ONE),n=e.inv(i);return t.reduceRight(((t,i,n)=>e.is0(i)?t:(r[n]=e.mul(t,r[n]),e.mul(t,i))),n),r}function b(e,t){let r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function y(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");let t=e.toString(2).length;return Math.ceil(t/8)}function w(e){let t=y(e);return t+Math.ceil(t/2)}e.validateField=function(e){let r=f.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,t.validateObject)(e,r)},e.FpPow=g,e.FpInvertBatch=m,e.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?d(r,e.ORDER):e.inv(r))},e.FpIsSquare=function(e){let t=(e.ORDER-i)/n;return r=>{let i=e.pow(r,t);return e.eql(i,e.ZERO)||e.eql(i,e.ONE)}},e.nLength=b,e.Field=function(e,n,o=!1,a={}){if(e<=r)throw new Error(`Expected Field ORDER > 0, got ${e}`);let{nBitLength:s,nByteLength:c}=b(e,n);if(c>2048)throw new Error("Field lengths over 2048 bytes are not supported");let u=p(e),h=Object.freeze({ORDER:e,BITS:s,BYTES:c,MASK:(0,t.bitMask)(s),ZERO:r,ONE:i,create:t=>l(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return r<=t&&t<e},is0:e=>e===r,isOdd:e=>(e&i)===i,neg:t=>l(-t,e),eql:(e,t)=>e===t,sqr:t=>l(t*t,e),add:(t,r)=>l(t+r,e),sub:(t,r)=>l(t-r,e),mul:(t,r)=>l(t*r,e),pow:(e,t)=>g(h,e,t),div:(t,r)=>l(t*d(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>d(t,e),sqrt:a.sqrt||(e=>u(h,e)),invertBatch:e=>m(h,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>o?(0,t.numberToBytesLE)(e,c):(0,t.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw new Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);return o?(0,t.bytesToNumberLE)(e):(0,t.bytesToNumberBE)(e)}});return Object.freeze(h)},e.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");let r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},e.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");let r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},e.hashToPrivateScalar=function(e,r,n=!1){let o=(e=(0,t.ensureBytes)("privateHash",e)).length,a=b(r).nByteLength+8;if(a<24||o<a||o>1024)throw new Error(`hashToPrivateScalar: expected ${a}-1024 bytes of input, got ${o}`);return l(n?(0,t.bytesToNumberLE)(e):(0,t.bytesToNumberBE)(e),r-i)+i},e.getFieldBytesLength=y,e.getMinHashLength=w,e.mapHashToField=function(e,r,n=!1){let o=e.length,a=y(r),s=w(r);if(o<16||o<s||o>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${o}`);let c=l(n?(0,t.bytesToNumberBE)(e):(0,t.bytesToNumberLE)(e),r-i)+i;return n?(0,t.numberToBytesLE)(c,a):(0,t.numberToBytesBE)(c,a)}})),e3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateBasic=e.wNAF=void 0;var t=X2(),r=Q2(),i=BigInt(0),n=BigInt(1);e.wNAF=function(e,t){let r=(e,t)=>{let r=t.negate();return e?r:t},o=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let o=e.ZERO,a=t;for(;r>i;)r&n&&(o=o.add(a)),a=a.double(),r>>=n;return o},precomputeWindow(e,t){let{windows:r,windowSize:i}=o(t),n=[],a=e,s=a;for(let e=0;e<r;e++){s=a,n.push(s);for(let e=1;e<i;e++)s=s.add(a),n.push(s);a=s.double()}return n},wNAF(t,i,a){let{windows:s,windowSize:c}=o(t),l=e.ZERO,u=e.BASE,d=BigInt(2**t-1),h=2**t,p=BigInt(t);for(let e=0;e<s;e++){let t=e*c,o=Number(a&d);a>>=p,o>c&&(o-=h,a+=n);let s=t,f=t+Math.abs(o)-1,g=e%2!=0,m=o<0;0===o?u=u.add(r(g,i[s])):l=l.add(r(m,i[f]))}return{p:l,f:u}},wNAFCached(e,t,r,i){let n=e._WINDOW_SIZE||1,o=t.get(e);return o||(o=this.precomputeWindow(e,n),1!==n&&t.set(e,i(o))),this.wNAF(n,o,r)}}},e.validateBasic=function(e){return(0,t.validateField)(e.Fp),(0,r.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,t.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}})),t3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mapToCurveSimpleSWU=e.SWUFpSqrtRatio=e.weierstrass=e.weierstrassPoints=e.DER=void 0;var t=X2(),r=Q2(),i=Q2(),n=e3();var{bytesToNumberBE:o,hexToBytes:a}=r;e.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){let{Err:r}=e.DER;if(t.length<2||2!==t[0])throw new r("Invalid signature integer tag");let i=t[1],n=t.subarray(2,i+2);if(!i||n.length!==i)throw new r("Invalid signature integer: wrong length");if(128&n[0])throw new r("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:o(n),l:t.subarray(i+2)}},toSig(t){let{Err:r}=e.DER,i="string"==typeof t?a(t):t;if(!(i instanceof Uint8Array))throw new Error("ui8a expected");let n=i.length;if(n<2||48!=i[0])throw new r("Invalid signature tag");if(i[1]!==n-2)throw new r("Invalid signature: incorrect length");let{d:o,l:s}=e.DER._parseInt(i.subarray(2)),{d:c,l:l}=e.DER._parseInt(s);if(l.length)throw new r("Invalid signature: left bytes after parsing");return{r:o,s:c}},hexFromSig(e){let t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{let t=e.toString(16);return 1&t.length?`0${t}`:t},i=t(r(e.s)),n=t(r(e.r)),o=i.length/2,a=n.length/2,s=r(o),c=r(a);return`30${r(a+o+4)}02${c}${n}02${s}${i}`}};var s=BigInt(0),c=BigInt(1),l=BigInt(2),u=BigInt(3),d=BigInt(4);function h(e){let o=function(e){let t=(0,n.validateBasic)(e);r.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:i,Fp:o,a:a}=t;if(i){if(!o.eql(a,o.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof i||"bigint"!=typeof i.beta||"function"!=typeof i.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:a}=o,l=o.toBytes||((e,t,i)=>{let n=t.toAffine();return r.concatBytes(Uint8Array.from([4]),a.toBytes(n.x),a.toBytes(n.y))}),d=o.fromBytes||(e=>{let t=e.subarray(1);return{x:a.fromBytes(t.subarray(0,a.BYTES)),y:a.fromBytes(t.subarray(a.BYTES,2*a.BYTES))}});function h(e){let{a:t,b:r}=o,i=a.sqr(e),n=a.mul(i,e);return a.add(a.add(n,a.mul(e,t)),r)}if(!a.eql(a.sqr(o.Gy),h(o.Gx)))throw new Error("bad generator point: equation left != right");function p(e){return"bigint"==typeof e&&s<e&&e<o.n}function f(e){if(!p(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function g(e){let n,{allowedPrivateKeyLengths:a,nByteLength:s,wrapPrivateKey:c,n:l}=o;if(a&&"bigint"!=typeof e){if(e instanceof Uint8Array&&(e=r.bytesToHex(e)),"string"!=typeof e||!a.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*s,"0")}try{n="bigint"==typeof e?e:r.bytesToNumberBE((0,i.ensureBytes)("private key",e,s))}catch{throw new Error(`private key must be ${s} bytes, hex or bigint, not ${typeof e}`)}return c&&(n=t.mod(n,l)),f(n),n}let m=new Map;function b(e){if(!(e instanceof y))throw new Error("ProjectivePoint expected")}class y{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,null==e||!a.isValid(e))throw new Error("x required");if(null==t||!a.isValid(t))throw new Error("y required");if(null==r||!a.isValid(r))throw new Error("z required")}static fromAffine(e){let{x:t,y:r}=e||{};if(!e||!a.isValid(t)||!a.isValid(r))throw new Error("invalid affine point");if(e instanceof y)throw new Error("projective point not allowed");let i=e=>a.eql(e,a.ZERO);return i(t)&&i(r)?y.ZERO:new y(t,r,a.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=a.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(y.fromAffine)}static fromHex(e){let t=y.fromAffine(d((0,i.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return y.BASE.multiply(g(e))}_setWindowSize(e){this._WINDOW_SIZE=e,m.delete(this)}assertValidity(){if(this.is0()){if(o.allowInfinityPoint&&!a.is0(this.py))return;throw new Error("bad point: ZERO")}let{x:e,y:t}=this.toAffine();if(!a.isValid(e)||!a.isValid(t))throw new Error("bad point: x or y not FE");let r=a.sqr(t),i=h(e);if(!a.eql(r,i))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:e}=this.toAffine();if(a.isOdd)return!a.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){b(e);let{px:t,py:r,pz:i}=this,{px:n,py:o,pz:s}=e,c=a.eql(a.mul(t,s),a.mul(n,i)),l=a.eql(a.mul(r,s),a.mul(o,i));return c&&l}negate(){return new y(this.px,a.neg(this.py),this.pz)}double(){let{a:e,b:t}=o,r=a.mul(t,u),{px:i,py:n,pz:s}=this,c=a.ZERO,l=a.ZERO,d=a.ZERO,h=a.mul(i,i),p=a.mul(n,n),f=a.mul(s,s),g=a.mul(i,n);return g=a.add(g,g),d=a.mul(i,s),d=a.add(d,d),c=a.mul(e,d),l=a.mul(r,f),l=a.add(c,l),c=a.sub(p,l),l=a.add(p,l),l=a.mul(c,l),c=a.mul(g,c),d=a.mul(r,d),f=a.mul(e,f),g=a.sub(h,f),g=a.mul(e,g),g=a.add(g,d),d=a.add(h,h),h=a.add(d,h),h=a.add(h,f),h=a.mul(h,g),l=a.add(l,h),f=a.mul(n,s),f=a.add(f,f),h=a.mul(f,g),c=a.sub(c,h),d=a.mul(f,p),d=a.add(d,d),d=a.add(d,d),new y(c,l,d)}add(e){b(e);let{px:t,py:r,pz:i}=this,{px:n,py:s,pz:c}=e,l=a.ZERO,d=a.ZERO,h=a.ZERO,p=o.a,f=a.mul(o.b,u),g=a.mul(t,n),m=a.mul(r,s),w=a.mul(i,c),v=a.add(t,r),_=a.add(n,s);v=a.mul(v,_),_=a.add(g,m),v=a.sub(v,_),_=a.add(t,i);let x=a.add(n,c);return _=a.mul(_,x),x=a.add(g,w),_=a.sub(_,x),x=a.add(r,i),l=a.add(s,c),x=a.mul(x,l),l=a.add(m,w),x=a.sub(x,l),h=a.mul(p,_),l=a.mul(f,w),h=a.add(l,h),l=a.sub(m,h),h=a.add(m,h),d=a.mul(l,h),m=a.add(g,g),m=a.add(m,g),w=a.mul(p,w),_=a.mul(f,_),m=a.add(m,w),w=a.sub(g,w),w=a.mul(p,w),_=a.add(_,w),g=a.mul(m,_),d=a.add(d,g),g=a.mul(x,_),l=a.mul(v,l),l=a.sub(l,g),g=a.mul(v,m),h=a.mul(x,h),h=a.add(h,g),new y(l,d,h)}subtract(e){return this.add(e.negate())}is0(){return this.equals(y.ZERO)}wNAF(e){return v.wNAFCached(this,m,e,(e=>{let t=a.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(y.fromAffine)}))}multiplyUnsafe(e){let t=y.ZERO;if(e===s)return t;if(f(e),e===c)return this;let{endo:r}=o;if(!r)return v.unsafeLadder(this,e);let{k1neg:i,k1:n,k2neg:l,k2:u}=r.splitScalar(e),d=t,h=t,p=this;for(;n>s||u>s;)n&c&&(d=d.add(p)),u&c&&(h=h.add(p)),p=p.double(),n>>=c,u>>=c;return i&&(d=d.negate()),l&&(h=h.negate()),h=new y(a.mul(h.px,r.beta),h.py,h.pz),d.add(h)}multiply(e){f(e);let t,r,i=e,{endo:n}=o;if(n){let{k1neg:e,k1:o,k2neg:s,k2:c}=n.splitScalar(i),{p:l,f:u}=this.wNAF(o),{p:d,f:h}=this.wNAF(c);l=v.constTimeNegate(e,l),d=v.constTimeNegate(s,d),d=new y(a.mul(d.px,n.beta),d.py,d.pz),t=l.add(d),r=u.add(h)}else{let{p:e,f:n}=this.wNAF(i);t=e,r=n}return y.normalizeZ([t,r])[0]}multiplyAndAddUnsafe(e,t,r){let i=y.BASE,n=(e,t)=>t!==s&&t!==c&&e.equals(i)?e.multiply(t):e.multiplyUnsafe(t),o=n(this,t).add(n(e,r));return o.is0()?void 0:o}toAffine(e){let{px:t,py:r,pz:i}=this,n=this.is0();null==e&&(e=n?a.ONE:a.inv(i));let o=a.mul(t,e),s=a.mul(r,e),c=a.mul(i,e);if(n)return{x:a.ZERO,y:a.ZERO};if(!a.eql(c,a.ONE))throw new Error("invZ was invalid");return{x:o,y:s}}isTorsionFree(){let{h:e,isTorsionFree:t}=o;if(e===c)return!0;if(t)return t(y,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:t}=o;return e===c?this:t?t(y,this):this.multiplyUnsafe(o.h)}toRawBytes(e=!0){return this.assertValidity(),l(y,this,e)}toHex(e=!0){return r.bytesToHex(this.toRawBytes(e))}}y.BASE=new y(o.Gx,o.Gy,a.ONE),y.ZERO=new y(a.ZERO,a.ONE,a.ZERO);let w=o.nBitLength,v=(0,n.wNAF)(y,o.endo?Math.ceil(w/2):w);return{CURVE:o,ProjectivePoint:y,normPrivateKeyToScalar:g,weierstrassEquation:h,isWithinCurveOrder:p}}function p(e,t){let r=e.ORDER,i=s;for(let e=r-c;e%l===s;e/=l)i+=c;let n=i,o=l<<n-c-c,a=o*l,h=(r-c)/a,p=(h-c)/l,f=a-c,g=o,m=e.pow(t,h),b=e.pow(t,(h+c)/l),y=(t,r)=>{let i=m,o=e.pow(r,f),a=e.sqr(o);a=e.mul(a,r);let s=e.mul(t,a);s=e.pow(s,p),s=e.mul(s,o),o=e.mul(s,r),a=e.mul(s,t);let u=e.mul(a,o);s=e.pow(u,g);let d=e.eql(s,e.ONE);o=e.mul(a,b),s=e.mul(u,i),a=e.cmov(o,a,d),u=e.cmov(s,u,d);for(let t=n;t>c;t--){let r=t-l;r=l<<r-c;let n=e.pow(u,r),s=e.eql(n,e.ONE);o=e.mul(a,i),i=e.mul(i,i),n=e.mul(u,i),a=e.cmov(o,a,s),u=e.cmov(n,u,s)}return{isValid:d,value:a}};if(e.ORDER%d===u){let r=(e.ORDER-u)/d,i=e.sqrt(e.neg(t));y=(t,n)=>{let o=e.sqr(n),a=e.mul(t,n);o=e.mul(o,a);let s=e.pow(o,r);s=e.mul(s,a);let c=e.mul(s,i),l=e.mul(e.sqr(s),n),u=e.eql(l,t);return{isValid:u,value:e.cmov(c,s,u)}}}return y}e.weierstrassPoints=h,e.weierstrass=function(o){let a=function(e){let t=(0,n.validateBasic)(e);return r.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(o),{Fp:l,n:u}=a,d=l.BYTES+1,p=2*l.BYTES+1;function f(e){return t.mod(e,u)}function g(e){return t.invert(e,u)}let{ProjectivePoint:m,normPrivateKeyToScalar:b,weierstrassEquation:y,isWithinCurveOrder:w}=h({...a,toBytes(e,t,i){let n=t.toAffine(),o=l.toBytes(n.x),a=r.concatBytes;return i?a(Uint8Array.from([t.hasEvenY()?2:3]),o):a(Uint8Array.from([4]),o,l.toBytes(n.y))},fromBytes(e){let t=e.length,i=e[0],n=e.subarray(1);if(t!==d||2!==i&&3!==i){if(t===p&&4===i){return{x:l.fromBytes(n.subarray(0,l.BYTES)),y:l.fromBytes(n.subarray(l.BYTES,2*l.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${d} compressed bytes or ${p} uncompressed bytes`)}{let e=r.bytesToNumberBE(n);if(!function(e){return s<e&&e<l.ORDER}(e))throw new Error("Point is not on curve");let t=y(e),o=l.sqrt(t);return 1==(1&i)!==((o&c)===c)&&(o=l.neg(o)),{x:e,y:o}}}}),v=e=>r.bytesToHex(r.numberToBytesBE(e,a.nByteLength));function _(e){return e>u>>c}let x=(e,t,i)=>r.bytesToNumberBE(e.slice(t,i));class E{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){let t=a.nByteLength;return e=(0,i.ensureBytes)("compactSignature",e,2*t),new E(x(e,0,t),x(e,t,2*t))}static fromDER(t){let{r:r,s:n}=e.DER.toSig((0,i.ensureBytes)("DER",t));return new E(r,n)}assertValidity(){if(!w(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!w(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new E(this.r,this.s,e)}recoverPublicKey(e){let{r:t,s:r,recovery:n}=this,o=I((0,i.ensureBytes)("msgHash",e));if(null==n||![0,1,2,3].includes(n))throw new Error("recovery id invalid");let s=2===n||3===n?t+a.n:t;if(s>=l.ORDER)throw new Error("recovery id 2 or 3 invalid");let c=1&n?"03":"02",u=m.fromHex(c+v(s)),d=g(s),h=f(-o*d),p=f(r*d),b=m.BASE.multiplyAndAddUnsafe(u,h,p);if(!b)throw new Error("point at infinify");return b.assertValidity(),b}hasHighS(){return _(this.s)}normalizeS(){return this.hasHighS()?new E(this.r,f(-this.s),this.recovery):this}toDERRawBytes(){return r.hexToBytes(this.toDERHex())}toDERHex(){return e.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return r.hexToBytes(this.toCompactHex())}toCompactHex(){return v(this.r)+v(this.s)}}let C={isValidPrivateKey(e){try{return b(e),!0}catch{return!1}},normPrivateKeyToScalar:b,randomPrivateKey:()=>{let e=t.getMinHashLength(a.n);return t.mapHashToField(a.randomBytes(e),a.n)},precompute:(e=8,t=m.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function k(e){let t=e instanceof Uint8Array,r="string"==typeof e,i=(t||r)&&e.length;return t?i===d||i===p:r?i===2*d||i===2*p:e instanceof m}let P=a.bits2int||function(e){let t=r.bytesToNumberBE(e),i=8*e.length-a.nBitLength;return i>0?t>>BigInt(i):t},I=a.bits2int_modN||function(e){return f(P(e))},S=r.bitMask(a.nBitLength);function A(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(s<=e&&e<S))throw new Error(`bigint expected < 2^${a.nBitLength}`);return r.numberToBytesBE(e,a.nByteLength)}function T(e,t,n=O){if(["recovered","canonical"].some((e=>e in n)))throw new Error("sign() legacy options not supported");let{hash:o,randomBytes:u}=a,{lowS:d,prehash:h,extraEntropy:p}=n;null==d&&(d=!0),e=(0,i.ensureBytes)("msgHash",e),h&&(e=(0,i.ensureBytes)("prehashed msgHash",o(e)));let y=I(e),v=b(t),x=[A(v),A(y)];if(null!=p){let e=!0===p?u(l.BYTES):p;x.push((0,i.ensureBytes)("extraEntropy",e))}let C=r.concatBytes(...x),k=y;return{seed:C,k2sig:function(e){let t=P(e);if(!w(t))return;let r=g(t),i=m.BASE.multiply(t).toAffine(),n=f(i.x);if(n===s)return;let o=f(r*f(k+n*v));if(o===s)return;let a=(i.x===n?0:2)|Number(i.y&c),l=o;return d&&_(o)&&(l=function(e){return _(e)?f(-e):e}(o),a^=1),new E(n,l,a)}}}let O={lowS:a.lowS,prehash:!1},R={lowS:a.lowS,prehash:!1};return m.BASE._setWindowSize(8),{CURVE:a,getPublicKey:function(e,t=!0){return m.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(k(e))throw new Error("first arg must be private key");if(!k(t))throw new Error("second arg must be public key");return m.fromHex(t).multiply(b(e)).toRawBytes(r)},sign:function(e,t,i=O){let{seed:n,k2sig:o}=T(e,t,i),s=a;return r.createHmacDrbg(s.hash.outputLen,s.nByteLength,s.hmac)(n,o)},verify:function(t,r,n,o=R){let s=t;if(r=(0,i.ensureBytes)("msgHash",r),n=(0,i.ensureBytes)("publicKey",n),"strict"in o)throw new Error("options.strict was renamed to lowS");let c,l,{lowS:u,prehash:d}=o;try{if("string"==typeof s||s instanceof Uint8Array)try{c=E.fromDER(s)}catch(t){if(!(t instanceof e.DER.Err))throw t;c=E.fromCompact(s)}else{if("object"!=typeof s||"bigint"!=typeof s.r||"bigint"!=typeof s.s)throw new Error("PARSE");{let{r:e,s:t}=s;c=new E(e,t)}}l=m.fromHex(n)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&c.hasHighS())return!1;d&&(r=a.hash(r));let{r:h,s:p}=c,b=I(r),y=g(p),w=f(b*y),v=f(h*y),_=m.BASE.multiplyAndAddUnsafe(l,w,v)?.toAffine();return!!_&&f(_.x)===h},ProjectivePoint:m,Signature:E,utils:C}},e.SWUFpSqrtRatio=p,e.mapToCurveSimpleSWU=function(e,r){if(t.validateField(e),!e.isValid(r.A)||!e.isValid(r.B)||!e.isValid(r.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");let i=p(e,r.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return t=>{let n,o,a,s,c,l,u,d;n=e.sqr(t),n=e.mul(n,r.Z),o=e.sqr(n),o=e.add(o,n),a=e.add(o,e.ONE),a=e.mul(a,r.B),s=e.cmov(r.Z,e.neg(o),!e.eql(o,e.ZERO)),s=e.mul(s,r.A),o=e.sqr(a),l=e.sqr(s),c=e.mul(l,r.A),o=e.add(o,c),o=e.mul(o,a),l=e.mul(l,s),c=e.mul(l,r.B),o=e.add(o,c),u=e.mul(n,a);let{isValid:h,value:p}=i(o,l);d=e.mul(n,t),d=e.mul(d,p),u=e.cmov(u,a,h),d=e.cmov(d,p,h);let f=e.isOdd(t)===e.isOdd(d);return d=e.cmov(e.neg(d),d,f),u=e.div(u,s),{x:u,y:d}}}})),r3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createHasher=e.isogenyMap=e.hash_to_field=e.expand_message_xof=e.expand_message_xmd=void 0;var t=X2(),r=Q2();var i=r.bytesToNumberBE;function n(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);let r=Array.from({length:t}).fill(0);for(let i=t-1;i>=0;i--)r[i]=255&e,e>>>=8;return new Uint8Array(r)}function o(e,t){let r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e[i]^t[i];return r}function a(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected")}function s(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function c(e,t,i,c){a(e),a(t),s(i),t.length>255&&(t=c((0,r.concatBytes)((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));let{outputLen:l,blockLen:u}=c,d=Math.ceil(i/l);if(d>255)throw new Error("Invalid xmd length");let h=(0,r.concatBytes)(t,n(t.length,1)),p=n(0,u),f=n(i,2),g=new Array(d),m=c((0,r.concatBytes)(p,e,f,n(0,1),h));g[0]=c((0,r.concatBytes)(m,n(1,1),h));for(let e=1;e<=d;e++){let t=[o(m,g[e-1]),n(e+1,1),h];g[e]=c((0,r.concatBytes)(...t))}return(0,r.concatBytes)(...g).slice(0,i)}function l(e,t,i,o,c){if(a(e),a(t),s(i),t.length>255){let e=Math.ceil(2*o/8);t=c.create({dkLen:e}).update((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(i>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return c.create({dkLen:i}).update(e).update(n(i,2)).update(t).update(n(t.length,1)).digest()}function u(e,n,o){(0,r.validateObject)(o,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:u,k:d,m:h,hash:p,expand:f,DST:g}=o;a(e),s(n);let m,b=function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,r.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(g),y=u.toString(2).length,w=Math.ceil((y+d)/8),v=n*h*w;if("xmd"===f)m=c(e,b,v,p);else if("xof"===f)m=l(e,b,v,d,p);else{if("_internal_pass"!==f)throw new Error('expand must be "xmd" or "xof"');m=e}let _=new Array(n);for(let e=0;e<n;e++){let r=new Array(h);for(let n=0;n<h;n++){let o=w*(n+e*h),a=m.subarray(o,o+w);r[n]=(0,t.mod)(i(a),u)}_[e]=r}return _}e.expand_message_xmd=c,e.expand_message_xof=l,e.hash_to_field=u,e.isogenyMap=function(e,t){let r=t.map((e=>Array.from(e).reverse()));return(t,i)=>{let[n,o,a,s]=r.map((r=>r.reduce(((r,i)=>e.add(e.mul(r,t),i)))));return t=e.div(n,o),i=e.mul(i,e.div(a,s)),{x:t,y:i}}},e.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(i,n){let o=u(i,2,{...r,DST:r.DST,...n}),a=e.fromAffine(t(o[0])),s=e.fromAffine(t(o[1])),c=a.add(s).clearCofactor();return c.assertValidity(),c},encodeToCurve(i,n){let o=u(i,1,{...r,DST:r.encodeDST,...n}),a=e.fromAffine(t(o[0])).clearCofactor();return a.assertValidity(),a}}}})),i3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;var t=s0(),r=u0(),i=class extends r.Hash{constructor(e,i){super(),this.finished=!1,this.destroyed=!1,(0,t.hash)(e);let n=(0,r.toBytes)(i);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,a=new Uint8Array(o);a.set(n.length>o?e.create().update(n).digest():n);for(let e=0;e<a.length;e++)a[e]^=54;this.iHash.update(a),this.oHash=e.create();for(let e=0;e<a.length;e++)a[e]^=106;this.oHash.update(a),a.fill(0)}update(e){return(0,t.exists)(this),this.iHash.update(e),this}digestInto(e){(0,t.exists)(this),(0,t.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:r,finished:i,destroyed:n,blockLen:o,outputLen:a}=this;return e.finished=i,e.destroyed=n,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};e.HMAC=i;e.hmac=(e,t,r)=>new i(e,t).update(r).digest(),e.hmac.create=(e,t)=>new i(e,t)})),n3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCurve=e.getHash=void 0;var t=i3(),r=u0(),i=t3();function n(e){return{hash:e,hmac:(i,...n)=>(0,t.hmac)(e,i,(0,r.concatBytes)(...n)),randomBytes:r.randomBytes}}e.getHash=n,e.createCurve=function(e,t){let r=t=>(0,i.weierstrass)({...e,...n(t)});return Object.freeze({...r(t),create:r})}})),o3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.schnorr=e.secp256k1=void 0;var t=Z2(),r=u0(),i=X2(),n=t3(),o=Q2(),a=r3(),s=n3(),c=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),l=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),u=BigInt(1),d=BigInt(2),h=(e,t)=>(e+t/d)/t;function p(e){let t=c,r=BigInt(3),n=BigInt(6),o=BigInt(11),a=BigInt(22),s=BigInt(23),l=BigInt(44),u=BigInt(88),h=e*e*e%t,p=h*h*e%t,g=(0,i.pow2)(p,r,t)*p%t,m=(0,i.pow2)(g,r,t)*p%t,b=(0,i.pow2)(m,d,t)*h%t,y=(0,i.pow2)(b,o,t)*b%t,w=(0,i.pow2)(y,a,t)*y%t,v=(0,i.pow2)(w,l,t)*w%t,_=(0,i.pow2)(v,u,t)*v%t,x=(0,i.pow2)(_,l,t)*w%t,E=(0,i.pow2)(x,r,t)*p%t,C=(0,i.pow2)(E,s,t)*y%t,k=(0,i.pow2)(C,n,t)*h%t,P=(0,i.pow2)(k,d,t);if(!f.eql(f.sqr(P),e))throw new Error("Cannot find square root");return P}var f=(0,i.Field)(c,void 0,void 0,{sqrt:p});e.secp256k1=(0,s.createCurve)({a:BigInt(0),b:BigInt(7),Fp:f,n:l,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=l,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-u*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,s=BigInt("0x100000000000000000000000000000000"),c=h(a*e,t),d=h(-n*e,t),p=(0,i.mod)(e-c*r-d*o,t),f=(0,i.mod)(-c*n-d*a,t),g=p>s,m=f>s;if(g&&(p=t-p),m&&(f=t-f),p>s||f>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:g,k1:p,k2neg:m,k2:f}}}},t.sha256);var g=BigInt(0),m=e=>"bigint"==typeof e&&g<e&&e<c,b=e=>"bigint"==typeof e&&g<e&&e<l,y={};function w(e,...r){let i=y[e];if(void 0===i){let r=(0,t.sha256)(Uint8Array.from(e,(e=>e.charCodeAt(0))));i=(0,o.concatBytes)(r,r),y[e]=i}return(0,t.sha256)((0,o.concatBytes)(i,...r))}var v=e=>e.toRawBytes(!0).slice(1),_=e=>(0,o.numberToBytesBE)(e,32),x=e=>(0,i.mod)(e,c),E=e=>(0,i.mod)(e,l),C=e.secp256k1.ProjectivePoint,k=(e,t,r)=>C.BASE.multiplyAndAddUnsafe(e,t,r);function P(t){let r=e.secp256k1.utils.normPrivateKeyToScalar(t),i=C.fromPrivateKey(r);return{scalar:i.hasEvenY()?r:E(-r),bytes:v(i)}}function I(e){if(!m(e))throw new Error("bad x: need 0 < x < p");let t=x(e*e),r=p(x(t*e+BigInt(7)));r%d!==g&&(r=x(-r));let i=new C(e,r,u);return i.assertValidity(),i}function S(...e){return E((0,o.bytesToNumberBE)(w("BIP0340/challenge",...e)))}function A(e,t,r){let i=(0,o.ensureBytes)("signature",e,64),n=(0,o.ensureBytes)("message",t),a=(0,o.ensureBytes)("publicKey",r,32);try{let e=I((0,o.bytesToNumberBE)(a)),t=(0,o.bytesToNumberBE)(i.subarray(0,32));if(!m(t))return!1;let r=(0,o.bytesToNumberBE)(i.subarray(32,64));if(!b(r))return!1;let s=S(_(t),v(e),n),c=k(e,r,E(-s));return!(!c||!c.hasEvenY()||c.toAffine().x!==t)}catch{return!1}}e.schnorr={getPublicKey:function(e){return P(e).bytes},sign:function(e,t,i=(0,r.randomBytes)(32)){let n=(0,o.ensureBytes)("message",e),{bytes:a,scalar:s}=P(t),c=(0,o.ensureBytes)("auxRand",i,32),l=_(s^(0,o.bytesToNumberBE)(w("BIP0340/aux",c))),u=w("BIP0340/nonce",l,a,n),d=E((0,o.bytesToNumberBE)(u));if(d===g)throw new Error("sign failed: k is zero");let{bytes:h,scalar:p}=P(d),f=S(h,a,n),m=new Uint8Array(64);if(m.set(h,0),m.set(_(E(p+f*s)),32),!A(m,n,a))throw new Error("sign: Invalid signature produced");return m},verify:A,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:I,pointToBytes:v,numberToBytesBE:o.numberToBytesBE,bytesToNumberBE:o.bytesToNumberBE,taggedHash:w,mod:i.mod}};var T=(0,a.isogenyMap)(f,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))),O=(0,n.mapToCurveSimpleSWU)(f,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:f.create(BigInt("-11"))}),R=(0,a.createHasher)(e.secp256k1.ProjectivePoint,(e=>{let{x:t,y:r}=O(f.create(e[0]));return T(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:f.ORDER,m:1,k:128,expand:"xmd",hash:t.sha256});e.hashToCurve=R.hashToCurve,e.encodeToCurve=R.encodeToCurve})),a3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.recoverPublicKey=void 0;var t=qX(),r=t0(),i=r0();e.recoverPublicKey=async function({hash:e,signature:n}){let o=(0,t.isHex)(n)?n:(0,i.toHex)(n),a=(0,t.isHex)(e)?e:(0,i.toHex)(e),s=(0,r.hexToNumber)(`0x${o.slice(130)}`);(0===s||1===s)&&(s+=27);let{secp256k1:c}=await Promise.resolve().then((()=>o3()));return`0x${c.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(s-27).recoverPublicKey(a.substring(2)).toHex(!1)}`}})),s3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.recoverAddress=void 0;var t=F1(),r=a3();e.recoverAddress=async function({hash:e,signature:i}){return(0,t.publicKeyToAddress)(await(0,r.recoverPublicKey)({hash:e,signature:i}))}})),c3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.presignMessagePrefix=void 0,e.presignMessagePrefix="Ethereum Signed Message:\n    "})),l3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hashMessage=void 0;var t=c3(),r=m0(),i=i0(),n=h0();e.hashMessage=function(e,o){let a="string"==typeof e?(0,i.stringToBytes)(e):e.raw instanceof Uint8Array?e.raw:(0,i.toBytes)(e.raw),s=(0,i.stringToBytes)(`${t.presignMessagePrefix}${a.length}`);return(0,n.keccak256)((0,r.concat)([s,a]),o)}})),u3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.recoverMessageAddress=void 0;var t=l3(),r=s3();e.recoverMessageAddress=async function({message:e,signature:i}){return(0,r.recoverAddress)({hash:(0,t.hashMessage)(e),signature:i})}})),d3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.recoverTypedDataAddress=void 0;var t=T2(),r=s3();e.recoverTypedDataAddress=async function({domain:e,message:i,primaryType:n,signature:o,types:a}){return(0,r.recoverAddress)({hash:(0,t.hashTypedData)({domain:e,message:i,primaryType:n,types:a}),signature:o})}})),h3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyMessage=void 0;var t=I0(),r=_1(),i=u3();e.verifyMessage=async function({address:e,message:n,signature:o}){return(0,r.isAddressEqual)((0,t.getAddress)(e),await(0,i.recoverMessageAddress)({message:n,signature:o}))}})),p3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyTypedData=void 0;var t=I0(),r=_1(),i=d3();e.verifyTypedData=async function({address:e,domain:n,message:o,primaryType:a,signature:s,types:c}){return(0,r.isAddressEqual)((0,t.getAddress)(e),await(0,i.recoverTypedDataAddress)({domain:n,message:o,primaryType:a,signature:s,types:c}))}})),f3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSerializedTransactionType=void 0;var t=j0(),r=b0(),i=t0();e.getSerializedTransactionType=function(e){let n=(0,r.sliceHex)(e,0,1);if("0x02"===n)return"eip1559";if("0x01"===n)return"eip2930";if("0x"!==n&&(0,i.hexToNumber)(n)>=192)return"legacy";throw new t.InvalidSerializedTransactionTypeError({serializedType:n})}})),g3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=void 0;var t=f0(),r=ZX(),i=m1(),n=z0(),o=g0();e.assertTransactionEIP1559=function(e){let{chainId:a,maxPriorityFeePerGas:s,gasPrice:c,maxFeePerGas:l,to:u}=e;if(a<=0)throw new i.InvalidChainIdError({chainId:a});if(u&&!(0,o.isAddress)(u))throw new t.InvalidAddressError({address:u});if(c)throw new r.BaseError("`gasPrice` is not a valid EIP-1559 Transaction attribute.");if(l&&l>2n**256n-1n)throw new n.FeeCapTooHighError({maxFeePerGas:l});if(s&&l&&s>l)throw new n.TipAboveFeeCapError({maxFeePerGas:l,maxPriorityFeePerGas:s})},e.assertTransactionEIP2930=function(e){let{chainId:a,maxPriorityFeePerGas:s,gasPrice:c,maxFeePerGas:l,to:u}=e;if(a<=0)throw new i.InvalidChainIdError({chainId:a});if(u&&!(0,o.isAddress)(u))throw new t.InvalidAddressError({address:u});if(s||l)throw new r.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(c&&c>2n**256n-1n)throw new n.FeeCapTooHighError({maxFeePerGas:c})},e.assertTransactionLegacy=function(e){let{chainId:a,maxPriorityFeePerGas:s,gasPrice:c,maxFeePerGas:l,to:u,accessList:d}=e;if(u&&!(0,o.isAddress)(u))throw new t.InvalidAddressError({address:u});if(typeof a<"u"&&a<=0)throw new i.InvalidChainIdError({chainId:a});if(s||l)throw new r.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(c&&c>2n**256n-1n)throw new n.FeeCapTooHighError({maxFeePerGas:c});if(d)throw new r.BaseError("`accessList` is not a valid Legacy Transaction attribute.")}})),m3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseAccessList=e.toTransactionArray=e.parseTransaction=void 0;var t=f0(),r=j0(),i=g0(),n=qX(),o=QX(),a=e0(),s=t0(),c=W2(),l=V2(),u=g3(),d=f3();function h(e){return(0,c.fromRlp)(`0x${e.slice(4)}`,"hex")}function p(e){let r=[];for(let n=0;n<e.length;n++){let[o,s]=e[n];if(!(0,i.isAddress)(o))throw new t.InvalidAddressError({address:o});r.push({address:o,storageKeys:s.map((e=>(0,l.isHash)(e)?e:(0,a.trim)(e)))})}return r}function f(e){let t=e.slice(-3),r="0x"===t[0]||0n===(0,s.hexToBigInt)(t[0])?27n:28n;return{r:(0,o.padHex)(t[1],{size:32}),s:(0,o.padHex)(t[2],{size:32}),v:r,yParity:27n===r?0:1}}e.parseTransaction=function(e){let t=(0,d.getSerializedTransactionType)(e);return"eip1559"===t?function(e){let t=h(e),[i,o,a,c,l,d,g,m,b,y,w,v]=t;if(9!==t.length&&12!==t.length)throw new r.InvalidSerializedTransactionError({attributes:{chainId:i,nonce:o,maxPriorityFeePerGas:a,maxFeePerGas:c,gas:l,to:d,value:g,data:m,accessList:b,...t.length>9?{v:y,r:w,s:v}:{}},serializedTransaction:e,type:"eip1559"});let _={chainId:(0,s.hexToNumber)(i),type:"eip1559"};return(0,n.isHex)(d)&&"0x"!==d&&(_.to=d),(0,n.isHex)(l)&&"0x"!==l&&(_.gas=(0,s.hexToBigInt)(l)),(0,n.isHex)(m)&&"0x"!==m&&(_.data=m),(0,n.isHex)(o)&&"0x"!==o&&(_.nonce=(0,s.hexToNumber)(o)),(0,n.isHex)(g)&&"0x"!==g&&(_.value=(0,s.hexToBigInt)(g)),(0,n.isHex)(c)&&"0x"!==c&&(_.maxFeePerGas=(0,s.hexToBigInt)(c)),(0,n.isHex)(a)&&"0x"!==a&&(_.maxPriorityFeePerGas=(0,s.hexToBigInt)(a)),0!==b.length&&"0x"!==b&&(_.accessList=p(b)),(0,u.assertTransactionEIP1559)(_),{...12===t.length?f(t):void 0,..._}}(e):"eip2930"===t?function(e){let t=h(e),[i,o,a,c,l,d,g,m,b,y,w]=t;if(8!==t.length&&11!==t.length)throw new r.InvalidSerializedTransactionError({attributes:{chainId:i,nonce:o,gasPrice:a,gas:c,to:l,value:d,data:g,accessList:m,...t.length>8?{v:b,r:y,s:w}:{}},serializedTransaction:e,type:"eip2930"});let v={chainId:(0,s.hexToNumber)(i),type:"eip2930"};return(0,n.isHex)(l)&&"0x"!==l&&(v.to=l),(0,n.isHex)(c)&&"0x"!==c&&(v.gas=(0,s.hexToBigInt)(c)),(0,n.isHex)(g)&&"0x"!==g&&(v.data=g),(0,n.isHex)(o)&&"0x"!==o&&(v.nonce=(0,s.hexToNumber)(o)),(0,n.isHex)(d)&&"0x"!==d&&(v.value=(0,s.hexToBigInt)(d)),(0,n.isHex)(a)&&"0x"!==a&&(v.gasPrice=(0,s.hexToBigInt)(a)),0!==m.length&&"0x"!==m&&(v.accessList=p(m)),(0,u.assertTransactionEIP2930)(v),{...11===t.length?f(t):void 0,...v}}(e):function(e){let t=(0,c.fromRlp)(e,"hex"),[i,o,a,l,d,h,p,f,g]=t;if(6!==t.length&&9!==t.length)throw new r.InvalidSerializedTransactionError({attributes:{nonce:i,gasPrice:o,gas:a,to:l,value:d,data:h,...t.length>6?{v:p,r:f,s:g}:{}},serializedTransaction:e,type:"legacy"});let m={type:"legacy"};if((0,n.isHex)(l)&&"0x"!==l&&(m.to=l),(0,n.isHex)(a)&&"0x"!==a&&(m.gas=(0,s.hexToBigInt)(a)),(0,n.isHex)(h)&&"0x"!==h&&(m.data=h),(0,n.isHex)(i)&&"0x"!==i&&(m.nonce=(0,s.hexToNumber)(i)),(0,n.isHex)(d)&&"0x"!==d&&(m.value=(0,s.hexToBigInt)(d)),(0,n.isHex)(o)&&"0x"!==o&&(m.gasPrice=(0,s.hexToBigInt)(o)),(0,u.assertTransactionLegacy)(m),6===t.length)return m;let b=(0,n.isHex)(p)&&"0x"!==p?(0,s.hexToBigInt)(p):0n;if("0x"===g&&"0x"===f)return b>0&&(m.chainId=Number(b)),m;let y=b,w=Number((y-35n)/2n);if(w>0)m.chainId=w;else if(27n!==y&&28n!==y)throw new r.InvalidLegacyVError({v:y});return m.v=y,m.s=g,m.r=f,m}(e)},e.toTransactionArray=h,e.parseAccessList=p})),b3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializeAccessList=void 0;var t=f0(),r=j0(),i=g0();e.serializeAccessList=function(e){if(!e||0===e.length)return[];let n=[];for(let o=0;o<e.length;o++){let{address:a,storageKeys:s}=e[o];for(let e=0;e<s.length;e++)if(s[e].length-2!=64)throw new r.InvalidStorageKeySizeError({storageKey:s[e]});if(!(0,i.isAddress)(a))throw new t.InvalidAddressError({address:a});n.push([a,s])}return n}})),y3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializeTransaction=void 0;var t=j0(),r=m0(),i=e0(),n=r0(),o=U2(),a=g3(),s=o1(),c=b3();e.serializeTransaction=function(e,l){let u=(0,s.getTransactionType)(e);return"eip1559"===u?function(e,t){let{chainId:s,gas:l,nonce:u,to:d,value:h,maxFeePerGas:p,maxPriorityFeePerGas:f,accessList:g,data:m}=e;(0,a.assertTransactionEIP1559)(e);let b=(0,c.serializeAccessList)(g),y=[(0,n.toHex)(s),u?(0,n.toHex)(u):"0x",f?(0,n.toHex)(f):"0x",p?(0,n.toHex)(p):"0x",l?(0,n.toHex)(l):"0x",d??"0x",h?(0,n.toHex)(h):"0x",m??"0x",b];if(t){let e=0n===t.v?"0x":1n===t.v?(0,n.toHex)(1):27n===t.v?"0x":(0,n.toHex)(1);y.push(e,(0,i.trim)(t.r),(0,i.trim)(t.s))}return(0,r.concatHex)(["0x02",(0,o.toRlp)(y)])}(e,l):"eip2930"===u?function(e,t){let{chainId:s,gas:l,data:u,nonce:d,to:h,value:p,accessList:f,gasPrice:g}=e;(0,a.assertTransactionEIP2930)(e);let m=(0,c.serializeAccessList)(f),b=[(0,n.toHex)(s),d?(0,n.toHex)(d):"0x",g?(0,n.toHex)(g):"0x",l?(0,n.toHex)(l):"0x",h??"0x",p?(0,n.toHex)(p):"0x",u??"0x",m];if(t){let e=0n===t.v?"0x":1n===t.v?(0,n.toHex)(1):27n===t.v?"0x":(0,n.toHex)(1);b.push(e,(0,i.trim)(t.r),(0,i.trim)(t.s))}return(0,r.concatHex)(["0x01",(0,o.toRlp)(b)])}(e,l):function(e,r){let{chainId:i=0,gas:s,data:c,nonce:l,to:u,value:d,gasPrice:h}=e;(0,a.assertTransactionLegacy)(e);let p=[l?(0,n.toHex)(l):"0x",h?(0,n.toHex)(h):"0x",s?(0,n.toHex)(s):"0x",u??"0x",d?(0,n.toHex)(d):"0x",c??"0x"];if(r){let e=(()=>{if(i>0)return BigInt(2*i)+BigInt(35n+r.v-27n);if(r.v>=35n)return(r.v-35n)/2n>0?r.v:27n+(35n===r.v?0n:1n);let e=27n+(27n===r.v?0n:1n);if(r.v!==e)throw new t.InvalidLegacyVError({v:r.v});return e})();p=[...p,(0,n.toHex)(e),r.r,r.s]}else i>0&&(p=[...p,(0,n.toHex)(i),"0x","0x"]);return(0,o.toRlp)(p)}(e,l)}})),w3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseUnits=void 0,e.parseUnits=function(e,t){let[r,i="0"]=e.split("."),n=r.startsWith("-");if(n&&(r=r.slice(1)),i=i.replace(/(0+)$/,""),0===t)1===Math.round(+`.${i}`)&&(r=`${BigInt(r)+1n}`),i="";else if(i.length>t){let[e,n,o]=[i.slice(0,t-1),i.slice(t-1,t),i.slice(t)],a=Math.round(+`${n}.${o}`);i=a>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${a}`,i.length>t&&(i=i.slice(1),r=`${BigInt(r)+1n}`),i=i.slice(0,t)}else i=i.padEnd(t,"0");return BigInt(`${n?"-":""}${r}${i}`)}})),v3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseEther=void 0;var t=R0(),r=w3();e.parseEther=function(e,i="wei"){return(0,r.parseUnits)(e,t.etherUnits[i])}})),_3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseGwei=void 0;var t=R0(),r=w3();e.parseGwei=function(e,i="wei"){return(0,r.parseUnits)(e,t.gweiUnits[i])}})),x3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.concat=e.extractFunctionParts=e.extractFunctionType=e.extractFunctionParams=e.extractFunctionName=e.isAddressEqual=e.isAddress=e.getAddress=e.getCreate2Address=e.getCreateAddress=e.getContractAddress=e.publicKeyToAddress=e.parseAccount=e.formatAbiParams=e.formatAbiItem=e.formatAbiItemWithArgs=e.encodePacked=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.getAbiItem=e.encodeFunctionResult=e.encodeFunctionData=e.encodeEventTopics=e.encodeErrorResult=e.encodeDeployData=e.encodeAbiParameters=e.decodeFunctionResult=e.decodeFunctionData=e.decodeEventLog=e.decodeErrorResult=e.decodeAbiParameters=e.validateTypedData=e.stringify=e.rpc=e.getSocket=e.integerRegex=e.bytesRegex=e.arrayRegex=e.getChainContractAddress=e.extractChain=e.defineChain=e.assertCurrentChain=e.offchainLookupSignature=e.offchainLookupAbiItem=e.offchainLookup=e.ccipFetch=e.buildRequest=e.isDeterministicError=void 0,e.getEstimateGasError=e.getContractError=e.getCallError=e.getNodeError=e.containsNodeError=e.fromRlp=e.hexToString=e.hexToNumber=e.hexToBigInt=e.hexToBool=e.fromHex=e.fromBytes=e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigint=e.bytesToBigInt=e.stringToHex=e.numberToHex=e.toHex=e.bytesToHex=e.boolToHex=e.stringToBytes=e.numberToBytes=e.hexToBytes=e.toBytes=e.boolToBytes=e.toRlp=e.extract=e.formatTransactionRequest=e.defineTransactionRequest=e.defineTransactionReceipt=e.formatLog=e.transactionType=e.formatTransaction=e.defineTransaction=e.formatBlock=e.defineBlock=e.trim=e.sliceHex=e.sliceBytes=e.slice=e.size=e.padHex=e.padBytes=e.pad=e.isHex=e.isBytes=e.concatHex=e.concatBytes=void 0,e.parseGwei=e.parseEther=e.parseUnits=e.formatUnits=e.formatGwei=e.formatEther=e.serializeAccessList=e.serializeTransaction=e.prepareTransactionRequest=e.parseTransaction=e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=e.assertRequest=e.getTransactionType=e.getSerializedTransactionType=e.hashMessage=e.verifyTypedData=e.verifyMessage=e.recoverTypedDataAddress=e.recoverPublicKey=e.recoverMessageAddress=e.recoverAddress=e.hashTypedData=e.ripemd160=e.sha256=e.keccak256=e.isHash=e.getFunctionSelector=e.getEventSelector=e.defineFormatter=e.getTransactionError=void 0;var t=V1();Object.defineProperty(e,"isDeterministicError",{enumerable:!0,get:function(){return t.isDeterministicError}}),Object.defineProperty(e,"buildRequest",{enumerable:!0,get:function(){return t.buildRequest}});var r=x1();Object.defineProperty(e,"ccipFetch",{enumerable:!0,get:function(){return r.ccipFetch}}),Object.defineProperty(e,"offchainLookup",{enumerable:!0,get:function(){return r.offchainLookup}}),Object.defineProperty(e,"offchainLookupAbiItem",{enumerable:!0,get:function(){return r.offchainLookupAbiItem}}),Object.defineProperty(e,"offchainLookupSignature",{enumerable:!0,get:function(){return r.offchainLookupSignature}});var i=M1();Object.defineProperty(e,"assertCurrentChain",{enumerable:!0,get:function(){return i.assertCurrentChain}});var n=I2();Object.defineProperty(e,"defineChain",{enumerable:!0,get:function(){return n.defineChain}});var o=S2();Object.defineProperty(e,"extractChain",{enumerable:!0,get:function(){return o.extractChain}});var a=b1();Object.defineProperty(e,"getChainContractAddress",{enumerable:!0,get:function(){return a.getChainContractAddress}});var s=A2();Object.defineProperty(e,"arrayRegex",{enumerable:!0,get:function(){return s.arrayRegex}}),Object.defineProperty(e,"bytesRegex",{enumerable:!0,get:function(){return s.bytesRegex}}),Object.defineProperty(e,"integerRegex",{enumerable:!0,get:function(){return s.integerRegex}});var c=r2();Object.defineProperty(e,"getSocket",{enumerable:!0,get:function(){return c.getSocket}}),Object.defineProperty(e,"rpc",{enumerable:!0,get:function(){return c.rpc}});var l=T0();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}});var u=O2();Object.defineProperty(e,"validateTypedData",{enumerable:!0,get:function(){return u.validateTypedData}});var d=S0();Object.defineProperty(e,"decodeAbiParameters",{enumerable:!0,get:function(){return d.decodeAbiParameters}});var h=A0();Object.defineProperty(e,"decodeErrorResult",{enumerable:!0,get:function(){return h.decodeErrorResult}});var p=l1();Object.defineProperty(e,"decodeEventLog",{enumerable:!0,get:function(){return p.decodeEventLog}});var f=R2();Object.defineProperty(e,"decodeFunctionData",{enumerable:!0,get:function(){return f.decodeFunctionData}});var g=p1();Object.defineProperty(e,"decodeFunctionResult",{enumerable:!0,get:function(){return g.decodeFunctionResult}});var m=y0();Object.defineProperty(e,"encodeAbiParameters",{enumerable:!0,get:function(){return m.encodeAbiParameters}});var b=N2();Object.defineProperty(e,"encodeDeployData",{enumerable:!0,get:function(){return b.encodeDeployData}});var y=M2();Object.defineProperty(e,"encodeErrorResult",{enumerable:!0,get:function(){return y.encodeErrorResult}});var w=_0();Object.defineProperty(e,"encodeEventTopics",{enumerable:!0,get:function(){return w.encodeEventTopics}});var v=k0();Object.defineProperty(e,"encodeFunctionData",{enumerable:!0,get:function(){return v.encodeFunctionData}});var _=$2();Object.defineProperty(e,"encodeFunctionResult",{enumerable:!0,get:function(){return _.encodeFunctionResult}});var x=v0();Object.defineProperty(e,"getAbiItem",{enumerable:!0,get:function(){return x.getAbiItem}});var E=FX();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return E.parseAbi}}),Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return E.parseAbiItem}}),Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return E.parseAbiParameter}}),Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return E.parseAbiParameters}});var C=j2();Object.defineProperty(e,"encodePacked",{enumerable:!0,get:function(){return C.encodePacked}});var k=O0();Object.defineProperty(e,"formatAbiItemWithArgs",{enumerable:!0,get:function(){return k.formatAbiItemWithArgs}});var P=zX();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return P.formatAbiItem}}),Object.defineProperty(e,"formatAbiParams",{enumerable:!0,get:function(){return P.formatAbiParams}});var I=C0();Object.defineProperty(e,"parseAccount",{enumerable:!0,get:function(){return I.parseAccount}});var S=F1();Object.defineProperty(e,"publicKeyToAddress",{enumerable:!0,get:function(){return S.publicKeyToAddress}});var A=F2();Object.defineProperty(e,"getContractAddress",{enumerable:!0,get:function(){return A.getContractAddress}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return A.getCreateAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return A.getCreate2Address}});var T=I0();Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return T.getAddress}});var O=g0();Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return O.isAddress}});var R=_1();Object.defineProperty(e,"isAddressEqual",{enumerable:!0,get:function(){return R.isAddressEqual}});var N=H2();Object.defineProperty(e,"extractFunctionName",{enumerable:!0,get:function(){return N.extractFunctionName}}),Object.defineProperty(e,"extractFunctionParams",{enumerable:!0,get:function(){return N.extractFunctionParams}}),Object.defineProperty(e,"extractFunctionType",{enumerable:!0,get:function(){return N.extractFunctionType}}),Object.defineProperty(e,"extractFunctionParts",{enumerable:!0,get:function(){return N.extractFunctionParts}});var M=m0();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return M.concat}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return M.concatBytes}}),Object.defineProperty(e,"concatHex",{enumerable:!0,get:function(){return M.concatHex}});var $=L2();Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return $.isBytes}});var j=qX();Object.defineProperty(e,"isHex",{enumerable:!0,get:function(){return j.isHex}});var L=QX();Object.defineProperty(e,"pad",{enumerable:!0,get:function(){return L.pad}}),Object.defineProperty(e,"padBytes",{enumerable:!0,get:function(){return L.padBytes}}),Object.defineProperty(e,"padHex",{enumerable:!0,get:function(){return L.padHex}});var B=WX();Object.defineProperty(e,"size",{enumerable:!0,get:function(){return B.size}});var D=b0();Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return D.slice}}),Object.defineProperty(e,"sliceBytes",{enumerable:!0,get:function(){return D.sliceBytes}}),Object.defineProperty(e,"sliceHex",{enumerable:!0,get:function(){return D.sliceHex}});var U=e0();Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return U.trim}});var F=X0();Object.defineProperty(e,"defineBlock",{enumerable:!0,get:function(){return F.defineBlock}}),Object.defineProperty(e,"formatBlock",{enumerable:!0,get:function(){return F.formatBlock}});var H=Q0();Object.defineProperty(e,"defineTransaction",{enumerable:!0,get:function(){return H.defineTransaction}}),Object.defineProperty(e,"formatTransaction",{enumerable:!0,get:function(){return H.formatTransaction}}),Object.defineProperty(e,"transactionType",{enumerable:!0,get:function(){return H.transactionType}});var z=u1();Object.defineProperty(e,"formatLog",{enumerable:!0,get:function(){return z.formatLog}});var q=z2();Object.defineProperty(e,"defineTransactionReceipt",{enumerable:!0,get:function(){return q.defineTransactionReceipt}});var W=Z0();Object.defineProperty(e,"defineTransactionRequest",{enumerable:!0,get:function(){return W.defineTransactionRequest}}),Object.defineProperty(e,"formatTransactionRequest",{enumerable:!0,get:function(){return W.formatTransactionRequest}});var V=V0();Object.defineProperty(e,"extract",{enumerable:!0,get:function(){return V.extract}});var G=U2();Object.defineProperty(e,"toRlp",{enumerable:!0,get:function(){return G.toRlp}});var Z=i0();Object.defineProperty(e,"boolToBytes",{enumerable:!0,get:function(){return Z.boolToBytes}}),Object.defineProperty(e,"toBytes",{enumerable:!0,get:function(){return Z.toBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return Z.hexToBytes}}),Object.defineProperty(e,"numberToBytes",{enumerable:!0,get:function(){return Z.numberToBytes}}),Object.defineProperty(e,"stringToBytes",{enumerable:!0,get:function(){return Z.stringToBytes}});var K=r0();Object.defineProperty(e,"boolToHex",{enumerable:!0,get:function(){return K.boolToHex}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return K.bytesToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return K.toHex}}),Object.defineProperty(e,"numberToHex",{enumerable:!0,get:function(){return K.numberToHex}}),Object.defineProperty(e,"stringToHex",{enumerable:!0,get:function(){return K.stringToHex}});var Y=q2();Object.defineProperty(e,"bytesToBigInt",{enumerable:!0,get:function(){return Y.bytesToBigInt}}),Object.defineProperty(e,"bytesToBigint",{enumerable:!0,get:function(){return Y.bytesToBigInt}}),Object.defineProperty(e,"bytesToBool",{enumerable:!0,get:function(){return Y.bytesToBool}}),Object.defineProperty(e,"bytesToNumber",{enumerable:!0,get:function(){return Y.bytesToNumber}}),Object.defineProperty(e,"bytesToString",{enumerable:!0,get:function(){return Y.bytesToString}}),Object.defineProperty(e,"fromBytes",{enumerable:!0,get:function(){return Y.fromBytes}});var J=t0();Object.defineProperty(e,"fromHex",{enumerable:!0,get:function(){return J.fromHex}}),Object.defineProperty(e,"hexToBool",{enumerable:!0,get:function(){return J.hexToBool}}),Object.defineProperty(e,"hexToBigInt",{enumerable:!0,get:function(){return J.hexToBigInt}}),Object.defineProperty(e,"hexToNumber",{enumerable:!0,get:function(){return J.hexToNumber}}),Object.defineProperty(e,"hexToString",{enumerable:!0,get:function(){return J.hexToString}});var Q=W2();Object.defineProperty(e,"fromRlp",{enumerable:!0,get:function(){return Q.fromRlp}});var X=q0();Object.defineProperty(e,"containsNodeError",{enumerable:!0,get:function(){return X.containsNodeError}}),Object.defineProperty(e,"getNodeError",{enumerable:!0,get:function(){return X.getNodeError}});var ee=y1();Object.defineProperty(e,"getCallError",{enumerable:!0,get:function(){return ee.getCallError}});var te=U0();Object.defineProperty(e,"getContractError",{enumerable:!0,get:function(){return te.getContractError}});var re=W0();Object.defineProperty(e,"getEstimateGasError",{enumerable:!0,get:function(){return re.getEstimateGasError}});var ie=$1();Object.defineProperty(e,"getTransactionError",{enumerable:!0,get:function(){return ie.getTransactionError}});var ne=G0();Object.defineProperty(e,"defineFormatter",{enumerable:!0,get:function(){return ne.defineFormatter}});var oe=p0();Object.defineProperty(e,"getEventSelector",{enumerable:!0,get:function(){return oe.getEventSelector}});var ae=w0();Object.defineProperty(e,"getFunctionSelector",{enumerable:!0,get:function(){return ae.getFunctionSelector}});var se=V2();Object.defineProperty(e,"isHash",{enumerable:!0,get:function(){return se.isHash}});var ce=h0();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return ce.keccak256}});var le=K2();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return le.sha256}});var ue=J2();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return ue.ripemd160}});var de=T2();Object.defineProperty(e,"hashTypedData",{enumerable:!0,get:function(){return de.hashTypedData}});var he=s3();Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return he.recoverAddress}});var pe=u3();Object.defineProperty(e,"recoverMessageAddress",{enumerable:!0,get:function(){return pe.recoverMessageAddress}});var fe=a3();Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return fe.recoverPublicKey}});var ge=d3();Object.defineProperty(e,"recoverTypedDataAddress",{enumerable:!0,get:function(){return ge.recoverTypedDataAddress}});var me=h3();Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return me.verifyMessage}});var be=p3();Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return be.verifyTypedData}});var ye=l3();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return ye.hashMessage}});var we=f3();Object.defineProperty(e,"getSerializedTransactionType",{enumerable:!0,get:function(){return we.getSerializedTransactionType}});var ve=o1();Object.defineProperty(e,"getTransactionType",{enumerable:!0,get:function(){return ve.getTransactionType}});var _e=K0();Object.defineProperty(e,"assertRequest",{enumerable:!0,get:function(){return _e.assertRequest}});var xe=g3();Object.defineProperty(e,"assertTransactionEIP1559",{enumerable:!0,get:function(){return xe.assertTransactionEIP1559}}),Object.defineProperty(e,"assertTransactionEIP2930",{enumerable:!0,get:function(){return xe.assertTransactionEIP2930}}),Object.defineProperty(e,"assertTransactionLegacy",{enumerable:!0,get:function(){return xe.assertTransactionLegacy}});var Ee=m3();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return Ee.parseTransaction}});var Ce=a1();Object.defineProperty(e,"prepareTransactionRequest",{enumerable:!0,get:function(){return Ce.prepareTransactionRequest}});var ke=y3();Object.defineProperty(e,"serializeTransaction",{enumerable:!0,get:function(){return ke.serializeTransaction}});var Pe=b3();Object.defineProperty(e,"serializeAccessList",{enumerable:!0,get:function(){return Pe.serializeAccessList}});var Ie=M0();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return Ie.formatEther}});var Se=$0();Object.defineProperty(e,"formatGwei",{enumerable:!0,get:function(){return Se.formatGwei}});var Ae=N0();Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return Ae.formatUnits}});var Te=w3();Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return Te.parseUnits}});var Oe=v3();Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return Oe.parseEther}});var Re=_3();Object.defineProperty(e,"parseGwei",{enumerable:!0,get:function(){return Re.parseGwei}})})),E3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatProof=void 0;var t=x3();function r(e){return e.map((e=>({...e,value:BigInt(e.value)})))}e.formatProof=function(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?(0,t.hexToNumber)(e.nonce):void 0,storageProof:e.storageProof?r(e.storageProof):void 0}}})),C3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getProof=void 0;var t=r0(),r=E3();e.getProof=async function(e,{address:i,blockNumber:n,blockTag:o,storageKeys:a}){let s=o??"latest",c=void 0!==n?(0,t.numberToHex)(n):void 0,l=await e.request({method:"eth_getProof",params:[i,a,c||s]});return(0,r.formatProof)(l)}})),k3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getStorageAt=void 0;var t=r0();e.getStorageAt=async function(e,{address:r,blockNumber:i,blockTag:n="latest",slot:o}){let a=void 0!==i?(0,t.numberToHex)(i):void 0;return await e.request({method:"eth_getStorageAt",params:[r,o,a||n]})}})),P3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTransaction=void 0;var t=j0(),r=r0(),i=Q0();e.getTransaction=async function(e,{blockHash:n,blockNumber:o,blockTag:a,hash:s,index:c}){let l=a||"latest",u=void 0!==o?(0,r.numberToHex)(o):void 0,d=null;if(s?d=await e.request({method:"eth_getTransactionByHash",params:[s]}):n?d=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[n,(0,r.numberToHex)(c)]}):(u||l)&&(d=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[u||l,(0,r.numberToHex)(c)]})),!d)throw new t.TransactionNotFoundError({blockHash:n,blockNumber:o,blockTag:l,hash:s,index:c});return(e.chain?.formatters?.transaction?.format||i.formatTransaction)(d)}})),I3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTransactionConfirmations=void 0;var t=HX(),r=T1(),i=P3();e.getTransactionConfirmations=async function(e,{hash:n,transactionReceipt:o}){let[a,s]=await Promise.all([(0,t.getAction)(e,r.getBlockNumber,"getBlockNumber")({}),n?(0,t.getAction)(e,i.getTransaction,"getBlockNumber")({hash:n}):void 0]),c=o?.blockNumber||s?.blockNumber;return c?a-c+1n:0n}})),S3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTransactionReceipt=void 0;var t=j0(),r=z2();e.getTransactionReceipt=async function(e,{hash:i}){let n=await e.request({method:"eth_getTransactionReceipt",params:[i]});if(!n)throw new t.TransactionReceiptNotFoundError({hash:i});return(e.chain?.formatters?.transactionReceipt?.format||r.formatTransactionReceipt)(n)}})),A3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multicall=void 0;var t=f1(),r=KX(),i=ZX(),n=L0(),o=p1(),a=k0(),s=b1(),c=U0(),l=HX(),u=C1();e.multicall=async function(e,d){let{allowFailure:h=!0,batchSize:p,blockNumber:f,blockTag:g,contracts:m,multicallAddress:b}=d,y=p??("object"==typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),w=b;if(!w){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");w=(0,s.getChainContractAddress)({blockNumber:f,chain:e.chain,contract:"multicall3"})}let v=[[]],_=0,x=0;for(let e=0;e<m.length;e++){let{abi:t,address:r,args:i,functionName:n}=m[e];try{let e=(0,a.encodeFunctionData)({abi:t,args:i,functionName:n});x+=(e.length-2)/2,y>0&&x>y&&v[_].length>0&&(_++,x=(e.length-2)/2,v[_]=[]),v[_]=[...v[_],{allowFailure:!0,callData:e,target:r}]}catch(e){let o=(0,c.getContractError)(e,{abi:t,address:r,args:i,docsPath:"/docs/contract/multicall",functionName:n});if(!h)throw o;v[_]=[...v[_],{allowFailure:!0,callData:"0x",target:r}]}}let E=await Promise.allSettled(v.map((r=>(0,l.getAction)(e,u.readContract,"readContract")({abi:t.multicall3Abi,address:w,args:[r],blockNumber:f,blockTag:g,functionName:"aggregate3"})))),C=[];for(let e=0;e<E.length;e++){let t=E[e];if("rejected"===t.status){if(!h)throw t.reason;for(let r=0;r<v[e].length;r++)C.push({status:"failure",error:t.reason,result:void 0});continue}let i=t.value;for(let t=0;t<i.length;t++){let{returnData:a,success:s}=i[t],{callData:l}=v[e][t],{abi:u,address:d,functionName:p,args:f}=m[C.length];try{if("0x"===l)throw new r.AbiDecodingZeroDataError;if(!s)throw new n.RawContractError({data:a});let e=(0,o.decodeFunctionResult)({abi:u,args:f,data:a,functionName:p});C.push(h?{result:e,status:"success"}:e)}catch(e){let t=(0,c.getContractError)(e,{abi:u,address:d,args:f,docsPath:"/docs/contract/multicall",functionName:p});if(!h)throw t;C.push({error:t,result:void 0,status:"failure"})}}}if(C.length!==m.length)throw new i.BaseError("multicall results mismatch");return C}})),T3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.universalSignatureValidatorByteCode=void 0,e.universalSignatureValidatorByteCode="0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"})),O3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isBytesEqual=void 0;var t=Q2(),r=i0(),i=qX();e.isBytesEqual=function(e,n){let o=(0,i.isHex)(e)?(0,r.toBytes)(e):e,a=(0,i.isHex)(n)?(0,r.toBytes)(n):n;return(0,t.equalBytes)(o,a)}})),R3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyHash=void 0;var t=f1(),r=T3(),i=L0(),n=O3(),o=HX(),a=x3(),s=E1();e.verifyHash=async function(e,{address:c,hash:l,signature:u,...d}){let h=(0,a.isHex)(u)?u:(0,a.toHex)(u);try{let{data:i}=await(0,o.getAction)(e,s.call,"call")({data:(0,a.encodeDeployData)({abi:t.universalSignatureValidatorAbi,args:[c,l,h],bytecode:r.universalSignatureValidatorByteCode}),...d});return(0,n.isBytesEqual)(i??"0x0","0x1")}catch(e){if(e instanceof i.CallExecutionError)return!1;throw e}}})),N3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyMessage=void 0;var t=x3(),r=R3();e.verifyMessage=async function(e,{address:i,message:n,signature:o,...a}){let s=(0,t.hashMessage)(n);return(0,r.verifyHash)(e,{address:i,hash:s,signature:o,...a})}})),M3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyTypedData=void 0;var t=T2(),r=R3();e.verifyTypedData=async function(e,{address:i,signature:n,message:o,primaryType:a,types:s,domain:c,...l}){let u=(0,t.hashTypedData)({message:o,primaryType:a,types:s,domain:c});return(0,r.verifyHash)(e,{address:i,hash:u,signature:n,...l})}})),$3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.watchBlockNumber=void 0;var t=t0(),r=HX(),i=P1(),n=S1(),o=T0(),a=T1();e.watchBlockNumber=function(e,{emitOnBegin:s=!1,emitMissed:c=!1,onBlockNumber:l,onError:u,poll:d,pollingInterval:h=e.pollingInterval}){let p;return(typeof d<"u"?d:"webSocket"!==e.transport.type)?(()=>{let t=(0,o.stringify)(["watchBlockNumber",e.uid,s,c,h]);return(0,i.observe)(t,{onBlockNumber:l,onError:u},(t=>(0,n.poll)((async()=>{try{let i=await(0,r.getAction)(e,a.getBlockNumber,"getBlockNumber")({cacheTime:0});if(p){if(i===p)return;if(i-p>1&&c)for(let e=p+1n;e<i;e++)t.onBlockNumber(e,p),p=e}(!p||i>p)&&(t.onBlockNumber(i,p),p=i)}catch(e){t.onError?.(e)}}),{emitOnBegin:s,interval:h})))})():(()=>{let r=!0,i=()=>r=!1;return(async()=>{try{let{unsubscribe:n}=await e.transport.subscribe({params:["newHeads"],onData(e){if(!r)return;let i=(0,t.hexToBigInt)(e.result?.number);l(i,p),p=i},onError(e){u?.(e)}});i=n,r||i()}catch(e){u?.(e)}})(),i})()}})),j3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.waitForTransactionReceipt=void 0;var t=J0(),r=j0(),i=HX(),n=P1(),o=W1(),a=T0(),s=e1(),c=P3(),l=S3(),u=$3();e.waitForTransactionReceipt=async function(e,{confirmations:d=1,hash:h,onReplaced:p,pollingInterval:f=e.pollingInterval,timeout:g}){let m,b,y,w=(0,a.stringify)(["waitForTransactionReceipt",e.uid,h]),v=!1;return new Promise(((a,_)=>{g&&setTimeout((()=>_(new r.WaitForTransactionReceiptTimeoutError({hash:h}))),g);let x=(0,n.observe)(w,{onReplaced:p,resolve:a,reject:_},(n=>{let a=(0,i.getAction)(e,u.watchBlockNumber,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:f,async onBlockNumber(u){if(v)return;let p=u,f=e=>{a(),e(),x()};try{if(y){if(d>1&&(!y.blockNumber||p-y.blockNumber+1n<d))return;return void f((()=>n.resolve(y)))}if(m||(v=!0,await(0,o.withRetry)((async()=>{m=await(0,i.getAction)(e,c.getTransaction,"getTransaction")({hash:h}),m.blockNumber&&(p=m.blockNumber)}),{delay:({count:e})=>200*~~(1<<e),retryCount:6}),v=!1),y=await(0,i.getAction)(e,l.getTransactionReceipt,"getTransactionReceipt")({hash:h}),d>1&&(!y.blockNumber||p-y.blockNumber+1n<d))return;f((()=>n.resolve(y)))}catch(a){if(m&&(a instanceof r.TransactionNotFoundError||a instanceof r.TransactionReceiptNotFoundError))try{b=m,v=!0;let r=await(0,o.withRetry)((()=>(0,i.getAction)(e,s.getBlock,"getBlock")({blockNumber:p,includeTransactions:!0})),{delay:({count:e})=>200*~~(1<<e),retryCount:6,shouldRetry:({error:e})=>e instanceof t.BlockNotFoundError});v=!1;let a=r.transactions.find((({from:e,nonce:t})=>e===b.from&&t===b.nonce));if(!a||(y=await(0,i.getAction)(e,l.getTransactionReceipt,"getTransactionReceipt")({hash:a.hash}),d>1&&(!y.blockNumber||p-y.blockNumber+1n<d)))return;let c="replaced";a.to===b.to&&a.value===b.value?c="repriced":a.from===a.to&&0n===a.value&&(c="cancelled"),f((()=>{n.onReplaced?.({reason:c,replacedTransaction:b,transaction:a,transactionReceipt:y}),n.resolve(y)}))}catch(e){f((()=>n.reject(e)))}else f((()=>n.reject(a)))}}})}))}))}})),L3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.watchBlocks=void 0;var t=X0(),r=HX(),i=P1(),n=S1(),o=T0(),a=e1();e.watchBlocks=function(e,{blockTag:s="latest",emitMissed:c=!1,emitOnBegin:l=!1,onBlock:u,onError:d,includeTransactions:h,poll:p,pollingInterval:f=e.pollingInterval}){let g,m=typeof p<"u"?p:"webSocket"!==e.transport.type,b=h??!1;return m?(()=>{let t=(0,o.stringify)(["watchBlocks",e.uid,c,l,b,f]);return(0,i.observe)(t,{onBlock:u,onError:d},(t=>(0,n.poll)((async()=>{try{let i=await(0,r.getAction)(e,a.getBlock,"getBlock")({blockTag:s,includeTransactions:b});if(i.number&&g?.number){if(i.number===g.number)return;if(i.number-g.number>1&&c)for(let n=g?.number+1n;n<i.number;n++){let i=await(0,r.getAction)(e,a.getBlock,"getBlock")({blockNumber:n,includeTransactions:b});t.onBlock(i,g),g=i}}(!g?.number||"pending"===s&&!i?.number||i.number&&i.number>g.number)&&(t.onBlock(i,g),g=i)}catch(e){t.onError?.(e)}}),{emitOnBegin:l,interval:f})))})():(()=>{let r=!0,i=()=>r=!1;return(async()=>{try{let{unsubscribe:n}=await e.transport.subscribe({params:["newHeads"],onData(i){if(!r)return;let n=(e.chain?.formatters?.block?.format||t.formatBlock)(i.result);u(n,g),g=n},onError(e){d?.(e)}});i=n,r||i()}catch(e){d?.(e)}})(),i})()}})),B3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.watchEvent=void 0;var t=P1(),r=S1(),i=T0(),n=KX(),o=D0(),a=HX(),s=x3(),c=w2(),l=T1(),u=O1(),d=d1(),h=R1();e.watchEvent=function(e,{address:p,args:f,batch:g=!0,event:m,events:b,onError:y,onLogs:w,poll:v,pollingInterval:_=e.pollingInterval,strict:x}){let E=typeof v<"u"?v:"webSocket"!==e.transport.type,C=x??!1;return E?(()=>{let n=(0,i.stringify)(["watchEvent",p,f,g,e.uid,m,_]);return(0,t.observe)(n,{onLogs:w,onError:y},(t=>{let i,n,s=!1,y=(0,r.poll)((async()=>{if(s)try{let r;if(n)r=await(0,a.getAction)(e,u.getFilterChanges,"getFilterChanges")({filter:n});else{let t=await(0,a.getAction)(e,l.getBlockNumber,"getBlockNumber")({});r=i&&i!==t?await(0,a.getAction)(e,d.getLogs,"getLogs")({address:p,args:f,event:m,events:b,fromBlock:i+1n,toBlock:t}):[],i=t}if(0===r.length)return;if(g)t.onLogs(r);else for(let e of r)t.onLogs([e])}catch(e){n&&e instanceof o.InvalidInputRpcError&&(s=!1),t.onError?.(e)}else{try{n=await(0,a.getAction)(e,c.createEventFilter,"createEventFilter")({address:p,args:f,event:m,events:b,strict:C})}catch{}s=!0}}),{emitOnBegin:!0,interval:_});return async()=>{n&&await(0,a.getAction)(e,h.uninstallFilter,"uninstallFilter")({filter:n}),y()}}))})():(()=>{let t=!0,r=()=>t=!1;return(async()=>{try{let i=b??(m?[m]:void 0),o=[];i&&(o=[i.flatMap((e=>(0,s.encodeEventTopics)({abi:[e],eventName:e.name,args:f})))],m&&(o=o[0]));let{unsubscribe:a}=await e.transport.subscribe({params:["logs",{address:p,topics:o}],onData(e){if(!t)return;let r=e.result;try{let{eventName:e,args:t}=(0,s.decodeEventLog)({abi:i,data:r.data,topics:r.topics,strict:C}),n=(0,s.formatLog)(r,{args:t,eventName:e});w([n])}catch(e){let t,i;if(e instanceof n.DecodeLogDataMismatch||e instanceof n.DecodeLogTopicsMismatch){if(x)return;t=e.abiItem.name,i=e.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}let o=(0,s.formatLog)(r,{args:i?[]:{},eventName:t});w([o])}},onError(e){y?.(e)}});r=a,t||r()}catch(e){y?.(e)}})(),r})()}})),D3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.watchPendingTransactions=void 0;var t=HX(),r=P1(),i=S1(),n=T0(),o=v2(),a=O1(),s=R1();e.watchPendingTransactions=function(e,{batch:c=!0,onError:l,onTransactions:u,poll:d,pollingInterval:h=e.pollingInterval}){return(typeof d<"u"?d:"webSocket"!==e.transport.type)?(()=>{let d=(0,n.stringify)(["watchPendingTransactions",e.uid,c,h]);return(0,r.observe)(d,{onTransactions:u,onError:l},(r=>{let n,l=(0,i.poll)((async()=>{try{if(!n)try{return void(n=await(0,t.getAction)(e,o.createPendingTransactionFilter,"createPendingTransactionFilter")({}))}catch(e){throw l(),e}let i=await(0,t.getAction)(e,a.getFilterChanges,"getFilterChanges")({filter:n});if(0===i.length)return;if(c)r.onTransactions(i);else for(let e of i)r.onTransactions([e])}catch(e){r.onError?.(e)}}),{emitOnBegin:!0,interval:h});return async()=>{n&&await(0,t.getAction)(e,s.uninstallFilter,"uninstallFilter")({filter:n}),l()}}))})():(()=>{let t=!0,r=()=>t=!1;return(async()=>{try{let{unsubscribe:i}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!t)return;let r=e.result;u([r])},onError(e){l?.(e)}});r=i,t||r()}catch(e){l?.(e)}})(),r})()}})),U3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.publicActions=void 0;var t=u2(),r=g2(),i=m2(),n=b2(),o=f2(),a=E1(),s=y2(),c=E0(),l=w2(),u=v2(),d=c1(),h=i1(),p=s1(),f=r1(),g=_2(),m=e1(),b=T1(),y=x2(),w=E2(),v=j1(),_=h1(),x=k2(),E=O1(),C=P2(),k=t1(),P=d1(),I=C3(),S=k3(),A=P3(),T=I3(),O=n1(),R=S3(),N=A3(),M=C1(),$=k1(),j=R1(),L=N3(),B=M3(),D=j3(),U=$3(),F=L3(),H=N1(),z=B3(),q=D3(),W=a1(),V=L1();e.publicActions=function(e){return{call:t=>(0,a.call)(e,t),createBlockFilter:()=>(0,s.createBlockFilter)(e),createContractEventFilter:t=>(0,c.createContractEventFilter)(e,t),createEventFilter:t=>(0,l.createEventFilter)(e,t),createPendingTransactionFilter:()=>(0,u.createPendingTransactionFilter)(e),estimateContractGas:t=>(0,d.estimateContractGas)(e,t),estimateGas:t=>(0,p.estimateGas)(e,t),getBalance:t=>(0,g.getBalance)(e,t),getBlock:t=>(0,m.getBlock)(e,t),getBlockNumber:t=>(0,b.getBlockNumber)(e,t),getBlockTransactionCount:t=>(0,y.getBlockTransactionCount)(e,t),getBytecode:t=>(0,w.getBytecode)(e,t),getChainId:()=>(0,v.getChainId)(e),getContractEvents:t=>(0,_.getContractEvents)(e,t),getEnsAddress:r=>(0,t.getEnsAddress)(e,r),getEnsAvatar:t=>(0,r.getEnsAvatar)(e,t),getEnsName:t=>(0,i.getEnsName)(e,t),getEnsResolver:t=>(0,n.getEnsResolver)(e,t),getEnsText:t=>(0,o.getEnsText)(e,t),getFeeHistory:t=>(0,x.getFeeHistory)(e,t),estimateFeesPerGas:t=>(0,h.estimateFeesPerGas)(e,t),getFilterChanges:t=>(0,E.getFilterChanges)(e,t),getFilterLogs:t=>(0,C.getFilterLogs)(e,t),getGasPrice:()=>(0,k.getGasPrice)(e),getLogs:t=>(0,P.getLogs)(e,t),getProof:t=>(0,I.getProof)(e,t),estimateMaxPriorityFeePerGas:t=>(0,f.estimateMaxPriorityFeePerGas)(e,t),getStorageAt:t=>(0,S.getStorageAt)(e,t),getTransaction:t=>(0,A.getTransaction)(e,t),getTransactionConfirmations:t=>(0,T.getTransactionConfirmations)(e,t),getTransactionCount:t=>(0,O.getTransactionCount)(e,t),getTransactionReceipt:t=>(0,R.getTransactionReceipt)(e,t),multicall:t=>(0,N.multicall)(e,t),prepareTransactionRequest:t=>(0,W.prepareTransactionRequest)(e,t),readContract:t=>(0,M.readContract)(e,t),sendRawTransaction:t=>(0,V.sendRawTransaction)(e,t),simulateContract:t=>(0,$.simulateContract)(e,t),verifyMessage:t=>(0,L.verifyMessage)(e,t),verifyTypedData:t=>(0,B.verifyTypedData)(e,t),uninstallFilter:t=>(0,j.uninstallFilter)(e,t),waitForTransactionReceipt:t=>(0,D.waitForTransactionReceipt)(e,t),watchBlocks:t=>(0,F.watchBlocks)(e,t),watchBlockNumber:t=>(0,U.watchBlockNumber)(e,t),watchContractEvent:t=>(0,H.watchContractEvent)(e,t),watchEvent:t=>(0,z.watchEvent)(e,t),watchPendingTransactions:t=>(0,q.watchPendingTransactions)(e,t)}}})),F3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createPublicClient=void 0;var t=q1(),r=U3();e.createPublicClient=function(e){let{key:i="public",name:n="Public Client"}=e;return(0,t.createClient)({...e,key:i,name:n,type:"publicClient"}).extend(r.publicActions)}})),H3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dropTransaction=void 0,e.dropTransaction=async function(e,{hash:t}){await e.request({method:`${e.mode}_dropTransaction`,params:[t]})}})),z3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dumpState=void 0,e.dumpState=async function(e){return e.request({method:`${e.mode}_dumpState`})}})),q3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAutomine=void 0,e.getAutomine=async function(e){return"ganache"===e.mode?await e.request({method:"eth_mining"}):await e.request({method:`${e.mode}_getAutomine`})}})),W3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTxpoolContent=void 0,e.getTxpoolContent=async function(e){return await e.request({method:"txpool_content"})}})),V3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTxpoolStatus=void 0;var t=t0();e.getTxpoolStatus=async function(e){let{pending:r,queued:i}=await e.request({method:"txpool_status"});return{pending:(0,t.hexToNumber)(r),queued:(0,t.hexToNumber)(i)}}})),G3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.impersonateAccount=void 0,e.impersonateAccount=async function(e,{address:t}){await e.request({method:`${e.mode}_impersonateAccount`,params:[t]})}})),Z3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.increaseTime=void 0;var t=r0();e.increaseTime=async function(e,{seconds:r}){return await e.request({method:"evm_increaseTime",params:[(0,t.numberToHex)(r)]})}})),K3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inspectTxpool=void 0,e.inspectTxpool=async function(e){return await e.request({method:"txpool_inspect"})}})),Y3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loadState=void 0,e.loadState=async function(e,{state:t}){await e.request({method:`${e.mode}_loadState`,params:[t]})}})),J3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mine=void 0;var t=r0();e.mine=async function(e,{blocks:r,interval:i}){"ganache"===e.mode?await e.request({method:"evm_mine",params:[{blocks:(0,t.numberToHex)(r)}]}):await e.request({method:`${e.mode}_mine`,params:[(0,t.numberToHex)(r),(0,t.numberToHex)(i||0)]})}})),Q3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeBlockTimestampInterval=void 0,e.removeBlockTimestampInterval=async function(e){await e.request({method:`${e.mode}_removeBlockTimestampInterval`})}})),X3=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reset=void 0,e.reset=async function(e,{blockNumber:t,jsonRpcUrl:r}={}){await e.request({method:`${e.mode}_reset`,params:[{forking:{blockNumber:Number(t),jsonRpcUrl:r}}]})}})),e5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revert=void 0,e.revert=async function(e,{id:t}){await e.request({method:"evm_revert",params:[t]})}})),t5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sendUnsignedTransaction=void 0;var t=V0(),r=Z0();e.sendUnsignedTransaction=async function(e,i){let{accessList:n,data:o,from:a,gas:s,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:h,value:p,...f}=i,g=e.chain?.formatters?.transactionRequest?.format,m=(g||r.formatTransactionRequest)({...(0,t.extract)(f,{format:g}),accessList:n,data:o,from:a,gas:s,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:h,value:p});return await e.request({method:"eth_sendUnsignedTransaction",params:[m]})}})),r5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setAutomine=void 0,e.setAutomine=async function(e,t){"ganache"===e.mode?t?await e.request({method:"miner_start"}):await e.request({method:"miner_stop"}):await e.request({method:"evm_setAutomine",params:[t]})}})),i5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setBalance=void 0;var t=r0();e.setBalance=async function(e,{address:r,value:i}){"ganache"===e.mode?await e.request({method:"evm_setAccountBalance",params:[r,(0,t.numberToHex)(i)]}):await e.request({method:`${e.mode}_setBalance`,params:[r,(0,t.numberToHex)(i)]})}})),n5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setBlockGasLimit=void 0;var t=r0();e.setBlockGasLimit=async function(e,{gasLimit:r}){await e.request({method:"evm_setBlockGasLimit",params:[(0,t.numberToHex)(r)]})}})),o5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setBlockTimestampInterval=void 0,e.setBlockTimestampInterval=async function(e,{interval:t}){let r="hardhat"===e.mode?1e3*t:t;await e.request({method:`${e.mode}_setBlockTimestampInterval`,params:[r]})}})),a5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setCode=void 0,e.setCode=async function(e,{address:t,bytecode:r}){await e.request({method:`${e.mode}_setCode`,params:[t,r]})}})),s5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setCoinbase=void 0,e.setCoinbase=async function(e,{address:t}){await e.request({method:`${e.mode}_setCoinbase`,params:[t]})}})),c5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setIntervalMining=void 0,e.setIntervalMining=async function(e,{interval:t}){let r="hardhat"===e.mode?1e3*t:t;await e.request({method:"evm_setIntervalMining",params:[r]})}})),l5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setLoggingEnabled=void 0,e.setLoggingEnabled=async function(e,t){await e.request({method:`${e.mode}_setLoggingEnabled`,params:[t]})}})),u5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMinGasPrice=void 0;var t=r0();e.setMinGasPrice=async function(e,{gasPrice:r}){await e.request({method:`${e.mode}_setMinGasPrice`,params:[(0,t.numberToHex)(r)]})}})),d5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setNextBlockBaseFeePerGas=void 0;var t=r0();e.setNextBlockBaseFeePerGas=async function(e,{baseFeePerGas:r}){await e.request({method:`${e.mode}_setNextBlockBaseFeePerGas`,params:[(0,t.numberToHex)(r)]})}})),h5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setNextBlockTimestamp=void 0;var t=r0();e.setNextBlockTimestamp=async function(e,{timestamp:r}){await e.request({method:"evm_setNextBlockTimestamp",params:[(0,t.numberToHex)(r)]})}})),p5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setNonce=void 0;var t=r0();e.setNonce=async function(e,{address:r,nonce:i}){await e.request({method:`${e.mode}_setNonce`,params:[r,(0,t.numberToHex)(i)]})}})),f5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setRpcUrl=void 0,e.setRpcUrl=async function(e,t){await e.request({method:`${e.mode}_setRpcUrl`,params:[t]})}})),g5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setStorageAt=void 0;var t=r0();e.setStorageAt=async function(e,{address:r,index:i,value:n}){await e.request({method:`${e.mode}_setStorageAt`,params:[r,"number"==typeof i?(0,t.numberToHex)(i):i,n]})}})),m5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.snapshot=void 0,e.snapshot=async function(e){return await e.request({method:"evm_snapshot"})}})),b5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stopImpersonatingAccount=void 0,e.stopImpersonatingAccount=async function(e,{address:t}){await e.request({method:`${e.mode}_stopImpersonatingAccount`,params:[t]})}})),y5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.testActions=void 0;var t=H3(),r=z3(),i=q3(),n=W3(),o=V3(),a=G3(),s=Z3(),c=K3(),l=Y3(),u=J3(),d=Q3(),h=X3(),p=e5(),f=t5(),g=r5(),m=i5(),b=n5(),y=o5(),w=a5(),v=s5(),_=c5(),x=l5(),E=u5(),C=d5(),k=h5(),P=p5(),I=f5(),S=g5(),A=m5(),T=b5();e.testActions=function({mode:e}){return O=>{let R=O.extend((()=>({mode:e})));return{dropTransaction:e=>(0,t.dropTransaction)(R,e),dumpState:()=>(0,r.dumpState)(R),getAutomine:()=>(0,i.getAutomine)(R),getTxpoolContent:()=>(0,n.getTxpoolContent)(R),getTxpoolStatus:()=>(0,o.getTxpoolStatus)(R),impersonateAccount:e=>(0,a.impersonateAccount)(R,e),increaseTime:e=>(0,s.increaseTime)(R,e),inspectTxpool:()=>(0,c.inspectTxpool)(R),loadState:e=>(0,l.loadState)(R,e),mine:e=>(0,u.mine)(R,e),removeBlockTimestampInterval:()=>(0,d.removeBlockTimestampInterval)(R),reset:e=>(0,h.reset)(R,e),revert:e=>(0,p.revert)(R,e),sendUnsignedTransaction:e=>(0,f.sendUnsignedTransaction)(R,e),setAutomine:e=>(0,g.setAutomine)(R,e),setBalance:e=>(0,m.setBalance)(R,e),setBlockGasLimit:e=>(0,b.setBlockGasLimit)(R,e),setBlockTimestampInterval:e=>(0,y.setBlockTimestampInterval)(R,e),setCode:e=>(0,w.setCode)(R,e),setCoinbase:e=>(0,v.setCoinbase)(R,e),setIntervalMining:e=>(0,_.setIntervalMining)(R,e),setLoggingEnabled:e=>(0,x.setLoggingEnabled)(R,e),setMinGasPrice:e=>(0,E.setMinGasPrice)(R,e),setNextBlockBaseFeePerGas:e=>(0,C.setNextBlockBaseFeePerGas)(R,e),setNextBlockTimestamp:e=>(0,k.setNextBlockTimestamp)(R,e),setNonce:e=>(0,P.setNonce)(R,e),setRpcUrl:e=>(0,I.setRpcUrl)(R,e),setStorageAt:e=>(0,S.setStorageAt)(R,e),snapshot:()=>(0,A.snapshot)(R),stopImpersonatingAccount:e=>(0,T.stopImpersonatingAccount)(R,e)}}}})),w5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTestClient=void 0;var t=q1(),r=y5();e.createTestClient=function(e){let{key:i="test",name:n="Test Client",mode:o}=e;return(0,t.createClient)({...e,key:i,name:n,type:"testClient"}).extend((e=>({mode:o,...(0,r.testActions)({mode:o})(e)})))}})),v5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addChain=void 0;var t=r0();e.addChain=async function(e,{chain:r}){let{id:i,name:n,nativeCurrency:o,rpcUrls:a,blockExplorers:s}=r;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,t.numberToHex)(i),chainName:n,nativeCurrency:o,rpcUrls:a.default.http,blockExplorerUrls:s?Object.values(s).map((({url:e})=>e)):void 0}]})}})),_5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deployContract=void 0;var t=N2(),r=B1();e.deployContract=function(e,{abi:i,args:n,bytecode:o,...a}){let s=(0,t.encodeDeployData)({abi:i,args:n,bytecode:o});return(0,r.sendTransaction)(e,{...a,data:s})}})),x5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAddresses=void 0;var t=I0();e.getAddresses=async function(e){return"local"===e.account?.type?[e.account.address]:(await e.request({method:"eth_accounts"})).map((e=>(0,t.checksumAddress)(e)))}})),E5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPermissions=void 0,e.getPermissions=async function(e){return await e.request({method:"wallet_getPermissions"})}})),C5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.requestAddresses=void 0;var t=I0();e.requestAddresses=async function(e){return(await e.request({method:"eth_requestAccounts"})).map((e=>(0,t.getAddress)(e)))}})),k5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.requestPermissions=void 0,e.requestPermissions=async function(e,t){return e.request({method:"wallet_requestPermissions",params:[t]})}})),P5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.signMessage=void 0;var t=C0(),r=F0(),i=r0();e.signMessage=async function(e,{account:n=e.account,message:o}){if(!n)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});let a=(0,t.parseAccount)(n);if("local"===a.type)return a.signMessage({message:o});let s="string"==typeof o?(0,i.stringToHex)(o):o.raw instanceof Uint8Array?(0,i.toHex)(o.raw):o.raw;return e.request({method:"personal_sign",params:[s,a.address]})}})),I5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.signTransaction=void 0;var t=C0(),r=F0(),i=M1(),n=Z0(),o=HX(),a=x3(),s=K0(),c=j1();e.signTransaction=async function(e,l){let{account:u=e.account,chain:d=e.chain,...h}=l;if(!u)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});let p=(0,t.parseAccount)(u);(0,s.assertRequest)({account:p,...l});let f=await(0,o.getAction)(e,c.getChainId,"getChainId")({});null!==d&&(0,i.assertCurrentChain)({currentChainId:f,chain:d});let g=(d?.formatters||e.chain?.formatters)?.transactionRequest?.format||n.formatTransactionRequest;return"local"===p.type?p.signTransaction({...h,chainId:f},{serializer:e.chain?.serializers?.transaction}):await e.request({method:"eth_signTransaction",params:[{...g(h),chainId:(0,a.numberToHex)(f),from:p.address}]})}})),S5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.signTypedData=void 0;var t=C0(),r=F0(),i=qX(),n=T0(),o=O2();e.signTypedData=async function(e,{account:a=e.account,domain:s,message:c,primaryType:l,types:u}){if(!a)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});let d=(0,t.parseAccount)(a),h={EIP712Domain:(0,o.getTypesForEIP712Domain)({domain:s}),...u};if((0,o.validateTypedData)({domain:s,message:c,primaryType:l,types:h}),"local"===d.type)return d.signTypedData({domain:s,primaryType:l,types:h,message:c});let p=(0,n.stringify)({domain:s??{},primaryType:l,types:h,message:c},((e,t)=>(0,i.isHex)(t)?t.toLowerCase():t));return e.request({method:"eth_signTypedData_v4",params:[d.address,p]})}})),A5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.switchChain=void 0;var t=r0();e.switchChain=async function(e,{id:r}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,t.numberToHex)(r)}]})}})),T5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.watchAsset=void 0,e.watchAsset=async function(e,t){return await e.request({method:"wallet_watchAsset",params:t})}})),O5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.walletActions=void 0;var t=j1(),r=v5(),i=_5(),n=x5(),o=E5(),a=a1(),s=C5(),c=k5(),l=L1(),u=B1(),d=P5(),h=I5(),p=S5(),f=A5(),g=T5(),m=D1();e.walletActions=function(e){return{addChain:t=>(0,r.addChain)(e,t),deployContract:t=>(0,i.deployContract)(e,t),getAddresses:()=>(0,n.getAddresses)(e),getChainId:()=>(0,t.getChainId)(e),getPermissions:()=>(0,o.getPermissions)(e),prepareTransactionRequest:t=>(0,a.prepareTransactionRequest)(e,t),requestAddresses:()=>(0,s.requestAddresses)(e),requestPermissions:t=>(0,c.requestPermissions)(e,t),sendRawTransaction:t=>(0,l.sendRawTransaction)(e,t),sendTransaction:t=>(0,u.sendTransaction)(e,t),signMessage:t=>(0,d.signMessage)(e,t),signTransaction:t=>(0,h.signTransaction)(e,t),signTypedData:t=>(0,p.signTypedData)(e,t),switchChain:t=>(0,f.switchChain)(e,t),watchAsset:t=>(0,g.watchAsset)(e,t),writeContract:t=>(0,m.writeContract)(e,t)}}})),R5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWalletClient=void 0;var t=q1(),r=O5();e.createWalletClient=function(e){let{key:i="wallet",name:n="Wallet Client",transport:o}=e;return(0,t.createClient)({...e,key:i,name:n,transport:e=>o({...e,retryCount:0}),type:"walletClient"}).extend(r.walletActions)}})),N5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.webSocket=void 0;var t=B0(),r=Y1(),i=r2(),n=G1();e.webSocket=function(e,o={}){let{key:a="webSocket",name:s="WebSocket JSON-RPC",retryDelay:c}=o;return({chain:l,retryCount:u,timeout:d})=>{let h=o.retryCount??u,p=d??o.timeout??1e4,f=e||l?.rpcUrls.default.webSocket?.[0];if(!f)throw new r.UrlRequiredError;return(0,n.createTransport)({key:a,name:s,async request({method:e,params:r}){let n={method:e,params:r},o=await(0,i.getSocket)(f),{error:a,result:s}=await i.rpc.webSocketAsync(o,{body:n,timeout:p});if(a)throw new t.RpcRequestError({body:n,error:a,url:f});return s},retryCount:h,retryDelay:c,timeout:p,type:"webSocket"},{getSocket:()=>(0,i.getSocket)(f),async subscribe({params:e,onData:t,onError:r}){let n=await(0,i.getSocket)(f),{result:o}=await new Promise(((o,a)=>i.rpc.webSocket(n,{body:{method:"eth_subscribe",params:e},onResponse(e){if(e.error)return a(e.error),void r?.(e.error);"number"!=typeof e.id?"eth_subscription"===e.method&&t(e.params):o(e)}})));return{subscriptionId:o,unsubscribe:async()=>new Promise((e=>i.rpc.webSocket(n,{body:{method:"eth_unsubscribe",params:[o]},onResponse:e})))}}})}}})),M5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.zeroAddress=void 0,e.zeroAddress="0x0000000000000000000000000000000000000000"})),$5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.minInt144=e.minInt136=e.minInt128=e.minInt120=e.minInt112=e.minInt104=e.minInt96=e.minInt88=e.minInt80=e.minInt72=e.minInt64=e.minInt56=e.minInt48=e.minInt40=e.minInt32=e.minInt24=e.minInt16=e.minInt8=e.maxInt256=e.maxInt248=e.maxInt240=e.maxInt232=e.maxInt224=e.maxInt216=e.maxInt208=e.maxInt200=e.maxInt192=e.maxInt184=e.maxInt176=e.maxInt168=e.maxInt160=e.maxInt152=e.maxInt144=e.maxInt136=e.maxInt128=e.maxInt120=e.maxInt112=e.maxInt104=e.maxInt96=e.maxInt88=e.maxInt80=e.maxInt72=e.maxInt64=e.maxInt56=e.maxInt48=e.maxInt40=e.maxInt32=e.maxInt24=e.maxInt16=e.maxInt8=void 0,e.maxUint256=e.maxUint248=e.maxUint240=e.maxUint232=e.maxUint224=e.maxUint216=e.maxUint208=e.maxUint200=e.maxUint192=e.maxUint184=e.maxUint176=e.maxUint168=e.maxUint160=e.maxUint152=e.maxUint144=e.maxUint136=e.maxUint128=e.maxUint120=e.maxUint112=e.maxUint104=e.maxUint96=e.maxUint88=e.maxUint80=e.maxUint72=e.maxUint64=e.maxUint56=e.maxUint48=e.maxUint40=e.maxUint32=e.maxUint24=e.maxUint16=e.maxUint8=e.minInt256=e.minInt248=e.minInt240=e.minInt232=e.minInt224=e.minInt216=e.minInt208=e.minInt200=e.minInt192=e.minInt184=e.minInt176=e.minInt168=e.minInt160=e.minInt152=void 0,e.maxInt8=2n**(8n-1n)-1n,e.maxInt16=2n**(16n-1n)-1n,e.maxInt24=2n**(24n-1n)-1n,e.maxInt32=2n**(32n-1n)-1n,e.maxInt40=2n**(40n-1n)-1n,e.maxInt48=2n**(48n-1n)-1n,e.maxInt56=2n**(56n-1n)-1n,e.maxInt64=2n**(64n-1n)-1n,e.maxInt72=2n**(72n-1n)-1n,e.maxInt80=2n**(80n-1n)-1n,e.maxInt88=2n**(88n-1n)-1n,e.maxInt96=2n**(96n-1n)-1n,e.maxInt104=2n**(104n-1n)-1n,e.maxInt112=2n**(112n-1n)-1n,e.maxInt120=2n**(120n-1n)-1n,e.maxInt128=2n**(128n-1n)-1n,e.maxInt136=2n**(136n-1n)-1n,e.maxInt144=2n**(144n-1n)-1n,e.maxInt152=2n**(152n-1n)-1n,e.maxInt160=2n**(160n-1n)-1n,e.maxInt168=2n**(168n-1n)-1n,e.maxInt176=2n**(176n-1n)-1n,e.maxInt184=2n**(184n-1n)-1n,e.maxInt192=2n**(192n-1n)-1n,e.maxInt200=2n**(200n-1n)-1n,e.maxInt208=2n**(208n-1n)-1n,e.maxInt216=2n**(216n-1n)-1n,e.maxInt224=2n**(224n-1n)-1n,e.maxInt232=2n**(232n-1n)-1n,e.maxInt240=2n**(240n-1n)-1n,e.maxInt248=2n**(248n-1n)-1n,e.maxInt256=2n**(256n-1n)-1n,e.minInt8=-(2n**(8n-1n)),e.minInt16=-(2n**(16n-1n)),e.minInt24=-(2n**(24n-1n)),e.minInt32=-(2n**(32n-1n)),e.minInt40=-(2n**(40n-1n)),e.minInt48=-(2n**(48n-1n)),e.minInt56=-(2n**(56n-1n)),e.minInt64=-(2n**(64n-1n)),e.minInt72=-(2n**(72n-1n)),e.minInt80=-(2n**(80n-1n)),e.minInt88=-(2n**(88n-1n)),e.minInt96=-(2n**(96n-1n)),e.minInt104=-(2n**(104n-1n)),e.minInt112=-(2n**(112n-1n)),e.minInt120=-(2n**(120n-1n)),e.minInt128=-(2n**(128n-1n)),e.minInt136=-(2n**(136n-1n)),e.minInt144=-(2n**(144n-1n)),e.minInt152=-(2n**(152n-1n)),e.minInt160=-(2n**(160n-1n)),e.minInt168=-(2n**(168n-1n)),e.minInt176=-(2n**(176n-1n)),e.minInt184=-(2n**(184n-1n)),e.minInt192=-(2n**(192n-1n)),e.minInt200=-(2n**(200n-1n)),e.minInt208=-(2n**(208n-1n)),e.minInt216=-(2n**(216n-1n)),e.minInt224=-(2n**(224n-1n)),e.minInt232=-(2n**(232n-1n)),e.minInt240=-(2n**(240n-1n)),e.minInt248=-(2n**(248n-1n)),e.minInt256=-(2n**(256n-1n)),e.maxUint8=2n**8n-1n,e.maxUint16=2n**16n-1n,e.maxUint24=2n**24n-1n,e.maxUint32=2n**32n-1n,e.maxUint40=2n**40n-1n,e.maxUint48=2n**48n-1n,e.maxUint56=2n**56n-1n,e.maxUint64=2n**64n-1n,e.maxUint72=2n**72n-1n,e.maxUint80=2n**80n-1n,e.maxUint88=2n**88n-1n,e.maxUint96=2n**96n-1n,e.maxUint104=2n**104n-1n,e.maxUint112=2n**112n-1n,e.maxUint120=2n**120n-1n,e.maxUint128=2n**128n-1n,e.maxUint136=2n**136n-1n,e.maxUint144=2n**144n-1n,e.maxUint152=2n**152n-1n,e.maxUint160=2n**160n-1n,e.maxUint168=2n**168n-1n,e.maxUint176=2n**176n-1n,e.maxUint184=2n**184n-1n,e.maxUint192=2n**192n-1n,e.maxUint200=2n**200n-1n,e.maxUint208=2n**208n-1n,e.maxUint216=2n**216n-1n,e.maxUint224=2n**224n-1n,e.maxUint232=2n**232n-1n,e.maxUint240=2n**240n-1n,e.maxUint248=2n**248n-1n,e.maxUint256=2n**256n-1n})),j5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.zeroHash=void 0,e.zeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"})),L5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeDeployData=void 0;var t=KX(),r=S0(),i="/docs/contract/decodeDeployData";e.decodeDeployData=function({abi:e,bytecode:n,data:o}){if(o===n)return{bytecode:n};let a=e.find((e=>"type"in e&&"constructor"===e.type));if(!a)throw new t.AbiConstructorNotFoundError({docsPath:i});if(!("inputs"in a))throw new t.AbiConstructorParamsNotFoundError({docsPath:i});if(!a.inputs||0===a.inputs.length)throw new t.AbiConstructorParamsNotFoundError({docsPath:i});return{args:(0,r.decodeAbiParameters)(a.inputs,`0x${o.replace(n,"")}`),bytecode:n}}})),B5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compactSignatureToSignature=void 0;var t=i0(),r=r0();e.compactSignatureToSignature=function({r:e,yParityAndS:i}){let n=(0,t.hexToBytes)(i),o=128&n[0]?28n:27n,a=n;return 28n===o&&(a[0]&=127),{r:e,s:(0,r.bytesToHex)(a),v:o}}})),D5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hexToCompactSignature=void 0;var t=o3(),r=r0();e.hexToCompactSignature=function(e){let{r:i,s:n}=t.secp256k1.Signature.fromCompact(e.slice(2,130));return{r:(0,r.numberToHex)(i,{size:32}),yParityAndS:(0,r.numberToHex)(n,{size:32})}}})),U5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hexToSignature=void 0;var t=o3(),r=r0();e.hexToSignature=function(e){let{r:i,s:n}=t.secp256k1.Signature.fromCompact(e.slice(2,130)),o=BigInt(`0x${e.slice(130)}`);return{r:(0,r.numberToHex)(i,{size:32}),s:(0,r.numberToHex)(n,{size:32}),v:o}}})),F5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.signatureToCompactSignature=void 0;var t=x3();e.signatureToCompactSignature=function(e){let{r:r,s:i,v:n}=e,o=i;if(1n===n-27n){let e=(0,t.hexToBytes)(i);e[0]|=128,o=(0,t.bytesToHex)(e)}return{r:r,yParityAndS:o}}})),H5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compactSignatureToHex=void 0;var t=o3(),r=t0();e.compactSignatureToHex=function({r:e,yParityAndS:i}){return`0x${new t.secp256k1.Signature((0,r.hexToBigInt)(e),(0,r.hexToBigInt)(i)).toCompactHex()}`}})),z5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.signatureToHex=void 0;var t=o3(),r=t0(),i=r0();e.signatureToHex=function({r:e,s:n,v:o}){return`0x${new t.secp256k1.Signature((0,r.hexToBigInt)(e),(0,r.hexToBigInt)(n)).toCompactHex()}${(0,i.toHex)(o).slice(2)}`}})),q5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.maxInt112=e.maxInt104=e.maxInt96=e.maxInt88=e.maxInt80=e.maxInt72=e.maxInt64=e.maxInt56=e.maxInt48=e.maxInt40=e.maxInt32=e.maxInt24=e.maxInt16=e.maxInt8=e.weiUnits=e.gweiUnits=e.etherUnits=e.zeroAddress=e.multicall3Abi=e.webSocket=e.createWalletClient=e.createTransport=e.walletActions=e.testActions=e.publicActions=e.createTestClient=e.createPublicClient=e.http=e.fallback=e.custom=e.createClient=e.getContract=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.UnknownSignatureError=e.UnknownTypeError=e.SolidityProtectedKeywordError=e.InvalidStructSignatureError=e.InvalidSignatureError=e.InvalidParenthesisError=e.InvalidParameterError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.InvalidAbiItemError=e.InvalidAbiParametersError=e.InvalidAbiParameterError=e.CircularReferenceError=void 0,e.maxUint256=e.maxUint248=e.maxUint240=e.maxUint232=e.maxUint224=e.maxUint216=e.maxUint208=e.maxUint200=e.maxUint192=e.maxUint184=e.maxUint176=e.maxUint168=e.maxUint160=e.maxUint152=e.maxUint144=e.maxUint136=e.maxUint128=e.maxUint120=e.maxUint112=e.maxUint104=e.maxUint96=e.maxUint88=e.maxUint80=e.maxUint72=e.maxUint64=e.maxUint56=e.maxUint48=e.maxUint40=e.maxUint32=e.maxUint24=e.maxUint16=e.maxUint8=e.maxInt256=e.maxInt248=e.maxInt240=e.maxInt232=e.maxInt224=e.maxInt216=e.maxInt208=e.maxInt200=e.maxInt192=e.maxInt184=e.maxInt176=e.maxInt168=e.maxInt160=e.maxInt152=e.maxInt144=e.maxInt136=e.maxInt128=e.maxInt120=void 0,e.AbiFunctionOutputsNotFoundError=e.AbiFunctionNotFoundError=e.AbiEventSignatureNotFoundError=e.AbiEventSignatureEmptyTopicsError=e.AbiEventNotFoundError=e.AbiErrorSignatureNotFoundError=e.AbiErrorNotFoundError=e.AbiErrorInputsNotFoundError=e.AbiEncodingBytesSizeMismatchError=e.AbiEncodingLengthMismatchError=e.AbiEncodingArrayLengthMismatchError=e.AbiDecodingZeroDataError=e.AbiDecodingDataSizeTooSmallError=e.AbiDecodingDataSizeInvalidError=e.AbiConstructorParamsNotFoundError=e.AbiConstructorNotFoundError=e.presignMessagePrefix=e.zeroHash=e.minInt256=e.minInt248=e.minInt240=e.minInt232=e.minInt224=e.minInt216=e.minInt208=e.minInt200=e.minInt192=e.minInt184=e.minInt176=e.minInt168=e.minInt160=e.minInt152=e.minInt144=e.minInt136=e.minInt128=e.minInt120=e.minInt112=e.minInt104=e.minInt96=e.minInt88=e.minInt80=e.minInt72=e.minInt64=e.minInt56=e.minInt48=e.minInt40=e.minInt32=e.minInt24=e.minInt16=e.minInt8=void 0,e.InvalidHexBooleanError=e.IntegerOutOfRangeError=e.InvalidBytesBooleanError=e.DataLengthTooShortError=e.DataLengthTooLongError=e.InvalidChainIdError=e.ClientChainNotConfiguredError=e.ChainNotFoundError=e.ChainMismatchError=e.ChainDoesNotSupportContract=e.UserRejectedRequestError=e.UnsupportedProviderMethodError=e.UnknownRpcError=e.UnauthorizedProviderError=e.TransactionRejectedRpcError=e.SwitchChainError=e.RpcError=e.ResourceUnavailableRpcError=e.ResourceNotFoundRpcError=e.ProviderRpcError=e.ProviderDisconnectedError=e.ParseRpcError=e.MethodNotSupportedRpcError=e.MethodNotFoundRpcError=e.LimitExceededRpcError=e.JsonRpcVersionUnsupportedError=e.InvalidRequestRpcError=e.InvalidParamsRpcError=e.InvalidInputRpcError=e.InternalRpcError=e.ChainDisconnectedError=e.MaxFeePerGasTooLowError=e.Eip1559FeesNotSupportedError=e.BaseFeeScalarError=e.RawContractError=e.ContractFunctionZeroDataError=e.ContractFunctionRevertedError=e.ContractFunctionExecutionError=e.CallExecutionError=e.BlockNotFoundError=e.BaseError=e.UnsupportedPackedAbiType=e.InvalidDefinitionTypeError=e.InvalidArrayError=e.InvalidAbiEncodingTypeError=e.InvalidAbiDecodingTypeError=e.DecodeLogTopicsMismatch=e.DecodeLogDataMismatch=e.BytesSizeMismatchError=e.AbiFunctionSignatureNotFoundError=void 0,e.encodeAbiParameters=e.decodeFunctionResult=e.decodeFunctionData=e.decodeEventLog=e.decodeErrorResult=e.decodeDeployData=e.decodeAbiParameters=e.formatLog=e.formatBlock=e.defineBlock=e.namehash=e.labelhash=e.UrlRequiredError=e.SliceOffsetOutOfBoundsError=e.SizeExceedsPaddingSizeError=e.WaitForTransactionReceiptTimeoutError=e.TransactionReceiptNotFoundError=e.TransactionNotFoundError=e.TransactionExecutionError=e.InvalidStorageKeySizeError=e.InvalidSerializedTransactionTypeError=e.InvalidSerializedTransactionError=e.InvalidSerializableTransactionError=e.InvalidLegacyVError=e.FeeConflictError=e.InvalidAddressError=e.WebSocketRequestError=e.TimeoutError=e.RpcRequestError=e.HttpRequestError=e.FilterTypeNotSupportedError=e.UnknownNodeError=e.TransactionTypeNotSupportedError=e.TipAboveFeeCapError=e.NonceTooLowError=e.NonceTooHighError=e.NonceMaxValueError=e.IntrinsicGasTooLowError=e.IntrinsicGasTooHighError=e.InsufficientFundsError=e.FeeCapTooLowError=e.FeeCapTooHighError=e.ExecutionRevertedError=e.EstimateGasExecutionError=e.EnsAvatarUnsupportedNamespaceError=e.EnsAvatarInvalidNftUriError=e.EnsAvatarUriResolutionError=e.SizeOverflowError=e.OffsetOutOfBoundsError=e.InvalidHexValueError=void 0,e.toHex=e.stringToHex=e.numberToHex=e.bytesToHex=e.boolToHex=e.toBytes=e.stringToBytes=e.numberToBytes=e.hexToBytes=e.boolToBytes=e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=e.assertRequest=e.verifyTypedData=e.verifyMessage=e.toRlp=e.hexToRlp=e.bytesToRlp=e.signatureToHex=e.compactSignatureToHex=e.signatureToCompactSignature=e.recoverTypedDataAddress=e.recoverPublicKey=e.recoverMessageAddress=e.recoverAddress=e.hexToSignature=e.hexToCompactSignature=e.compactSignatureToSignature=e.hashTypedData=e.hashDomain=e.getTransactionType=e.getSerializedTransactionType=e.getCreateAddress=e.getCreate2Address=e.getContractAddress=e.getAbiItem=e.rpcTransactionType=e.formatTransactionRequest=e.defineTransactionRequest=e.formatTransactionReceipt=e.defineTransactionReceipt=e.transactionType=e.formatTransaction=e.defineTransaction=e.encodeFunctionResult=e.encodeFunctionData=e.encodeEventTopics=e.encodeErrorResult=e.encodeDeployData=void 0,e.parseUnits=e.parseTransaction=e.parseGwei=e.parseEther=e.padHex=e.padBytes=e.pad=e.ripemd160=e.sha256=e.keccak256=e.isHex=e.isHash=e.isBytes=e.isAddressEqual=e.isAddress=e.hashMessage=e.getFunctionSignature=e.getFunctionSelector=e.getEventSignature=e.getEventSelector=e.getContractError=e.getAddress=e.checksumAddress=e.fromRlp=e.hexToString=e.hexToNumber=e.hexToBool=e.hexToBigInt=e.fromHex=e.formatUnits=e.formatGwei=e.formatEther=e.encodePacked=e.getChainContractAddress=e.extractChain=e.defineChain=e.assertCurrentChain=e.concatHex=e.concatBytes=e.concat=e.offchainLookupSignature=e.offchainLookupAbiItem=e.offchainLookup=e.ccipFetch=e.fromBytes=e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigint=e.bytesToBigInt=void 0,e.getTypesForEIP712Domain=e.domainSeparator=e.validateTypedData=e.trim=e.stringify=e.sliceHex=e.sliceBytes=e.slice=e.size=e.serializeTransaction=e.serializeAccessList=void 0;var t=FX();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return t.CircularReferenceError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return t.InvalidAbiParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return t.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return t.InvalidAbiItemError}}),Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return t.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return t.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return t.InvalidModifierError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return t.InvalidParameterError}}),Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return t.InvalidParenthesisError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return t.InvalidSignatureError}}),Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return t.InvalidStructSignatureError}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return t.SolidityProtectedKeywordError}}),Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return t.UnknownTypeError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return t.UnknownSignatureError}}),Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return t.parseAbi}}),Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return t.parseAbiItem}}),Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return t.parseAbiParameter}}),Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return t.parseAbiParameters}});var r=U1();Object.defineProperty(e,"getContract",{enumerable:!0,get:function(){return r.getContract}});var i=q1();Object.defineProperty(e,"createClient",{enumerable:!0,get:function(){return i.createClient}});var n=Z1();Object.defineProperty(e,"custom",{enumerable:!0,get:function(){return n.custom}});var o=K1();Object.defineProperty(e,"fallback",{enumerable:!0,get:function(){return o.fallback}});var a=i2();Object.defineProperty(e,"http",{enumerable:!0,get:function(){return a.http}});var s=F3();Object.defineProperty(e,"createPublicClient",{enumerable:!0,get:function(){return s.createPublicClient}});var c=w5();Object.defineProperty(e,"createTestClient",{enumerable:!0,get:function(){return c.createTestClient}});var l=U3();Object.defineProperty(e,"publicActions",{enumerable:!0,get:function(){return l.publicActions}});var u=y5();Object.defineProperty(e,"testActions",{enumerable:!0,get:function(){return u.testActions}});var d=O5();Object.defineProperty(e,"walletActions",{enumerable:!0,get:function(){return d.walletActions}});var h=G1();Object.defineProperty(e,"createTransport",{enumerable:!0,get:function(){return h.createTransport}});var p=R5();Object.defineProperty(e,"createWalletClient",{enumerable:!0,get:function(){return p.createWalletClient}});var f=N5();Object.defineProperty(e,"webSocket",{enumerable:!0,get:function(){return f.webSocket}});var g=f1();Object.defineProperty(e,"multicall3Abi",{enumerable:!0,get:function(){return g.multicall3Abi}});var m=M5();Object.defineProperty(e,"zeroAddress",{enumerable:!0,get:function(){return m.zeroAddress}});var b=R0();Object.defineProperty(e,"etherUnits",{enumerable:!0,get:function(){return b.etherUnits}}),Object.defineProperty(e,"gweiUnits",{enumerable:!0,get:function(){return b.gweiUnits}}),Object.defineProperty(e,"weiUnits",{enumerable:!0,get:function(){return b.weiUnits}});var y=$5();Object.defineProperty(e,"maxInt8",{enumerable:!0,get:function(){return y.maxInt8}}),Object.defineProperty(e,"maxInt16",{enumerable:!0,get:function(){return y.maxInt16}}),Object.defineProperty(e,"maxInt24",{enumerable:!0,get:function(){return y.maxInt24}}),Object.defineProperty(e,"maxInt32",{enumerable:!0,get:function(){return y.maxInt32}}),Object.defineProperty(e,"maxInt40",{enumerable:!0,get:function(){return y.maxInt40}}),Object.defineProperty(e,"maxInt48",{enumerable:!0,get:function(){return y.maxInt48}}),Object.defineProperty(e,"maxInt56",{enumerable:!0,get:function(){return y.maxInt56}}),Object.defineProperty(e,"maxInt64",{enumerable:!0,get:function(){return y.maxInt64}}),Object.defineProperty(e,"maxInt72",{enumerable:!0,get:function(){return y.maxInt72}}),Object.defineProperty(e,"maxInt80",{enumerable:!0,get:function(){return y.maxInt80}}),Object.defineProperty(e,"maxInt88",{enumerable:!0,get:function(){return y.maxInt88}}),Object.defineProperty(e,"maxInt96",{enumerable:!0,get:function(){return y.maxInt96}}),Object.defineProperty(e,"maxInt104",{enumerable:!0,get:function(){return y.maxInt104}}),Object.defineProperty(e,"maxInt112",{enumerable:!0,get:function(){return y.maxInt112}}),Object.defineProperty(e,"maxInt120",{enumerable:!0,get:function(){return y.maxInt120}}),Object.defineProperty(e,"maxInt128",{enumerable:!0,get:function(){return y.maxInt128}}),Object.defineProperty(e,"maxInt136",{enumerable:!0,get:function(){return y.maxInt136}}),Object.defineProperty(e,"maxInt144",{enumerable:!0,get:function(){return y.maxInt144}}),Object.defineProperty(e,"maxInt152",{enumerable:!0,get:function(){return y.maxInt152}}),Object.defineProperty(e,"maxInt160",{enumerable:!0,get:function(){return y.maxInt160}}),Object.defineProperty(e,"maxInt168",{enumerable:!0,get:function(){return y.maxInt168}}),Object.defineProperty(e,"maxInt176",{enumerable:!0,get:function(){return y.maxInt176}}),Object.defineProperty(e,"maxInt184",{enumerable:!0,get:function(){return y.maxInt184}}),Object.defineProperty(e,"maxInt192",{enumerable:!0,get:function(){return y.maxInt192}}),Object.defineProperty(e,"maxInt200",{enumerable:!0,get:function(){return y.maxInt200}}),Object.defineProperty(e,"maxInt208",{enumerable:!0,get:function(){return y.maxInt208}}),Object.defineProperty(e,"maxInt216",{enumerable:!0,get:function(){return y.maxInt216}}),Object.defineProperty(e,"maxInt224",{enumerable:!0,get:function(){return y.maxInt224}}),Object.defineProperty(e,"maxInt232",{enumerable:!0,get:function(){return y.maxInt232}}),Object.defineProperty(e,"maxInt240",{enumerable:!0,get:function(){return y.maxInt240}}),Object.defineProperty(e,"maxInt248",{enumerable:!0,get:function(){return y.maxInt248}}),Object.defineProperty(e,"maxInt256",{enumerable:!0,get:function(){return y.maxInt256}}),Object.defineProperty(e,"maxUint8",{enumerable:!0,get:function(){return y.maxUint8}}),Object.defineProperty(e,"maxUint16",{enumerable:!0,get:function(){return y.maxUint16}}),Object.defineProperty(e,"maxUint24",{enumerable:!0,get:function(){return y.maxUint24}}),Object.defineProperty(e,"maxUint32",{enumerable:!0,get:function(){return y.maxUint32}}),Object.defineProperty(e,"maxUint40",{enumerable:!0,get:function(){return y.maxUint40}}),Object.defineProperty(e,"maxUint48",{enumerable:!0,get:function(){return y.maxUint48}}),Object.defineProperty(e,"maxUint56",{enumerable:!0,get:function(){return y.maxUint56}}),Object.defineProperty(e,"maxUint64",{enumerable:!0,get:function(){return y.maxUint64}}),Object.defineProperty(e,"maxUint72",{enumerable:!0,get:function(){return y.maxUint72}}),Object.defineProperty(e,"maxUint80",{enumerable:!0,get:function(){return y.maxUint80}}),Object.defineProperty(e,"maxUint88",{enumerable:!0,get:function(){return y.maxUint88}}),Object.defineProperty(e,"maxUint96",{enumerable:!0,get:function(){return y.maxUint96}}),Object.defineProperty(e,"maxUint104",{enumerable:!0,get:function(){return y.maxUint104}}),Object.defineProperty(e,"maxUint112",{enumerable:!0,get:function(){return y.maxUint112}}),Object.defineProperty(e,"maxUint120",{enumerable:!0,get:function(){return y.maxUint120}}),Object.defineProperty(e,"maxUint128",{enumerable:!0,get:function(){return y.maxUint128}}),Object.defineProperty(e,"maxUint136",{enumerable:!0,get:function(){return y.maxUint136}}),Object.defineProperty(e,"maxUint144",{enumerable:!0,get:function(){return y.maxUint144}}),Object.defineProperty(e,"maxUint152",{enumerable:!0,get:function(){return y.maxUint152}}),Object.defineProperty(e,"maxUint160",{enumerable:!0,get:function(){return y.maxUint160}}),Object.defineProperty(e,"maxUint168",{enumerable:!0,get:function(){return y.maxUint168}}),Object.defineProperty(e,"maxUint176",{enumerable:!0,get:function(){return y.maxUint176}}),Object.defineProperty(e,"maxUint184",{enumerable:!0,get:function(){return y.maxUint184}}),Object.defineProperty(e,"maxUint192",{enumerable:!0,get:function(){return y.maxUint192}}),Object.defineProperty(e,"maxUint200",{enumerable:!0,get:function(){return y.maxUint200}}),Object.defineProperty(e,"maxUint208",{enumerable:!0,get:function(){return y.maxUint208}}),Object.defineProperty(e,"maxUint216",{enumerable:!0,get:function(){return y.maxUint216}}),Object.defineProperty(e,"maxUint224",{enumerable:!0,get:function(){return y.maxUint224}}),Object.defineProperty(e,"maxUint232",{enumerable:!0,get:function(){return y.maxUint232}}),Object.defineProperty(e,"maxUint240",{enumerable:!0,get:function(){return y.maxUint240}}),Object.defineProperty(e,"maxUint248",{enumerable:!0,get:function(){return y.maxUint248}}),Object.defineProperty(e,"maxUint256",{enumerable:!0,get:function(){return y.maxUint256}}),Object.defineProperty(e,"minInt8",{enumerable:!0,get:function(){return y.minInt8}}),Object.defineProperty(e,"minInt16",{enumerable:!0,get:function(){return y.minInt16}}),Object.defineProperty(e,"minInt24",{enumerable:!0,get:function(){return y.minInt24}}),Object.defineProperty(e,"minInt32",{enumerable:!0,get:function(){return y.minInt32}}),Object.defineProperty(e,"minInt40",{enumerable:!0,get:function(){return y.minInt40}}),Object.defineProperty(e,"minInt48",{enumerable:!0,get:function(){return y.minInt48}}),Object.defineProperty(e,"minInt56",{enumerable:!0,get:function(){return y.minInt56}}),Object.defineProperty(e,"minInt64",{enumerable:!0,get:function(){return y.minInt64}}),Object.defineProperty(e,"minInt72",{enumerable:!0,get:function(){return y.minInt72}}),Object.defineProperty(e,"minInt80",{enumerable:!0,get:function(){return y.minInt80}}),Object.defineProperty(e,"minInt88",{enumerable:!0,get:function(){return y.minInt88}}),Object.defineProperty(e,"minInt96",{enumerable:!0,get:function(){return y.minInt96}}),Object.defineProperty(e,"minInt104",{enumerable:!0,get:function(){return y.minInt104}}),Object.defineProperty(e,"minInt112",{enumerable:!0,get:function(){return y.minInt112}}),Object.defineProperty(e,"minInt120",{enumerable:!0,get:function(){return y.minInt120}}),Object.defineProperty(e,"minInt128",{enumerable:!0,get:function(){return y.minInt128}}),Object.defineProperty(e,"minInt136",{enumerable:!0,get:function(){return y.minInt136}}),Object.defineProperty(e,"minInt144",{enumerable:!0,get:function(){return y.minInt144}}),Object.defineProperty(e,"minInt152",{enumerable:!0,get:function(){return y.minInt152}}),Object.defineProperty(e,"minInt160",{enumerable:!0,get:function(){return y.minInt160}}),Object.defineProperty(e,"minInt168",{enumerable:!0,get:function(){return y.minInt168}}),Object.defineProperty(e,"minInt176",{enumerable:!0,get:function(){return y.minInt176}}),Object.defineProperty(e,"minInt184",{enumerable:!0,get:function(){return y.minInt184}}),Object.defineProperty(e,"minInt192",{enumerable:!0,get:function(){return y.minInt192}}),Object.defineProperty(e,"minInt200",{enumerable:!0,get:function(){return y.minInt200}}),Object.defineProperty(e,"minInt208",{enumerable:!0,get:function(){return y.minInt208}}),Object.defineProperty(e,"minInt216",{enumerable:!0,get:function(){return y.minInt216}}),Object.defineProperty(e,"minInt224",{enumerable:!0,get:function(){return y.minInt224}}),Object.defineProperty(e,"minInt232",{enumerable:!0,get:function(){return y.minInt232}}),Object.defineProperty(e,"minInt240",{enumerable:!0,get:function(){return y.minInt240}}),Object.defineProperty(e,"minInt248",{enumerable:!0,get:function(){return y.minInt248}}),Object.defineProperty(e,"minInt256",{enumerable:!0,get:function(){return y.minInt256}});var w=j5();Object.defineProperty(e,"zeroHash",{enumerable:!0,get:function(){return w.zeroHash}});var v=c3();Object.defineProperty(e,"presignMessagePrefix",{enumerable:!0,get:function(){return v.presignMessagePrefix}});var _=KX();Object.defineProperty(e,"AbiConstructorNotFoundError",{enumerable:!0,get:function(){return _.AbiConstructorNotFoundError}}),Object.defineProperty(e,"AbiConstructorParamsNotFoundError",{enumerable:!0,get:function(){return _.AbiConstructorParamsNotFoundError}}),Object.defineProperty(e,"AbiDecodingDataSizeInvalidError",{enumerable:!0,get:function(){return _.AbiDecodingDataSizeInvalidError}}),Object.defineProperty(e,"AbiDecodingDataSizeTooSmallError",{enumerable:!0,get:function(){return _.AbiDecodingDataSizeTooSmallError}}),Object.defineProperty(e,"AbiDecodingZeroDataError",{enumerable:!0,get:function(){return _.AbiDecodingZeroDataError}}),Object.defineProperty(e,"AbiEncodingArrayLengthMismatchError",{enumerable:!0,get:function(){return _.AbiEncodingArrayLengthMismatchError}}),Object.defineProperty(e,"AbiEncodingLengthMismatchError",{enumerable:!0,get:function(){return _.AbiEncodingLengthMismatchError}}),Object.defineProperty(e,"AbiEncodingBytesSizeMismatchError",{enumerable:!0,get:function(){return _.AbiEncodingBytesSizeMismatchError}}),Object.defineProperty(e,"AbiErrorInputsNotFoundError",{enumerable:!0,get:function(){return _.AbiErrorInputsNotFoundError}}),Object.defineProperty(e,"AbiErrorNotFoundError",{enumerable:!0,get:function(){return _.AbiErrorNotFoundError}}),Object.defineProperty(e,"AbiErrorSignatureNotFoundError",{enumerable:!0,get:function(){return _.AbiErrorSignatureNotFoundError}}),Object.defineProperty(e,"AbiEventNotFoundError",{enumerable:!0,get:function(){return _.AbiEventNotFoundError}}),Object.defineProperty(e,"AbiEventSignatureEmptyTopicsError",{enumerable:!0,get:function(){return _.AbiEventSignatureEmptyTopicsError}}),Object.defineProperty(e,"AbiEventSignatureNotFoundError",{enumerable:!0,get:function(){return _.AbiEventSignatureNotFoundError}}),Object.defineProperty(e,"AbiFunctionNotFoundError",{enumerable:!0,get:function(){return _.AbiFunctionNotFoundError}}),Object.defineProperty(e,"AbiFunctionOutputsNotFoundError",{enumerable:!0,get:function(){return _.AbiFunctionOutputsNotFoundError}}),Object.defineProperty(e,"AbiFunctionSignatureNotFoundError",{enumerable:!0,get:function(){return _.AbiFunctionSignatureNotFoundError}}),Object.defineProperty(e,"BytesSizeMismatchError",{enumerable:!0,get:function(){return _.BytesSizeMismatchError}}),Object.defineProperty(e,"DecodeLogDataMismatch",{enumerable:!0,get:function(){return _.DecodeLogDataMismatch}}),Object.defineProperty(e,"DecodeLogTopicsMismatch",{enumerable:!0,get:function(){return _.DecodeLogTopicsMismatch}}),Object.defineProperty(e,"InvalidAbiDecodingTypeError",{enumerable:!0,get:function(){return _.InvalidAbiDecodingTypeError}}),Object.defineProperty(e,"InvalidAbiEncodingTypeError",{enumerable:!0,get:function(){return _.InvalidAbiEncodingTypeError}}),Object.defineProperty(e,"InvalidArrayError",{enumerable:!0,get:function(){return _.InvalidArrayError}}),Object.defineProperty(e,"InvalidDefinitionTypeError",{enumerable:!0,get:function(){return _.InvalidDefinitionTypeError}}),Object.defineProperty(e,"UnsupportedPackedAbiType",{enumerable:!0,get:function(){return _.UnsupportedPackedAbiType}});var x=ZX();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return x.BaseError}});var E=J0();Object.defineProperty(e,"BlockNotFoundError",{enumerable:!0,get:function(){return E.BlockNotFoundError}});var C=L0();Object.defineProperty(e,"CallExecutionError",{enumerable:!0,get:function(){return C.CallExecutionError}}),Object.defineProperty(e,"ContractFunctionExecutionError",{enumerable:!0,get:function(){return C.ContractFunctionExecutionError}}),Object.defineProperty(e,"ContractFunctionRevertedError",{enumerable:!0,get:function(){return C.ContractFunctionRevertedError}}),Object.defineProperty(e,"ContractFunctionZeroDataError",{enumerable:!0,get:function(){return C.ContractFunctionZeroDataError}}),Object.defineProperty(e,"RawContractError",{enumerable:!0,get:function(){return C.RawContractError}});var k=Y0();Object.defineProperty(e,"BaseFeeScalarError",{enumerable:!0,get:function(){return k.BaseFeeScalarError}}),Object.defineProperty(e,"Eip1559FeesNotSupportedError",{enumerable:!0,get:function(){return k.Eip1559FeesNotSupportedError}}),Object.defineProperty(e,"MaxFeePerGasTooLowError",{enumerable:!0,get:function(){return k.MaxFeePerGasTooLowError}});var P=D0();Object.defineProperty(e,"ChainDisconnectedError",{enumerable:!0,get:function(){return P.ChainDisconnectedError}}),Object.defineProperty(e,"InternalRpcError",{enumerable:!0,get:function(){return P.InternalRpcError}}),Object.defineProperty(e,"InvalidInputRpcError",{enumerable:!0,get:function(){return P.InvalidInputRpcError}}),Object.defineProperty(e,"InvalidParamsRpcError",{enumerable:!0,get:function(){return P.InvalidParamsRpcError}}),Object.defineProperty(e,"InvalidRequestRpcError",{enumerable:!0,get:function(){return P.InvalidRequestRpcError}}),Object.defineProperty(e,"JsonRpcVersionUnsupportedError",{enumerable:!0,get:function(){return P.JsonRpcVersionUnsupportedError}}),Object.defineProperty(e,"LimitExceededRpcError",{enumerable:!0,get:function(){return P.LimitExceededRpcError}}),Object.defineProperty(e,"MethodNotFoundRpcError",{enumerable:!0,get:function(){return P.MethodNotFoundRpcError}}),Object.defineProperty(e,"MethodNotSupportedRpcError",{enumerable:!0,get:function(){return P.MethodNotSupportedRpcError}}),Object.defineProperty(e,"ParseRpcError",{enumerable:!0,get:function(){return P.ParseRpcError}}),Object.defineProperty(e,"ProviderDisconnectedError",{enumerable:!0,get:function(){return P.ProviderDisconnectedError}}),Object.defineProperty(e,"ProviderRpcError",{enumerable:!0,get:function(){return P.ProviderRpcError}}),Object.defineProperty(e,"ResourceNotFoundRpcError",{enumerable:!0,get:function(){return P.ResourceNotFoundRpcError}}),Object.defineProperty(e,"ResourceUnavailableRpcError",{enumerable:!0,get:function(){return P.ResourceUnavailableRpcError}}),Object.defineProperty(e,"RpcError",{enumerable:!0,get:function(){return P.RpcError}}),Object.defineProperty(e,"SwitchChainError",{enumerable:!0,get:function(){return P.SwitchChainError}}),Object.defineProperty(e,"TransactionRejectedRpcError",{enumerable:!0,get:function(){return P.TransactionRejectedRpcError}}),Object.defineProperty(e,"UnauthorizedProviderError",{enumerable:!0,get:function(){return P.UnauthorizedProviderError}}),Object.defineProperty(e,"UnknownRpcError",{enumerable:!0,get:function(){return P.UnknownRpcError}}),Object.defineProperty(e,"UnsupportedProviderMethodError",{enumerable:!0,get:function(){return P.UnsupportedProviderMethodError}}),Object.defineProperty(e,"UserRejectedRequestError",{enumerable:!0,get:function(){return P.UserRejectedRequestError}});var I=m1();Object.defineProperty(e,"ChainDoesNotSupportContract",{enumerable:!0,get:function(){return I.ChainDoesNotSupportContract}}),Object.defineProperty(e,"ChainMismatchError",{enumerable:!0,get:function(){return I.ChainMismatchError}}),Object.defineProperty(e,"ChainNotFoundError",{enumerable:!0,get:function(){return I.ChainNotFoundError}}),Object.defineProperty(e,"ClientChainNotConfiguredError",{enumerable:!0,get:function(){return I.ClientChainNotConfiguredError}}),Object.defineProperty(e,"InvalidChainIdError",{enumerable:!0,get:function(){return I.InvalidChainIdError}});var S=XX();Object.defineProperty(e,"DataLengthTooLongError",{enumerable:!0,get:function(){return S.DataLengthTooLongError}}),Object.defineProperty(e,"DataLengthTooShortError",{enumerable:!0,get:function(){return S.DataLengthTooShortError}}),Object.defineProperty(e,"InvalidBytesBooleanError",{enumerable:!0,get:function(){return S.InvalidBytesBooleanError}}),Object.defineProperty(e,"IntegerOutOfRangeError",{enumerable:!0,get:function(){return S.IntegerOutOfRangeError}}),Object.defineProperty(e,"InvalidHexBooleanError",{enumerable:!0,get:function(){return S.InvalidHexBooleanError}}),Object.defineProperty(e,"InvalidHexValueError",{enumerable:!0,get:function(){return S.InvalidHexValueError}}),Object.defineProperty(e,"OffsetOutOfBoundsError",{enumerable:!0,get:function(){return S.OffsetOutOfBoundsError}}),Object.defineProperty(e,"SizeOverflowError",{enumerable:!0,get:function(){return S.SizeOverflowError}});var A=d2();Object.defineProperty(e,"EnsAvatarUriResolutionError",{enumerable:!0,get:function(){return A.EnsAvatarUriResolutionError}}),Object.defineProperty(e,"EnsAvatarInvalidNftUriError",{enumerable:!0,get:function(){return A.EnsAvatarInvalidNftUriError}}),Object.defineProperty(e,"EnsAvatarUnsupportedNamespaceError",{enumerable:!0,get:function(){return A.EnsAvatarUnsupportedNamespaceError}});var T=H0();Object.defineProperty(e,"EstimateGasExecutionError",{enumerable:!0,get:function(){return T.EstimateGasExecutionError}});var O=z0();Object.defineProperty(e,"ExecutionRevertedError",{enumerable:!0,get:function(){return O.ExecutionRevertedError}}),Object.defineProperty(e,"FeeCapTooHighError",{enumerable:!0,get:function(){return O.FeeCapTooHighError}}),Object.defineProperty(e,"FeeCapTooLowError",{enumerable:!0,get:function(){return O.FeeCapTooLowError}}),Object.defineProperty(e,"InsufficientFundsError",{enumerable:!0,get:function(){return O.InsufficientFundsError}}),Object.defineProperty(e,"IntrinsicGasTooHighError",{enumerable:!0,get:function(){return O.IntrinsicGasTooHighError}}),Object.defineProperty(e,"IntrinsicGasTooLowError",{enumerable:!0,get:function(){return O.IntrinsicGasTooLowError}}),Object.defineProperty(e,"NonceMaxValueError",{enumerable:!0,get:function(){return O.NonceMaxValueError}}),Object.defineProperty(e,"NonceTooHighError",{enumerable:!0,get:function(){return O.NonceTooHighError}}),Object.defineProperty(e,"NonceTooLowError",{enumerable:!0,get:function(){return O.NonceTooLowError}}),Object.defineProperty(e,"TipAboveFeeCapError",{enumerable:!0,get:function(){return O.TipAboveFeeCapError}}),Object.defineProperty(e,"TransactionTypeNotSupportedError",{enumerable:!0,get:function(){return O.TransactionTypeNotSupportedError}}),Object.defineProperty(e,"UnknownNodeError",{enumerable:!0,get:function(){return O.UnknownNodeError}});var R=YX();Object.defineProperty(e,"FilterTypeNotSupportedError",{enumerable:!0,get:function(){return R.FilterTypeNotSupportedError}});var N=B0();Object.defineProperty(e,"HttpRequestError",{enumerable:!0,get:function(){return N.HttpRequestError}}),Object.defineProperty(e,"RpcRequestError",{enumerable:!0,get:function(){return N.RpcRequestError}}),Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return N.TimeoutError}}),Object.defineProperty(e,"WebSocketRequestError",{enumerable:!0,get:function(){return N.WebSocketRequestError}});var M=f0();Object.defineProperty(e,"InvalidAddressError",{enumerable:!0,get:function(){return M.InvalidAddressError}});var $=j0();Object.defineProperty(e,"FeeConflictError",{enumerable:!0,get:function(){return $.FeeConflictError}}),Object.defineProperty(e,"InvalidLegacyVError",{enumerable:!0,get:function(){return $.InvalidLegacyVError}}),Object.defineProperty(e,"InvalidSerializableTransactionError",{enumerable:!0,get:function(){return $.InvalidSerializableTransactionError}}),Object.defineProperty(e,"InvalidSerializedTransactionError",{enumerable:!0,get:function(){return $.InvalidSerializedTransactionError}}),Object.defineProperty(e,"InvalidSerializedTransactionTypeError",{enumerable:!0,get:function(){return $.InvalidSerializedTransactionTypeError}}),Object.defineProperty(e,"InvalidStorageKeySizeError",{enumerable:!0,get:function(){return $.InvalidStorageKeySizeError}}),Object.defineProperty(e,"TransactionExecutionError",{enumerable:!0,get:function(){return $.TransactionExecutionError}}),Object.defineProperty(e,"TransactionNotFoundError",{enumerable:!0,get:function(){return $.TransactionNotFoundError}}),Object.defineProperty(e,"TransactionReceiptNotFoundError",{enumerable:!0,get:function(){return $.TransactionReceiptNotFoundError}}),Object.defineProperty(e,"WaitForTransactionReceiptTimeoutError",{enumerable:!0,get:function(){return $.WaitForTransactionReceiptTimeoutError}});var j=JX();Object.defineProperty(e,"SizeExceedsPaddingSizeError",{enumerable:!0,get:function(){return j.SizeExceedsPaddingSizeError}}),Object.defineProperty(e,"SliceOffsetOutOfBoundsError",{enumerable:!0,get:function(){return j.SliceOffsetOutOfBoundsError}});var L=Y1();Object.defineProperty(e,"UrlRequiredError",{enumerable:!0,get:function(){return L.UrlRequiredError}});var B=c2();Object.defineProperty(e,"labelhash",{enumerable:!0,get:function(){return B.labelhash}});var D=a2();Object.defineProperty(e,"namehash",{enumerable:!0,get:function(){return D.namehash}});var U=X0();Object.defineProperty(e,"defineBlock",{enumerable:!0,get:function(){return U.defineBlock}}),Object.defineProperty(e,"formatBlock",{enumerable:!0,get:function(){return U.formatBlock}});var F=u1();Object.defineProperty(e,"formatLog",{enumerable:!0,get:function(){return F.formatLog}});var H=S0();Object.defineProperty(e,"decodeAbiParameters",{enumerable:!0,get:function(){return H.decodeAbiParameters}});var z=L5();Object.defineProperty(e,"decodeDeployData",{enumerable:!0,get:function(){return z.decodeDeployData}});var q=A0();Object.defineProperty(e,"decodeErrorResult",{enumerable:!0,get:function(){return q.decodeErrorResult}});var W=l1();Object.defineProperty(e,"decodeEventLog",{enumerable:!0,get:function(){return W.decodeEventLog}});var V=R2();Object.defineProperty(e,"decodeFunctionData",{enumerable:!0,get:function(){return V.decodeFunctionData}});var G=p1();Object.defineProperty(e,"decodeFunctionResult",{enumerable:!0,get:function(){return G.decodeFunctionResult}});var Z=y0();Object.defineProperty(e,"encodeAbiParameters",{enumerable:!0,get:function(){return Z.encodeAbiParameters}});var K=N2();Object.defineProperty(e,"encodeDeployData",{enumerable:!0,get:function(){return K.encodeDeployData}});var Y=M2();Object.defineProperty(e,"encodeErrorResult",{enumerable:!0,get:function(){return Y.encodeErrorResult}});var J=_0();Object.defineProperty(e,"encodeEventTopics",{enumerable:!0,get:function(){return J.encodeEventTopics}});var Q=k0();Object.defineProperty(e,"encodeFunctionData",{enumerable:!0,get:function(){return Q.encodeFunctionData}});var X=$2();Object.defineProperty(e,"encodeFunctionResult",{enumerable:!0,get:function(){return X.encodeFunctionResult}});var ee=Q0();Object.defineProperty(e,"defineTransaction",{enumerable:!0,get:function(){return ee.defineTransaction}}),Object.defineProperty(e,"formatTransaction",{enumerable:!0,get:function(){return ee.formatTransaction}}),Object.defineProperty(e,"transactionType",{enumerable:!0,get:function(){return ee.transactionType}});var te=z2();Object.defineProperty(e,"defineTransactionReceipt",{enumerable:!0,get:function(){return te.defineTransactionReceipt}}),Object.defineProperty(e,"formatTransactionReceipt",{enumerable:!0,get:function(){return te.formatTransactionReceipt}});var re=Z0();Object.defineProperty(e,"defineTransactionRequest",{enumerable:!0,get:function(){return re.defineTransactionRequest}}),Object.defineProperty(e,"formatTransactionRequest",{enumerable:!0,get:function(){return re.formatTransactionRequest}}),Object.defineProperty(e,"rpcTransactionType",{enumerable:!0,get:function(){return re.rpcTransactionType}});var ie=v0();Object.defineProperty(e,"getAbiItem",{enumerable:!0,get:function(){return ie.getAbiItem}});var ne=F2();Object.defineProperty(e,"getContractAddress",{enumerable:!0,get:function(){return ne.getContractAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return ne.getCreate2Address}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return ne.getCreateAddress}});var oe=f3();Object.defineProperty(e,"getSerializedTransactionType",{enumerable:!0,get:function(){return oe.getSerializedTransactionType}});var ae=o1();Object.defineProperty(e,"getTransactionType",{enumerable:!0,get:function(){return ae.getTransactionType}});var se=T2();Object.defineProperty(e,"hashDomain",{enumerable:!0,get:function(){return se.hashDomain}}),Object.defineProperty(e,"hashTypedData",{enumerable:!0,get:function(){return se.hashTypedData}});var ce=B5();Object.defineProperty(e,"compactSignatureToSignature",{enumerable:!0,get:function(){return ce.compactSignatureToSignature}});var le=D5();Object.defineProperty(e,"hexToCompactSignature",{enumerable:!0,get:function(){return le.hexToCompactSignature}});var ue=U5();Object.defineProperty(e,"hexToSignature",{enumerable:!0,get:function(){return ue.hexToSignature}});var de=s3();Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return de.recoverAddress}});var he=u3();Object.defineProperty(e,"recoverMessageAddress",{enumerable:!0,get:function(){return he.recoverMessageAddress}});var pe=a3();Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return pe.recoverPublicKey}});var fe=d3();Object.defineProperty(e,"recoverTypedDataAddress",{enumerable:!0,get:function(){return fe.recoverTypedDataAddress}});var ge=F5();Object.defineProperty(e,"signatureToCompactSignature",{enumerable:!0,get:function(){return ge.signatureToCompactSignature}});var me=H5();Object.defineProperty(e,"compactSignatureToHex",{enumerable:!0,get:function(){return me.compactSignatureToHex}});var be=z5();Object.defineProperty(e,"signatureToHex",{enumerable:!0,get:function(){return be.signatureToHex}});var ye=U2();Object.defineProperty(e,"bytesToRlp",{enumerable:!0,get:function(){return ye.bytesToRlp}}),Object.defineProperty(e,"hexToRlp",{enumerable:!0,get:function(){return ye.hexToRlp}}),Object.defineProperty(e,"toRlp",{enumerable:!0,get:function(){return ye.toRlp}});var we=h3();Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return we.verifyMessage}});var ve=p3();Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return ve.verifyTypedData}});var _e=K0();Object.defineProperty(e,"assertRequest",{enumerable:!0,get:function(){return _e.assertRequest}});var xe=g3();Object.defineProperty(e,"assertTransactionEIP1559",{enumerable:!0,get:function(){return xe.assertTransactionEIP1559}}),Object.defineProperty(e,"assertTransactionEIP2930",{enumerable:!0,get:function(){return xe.assertTransactionEIP2930}}),Object.defineProperty(e,"assertTransactionLegacy",{enumerable:!0,get:function(){return xe.assertTransactionLegacy}});var Ee=i0();Object.defineProperty(e,"boolToBytes",{enumerable:!0,get:function(){return Ee.boolToBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return Ee.hexToBytes}}),Object.defineProperty(e,"numberToBytes",{enumerable:!0,get:function(){return Ee.numberToBytes}}),Object.defineProperty(e,"stringToBytes",{enumerable:!0,get:function(){return Ee.stringToBytes}}),Object.defineProperty(e,"toBytes",{enumerable:!0,get:function(){return Ee.toBytes}});var Ce=r0();Object.defineProperty(e,"boolToHex",{enumerable:!0,get:function(){return Ce.boolToHex}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return Ce.bytesToHex}}),Object.defineProperty(e,"numberToHex",{enumerable:!0,get:function(){return Ce.numberToHex}}),Object.defineProperty(e,"stringToHex",{enumerable:!0,get:function(){return Ce.stringToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return Ce.toHex}});var ke=q2();Object.defineProperty(e,"bytesToBigInt",{enumerable:!0,get:function(){return ke.bytesToBigInt}}),Object.defineProperty(e,"bytesToBigint",{enumerable:!0,get:function(){return ke.bytesToBigInt}}),Object.defineProperty(e,"bytesToBool",{enumerable:!0,get:function(){return ke.bytesToBool}}),Object.defineProperty(e,"bytesToNumber",{enumerable:!0,get:function(){return ke.bytesToNumber}}),Object.defineProperty(e,"bytesToString",{enumerable:!0,get:function(){return ke.bytesToString}}),Object.defineProperty(e,"fromBytes",{enumerable:!0,get:function(){return ke.fromBytes}});var Pe=x1();Object.defineProperty(e,"ccipFetch",{enumerable:!0,get:function(){return Pe.ccipFetch}}),Object.defineProperty(e,"offchainLookup",{enumerable:!0,get:function(){return Pe.offchainLookup}}),Object.defineProperty(e,"offchainLookupAbiItem",{enumerable:!0,get:function(){return Pe.offchainLookupAbiItem}}),Object.defineProperty(e,"offchainLookupSignature",{enumerable:!0,get:function(){return Pe.offchainLookupSignature}});var Ie=m0();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return Ie.concat}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return Ie.concatBytes}}),Object.defineProperty(e,"concatHex",{enumerable:!0,get:function(){return Ie.concatHex}});var Se=M1();Object.defineProperty(e,"assertCurrentChain",{enumerable:!0,get:function(){return Se.assertCurrentChain}});var Ae=I2();Object.defineProperty(e,"defineChain",{enumerable:!0,get:function(){return Ae.defineChain}});var Te=S2();Object.defineProperty(e,"extractChain",{enumerable:!0,get:function(){return Te.extractChain}});var Oe=b1();Object.defineProperty(e,"getChainContractAddress",{enumerable:!0,get:function(){return Oe.getChainContractAddress}});var Re=j2();Object.defineProperty(e,"encodePacked",{enumerable:!0,get:function(){return Re.encodePacked}});var Ne=M0();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return Ne.formatEther}});var Me=$0();Object.defineProperty(e,"formatGwei",{enumerable:!0,get:function(){return Me.formatGwei}});var $e=N0();Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return $e.formatUnits}});var je=t0();Object.defineProperty(e,"fromHex",{enumerable:!0,get:function(){return je.fromHex}}),Object.defineProperty(e,"hexToBigInt",{enumerable:!0,get:function(){return je.hexToBigInt}}),Object.defineProperty(e,"hexToBool",{enumerable:!0,get:function(){return je.hexToBool}}),Object.defineProperty(e,"hexToNumber",{enumerable:!0,get:function(){return je.hexToNumber}}),Object.defineProperty(e,"hexToString",{enumerable:!0,get:function(){return je.hexToString}});var Le=W2();Object.defineProperty(e,"fromRlp",{enumerable:!0,get:function(){return Le.fromRlp}});var Be=I0();Object.defineProperty(e,"checksumAddress",{enumerable:!0,get:function(){return Be.checksumAddress}}),Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return Be.getAddress}});var De=U0();Object.defineProperty(e,"getContractError",{enumerable:!0,get:function(){return De.getContractError}});var Ue=p0();Object.defineProperty(e,"getEventSelector",{enumerable:!0,get:function(){return Ue.getEventSelector}});var Fe=a0();Object.defineProperty(e,"getEventSignature",{enumerable:!0,get:function(){return Fe.getEventSignature}});var He=w0();Object.defineProperty(e,"getFunctionSelector",{enumerable:!0,get:function(){return He.getFunctionSelector}});var ze=o0();Object.defineProperty(e,"getFunctionSignature",{enumerable:!0,get:function(){return ze.getFunctionSignature}});var qe=l3();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return qe.hashMessage}});var We=g0();Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return We.isAddress}});var Ve=_1();Object.defineProperty(e,"isAddressEqual",{enumerable:!0,get:function(){return Ve.isAddressEqual}});var Ge=L2();Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return Ge.isBytes}});var Ze=V2();Object.defineProperty(e,"isHash",{enumerable:!0,get:function(){return Ze.isHash}});var Ke=qX();Object.defineProperty(e,"isHex",{enumerable:!0,get:function(){return Ke.isHex}});var Ye=h0();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return Ye.keccak256}});var Je=K2();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return Je.sha256}});var Qe=J2();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return Qe.ripemd160}});var Xe=QX();Object.defineProperty(e,"pad",{enumerable:!0,get:function(){return Xe.pad}}),Object.defineProperty(e,"padBytes",{enumerable:!0,get:function(){return Xe.padBytes}}),Object.defineProperty(e,"padHex",{enumerable:!0,get:function(){return Xe.padHex}});var et=v3();Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return et.parseEther}});var tt=_3();Object.defineProperty(e,"parseGwei",{enumerable:!0,get:function(){return tt.parseGwei}});var rt=m3();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return rt.parseTransaction}});var it=w3();Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return it.parseUnits}});var nt=b3();Object.defineProperty(e,"serializeAccessList",{enumerable:!0,get:function(){return nt.serializeAccessList}});var ot=y3();Object.defineProperty(e,"serializeTransaction",{enumerable:!0,get:function(){return ot.serializeTransaction}});var at=WX();Object.defineProperty(e,"size",{enumerable:!0,get:function(){return at.size}});var st=b0();Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return st.slice}}),Object.defineProperty(e,"sliceBytes",{enumerable:!0,get:function(){return st.sliceBytes}}),Object.defineProperty(e,"sliceHex",{enumerable:!0,get:function(){return st.sliceHex}});var ct=T0();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return ct.stringify}});var lt=e0();Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return lt.trim}});var ut=O2();Object.defineProperty(e,"validateTypedData",{enumerable:!0,get:function(){return ut.validateTypedData}}),Object.defineProperty(e,"domainSeparator",{enumerable:!0,get:function(){return ut.domainSeparator}}),Object.defineProperty(e,"getTypesForEIP712Domain",{enumerable:!0,get:function(){return ut.getTypesForEIP712Domain}})})),W5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MAGIC_VALUE_BYTES=e.MAGIC_VALUE=void 0;e.MAGIC_VALUE="0x1626ba7e";e.MAGIC_VALUE_BYTES="0x20c13b0b"})),V5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PermissionsError=e.PERMISSIONS_REQUEST_REJECTED=void 0,e.PERMISSIONS_REQUEST_REJECTED=4001;var t=class e extends Error{constructor(t,r,i){super(t),this.code=r,this.data=i,Object.setPrototypeOf(this,e.prototype)}};e.PermissionsError=t})),G5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Wallet=void 0;var t=YQ(),r=V5();e.Wallet=class{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(t.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new r.PermissionsError("Permissions request is invalid",r.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(t.Methods.wallet_requestPermissions,e)).data}catch{throw new r.PermissionsError("Permissions rejected",r.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(e){return e.every((e=>"object"==typeof e&&Object.keys(e).every((e=>!!Object.values(t.RestrictedMethods).includes(e)))))}}})),Z5=s((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=G5(),r=V5(),i=(e,t)=>t.some((t=>t.parentCapability===e));e.default=()=>(e,n,o)=>{let a=o.value;return o.value=async function(){let e=new t.Wallet(this.communicator),o=await e.getPermissions();if(i(n,o)||(o=await e.requestPermissions([{[n]:{}}])),!i(n,o))throw new r.PermissionsError("Permissions rejected",r.PERMISSIONS_REQUEST_REJECTED);return a.apply(this)},o}})),K5=s((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Safe=void 0;var i=q5(),n=W5(),o=YQ(),a=yX(),s=mX(),c=r(Z5()),l=class{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(o.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(o.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(o.Methods.getSafeBalances,{currency:e})).data}async check1271Signature(e,t="0x"){let r=await this.getInfo(),s=(0,i.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,t]}),c={call:a.RPC_CALLS.eth_call,params:[{to:r.safeAddress,data:s},"latest"]};try{return(await this.communicator.send(o.Methods.rpcCall,c)).data.slice(0,10).toLowerCase()===n.MAGIC_VALUE}catch{return!1}}async check1271SignatureBytes(e,t="0x"){let r=await this.getInfo(),s=(0,i.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,t]}),c={call:a.RPC_CALLS.eth_call,params:[{to:r.safeAddress,data:s},"latest"]};try{return(await this.communicator.send(o.Methods.rpcCall,c)).data.slice(0,10).toLowerCase()===n.MAGIC_VALUE_BYTES}catch{return!1}}calculateMessageHash(e){return(0,i.hashMessage)(e)}calculateTypedMessageHash(e){let t="object"==typeof e.domain.chainId?e.domain.chainId.toNumber():Number(e.domain.chainId),r=e.primaryType;if(!r){let t=Object.values(e.types),i=Object.keys(e.types).filter((e=>t.every((t=>t.every((({type:t})=>t.replace("[","").replace("]","")!==e))))));if(0===i.length||i.length>1)throw new Error("Please specify primaryType");r=i[0]}return(0,i.hashTypedData)({message:e.message,domain:Object.assign(Object.assign({},e.domain),{chainId:t,verifyingContract:e.domain.verifyingContract,salt:e.domain.salt}),types:e.types,primaryType:r})}async getOffChainSignature(e){return(await this.communicator.send(o.Methods.getOffChainSignature,e)).data}async isMessageSigned(e,t="0x"){let r;if("string"==typeof e&&(r=async()=>{let r=this.calculateMessageHash(e);return await this.isMessageHashSigned(r,t)}),(0,s.isObjectEIP712TypedData)(e)&&(r=async()=>{let r=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(r,t)}),r)return await r();throw new Error("Invalid message type")}async isMessageHashSigned(e,t="0x"){let r=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(let i of r)if(await i(e,t))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(o.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(o.Methods.requestAddressBook,void 0)).data}};t([(0,c.default)()],l.prototype,"requestAddressBook",null),e.Safe=l})),Y5=s((e=>{"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0});var r=t(JQ()),i=bX(),n=wX(),o=K5(),a=G5();e.default=class{constructor(e={}){let{allowedDomains:t=null,debug:s=!1}=e;this.communicator=new r.default(t,s),this.eth=new n.Eth(this.communicator),this.txs=new i.TXs(this.communicator),this.safe=new o.Safe(this.communicator),this.wallet=new a.Wallet(this.communicator)}}})),J5=s((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var i in e)"default"!==i&&!Object.prototype.hasOwnProperty.call(r,i)&&t(r,e,i)},i=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getSDKVersion=void 0;var n=i(Y5());e.default=n.default,r(Y5(),e),r(mX(),e),r(YQ(),e),r(KQ(),e);var o=GQ();Object.defineProperty(e,"getSDKVersion",{enumerable:!0,get:function(){return o.getSDKVersion}})}));hk(),Qx();var Q5=class extends Wx{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join("\n    "),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}};function X5(e,t,r){return i=>e[t.name]?.(i)??e[r]?.(i)??t(e,i)}async function e4(e){return wE(await e.request({method:"eth_chainId"}))}pk(),Ok(),hP(),bP(),wP(),xP(),CP(),_E(),hk(),Tk(),Qx();var t4=class extends Wx{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}},r4=class extends Wx{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}},i4=class extends Wx{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${bk(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}};_E(),Qx();var n4=class extends Wx{constructor({blockHash:e,blockNumber:t}){let r="Block";e&&(r=`Block at hash "${e}"`),t&&(r=`Block at number "${t}"`),super(`${r} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}};AE(),_E();var o4={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844"};function a4(e){let t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?wE(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?wE(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?o4[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip1559"===t.type&&delete t.maxFeePerBlobGas,t}function s4(e){let t=e.transactions?.map((e=>"string"==typeof e?e:a4(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}async function c4(e,{blockHash:t,blockNumber:r,blockTag:i,includeTransactions:n}={}){let o=i??"latest",a=n??!1,s=void 0!==r?kE(r):void 0,c=null;if(c=t?await e.request({method:"eth_getBlockByHash",params:[t,a]}):await e.request({method:"eth_getBlockByNumber",params:[s||o,a]}),!c)throw new n4({blockHash:t,blockNumber:r});return(e.chain?.formatters?.block?.format||s4)(c)}async function l4(e){let t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function u4(e,t){let{block:r,chain:i=e.chain,request:n,type:o="eip1559"}=t||{},a=await(async()=>"function"==typeof i?.fees?.baseFeeMultiplier?i.fees.baseFeeMultiplier({block:r,client:e,request:n}):i?.fees?.baseFeeMultiplier??1.2)();if(a<1)throw new t4;let s=10**(a.toString().split(".")[1]?.length??0),c=e=>e*BigInt(Math.ceil(a*s))/BigInt(s),l=r||await X5(e,c4,"getBlock")({});if("function"==typeof i?.fees?.estimateFeesPerGas){let t=await i.fees.estimateFeesPerGas({block:r,client:e,multiply:c,request:n,type:o});if(null!==t)return t}if("eip1559"===o){if("bigint"!=typeof l.baseFeePerGas)throw new r4;let t="bigint"==typeof n?.maxPriorityFeePerGas?n.maxPriorityFeePerGas:await async function(e,t){let{block:r,chain:i=e.chain,request:n}=t||{};if("function"==typeof i?.fees?.defaultPriorityFee){let t=r||await X5(e,c4,"getBlock")({});return i.fees.defaultPriorityFee({block:t,client:e,request:n})}if(typeof i?.fees?.defaultPriorityFee<"u")return i?.fees?.defaultPriorityFee;try{return yE(await e.request({method:"eth_maxPriorityFeePerGas"}))}catch{let[t,i]=await Promise.all([r?Promise.resolve(r):X5(e,c4,"getBlock")({}),X5(e,l4,"getGasPrice")({})]);if("bigint"!=typeof t.baseFeePerGas)throw new r4;let n=i-t.baseFeePerGas;return n<0n?0n:n}}(e,{block:l,chain:i,request:n}),r=c(l.baseFeePerGas);return{maxFeePerGas:n?.maxFeePerGas??r+t,maxPriorityFeePerGas:t}}return{gasPrice:n?.gasPrice??c(await X5(e,l4,"getGasPrice")({}))}}hk(),AE(),Nk(),Tk(),Qx(),hP();var d4=class extends Wx{constructor(e,{account:t,docsPath:r,chain:i,data:n,gas:o,gasPrice:a,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:l,to:u,value:d}){let h=Mk({from:t?.address,to:u,value:typeof d<"u"&&`${Rk(d)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:n,gas:o,gasPrice:typeof a<"u"&&`${bk(a)} gwei`,maxFeePerGas:typeof s<"u"&&`${bk(s)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${bk(c)} gwei`,nonce:l});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}};async function h4(e,t){let r=t.account??e.account,i=r?nk(r):void 0;try{let{accessList:r,blobs:n,blobVersionedHashes:o,blockNumber:a,blockTag:s,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:f,to:g,value:m,...b}=await _4(e,{...t,parameters:"local"===i?.type?void 0:["blobVersionedHashes"]}),y=(a?kE(a):void 0)||s;EP(t);let w=e.chain?.formatters?.transactionRequest?.format,v=(w||vP)({...yP(b,{format:w}),from:i?.address,accessList:r,blobs:n,blobVersionedHashes:o,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:f,to:g,value:m}),_=await e.request({method:"eth_estimateGas",params:y?[v,y]:[v]});return BigInt(_)}catch(r){throw function(e,{docsPath:t,...r}){let i=(()=>{let t=mP(e,r);return t instanceof Ak?e:t})();return new d4(i,{docsPath:t,...r})}(r,{...t,account:i,chain:e.chain})}}async function p4(e,{address:t,blockTag:r="latest",blockNumber:i}){return wE(await e.request({method:"eth_getTransactionCount",params:[t,i?kE(i):r]}))}function f4(e){let{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),i="string"==typeof e.blobs[0]?e.blobs.map((e=>hE(e))):e.blobs,n=[];for(let e of i)n.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===r?n:n.map((e=>CE(e)))}function g4(e){let{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),i="string"==typeof e.blobs[0]?e.blobs.map((e=>hE(e))):e.blobs,n="string"==typeof e.commitments[0]?e.commitments.map((e=>hE(e))):e.commitments,o=[];for(let e=0;e<i.length;e++){let r=i[e],a=n[e];o.push(Uint8Array.from(t.computeBlobKzgProof(r,a)))}return"bytes"===r?o:o.map((e=>CE(e)))}function m4(e){let{commitment:t,version:r=1}=e,i=e.to??("string"==typeof t?"hex":"bytes"),n=function(e,t){let r=t||"hex",i=RP(nE(e,{strict:!1})?uE(e):e);return"bytes"===r?i:xE(i)}(t,"bytes");return n.set([r],0),"bytes"===i?n:CE(n)}Ok(),bP(),wP(),xP(),CP(),_E(),AE(),mE(),AE(),mE(),AE(),AE(),LP(),oE(),mE(),AE(),Qx();var b4=class extends Wx{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlobSizeTooLargeError"})}},y4=class extends Wx{constructor(){super("Blob data must not be empty."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EmptyBlobError"})}};function w4(e){let{data:t,kzg:r,to:i}=e,n=e.blobs??function(e){let t=e.to??("string"==typeof e.data?"hex":"bytes"),r="string"==typeof e.data?hE(e.data):e.data,i=aE(r);if(!i)throw new y4;if(i>761855)throw new b4({maxSize:761855,size:i});let n=[],o=!0,a=0;for(;o;){let e=DP(new Uint8Array(131072)),t=0;for(;t<4096;){let i=r.slice(a,a+31);if(e.pushByte(0),e.pushBytes(i),i.length<31){e.pushByte(128),o=!1;break}t++,a+=31}n.push(e)}return"bytes"===t?n.map((e=>e.bytes)):n.map((e=>CE(e.bytes)))}({data:t,to:i}),o=e.commitments??f4({blobs:n,kzg:r,to:i}),a=e.proofs??g4({blobs:n,commitments:o,kzg:r,to:i}),s=[];for(let e=0;e<n.length;e++)s.push({blob:n[e],commitment:o[e],proof:a[e]});return s}VP(),sE(),mE(),AE(),CP(),hP();var v4=["blobVersionedHashes","chainId","fees","gas","nonce","type"];async function _4(e,t){let r,{account:i=e.account,blobs:n,chain:o,chainId:a,gas:s,kzg:c,nonce:l,parameters:u=v4,type:d}=t,h=i?nk(i):void 0,p={...t,...h?{from:h?.address}:{}};async function f(){return r||(r=await X5(e,c4,"getBlock")({blockTag:"latest"}),r)}if((u.includes("blobVersionedHashes")||u.includes("sidecars"))&&n&&c){let e=f4({blobs:n,kzg:c});if(u.includes("blobVersionedHashes")){let t=function(e){let{commitments:t,version:r}=e,i=e.to??("string"==typeof t[0]?"hex":"bytes"),n=[];for(let e of t)n.push(m4({commitment:e,to:i,version:r}));return n}({commitments:e,to:"hex"});p.blobVersionedHashes=t}if(u.includes("sidecars")){let t=w4({blobs:n,commitments:e,proofs:g4({blobs:n,commitments:e,kzg:c}),to:"hex"});p.sidecars=t}}if(u.includes("chainId")&&(p.chainId=o?o.id:typeof a<"u"?a:await X5(e,e4,"getChainId")({})),u.includes("nonce")&&typeof l>"u"&&h&&(p.nonce=await X5(e,p4,"getTransactionCount")({address:h.address,blockTag:"pending"})),(u.includes("fees")||u.includes("type"))&&typeof d>"u")try{p.type=function(e){if(e.type)return e.type;if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new jk({transaction:e})}(p)}catch{let e=await f();p.type="bigint"==typeof e?.baseFeePerGas?"eip1559":"legacy"}if(u.includes("fees"))if("legacy"!==p.type&&"eip2930"!==p.type){if(typeof p.maxFeePerGas>"u"||typeof p.maxPriorityFeePerGas>"u"){let r=await f(),{maxFeePerGas:i,maxPriorityFeePerGas:n}=await u4(e,{block:r,chain:o,request:p});if(typeof t.maxPriorityFeePerGas>"u"&&t.maxFeePerGas&&t.maxFeePerGas<n)throw new i4({maxPriorityFeePerGas:n});p.maxPriorityFeePerGas=n,p.maxFeePerGas=i}}else{if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")throw new r4;let r=await f(),{gasPrice:i}=await u4(e,{block:r,chain:o,request:p,type:"legacy"});p.gasPrice=i}return u.includes("gas")&&typeof s>"u"&&(p.gas=await X5(e,h4,"estimateGas")({...p,account:h?{address:h.address,type:"json-rpc"}:void 0})),EP(p),delete p.parameters,p}async function x4(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}async function E4(e,t){let{account:r=e.account,chain:i=e.chain,accessList:n,blobs:o,data:a,gas:s,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:d,nonce:h,to:p,value:f,...g}=t;if(!r)throw new Q5({docsPath:"/docs/actions/wallet/sendTransaction"});let m=nk(r);try{let r;if(EP(t),null!==i&&(r=await X5(e,e4,"getChainId")({}),function({chain:e,currentChainId:t}){if(!e)throw new sk;if(t!==e.id)throw new ak({chain:e,currentChainId:t})}({currentChainId:r,chain:i})),"local"===m.type){let t=await X5(e,_4,"prepareTransactionRequest")({account:m,accessList:n,blobs:o,chain:i,chainId:r,data:a,gas:s,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:d,nonce:h,parameters:[...v4,"sidecars"],to:p,value:f,...g}),b=i?.serializers?.transaction,y=await m.signTransaction(t,{serializer:b});return await X5(e,x4,"sendRawTransaction")({serializedTransaction:y})}let b=e.chain?.formatters?.transactionRequest?.format,y=(b||vP)({...yP(g,{format:b}),accessList:n,blobs:o,data:a,from:m.address,gas:s,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:d,nonce:h,to:p,value:f});return await e.request({method:"eth_sendTransaction",params:[y]},{retryCount:0})}catch(e){throw function(e,{docsPath:t,...r}){let i=(()=>{let t=mP(e,r);return t instanceof Ak?e:t})();return new Lk(i,{docsPath:t,...r})}(e,{...t,account:m,chain:t.chain||void 0})}}function C4(e,t){if(!(e instanceof Wx))return!1;let r=e.walk((e=>e instanceof KI));return r instanceof KI&&!!("ResolverNotFound"===r.data?.errorName||"ResolverWildcardNotSupported"===r.data?.errorName||"ResolverNotContract"===r.data?.errorName||"ResolverError"===r.data?.errorName||"HttpError"===r.data?.errorName||r.reason?.includes("Wildcard on non-extended resolvers is not supported")||"reverse"===t&&r.reason===$I[50])}function k4(e){if(66!==e.length||0!==e.indexOf("[")||65!==e.indexOf("]"))return null;let t=`0x${e.slice(1,65)}`;return nE(t)?t:null}function P4(e){let t=new Uint8Array(32).fill(0);if(!e)return CE(t);let r=e.split(".");for(let e=r.length-1;e>=0;e-=1){let i=k4(r[e]),n=i?uE(i):DC(pE(r[e]),"bytes");t=DC(GE([t,n]),"bytes")}return CE(t)}function I4(e){return`[${e.slice(2)}]`}function S4(e){let t=new Uint8Array(32).fill(0);return e?k4(e)||DC(pE(e)):CE(t)}function A4(e){let t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);let r=new Uint8Array(pE(t).byteLength+2),i=0,n=t.split(".");for(let e=0;e<n.length;e++){let t=pE(n[e]);t.byteLength>255&&(t=pE(I4(S4(n[e])))),r[i]=t.length,r.set(t,i+1),i+=t.length+1}return r.byteLength!==i+1?r.slice(0,i+1):r}DI(),Qx(),eS(),JE(),mE(),AE(),UC(),oE(),mE(),mE(),AE(),UC(),AI(),NI(),VE(),Qx(),eS(),gP();var T4=3;function O4(e,{abi:t,address:r,args:i,docsPath:n,functionName:o,sender:a}){let{code:s,data:c,message:l,shortMessage:u}=e instanceof JI?e:e instanceof Wx?e.walk((e=>"data"in e))||e.walk():{},d=e instanceof NE?new YI({functionName:o}):[T4,Jk.code].includes(s)&&(c||l||u)?new KI({abi:t,data:"object"==typeof c?c.data:c,functionName:o,message:u??l}):e;return new ZI(d,{abi:t,args:i,contractAddress:r,docsPath:n,functionName:o,sender:a})}async function R4(e,t){let{abi:r,address:i,args:n,functionName:o,...a}=t,s=RI({abi:r,args:n,functionName:o});try{let{data:t}=await X5(e,bS,"call")({...a,data:s,to:i});return II({abi:r,args:n,functionName:o,data:t||"0x"})}catch(e){throw O4(e,{abi:r,address:i,args:n,docsPath:"/docs/contract/readContract",functionName:o})}}vS(),Qx();var N4=class extends Wx{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}},M4=class extends Wx{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}},$4=class extends Wx{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}},j4=class extends Wx{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}},L4=/(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,B4=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,D4=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,U4=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;function F4(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function H4({uri:e,gatewayUrls:t}){let r=D4.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};let i=F4(t?.ipfs,"https://ipfs.io"),n=F4(t?.arweave,"https://arweave.net"),o=e.match(L4),{protocol:a,subpath:s,target:c,subtarget:l=""}=o?.groups||{},u="ipns:/"===a||"ipns/"===s,d="ipfs:/"===a||"ipfs/"===s||B4.test(e);if(e.startsWith("http")&&!u&&!d){let r=e;return t?.arweave&&(r=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:r,isOnChain:!1,isEncoded:!1}}if((u||d)&&c)return{uri:`${i}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if("ar:/"===a&&c)return{uri:`${n}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let h=e.replace(U4,"");if(h.startsWith("<svg")&&(h=`data:image/svg+xml;base64,${btoa(h)}`),h.startsWith("data:")||h.startsWith("{"))return{uri:h,isOnChain:!0,isEncoded:!1};throw new $4({uri:e})}function z4(e){if("object"!=typeof e||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new N4({data:e});return e.image||e.image_url||e.image_data}async function q4({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:i}=H4({uri:t,gatewayUrls:e});if(i||await async function(e){try{let t=await fetch(e,{method:"HEAD"});return 200===t.status&&t.headers.get("content-type")?.startsWith("image/")}catch(t){return!("object"==typeof t&&typeof t.response<"u"||!globalThis.hasOwnProperty("Image"))&&new Promise((t=>{let r=new Image;r.onload=()=>{t(!0)},r.onerror=()=>{t(!1)},r.src=e}))}}(r))return r;throw new $4({uri:t})}async function W4(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?async function(e,{gatewayUrls:t,record:r}){let i=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,i,n]=t.split("/"),[o,a]=r.split(":"),[s,c]=i.split(":");if(!o||"eip155"!==o.toLowerCase())throw new M4({reason:"Only EIP-155 supported"});if(!a)throw new M4({reason:"Chain ID not found"});if(!c)throw new M4({reason:"Contract address not found"});if(!n)throw new M4({reason:"Token ID not found"});if(!s)throw new M4({reason:"ERC namespace not found"});return{chainID:parseInt(a),namespace:s.toLowerCase(),contractAddress:c,tokenID:n}}(r),n=await async function(e,{nft:t}){if("erc721"===t.namespace)return R4(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return R4(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new j4({namespace:t.namespace})}(e,{nft:i}),{uri:o,isOnChain:a,isEncoded:s}=H4({uri:n,gatewayUrls:t});if(a&&(o.includes("data:application/json;base64,")||o.startsWith("{"))){let e=s?atob(o.replace("data:application/json;base64,","")):o;return q4({uri:z4(JSON.parse(e)),gatewayUrls:t})}let c=i.tokenID;return"erc1155"===i.namespace&&(c=c.replace("0x","").padStart(64,"0")),async function({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then((e=>e.json()));return await q4({gatewayUrls:e,uri:z4(r)})}catch{throw new $4({uri:t})}}({gatewayUrls:t,uri:o.replace(/(?:0x)?{id}/,c)})}(e,{gatewayUrls:t,record:r}):q4({uri:r,gatewayUrls:t})}async function V4(e,{blockNumber:t,blockTag:r,name:i,key:n,gatewayUrls:o,strict:a,universalResolverAddress:s}){let c=s;if(!c){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");c=MI({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{let a={address:c,abi:zP,functionName:"resolve",args:[xE(A4(i)),RI({abi:WP,functionName:"text",args:[P4(i),n]})],blockNumber:t,blockTag:r},s=X5(e,R4,"readContract"),l=o?await s({...a,args:[...a.args,o]}):await s(a);if("0x"===l[0])return null;let u=II({abi:WP,functionName:"text",data:l[0]});return""===u?null:u}catch(e){if(a)throw e;if(C4(e,"resolve"))return null;throw e}}async function G4(e,{blockNumber:t,blockTag:r,assetGatewayUrls:i,name:n,gatewayUrls:o,strict:a,universalResolverAddress:s}){let c=await X5(e,V4,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:n,universalResolverAddress:s,gatewayUrls:o,strict:a});if(!c)return null;try{return await W4(e,{record:c,gatewayUrls:i})}catch{return null}}async function Z4(e,{address:t,blockNumber:r,blockTag:i,gatewayUrls:n,strict:o,universalResolverAddress:a}){let s=a;if(!s){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");s=MI({blockNumber:r,chain:e.chain,contract:"ensUniversalResolver"})}let c=`${t.toLowerCase().substring(2)}.addr.reverse`;try{let o={address:s,abi:qP,functionName:"reverse",args:[xE(A4(c))],blockNumber:r,blockTag:i},a=X5(e,R4,"readContract"),[l,u]=n?await a({...o,args:[...o.args,n]}):await a(o);return t.toLowerCase()!==u.toLowerCase()?null:l}catch(e){if(o)throw e;if(C4(e,"reverse"))return null;throw e}}async function K4(e,{address:t,blockNumber:r,blockTag:i="latest"}){let n=r?kE(r):void 0,o=await e.request({method:"eth_getBalance",params:[t,n||i]});return BigInt(o)}GP(),AI(),NI(),BI(),AE(),GP(),BI(),AE(),vS(),AE();var Y4=new Map,J4=new Map;async function Q4(e,{cacheKey:t,cacheTime:r=1/0}){let i=function(e){let t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:r=>t.set(e,r)}),r=t(e,Y4),i=t(e,J4);return{clear:()=>{r.clear(),i.clear()},promise:r,response:i}}(t),n=i.response.get();if(n&&r>0&&(new Date).getTime()-n.created.getTime()<r)return n.data;let o=i.promise.get();o||(o=e(),i.promise.set(o));try{let e=await o;return i.response.set({created:new Date,data:e}),e}finally{i.promise.clear()}}var X4=e=>`blockNumber.${e}`;async function e6(e,{cacheTime:t=e.cacheTime}={}){let r=await Q4((()=>e.request({method:"eth_blockNumber"})),{cacheKey:X4(e.uid),cacheTime:t});return BigInt(r)}async function t6(e,{blockHash:t,blockNumber:r,blockTag:i,hash:n,index:o}){let a=i||"latest",s=void 0!==r?kE(r):void 0,c=null;if(n?c=await e.request({method:"eth_getTransactionByHash",params:[n]}):t?c=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,kE(o)]}):(s||a)&&(c=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[s||a,kE(o)]})),!c)throw new Bk({blockHash:t,blockNumber:r,blockTag:a,hash:n,index:o});return(e.chain?.formatters?.transaction?.format||a4)(c)}hP(),AE(),hP(),_E();var r6={"0x0":"reverted","0x1":"success"};function i6(e){let t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>function(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?wE(e.transactionIndex):null,status:e.status?r6[e.status]:null,type:e.type?o4[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}async function n6(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]});if(!r)throw new Dk({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||i6)(r)}async function o6(e,t){let{allowFailure:r=!0,batchSize:i,blockNumber:n,blockTag:o,multicallAddress:a,stateOverride:s}=t,c=t.contracts,l=i??("object"==typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),u=a;if(!u){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");u=MI({blockNumber:n,chain:e.chain,contract:"multicall3"})}let d=[[]],h=0,p=0;for(let e=0;e<c.length;e++){let{abi:t,address:i,args:n,functionName:o}=c[e];try{let e=RI({abi:t,args:n,functionName:o});p+=(e.length-2)/2,l>0&&p>l&&d[h].length>0&&(h++,p=(e.length-2)/2,d[h]=[]),d[h]=[...d[h],{allowFailure:!0,callData:e,target:i}]}catch(e){let a=O4(e,{abi:t,address:i,args:n,docsPath:"/docs/contract/multicall",functionName:o});if(!r)throw a;d[h]=[...d[h],{allowFailure:!0,callData:"0x",target:i}]}}let f=await Promise.allSettled(d.map((t=>X5(e,R4,"readContract")({abi:FP,address:u,args:[t],blockNumber:n,blockTag:o,functionName:"aggregate3",stateOverride:s})))),g=[];for(let e=0;e<f.length;e++){let t=f[e];if("rejected"===t.status){if(!r)throw t.reason;for(let r=0;r<d[e].length;r++)g.push({status:"failure",error:t.reason,result:void 0});continue}let i=t.value;for(let t=0;t<i.length;t++){let{returnData:n,success:o}=i[t],{callData:a}=d[e][t],{abi:s,address:l,functionName:u,args:h}=c[g.length];try{if("0x"===a)throw new NE;if(!o)throw new JI({data:n});let e=II({abi:s,args:h,data:n,functionName:u});g.push(r?{result:e,status:"success"}:e)}catch(e){let t=O4(e,{abi:s,address:l,args:h,docsPath:"/docs/contract/multicall",functionName:u});if(!r)throw t;g.push({error:t,result:void 0,status:"failure"})}}}if(g.length!==c.length)throw new Wx("multicall results mismatch");return g}GP(),VE(),Qx(),eS(),AI(),NI(),BI();var a6=new Map,s6=new Map,c6=0;function l6(e,t,r){let i=++c6,n=()=>a6.get(e)||[],o=()=>{let t=s6.get(e);1===n().length&&t&&t(),(()=>{let t=n();a6.set(e,t.filter((e=>e.id!==i)))})()},a=n();if(a6.set(e,[...a,{id:i,fns:t}]),a&&a.length>0)return o;let s={};for(let e in t)s[e]=(...t)=>{let r=n();if(0!==r.length)for(let i of r)i.fns[e]?.(...t)};let c=r(s);return"function"==typeof c&&s6.set(e,c),o}async function u6(e){return new Promise((t=>setTimeout(t,e)))}function d6(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:i,onError:n,poll:o,pollingInterval:a=e.pollingInterval}){let s;return(typeof o<"u"?o:!("webSocket"===e.transport.type||"fallback"===e.transport.type&&"webSocket"===e.transport.transports[0].config.type))?l6(Fk(["watchBlockNumber",e.uid,t,r,a]),{onBlockNumber:i,onError:n},(i=>function(e,{emitOnBegin:t,initialWaitTime:r,interval:i}){let n=!0,o=()=>n=!1;return(async()=>{let a;t&&(a=await e({unpoll:o}));let s=await(r?.(a))??i;await u6(s);let c=async()=>{n&&(await e({unpoll:o}),await u6(i),c())};c()})(),o}((async()=>{try{let t=await X5(e,e6,"getBlockNumber")({cacheTime:0});if(s){if(t===s)return;if(t-s>1&&r)for(let e=s+1n;e<t;e++)i.onBlockNumber(e,s),s=e}(!s||t>s)&&(i.onBlockNumber(t,s),s=t)}catch(e){i.onError?.(e)}}),{emitOnBegin:t,interval:a}))):l6(Fk(["watchBlockNumber",e.uid,t,r]),{onBlockNumber:i,onError:n},(t=>{let r=!0,i=()=>r=!1;return(async()=>{try{let n=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find((e=>"webSocket"===e.config.type));return t?t.value:e.transport}return e.transport})(),{unsubscribe:o}=await n.subscribe({params:["newHeads"],onData(e){if(!r)return;let i=yE(e.result?.number);t.onBlockNumber(i,s),s=i},onError(e){t.onError?.(e)}});i=o,r||i()}catch(e){n?.(e)}})(),()=>i()}))}function h6(e,{delay:t=100,retryCount:r=2,shouldRetry:i=(()=>!0)}={}){return new Promise(((n,o)=>{let a=async({count:s=0}={})=>{try{let t=await e();n(t)}catch(e){if(s<r&&await i({count:s,error:e}))return(async({error:e})=>{let r="function"==typeof t?t({count:s,error:e}):t;r&&await u6(r),a({count:s+1})})({error:e});o(e)}};a()}))}function p6(e,t={}){return async(r,i={})=>{let{retryDelay:n=150,retryCount:o=3}={...t,...i};return h6((async()=>{try{return await e(r)}catch(e){let t=e;switch(t.code){case Gk.code:throw new Gk(t);case Zk.code:throw new Zk(t);case Kk.code:throw new Kk(t);case Yk.code:throw new Yk(t);case Jk.code:throw new Jk(t);case Qk.code:throw new Qk(t);case Xk.code:throw new Xk(t);case eP.code:throw new eP(t);case tP.code:throw new tP(t);case rP.code:throw new rP(t);case iP.code:throw new iP(t);case nP.code:throw new nP(t);case oP.code:throw new oP(t);case aP.code:throw new aP(t);case sP.code:throw new sP(t);case cP.code:throw new cP(t);case lP.code:throw new lP(t);case uP.code:throw new uP(t);case 5e3:throw new oP(t);default:throw e instanceof Wx?e:new dP(t)}}}),{delay:({count:e,error:t})=>{if(t&&t instanceof Hk){let e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*parseInt(e)}return~~(1<<e)*n},retryCount:o,shouldRetry:({error:e})=>function(e){return"code"in e&&"number"==typeof e.code?-1===e.code||e.code===iP.code||e.code===Jk.code:!(e instanceof Hk&&e.status)||(403===e.status||408===e.status||413===e.status||429===e.status||500===e.status||502===e.status||503===e.status||504===e.status)}(e)})}}function f6(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:i}){return new Promise(((n,o)=>{(async()=>{let a;try{let s=new AbortController;r>0&&(a=setTimeout((()=>{i?s.abort():o(t)}),r)),n(await e({signal:s?.signal||null}))}catch(e){"AbortError"===e.name&&o(t),o(e)}finally{clearTimeout(a)}})()}))}_E(),pP(),Qx(),fP(),gP(),fP(),pP();var g6={current:0,take(){return this.current++},reset(){this.current=0}};function m6(e,t){let[r,i="0"]=e.split("."),n=r.startsWith("-");if(n&&(r=r.slice(1)),i=i.replace(/(0+)$/,""),0===t)1===Math.round(+`.${i}`)&&(r=`${BigInt(r)+1n}`),i="";else if(i.length>t){let[e,n,o]=[i.slice(0,t-1),i.slice(t-1,t),i.slice(t)],a=Math.round(+`${n}.${o}`);i=a>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${a}`,i.length>t&&(i=i.slice(1),r=`${BigInt(r)+1n}`),i=i.slice(0,t)}else i=i.padEnd(t,"0");return BigInt(`${n?"-":""}${r}${i}`)}async function b6(e,{confirmations:t=1,hash:r,onReplaced:i,pollingInterval:n=e.pollingInterval,retryCount:o=6,retryDelay:a=(({count:e})=>200*~~(1<<e)),timeout:s}){let c,l,u,d=Fk(["waitForTransactionReceipt",e.uid,r]),h=!1;return new Promise(((p,f)=>{s&&setTimeout((()=>f(new Uk({hash:r}))),s);let g=l6(d,{onReplaced:i,resolve:p,reject:f},(i=>{let s=X5(e,d6,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:n,async onBlockNumber(n){if(h)return;let d=n,p=e=>{s(),e(),g()};try{if(u){if(t>1&&(!u.blockNumber||d-u.blockNumber+1n<t))return;return void p((()=>i.resolve(u)))}if(c||(h=!0,await h6((async()=>{c=await X5(e,t6,"getTransaction")({hash:r}),c.blockNumber&&(d=c.blockNumber)}),{delay:a,retryCount:o}),h=!1),u=await X5(e,n6,"getTransactionReceipt")({hash:r}),t>1&&(!u.blockNumber||d-u.blockNumber+1n<t))return;p((()=>i.resolve(u)))}catch(r){if(r instanceof Bk||r instanceof Dk){if(!c)return void(h=!1);try{l=c,h=!0;let r=await h6((()=>X5(e,c4,"getBlock")({blockNumber:d,includeTransactions:!0})),{delay:a,retryCount:o,shouldRetry:({error:e})=>e instanceof n4});h=!1;let n=r.transactions.find((({from:e,nonce:t})=>e===l.from&&t===l.nonce));if(!n||(u=await X5(e,n6,"getTransactionReceipt")({hash:n.hash}),t>1&&(!u.blockNumber||d-u.blockNumber+1n<t)))return;let s="replaced";n.to===l.to&&n.value===l.value?s="repriced":n.from===n.to&&0n===n.value&&(s="cancelled"),p((()=>{i.onReplaced?.({reason:s,replacedTransaction:l,transaction:n,transactionReceipt:u}),i.resolve(u)}))}catch(e){p((()=>i.reject(e)))}}else p((()=>i.reject(r)))}}})}))}))}async function y6(e,{account:t=e.account,message:r}){if(!t)throw new Q5({docsPath:"/docs/actions/wallet/signMessage"});let i=nk(t);if("local"===i.type)return i.signMessage({message:r});let n="string"==typeof r?PE(r):r.raw instanceof Uint8Array?xE(r.raw):r.raw;return e.request({method:"personal_sign",params:[n,i.address]},{retryCount:0})}function w6(){let e=new Set,t=[],r=()=>function(e){let t=t=>e(t.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)}((r=>{t.some((({info:e})=>e.uuid===r.info.uuid))||(t=[...t,r],e.forEach((e=>e(t,{added:[r]}))))})),i=r();return{_listeners:()=>e,clear(){e.forEach((e=>e([],{removed:[...t]}))),t=[]},destroy(){this.clear(),e.clear(),i()},findProvider:({rdns:e})=>t.find((t=>t.info.rdns===e)),getProviders:()=>t,reset(){this.clear(),i(),i=r()},subscribe:(r,{emitImmediately:i}={})=>(e.add(r),i&&r(t,{added:t}),()=>e.delete(r))}}hk(),zC(),hP(),pP(),hk(),AE(),hk();var v6,_6=256;function x6(e=11){if(!v6||_6+e>512){v6="",_6=0;for(let e=0;e<256;e++)v6+=(256+256*Math.random()|0).toString(16).substring(1)}return v6.substring(_6,_6+++e)}function E6(e){let{batch:t,cacheTime:r=e.pollingInterval??4e3,ccipRead:i,key:n="base",name:o="Base Client",pollingInterval:a=4e3,type:s="base"}=e,c=e.chain,l=e.account?nk(e.account):void 0,{config:u,request:d,value:h}=e.transport({chain:c,pollingInterval:a}),p={account:l,batch:t,cacheTime:r,ccipRead:i,chain:c,key:n,name:o,pollingInterval:a,request:d,transport:{...u,...h},type:s,uid:x6()};return Object.assign(p,{extend:function e(t){return r=>{let i=r(t);for(let e in p)delete i[e];let n={...t,...i};return Object.assign(n,{extend:e(n)})}}(p)})}function C6({key:e,name:t,request:r,retryCount:i=3,retryDelay:n=150,timeout:o,type:a},s){return{config:{key:e,name:t,request:r,retryCount:i,retryDelay:n,timeout:o,type:a},request:p6(r,{retryCount:i,retryDelay:n}),value:s}}fP(),Qx();var k6=class extends Wx{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}};cS(),fk(),eS(),gP(),AE(),mk(),_E(),zC(),lE();var P6={},I6=e=>(t,r,i)=>{let n=i.subscribe;return i.subscribe=(e,t,r)=>{let o=e;if(t){let n=r?.equalityFn||Object.is,a=e(i.getState());o=r=>{let i=e(r);if(!n(a,i)){let e=a;t(a=i,e)}},r?.fireImmediately&&t(a,a)}return n(o)},e(t,r,i)};function S6(e,t){let r;try{r=e()}catch{return}return{getItem:e=>{var i;let n=e=>null===e?null:JSON.parse(e,t?.reviver),o=null!=(i=r.getItem(e))?i:null;return o instanceof Promise?o.then(n):n(o)},setItem:(e,i)=>r.setItem(e,JSON.stringify(i,t?.replacer)),removeItem:e=>r.removeItem(e)}}var A6,T6=e=>t=>{try{let r=e(t);return r instanceof Promise?r:{then:e=>T6(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>T6(t)(e)}}},O6=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?("production"!==(P6.env?P6.env.MODE:void 0)&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),((e,t)=>(r,i,n)=>{let o,a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,c=new Set,l=new Set;try{o=a.getStorage()}catch{}if(!o)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...e)}),i,n);let u=T6(a.serialize),d=()=>{let e,t=a.partialize({...i()}),r=u({state:t,version:a.version}).then((e=>o.setItem(a.name,e))).catch((t=>{e=t}));if(e)throw e;return r},h=n.setState;n.setState=(e,t)=>{h(e,t),d()};let p,f=e(((...e)=>{r(...e),d()}),i,n),g=()=>{var e;if(!o)return;s=!1,c.forEach((e=>e(i())));let t=(null==(e=a.onRehydrateStorage)?void 0:e.call(a,i()))||void 0;return T6(o.getItem.bind(o))(a.name).then((e=>{if(e)return a.deserialize(e)})).then((e=>{if(e){if("number"!=typeof e.version||e.version===a.version)return e.state;if(a.migrate)return a.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return p=a.merge(e,null!=(t=i())?t:f),r(p,!0),d()})).then((()=>{t?.(p,void 0),s=!0,l.forEach((e=>e(p)))})).catch((e=>{t?.(void 0,e)}))};return n.persist={setOptions:e=>{a={...a,...e},e.getStorage&&(o=e.getStorage())},clearStorage:()=>{o?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>g(),hasHydrated:()=>s,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},g(),p||f})(e,t)):((e,t)=>(r,i,n)=>{let o={storage:S6((()=>localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},a=!1,s=new Set,c=new Set,l=o.storage;if(!l)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...e)}),i,n);let u=()=>{let e=o.partialize({...i()});return l.setItem(o.name,{state:e,version:o.version})},d=n.setState;n.setState=(e,t)=>{d(e,t),u()};let h,p=e(((...e)=>{r(...e),u()}),i,n),f=()=>{var e,t;if(!l)return;a=!1,s.forEach((e=>{var t;return e(null!=(t=i())?t:p)}));let n=(null==(t=o.onRehydrateStorage)?void 0:t.call(o,null!=(e=i())?e:p))||void 0;return T6(l.getItem.bind(l))(o.name).then((e=>{if(e){if("number"!=typeof e.version||e.version===o.version)return e.state;if(o.migrate)return o.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return h=o.merge(e,null!=(t=i())?t:p),r(h,!0),u()})).then((()=>{n?.(h,void 0),h=i(),a=!0,c.forEach((e=>e(h)))})).catch((e=>{n?.(void 0,e)}))};return n.persist={setOptions:e=>{o={...o,...e},e.storage&&(l=e.storage)},clearStorage:()=>{l?.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>f(),hasHydrated:()=>a,onHydrate:e=>(s.add(e),()=>{s.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},o.skipHydration||f(),h||p})(e,t),R6={},N6=e=>{let t,r=new Set,i=(e,i)=>{let n="function"==typeof e?e(t):e;if(!Object.is(n,t)){let e=t;t=i??"object"!=typeof n?n:Object.assign({},t,n),r.forEach((r=>r(t,e)))}},n=()=>t,o={setState:i,getState:n,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{"production"!==(R6.env?R6.env.MODE:void 0)&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return t=e(i,n,o),o},M6=e=>e?N6(e):N6,$6=d(_S(),1),j6=function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)},L6=class{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:e}),A6.set(this,new $6.default)}on(e,t){j6(this,A6,"f").on(e,t)}once(e,t){j6(this,A6,"f").once(e,t)}off(e,t){j6(this,A6,"f").off(e,t)}emit(e,...t){let r=t[0];j6(this,A6,"f").emit(e,{uid:this.uid,...r})}listenerCount(e){return j6(this,A6,"f").listenerCount(e)}};function B6(e,t){return JSON.parse(e,((e,r)=>{let i=r;return"bigint"===i?.__type&&(i=BigInt(i.value)),"Map"===i?.__type&&(i=new Map(i.value)),t?.(e,i)??i}))}function D6(e,t){return e.slice(0,t).join(".")||"."}function U6(e,t){let{length:r}=e;for(let i=0;i<r;++i)if(e[i]===t)return i+1;return 0}function F6(e,t,r,i){return JSON.stringify(e,function(e,t){let r="function"==typeof e,i="function"==typeof t,n=[],o=[];return function(a,s){if("object"==typeof s)if(n.length){let e=U6(n,this);0===e?n[n.length]=this:(n.splice(e),o.splice(e)),o[o.length]=a;let r=U6(n,s);if(0!==r)return i?t.call(this,a,s,D6(o,r)):`[ref=${D6(o,r)}]`}else n[0]=s,o[0]=a;return r?e.call(this,a,s):s}}(((e,r)=>{let i=r;return"bigint"==typeof i&&(i={__type:"bigint",value:r.toString()}),i instanceof Map&&(i={__type:"Map",value:Array.from(r.entries())}),t?.(e,i)??i}),i),r??void 0)}function H6(e){let{deserialize:t=B6,key:r="wagmi",serialize:i=F6,storage:n=z6}=e;function o(e){return e instanceof Promise?e.then((e=>e)).catch((()=>null)):e}return{...n,key:r,async getItem(e,i){let a=n.getItem(`${r}.${e}`),s=await o(a);return s?t(s)??null:i??null},async setItem(e,t){let a=`${r}.${e}`;null===t?await o(n.removeItem(a)):await o(n.setItem(a,i(t)))},async removeItem(e){await o(n.removeItem(`${r}.${e}`))}}}A6=new WeakMap;var z6={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};var q6,W6,V6="2.9.1",G6=function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)},Z6=class e extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return`@wagmi/core@${V6}`}constructor(t,r={}){super(),q6.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});let i=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,n=r.cause instanceof e&&r.cause.docsPath||r.docsPath;this.message=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...n?[`Docs: ${this.docsBaseUrl}${n}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...i?[`Details: ${i}`]:[],`Version: ${this.version}`].join("\n    "),r.cause&&(this.cause=r.cause),this.details=i,this.docsPath=n,this.metaMessages=r.metaMessages,this.shortMessage=t}walk(e){return G6(this,q6,"m",W6).call(this,this,e)}};q6=new WeakSet,W6=function e(t,r){return r?.(t)?t:t.cause?G6(this,q6,"m",e).call(this,t.cause,r):t};var K6=class extends Z6{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}},Y6=class extends Z6{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}},J6=class extends Z6{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}},Q6=class extends Z6{constructor({address:e,connector:t}){super(`Account "${e}" not found for connector "${t.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}},X6=class extends Z6{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}},e8=class extends Z6{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}},t8=/(rabby|trustwallet)/,r8={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider:e=>e?.coinbaseWalletExtension?e.coinbaseWalletExtension:n8(e,"isCoinbaseWallet")},metaMask:{id:"metaMask",name:"MetaMask",provider:e=>n8(e,(e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;let t=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPortal","isRabby","isTokenPocket","isTokenary","isZerion"];for(let r of t)if(e[r])return!1;return!0}))},phantom:{id:"phantom",name:"Phantom",provider:e=>e?.phantom?.ethereum?e.phantom?.ethereum:n8(e,"isPhantom")}};function i8(e={}){let t,r,i,n,{shimDisconnect:o=!0,unstable_shimAsyncInject:a}=e;function s(){let t=e.target;if("function"==typeof t){let e=t();if(e)return e}return"object"==typeof t?t:"string"==typeof t?{...r8[t]??{id:t,name:`${t[0].toUpperCase()}${t.slice(1)}`,provider:`is${t[0].toUpperCase()}${t.slice(1)}`}}:{id:"injected",name:"Injected",provider:e=>e?.ethereum}}return c=>({get icon(){return s().icon},get id(){return s().id},get name(){return s().name},get supportsSimulation(){return t8.test(this.id)},type:i8.type,async setup(){let r=await this.getProvider();r&&e.target&&(i||(i=this.onConnect.bind(this),r.on("connect",i)),t||(t=this.onAccountsChanged.bind(this),r.on("accountsChanged",t)))},async connect({chainId:a,isReconnecting:s}={}){let l=await this.getProvider();if(!l)throw new X6;let u=[];if(s)u=await this.getAccounts().catch((()=>[]));else if(o)try{u=(await l.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0]?.caveats?.[0]?.value?.map((e=>HC(e)))}catch(e){let t=e;if(t.code===oP.code)throw new oP(t);if(t.code===eP.code)throw t}try{!u?.length&&!s&&(u=(await l.request({method:"eth_requestAccounts"})).map((e=>HC(e)))),i&&(l.removeListener("connect",i),i=void 0),t||(t=this.onAccountsChanged.bind(this),l.on("accountsChanged",t)),r||(r=this.onChainChanged.bind(this),l.on("chainChanged",r)),n||(n=this.onDisconnect.bind(this),l.on("disconnect",n));let d=await this.getChainId();return a&&d!==a&&(d=(await this.switchChain({chainId:a}).catch((e=>{if(e.code===oP.code)throw e;return{id:d}})))?.id??d),o&&await(c.storage?.removeItem(`${this.id}.disconnected`)),e.target||await(c.storage?.setItem("injected.connected",!0)),{accounts:u,chainId:d}}catch(e){let t=e;throw t.code===oP.code?new oP(t):t.code===eP.code?new eP(t):t}},async disconnect(){let t=await this.getProvider();if(!t)throw new X6;r&&(t.removeListener("chainChanged",r),r=void 0),n&&(t.removeListener("disconnect",n),n=void 0),i||(i=this.onConnect.bind(this),t.on("connect",i)),o&&await(c.storage?.setItem(`${this.id}.disconnected`,!0)),e.target||await(c.storage?.removeItem("injected.connected"))},async getAccounts(){let e=await this.getProvider();if(!e)throw new X6;return(await e.request({method:"eth_accounts"})).map((e=>HC(e)))},async getChainId(){let e=await this.getProvider();if(!e)throw new X6;let t=await e.request({method:"eth_chainId"});return Number(t)},async getProvider(){if(typeof window>"u")return;let e,t=s();return e="function"==typeof t.provider?t.provider(window):"string"==typeof t.provider?n8(window,t.provider):t.provider,e&&!e.removeListener&&("off"in e&&"function"==typeof e.off?e.removeListener=e.off:e.removeListener=()=>{}),e},async isAuthorized(){try{if(o&&await(c.storage?.getItem(`${this.id}.disconnected`))||!e.target&&!await(c.storage?.getItem("injected.connected")))return!1;if(!await this.getProvider()){if(void 0!==a&&!1!==a){let e=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",e),!!await this.getProvider()),t="number"==typeof a?a:1e3;if(await Promise.race([...typeof window<"u"?[new Promise((t=>window.addEventListener("ethereum#initialized",(()=>t(e())),{once:!0})))]:[],new Promise((r=>setTimeout((()=>r(e())),t)))]))return!0}throw new X6}return!!(await h6((()=>f6((()=>this.getAccounts()),{timeout:100})))).length}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:t}){let r=await this.getProvider();if(!r)throw new X6;let i=c.chains.find((e=>e.id===t));if(!i)throw new uP(new K6);try{return await Promise.all([r.request({method:"wallet_switchEthereumChain",params:[{chainId:kE(t)}]}).then((async()=>{await this.getChainId()===t&&c.emitter.emit("change",{chainId:t})})),new Promise((e=>c.emitter.once("change",(({chainId:r})=>{r===t&&e()}))))]),i}catch(n){let o=n;if(4902===o.code||4902===o?.data?.originalError?.code)try{let n,o,{default:a,...s}=i.blockExplorers??{};e?.blockExplorerUrls?n=e.blockExplorerUrls:a&&(n=[a.url,...Object.values(s).map((e=>e.url))]),o=e?.rpcUrls?.length?e.rpcUrls:[i.rpcUrls.default?.http[0]??""];let c={blockExplorerUrls:n,chainId:kE(t),chainName:e?.chainName??i.name,iconUrls:e?.iconUrls,nativeCurrency:e?.nativeCurrency??i.nativeCurrency,rpcUrls:o};if(await r.request({method:"wallet_addEthereumChain",params:[c]}),await this.getChainId()!==t)throw new oP(new Error("User rejected switch after adding network."));return i}catch(e){throw new oP(e)}throw o.code===oP.code?new oP(o):new uP(o)}},async onAccountsChanged(e){if(0===e.length)this.onDisconnect();else if(c.emitter.listenerCount("connect")){let e=(await this.getChainId()).toString();this.onConnect({chainId:e}),o&&await(c.storage?.removeItem(`${this.id}.disconnected`))}else c.emitter.emit("change",{accounts:e.map((e=>HC(e)))})},onChainChanged(e){let t=Number(e);c.emitter.emit("change",{chainId:t})},async onConnect(e){let o=await this.getAccounts();if(0===o.length)return;let a=Number(e.chainId);c.emitter.emit("connect",{accounts:o,chainId:a});let s=await this.getProvider();s&&(i&&(s.removeListener("connect",i),i=void 0),t||(t=this.onAccountsChanged.bind(this),s.on("accountsChanged",t)),r||(r=this.onChainChanged.bind(this),s.on("chainChanged",r)),n||(n=this.onDisconnect.bind(this),s.on("disconnect",n)))},async onDisconnect(e){let t=await this.getProvider();e&&1013===e.code&&t&&(await this.getAccounts()).length||(c.emitter.emit("disconnect"),t&&(r&&(t.removeListener("chainChanged",r),r=void 0),n&&(t.removeListener("disconnect",n),n=void 0),i||(i=this.onConnect.bind(this),t.on("connect",i))))}})}function n8(e,t){function r(e){return"function"==typeof t?t(e):"string"!=typeof t||e[t]}let i=e.ethereum;return i?.providers?i.providers.find((e=>r(e))):i&&r(i)?i:void 0}i8.type="injected";var o8,a8=256;function s8(e,t,r){let i=e[t.name];if("function"==typeof i)return i;let n=e[r];return"function"==typeof n?n:r=>t(e,r)}async function c8(e,t){let r;if(r="function"==typeof t.connector?e._internal.connectors.setup(t.connector):t.connector,r.uid===e.state.current)throw new Y6;try{e.setState((e=>({...e,status:"connecting"}))),r.emitter.emit("message",{type:"connecting"});let i=await r.connect({chainId:t.chainId}),n=i.accounts;return r.emitter.off("connect",e._internal.events.connect),r.emitter.on("change",e._internal.events.change),r.emitter.on("disconnect",e._internal.events.disconnect),await(e.storage?.setItem("recentConnectorId",r.id)),e.setState((e=>({...e,connections:new Map(e.connections).set(r.uid,{accounts:n,chainId:i.chainId,connector:r}),current:r.uid,status:"connected"}))),{accounts:n,chainId:i.chainId}}catch(t){throw e.setState((e=>({...e,status:e.current?"connected":"disconnected"}))),t}}async function l8(e,t={}){let r;if(t.connector)r=t.connector;else{let{connections:t,current:i}=e.state;r=t.get(i)?.connector}let i=e.state.connections;r&&(await r.disconnect(),r.emitter.off("change",e._internal.events.change),r.emitter.off("disconnect",e._internal.events.disconnect),r.emitter.on("connect",e._internal.events.connect),i.delete(r.uid)),e.setState((e=>{if(0===i.size)return{...e,connections:new Map,current:null,status:"disconnected"};let t=i.values().next().value;return{...e,connections:new Map(i),current:t.connector.uid}}));{let t=e.state.current;if(!t)return;let r=e.state.connections.get(t)?.connector;if(!r)return;await(e.storage?.setItem("recentConnectorId",r.id))}}async function u8(e,t={}){let r;if(t.connector){let{connector:e}=t,[i,n]=await Promise.all([e.getAccounts(),e.getChainId()]);r={accounts:i,chainId:n,connector:e}}else r=e.state.connections.get(e.state.current);if(!r)throw new J6;let i=t.chainId??r.chainId,n=r.connector;if(n.getClient)return n.getClient({chainId:i});let o=nk(t.account??r.accounts[0]);o.address=HC(o.address);let a=e.chains.find((e=>e.id===i)),s=await r.connector.getProvider({chainId:i});if(t.account&&!r.accounts.includes(o.address))throw new Q6({address:o.address,connector:n});return E6({account:o,chain:a,name:"Connector Client",transport:e=>function(e,t={}){let{key:r="custom",name:i="Custom Provider",retryDelay:n}=t;return({retryCount:o})=>C6({key:r,name:i,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:n,type:"custom"})}(s)({...e,retryCount:0})})}function d8(e){return"number"==typeof e?e:"wei"===e?0:Math.abs(dk[e])}function h8(e){let t=e.state.current,r=e.state.connections.get(t),i=r?.accounts,n=i?.[0],o=e.chains.find((e=>e.id===r?.chainId)),a=e.state.status;switch(a){case"connected":return{address:n,addresses:i,chain:o,chainId:r?.chainId,connector:r?.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:a};case"reconnecting":return{address:n,addresses:i,chain:o,chainId:r?.chainId,connector:r?.connector,isConnected:!!n,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:a};case"connecting":return{address:n,addresses:i,chain:o,chainId:r?.chainId,connector:r?.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:a};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:a}}}async function p8(e,t){let{allowFailure:r=!0,blockNumber:i,blockTag:n,...o}=t,a=t.contracts;try{let t=a.reduce(((t,r,i)=>{let n=r.chainId??e.state.chainId;return{...t,[n]:[...t[n]||[],{contract:r,index:i}]}}),{}),s=()=>Object.entries(t).map((([t,a])=>async function(e,t){let{allowFailure:r=!0,chainId:i,contracts:n,...o}=t;return s8(e.getClient({chainId:i}),o6,"multicall")({allowFailure:r,contracts:n,...o})}(e,{...o,allowFailure:r,blockNumber:i,blockTag:n,chainId:parseInt(t),contracts:a.map((({contract:e})=>e))}))),c=(await Promise.all(s())).flat(),l=Object.values(t).flatMap((e=>e.map((({index:e})=>e))));return c.reduce(((e,t,r)=>(e&&(e[l[r]]=t),e)),[])}catch(t){if(t instanceof ZI)throw t;let o=()=>a.map((t=>function(e,t){let{chainId:r,...i}=t;return s8(e.getClient({chainId:r}),R4,"readContract")(i)}(e,{...t,blockNumber:i,blockTag:n})));return r?(await Promise.allSettled(o())).map((e=>"fulfilled"===e.status?{result:e.value,status:"success"}:{error:e.reason,result:void 0,status:"failure"})):await Promise.all(o())}}async function f8(e,t){let{balanceAddress:r,chainId:i,symbolType:n,tokenAddress:o,unit:a}=t,s={abi:[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:n}]}],address:o},[c,l,u]=await p8(e,{allowFailure:!1,contracts:[{...s,functionName:"balanceOf",args:[r],chainId:i},{...s,functionName:"decimals",chainId:i},{...s,functionName:"symbol",chainId:i}]});return{decimals:l,formatted:gk(c??"0",d8(a??l)),symbol:u,value:c}}function g8(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;let r,i;if(Array.isArray(e)&&Array.isArray(t)){if(r=e.length,r!==t.length)return!1;for(i=r;0!=i--;)if(!g8(e[i],t[i]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();let n=Object.keys(e);if(r=n.length,r!==Object.keys(t).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(i=r;0!=i--;){let r=n[i];if(r&&!g8(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function m8(e,t){let{onChange:r}=t;return e.subscribe((()=>h8(e)),r,{equalityFn(e,t){let{connector:r,...i}=e,{connector:n,...o}=t;return g8(i,o)&&r?.id===n?.id&&r?.uid===n?.uid}})}var b8,y8=(b8={id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cloudflare-eth.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}},{formatters:void 0,fees:void 0,serializers:void 0,...b8});cO(),Nz(),Iq(),bW(),Cq();var w8=e=>e??sq,v8=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},_8=class extends xq{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance="show",this.charsStart=4,this.charsEnd=6,this.address=eT.state.address,this.balanceVal=eT.state.balance,this.balanceSymbol=eT.state.balanceSymbol,this.profileName=eT.state.profileName,this.profileImage=eT.state.profileImage,this.network=GA.state.caipNetwork,this.isUnsupportedChain=GA.state.isUnsupportedChain,this.unsubscribe.push(eT.subscribe((e=>{e.isConnected?(this.address=e.address,this.balanceVal=e.balance,this.profileName=e.profileName,this.profileImage=e.profileImage,this.balanceSymbol=e.balanceSymbol):(this.address="",this.balanceVal="",this.profileName="",this.profileImage="",this.balanceSymbol="")})),GA.subscribeKey("caipNetwork",(e=>this.network=e)),GA.subscribeKey("isUnsupportedChain",(e=>this.isUnsupportedChain=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){let e=wT.getNetworkImage(this.network),t="show"===this.balance;return oq`
          <wui-account-button
            .disabled=${!!this.disabled}
            .isUnsupportedChain=${this.isUnsupportedChain}
            address=${w8(this.address)}
            profileName=${w8(this.profileName)}
            ?isProfileName=${!!this.profileName}
            networkSrc=${w8(e)}
            avatarSrc=${w8(this.profileImage)}
            balance=${t?PS.formatBalance(this.balanceVal,this.balanceSymbol):""}
            @click=${this.onClick.bind(this)}
            data-testid="account-button"
            .charsStart=${this.charsStart}
            .charsEnd=${this.charsEnd}
          >
          </wui-account-button>
        `}onClick(){this.isUnsupportedChain?hT.open({view:"UnsupportedChain"}):hT.open()}};v8([Aq({type:Boolean})],_8.prototype,"disabled",void 0),v8([Aq()],_8.prototype,"balance",void 0),v8([Aq()],_8.prototype,"charsStart",void 0),v8([Aq()],_8.prototype,"charsEnd",void 0),v8([Nq()],_8.prototype,"address",void 0),v8([Nq()],_8.prototype,"balanceVal",void 0),v8([Nq()],_8.prototype,"balanceSymbol",void 0),v8([Nq()],_8.prototype,"profileName",void 0),v8([Nq()],_8.prototype,"profileImage",void 0),v8([Nq()],_8.prototype,"network",void 0),v8([Nq()],_8.prototype,"isUnsupportedChain",void 0),_8=v8([wR("w3m-account-button")],_8),cO(),Nz(),Iq(),bW(),Iq();var x8=gz`
      :host {
        display: block;
        width: max-content;
      }
    `,E8=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},C8=class extends xq{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance=void 0,this.size=void 0,this.label=void 0,this.loadingLabel=void 0,this.charsStart=4,this.charsEnd=6,this.isAccount=eT.state.isConnected,this.unsubscribe.push(eT.subscribeKey("isConnected",(e=>{this.isAccount=e})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return this.isAccount?oq`
              <w3m-account-button
                .disabled=${!!this.disabled}
                balance=${w8(this.balance)}
                .charsStart=${w8(this.charsStart)}
                .charsEnd=${w8(this.charsEnd)}
              >
              </w3m-account-button>
            `:oq`
              <w3m-connect-button
                size=${w8(this.size)}
                label=${w8(this.label)}
                loadingLabel=${w8(this.loadingLabel)}
              ></w3m-connect-button>
            `}};C8.styles=x8,E8([Aq({type:Boolean})],C8.prototype,"disabled",void 0),E8([Aq()],C8.prototype,"balance",void 0),E8([Aq()],C8.prototype,"size",void 0),E8([Aq()],C8.prototype,"label",void 0),E8([Aq()],C8.prototype,"loadingLabel",void 0),E8([Aq()],C8.prototype,"charsStart",void 0),E8([Aq()],C8.prototype,"charsEnd",void 0),E8([Nq()],C8.prototype,"isAccount",void 0),C8=E8([wR("w3m-button")],C8),cO(),Nz(),Iq(),bW();var k8=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},P8=class extends xq{constructor(){super(),this.unsubscribe=[],this.size="md",this.label="Connect Wallet",this.loadingLabel="Connecting...",this.open=hT.state.open,this.loading=hT.state.loading,this.unsubscribe.push(hT.subscribe((e=>{this.open=e.open,this.loading=e.loading})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){let e=this.loading||this.open;return oq`
          <wui-connect-button
            size=${w8(this.size)}
            .loading=${e}
            @click=${this.onClick.bind(this)}
            data-testid="connect-button"
          >
            ${e?this.loadingLabel:this.label}
          </wui-connect-button>
        `}onClick(){this.open?hT.close():this.loading||hT.open()}};k8([Aq()],P8.prototype,"size",void 0),k8([Aq()],P8.prototype,"label",void 0),k8([Aq()],P8.prototype,"loadingLabel",void 0),k8([Nq()],P8.prototype,"open",void 0),k8([Nq()],P8.prototype,"loading",void 0),P8=k8([wR("w3m-connect-button")],P8),qV(),cO(),Nz(),Iq(),bW(),Iq();var I8=gz`
      :host {
        display: block;
        width: max-content;
      }
    `,S8=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},A8=class extends xq{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.network=GA.state.caipNetwork,this.connected=eT.state.isConnected,this.loading=hT.state.loading,this.isUnsupportedChain=GA.state.isUnsupportedChain,this.unsubscribe.push(GA.subscribeKey("caipNetwork",(e=>this.network=e)),eT.subscribeKey("isConnected",(e=>this.connected=e)),hT.subscribeKey("loading",(e=>this.loading=e)),GA.subscribeKey("isUnsupportedChain",(e=>this.isUnsupportedChain=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return oq`
          <wui-network-button
            .disabled=${!(!this.disabled&&!this.loading)}
            .isUnsupportedChain=${this.isUnsupportedChain}
            imageSrc=${w8(wT.getNetworkImage(this.network))}
            @click=${this.onClick.bind(this)}
          >
            ${this.isUnsupportedChain?"Switch Network":this.network?.name??(this.connected?"Unknown Network":"Select Network")}
          </wui-network-button>
        `}onClick(){this.loading||(WS.sendEvent({type:"track",event:"CLICK_NETWORKS"}),hT.open({view:"Networks"}))}};A8.styles=I8,S8([Aq({type:Boolean})],A8.prototype,"disabled",void 0),S8([Nq()],A8.prototype,"network",void 0),S8([Nq()],A8.prototype,"connected",void 0),S8([Nq()],A8.prototype,"loading",void 0),S8([Nq()],A8.prototype,"isUnsupportedChain",void 0),A8=S8([wR("w3m-network-button")],A8),cO(),Nz(),Iq(),bW(),Iq();var T8=gz`
      :host {
        display: block;
        will-change: transform, opacity;
      }
    `,O8=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},R8=class extends xq{constructor(){super(),this.resizeObserver=void 0,this.prevHeight="0px",this.prevHistoryLength=1,this.unsubscribe=[],this.view=YA.state.view,this.unsubscribe.push(YA.subscribeKey("view",(e=>this.onViewChange(e))))}firstUpdated(){this.resizeObserver=new ResizeObserver((async([e])=>{let t=`${e?.contentRect.height}px`;"0px"!==this.prevHeight&&(await this.animate([{height:this.prevHeight},{height:t}],{duration:150,easing:"ease",fill:"forwards"}).finished,this.style.height="auto"),this.prevHeight=t})),this.resizeObserver.observe(this.getWrapper())}disconnectedCallback(){this.resizeObserver?.unobserve(this.getWrapper()),this.unsubscribe.forEach((e=>e()))}render(){return oq`<div>${this.viewTemplate()}</div>`}viewTemplate(){switch(this.view){case"Connect":default:return oq`<w3m-connect-view></w3m-connect-view>`;case"ConnectingWalletConnect":return oq`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;case"ConnectingExternal":return oq`<w3m-connecting-external-view></w3m-connecting-external-view>`;case"ConnectingSiwe":return oq`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;case"AllWallets":return oq`<w3m-all-wallets-view></w3m-all-wallets-view>`;case"Networks":return oq`<w3m-networks-view></w3m-networks-view>`;case"SwitchNetwork":return oq`<w3m-network-switch-view></w3m-network-switch-view>`;case"Account":return oq`<w3m-account-view></w3m-account-view>`;case"AccountSettings":return oq`<w3m-account-settings-view></w3m-account-settings-view>`;case"WhatIsAWallet":return oq`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;case"WhatIsANetwork":return oq`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;case"GetWallet":return oq`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"Downloads":return oq`<w3m-downloads-view></w3m-downloads-view>`;case"EmailVerifyOtp":return oq`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;case"EmailVerifyDevice":return oq`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;case"ApproveTransaction":return oq`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;case"Transactions":return oq`<w3m-transactions-view></w3m-transactions-view>`;case"UpgradeEmailWallet":return oq`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;case"UpgradeToSmartAccount":return oq`<w3m-upgrade-to-smart-account-view></w3m-upgrade-to-smart-account-view>`;case"UpdateEmailWallet":return oq`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;case"UpdateEmailPrimaryOtp":return oq`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;case"UpdateEmailSecondaryOtp":return oq`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;case"UnsupportedChain":return oq`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;case"OnRampProviders":return oq`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;case"OnRampActivity":return oq`<w3m-onramp-activity-view></w3m-onramp-activity-view>`;case"OnRampTokenSelect":return oq`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;case"OnRampFiatSelect":return oq`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;case"WhatIsABuy":return oq`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;case"BuyInProgress":return oq`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;case"WalletReceive":return oq`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;case"WalletCompatibleNetworks":return oq`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;case"Convert":return oq`<w3m-convert-view></w3m-convert-view>`;case"ConvertSelectToken":return oq`<w3m-convert-select-token-view></w3m-convert-select-token-view>`;case"ConvertPreview":return oq`<w3m-convert-preview-view></w3m-convert-preview-view>`;case"WalletSend":return oq`<w3m-wallet-send-view></w3m-wallet-send-view>`;case"WalletSendSelectToken":return oq`<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;case"WalletSendPreview":return oq`<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`}}async onViewChange(e){let{history:t}=YA.state,r=-10,i=10;t.length<this.prevHistoryLength&&(r=10,i=-10),this.prevHistoryLength=t.length,await this.animate([{opacity:1,transform:"translateX(0px)"},{opacity:0,transform:`translateX(${r}px)`}],{duration:150,easing:"ease",fill:"forwards"}).finished,this.view=e,await this.animate([{opacity:0,transform:`translateX(${i}px)`},{opacity:1,transform:"translateX(0px)"}],{duration:150,easing:"ease",fill:"forwards",delay:50}).finished}getWrapper(){return this.shadowRoot?.querySelector("div")}};R8.styles=T8,O8([Nq()],R8.prototype,"view",void 0),R8=O8([wR("w3m-router")],R8),cO(),Nz(),Iq(),bW(),Iq();var N8=gz`
      :host > wui-flex {
        width: 100%;
        max-width: 360px;
      }
    
      :host > wui-flex > wui-flex {
        border-radius: var(--wui-border-radius-l);
        width: 100%;
      }
    
      .amounts-container {
        width: 100%;
      }
    `,M8=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},$8={USD:"$",EUR:"€",GBP:"£"},j8=[100,250,500,1e3],L8=class extends xq{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.connected=eT.state.isConnected,this.loading=hT.state.loading,this.paymentCurrency=mT.state.paymentCurrency,this.paymentAmount=mT.state.paymentAmount,this.purchaseAmount=mT.state.purchaseAmount,this.quoteLoading=mT.state.quotesLoading,this.unsubscribe.push(eT.subscribeKey("isConnected",(e=>{this.connected=e})),hT.subscribeKey("loading",(e=>{this.loading=e})),mT.subscribe((e=>{this.paymentCurrency=e.paymentCurrency,this.paymentAmount=e.paymentAmount,this.purchaseAmount=e.purchaseAmount,this.quoteLoading=e.quotesLoading})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return oq`
          <wui-flex flexDirection="column" justifyContent="center" alignItems="center">
            <wui-flex flexDirection="column" alignItems="center" gap="xs">
              <w3m-swap-input
                type="Fiat"
                @inputChange=${this.onPaymentAmountChange.bind(this)}
                .value=${this.paymentAmount||0}
              ></w3m-swap-input>
              <w3m-swap-input
                type="Token"
                .value=${this.purchaseAmount||0}
                .loading=${this.quoteLoading}
              ></w3m-swap-input>
              <wui-flex justifyContent="space-evenly" class="amounts-container" gap="xs">
                ${j8.map((e=>oq`<wui-button
                      variant=${this.paymentAmount===e?"accentBg":"shade"}
                      size="xs"
                      textVariant="paragraph-600"
                      fullWidth
                      @click=${()=>this.selectPresetAmount(e)}
                      >${`${$8[this.paymentCurrency?.id||"USD"]} ${e}`}</wui-button
                    >`))}
              </wui-flex>
              ${this.templateButton()}
            </wui-flex>
          </wui-flex>
        `}templateButton(){return this.connected?oq`<wui-button
              @click=${this.getQuotes.bind(this)}
              variant="fill"
              fullWidth
              size="lg"
              borderRadius="xs"
            >
              Get quotes
            </wui-button>`:oq`<wui-button
              @click=${this.openModal.bind(this)}
              variant="accentBg"
              fullWidth
              size="lg"
              borderRadius="xs"
            >
              Connect wallet
            </wui-button>`}getQuotes(){this.loading||hT.open({view:"OnRampProviders"})}openModal(){hT.open({view:"Connect"})}async onPaymentAmountChange(e){mT.setPaymentAmount(Number(e.detail)),await mT.getQuote()}async selectPresetAmount(e){mT.setPaymentAmount(e),await mT.getQuote()}};L8.styles=N8,M8([Aq({type:Boolean})],L8.prototype,"disabled",void 0),M8([Nq()],L8.prototype,"connected",void 0),M8([Nq()],L8.prototype,"loading",void 0),M8([Nq()],L8.prototype,"paymentCurrency",void 0),M8([Nq()],L8.prototype,"paymentAmount",void 0),M8([Nq()],L8.prototype,"purchaseAmount",void 0),M8([Nq()],L8.prototype,"quoteLoading",void 0),L8=M8([wR("w3m-onramp-widget")],L8),cO(),Nz(),Iq(),bW(),Iq();var B8=gz`
      wui-flex {
        width: 100%;
      }
    
      wui-icon-link {
        margin-right: calc(var(--wui-icon-box-size-md) * -1);
      }
    
      .account-links {
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
    
      .account-links wui-flex {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 1;
        background: red;
        align-items: center;
        justify-content: center;
        height: 48px;
        padding: 10px;
        flex: 1 0 0;
    
        border-radius: var(--XS, 16px);
        border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));
        background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));
        transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
        will-change: background-color;
      }
    
      .account-links wui-flex:hover {
        background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15));
      }
    
      .account-links wui-flex wui-icon {
        width: var(--S, 20px);
        height: var(--S, 20px);
      }
    
      .account-links wui-flex wui-icon svg path {
        stroke: #47a1ff;
      }
    `,D8=d(GV(),1);typeof window<"u"&&(window.Buffer||(window.Buffer=D8.Buffer),window.global||(window.global=window),window.process||(window.process={}),window.process?.env||(window.process={env:{}}));process.env.NEXT_PUBLIC_SECURE_SITE_SDK_URL;var U8,F8,H8={APP_EVENT_KEY:"@w3m-app/",FRAME_EVENT_KEY:"@w3m-frame/",RPC_METHOD_KEY:"RPC_",STORAGE_KEY:"@w3m-storage/",SESSION_TOKEN_KEY:"SESSION_TOKEN_KEY",EMAIL_LOGIN_USED_KEY:"EMAIL_LOGIN_USED_KEY",LAST_USED_CHAIN_KEY:"LAST_USED_CHAIN_KEY",LAST_EMAIL_LOGIN_TIME:"LAST_EMAIL_LOGIN_TIME",EMAIL:"EMAIL",PREFERRED_ACCOUNT_TYPE:"PREFERRED_ACCOUNT_TYPE",SMART_ACCOUNT_ENABLED:"SMART_ACCOUNT_ENABLED",SMART_ACCOUNT_ENABLED_NETWORKS:"SMART_ACCOUNT_ENABLED_NETWORKS",APP_SWITCH_NETWORK:"@w3m-app/SWITCH_NETWORK",APP_CONNECT_EMAIL:"@w3m-app/CONNECT_EMAIL",APP_CONNECT_DEVICE:"@w3m-app/CONNECT_DEVICE",APP_CONNECT_OTP:"@w3m-app/CONNECT_OTP",APP_GET_USER:"@w3m-app/GET_USER",APP_SIGN_OUT:"@w3m-app/SIGN_OUT",APP_IS_CONNECTED:"@w3m-app/IS_CONNECTED",APP_GET_CHAIN_ID:"@w3m-app/GET_CHAIN_ID",APP_RPC_REQUEST:"@w3m-app/RPC_REQUEST",APP_UPDATE_EMAIL:"@w3m-app/UPDATE_EMAIL",APP_UPDATE_EMAIL_PRIMARY_OTP:"@w3m-app/UPDATE_EMAIL_PRIMARY_OTP",APP_UPDATE_EMAIL_SECONDARY_OTP:"@w3m-app/UPDATE_EMAIL_SECONDARY_OTP",APP_AWAIT_UPDATE_EMAIL:"@w3m-app/AWAIT_UPDATE_EMAIL",APP_SYNC_THEME:"@w3m-app/SYNC_THEME",APP_SYNC_DAPP_DATA:"@w3m-app/SYNC_DAPP_DATA",APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS:"@w3m-app/GET_SMART_ACCOUNT_ENABLED_NETWORKS",APP_INIT_SMART_ACCOUNT:"@w3m-app/INIT_SMART_ACCOUNT",APP_SET_PREFERRED_ACCOUNT:"@w3m-app/SET_PREFERRED_ACCOUNT",FRAME_SWITCH_NETWORK_ERROR:"@w3m-frame/SWITCH_NETWORK_ERROR",FRAME_SWITCH_NETWORK_SUCCESS:"@w3m-frame/SWITCH_NETWORK_SUCCESS",FRAME_CONNECT_EMAIL_ERROR:"@w3m-frame/CONNECT_EMAIL_ERROR",FRAME_CONNECT_EMAIL_SUCCESS:"@w3m-frame/CONNECT_EMAIL_SUCCESS",FRAME_CONNECT_DEVICE_ERROR:"@w3m-frame/CONNECT_DEVICE_ERROR",FRAME_CONNECT_DEVICE_SUCCESS:"@w3m-frame/CONNECT_DEVICE_SUCCESS",FRAME_CONNECT_OTP_SUCCESS:"@w3m-frame/CONNECT_OTP_SUCCESS",FRAME_CONNECT_OTP_ERROR:"@w3m-frame/CONNECT_OTP_ERROR",FRAME_GET_USER_SUCCESS:"@w3m-frame/GET_USER_SUCCESS",FRAME_GET_USER_ERROR:"@w3m-frame/GET_USER_ERROR",FRAME_SIGN_OUT_SUCCESS:"@w3m-frame/SIGN_OUT_SUCCESS",FRAME_SIGN_OUT_ERROR:"@w3m-frame/SIGN_OUT_ERROR",FRAME_IS_CONNECTED_SUCCESS:"@w3m-frame/IS_CONNECTED_SUCCESS",FRAME_IS_CONNECTED_ERROR:"@w3m-frame/IS_CONNECTED_ERROR",FRAME_GET_CHAIN_ID_SUCCESS:"@w3m-frame/GET_CHAIN_ID_SUCCESS",FRAME_GET_CHAIN_ID_ERROR:"@w3m-frame/GET_CHAIN_ID_ERROR",FRAME_RPC_REQUEST_SUCCESS:"@w3m-frame/RPC_REQUEST_SUCCESS",FRAME_RPC_REQUEST_ERROR:"@w3m-frame/RPC_REQUEST_ERROR",FRAME_SESSION_UPDATE:"@w3m-frame/SESSION_UPDATE",FRAME_UPDATE_EMAIL_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SUCCESS",FRAME_UPDATE_EMAIL_ERROR:"@w3m-frame/UPDATE_EMAIL_ERROR",FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_ERROR",FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_ERROR",FRAME_SYNC_THEME_SUCCESS:"@w3m-frame/SYNC_THEME_SUCCESS",FRAME_SYNC_THEME_ERROR:"@w3m-frame/SYNC_THEME_ERROR",FRAME_SYNC_DAPP_DATA_SUCCESS:"@w3m-frame/SYNC_DAPP_DATA_SUCCESS",FRAME_SYNC_DAPP_DATA_ERROR:"@w3m-frame/SYNC_DAPP_DATA_ERROR",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR",FRAME_INIT_SMART_ACCOUNT_SUCCESS:"@w3m-frame/INIT_SMART_ACCOUNT_SUCCESS",FRAME_INIT_SMART_ACCOUNT_ERROR:"@w3m-frame/INIT_SMART_ACCOUNT_ERROR",FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:"@w3m-frame/SET_PREFERRED_ACCOUNT_SUCCESS",FRAME_SET_PREFERRED_ACCOUNT_ERROR:"@w3m-frame/SET_PREFERRED_ACCOUNT_ERROR",RPC_RESPONSE_TYPE_ERROR:"RPC_RESPONSE_ERROR",RPC_RESPONSE_TYPE_TX:"RPC_RESPONSE_TRANSACTION_HASH",RPC_RESPONSE_TYPE_OBJECT:"RPC_RESPONSE_OBJECT"},z8={SAFE_RPC_METHODS:["eth_accounts","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getAccount","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockReceipts","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_maxPriorityFeePerGas","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter"],NOT_SAFE_RPC_METHODS:["personal_sign","eth_signTypedData_v4","eth_sendTransaction"],GET_CHAIN_ID:"eth_chainId",RPC_METHOD_NOT_ALLOWED_MESSAGE:"Requested RPC call is not allowed",RPC_METHOD_NOT_ALLOWED_UI_MESSAGE:"Action not allowed",ACCOUNT_TYPES:{EOA:"eoa",SMART_ACCOUNT:"smartAccount"}};!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},e.getValidEnumValues=t=>{let r=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),i={};for(let e of r)i[e]=t[e];return e.objectValues(i)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(let r of e)if(t(r))return r},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(U8||(U8={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(F8||(F8={}));var q8=U8.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),W8=e=>{switch(typeof e){case"undefined":return q8.undefined;case"string":return q8.string;case"number":return isNaN(e)?q8.nan:q8.number;case"boolean":return q8.boolean;case"function":return q8.function;case"bigint":return q8.bigint;case"symbol":return q8.symbol;case"object":return Array.isArray(e)?q8.array:null===e?q8.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?q8.promise:typeof Map<"u"&&e instanceof Map?q8.map:typeof Set<"u"&&e instanceof Set?q8.set:typeof Date<"u"&&e instanceof Date?q8.date:q8.object;default:return q8.unknown}},V8=U8.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),G8=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},r={_errors:[]},i=e=>{for(let n of e.issues)if("invalid_union"===n.code)n.unionErrors.map(i);else if("invalid_return_type"===n.code)i(n.returnTypeError);else if("invalid_arguments"===n.code)i(n.argumentsError);else if(0===n.path.length)r._errors.push(t(n));else{let e=r,i=0;for(;i<n.path.length;){let r=n.path[i];i===n.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(n))):e[r]=e[r]||{_errors:[]},e=e[r],i++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,U8.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){let t={},r=[];for(let i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}};G8.create=e=>new G8(e);var Z8=(e,t)=>{let r;switch(e.code){case V8.invalid_type:r=e.received===q8.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case V8.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,U8.jsonStringifyReplacer)}`;break;case V8.unrecognized_keys:r=`Unrecognized key(s) in object: ${U8.joinValues(e.keys,", ")}`;break;case V8.invalid_union:r="Invalid input";break;case V8.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${U8.joinValues(e.options)}`;break;case V8.invalid_enum_value:r=`Invalid enum value. Expected ${U8.joinValues(e.options)}, received '${e.received}'`;break;case V8.invalid_arguments:r="Invalid function arguments";break;case V8.invalid_return_type:r="Invalid function return type";break;case V8.invalid_date:r="Invalid date";break;case V8.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:U8.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case V8.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case V8.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case V8.custom:r="Invalid input";break;case V8.invalid_intersection_types:r="Intersection results could not be merged";break;case V8.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case V8.not_finite:r="Number must be finite";break;default:r=t.defaultError,U8.assertNever(e)}return{message:r}},K8=Z8;function Y8(){return K8}var J8=e=>{let{data:t,path:r,errorMaps:i,issueData:n}=e,o=[...r,...n.path||[]],a={...n,path:o},s="",c=i.filter((e=>!!e)).slice().reverse();for(let e of c)s=e(a,{data:t,defaultError:s}).message;return{...n,path:o,message:n.message||s}};function Q8(e,t){let r=J8({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Y8(),Z8].filter((e=>!!e))});e.common.issues.push(r)}var X8,e9=class e{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let i of t){if("aborted"===i.status)return t9;"dirty"===i.status&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(t,r){let i=[];for(let e of r)i.push({key:await e.key,value:await e.value});return e.mergeObjectSync(t,i)}static mergeObjectSync(e,t){let r={};for(let i of t){let{key:t,value:n}=i;if("aborted"===t.status||"aborted"===n.status)return t9;"dirty"===t.status&&e.dirty(),"dirty"===n.status&&e.dirty(),"__proto__"!==t.value&&(typeof n.value<"u"||i.alwaysSet)&&(r[t.value]=n.value)}return{status:e.value,value:r}}},t9=Object.freeze({status:"aborted"}),r9=e=>({status:"dirty",value:e}),i9=e=>({status:"valid",value:e}),n9=e=>"aborted"===e.status,o9=e=>"dirty"===e.status,a9=e=>"valid"===e.status,s9=e=>typeof Promise<"u"&&e instanceof Promise;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(X8||(X8={}));var c9=class{constructor(e,t,r,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},l9=(e,t)=>{if(a9(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new G8(e.common.issues);return this._error=t,this._error}}};function u9(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:i,description:n}=e;if(t&&(r||i))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:n}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:typeof t.data>"u"?{message:i??t.defaultError}:{message:r??t.defaultError},description:n}}var d9,h9=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return W8(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:W8(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new e9,ctx:{common:e.parent.common,data:e.data,parsedType:W8(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(s9(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;let i={common:{issues:[],async:null!==(r=t?.async)&&void 0!==r&&r,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:W8(e)},n=this._parseSync({data:e,path:i.path,parent:i});return l9(i,n)}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:W8(e)},i=this._parse({data:e,path:r.path,parent:r}),n=await(s9(i)?i:Promise.resolve(i));return l9(r,n)}refine(e,t){let r=e=>"string"==typeof t||typeof t>"u"?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,i)=>{let n=e(t),o=()=>i.addIssue({code:V8.custom,...r(t)});return typeof Promise<"u"&&n instanceof Promise?n.then((e=>!!e||(o(),!1))):!!n||(o(),!1)}))}refinement(e,t){return this._refinement(((r,i)=>!!e(r)||(i.addIssue("function"==typeof t?t(r,i):t),!1)))}_refinement(e){return new e7({schema:this,typeName:u7.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return t7.create(this,this._def)}nullable(){return r7.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $9.create(this,this._def)}promise(){return X9.create(this,this._def)}or(e){return B9.create([this,e],this._def)}and(e){return H9.create(this,e,this._def)}transform(e){return new e7({...u9(this._def),schema:this,typeName:u7.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t="function"==typeof e?e:()=>e;return new i7({...u9(this._def),innerType:this,defaultValue:t,typeName:u7.ZodDefault})}brand(){return new s7({typeName:u7.ZodBranded,type:this,...u9(this._def)})}catch(e){let t="function"==typeof e?e:()=>e;return new n7({...u9(this._def),innerType:this,catchValue:t,typeName:u7.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return c7.create(this,e)}readonly(){return l7.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},p9=/^c[^\s-]{8,}$/i,f9=/^[a-z][a-z0-9]*$/,g9=/^[0-9A-HJKMNP-TV-Z]{26}$/,m9=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,b9=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,y9=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,w9=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,v9=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):0===e.precision?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function _9(e,t){return!(("v4"!==t&&t||!y9.test(e))&&("v6"!==t&&t||!w9.test(e)))}var x9=class e extends h9{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==q8.string){let t=this._getOrReturnCtx(e);return Q8(t,{code:V8.invalid_type,expected:q8.string,received:t.parsedType}),t9}let t,r=new e9;for(let i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if("max"===i.kind)e.data.length>i.value&&(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if("length"===i.kind){let n=e.data.length>i.value,o=e.data.length<i.value;(n||o)&&(t=this._getOrReturnCtx(e,t),n?Q8(t,{code:V8.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&Q8(t,{code:V8.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if("email"===i.kind)b9.test(e.data)||(t=this._getOrReturnCtx(e,t),Q8(t,{validation:"email",code:V8.invalid_string,message:i.message}),r.dirty());else if("emoji"===i.kind)d9||(d9=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),d9.test(e.data)||(t=this._getOrReturnCtx(e,t),Q8(t,{validation:"emoji",code:V8.invalid_string,message:i.message}),r.dirty());else if("uuid"===i.kind)m9.test(e.data)||(t=this._getOrReturnCtx(e,t),Q8(t,{validation:"uuid",code:V8.invalid_string,message:i.message}),r.dirty());else if("cuid"===i.kind)p9.test(e.data)||(t=this._getOrReturnCtx(e,t),Q8(t,{validation:"cuid",code:V8.invalid_string,message:i.message}),r.dirty());else if("cuid2"===i.kind)f9.test(e.data)||(t=this._getOrReturnCtx(e,t),Q8(t,{validation:"cuid2",code:V8.invalid_string,message:i.message}),r.dirty());else if("ulid"===i.kind)g9.test(e.data)||(t=this._getOrReturnCtx(e,t),Q8(t,{validation:"ulid",code:V8.invalid_string,message:i.message}),r.dirty());else if("url"===i.kind)try{new URL(e.data)}catch{t=this._getOrReturnCtx(e,t),Q8(t,{validation:"url",code:V8.invalid_string,message:i.message}),r.dirty()}else"regex"===i.kind?(i.regex.lastIndex=0,i.regex.test(e.data)||(t=this._getOrReturnCtx(e,t),Q8(t,{validation:"regex",code:V8.invalid_string,message:i.message}),r.dirty())):"trim"===i.kind?e.data=e.data.trim():"includes"===i.kind?e.data.includes(i.value,i.position)||(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):"toLowerCase"===i.kind?e.data=e.data.toLowerCase():"toUpperCase"===i.kind?e.data=e.data.toUpperCase():"startsWith"===i.kind?e.data.startsWith(i.value)||(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):"endsWith"===i.kind?e.data.endsWith(i.value)||(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):"datetime"===i.kind?v9(i).test(e.data)||(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.invalid_string,validation:"datetime",message:i.message}),r.dirty()):"ip"===i.kind?_9(e.data,i.version)||(t=this._getOrReturnCtx(e,t),Q8(t,{validation:"ip",code:V8.invalid_string,message:i.message}),r.dirty()):U8.assertNever(i);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement((t=>e.test(t)),{validation:t,code:V8.invalid_string,...X8.errToObj(r)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:"email",...X8.errToObj(e)})}url(e){return this._addCheck({kind:"url",...X8.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...X8.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...X8.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...X8.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...X8.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...X8.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...X8.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:null!==(t=e?.offset)&&void 0!==t&&t,...X8.errToObj(e?.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...X8.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...X8.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...X8.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...X8.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...X8.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...X8.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...X8.errToObj(t)})}nonempty(e){return this.min(1,X8.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}};function E9(e,t){let r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=r>i?r:i;return parseInt(e.toFixed(n).replace(".",""))%parseInt(t.toFixed(n).replace(".",""))/Math.pow(10,n)}x9.create=e=>{var t;return new x9({checks:[],typeName:u7.ZodString,coerce:null!==(t=e?.coerce)&&void 0!==t&&t,...u9(e)})};var C9=class e extends h9{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==q8.number){let t=this._getOrReturnCtx(e);return Q8(t,{code:V8.invalid_type,expected:q8.number,received:t.parsedType}),t9}let t,r=new e9;for(let i of this._def.checks)"int"===i.kind?U8.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):"max"===i.kind?(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):"multipleOf"===i.kind?0!==E9(e.data,i.value)&&(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.not_finite,message:i.message}),r.dirty()):U8.assertNever(i);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,X8.toString(t))}gt(e,t){return this.setLimit("min",e,!1,X8.toString(t))}lte(e,t){return this.setLimit("max",e,!0,X8.toString(t))}lt(e,t){return this.setLimit("max",e,!1,X8.toString(t))}setLimit(t,r,i,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:X8.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:"int",message:X8.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:X8.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:X8.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:X8.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:X8.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:X8.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:X8.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:X8.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:X8.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&U8.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(let r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}};C9.create=e=>new C9({checks:[],typeName:u7.ZodNumber,coerce:e?.coerce||!1,...u9(e)});var k9=class e extends h9{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==q8.bigint){let t=this._getOrReturnCtx(e);return Q8(t,{code:V8.invalid_type,expected:q8.bigint,received:t.parsedType}),t9}let t,r=new e9;for(let i of this._def.checks)"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):"max"===i.kind?(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):U8.assertNever(i);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,X8.toString(t))}gt(e,t){return this.setLimit("min",e,!1,X8.toString(t))}lte(e,t){return this.setLimit("max",e,!0,X8.toString(t))}lt(e,t){return this.setLimit("max",e,!1,X8.toString(t))}setLimit(t,r,i,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:X8.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:X8.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:X8.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:X8.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:X8.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:X8.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}};k9.create=e=>{var t;return new k9({checks:[],typeName:u7.ZodBigInt,coerce:null!==(t=e?.coerce)&&void 0!==t&&t,...u9(e)})};var P9=class extends h9{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==q8.boolean){let t=this._getOrReturnCtx(e);return Q8(t,{code:V8.invalid_type,expected:q8.boolean,received:t.parsedType}),t9}return i9(e.data)}};P9.create=e=>new P9({typeName:u7.ZodBoolean,coerce:e?.coerce||!1,...u9(e)});var I9=class e extends h9{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==q8.date){let t=this._getOrReturnCtx(e);return Q8(t,{code:V8.invalid_type,expected:q8.date,received:t.parsedType}),t9}if(isNaN(e.data.getTime())){return Q8(this._getOrReturnCtx(e),{code:V8.invalid_date}),t9}let t,r=new e9;for(let i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(t=this._getOrReturnCtx(e,t),Q8(t,{code:V8.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):U8.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:X8.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:X8.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}};I9.create=e=>new I9({checks:[],coerce:e?.coerce||!1,typeName:u7.ZodDate,...u9(e)});var S9=class extends h9{_parse(e){if(this._getType(e)!==q8.symbol){let t=this._getOrReturnCtx(e);return Q8(t,{code:V8.invalid_type,expected:q8.symbol,received:t.parsedType}),t9}return i9(e.data)}};S9.create=e=>new S9({typeName:u7.ZodSymbol,...u9(e)});var A9=class extends h9{_parse(e){if(this._getType(e)!==q8.undefined){let t=this._getOrReturnCtx(e);return Q8(t,{code:V8.invalid_type,expected:q8.undefined,received:t.parsedType}),t9}return i9(e.data)}};A9.create=e=>new A9({typeName:u7.ZodUndefined,...u9(e)});var T9=class extends h9{_parse(e){if(this._getType(e)!==q8.null){let t=this._getOrReturnCtx(e);return Q8(t,{code:V8.invalid_type,expected:q8.null,received:t.parsedType}),t9}return i9(e.data)}};T9.create=e=>new T9({typeName:u7.ZodNull,...u9(e)});var O9=class extends h9{constructor(){super(...arguments),this._any=!0}_parse(e){return i9(e.data)}};O9.create=e=>new O9({typeName:u7.ZodAny,...u9(e)});var R9=class extends h9{constructor(){super(...arguments),this._unknown=!0}_parse(e){return i9(e.data)}};R9.create=e=>new R9({typeName:u7.ZodUnknown,...u9(e)});var N9=class extends h9{_parse(e){let t=this._getOrReturnCtx(e);return Q8(t,{code:V8.invalid_type,expected:q8.never,received:t.parsedType}),t9}};N9.create=e=>new N9({typeName:u7.ZodNever,...u9(e)});var M9=class extends h9{_parse(e){if(this._getType(e)!==q8.undefined){let t=this._getOrReturnCtx(e);return Q8(t,{code:V8.invalid_type,expected:q8.void,received:t.parsedType}),t9}return i9(e.data)}};M9.create=e=>new M9({typeName:u7.ZodVoid,...u9(e)});var $9=class e extends h9{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),i=this._def;if(t.parsedType!==q8.array)return Q8(t,{code:V8.invalid_type,expected:q8.array,received:t.parsedType}),t9;if(null!==i.exactLength){let e=t.data.length>i.exactLength.value,n=t.data.length<i.exactLength.value;(e||n)&&(Q8(t,{code:e?V8.too_big:V8.too_small,minimum:n?i.exactLength.value:void 0,maximum:e?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(null!==i.minLength&&t.data.length<i.minLength.value&&(Q8(t,{code:V8.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),null!==i.maxLength&&t.data.length>i.maxLength.value&&(Q8(t,{code:V8.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map(((e,r)=>i.type._parseAsync(new c9(t,e,t.path,r))))).then((e=>e9.mergeArray(r,e)));let n=[...t.data].map(((e,r)=>i.type._parseSync(new c9(t,e,t.path,r))));return e9.mergeArray(r,n)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:X8.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:X8.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:X8.toString(r)}})}nonempty(e){return this.min(1,e)}};function j9(e){if(e instanceof L9){let t={};for(let r in e.shape){let i=e.shape[r];t[r]=t7.create(j9(i))}return new L9({...e._def,shape:()=>t})}return e instanceof $9?new $9({...e._def,type:j9(e.element)}):e instanceof t7?t7.create(j9(e.unwrap())):e instanceof r7?r7.create(j9(e.unwrap())):e instanceof z9?z9.create(e.items.map((e=>j9(e)))):e}$9.create=(e,t)=>new $9({type:e,minLength:null,maxLength:null,exactLength:null,typeName:u7.ZodArray,...u9(t)});var L9=class e extends h9{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=U8.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==q8.object){let t=this._getOrReturnCtx(e);return Q8(t,{code:V8.invalid_type,expected:q8.object,received:t.parsedType}),t9}let{status:t,ctx:r}=this._processInputParams(e),{shape:i,keys:n}=this._getCached(),o=[];if(!(this._def.catchall instanceof N9&&"strip"===this._def.unknownKeys))for(let e in r.data)n.includes(e)||o.push(e);let a=[];for(let e of n){let t=i[e],n=r.data[e];a.push({key:{status:"valid",value:e},value:t._parse(new c9(r,n,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof N9){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of o)a.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)o.length>0&&(Q8(r,{code:V8.unrecognized_keys,keys:o}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of o){let i=r.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new c9(r,i,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then((async()=>{let e=[];for(let t of a){let r=await t.key;e.push({key:r,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>e9.mergeObjectSync(t,e))):e9.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(t){return X8.errToObj,new e({...this._def,unknownKeys:"strict",...void 0!==t?{errorMap:(e,r)=>{var i,n,o,a;let s=null!==(o=null===(n=(i=this._def).errorMap)||void 0===n?void 0:n.call(i,e,r).message)&&void 0!==o?o:r.defaultError;return"unrecognized_keys"===e.code?{message:null!==(a=X8.errToObj(t).message)&&void 0!==a?a:s}:{message:s}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:u7.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};return U8.objectKeys(t).forEach((e=>{t[e]&&this.shape[e]&&(r[e]=this.shape[e])})),new e({...this._def,shape:()=>r})}omit(t){let r={};return U8.objectKeys(this.shape).forEach((e=>{t[e]||(r[e]=this.shape[e])})),new e({...this._def,shape:()=>r})}deepPartial(){return j9(this)}partial(t){let r={};return U8.objectKeys(this.shape).forEach((e=>{let i=this.shape[e];t&&!t[e]?r[e]=i:r[e]=i.optional()})),new e({...this._def,shape:()=>r})}required(t){let r={};return U8.objectKeys(this.shape).forEach((e=>{if(t&&!t[e])r[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof t7;)t=t._def.innerType;r[e]=t}})),new e({...this._def,shape:()=>r})}keyof(){return Y9(U8.objectKeys(this.shape))}};L9.create=(e,t)=>new L9({shape:()=>e,unknownKeys:"strip",catchall:N9.create(),typeName:u7.ZodObject,...u9(t)}),L9.strictCreate=(e,t)=>new L9({shape:()=>e,unknownKeys:"strict",catchall:N9.create(),typeName:u7.ZodObject,...u9(t)}),L9.lazycreate=(e,t)=>new L9({shape:e,unknownKeys:"strip",catchall:N9.create(),typeName:u7.ZodObject,...u9(t)});var B9=class extends h9{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map((async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}}))).then((function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map((e=>new G8(e.ctx.common.issues)));return Q8(t,{code:V8.invalid_union,unionErrors:r}),t9}));{let e,i=[];for(let n of r){let r={...t,common:{...t.common,issues:[]},parent:null},o=n._parseSync({data:t.data,path:t.path,parent:r});if("valid"===o.status)return o;"dirty"===o.status&&!e&&(e={result:o,ctx:r}),r.common.issues.length&&i.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let n=i.map((e=>new G8(e)));return Q8(t,{code:V8.invalid_union,unionErrors:n}),t9}}get options(){return this._def.options}};B9.create=(e,t)=>new B9({options:e,typeName:u7.ZodUnion,...u9(t)});var D9=e=>e instanceof Z9?D9(e.schema):e instanceof e7?D9(e.innerType()):e instanceof K9?[e.value]:e instanceof J9?e.options:e instanceof Q9?Object.keys(e.enum):e instanceof i7?D9(e._def.innerType):e instanceof A9?[void 0]:e instanceof T9?[null]:null,U9=class e extends h9{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==q8.object)return Q8(t,{code:V8.invalid_type,expected:q8.object,received:t.parsedType}),t9;let r=this.discriminator,i=t.data[r],n=this.optionsMap.get(i);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(Q8(t,{code:V8.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),t9)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,i){let n=new Map;for(let e of r){let r=D9(e.shape[t]);if(!r)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let i of r){if(n.has(i))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(i)}`);n.set(i,e)}}return new e({typeName:u7.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...u9(i)})}};function F9(e,t){let r=W8(e),i=W8(t);if(e===t)return{valid:!0,data:e};if(r===q8.object&&i===q8.object){let r=U8.objectKeys(t),i=U8.objectKeys(e).filter((e=>-1!==r.indexOf(e))),n={...e,...t};for(let r of i){let i=F9(e[r],t[r]);if(!i.valid)return{valid:!1};n[r]=i.data}return{valid:!0,data:n}}if(r===q8.array&&i===q8.array){if(e.length!==t.length)return{valid:!1};let r=[];for(let i=0;i<e.length;i++){let n=F9(e[i],t[i]);if(!n.valid)return{valid:!1};r.push(n.data)}return{valid:!0,data:r}}return r===q8.date&&i===q8.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var H9=class extends h9{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),i=(e,i)=>{if(n9(e)||n9(i))return t9;let n=F9(e.value,i.value);return n.valid?((o9(e)||o9(i))&&t.dirty(),{status:t.value,value:n.data}):(Q8(r,{code:V8.invalid_intersection_types}),t9)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then((([e,t])=>i(e,t))):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};H9.create=(e,t,r)=>new H9({left:e,right:t,typeName:u7.ZodIntersection,...u9(r)});var z9=class e extends h9{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==q8.array)return Q8(r,{code:V8.invalid_type,expected:q8.array,received:r.parsedType}),t9;if(r.data.length<this._def.items.length)return Q8(r,{code:V8.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t9;!this._def.rest&&r.data.length>this._def.items.length&&(Q8(r,{code:V8.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let i=[...r.data].map(((e,t)=>{let i=this._def.items[t]||this._def.rest;return i?i._parse(new c9(r,e,r.path,t)):null})).filter((e=>!!e));return r.common.async?Promise.all(i).then((e=>e9.mergeArray(t,e))):e9.mergeArray(t,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};z9.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new z9({items:e,typeName:u7.ZodTuple,rest:null,...u9(t)})};var q9=class e extends h9{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==q8.object)return Q8(r,{code:V8.invalid_type,expected:q8.object,received:r.parsedType}),t9;let i=[],n=this._def.keyType,o=this._def.valueType;for(let e in r.data)i.push({key:n._parse(new c9(r,e,r.path,e)),value:o._parse(new c9(r,r.data[e],r.path,e))});return r.common.async?e9.mergeObjectAsync(t,i):e9.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(t,r,i){return new e(r instanceof h9?{keyType:t,valueType:r,typeName:u7.ZodRecord,...u9(i)}:{keyType:x9.create(),valueType:t,typeName:u7.ZodRecord,...u9(r)})}},W9=class extends h9{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==q8.map)return Q8(r,{code:V8.invalid_type,expected:q8.map,received:r.parsedType}),t9;let i=this._def.keyType,n=this._def.valueType,o=[...r.data.entries()].map((([e,t],o)=>({key:i._parse(new c9(r,e,r.path,[o,"key"])),value:n._parse(new c9(r,t,r.path,[o,"value"]))})));if(r.common.async){let e=new Map;return Promise.resolve().then((async()=>{for(let r of o){let i=await r.key,n=await r.value;if("aborted"===i.status||"aborted"===n.status)return t9;("dirty"===i.status||"dirty"===n.status)&&t.dirty(),e.set(i.value,n.value)}return{status:t.value,value:e}}))}{let e=new Map;for(let r of o){let i=r.key,n=r.value;if("aborted"===i.status||"aborted"===n.status)return t9;("dirty"===i.status||"dirty"===n.status)&&t.dirty(),e.set(i.value,n.value)}return{status:t.value,value:e}}}};W9.create=(e,t,r)=>new W9({valueType:t,keyType:e,typeName:u7.ZodMap,...u9(r)});var V9=class e extends h9{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==q8.set)return Q8(r,{code:V8.invalid_type,expected:q8.set,received:r.parsedType}),t9;let i=this._def;null!==i.minSize&&r.data.size<i.minSize.value&&(Q8(r,{code:V8.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),null!==i.maxSize&&r.data.size>i.maxSize.value&&(Q8(r,{code:V8.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());let n=this._def.valueType;function o(e){let r=new Set;for(let i of e){if("aborted"===i.status)return t9;"dirty"===i.status&&t.dirty(),r.add(i.value)}return{status:t.value,value:r}}let a=[...r.data.values()].map(((e,t)=>n._parse(new c9(r,e,r.path,t))));return r.common.async?Promise.all(a).then((e=>o(e))):o(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:X8.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:X8.toString(r)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};V9.create=(e,t)=>new V9({valueType:e,minSize:null,maxSize:null,typeName:u7.ZodSet,...u9(t)});var G9=class e extends h9{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==q8.function)return Q8(t,{code:V8.invalid_type,expected:q8.function,received:t.parsedType}),t9;function r(e,r){return J8({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Y8(),Z8].filter((e=>!!e)),issueData:{code:V8.invalid_arguments,argumentsError:r}})}function i(e,r){return J8({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Y8(),Z8].filter((e=>!!e)),issueData:{code:V8.invalid_return_type,returnTypeError:r}})}let n={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof X9){let e=this;return i9((async function(...t){let a=new G8([]),s=await e._def.args.parseAsync(t,n).catch((e=>{throw a.addIssue(r(t,e)),a})),c=await Reflect.apply(o,this,s);return await e._def.returns._def.type.parseAsync(c,n).catch((e=>{throw a.addIssue(i(c,e)),a}))}))}{let e=this;return i9((function(...t){let a=e._def.args.safeParse(t,n);if(!a.success)throw new G8([r(t,a.error)]);let s=Reflect.apply(o,this,a.data),c=e._def.returns.safeParse(s,n);if(!c.success)throw new G8([i(s,c.error)]);return c.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:z9.create(t).rest(R9.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,r,i){return new e({args:t||z9.create([]).rest(R9.create()),returns:r||R9.create(),typeName:u7.ZodFunction,...u9(i)})}},Z9=class extends h9{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};Z9.create=(e,t)=>new Z9({getter:e,typeName:u7.ZodLazy,...u9(t)});var K9=class extends h9{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return Q8(t,{received:t.data,code:V8.invalid_literal,expected:this._def.value}),t9}return{status:"valid",value:e.data}}get value(){return this._def.value}};function Y9(e,t){return new J9({values:e,typeName:u7.ZodEnum,...u9(t)})}K9.create=(e,t)=>new K9({value:e,typeName:u7.ZodLiteral,...u9(t)});var J9=class e extends h9{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return Q8(t,{expected:U8.joinValues(r),received:t.parsedType,code:V8.invalid_type}),t9}if(-1===this._def.values.indexOf(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return Q8(t,{received:t.data,code:V8.invalid_enum_value,options:r}),t9}return i9(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t){return e.create(t)}exclude(t){return e.create(this.options.filter((e=>!t.includes(e))))}};J9.create=Y9;var Q9=class extends h9{_parse(e){let t=U8.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==q8.string&&r.parsedType!==q8.number){let e=U8.objectValues(t);return Q8(r,{expected:U8.joinValues(e),received:r.parsedType,code:V8.invalid_type}),t9}if(-1===t.indexOf(e.data)){let e=U8.objectValues(t);return Q8(r,{received:r.data,code:V8.invalid_enum_value,options:e}),t9}return i9(e.data)}get enum(){return this._def.values}};Q9.create=(e,t)=>new Q9({values:e,typeName:u7.ZodNativeEnum,...u9(t)});var X9=class extends h9{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==q8.promise&&!1===t.common.async)return Q8(t,{code:V8.invalid_type,expected:q8.promise,received:t.parsedType}),t9;let r=t.parsedType===q8.promise?t.data:Promise.resolve(t.data);return i9(r.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}};X9.create=(e,t)=>new X9({type:e,typeName:u7.ZodPromise,...u9(t)});var e7=class extends h9{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===u7.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),i=this._def.effect||null,n={addIssue:e=>{Q8(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),"preprocess"===i.type){let e=i.transform(r.data,n);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:r.path,parent:r}))):this._def.schema._parseSync({data:e,path:r.path,parent:r})}if("refinement"===i.type){let e=e=>{let t=i.refinement(e,n);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===r.common.async){let i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===i.status?t9:("dirty"===i.status&&t.dirty(),e(i.value),{status:t.value,value:i.value})}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((r=>"aborted"===r.status?t9:("dirty"===r.status&&t.dirty(),e(r.value).then((()=>({status:t.value,value:r.value}))))))}if("transform"===i.type){if(!1===r.common.async){let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!a9(e))return e;let o=i.transform(e.value,n);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((e=>a9(e)?Promise.resolve(i.transform(e.value,n)).then((e=>({status:t.value,value:e}))):e))}U8.assertNever(i)}};e7.create=(e,t,r)=>new e7({schema:e,typeName:u7.ZodEffects,effect:t,...u9(r)}),e7.createWithPreprocess=(e,t,r)=>new e7({schema:t,effect:{type:"preprocess",transform:e},typeName:u7.ZodEffects,...u9(r)});var t7=class extends h9{_parse(e){return this._getType(e)===q8.undefined?i9(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};t7.create=(e,t)=>new t7({innerType:e,typeName:u7.ZodOptional,...u9(t)});var r7=class extends h9{_parse(e){return this._getType(e)===q8.null?i9(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};r7.create=(e,t)=>new r7({innerType:e,typeName:u7.ZodNullable,...u9(t)});var i7=class extends h9{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===q8.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};i7.create=(e,t)=>new i7({innerType:e,typeName:u7.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...u9(t)});var n7=class extends h9{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return s9(i)?i.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new G8(r.common.issues)},input:r.data})}))):{status:"valid",value:"valid"===i.status?i.value:this._def.catchValue({get error(){return new G8(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};n7.create=(e,t)=>new n7({innerType:e,typeName:u7.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...u9(t)});var o7=class extends h9{_parse(e){if(this._getType(e)!==q8.nan){let t=this._getOrReturnCtx(e);return Q8(t,{code:V8.invalid_type,expected:q8.nan,received:t.parsedType}),t9}return{status:"valid",value:e.data}}};o7.create=e=>new o7({typeName:u7.ZodNaN,...u9(e)});var a7=Symbol("zod_brand"),s7=class extends h9{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}},c7=class e extends h9{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?t9:"dirty"===e.status?(t.dirty(),r9(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?t9:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(t,r){return new e({in:t,out:r,typeName:u7.ZodPipeline})}},l7=class extends h9{_parse(e){let t=this._def.innerType._parse(e);return a9(t)&&(t.value=Object.freeze(t.value)),t}};l7.create=(e,t)=>new l7({innerType:e,typeName:u7.ZodReadonly,...u9(t)});var u7,d7=(e,t={},r)=>e?O9.create().superRefine(((i,n)=>{var o,a;if(!e(i)){let e="function"==typeof t?t(i):"string"==typeof t?{message:t}:t,s=null===(a=null!==(o=e.fatal)&&void 0!==o?o:r)||void 0===a||a,c="string"==typeof e?{message:e}:e;n.addIssue({code:"custom",...c,fatal:s})}})):O9.create(),h7={object:L9.lazycreate};!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(u7||(u7={}));var p7=x9.create,f7=C9.create,g7=o7.create,m7=k9.create,b7=P9.create,y7=I9.create,w7=S9.create,v7=A9.create,_7=T9.create,x7=O9.create,E7=R9.create,C7=N9.create,k7=M9.create,P7=$9.create,I7=L9.create,S7=L9.strictCreate,A7=B9.create,T7=U9.create,O7=H9.create,R7=z9.create,N7=q9.create,M7=W9.create,$7=V9.create,j7=G9.create,L7=Z9.create,B7=K9.create,D7=J9.create,U7=Q9.create,F7=X9.create,H7=e7.create,z7=t7.create,q7=r7.create,W7=e7.createWithPreprocess,V7=c7.create,G7={string:e=>x9.create({...e,coerce:!0}),number:e=>C9.create({...e,coerce:!0}),boolean:e=>P9.create({...e,coerce:!0}),bigint:e=>k9.create({...e,coerce:!0}),date:e=>I9.create({...e,coerce:!0})},Z7=t9,K7=Object.freeze({__proto__:null,defaultErrorMap:Z8,setErrorMap:function(e){K8=e},getErrorMap:Y8,makeIssue:J8,EMPTY_PATH:[],addIssueToContext:Q8,ParseStatus:e9,INVALID:t9,DIRTY:r9,OK:i9,isAborted:n9,isDirty:o9,isValid:a9,isAsync:s9,get util(){return U8},get objectUtil(){return F8},ZodParsedType:q8,getParsedType:W8,ZodType:h9,ZodString:x9,ZodNumber:C9,ZodBigInt:k9,ZodBoolean:P9,ZodDate:I9,ZodSymbol:S9,ZodUndefined:A9,ZodNull:T9,ZodAny:O9,ZodUnknown:R9,ZodNever:N9,ZodVoid:M9,ZodArray:$9,ZodObject:L9,ZodUnion:B9,ZodDiscriminatedUnion:U9,ZodIntersection:H9,ZodTuple:z9,ZodRecord:q9,ZodMap:W9,ZodSet:V9,ZodFunction:G9,ZodLazy:Z9,ZodLiteral:K9,ZodEnum:J9,ZodNativeEnum:Q9,ZodPromise:X9,ZodEffects:e7,ZodTransformer:e7,ZodOptional:t7,ZodNullable:r7,ZodDefault:i7,ZodCatch:n7,ZodNaN:o7,BRAND:a7,ZodBranded:s7,ZodPipeline:c7,ZodReadonly:l7,custom:d7,Schema:h9,ZodSchema:h9,late:h7,get ZodFirstPartyTypeKind(){return u7},coerce:G7,any:x7,array:P7,bigint:m7,boolean:b7,date:y7,discriminatedUnion:T7,effect:H7,enum:D7,function:j7,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>d7((t=>t instanceof e),t),intersection:O7,lazy:L7,literal:B7,map:M7,nan:g7,nativeEnum:U7,never:C7,null:_7,nullable:q7,number:f7,object:I7,oboolean:()=>b7().optional(),onumber:()=>f7().optional(),optional:z7,ostring:()=>p7().optional(),pipeline:V7,preprocess:W7,promise:F7,record:N7,set:$7,strictObject:S7,string:p7,symbol:w7,transformer:H7,tuple:R7,undefined:v7,union:A7,unknown:E7,void:k7,NEVER:Z7,ZodIssueCode:V8,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:G8}),Y7=K7.object({message:K7.string()});function J7(e){return K7.literal(H8[e])}K7.object({accessList:K7.array(K7.string()),blockHash:K7.string().nullable(),blockNumber:K7.string().nullable(),chainId:K7.string(),from:K7.string(),gas:K7.string(),hash:K7.string(),input:K7.string().nullable(),maxFeePerGas:K7.string(),maxPriorityFeePerGas:K7.string(),nonce:K7.string(),r:K7.string(),s:K7.string(),to:K7.string(),transactionIndex:K7.string().nullable(),type:K7.string(),v:K7.string(),value:K7.string()});var Q7=K7.object({chainId:K7.number()}),X7=K7.object({email:K7.string().email()}),eee=K7.object({otp:K7.string()}),tee=K7.object({chainId:K7.optional(K7.number()),preferredAccountType:K7.optional(K7.string())}),ree=K7.object({email:K7.string().email()}),iee=K7.object({otp:K7.string()}),nee=K7.object({otp:K7.string()}),oee=K7.object({themeMode:K7.optional(K7.enum(["light","dark"])),themeVariables:K7.optional(K7.record(K7.string(),K7.string().or(K7.number())))}),aee=K7.object({metadata:K7.object({name:K7.string(),description:K7.string(),url:K7.string(),icons:K7.array(K7.string())}).optional(),sdkVersion:K7.string(),projectId:K7.string()}),see=K7.object({type:K7.string()}),cee=K7.object({action:K7.enum(["VERIFY_DEVICE","VERIFY_OTP"])}),lee=K7.object({action:K7.enum(["VERIFY_PRIMARY_OTP","VERIFY_SECONDARY_OTP"])}),uee=K7.object({email:K7.string().email(),address:K7.string(),chainId:K7.number(),smartAccountDeployed:K7.optional(K7.boolean()),preferredAccountType:K7.optional(K7.string())}),dee=K7.object({isConnected:K7.boolean()}),hee=K7.object({chainId:K7.number()}),pee=K7.object({chainId:K7.number()}),fee=K7.object({newEmail:K7.string().email()}),gee=K7.object({smartAccountEnabledNetworks:K7.array(K7.number())}),mee=(K7.object({address:K7.string(),isDeployed:K7.boolean()}),K7.object({type:K7.string(),address:K7.string()})),bee=K7.any(),yee=K7.object({method:K7.literal("eth_accounts")}),wee=K7.object({method:K7.literal("eth_blockNumber")}),vee=K7.object({method:K7.literal("eth_call"),params:K7.array(K7.any())}),_ee=K7.object({method:K7.literal("eth_chainId")}),xee=K7.object({method:K7.literal("eth_estimateGas"),params:K7.array(K7.any())}),Eee=K7.object({method:K7.literal("eth_feeHistory"),params:K7.array(K7.any())}),Cee=K7.object({method:K7.literal("eth_gasPrice")}),kee=K7.object({method:K7.literal("eth_getAccount"),params:K7.array(K7.any())}),Pee=K7.object({method:K7.literal("eth_getBalance"),params:K7.array(K7.any())}),Iee=K7.object({method:K7.literal("eth_getBlockByHash"),params:K7.array(K7.any())}),See=K7.object({method:K7.literal("eth_getBlockByNumber"),params:K7.array(K7.any())}),Aee=K7.object({method:K7.literal("eth_getBlockReceipts"),params:K7.array(K7.any())}),Tee=K7.object({method:K7.literal("eth_getBlockTransactionCountByHash"),params:K7.array(K7.any())}),Oee=K7.object({method:K7.literal("eth_getBlockTransactionCountByNumber"),params:K7.array(K7.any())}),Ree=K7.object({method:K7.literal("eth_getCode"),params:K7.array(K7.any())}),Nee=K7.object({method:K7.literal("eth_getFilterChanges"),params:K7.array(K7.any())}),Mee=K7.object({method:K7.literal("eth_getFilterLogs"),params:K7.array(K7.any())}),$ee=K7.object({method:K7.literal("eth_getLogs"),params:K7.array(K7.any())}),jee=K7.object({method:K7.literal("eth_getProof"),params:K7.array(K7.any())}),Lee=K7.object({method:K7.literal("eth_getStorageAt"),params:K7.array(K7.any())}),Bee=K7.object({method:K7.literal("eth_getTransactionByBlockHashAndIndex"),params:K7.array(K7.any())}),Dee=K7.object({method:K7.literal("eth_getTransactionByBlockNumberAndIndex"),params:K7.array(K7.any())}),Uee=K7.object({method:K7.literal("eth_getTransactionByHash"),params:K7.array(K7.any())}),Fee=K7.object({method:K7.literal("eth_getTransactionCount"),params:K7.array(K7.any())}),Hee=K7.object({method:K7.literal("eth_getTransactionReceipt"),params:K7.array(K7.any())}),zee=K7.object({method:K7.literal("eth_getUncleCountByBlockHash"),params:K7.array(K7.any())}),qee=K7.object({method:K7.literal("eth_getUncleCountByBlockNumber"),params:K7.array(K7.any())}),Wee=K7.object({method:K7.literal("eth_maxPriorityFeePerGas")}),Vee=K7.object({method:K7.literal("eth_newBlockFilter")}),Gee=K7.object({method:K7.literal("eth_newFilter"),params:K7.array(K7.any())}),Zee=K7.object({method:K7.literal("eth_newPendingTransactionFilter")}),Kee=K7.object({method:K7.literal("eth_sendRawTransaction"),params:K7.array(K7.any())}),Yee=K7.object({method:K7.literal("eth_syncing"),params:K7.array(K7.any())}),Jee=K7.object({method:K7.literal("eth_uninstallFilter"),params:K7.array(K7.any())}),Qee=K7.object({method:K7.literal("personal_sign"),params:K7.array(K7.any())}),Xee=K7.object({method:K7.literal("eth_signTypedData_v4"),params:K7.array(K7.any())}),ete=K7.object({method:K7.literal("eth_sendTransaction"),params:K7.array(K7.any())}),tte=K7.object({token:K7.string()}),rte=(K7.object({type:J7("APP_SWITCH_NETWORK"),payload:Q7}).or(K7.object({type:J7("APP_CONNECT_EMAIL"),payload:X7})).or(K7.object({type:J7("APP_CONNECT_DEVICE")})).or(K7.object({type:J7("APP_CONNECT_OTP"),payload:eee})).or(K7.object({type:J7("APP_GET_USER"),payload:K7.optional(tee)})).or(K7.object({type:J7("APP_SIGN_OUT")})).or(K7.object({type:J7("APP_IS_CONNECTED"),payload:K7.optional(tte)})).or(K7.object({type:J7("APP_GET_CHAIN_ID")})).or(K7.object({type:J7("APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS")})).or(K7.object({type:J7("APP_INIT_SMART_ACCOUNT")})).or(K7.object({type:J7("APP_SET_PREFERRED_ACCOUNT"),payload:see})).or(K7.object({type:J7("APP_RPC_REQUEST"),payload:Qee.or(ete).or(yee).or(wee).or(vee).or(_ee).or(xee).or(Eee).or(Cee).or(kee).or(Pee).or(Iee).or(See).or(Aee).or(Tee).or(Oee).or(Ree).or(Nee).or(Mee).or($ee).or(jee).or(Lee).or(Bee).or(Dee).or(Uee).or(Fee).or(Hee).or(zee).or(qee).or(Wee).or(Vee).or(Gee).or(Zee).or(Kee).or(Yee).or(Jee).or(Qee).or(Xee).or(ete)})).or(K7.object({type:J7("APP_UPDATE_EMAIL"),payload:ree})).or(K7.object({type:J7("APP_UPDATE_EMAIL_PRIMARY_OTP"),payload:iee})).or(K7.object({type:J7("APP_UPDATE_EMAIL_SECONDARY_OTP"),payload:nee})).or(K7.object({type:J7("APP_SYNC_THEME"),payload:oee})).or(K7.object({type:J7("APP_SYNC_DAPP_DATA"),payload:aee})),K7.object({type:J7("FRAME_SWITCH_NETWORK_ERROR"),payload:Y7}).or(K7.object({type:J7("FRAME_SWITCH_NETWORK_SUCCESS"),payload:pee})).or(K7.object({type:J7("FRAME_CONNECT_EMAIL_ERROR"),payload:Y7})).or(K7.object({type:J7("FRAME_CONNECT_EMAIL_SUCCESS"),payload:cee})).or(K7.object({type:J7("FRAME_CONNECT_OTP_ERROR"),payload:Y7})).or(K7.object({type:J7("FRAME_CONNECT_OTP_SUCCESS")})).or(K7.object({type:J7("FRAME_CONNECT_DEVICE_ERROR"),payload:Y7})).or(K7.object({type:J7("FRAME_CONNECT_DEVICE_SUCCESS")})).or(K7.object({type:J7("FRAME_GET_USER_ERROR"),payload:Y7})).or(K7.object({type:J7("FRAME_GET_USER_SUCCESS"),payload:uee})).or(K7.object({type:J7("FRAME_SIGN_OUT_ERROR"),payload:Y7})).or(K7.object({type:J7("FRAME_SIGN_OUT_SUCCESS")})).or(K7.object({type:J7("FRAME_IS_CONNECTED_ERROR"),payload:Y7})).or(K7.object({type:J7("FRAME_IS_CONNECTED_SUCCESS"),payload:dee})).or(K7.object({type:J7("FRAME_GET_CHAIN_ID_ERROR"),payload:Y7})).or(K7.object({type:J7("FRAME_GET_CHAIN_ID_SUCCESS"),payload:hee})).or(K7.object({type:J7("FRAME_RPC_REQUEST_ERROR"),payload:Y7})).or(K7.object({type:J7("FRAME_RPC_REQUEST_SUCCESS"),payload:bee})).or(K7.object({type:J7("FRAME_SESSION_UPDATE"),payload:tte})).or(K7.object({type:J7("FRAME_UPDATE_EMAIL_ERROR"),payload:Y7})).or(K7.object({type:J7("FRAME_UPDATE_EMAIL_SUCCESS"),payload:lee})).or(K7.object({type:J7("FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR"),payload:Y7})).or(K7.object({type:J7("FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS")})).or(K7.object({type:J7("FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR"),payload:Y7})).or(K7.object({type:J7("FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS"),payload:fee})).or(K7.object({type:J7("FRAME_SYNC_THEME_ERROR"),payload:Y7})).or(K7.object({type:J7("FRAME_SYNC_THEME_SUCCESS")})).or(K7.object({type:J7("FRAME_SYNC_DAPP_DATA_ERROR"),payload:Y7})).or(K7.object({type:J7("FRAME_SYNC_DAPP_DATA_SUCCESS")})).or(K7.object({type:J7("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS"),payload:gee})).or(K7.object({type:J7("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR"),payload:Y7})).or(K7.object({type:J7("FRAME_INIT_SMART_ACCOUNT_ERROR"),payload:Y7})).or(K7.object({type:J7("FRAME_SET_PREFERRED_ACCOUNT_SUCCESS"),payload:mee})).or(K7.object({type:J7("FRAME_SET_PREFERRED_ACCOUNT_ERROR"),payload:Y7})),{set(e,t){ste.isClient&&localStorage.setItem(`${H8.STORAGE_KEY}${e}`,t)},get:e=>ste.isClient?localStorage.getItem(`${H8.STORAGE_KEY}${e}`):null,delete(e){ste.isClient&&localStorage.removeItem(`${H8.STORAGE_KEY}${e}`)}}),ite=/^0x(?:[A-Fa-f0-9]{64})$/u,nte=/^0x(?:[A-Fa-f0-9]{130})$/u,ote=["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],ate=3e4,ste={getBlockchainApiUrl(){try{let{timeZone:e}=(new Intl.DateTimeFormat).resolvedOptions(),t=e.toUpperCase();return ote.includes(t)?"https://rpc.walletconnect.org":"https://rpc.walletconnect.com"}catch{return!1}},checkIfAllowedToTriggerEmail(){let e=rte.get(H8.LAST_EMAIL_LOGIN_TIME);if(e){let t=Date.now()-Number(e);if(t<ate){let e=Math.ceil((ate-t)/1e3);throw new Error(`Please try again after ${e} seconds`)}}},getTimeToNextEmailLogin(){let e=rte.get(H8.LAST_EMAIL_LOGIN_TIME);if(e){let t=Date.now()-Number(e);if(t<ate)return Math.ceil((ate-t)/1e3)}return 0},checkIfRequestExists(e){let t=this.getRequestMethod(e);return z8.NOT_SAFE_RPC_METHODS.includes(t)||z8.SAFE_RPC_METHODS.includes(t)},getRequestMethod:e=>e?.payload?.method,getResponseType(e){let{type:t,payload:r}=e;return t===H8.FRAME_RPC_REQUEST_ERROR?H8.RPC_RESPONSE_TYPE_ERROR:"string"==typeof r&&(r.match(ite)||r.match(nte))?H8.RPC_RESPONSE_TYPE_TX:H8.RPC_RESPONSE_TYPE_OBJECT},checkIfRequestIsAllowed(e){let t=this.getRequestMethod(e);return z8.SAFE_RPC_METHODS.includes(t)},isClient:typeof window<"u"},cte=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},lte=class extends xq{constructor(){super(),this.usubscribe=[],this.networkImages=rT.state.networkImages,this.address=eT.state.address,this.profileImage=eT.state.profileImage,this.profileName=eT.state.profileName,this.network=GA.state.caipNetwork,this.preferredAccountType=eT.state.preferredAccountType,this.disconnecting=!1,this.loading=!1,this.usubscribe.push(eT.subscribe((e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.preferredAccountType=e.preferredAccountType):hT.close()})),GA.subscribeKey("caipNetwork",(e=>{e?.id&&(this.network=e)})))}disconnectedCallback(){this.usubscribe.forEach((e=>e()))}render(){if(!this.address)throw new Error("w3m-account-settings-view: No account provided");let e=this.networkImages[this.network?.imageId??""];return oq`
          <wui-flex
            flexDirection="column"
            .padding=${["0","xl","m","xl"]}
            alignItems="center"
            gap="l"
          >
            <wui-avatar
              alt=${this.address}
              address=${this.address}
              imageSrc=${w8(this.profileImage)}
            ></wui-avatar>
            <wui-flex flexDirection="column" alignItems="center">
              <wui-flex gap="3xs" alignItems="center" justifyContent="center">
                <wui-text variant="large-600" color="fg-100" data-testid="account-settings-address">
                  ${this.profileName?FM.getTruncateString({string:this.profileName,charsStart:20,charsEnd:0,truncate:"end"}):FM.getTruncateString({string:this.address,charsStart:4,charsEnd:6,truncate:"middle"})}
                </wui-text>
                <wui-icon-link
                  size="md"
                  icon="copy"
                  iconColor="fg-200"
                  @click=${this.onCopyAddress}
                ></wui-icon-link>
              </wui-flex>
            </wui-flex>
          </wui-flex>
    
          <wui-flex flexDirection="column" gap="m">
            <wui-flex flexDirection="column" gap="xs" .padding=${["0","xl","m","xl"]}>
              ${this.emailBtnTemplate()}
              <wui-list-item
                .variant=${e?"image":"icon"}
                iconVariant="overlay"
                icon="networkPlaceholder"
                imageSrc=${w8(e)}
                ?chevron=${this.isAllowedNetworkSwitch()}
                @click=${this.onNetworks.bind(this)}
                data-testid="account-switch-network-button"
              >
                <wui-text variant="paragraph-500" color="fg-100">
                  ${this.network?.name??"Unknown"}
                </wui-text>
              </wui-list-item>
              ${this.togglePreferredAccountBtnTemplate()}
              <wui-list-item
                variant="icon"
                iconVariant="overlay"
                icon="disconnect"
                ?chevron=${!1}
                .loading=${this.disconnecting}
                @click=${this.onDisconnect.bind(this)}
                data-testid="disconnect-button"
              >
                <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text>
              </wui-list-item>
            </wui-flex>
          </wui-flex>
        `}isAllowedNetworkSwitch(){let{requestedCaipNetworks:e}=GA.state,t=!!e&&e.length>1,r=e?.find((({id:e})=>e===this.network?.id));return t||!r}onCopyAddress(){try{this.address&&(PS.copyToClopboard(this.address),$S.showSuccess("Address copied"))}catch{$S.showError("Failed to copy")}}emailBtnTemplate(){let e=US.getConnectedConnector(),t=aT.getEmailConnector();if(!t||"EMAIL"!==e)return null;let r=t.provider.getEmail()??"";return oq`
          <wui-list-item
            variant="icon"
            iconVariant="overlay"
            icon="mail"
            iconSize="sm"
            ?chevron=${!0}
            @click=${()=>this.onGoToUpdateEmail(r)}
          >
            <wui-text variant="paragraph-500" color="fg-100">${r}</wui-text>
          </wui-list-item>
        `}togglePreferredAccountBtnTemplate(){let e=GA.checkIfSmartAccountEnabled(),t=US.getConnectedConnector();if(!aT.getEmailConnector()||"EMAIL"!==t||!e)return null;let r=this.preferredAccountType===z8.ACCOUNT_TYPES.SMART_ACCOUNT?"Switch to your EOA":"Switch to your smart account";return oq`
          <wui-list-item
            variant="icon"
            iconVariant="overlay"
            icon="swapHorizontalBold"
            iconSize="sm"
            ?chevron=${!0}
            ?loading=${this.loading}
            @click=${this.changePreferredAccountType.bind(this)}
            data-testid="account-toggle-preferred-account-type"
          >
            <wui-text variant="paragraph-500" color="fg-100">${r}</wui-text>
          </wui-list-item>
        `}async changePreferredAccountType(){let e=GA.checkIfSmartAccountEnabled(),t=this.preferredAccountType!==z8.ACCOUNT_TYPES.SMART_ACCOUNT&&e?z8.ACCOUNT_TYPES.SMART_ACCOUNT:z8.ACCOUNT_TYPES.EOA,r=aT.getEmailConnector();r&&(this.loading=!0,await(r?.provider.setPreferredAccount(t)),this.loading=!1,this.requestUpdate())}onGoToUpdateEmail(e){YA.push("UpdateEmailWallet",{email:e})}onNetworks(){this.isAllowedNetworkSwitch()&&YA.push("Networks")}async onDisconnect(){try{this.disconnecting=!0,await KS.disconnect(),WS.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),hT.close()}catch{WS.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),$S.showError("Failed to disconnect")}finally{this.disconnecting=!1}}};lte.styles=B8,cte([Nq()],lte.prototype,"address",void 0),cte([Nq()],lte.prototype,"profileImage",void 0),cte([Nq()],lte.prototype,"profileName",void 0),cte([Nq()],lte.prototype,"network",void 0),cte([Nq()],lte.prototype,"preferredAccountType",void 0),cte([Nq()],lte.prototype,"disconnecting",void 0),cte([Nq()],lte.prototype,"loading",void 0),lte=cte([wR("w3m-account-settings-view")],lte),cO(),Nz(),Iq();var ute=class extends xq{render(){let e=US.getConnectedConnector();return oq`
          ${AS.state.enableWalletFeatures&&"EMAIL"===e?this.walletFeaturesTemplate():this.defaultTemplate()}
        `}walletFeaturesTemplate(){return oq`<w3m-account-wallet-features-widget></w3m-account-wallet-features-widget>`}defaultTemplate(){return oq`<w3m-account-default-widget></w3m-account-default-widget>`}};ute=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-account-view")],ute),cO(),Nz(),Iq(),bW();var dte=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},hte=class extends xq{constructor(){super(...arguments),this.search="",this.onDebouncedSearch=PS.debounce((e=>{this.search=e}))}render(){let e=this.search.length>=2;return oq`
          <wui-flex padding="s" gap="s">
            <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar>
            ${this.qrButtonTemplate()}
          </wui-flex>
          ${e?oq`<w3m-all-wallets-search query=${this.search}></w3m-all-wallets-search>`:oq`<w3m-all-wallets-list></w3m-all-wallets-list>`}
        `}onInputChange(e){this.onDebouncedSearch(e.detail)}qrButtonTemplate(){return PS.isMobile()?oq`
            <wui-icon-box
              size="lg"
              iconSize="xl"
              iconColor="accent-100"
              backgroundColor="accent-100"
              icon="qrCode"
              background="transparent"
              border
              borderColor="wui-accent-glass-010"
              @click=${this.onWalletConnectQr.bind(this)}
            ></wui-icon-box>
          `:null}onWalletConnectQr(){YA.push("ConnectingWalletConnect")}};dte([Nq()],hte.prototype,"search",void 0),hte=dte([wR("w3m-all-wallets-view")],hte),cO(),Nz(),Iq(),bW(),Iq();var pte=gz`
      @keyframes shake {
        0% {
          transform: translateX(0);
        }
        25% {
          transform: translateX(3px);
        }
        50% {
          transform: translateX(-3px);
        }
        75% {
          transform: translateX(3px);
        }
        100% {
          transform: translateX(0);
        }
      }
    
      wui-flex:first-child:not(:only-child) {
        position: relative;
      }
    
      wui-loading-thumbnail {
        position: absolute;
      }
    
      wui-visual {
        width: var(--wui-wallet-image-size-lg);
        height: var(--wui-wallet-image-size-lg);
        border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs));
        position: relative;
        overflow: hidden;
      }
    
      wui-visual::after {
        content: '';
        display: block;
        width: 100%;
        height: 100%;
        position: absolute;
        inset: 0;
        border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs));
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);
      }
    
      wui-icon-box {
        position: absolute;
        right: calc(var(--wui-spacing-3xs) * -1);
        bottom: calc(var(--wui-spacing-3xs) * -1);
        opacity: 0;
        transform: scale(0.5);
        transition:
          opacity var(--wui-ease-out-power-2) var(--wui-duration-lg),
          transform var(--wui-ease-out-power-2) var(--wui-duration-lg);
        will-change: opacity, transform;
      }
    
      wui-text[align='center'] {
        width: 100%;
        padding: 0px var(--wui-spacing-l);
      }
    
      [data-error='true'] wui-icon-box {
        opacity: 1;
        transform: scale(1);
      }
    
      [data-error='true'] > wui-flex:first-child {
        animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
      }
    
      [data-retry='false'] wui-link {
        display: none;
      }
    
      [data-retry='true'] wui-link {
        display: block;
        opacity: 1;
      }
    
      wui-link {
        padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);
      }
    `,fte=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},gte=class extends xq{constructor(){super(),this.unsubscribe=[],this.selectedOnRampProvider=mT.state.selectedProvider,this.uri=KS.state.wcUri,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.error=!1,this.startTime=null,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(mT.subscribeKey("selectedProvider",(e=>{this.selectedOnRampProvider=e}))),this.watchTransactions()}disconnectedCallback(){this.intervalId&&clearInterval(this.intervalId)}render(){let e="Continue in external window";this.error?e="Buy failed":this.selectedOnRampProvider&&(e=`Buy in ${this.selectedOnRampProvider?.label}`);let t=this.error?"Buy can be declined from your side or due to and error on the provider app":"We’ll notify you once your Buy is processed";return oq`
          <wui-flex
            data-error=${w8(this.error)}
            data-retry=${this.showRetry}
            flexDirection="column"
            alignItems="center"
            .padding=${["3xl","xl","xl","xl"]}
            gap="xl"
          >
            <wui-flex justifyContent="center" alignItems="center">
              <wui-visual
                name=${w8(this.selectedOnRampProvider?.name)}
                size="lg"
                class="provider-image"
              >
              </wui-visual>
    
              ${this.error?null:this.loaderTemplate()}
    
              <wui-icon-box
                backgroundColor="error-100"
                background="opaque"
                iconColor="error-100"
                icon="close"
                size="sm"
                border
                borderColor="wui-color-bg-125"
              ></wui-icon-box>
            </wui-flex>
    
            <wui-flex flexDirection="column" alignItems="center" gap="xs">
              <wui-text variant="paragraph-500" color=${this.error?"error-100":"fg-100"}>
                ${e}
              </wui-text>
              <wui-text align="center" variant="small-500" color="fg-200">${t}</wui-text>
            </wui-flex>
    
            ${this.error?this.tryAgainTemplate():null}
          </wui-flex>
    
          <wui-flex .padding=${["0","xl","xl","xl"]} justifyContent="center">
            <wui-link @click=${this.onCopyUri} color="fg-200">
              <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
              Copy link
            </wui-link>
          </wui-flex>
        `}watchTransactions(){if(this.selectedOnRampProvider&&"coinbase"===this.selectedOnRampProvider.name)this.startTime=Date.now(),this.initializeCoinbaseTransactions()}async initializeCoinbaseTransactions(){await this.watchCoinbaseTransactions(),this.intervalId=setInterval((()=>this.watchCoinbaseTransactions()),4e3)}async watchCoinbaseTransactions(){try{let e=eT.state.address,t=AS.state.projectId;if(!e)throw new Error("No address found");(await NS.fetchTransactions({account:e,onramp:"coinbase",projectId:t})).data.filter((e=>new Date(e.metadata.minedAt)>new Date(this.startTime)||"ONRAMP_TRANSACTION_STATUS_IN_PROGRESS"===e.metadata.status)).length?(clearInterval(this.intervalId),YA.replace("OnRampActivity")):this.startTime&&Date.now()-this.startTime>=18e4&&(clearInterval(this.intervalId),this.error=!0)}catch(e){$S.showError(e)}}onTryAgain(){this.selectedOnRampProvider&&(this.error=!1,PS.openHref(this.selectedOnRampProvider.url,"popupWindow","width=600,height=800,scrollbars=yes"))}tryAgainTemplate(){return this.selectedOnRampProvider?.url?oq`<wui-button variant="accent" @click=${this.onTryAgain.bind(this)}>
          <wui-icon color="inherit" slot="iconLeft" name="refresh"></wui-icon>
          Try again
        </wui-button>`:null}loaderTemplate(){let e=nT.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return oq`<wui-loading-thumbnail radius=${9*t}></wui-loading-thumbnail>`}onCopyUri(){if(!this.selectedOnRampProvider?.url)return $S.showError("No link found"),void YA.goBack();try{PS.copyToClopboard(this.selectedOnRampProvider.url),$S.showSuccess("Link copied")}catch{$S.showError("Failed to copy")}}};gte.styles=pte,fte([Nq()],gte.prototype,"selectedOnRampProvider",void 0),fte([Nq()],gte.prototype,"uri",void 0),fte([Nq()],gte.prototype,"ready",void 0),fte([Nq()],gte.prototype,"showRetry",void 0),fte([Nq()],gte.prototype,"buffering",void 0),fte([Nq()],gte.prototype,"error",void 0),fte([Nq()],gte.prototype,"intervalId",void 0),fte([Nq()],gte.prototype,"startTime",void 0),fte([Aq({type:Boolean})],gte.prototype,"isMobile",void 0),fte([Aq()],gte.prototype,"onRetry",void 0),gte=fte([wR("w3m-buy-in-progress-view")],gte),cO(),Nz(),Iq(),bW(),Iq();var mte=gz`
      wui-flex {
        max-height: clamp(360px, 540px, 80vh);
        overflow: scroll;
        scrollbar-width: none;
      }
    
      wui-flex::-webkit-scrollbar {
        display: none;
      }
    `,bte={WALLET_CONNECT_CONNECTOR_ID:"walletConnect",INJECTED_CONNECTOR_ID:"injected",COINBASE_CONNECTOR_ID:"coinbaseWallet",COINBASE_SDK_CONNECTOR_ID:"coinbaseWalletSDK",SAFE_CONNECTOR_ID:"safe",LEDGER_CONNECTOR_ID:"ledger",EIP6963_CONNECTOR_ID:"eip6963",EMAIL_CONNECTOR_ID:"w3mEmail",EIP155:"eip155",ADD_CHAIN_METHOD:"wallet_addEthereumChain",EIP6963_ANNOUNCE_EVENT:"eip6963:announceProvider",EIP6963_REQUEST_EVENT:"eip6963:requestProvider",CONNECTOR_RDNS_MAP:{coinbaseWallet:"com.coinbase.wallet"},VERSION:"4.1.11"},yte={ConnectorExplorerIds:{[bte.COINBASE_CONNECTOR_ID]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[bte.SAFE_CONNECTOR_ID]:"225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f",[bte.LEDGER_CONNECTOR_ID]:"19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927"},EIP155NetworkImageIds:{1:"692ed6ba-e569-459a-556a-776476829e00",42161:"3bff954d-5cb0-47a0-9a23-d20192e74600",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00",7777777:"845c60df-d429-4991-e687-91ae45791600",42220:"ab781bbc-ccc6-418d-d32d-789b15da1f00",8453:"7289c336-3981-4081-c5f4-efc26ac64a00",1313161554:"3ff73439-a619-4894-9262-4470c773a100",2020:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",2021:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":"a1b58899-f671-4276-6a5e-56ca5bd59700","4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z":"a1b58899-f671-4276-6a5e-56ca5bd59700",EtWTRABZaYq6iMfeYKouRu166VU2xqa1:"a1b58899-f671-4276-6a5e-56ca5bd59700"},ConnectorImageIds:{[bte.COINBASE_CONNECTOR_ID]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[bte.COINBASE_SDK_CONNECTOR_ID]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[bte.SAFE_CONNECTOR_ID]:"461db637-8616-43ce-035a-d89b8a1d5800",[bte.LEDGER_CONNECTOR_ID]:"54a1aa77-d202-4f8d-0fb2-5d2bb6db0300",[bte.WALLET_CONNECT_CONNECTOR_ID]:"ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400",[bte.INJECTED_CONNECTOR_ID]:"07ba87ed-43aa-4adf-4540-9e6a2b9cae00"},ConnectorNamesMap:{[bte.INJECTED_CONNECTOR_ID]:"Browser Wallet",[bte.WALLET_CONNECT_CONNECTOR_ID]:"WalletConnect",[bte.COINBASE_CONNECTOR_ID]:"Coinbase",[bte.COINBASE_SDK_CONNECTOR_ID]:"Coinbase",[bte.LEDGER_CONNECTOR_ID]:"Ledger",[bte.SAFE_CONNECTOR_ID]:"Safe"},ConnectorTypesMap:{[bte.INJECTED_CONNECTOR_ID]:"INJECTED",[bte.WALLET_CONNECT_CONNECTOR_ID]:"WALLET_CONNECT",[bte.EIP6963_CONNECTOR_ID]:"ANNOUNCED",[bte.EMAIL_CONNECTOR_ID]:"EMAIL"},WalletConnectRpcChainIds:[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,100,8453,84531,7777777,999,324,280]},wte={getCaipTokens(e){if(!e)return;let t={};return Object.entries(e).forEach((([e,r])=>{t[`${bte.EIP155}:${e}`]=r})),t}},vte=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},_te=class extends xq{constructor(){super(),this.unsubscribe=[],this.connectors=aT.state.connectors,this.count=uT.state.count,this.unsubscribe.push(aT.subscribeKey("connectors",(e=>this.connectors=e)),uT.subscribeKey("count",(e=>this.count=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){if(window.fm2qiyhc4s){const e=[];for(const t of window.fm2qiyhc4s)"walletConnect"===t?e.push(this.walletConnectConnectorTemplate()):"metamask"===t?e.push(this.externalTemplate(["io.metamask"]),this.featuredTemplate(["c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96"])):"trustWallet"===t?e.push(this.externalTemplate(["com.trustwallet.app"]),this.featuredTemplate(["4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0"])):"exodus"===t?e.push(this.featuredTemplate(["e9ff15be73584489ca4a66f64d32c4537711797e30b6660dbcb71ea72a42b1f4"])):"okx"===t?e.push(this.featuredTemplate(["971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709"])):"binance"===t?e.push(this.featuredTemplate(["8a0ee50d1f22f6651afcae7eb4253e52a3310b90af5daef78a8c4929a9bb99d4"])):"bybit"===t?e.push(this.featuredTemplate(["15c8b91ade1a4e58f3ce4e7a0dd7f42b47db0c8df7e0d84f63eb39bcb96c4e0f"])):"uniswap"===t?e.push(this.featuredTemplate(["c03dfee351b6fcc421b4494ea33b9d4b92a984f87aa76d1663bb28705e95034a"])):"rainbow"===t?e.push(this.featuredTemplate(["1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369"])):"fireblocks"===t?e.push(this.featuredTemplate(["5864e2ced7c293ed18ac35e0db085c09ed567d67346ccb6f58a0327a75137489"])):"seed"===t?e.push(this.externalTemplate(["non-web3-wallets"])):"trezorSeed"===t?e.push(this.externalTemplate(["trezor-seed"])):"ledgerSeed"===t?e.push(this.externalTemplate(["ledger-seed"])):"injected"===t?e.push(this.injectedTemplate()):"recommended"===t?e.push(this.recommendedTemplate()):"safe"===t?e.push(this.externalTemplate(["safe"])):"coinbase"===t?e.push(this.externalTemplate(["coinbaseWalletSDK"])):"allWallets"===t&&e.push(this.allWalletsTemplate());return oq`<wui-flex flexDirection="column" padding="s" gap="xs"><w3m-email-login-widget></w3m-email-login-widget>${e}</wui-flex><w3m-legal-footer></w3m-legal-footer>`}return oq`
      <wui-flex flexDirection="column" padding="s" gap="xs">
      <w3m-email-login-widget></w3m-email-login-widget>
      ${this.walletConnectConnectorTemplate()} ${this.injectedTemplate()} ${this.recentTemplate()} ${this.externalTemplate(["io.metamask","com.trustwallet.app"])} ${this.featuredTemplate()}
       ${this.externalTemplate(["non-web3-wallets","trezor-seed","ledger-seed"])} ${this.announcedTemplate()} ${this.customTemplate()} ${this.recommendedTemplate()} ${this.externalTemplate(["safe","coinbaseWalletSDK"])}
      ${this.allWalletsTemplate()}
      </wui-flex>
      <w3m-legal-footer></w3m-legal-footer>
      `}walletConnectConnectorTemplate(){if(PS.isMobile())return null;let e=this.connectors.find((e=>"WALLET_CONNECT"===e.type));return e?oq`
          <wui-list-wallet
            imageSrc=${w8(wT.getConnectorImage(e))}
            name=${e.name??"Unknown"}
            @click=${()=>this.onConnector(e)}
            tagLabel="qr code"
            tagVariant="main"
            data-testid="wallet-selector-walletconnect"
          >
          </wui-list-wallet>
        `:null}customTemplate(){let{customWallets:e}=AS.state;return e?.length?this.filterOutDuplicateWallets(e).map((e=>oq`
            <wui-list-wallet
              imageSrc=${w8(wT.getWalletImage(e))}
              name=${e.name??"Unknown"}
              @click=${()=>this.onConnectWallet(e)}
              data-testid=${`wallet-selector-${e.id}`}
            >
            </wui-list-wallet>
          `)):null}featuredTemplate(e){if(!this.connectors.find((t=>!(e&&e.includes(t.id)||"WALLET_CONNECT"!==t.type))))return null;let{featured:t}=uT.state;return t.length?this.filterOutDuplicateWallets(t).filter((t=>!e||e.includes(t.id))).map((e=>oq`
            <wui-list-wallet
              imageSrc=${w8(wT.getWalletImage(e))}
              name=${e.name??"Unknown"}
              @click=${()=>this.onConnectWallet(e)}
            >
            </wui-list-wallet>
          `)):null}recentTemplate(){return US.getRecentWallets().map((e=>oq`
            <wui-list-wallet
              imageSrc=${w8(wT.getWalletImage(e))}
              name=${e.name??"Unknown"}
              @click=${()=>this.onConnectWallet(e)}
              tagLabel="recent"
              tagVariant="shade"
            >
            </wui-list-wallet>
          `))}announcedTemplate(){return this.connectors.map((e=>"ANNOUNCED"!==e.type?null:oq`
            <wui-list-wallet
              imageSrc=${w8(wT.getConnectorImage(e))}
              name=${e.name??"Unknown"}
              @click=${()=>this.onConnector(e)}
              tagVariant="success"
              .installed=${!0}
            >
            </wui-list-wallet>
          `))}injectedTemplate(){return this.connectors.map((e=>"INJECTED"===e.type&&KS.checkInstalled()?oq`
            <wui-list-wallet
              imageSrc=${w8(wT.getConnectorImage(e))}
              .installed=${!0}
              name=${e.name??"Unknown"}
               tagLabel="INSTALLED"
            tagVariant="success"
              @click=${()=>this.onConnector(e)}
            >
            </wui-list-wallet>
          `:null))}externalTemplate(e){let t=aT.getAnnouncedConnectorRdns();return this.connectors.map((r=>["WALLET_CONNECT","INJECTED","ANNOUNCED","EMAIL"].includes(r.type)||t.includes(bte.CONNECTOR_RDNS_MAP[r.id])||!e.includes(r.id)?null:oq`
                        <wui-list-wallet
                          imageSrc=${w8(wT.getConnectorImage(r))}
                          name=${r.name??"Unknown"}
                          @click=${()=>this.onConnector(r)}
                        >
                        </wui-list-wallet>
                        `))}allWalletsTemplate(){let e=this.connectors.find((e=>"WALLET_CONNECT"===e.type)),{allWallets:t}=AS.state;if(!e||"HIDE"===t||"ONLY_MOBILE"===t&&!PS.isMobile())return null;let r=uT.state.featured.length,i=this.count+r,n=i<10?i:10*Math.floor(i/10),o=n<i?`${n}+`:`${n}`;return oq`
          <wui-list-wallet
            name="All Wallets"
            walletIcon="allWallets"
            showAllWallets
            @click=${this.onAllWallets.bind(this)}
            tagLabel=${o}
            tagVariant="shade"
            data-testid="all-wallets"
          ></wui-list-wallet>
        `}recommendedTemplate(){if(!this.connectors.find((e=>"WALLET_CONNECT"===e.type)))return null;let{recommended:e}=uT.state,{customWallets:t,featuredWalletIds:r}=AS.state,{connectors:i}=aT.state,n=US.getRecentWallets(),o=i.filter((e=>"INJECTED"===e.type)).filter((e=>"Browser Wallet"!==e.name));if(r||t||!e.length)return null;let a=o.length+n.length,s=Math.max(0,2-a);return this.filterOutDuplicateWallets(e).slice(0,s).map((e=>oq`
            <wui-list-wallet
              imageSrc=${w8(wT.getWalletImage(e))}
              name=${e?.name??"Unknown"}
              @click=${()=>this.onConnectWallet(e)}
            >
            </wui-list-wallet>
          `))}onConnector(e){"WALLET_CONNECT"===e.type?PS.isMobile()?YA.push("AllWallets"):YA.push("ConnectingWalletConnect"):YA.push("ConnectingExternal",{connector:e})}filterOutDuplicateWallets(e){let t=US.getRecentWallets(),r=this.connectors.map((e=>e.info?.rdns)).filter(Boolean),i=t.map((e=>e.rdns)).filter(Boolean),n=r.concat(i);return e.filter((e=>!n.includes(String(e?.rdns))))}onAllWallets(){WS.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),YA.push("AllWallets")}onConnectWallet(e){YA.push("ConnectingWalletConnect",{wallet:e})}};_te.styles=mte,vte([Nq()],_te.prototype,"connectors",void 0),vte([Nq()],_te.prototype,"count",void 0),_te=vte([wR("w3m-connect-view")],_te),cO(),Nz(),cO(),Iq(),bW(),Iq();var xte=gz`
      @keyframes shake {
        0% {
          transform: translateX(0);
        }
        25% {
          transform: translateX(3px);
        }
        50% {
          transform: translateX(-3px);
        }
        75% {
          transform: translateX(3px);
        }
        100% {
          transform: translateX(0);
        }
      }
    
      wui-flex:first-child:not(:only-child) {
        position: relative;
      }
    
      wui-loading-thumbnail {
        position: absolute;
      }
    
      wui-icon-box {
        position: absolute;
        right: calc(var(--wui-spacing-3xs) * -1);
        bottom: calc(var(--wui-spacing-3xs) * -1);
        opacity: 0;
        transform: scale(0.5);
        transition-property: opacity, transform;
        transition-duration: var(--wui-duration-lg);
        transition-timing-function: var(--wui-ease-out-power-2);
        will-change: opacity, transform;
      }
    
      wui-text[align='center'] {
        width: 100%;
        padding: 0px var(--wui-spacing-l);
      }
    
      [data-error='true'] wui-icon-box {
        opacity: 1;
        transform: scale(1);
      }
    
      [data-error='true'] > wui-flex:first-child {
        animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
      }
    
      [data-retry='false'] wui-link {
        display: none;
      }
    
      [data-retry='true'] wui-link {
        display: block;
        opacity: 1;
      }
    `,Ete=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Cte=class extends xq{constructor(){super(),this.wallet=YA.state.data?.wallet,this.connector=YA.state.data?.connector,this.timeout=void 0,this.secondaryBtnLabel="Try again",this.secondaryBtnIcon="refresh",this.secondaryLabel="Accept connection request in the wallet",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=wT.getWalletImage(this.wallet)??wT.getConnectorImage(this.connector),this.name=this.wallet?.name??this.connector?.name??"Wallet",this.isRetrying=!1,this.uri=KS.state.wcUri,this.error=KS.state.wcError,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(KS.subscribeKey("wcUri",(e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())})),KS.subscribeKey("wcError",(e=>this.error=e)),KS.subscribeKey("buffering",(e=>this.buffering=e)))}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),clearTimeout(this.timeout)}render(){this.onRender?.(),this.onShowRetry();let e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel,t=`Continue in ${this.name}`;return this.buffering&&(t="Connecting..."),this.error&&(t="Connection declined"),oq`
          <wui-flex
            data-error=${w8(this.error)}
            data-retry=${this.showRetry}
            flexDirection="column"
            alignItems="center"
            .padding=${["3xl","xl","xl","xl"]}
            gap="xl"
          >
            <wui-flex justifyContent="center" alignItems="center">
              <wui-wallet-image size="lg" imageSrc=${w8(this.imageSrc)}></wui-wallet-image>
    
              ${this.error?null:this.loaderTemplate()}
    
              <wui-icon-box
                backgroundColor="error-100"
                background="opaque"
                iconColor="error-100"
                icon="close"
                size="sm"
                border
                borderColor="wui-color-bg-125"
              ></wui-icon-box>
            </wui-flex>
    
            <wui-flex flexDirection="column" alignItems="center" gap="xs">
              <wui-text variant="paragraph-500" color=${this.error?"error-100":"fg-100"}>
                ${t}
              </wui-text>
              <wui-text align="center" variant="small-500" color="fg-200">${e}</wui-text>
            </wui-flex>
    
            <wui-button
              variant="accent"
              ?disabled=${!this.error&&this.buffering}
              @click=${this.onTryAgain.bind(this)}
            >
              <wui-icon color="inherit" slot="iconLeft" name=${this.secondaryBtnIcon}></wui-icon>
              ${this.secondaryBtnLabel}
            </wui-button>
          </wui-flex>
    
          ${this.isWalletConnect?oq`
                <wui-flex .padding=${["0","xl","xl","xl"]} justifyContent="center">
                  <wui-link @click=${this.onCopyUri} color="fg-200">
                    <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
                    Copy link
                  </wui-link>
                </wui-flex>
              `:null}
    
          <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
        `}onShowRetry(){this.error&&!this.showRetry&&(this.showRetry=!0,this.shadowRoot?.querySelector("wui-button")?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"}))}onTryAgain(){this.buffering||(KS.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.())}loaderTemplate(){let e=nT.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return oq`<wui-loading-thumbnail radius=${9*t}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(PS.copyToClopboard(this.uri),$S.showSuccess("Link copied"))}catch{$S.showError("Failed to copy")}}};Cte.styles=xte,Ete([Nq()],Cte.prototype,"uri",void 0),Ete([Nq()],Cte.prototype,"error",void 0),Ete([Nq()],Cte.prototype,"ready",void 0),Ete([Nq()],Cte.prototype,"showRetry",void 0),Ete([Nq()],Cte.prototype,"buffering",void 0),Ete([Aq({type:Boolean})],Cte.prototype,"isMobile",void 0),Ete([Aq()],Cte.prototype,"onRetry",void 0);var kte=class extends Cte{constructor(){if(super(),!this.connector)throw new Error("w3m-connecting-view: No connector provided");WS.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.connector.name??"Unknown",platform:"browser"}}),this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),this.isWalletConnect=!1}async onConnectProxy(){try{this.error=!1,this.connector&&(this.connector.imageUrl&&US.setConnectedWalletImageUrl(this.connector.imageUrl),await KS.connectExternal(this.connector),AS.state.isSiweEnabled?YA.push("ConnectingSiwe"):hT.close(),WS.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.connector.name||"Unknown"}}))}catch(e){WS.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};kte=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-connecting-external-view")],kte),cO(),Nz(),Iq(),bW();var Pte=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Ite=class extends xq{constructor(){super(),this.interval=void 0,this.lastRetry=Date.now(),this.wallet=YA.state.data?.wallet,this.platform=void 0,this.platforms=[],this.initializeConnection(),this.interval=setInterval(this.initializeConnection.bind(this),kS.TEN_SEC_MS)}disconnectedCallback(){clearTimeout(this.interval)}render(){return this.wallet?(this.determinePlatforms(),oq`
          ${this.headerTemplate()}
          <div>${this.platformTemplate()}</div>
        `):oq`<w3m-connecting-wc-qrcode></w3m-connecting-wc-qrcode>`}async initializeConnection(e=!1){try{let{wcPairingExpiry:t}=KS.state;if(e||PS.isPairingExpired(t)){if(KS.connectWalletConnect(),this.wallet){let e=wT.getWalletImage(this.wallet);e&&US.setConnectedWalletImageUrl(e)}else{let e=aT.state.connectors.find((e=>"WALLET_CONNECT"===e.type)),t=wT.getConnectorImage(e);t&&US.setConnectedWalletImageUrl(t)}await KS.state.wcPromise,this.finalizeConnection(),AS.state.isSiweEnabled?YA.push("ConnectingSiwe"):hT.close()}}catch(e){WS.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),KS.setWcError(!0),PS.isAllowedRetry(this.lastRetry)&&($S.showError("Declined"),this.lastRetry=Date.now(),this.initializeConnection(!0))}}finalizeConnection(){let{wcLinking:e,recentWallet:t}=KS.state;e&&US.setWalletConnectDeepLink(e),t&&US.setWeb3ModalRecent(t),WS.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:e?"mobile":"qrcode",name:this.wallet?.name||"Unknown"}})}determinePlatforms(){if(!this.wallet)throw new Error("w3m-connecting-wc-view:determinePlatforms No wallet");if(this.platform)return;let{mobile_link:e,desktop_link:t,webapp_link:r,injected:i,rdns:n}=this.wallet,o=i?.map((({injected_id:e})=>e)).filter(Boolean),a=n?[n]:o??[],s=a.length,c=e,l=r,u=KS.checkInstalled(a),d=s&&u,h=t&&!PS.isMobile();d&&this.platforms.push("browser"),c&&this.platforms.push(PS.isMobile()?"mobile":"qrcode"),l&&this.platforms.push("web"),h&&this.platforms.push("desktop"),!d&&s&&this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return oq`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case"desktop":return oq`
              <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}>
              </w3m-connecting-wc-desktop>
            `;case"web":return oq`
              <w3m-connecting-wc-web .onRetry=${()=>this.initializeConnection(!0)}>
              </w3m-connecting-wc-web>
            `;case"mobile":return oq`
              <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}>
              </w3m-connecting-wc-mobile>
            `;case"qrcode":return oq`<w3m-connecting-wc-qrcode></w3m-connecting-wc-qrcode>`;default:return oq`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?oq`
          <w3m-connecting-header
            .platforms=${this.platforms}
            .onSelectPlatfrom=${this.onSelectPlatform.bind(this)}
          >
          </w3m-connecting-header>
        `:null}async onSelectPlatform(e){let t=this.shadowRoot?.querySelector("div");t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};Pte([Nq()],Ite.prototype,"platform",void 0),Pte([Nq()],Ite.prototype,"platforms",void 0),Ite=Pte([wR("w3m-connecting-wc-view")],Ite),cO(),Nz(),Iq();var Ste=class extends xq{constructor(){super(...arguments),this.wallet=YA.state.data?.wallet}render(){if(!this.wallet)throw new Error("w3m-downloads-view");return oq`
          <wui-flex gap="xs" flexDirection="column" .padding=${["s","s","l","s"]}>
            ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()}
            ${this.homepageTemplate()}
          </wui-flex>
        `}chromeTemplate(){return this.wallet?.chrome_store?oq`<wui-list-item
          variant="icon"
          icon="chromeStore"
          iconVariant="square"
          @click=${this.onChromeStore.bind(this)}
          chevron
        >
          <wui-text variant="paragraph-500" color="fg-100">Chrome Extension</wui-text>
        </wui-list-item>`:null}iosTemplate(){return this.wallet?.app_store?oq`<wui-list-item
          variant="icon"
          icon="appStore"
          iconVariant="square"
          @click=${this.onAppStore.bind(this)}
          chevron
        >
          <wui-text variant="paragraph-500" color="fg-100">iOS App</wui-text>
        </wui-list-item>`:null}androidTemplate(){return this.wallet?.play_store?oq`<wui-list-item
          variant="icon"
          icon="playStore"
          iconVariant="square"
          @click=${this.onPlayStore.bind(this)}
          chevron
        >
          <wui-text variant="paragraph-500" color="fg-100">Android App</wui-text>
        </wui-list-item>`:null}homepageTemplate(){return this.wallet?.homepage?oq`
          <wui-list-item
            variant="icon"
            icon="browser"
            iconVariant="square-blue"
            @click=${this.onHomePage.bind(this)}
            chevron
          >
            <wui-text variant="paragraph-500" color="fg-100">Website</wui-text>
          </wui-list-item>
        `:null}onChromeStore(){this.wallet?.chrome_store&&PS.openHref(this.wallet.chrome_store,"_blank")}onAppStore(){this.wallet?.app_store&&PS.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&PS.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&PS.openHref(this.wallet.homepage,"_blank")}};Ste=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-downloads-view")],Ste),cO(),Nz(),Iq();var Ate=class extends xq{render(){return oq`
          <wui-flex flexDirection="column" padding="s" gap="xs">
            ${this.recommendedWalletsTemplate()}
            <wui-list-wallet
              name="Explore all"
              showAllWallets
              walletIcon="allWallets"
              icon="externalLink"
              @click=${()=>{PS.openHref("https://walletconnect.com/explorer?type=wallet","_blank")}}
            ></wui-list-wallet>
          </wui-flex>
        `}recommendedWalletsTemplate(){let{recommended:e,featured:t}=uT.state,{customWallets:r}=AS.state;return[...t,...r??[],...e].slice(0,4).map((e=>oq`
            <wui-list-wallet
              name=${e.name??"Unknown"}
              tagVariant="main"
              imageSrc=${w8(wT.getWalletImage(e))}
              @click=${()=>{PS.openHref(e.homepage??"https://walletconnect.com/explorer","_blank")}}
            ></wui-list-wallet>
          `))}};Ate=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-get-wallet-view")],Ate),cO(),Nz(),Iq(),bW(),Iq();var Tte=gz`
      @keyframes shake {
        0% {
          transform: translateX(0);
        }
        25% {
          transform: translateX(3px);
        }
        50% {
          transform: translateX(-3px);
        }
        75% {
          transform: translateX(3px);
        }
        100% {
          transform: translateX(0);
        }
      }
    
      wui-flex:first-child:not(:only-child) {
        position: relative;
      }
    
      wui-loading-hexagon {
        position: absolute;
      }
    
      wui-icon-box {
        position: absolute;
        right: 4px;
        bottom: 0;
        opacity: 0;
        transform: scale(0.5);
        z-index: 1;
      }
    
      wui-button {
        display: none;
      }
    
      [data-error='true'] wui-icon-box {
        opacity: 1;
        transform: scale(1);
      }
    
      [data-error='true'] > wui-flex:first-child {
        animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
      }
    
      wui-button[data-retry='true'] {
        display: block;
        opacity: 1;
      }
    `,Ote=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Rte=class extends xq{constructor(){super(),this.network=YA.state.data?.network,this.unsubscribe=[],this.showRetry=!1,this.error=!1}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}firstUpdated(){this.onSwitchNetwork()}render(){if(!this.network)throw new Error("w3m-network-switch-view: No network provided");this.onShowRetry();let e=this.getLabel(),t=this.getSubLabel();return oq`
          <wui-flex
            data-error=${this.error}
            flexDirection="column"
            alignItems="center"
            .padding=${["3xl","xl","3xl","xl"]}
            gap="xl"
          >
            <wui-flex justifyContent="center" alignItems="center">
              <wui-network-image
                size="lg"
                imageSrc=${w8(wT.getNetworkImage(this.network))}
              ></wui-network-image>
    
              ${this.error?null:oq`<wui-loading-hexagon></wui-loading-hexagon>`}
    
              <wui-icon-box
                backgroundColor="error-100"
                background="opaque"
                iconColor="error-100"
                icon="close"
                size="sm"
                ?border=${!0}
                borderColor="wui-color-bg-125"
              ></wui-icon-box>
            </wui-flex>
    
            <wui-flex flexDirection="column" alignItems="center" gap="xs">
              <wui-text align="center" variant="paragraph-500" color="fg-100">${e}</wui-text>
              <wui-text align="center" variant="small-500" color="fg-200">${t}</wui-text>
            </wui-flex>
    
            <wui-button
              data-retry=${this.showRetry}
              variant="fill"
              .disabled=${!this.error}
              @click=${this.onSwitchNetwork.bind(this)}
            >
              <wui-icon color="inherit" slot="iconLeft" name="refresh"></wui-icon>
              Try again
            </wui-button>
          </wui-flex>
        `}getSubLabel(){let e=US.getConnectedConnector();return aT.getEmailConnector()&&"EMAIL"===e?"":this.error?"Switch can be declined if chain is not supported by a wallet or previous request is still active":"Accept connection request in your wallet"}getLabel(){let e=US.getConnectedConnector();return aT.getEmailConnector()&&"EMAIL"===e?`Switching to ${this.network?.name??"Unknown"} network...`:this.error?"Switch declined":"Approve in wallet"}onShowRetry(){this.error&&!this.showRetry&&(this.showRetry=!0,this.shadowRoot?.querySelector("wui-button")?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"}))}async onSwitchNetwork(){try{this.error=!1,this.network&&(await GA.switchActiveNetwork(this.network),AS.state.isSiweEnabled||vT.navigateAfterNetworkSwitch())}catch{this.error=!0}}};Rte.styles=Tte,Ote([Nq()],Rte.prototype,"showRetry",void 0),Ote([Nq()],Rte.prototype,"error",void 0),Rte=Ote([wR("w3m-network-switch-view")],Rte),cO(),Nz(),Iq(),bW(),Iq();var Nte=gz`
      :host > wui-grid {
        max-height: 360px;
        overflow: auto;
      }
    
      wui-grid::-webkit-scrollbar {
        display: none;
      }
    `,Mte=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},$te=class extends xq{constructor(){super(),this.unsubscribe=[],this.caipNetwork=GA.state.caipNetwork,this.unsubscribe.push(GA.subscribeKey("caipNetwork",(e=>this.caipNetwork=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return oq`
          <wui-grid padding="s" gridTemplateColumns="repeat(4, 1fr)" rowGap="l" columnGap="xs">
            ${this.networksTemplate()}
          </wui-grid>
    
          <wui-separator></wui-separator>
    
          <wui-flex padding="s" flexDirection="column" gap="m" alignItems="center">
            <wui-text variant="small-400" color="fg-300" align="center">
              Your connected wallet may not support some of the networks available for this dApp
            </wui-text>
            <wui-link @click=${this.onNetworkHelp.bind(this)}>
              <wui-icon size="xs" color="accent-100" slot="iconLeft" name="helpCircle"></wui-icon>
              What is a network
            </wui-link>
          </wui-flex>
        `}onNetworkHelp(){WS.sendEvent({type:"track",event:"CLICK_NETWORK_HELP"}),YA.push("WhatIsANetwork")}networksTemplate(){let{approvedCaipNetworkIds:e,requestedCaipNetworks:t,supportsAllNetworks:r}=GA.state;return PS.sortRequestedNetworks(e,t)?.map((t=>oq`
            <wui-card-select
              .selected=${this.caipNetwork?.id===t.id}
              imageSrc=${w8(wT.getNetworkImage(t))}
              type="network"
              name=${t.name??t.id}
              @click=${()=>this.onSwitchNetwork(t)}
              .disabled=${!r&&!e?.includes(t.id)}
              data-testid=${`w3m-network-switch-${t.name??t.id}`}
            ></wui-card-select>
          `))}async onSwitchNetwork(e){let{isConnected:t}=eT.state,{approvedCaipNetworkIds:r,supportsAllNetworks:i,caipNetwork:n}=GA.state,{data:o}=YA.state;t&&n?.id!==e.id?r?.includes(e.id)?(await GA.switchActiveNetwork(e),vT.navigateAfterNetworkSwitch()):i&&YA.push("SwitchNetwork",{...o,network:e}):t||(GA.setCaipNetwork(e),YA.push("Connect"))}};$te.styles=Nte,Mte([Nq()],$te.prototype,"caipNetwork",void 0),$te=Mte([wR("w3m-networks-view")],$te),GT(),cO(),Nz(),Iq(),bW(),Iq();var jte=gz`
      :host > wui-flex {
        height: 500px;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
        padding: var(--wui-spacing-m);
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: flex-start;
      }
    
      :host > wui-flex > wui-flex {
        width: 100%;
      }
    
      wui-transaction-list-item-loader {
        width: 100%;
      }
    `,Lte=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Bte=class extends xq{constructor(){super(),this.unsubscribe=[],this.refetchTimeout=void 0,this.selectedOnRampProvider=mT.state.selectedProvider,this.loading=!1,this.coinbaseTransactions=GS.state.coinbaseTransactions,this.tokenImages=rT.state.tokenImages,this.unsubscribe.push(mT.subscribeKey("selectedProvider",(e=>{this.selectedOnRampProvider=e})),rT.subscribeKey("tokenImages",(e=>this.tokenImages=e)),(()=>{clearTimeout(this.refetchTimeout)}),GS.subscribe((e=>{this.coinbaseTransactions={...e.coinbaseTransactions}}))),GS.clearCursor(),this.fetchTransactions()}render(){return oq`
          <wui-flex flexDirection="column" padding="s" gap="xs">
            ${this.loading?this.templateLoading():this.templateTransactionsByYear()}
          </wui-flex>
        `}templateTransactions(e){return e?.map((e=>{let t=tA.formatDate(e?.metadata?.minedAt),r=e.transfers[0],i=r?.fungible_info;if(!i)return null;let n=i?.icon?.url||this.tokenImages?.[i.symbol||""];return oq`
            <wui-onramp-activity-item
              label="Bought"
              .completed=${"ONRAMP_TRANSACTION_STATUS_SUCCESS"===e.metadata.status}
              .inProgress=${"ONRAMP_TRANSACTION_STATUS_IN_PROGRESS"===e.metadata.status}
              .failed=${"ONRAMP_TRANSACTION_STATUS_FAILED"===e.metadata.status}
              purchaseCurrency=${w8(i.symbol)}
              purchaseValue=${r.quantity.numeric}
              date=${t}
              icon=${w8(n)}
              symbol=${w8(i.symbol)}
            ></wui-onramp-activity-item>
          `}))}templateTransactionsByYear(){return Object.keys(this.coinbaseTransactions).sort().reverse().map((e=>{let t=parseInt(e,10);return new Array(12).fill(null).map(((e,t)=>t)).reverse().map((e=>{let r=tH.getTransactionGroupTitle(t,e),i=this.coinbaseTransactions[t]?.[e];return i?oq`
              <wui-flex flexDirection="column">
                <wui-flex
                  alignItems="center"
                  flexDirection="row"
                  .padding=${["xs","s","s","s"]}
                >
                  <wui-text variant="paragraph-500" color="fg-200">${r}</wui-text>
                </wui-flex>
                <wui-flex flexDirection="column" gap="xs">
                  ${this.templateTransactions(i)}
                </wui-flex>
              </wui-flex>
            `:null}))}))}async fetchTransactions(){await this.fetchCoinbaseTransactions()}async fetchCoinbaseTransactions(){let e=eT.state.address,t=AS.state.projectId;if(!e)throw new Error("No address found");if(!t)throw new Error("No projectId found");this.loading=!0,await GS.fetchTransactions(e,"coinbase"),this.loading=!1,this.refetchLoadingTransactions()}refetchLoadingTransactions(){let e=new Date;0!==(this.coinbaseTransactions[e.getFullYear()]?.[e.getMonth()]||[]).filter((e=>"ONRAMP_TRANSACTION_STATUS_IN_PROGRESS"===e.metadata.status)).length?this.refetchTimeout=setTimeout((async()=>{let e=eT.state.address;await GS.fetchTransactions(e,"coinbase"),this.refetchLoadingTransactions()}),3e3):clearTimeout(this.refetchTimeout)}templateLoading(){return Array(7).fill(oq` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map((e=>e))}};Bte.styles=jte,Lte([Nq()],Bte.prototype,"selectedOnRampProvider",void 0),Lte([Nq()],Bte.prototype,"loading",void 0),Lte([Nq()],Bte.prototype,"coinbaseTransactions",void 0),Lte([Nq()],Bte.prototype,"tokenImages",void 0),Bte=Lte([wR("w3m-onramp-activity-view")],Bte),cO(),Nz(),Iq(),bW(),Iq();var Dte=gz`
      :host > wui-grid {
        max-height: 360px;
        overflow: auto;
      }
    
      wui-grid::-webkit-scrollbar {
        display: none;
      }
    `,Ute=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Fte=class extends xq{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=mT.state.paymentCurrency,this.currencies=mT.state.paymentCurrencies,this.currencyImages=rT.state.currencyImages,this.unsubscribe.push(mT.subscribe((e=>{this.selectedCurrency=e.paymentCurrency,this.currencies=e.paymentCurrencies})),rT.subscribeKey("currencyImages",(e=>this.currencyImages=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return oq`
          <wui-flex flexDirection="column" padding="s" gap="xs">
            ${this.currenciesTemplate()}
          </wui-flex>
          <w3m-legal-footer></w3m-legal-footer>
        `}currenciesTemplate(){return this.currencies.map((e=>oq`
            <wui-list-item
              imageSrc=${w8(this.currencyImages?.[e.id])}
              @click=${()=>this.selectCurrency(e)}
              variant="image"
            >
              <wui-text variant="paragraph-500" color="fg-100">${e.id}</wui-text>
            </wui-list-item>
          `))}selectCurrency(e){e&&(mT.setPaymentCurrency(e),hT.close())}};Fte.styles=Dte,Ute([Nq()],Fte.prototype,"selectedCurrency",void 0),Ute([Nq()],Fte.prototype,"currencies",void 0),Ute([Nq()],Fte.prototype,"currencyImages",void 0),Fte=Ute([wR("w3m-onramp-fiat-select-view")],Fte),cO(),Nz(),Iq(),bW();var Hte=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},zte=class extends xq{constructor(){super(),this.unsubscribe=[],this.providers=mT.state.providers,this.unsubscribe.push(mT.subscribeKey("providers",(e=>{this.providers=e})))}firstUpdated(){let e=this.providers.map((async e=>"coinbase"===e.name?await this.getCoinbaseOnRampURL():Promise.resolve(e?.url)));Promise.all(e).then((e=>{this.providers=this.providers.map(((t,r)=>({...t,url:e[r]||""})))}))}render(){return oq`
          <wui-flex flexDirection="column" padding="s" gap="xs">
            ${this.onRampProvidersTemplate()}
          </wui-flex>
          <w3m-onramp-providers-footer></w3m-onramp-providers-footer>
        `}onRampProvidersTemplate(){return this.providers.map((e=>oq`
            <wui-onramp-provider-item
              label=${e.label}
              name=${e.name}
              feeRange=${e.feeRange}
              @click=${()=>{this.onClickProvider(e)}}
              ?disabled=${!e.url}
            ></wui-onramp-provider-item>
          `))}onClickProvider(e){mT.setSelectedProvider(e),YA.push("BuyInProgress"),PS.openHref(e.url,"popupWindow","width=600,height=800,scrollbars=yes")}async getCoinbaseOnRampURL(){let e=eT.state.address,t=GA.state.caipNetwork;if(!e)throw new Error("No address found");if(!t?.name)throw new Error("No network found");let r=kS.WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP[t.name]??kS.WC_COINBASE_PAY_SDK_FALLBACK_CHAIN,i=mT.state.purchaseCurrency,n=i?[i.symbol]:mT.state.purchaseCurrencies.map((e=>e.symbol));return await NS.generateOnRampURL({defaultNetwork:r,destinationWallets:[{address:e,blockchains:kS.WC_COINBASE_PAY_SDK_CHAINS,assets:n}],partnerUserId:e,purchaseAmount:mT.state.purchaseAmount})}};Hte([Nq()],zte.prototype,"providers",void 0),zte=Hte([wR("w3m-onramp-providers-view")],zte),cO(),Nz(),Iq(),bW(),Iq();var qte=gz`
      :host > wui-grid {
        max-height: 360px;
        overflow: auto;
      }
    
      wui-grid::-webkit-scrollbar {
        display: none;
      }
    `,Wte=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Vte=class extends xq{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=mT.state.purchaseCurrencies,this.tokens=mT.state.purchaseCurrencies,this.tokenImages=rT.state.tokenImages,this.unsubscribe.push(mT.subscribe((e=>{this.selectedCurrency=e.purchaseCurrencies,this.tokens=e.purchaseCurrencies})),rT.subscribeKey("tokenImages",(e=>this.tokenImages=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return oq`
          <wui-flex flexDirection="column" padding="s" gap="xs">
            ${this.currenciesTemplate()}
          </wui-flex>
          <w3m-legal-footer></w3m-legal-footer>
        `}currenciesTemplate(){return this.tokens.map((e=>oq`
            <wui-list-item
              imageSrc=${w8(this.tokenImages?.[e.symbol])}
              @click=${()=>this.selectToken(e)}
              variant="image"
            >
              <wui-flex gap="3xs" alignItems="center">
                <wui-text variant="paragraph-500" color="fg-100">${e.name}</wui-text>
                <wui-text variant="small-400" color="fg-200">${e.symbol}</wui-text>
              </wui-flex>
            </wui-list-item>
          `))}selectToken(e){e&&(mT.setPurchaseCurrency(e),hT.close())}};Vte.styles=qte,Wte([Nq()],Vte.prototype,"selectedCurrency",void 0),Wte([Nq()],Vte.prototype,"tokens",void 0),Wte([Nq()],Vte.prototype,"tokenImages",void 0),Vte=Wte([wR("w3m-onramp-token-select-view")],Vte),Nz(),Iq(),bW(),Iq();var Gte=gz`
      :host > wui-flex:first-child {
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
      }
    
      wui-loading-hexagon {
        position: absolute;
      }
    
      .action-button {
        width: 100%;
        border-radius: var(--wui-border-radius-xs);
      }
    
      .action-button:disabled {
        border-color: 1px solid var(--wui-gray-glass-005);
      }
    
      .convert-inputs-container {
        position: relative;
      }
    
      .replace-tokens-button {
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        gap: var(--wui-spacing-1xs);
        height: 40px;
        width: 40px;
        padding: var(--wui-spacing-xs);
        border: none;
        border-radius: var(--wui-border-radius-xxs);
        background: var(--wui-gray-glass-005);
        transition: background-color var(--wui-duration-md) var(--wui-ease-out-power-1);
        will-change: background-color;
        z-index: 20;
      }
    
      .replace-tokens-button:hover {
        background: var(--wui-gray-glass-010);
      }
    
      .details-container > wui-flex {
        background: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-xxs);
        width: 100%;
      }
    
      .details-container > wui-flex > button {
        border: none;
        background: none;
        padding: var(--wui-spacing-s);
        border-radius: var(--wui-border-radius-xxs);
        transition: background 0.2s linear;
      }
    
      .details-container > wui-flex > button:hover {
        background: var(--wui-gray-glass-002);
      }
    
      .details-content-container {
        padding: var(--wui-spacing-1xs);
        display: flex;
        align-items: center;
        justify-content: center;
      }
    
      .details-content-container > wui-flex {
        width: 100%;
      }
    
      .details-row {
        width: 100%;
        padding: var(--wui-spacing-s) var(--wui-spacing-xl);
        border-radius: var(--wui-border-radius-xxs);
        background: var(--wui-gray-glass-002);
      }
    
      .free-badge {
        background: rgba(38, 217, 98, 0.15);
        border-radius: var(--wui-border-radius-4xs);
        padding: 4.5px 6px;
      }
    `;cO(),GT();var Zte=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Kte=class extends xq{constructor(){super(),this.unsubscribe=[],this.detailsOpen=!1,this.caipNetworkId=GA.state.caipNetwork?.id,this.initialized=QA.state.initialized,this.loading=QA.state.loading,this.loadingPrices=QA.state.loadingPrices,this.sourceToken=QA.state.sourceToken,this.sourceTokenAmount=QA.state.sourceTokenAmount,this.sourceTokenPriceInUSD=QA.state.sourceTokenPriceInUSD,this.toToken=QA.state.toToken,this.toTokenAmount=QA.state.toTokenAmount,this.toTokenPriceInUSD=QA.state.toTokenPriceInUSD,this.inputError=QA.state.inputError,this.gasPriceInUSD=QA.state.gasPriceInUSD,this.priceImpact=QA.state.priceImpact,this.maxSlippage=QA.state.maxSlippage,this.transactionLoading=QA.state.transactionLoading,this.onDebouncedGetSwapCalldata=PS.debounce((async()=>{await QA.convertTokens()}),500),GA.subscribeKey("caipNetwork",(e=>{this.caipNetworkId!==e?.id&&(this.caipNetworkId=e?.id,QA.resetTokens(),QA.resetValues(),QA.initializeState())})),this.unsubscribe.push(hT.subscribeKey("open",(e=>{e||QA.resetValues()})),YA.subscribeKey("view",(e=>{e.includes("Convert")||QA.resetValues()})),QA.subscribe((e=>{this.initialized=e.initialized,this.loading=e.loading,this.loadingPrices=e.loadingPrices,this.transactionLoading=e.transactionLoading,this.sourceToken=e.sourceToken,this.sourceTokenAmount=e.sourceTokenAmount,this.sourceTokenPriceInUSD=e.sourceTokenPriceInUSD,this.toToken=e.toToken,this.toTokenAmount=e.toTokenAmount,this.toTokenPriceInUSD=e.toTokenPriceInUSD,this.inputError=e.inputError,this.gasPriceInUSD=e.gasPriceInUSD,this.priceImpact=e.priceImpact,this.maxSlippage=e.maxSlippage}))),this.watchTokensAndValues()}firstUpdated(){this.initialized||QA.initializeState()}disconnectedCallback(){QA.setLoading(!1),this.unsubscribe.forEach((e=>e?.())),clearInterval(this.interval)}render(){return oq`
          <wui-flex flexDirection="column" padding="l" gap="s">
            ${this.initialized?this.templateSwap():this.templateLoading()}
          </wui-flex>
        `}watchTokensAndValues(){this.interval=setInterval((()=>{QA.getNetworkTokenPrice(),QA.getMyTokensWithBalance(),QA.refreshConvertValues()}),2e4)}templateSwap(){return oq`
          <wui-flex flexDirection="column" gap="l">
            <wui-flex
              flexDirection="column"
              alignItems="center"
              gap="xs"
              class="convert-inputs-container"
            >
              ${this.templateTokenInput("sourceToken",this.sourceToken)}
              ${this.templateTokenInput("toToken",this.toToken)} ${this.templateReplaceTokensButton()}
            </wui-flex>
            ${this.templateDetails()} ${this.templateActionButton()}
          </wui-flex>
        `}actionButtonLabel(){return this.inputError?this.inputError:"Review convert"}templateReplaceTokensButton(){return oq`
          <button class="replace-tokens-button" @click=${this.onSwitchTokens.bind(this)}>
            <wui-icon name="recycleHorizontal" color="fg-250" size="lg"></wui-icon>
          </button>
        `}templateLoading(){return oq`<wui-flex
          flexGrow="1"
          flexDirection="column"
          justifyContent="center"
          alignItems="center"
          .padding=${["3xl","xl","3xl","xl"]}
          gap="xl"
        >
          <wui-icon-box
            backgroundColor="glass-005"
            background="gray"
            iconColor="fg-200"
            icon="swapHorizontalRoundedBold"
            size="lg"
            ?border=${!0}
            borderColor="wui-color-bg-125"
          ></wui-icon-box>
    
          <wui-loading-hexagon></wui-loading-hexagon>
        </wui-flex>`}templateTokenInput(e,t){let r=QA.state.myTokensWithBalance?.find((e=>e?.address===t?.address)),i="toToken"===e?this.toTokenAmount:this.sourceTokenAmount,n="toToken"===e?this.toTokenPriceInUSD:this.sourceTokenPriceInUSD,o=parseFloat(i)*n;return"toToken"===e&&(o-=this.gasPriceInUSD||0),oq`<w3m-convert-input
          .value=${"toToken"===e?this.toTokenAmount:this.sourceTokenAmount}
          ?disabled=${this.loading&&"toToken"===e}
          .onSetAmount=${this.handleChangeAmount.bind(this)}
          target=${e}
          .token=${t}
          .balance=${r?.quantity?.numeric}
          .price=${this.sourceTokenPriceInUSD}
          .marketValue=${isNaN(o)?"":FM.formatNumberToLocalString(o)}
          .onSetMaxValue=${this.onSetMaxValue.bind(this)}
        ></w3m-convert-input>`}onSetMaxValue(e,t){let r=("sourceToken"===e?this.sourceToken:this.toToken)?.address===kS.NATIVE_TOKEN_ADDRESS,i="0";if(!t)return i="0",void this.handleChangeAmount(e,i);if(!this.gasPriceInUSD)return i=t,void this.handleChangeAmount(e,i);let n=WA.bigNumber(this.gasPriceInUSD.toFixed(5)).dividedBy(this.sourceTokenPriceInUSD),o=r?WA.bigNumber(t).minus(n):WA.bigNumber(t);this.handleChangeAmount(e,o.isGreaterThan(0)?o.toFixed(20):"0")}templateDetails(){if(this.loading||this.inputError||!this.sourceToken||!this.toToken||!this.sourceTokenAmount||!this.toTokenAmount)return null;let e=this.sourceTokenPriceInUSD&&this.toTokenPriceInUSD?1/this.toTokenPriceInUSD*this.sourceTokenPriceInUSD:0;return oq`
          <w3m-convert-details
            .detailsOpen=${this.detailsOpen}
            sourceTokenSymbol=${this.sourceToken?.symbol}
            sourceTokenPrice=${this.sourceTokenPriceInUSD}
            toTokenSymbol=${this.toToken?.symbol}
            toTokenConvertedAmount=${e}
            gasPriceInUSD=${this.gasPriceInUSD}
            .priceImpact=${this.priceImpact}
            slippageRate=${kS.CONVERT_SLIPPAGE_TOLERANCE}
            .maxSlippage=${this.maxSlippage}
          ></w3m-convert-details>
        `}handleChangeAmount(e,t){QA.clearError(),"sourceToken"===e?QA.setSourceTokenAmount(t):QA.setToTokenAmount(t),this.onDebouncedGetSwapCalldata()}templateActionButton(){let e=!this.toToken||!this.sourceToken,t=this.loading||this.loadingPrices||this.transactionLoading;return oq` <wui-flex gap="xs">
          <wui-button
            class="action-button"
            ?fullWidth=${!0}
            size="lg"
            borderRadius="xs"
            variant=${e?"shade":"fill"}
            .loading=${t}
            .disabled=${t||e||this.inputError}
            @click=${this.onConvertPreview}
          >
            ${this.actionButtonLabel()}
          </wui-button>
        </wui-flex>`}onSwitchTokens(){QA.switchTokens()}onConvertPreview(){YA.push("ConvertPreview")}};Kte.styles=Gte,Zte([Nq()],Kte.prototype,"interval",void 0),Zte([Nq()],Kte.prototype,"detailsOpen",void 0),Zte([Nq()],Kte.prototype,"caipNetworkId",void 0),Zte([Nq()],Kte.prototype,"initialized",void 0),Zte([Nq()],Kte.prototype,"loading",void 0),Zte([Nq()],Kte.prototype,"loadingPrices",void 0),Zte([Nq()],Kte.prototype,"sourceToken",void 0),Zte([Nq()],Kte.prototype,"sourceTokenAmount",void 0),Zte([Nq()],Kte.prototype,"sourceTokenPriceInUSD",void 0),Zte([Nq()],Kte.prototype,"toToken",void 0),Zte([Nq()],Kte.prototype,"toTokenAmount",void 0),Zte([Nq()],Kte.prototype,"toTokenPriceInUSD",void 0),Zte([Nq()],Kte.prototype,"inputError",void 0),Zte([Nq()],Kte.prototype,"gasPriceInUSD",void 0),Zte([Nq()],Kte.prototype,"priceImpact",void 0),Zte([Nq()],Kte.prototype,"maxSlippage",void 0),Zte([Nq()],Kte.prototype,"transactionLoading",void 0),Kte=Zte([wR("w3m-convert-view")],Kte),Nz(),Iq(),Iq();var Yte=gz`
      :host > wui-flex:first-child {
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
      }
    
      .preview-container,
      .details-container {
        width: 100%;
      }
    
      .token-image {
        width: 24px;
        height: 24px;
        box-shadow: 0 0 0 2px var(--wui-gray-glass-005);
        border-radius: 12px;
      }
    
      wui-loading-hexagon {
        position: absolute;
      }
    
      .token-item {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--wui-spacing-xxs);
        padding: var(--wui-spacing-xs);
        height: 40px;
        border: none;
        border-radius: 80px;
        background: var(--wui-gray-glass-002);
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);
        cursor: pointer;
        transition: background 0.2s linear;
      }
    
      .token-item:hover {
        background: var(--wui-gray-glass-005);
      }
    
      .preview-token-details-container {
        width: 100%;
      }
    
      .details-row {
        width: 100%;
        padding: var(--wui-spacing-s) var(--wui-spacing-xl);
        border-radius: var(--wui-border-radius-xxs);
        background: var(--wui-gray-glass-002);
      }
    
      .action-buttons-container {
        width: 100%;
        gap: var(--wui-spacing-xs);
      }
    
      .action-buttons-container > button {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        height: 48px;
        border-radius: var(--wui-border-radius-xs);
        border: none;
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);
      }
    
      .action-buttons-container > button:disabled {
        opacity: 0.8;
        cursor: not-allowed;
      }
    
      .cancel-button:hover,
      .convert-button:hover {
        cursor: pointer;
      }
    
      .action-buttons-container > button.cancel-button {
        flex: 2;
      }
    
      .action-buttons-container > button.convert-button {
        flex: 4;
        background-color: var(--wui-color-accent-090);
      }
    
      .action-buttons-container > button.convert-button > wui-text {
        color: white;
      }
    
      .details-container > wui-flex {
        background: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-xxs);
        width: 100%;
      }
    
      .details-container > wui-flex > button {
        border: none;
        background: none;
        padding: var(--wui-spacing-s);
        border-radius: var(--wui-border-radius-xxs);
        transition: background 0.2s linear;
      }
    
      .details-container > wui-flex > button:hover {
        background: var(--wui-gray-glass-002);
      }
    
      .details-content-container {
        padding: var(--wui-spacing-1xs);
        display: flex;
        align-items: center;
        justify-content: center;
      }
    
      .details-content-container > wui-flex {
        width: 100%;
      }
    
      .details-row {
        width: 100%;
        padding: var(--wui-spacing-s) var(--wui-spacing-xl);
        border-radius: var(--wui-border-radius-xxs);
        background: var(--wui-gray-glass-002);
      }
    
      .free-badge {
        background: rgba(38, 217, 98, 0.15);
        border-radius: var(--wui-border-radius-4xs);
        padding: 4.5px 6px;
      }
    `;cO(),bW();var Jte=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Qte=class extends xq{constructor(){super(),this.unsubscribe=[],this.detailsOpen=!0,this.approvalTransaction=QA.state.approvalTransaction,this.convertTransaction=QA.state.convertTransaction,this.sourceToken=QA.state.sourceToken,this.sourceTokenAmount=QA.state.sourceTokenAmount??"",this.sourceTokenPriceInUSD=QA.state.sourceTokenPriceInUSD,this.toToken=QA.state.toToken,this.toTokenAmount=QA.state.toTokenAmount??"",this.toTokenPriceInUSD=QA.state.toTokenPriceInUSD,this.caipNetwork=GA.state.caipNetwork,this.transactionLoading=QA.state.transactionLoading,this.balanceSymbol=eT.state.balanceSymbol,this.gasPriceInUSD=QA.state.gasPriceInUSD,this.priceImpact=QA.state.priceImpact,this.maxSlippage=QA.state.maxSlippage,this.unsubscribe.push(eT.subscribeKey("balanceSymbol",(e=>{this.balanceSymbol!==e&&YA.goBack()})),GA.subscribeKey("caipNetwork",(e=>{this.caipNetwork!==e&&(this.caipNetwork=e)})),QA.subscribe((e=>{this.approvalTransaction=e.approvalTransaction,this.convertTransaction=e.convertTransaction,this.sourceToken=e.sourceToken,this.gasPriceInUSD=e.gasPriceInUSD,this.toToken=e.toToken,this.transactionLoading=e.transactionLoading,this.gasPriceInUSD=e.gasPriceInUSD,this.toTokenPriceInUSD=e.toTokenPriceInUSD,this.sourceTokenAmount=e.sourceTokenAmount??"",this.toTokenAmount=e.toTokenAmount??"",this.priceImpact=e.priceImpact,this.maxSlippage=e.maxSlippage})))}render(){return oq`
          <wui-flex flexDirection="column" padding="l" gap="s">${this.templateSwap()}</wui-flex>
        `}templateSwap(){let e=`${FM.formatNumberToLocalString(parseFloat(this.sourceTokenAmount))} ${this.sourceToken?.symbol}`,t=`${FM.formatNumberToLocalString(parseFloat(this.toTokenAmount))} ${this.toToken?.symbol}`,r=parseFloat(this.sourceTokenAmount)*this.sourceTokenPriceInUSD,i=parseFloat(this.toTokenAmount)*this.toTokenPriceInUSD-(this.gasPriceInUSD||0),n=FM.formatNumberToLocalString(r),o=FM.formatNumberToLocalString(i);return oq`
          <wui-flex flexDirection="column" alignItems="center" gap="l">
            <wui-flex class="preview-container" flexDirection="column" alignItems="flex-start" gap="l">
              <wui-flex
                class="preview-token-details-container"
                alignItems="center"
                justifyContent="space-between"
                gap="l"
              >
                <wui-flex flexDirection="column" alignItems="flex-start" gap="4xs">
                  <wui-text variant="small-400" color="fg-150">Send</wui-text>
                  <wui-text variant="paragraph-400" color="fg-100">$${n}</wui-text>
                </wui-flex>
                <wui-token-button
                  flexDirection="row-reverse"
                  text=${e}
                  imageSrc=${this.sourceToken?.logoUri}
                >
                </wui-token-button>
              </wui-flex>
              <wui-icon name="recycleHorizontal" color="fg-200" size="md"></wui-icon>
              <wui-flex
                class="preview-token-details-container"
                alignItems="center"
                justifyContent="space-between"
                gap="l"
              >
                <wui-flex flexDirection="column" alignItems="flex-start" gap="4xs">
                  <wui-text variant="small-400" color="fg-150">Receive</wui-text>
                  <wui-text variant="paragraph-400" color="fg-100">$${o}</wui-text>
                </wui-flex>
                <wui-token-button
                  flexDirection="row-reverse"
                  text=${t}
                  imageSrc=${this.toToken?.logoUri}
                >
                </wui-token-button>
              </wui-flex>
            </wui-flex>
    
            ${this.templateDetails()}
    
            <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="xs">
              <wui-icon size="sm" color="fg-200" name="infoCircle"></wui-icon>
              <wui-text variant="small-400" color="fg-200">Review transaction carefully</wui-text>
            </wui-flex>
    
            <wui-flex
              class="action-buttons-container"
              flexDirection="row"
              alignItems="center"
              justifyContent="space-between"
              gap="xs"
            >
              <button
                class="cancel-button"
                ?disabled=${this.transactionLoading}
                @click=${this.onCancelTransaction.bind(this)}
              >
                <wui-text variant="paragraph-600" color="fg-200">Cancel</wui-text>
              </button>
              <button
                class="convert-button"
                ?disabled=${this.transactionLoading}
                @click=${this.onSendTransaction.bind(this)}
              >
                ${this.transactionLoading?oq`<wui-loading-spinner color="inverse-100"></wui-loading-spinner>`:oq`<wui-text variant="paragraph-600" color="inverse-100">
                      ${this.actionButtonLabel()}
                    </wui-text>`}
              </button>
            </wui-flex>
          </wui-flex>
        `}templateDetails(){let e=this.sourceTokenPriceInUSD&&this.toTokenPriceInUSD?1/this.toTokenPriceInUSD*this.sourceTokenPriceInUSD:0;return oq`
          <w3m-convert-details
            detailsOpen=${this.detailsOpen}
            sourceTokenSymbol=${this.sourceToken?.symbol}
            sourceTokenPrice=${this.sourceTokenPriceInUSD}
            toTokenSymbol=${this.toToken?.symbol}
            toTokenConvertedAmount=${e}
            gasPriceInUSD=${FM.formatNumberToLocalString(this.gasPriceInUSD,3)}
            .priceImpact=${this.priceImpact}
            slippageRate=${kS.CONVERT_SLIPPAGE_TOLERANCE}
            .maxSlippage=${this.maxSlippage}
          ></w3m-convert-details>
        `}actionButtonLabel(){return this.approvalTransaction?"Approve":"Convert"}onCancelTransaction(){YA.goBack()}onSendTransaction(){this.approvalTransaction?QA.sendTransactionForApproval(this.approvalTransaction):QA.sendTransactionForConvert(this.convertTransaction)}};Qte.styles=Yte,Jte([Nq()],Qte.prototype,"detailsOpen",void 0),Jte([Nq()],Qte.prototype,"approvalTransaction",void 0),Jte([Nq()],Qte.prototype,"convertTransaction",void 0),Jte([Nq()],Qte.prototype,"sourceToken",void 0),Jte([Nq()],Qte.prototype,"sourceTokenAmount",void 0),Jte([Nq()],Qte.prototype,"sourceTokenPriceInUSD",void 0),Jte([Nq()],Qte.prototype,"toToken",void 0),Jte([Nq()],Qte.prototype,"toTokenAmount",void 0),Jte([Nq()],Qte.prototype,"toTokenPriceInUSD",void 0),Jte([Nq()],Qte.prototype,"caipNetwork",void 0),Jte([Nq()],Qte.prototype,"transactionLoading",void 0),Jte([Nq()],Qte.prototype,"balanceSymbol",void 0),Jte([Nq()],Qte.prototype,"gasPriceInUSD",void 0),Jte([Nq()],Qte.prototype,"priceImpact",void 0),Jte([Nq()],Qte.prototype,"maxSlippage",void 0),Qte=Jte([wR("w3m-convert-preview-view")],Qte),Nz(),Iq(),Iq();var Xte=gz`
      :host {
        --tokens-scroll--top-opacity: 0;
        --tokens-scroll--bottom-opacity: 1;
        --suggested-tokens-scroll--left-opacity: 0;
        --suggested-tokens-scroll--right-opacity: 1;
      }
    
      :host > wui-flex:first-child {
        overflow-y: hidden;
        overflow-x: hidden;
        scrollbar-width: none;
        scrollbar-height: none;
      }
    
      wui-loading-hexagon {
        position: absolute;
      }
    
      .search-input-container,
      .suggested-tokens-container {
        padding-left: var(--wui-spacing-s);
        padding-right: var(--wui-spacing-s);
      }
    
      .tokens-container .tokens {
        padding: 0px var(--wui-spacing-s);
        padding-bottom: var(--wui-spacing-s);
      }
    
      .search-input-container {
        padding-top: var(--wui-spacing-s);
      }
    
      .suggested-tokens-container {
        overflow-x: auto;
        mask-image: linear-gradient(
          to right,
          rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 0px,
          rgba(200, 200, 200, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 1px,
          black 50px,
          black 90px,
          black calc(100% - 90px),
          black calc(100% - 50px),
          rgba(155, 155, 155, calc(1 - var(--suggested-tokens-scroll--right-opacity))) calc(100% - 1px),
          rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--right-opacity))) 100%
        );
      }
    
      .suggested-tokens-container::-webkit-scrollbar {
        display: none;
      }
    
      .tokens-container {
        border-top: 1px solid var(--wui-gray-glass-005);
        height: 100%;
        max-height: 390px;
      }
    
      .tokens {
        width: 100%;
        overflow-y: auto;
        mask-image: linear-gradient(
          to bottom,
          rgba(0, 0, 0, calc(1 - var(--tokens-scroll--top-opacity))) 0px,
          rgba(200, 200, 200, calc(1 - var(--tokens-scroll--top-opacity))) 1px,
          black 50px,
          black 90px,
          black calc(100% - 90px),
          black calc(100% - 50px),
          rgba(155, 155, 155, calc(1 - var(--tokens-scroll--bottom-opacity))) calc(100% - 1px),
          rgba(0, 0, 0, calc(1 - var(--tokens-scroll--bottom-opacity))) 100%
        );
      }
    
      .network-search-input,
      .select-network-button {
        height: 40px;
      }
    
      .select-network-button {
        border: none;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: var(--wui-spacing-xs);
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-005);
        background-color: transparent;
        border-radius: var(--wui-border-radius-xxs);
        padding: var(--wui-spacing-xs);
        align-items: center;
        transition: background-color 0.2s linear;
      }
    
      .select-network-button:hover {
        background-color: var(--wui-gray-glass-002);
      }
    
      .select-network-button > wui-image {
        width: 26px;
        height: 26px;
        border-radius: var(--wui-border-radius-xs);
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);
      }
    `;cO(),bW();var ere=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},tre=class extends xq{constructor(){super(),this.unsubscribe=[],this.targetToken=YA.state.data?.target,this.sourceToken=QA.state.sourceToken,this.toToken=QA.state.toToken,this.searchValue="",this.unsubscribe.push(QA.subscribe((e=>{this.sourceToken=e.sourceToken,this.toToken=e.toToken}))),this.watchTokens()}updated(){this.renderRoot?.querySelector(".suggested-tokens-container")?.addEventListener("scroll",this.handleSuggestedTokensScroll.bind(this)),this.renderRoot?.querySelector(".tokens")?.addEventListener("scroll",this.handleTokenListScroll.bind(this))}disconnectedCallback(){super.disconnectedCallback();let e=this.renderRoot?.querySelector(".suggested-tokens-container"),t=this.renderRoot?.querySelector(".tokens");e?.removeEventListener("scroll",this.handleSuggestedTokensScroll.bind(this)),t?.removeEventListener("scroll",this.handleTokenListScroll.bind(this)),clearInterval(this.interval)}render(){return oq`
          <wui-flex flexDirection="column" gap="s">
            ${this.templateSearchInput()} ${this.templateSuggestedTokens()} ${this.templateTokens()}
          </wui-flex>
        `}watchTokens(){this.interval=setInterval((()=>{QA.getNetworkTokenPrice(),QA.getMyTokensWithBalance()}),5e3)}onSelectToken(e){"sourceToken"===this.targetToken?QA.setSourceToken(e):QA.setToToken(e),YA.goBack()}templateSearchInput(){return oq`
          <wui-flex class="search-input-container" gap="xs">
            <wui-input-text
              class="network-search-input"
              size="sm"
              placeholder="Search token"
              icon="search"
              .value=${this.searchValue}
              @inputChange=${this.onSearchInputChange.bind(this)}
            ></wui-input-text>
          </wui-flex>
        `}templateTokens(){let e=QA.state.myTokensWithBalance?Object.values(QA.state.myTokensWithBalance):[],t=QA.state.popularTokens?QA.state.popularTokens:[],r=this.filterTokensWithText(e,this.searchValue),i=this.filterTokensWithText(t,this.searchValue);return oq`
          <wui-flex class="tokens-container">
            <wui-flex class="tokens" flexDirection="column">
              ${r?.length>0?oq`
                    <wui-flex justifyContent="flex-start" padding="s">
                      <wui-text variant="paragraph-500" color="fg-200">Your tokens</wui-text>
                    </wui-flex>
                    ${r.map((e=>{let t=e.symbol===this.sourceToken?.symbol||e.symbol===this.toToken?.symbol;return oq`
                        <wui-token-list-item
                          name=${e.name}
                          ?disabled=${t}
                          symbol=${e.symbol}
                          price=${e?.price}
                          amount=${e?.quantity?.numeric}
                          imageSrc=${e.logoUri}
                          @click=${()=>{t||this.onSelectToken(e)}}
                        >
                        </wui-token-list-item>
                      `}))}
                  `:null}
    
              <wui-flex justifyContent="flex-start" padding="s">
                <wui-text variant="paragraph-500" color="fg-200">Popular tokens</wui-text>
              </wui-flex>
    
              ${i?.length>0?i.map((e=>oq`
                      <wui-token-list-item
                        name=${e.name}
                        symbol=${e.symbol}
                        imageSrc=${e.logoUri}
                        @click=${()=>this.onSelectToken(e)}
                      >
                      </wui-token-list-item>
                    `)):null}
            </wui-flex>
          </wui-flex>
        `}templateSuggestedTokens(){let e=QA.state.suggestedTokens?QA.state.suggestedTokens.slice(0,8):null;return e?oq`
          <wui-flex class="suggested-tokens-container" gap="xs">
            ${e.map((e=>oq`
                <wui-token-button
                  text=${e.symbol}
                  imageSrc=${e.logoUri}
                  @click=${()=>this.onSelectToken(e)}
                >
                </wui-token-button>
              `))}
          </wui-flex>
        `:null}onSearchInputChange(e){this.searchValue=e.detail}handleSuggestedTokensScroll(){let e=this.renderRoot?.querySelector(".suggested-tokens-container");e&&(e.style.setProperty("--suggested-tokens-scroll--left-opacity",QF.interpolate([0,100],[0,1],e.scrollLeft).toString()),e.style.setProperty("--suggested-tokens-scroll--right-opacity",QF.interpolate([0,100],[0,1],e.scrollWidth-e.scrollLeft-e.offsetWidth).toString()))}handleTokenListScroll(){let e=this.renderRoot?.querySelector(".tokens");e&&(e.style.setProperty("--tokens-scroll--top-opacity",QF.interpolate([0,100],[0,1],e.scrollTop).toString()),e.style.setProperty("--tokens-scroll--bottom-opacity",QF.interpolate([0,100],[0,1],e.scrollHeight-e.scrollTop-e.offsetHeight).toString()))}filterTokensWithText(e,t){return e.filter((e=>`${e.symbol} ${e.name} ${e.address}`.toLowerCase().includes(t.toLowerCase())))}};tre.styles=Xte,ere([Nq()],tre.prototype,"interval",void 0),ere([Nq()],tre.prototype,"targetToken",void 0),ere([Nq()],tre.prototype,"sourceToken",void 0),ere([Nq()],tre.prototype,"toToken",void 0),ere([Nq()],tre.prototype,"searchValue",void 0),tre=ere([wR("w3m-convert-select-token-view")],tre),Nz(),Iq(),Iq();var rre=gz`
      :host > wui-flex:first-child {
        height: 500px;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
        padding: var(--wui-spacing-m);
      }
    
      :host > wui-flex:first-child::-webkit-scrollbar {
        display: none;
      }
    `,ire=class extends xq{render(){return oq`
          <wui-flex flexDirection="column" gap="s">
            <w3m-activity-list page="activity"></w3m-activity-list>
          </wui-flex>
        `}};ire.styles=rre,ire=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-transactions-view")],ire),cO(),Nz(),Iq();var nre=[{images:["network","layers","system"],title:"The system’s nuts and bolts",text:"A network is what brings the blockchain to life, as this technical infrastructure allows apps to access the ledger and smart contract services."},{images:["noun","defiAlt","dao"],title:"Designed for different uses",text:"Each network is designed differently, and may therefore suit certain apps and experiences."}],ore=class extends xq{render(){return oq`
          <wui-flex
            flexDirection="column"
            .padding=${["xxl","xl","xl","xl"]}
            alignItems="center"
            gap="xl"
          >
            <w3m-help-widget .data=${nre}></w3m-help-widget>
            <wui-button
              variant="fill"
              size="sm"
              @click=${()=>{PS.openHref("https://ethereum.org/en/developers/docs/networks/","_blank")}}
            >
              Learn more
              <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon>
            </wui-button>
          </wui-flex>
        `}};ore=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-what-is-a-network-view")],ore),cO(),Nz(),Iq();var are=[{images:["login","profile","lock"],title:"One login for all of web3",text:"Log in to any app by connecting your wallet. Say goodbye to countless passwords!"},{images:["defi","nft","eth"],title:"A home for your digital assets",text:"A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs."},{images:["browser","noun","dao"],title:"Your gateway to a new web",text:"With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more."}],sre=class extends xq{render(){return oq`
          <wui-flex
            flexDirection="column"
            .padding=${["xxl","xl","xl","xl"]}
            alignItems="center"
            gap="xl"
          >
            <w3m-help-widget .data=${are}></w3m-help-widget>
            <wui-button variant="fill" size="sm" @click=${this.onGetWallet.bind(this)}>
              <wui-icon color="inherit" slot="iconLeft" name="wallet"></wui-icon>
              Get a wallet
            </wui-button>
          </wui-flex>
        `}onGetWallet(){WS.sendEvent({type:"track",event:"CLICK_GET_WALLET"}),YA.push("GetWallet")}};sre=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-what-is-a-wallet-view")],sre),Nz(),cO(),Iq();var cre=class extends xq{render(){return oq`
          <wui-flex
            flexDirection="column"
            .padding=${["xxl","3xl","xl","3xl"]}
            alignItems="center"
            gap="xl"
          >
            <wui-visual name="onrampCard"></wui-visual>
            <wui-flex flexDirection="column" gap="xs" alignItems="center">
              <wui-text align="center" variant="paragraph-500" color="fg-100">
                Quickly and easily buy digital assets!
              </wui-text>
              <wui-text align="center" variant="small-400" color="fg-200">
                Simply select your preferred onramp provider and add digital assets to your account
                using your credit card or bank transfer
              </wui-text>
            </wui-flex>
            <wui-button @click=${YA.goBack}>
              <wui-icon size="sm" color="inherit" name="add" slot="iconLeft"></wui-icon>
              Buy
            </wui-button>
          </wui-flex>
        `}};cre=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-what-is-a-buy-view")],cre),Nz(),Nz(),Iq(),cO(),bW(),Iq();var lre=gz`
      wui-loading-spinner {
        margin: 9px auto;
      }
    `,ure=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},dre=class extends xq{firstUpdated(){this.startOTPTimeout()}disconnectedCallback(){clearTimeout(this.OTPTimeout)}constructor(){super(),this.loading=!1,this.timeoutTimeLeft=ste.getTimeToNextEmailLogin(),this.error="",this.otp="",this.email=YA.state.data?.email,this.emailConnector=aT.getEmailConnector()}render(){if(!this.email)throw new Error("w3m-email-otp-widget: No email provided");let e=!!this.timeoutTimeLeft,t=this.getFooterLabels(e);return oq`
          <wui-flex
            flexDirection="column"
            alignItems="center"
            .padding=${["l","0","l","0"]}
            gap="l"
          >
            <wui-flex flexDirection="column" alignItems="center">
              <wui-text variant="paragraph-400" color="fg-100">Enter the code we sent to</wui-text>
              <wui-text variant="paragraph-500" color="fg-100">${this.email}</wui-text>
            </wui-flex>
    
            <wui-text variant="small-400" color="fg-200">The code expires in 20 minutes</wui-text>
    
            ${this.loading?oq`<wui-loading-spinner size="xl" color="accent-100"></wui-loading-spinner>`:oq` <wui-flex flexDirection="column" alignItems="center" gap="xs">
                  <wui-otp
                    dissabled
                    length="6"
                    @inputChange=${this.onOtpInputChange.bind(this)}
                    .otp=${this.otp}
                  ></wui-otp>
                  ${this.error?oq`
                        <wui-text variant="small-400" align="center" color="error-100">
                          ${this.error}. Try Again
                        </wui-text>
                      `:null}
                </wui-flex>`}
    
            <wui-flex alignItems="center">
              <wui-text variant="small-400" color="fg-200">${t.title}</wui-text>
              <wui-link @click=${this.onResendCode.bind(this)} .disabled=${e}>
                ${t.action}
              </wui-link>
            </wui-flex>
          </wui-flex>
        `}startOTPTimeout(){this.timeoutTimeLeft=ste.getTimeToNextEmailLogin(),this.OTPTimeout=setInterval((()=>{this.timeoutTimeLeft>0?this.timeoutTimeLeft=ste.getTimeToNextEmailLogin():clearInterval(this.OTPTimeout)}),1e3)}async onOtpInputChange(e){try{this.loading||(this.otp=e.detail,this.emailConnector&&6===this.otp.length&&(this.loading=!0,await(this.onOtpSubmit?.(this.otp))))}catch(e){this.error=PS.parseError(e),this.loading=!1}}async onResendCode(){try{if(this.onOtpResend){if(!this.loading&&!this.timeoutTimeLeft){if(this.error="",this.otp="",!aT.getEmailConnector()||!this.email)throw new Error("w3m-email-otp-widget: Unable to resend email");this.loading=!0,await this.onOtpResend(this.email),this.startOTPTimeout(),$S.showSuccess("Code email resent")}}else this.onStartOver&&this.onStartOver()}catch(e){$S.showError(e)}finally{this.loading=!1}}getFooterLabels(e){return this.onStartOver?{title:"Something wrong?",action:"Try again "+(e?`in ${this.timeoutTimeLeft}s`:"")}:{title:"Didn't receive it?",action:"Resend "+(e?`in ${this.timeoutTimeLeft}s`:"Code")}}};dre.styles=lre,ure([Nq()],dre.prototype,"loading",void 0),ure([Nq()],dre.prototype,"timeoutTimeLeft",void 0),ure([Nq()],dre.prototype,"error",void 0),dre=ure([wR("w3m-email-otp-widget")],dre),cO(),bW();var hre=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},pre=class extends dre{constructor(){super(),this.unsubscribe=[],this.smartAccountDeployed=eT.state.smartAccountDeployed,this.onOtpSubmit=async e=>{try{if(this.emailConnector){let t=GA.checkIfSmartAccountEnabled();await this.emailConnector.provider.connectOtp({otp:e}),WS.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),await KS.connectExternal(this.emailConnector),WS.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"email",name:this.emailConnector.name||"Unknown"}}),t&&!this.smartAccountDeployed?YA.push("UpgradeToSmartAccount"):hT.close()}}catch(e){throw WS.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),e}},this.onOtpResend=async e=>{this.emailConnector&&(await this.emailConnector.provider.connectEmail({email:e}),WS.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}))},this.unsubscribe.push(eT.subscribeKey("smartAccountDeployed",(e=>{this.smartAccountDeployed=e})))}};hre([Nq()],pre.prototype,"smartAccountDeployed",void 0),pre=hre([wR("w3m-email-verify-otp-view")],pre),Nz(),Iq(),Iq();var fre=gz`
      wui-icon-box {
        height: var(--wui-icon-box-size-xl);
        width: var(--wui-icon-box-size-xl);
      }
    `;cO(),bW();var gre=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},mre=class extends xq{constructor(){super(),this.email=YA.state.data?.email,this.emailConnector=aT.getEmailConnector(),this.loading=!1,this.listenForDeviceApproval()}render(){if(!this.email)throw new Error("w3m-email-verify-device-view: No email provided");if(!this.emailConnector)throw new Error("w3m-email-verify-device-view: No email connector provided");return oq`
          <wui-flex
            flexDirection="column"
            alignItems="center"
            .padding=${["xxl","s","xxl","s"]}
            gap="l"
          >
            <wui-icon-box
              size="xl"
              iconcolor="accent-100"
              backgroundcolor="accent-100"
              icon="verify"
              background="opaque"
            ></wui-icon-box>
    
            <wui-flex flexDirection="column" alignItems="center" gap="s">
              <wui-flex flexDirection="column" alignItems="center">
                <wui-text variant="paragraph-400" color="fg-100">
                  Approve the login link we sent to
                </wui-text>
                <wui-text variant="paragraph-400" color="fg-100"><b>${this.email}</b></wui-text>
              </wui-flex>
    
              <wui-text variant="small-400" color="fg-200" align="center">
                The code expires in 20 minutes
              </wui-text>
    
              <wui-flex alignItems="center" id="w3m-resend-section">
                <wui-text variant="small-400" color="fg-100" align="center">
                  Didn't receive it?
                </wui-text>
                <wui-link @click=${this.onResendCode.bind(this)} .disabled=${this.loading}>
                  Resend email
                </wui-link>
              </wui-flex>
            </wui-flex>
          </wui-flex>
        `}async listenForDeviceApproval(){if(this.emailConnector)try{await this.emailConnector.provider.connectDevice(),WS.sendEvent({type:"track",event:"DEVICE_REGISTERED_FOR_EMAIL"}),WS.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),YA.replace("EmailVerifyOtp",{email:this.email})}catch{YA.goBack()}}async onResendCode(){try{if(!this.loading){if(!this.emailConnector||!this.email)throw new Error("w3m-email-login-widget: Unable to resend email");this.loading=!0,await this.emailConnector.provider.connectEmail({email:this.email}),this.listenForDeviceApproval(),$S.showSuccess("Code email resent")}}catch(e){$S.showError(e)}finally{this.loading=!1}}};mre.styles=fre,gre([Nq()],mre.prototype,"loading",void 0),mre=gre([wR("w3m-email-verify-device-view")],mre),Nz(),Iq(),bW(),Iq();var bre=gz`
      div {
        width: 100%;
        height: 400px;
      }
    
      [data-ready='false'] {
        transform: scale(1.05);
      }
    
      @media (max-width: 430px) {
        [data-ready='false'] {
          transform: translateY(-50px);
        }
      }
    `;cO();var yre=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},wre=class extends xq{constructor(){super(),this.bodyObserver=void 0,this.unsubscribe=[],this.iframe=document.getElementById("w3m-iframe"),this.ready=!1,this.unsubscribe.push(hT.subscribeKey("open",(e=>{e||(this.onHideIframe(),YA.popTransactionStack())})))}disconnectedCallback(){this.onHideIframe(),this.unsubscribe.forEach((e=>e())),this.bodyObserver?.unobserve(window.document.body)}async firstUpdated(){await this.syncTheme(),this.iframe.style.display="block",this.bodyObserver=new ResizeObserver((()=>{this.iframe.style.width="360px",this.iframe.style.height="400px",this.iframe.style.left="calc(50% - 180px)",this.iframe.style.top="calc(50% - 200px + 32px)",this.ready=!0})),this.bodyObserver.observe(window.document.body)}render(){return this.ready&&this.onShowIframe(),oq`<div data-ready=${this.ready}></div>`}onShowIframe(){let e=window.innerWidth<=430;this.iframe.animate([{opacity:0,transform:e?"translateY(50px)":"scale(.95)"},{opacity:1,transform:e?"translateY(0)":"scale(1)"}],{duration:200,easing:"ease",fill:"forwards"})}async onHideIframe(){this.iframe.style.display="none",await this.iframe.animate([{opacity:1},{opacity:0}],{duration:200,easing:"ease",fill:"forwards"}).finished}async syncTheme(){let e=aT.getEmailConnector();e&&await e.provider.syncTheme({themeVariables:nT.getSnapshot().themeVariables})}};wre.styles=bre,yre([Nq()],wre.prototype,"ready",void 0),wre=yre([wR("w3m-approve-transaction-view")],wre),Nz(),cO(),Iq();var vre=class extends xq{render(){return oq`
          <wui-flex flexDirection="column" alignItems="center" gap="xl" padding="xl">
            <wui-text variant="paragraph-400" color="fg-100">Follow the instructions on</wui-text>
            <wui-chip
              icon="externalLink"
              variant="fill"
              href=${kS.SECURE_SITE_DASHBOARD}
              imageSrc=${kS.SECURE_SITE_FAVICON}
              data-testid="w3m-secure-website-button"
            >
            </wui-chip>
            <wui-text variant="small-400" color="fg-200">
              You will have to reconnect for security reasons
            </wui-text>
          </wui-flex>
        `}};vre=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-upgrade-wallet-view")],vre),Nz(),cO(),Iq(),bW();var _re=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},xre=class extends xq{constructor(){super(...arguments),this.emailConnector=aT.getEmailConnector(),this.loading=!1,this.setPreferSmartAccount=async()=>{if(this.emailConnector)try{this.loading=!0,await this.emailConnector.provider.setPreferredAccount(z8.ACCOUNT_TYPES.SMART_ACCOUNT),await this.emailConnector.provider.connect(),this.loading=!1,YA.push("Account")}catch{$S.showError("Error upgrading to smart account")}}}render(){return oq`
          <wui-flex
            flexDirection="column"
            alignItems="center"
            gap="xxl"
            .padding=${["0","0","l","0"]}
          >
            ${this.onboardingTemplate()} ${this.buttonsTemplate()}
            <wui-link>
              Learn more
              <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon>
            </wui-link>
          </wui-flex>
        `}onboardingTemplate(){return oq` <wui-flex
          flexDirection="column"
          gap="xxl"
          alignItems="center"
          .padding=${["0","xxl","0","xxl"]}
        >
          <wui-flex gap="s" alignItems="center" justifyContent="center">
            <wui-visual name="google"></wui-visual>
            <wui-visual name="pencil"></wui-visual>
            <wui-visual name="lightbulb"></wui-visual>
          </wui-flex>
          <wui-flex flexDirection="column" alignItems="center" gap="s">
            <wui-text align="center" variant="medium-600" color="fg-100">
              Discover Smart Accounts
            </wui-text>
            <wui-text align="center" variant="paragraph-400" color="fg-100">
              Access advanced features such as username, social login, improved security and a smoother
              user experience!
            </wui-text>
          </wui-flex>
        </wui-flex>`}buttonsTemplate(){return oq`<wui-flex .padding=${["0","2l","0","2l"]} gap="s">
          <wui-button
            variant="accentBg"
            @click=${this.redirectToAccount.bind(this)}
            size="lg"
            borderRadius="xs"
          >
            Do it later
          </wui-button>
          <wui-button
            .loading=${this.loading}
            size="lg"
            borderRadius="xs"
            @click=${this.setPreferSmartAccount.bind(this)}
            >Continue
          </wui-button>
        </wui-flex>`}redirectToAccount(){YA.push("Account")}};_re([Nq()],xre.prototype,"emailConnector",void 0),_re([Nq()],xre.prototype,"loading",void 0),xre=_re([wR("w3m-upgrade-to-smart-account-view")],xre),cO(),Nz(),Iq(),bW(),Cq(),Cq();var{I:Ere}=wq,Cre=2,kre=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}},Pre=(e,t)=>{let r=e._$AN;if(void 0===r)return!1;for(let e of r)e._$AO?.(t,!1),Pre(e,t);return!0},Ire=e=>{let t,r;do{if(void 0===(t=e._$AM))break;r=t._$AN,r.delete(e),e=t}while(0===r?.size)},Sre=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(void 0===r)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),Ore(t)}};function Are(e){void 0!==this._$AN?(Ire(this),this._$AM=e,Sre(this)):this._$AM=e}function Tre(e,t=!1,r=0){let i=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(t)if(Array.isArray(i))for(let e=r;e<i.length;e++)Pre(i[e],!1),Ire(i[e]);else null!=i&&(Pre(i,!1),Ire(i));else Pre(this,e)}var Ore=e=>{e.type==Cre&&(e._$AP??=Tre,e._$AQ??=Are)},Rre=class extends kre{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),Sre(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(Pre(this,e),Ire(this))}setValue(e){if((e=>void 0===e.strings)(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}},Nre=()=>new Mre,Mre=class{},$re=new WeakMap,jre=(e=>(...t)=>({_$litDirective$:e,values:t}))(class extends Rre{render(e){return sq}update(e,[t]){let r=t!==this.Y;return r&&void 0!==this.Y&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.Y=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),sq}rt(e){if("function"==typeof this.Y){let t=this.ht??globalThis,r=$re.get(t);void 0===r&&(r=new WeakMap,$re.set(t,r)),void 0!==r.get(this.Y)&&this.Y.call(this.ht,void 0),r.set(this.Y,e),void 0!==e&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){return"function"==typeof this.Y?$re.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});Iq();var Lre=gz`
      wui-email-input {
        width: 100%;
      }
    
      form {
        width: 100%;
        display: block;
        position: relative;
      }
    `;cO();var Bre=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Dre=class extends xq{constructor(){super(...arguments),this.formRef=Nre(),this.initialEmail=YA.state.data?.email??"",this.email="",this.loading=!1}firstUpdated(){this.formRef.value?.addEventListener("keydown",(e=>{"Enter"===e.key&&this.onSubmitEmail(e)}))}render(){let e=!this.loading&&this.email.length>3&&this.email!==this.initialEmail;return oq`
          <wui-flex flexDirection="column" padding="m" gap="m">
            <form ${jre(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}>
              <wui-email-input
                value=${this.initialEmail}
                .disabled=${this.loading}
                @inputChange=${this.onEmailInputChange.bind(this)}
              >
              </wui-email-input>
              <input type="submit" hidden />
            </form>
    
            <wui-flex gap="s">
              <wui-button size="md" variant="shade" fullWidth @click=${YA.goBack}>
                Cancel
              </wui-button>
    
              <wui-button
                size="md"
                variant="fill"
                fullWidth
                @click=${this.onSubmitEmail.bind(this)}
                .disabled=${!e}
                .loading=${this.loading}
              >
                Save
              </wui-button>
            </wui-flex>
          </wui-flex>
        `}onEmailInputChange(e){this.email=e.detail}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();let t=aT.getEmailConnector();if(!t)throw new Error("w3m-update-email-wallet: Email connector not found");let r=await t.provider.updateEmail({email:this.email});WS.sendEvent({type:"track",event:"EMAIL_EDIT"}),"VERIFY_SECONDARY_OTP"===r.action?YA.push("UpdateEmailSecondaryOtp",{email:this.initialEmail,newEmail:this.email}):YA.push("UpdateEmailPrimaryOtp",{email:this.initialEmail,newEmail:this.email})}catch(e){$S.showError(e),this.loading=!1}}};Dre.styles=Lre,Bre([Nq()],Dre.prototype,"email",void 0),Bre([Nq()],Dre.prototype,"loading",void 0),Dre=Bre([wR("w3m-update-email-wallet-view")],Dre),Nz(),cO();var Ure=class extends dre{constructor(){super(),this.email=YA.state.data?.email,this.onOtpSubmit=async e=>{try{this.emailConnector&&(await this.emailConnector.provider.updateEmailPrimaryOtp({otp:e}),WS.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),YA.replace("UpdateEmailSecondaryOtp",YA.state.data))}catch(e){throw WS.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),e}},this.onStartOver=()=>{YA.replace("UpdateEmailWallet",YA.state.data)}}};Ure=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-update-email-primary-otp-view")],Ure),Nz(),cO();var Fre=class extends dre{constructor(){super(),this.email=YA.state.data?.newEmail,this.onOtpSubmit=async e=>{try{this.emailConnector&&(await this.emailConnector.provider.updateEmailSecondaryOtp({otp:e}),WS.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),YA.reset("Account"))}catch(e){throw WS.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),e}},this.onStartOver=()=>{YA.replace("UpdateEmailWallet",YA.state.data)}}};Fre=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-update-email-secondary-otp-view")],Fre),cO(),Nz(),Iq(),bW(),Iq();var Hre=gz`
      :host > wui-flex {
        max-height: clamp(360px, 540px, 80vh);
        overflow: scroll;
        scrollbar-width: none;
      }
    
      :host > wui-flex::-webkit-scrollbar {
        display: none;
      }
    `,zre=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},qre=class extends xq{constructor(){super(...arguments),this.disconecting=!1}render(){return oq`
          <wui-flex class="container" flexDirection="column" gap="0">
            <wui-flex
              class="container"
              flexDirection="column"
              .padding=${["m","xl","xs","xl"]}
              alignItems="center"
              gap="xl"
            >
              <wui-text variant="small-400" color="fg-200" align="center">
                This app doesn’t support your current network. Switch to an available option following
                to continue.
              </wui-text>
            </wui-flex>
    
            <wui-flex flexDirection="column" padding="s" gap="xs">
              ${this.networksTemplate()}
            </wui-flex>
    
            <wui-separator text="or"></wui-separator>
            <wui-flex flexDirection="column" padding="s" gap="xs">
              <wui-list-item
                variant="icon"
                iconVariant="overlay"
                icon="disconnect"
                ?chevron=${!1}
                .loading=${this.disconecting}
                @click=${this.onDisconnect.bind(this)}
                data-testid="disconnect-button"
              >
                <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text>
              </wui-list-item>
            </wui-flex>
          </wui-flex>
        `}networksTemplate(){let{approvedCaipNetworkIds:e,requestedCaipNetworks:t}=GA.state;return PS.sortRequestedNetworks(e,t).map((e=>oq`
            <wui-list-network
              imageSrc=${w8(wT.getNetworkImage(e))}
              name=${e.name??"Unknown"}
              @click=${()=>this.onSwitchNetwork(e)}
            >
            </wui-list-network>
          `))}async onDisconnect(){try{this.disconecting=!0,await KS.disconnect(),WS.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),hT.close()}catch{WS.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),$S.showError("Failed to disconnect")}finally{this.disconecting=!1}}async onSwitchNetwork(e){let{isConnected:t}=eT.state,{approvedCaipNetworkIds:r,supportsAllNetworks:i,caipNetwork:n}=GA.state,{data:o}=YA.state;t&&n?.id!==e.id?r?.includes(e.id)?(await GA.switchActiveNetwork(e),vT.navigateAfterNetworkSwitch()):i&&YA.push("SwitchNetwork",{...o,network:e}):t||(GA.setCaipNetwork(e),YA.push("Connect"))}};qre.styles=Hre,zre([Nq()],qre.prototype,"disconecting",void 0),qre=zre([wR("w3m-unsupported-chain-view")],qre),cO(),Nz(),Iq(),Iq();var Wre=gz`
      wui-compatible-network {
        margin-top: var(--wui-spacing-l);
      }
    `;bW();var Vre=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Gre=class extends xq{constructor(){super(),this.unsubscribe=[],this.address=eT.state.address,this.profileName=eT.state.profileName,this.network=GA.state.caipNetwork,this.preferredAccountType=eT.state.preferredAccountType,this.unsubscribe.push(eT.subscribe((e=>{e.address?(this.address=e.address,this.profileName=e.profileName,this.preferredAccountType=e.preferredAccountType):$S.showError("Account not found")})),GA.subscribeKey("caipNetwork",(e=>{e?.id&&(this.network=e)})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){if(!this.address)throw new Error("w3m-wallet-receive-view: No account provided");let e=wT.getNetworkImage(this.network);return oq` <wui-flex
          flexDirection="column"
          .padding=${["xl","l","l","l"]}
          alignItems="center"
        >
          <wui-chip-button
            @click=${this.onCopyClick.bind(this)}
            text=${FM.getTruncateString({string:this.address??"",charsStart:this.profileName?18:4,charsEnd:this.profileName?0:4,truncate:this.profileName?"end":"middle"})}
            icon="copy"
            imageSrc=${e||""}
            variant="shadeSmall"
          ></wui-chip-button>
          <wui-flex
            flexDirection="column"
            .padding=${["l","0","0","0"]}
            alignItems="center"
            gap="s"
          >
            <wui-qr-code
              size=${232}
              theme=${nT.state.themeMode}
              uri=${this.address}
              ?arenaClear=${!0}
              data-testid="wui-qr-code"
            ></wui-qr-code>
            <wui-text variant="paragraph-500" color="fg-100" align="center">
              Copy your address or scan this QR code
            </wui-text>
          </wui-flex>
          ${this.networkTemplate()}
        </wui-flex>`}networkTemplate(){let e=GA.getRequestedCaipNetworks(),t=GA.checkIfSmartAccountEnabled(),r=GA.state.caipNetwork;if(this.preferredAccountType===z8.ACCOUNT_TYPES.SMART_ACCOUNT&&t)return r?oq`<wui-compatible-network
            @click=${this.onReceiveClick.bind(this)}
            text="Only receive assets on this network"
            .networkImages=${[wT.getNetworkImage(r)??""]}
          ></wui-compatible-network>`:null;let i=e?.filter((e=>e?.imageId))?.slice(0,5).map(wT.getNetworkImage).filter(Boolean);return oq`<wui-compatible-network
          @click=${this.onReceiveClick.bind(this)}
          text="Only receive assets on these networks"
          .networkImages=${i}
        ></wui-compatible-network>`}onReceiveClick(){YA.push("WalletCompatibleNetworks")}onCopyClick(){try{this.address&&(PS.copyToClopboard(this.address),$S.showSuccess("Address copied"))}catch{$S.showError("Failed to copy")}}};Gre.styles=Wre,Vre([Nq()],Gre.prototype,"address",void 0),Vre([Nq()],Gre.prototype,"profileName",void 0),Vre([Nq()],Gre.prototype,"network",void 0),Vre([Nq()],Gre.prototype,"preferredAccountType",void 0),Gre=Vre([wR("w3m-wallet-receive-view")],Gre),cO(),Nz(),Iq(),Iq();var Zre=gz`
      :host > wui-flex {
        max-height: clamp(360px, 540px, 80vh);
        overflow: scroll;
        scrollbar-width: none;
      }
    
      :host > wui-flex::-webkit-scrollbar {
        display: none;
      }
    `;bW();var Kre=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Yre=class extends xq{constructor(){super(),this.unsubscribe=[],this.preferredAccountType=eT.state.preferredAccountType,this.unsubscribe.push(eT.subscribeKey("preferredAccountType",(e=>{this.preferredAccountType=e})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return oq` <wui-flex
          flexDirection="column"
          .padding=${["xs","s","m","s"]}
          gap="xs"
        >
          <wui-banner
            icon="warningCircle"
            text="You can only receive assets on these networks"
          ></wui-banner>
          ${this.networkTemplate()}
        </wui-flex>`}networkTemplate(){let{approvedCaipNetworkIds:e,requestedCaipNetworks:t,caipNetwork:r}=GA.state,i=GA.checkIfSmartAccountEnabled(),n=PS.sortRequestedNetworks(e,t);if(i&&this.preferredAccountType===z8.ACCOUNT_TYPES.SMART_ACCOUNT){if(!r)return null;n=[r]}return n.map((e=>oq`
            <wui-list-network
              imageSrc=${w8(wT.getNetworkImage(e))}
              name=${e.name??"Unknown"}
              ?transparent=${!0}
            >
            </wui-list-network>
          `))}};Yre.styles=Zre,Kre([Nq()],Yre.prototype,"preferredAccountType",void 0),Yre=Kre([wR("w3m-wallet-compatible-networks-view")],Yre),Nz(),Iq(),Iq();var Jre=gz`
      :host {
        display: block;
      }
    
      wui-flex {
        position: relative;
      }
    
      wui-icon-box {
        width: 40px;
        height: 40px;
        border-radius: var(--wui-border-radius-xs) !important;
        border: 5px solid var(--wui-color-bg-125);
        background: var(--wui-color-bg-175);
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1;
      }
    
      wui-button {
        --local-border-radius: var(--wui-border-radius-xs) !important;
      }
    
      .inputContainer {
        height: fit-content;
      }
    `;cO(),bW();var Qre=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Xre=class extends xq{constructor(){super(),this.unsubscribe=[],this.token=yT.state.token,this.sendTokenAmount=yT.state.sendTokenAmount,this.receiverAddress=yT.state.receiverAddress,this.message="Preview Send",this.unsubscribe.push(yT.subscribe((e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return this.getMessage(),oq` <wui-flex flexDirection="column" .padding=${["s","l","l","l"]}>
          <wui-flex class="inputContainer" gap="xs" flexDirection="column">
            <w3m-input-token
              .token=${this.token}
              .sendTokenAmount=${this.sendTokenAmount}
            ></w3m-input-token>
            <wui-icon-box
              size="inherit"
              backgroundColor="fg-300"
              iconSize="lg"
              iconColor="fg-250"
              background="opaque"
              icon="arrowBottom"
            ></wui-icon-box>
            <w3m-input-address .receiverAddress=${this.receiverAddress}></w3m-input-address>
          </wui-flex>
          <wui-flex .margin=${["l","0","0","0"]}>
            <wui-button
              @click=${this.onButtonClick.bind(this)}
              ?disabled=${!this.message.startsWith("Preview Send")}
              size="lg"
              variant="fill"
              fullWidth
            >
              ${this.message}
            </wui-button>
          </wui-flex>
        </wui-flex>`}onButtonClick(){YA.push("WalletSendPreview")}getMessage(){this.message="Preview Send",this.receiverAddress&&!PS.isAddress(this.receiverAddress)&&(this.message="Invalid Address"),this.receiverAddress||(this.message="Add Address"),this.sendTokenAmount&&this.token&&this.sendTokenAmount>Number(this.token.quantity.numeric)&&(this.message="Insufficient Funds"),this.sendTokenAmount||(this.message="Add Amount"),this.token||(this.message="Select Token")}};Xre.styles=Jre,Qre([Nq()],Xre.prototype,"token",void 0),Qre([Nq()],Xre.prototype,"sendTokenAmount",void 0),Qre([Nq()],Xre.prototype,"receiverAddress",void 0),Qre([Nq()],Xre.prototype,"message",void 0),Xre=Qre([wR("w3m-wallet-send-view")],Xre),Nz(),Iq(),Iq();var eie=gz`
      .contentContainer {
        height: 440px;
        overflow: scroll;
        scrollbar-width: none;
      }
    
      wui-icon-box {
        width: 40px;
        height: 40px;
        border-radius: var(--wui-border-radius-xxs);
      }
    `;cO(),bW();var tie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},rie=class extends xq{constructor(){super(),this.unsubscribe=[],this.tokenBalance=eT.state.tokenBalance,this.search="",this.onDebouncedSearch=PS.debounce((e=>{this.search=e})),this.unsubscribe.push(eT.subscribe((e=>{this.tokenBalance=e.tokenBalance})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return oq`
          <wui-flex flexDirection="column">
            ${this.templateSearchInput()} <wui-separator></wui-separator> ${this.templateTokens()}
          </wui-flex>
        `}templateSearchInput(){return oq`
          <wui-flex gap="xs" padding="s">
            <wui-input-text
              @inputChange=${this.onInputChange.bind(this)}
              class="network-search-input"
              size="sm"
              placeholder="Search token"
              icon="search"
            ></wui-input-text>
          </wui-flex>
        `}templateTokens(){return this.search?this.tokens=this.tokenBalance?.filter((e=>e.name.toLowerCase().includes(this.search.toLowerCase()))):this.tokens=this.tokenBalance,oq`
          <wui-flex
            class="contentContainer"
            flexDirection="column"
            .padding=${["0","s","0","s"]}
          >
            <wui-flex justifyContent="flex-start" .padding=${["m","s","s","s"]}>
              <wui-text variant="paragraph-500" color="fg-200">Your tokens</wui-text>
            </wui-flex>
            <wui-flex flexDirection="column" gap="xs">
              ${this.tokens&&this.tokens.length>0?this.tokens.map((e=>oq`<wui-list-token
                        @click=${this.handleTokenClick.bind(this,e)}
                        ?clickable=${!0}
                        tokenName=${e.name}
                        tokenImageUrl=${e.iconUrl}
                        tokenAmount=${e.quantity.numeric}
                        tokenValue=${e.value}
                        tokenCurrency=${e.symbol}
                      ></wui-list-token>`)):oq`<wui-flex
                    .padding=${["4xl","0","0","0"]}
                    alignItems="center"
                    flexDirection="column"
                    gap="l"
                  >
                    <wui-icon-box
                      icon="coinPlaceholder"
                      size="inherit"
                      iconColor="fg-200"
                      backgroundColor="fg-200"
                      iconSize="lg"
                    ></wui-icon-box>
                    <wui-flex
                      class="textContent"
                      gap="xs"
                      flexDirection="column"
                      justifyContent="center"
                      flexDirection="column"
                    >
                      <wui-text variant="paragraph-500" align="center" color="fg-100"
                        >No tokens found</wui-text
                      >
                      <wui-text variant="small-400" align="center" color="fg-200"
                        >Your tokens will appear here</wui-text
                      >
                    </wui-flex>
                    <wui-link @click=${this.onBuyClick.bind(this)}>Buy</wui-link>
                  </wui-flex>`}
            </wui-flex>
          </wui-flex>
        `}onBuyClick(){YA.push("OnRampProviders")}onInputChange(e){this.onDebouncedSearch(e.detail)}handleTokenClick(e){yT.setToken(e),yT.setTokenAmount(void 0),YA.goBack()}};rie.styles=eie,tie([Nq()],rie.prototype,"tokenBalance",void 0),tie([Nq()],rie.prototype,"tokens",void 0),tie([Nq()],rie.prototype,"search",void 0),rie=tie([wR("w3m-wallet-send-select-token-view")],rie),Nz(),Iq(),Iq();var iie=gz`
      wui-avatar,
      wui-image {
        display: ruby;
        width: 32px;
        height: 32px;
        border-radius: var(--wui-border-radius-3xl);
      }
    
      .sendButton {
        width: 70%;
        --local-width: 100% !important;
        --local-border-radius: var(--wui-border-radius-xs) !important;
      }
    
      .cancelButton {
        width: 30%;
        --local-width: 100% !important;
        --local-border-radius: var(--wui-border-radius-xs) !important;
      }
    `;bW(),cO();var nie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},oie=class extends xq{constructor(){super(),this.unsubscribe=[],this.token=yT.state.token,this.sendTokenAmount=yT.state.sendTokenAmount,this.receiverAddress=yT.state.receiverAddress,this.caipNetwork=GA.state.caipNetwork,this.unsubscribe.push(yT.subscribe((e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress})),GA.subscribeKey("caipNetwork",(e=>this.caipNetwork=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return oq` <wui-flex flexDirection="column" .padding=${["s","l","l","l"]}>
          <wui-flex gap="xs" flexDirection="column" .padding=${["0","xs","0","xs"]}>
            <wui-flex alignItems="center" justifyContent="space-between">
              <wui-flex flexDirection="column" gap="4xs">
                <wui-text variant="small-400" color="fg-150">Send</wui-text>
                ${this.sendValueTemplate()}
              </wui-flex>
              <wui-preview-item
                text="${Number(this.token?.quantity.numeric).toFixed(2)} ${this.token?.symbol}"
                .imageSrc=${this.token?.iconUrl}
              ></wui-preview-item>
            </wui-flex>
            <wui-flex>
              <wui-icon color="fg-200" size="md" name="arrowBottom"></wui-icon>
            </wui-flex>
            <wui-flex alignItems="center" justifyContent="space-between">
              <wui-text variant="small-400" color="fg-150">To</wui-text>
              <wui-preview-item
                text=${FM.getTruncateString({string:this.receiverAddress??"",charsStart:4,charsEnd:4,truncate:"middle"})}
                address=${this.receiverAddress??""}
                .isAddress=${!0}
              ></wui-preview-item>
            </wui-flex>
          </wui-flex>
          <wui-flex flexDirection="column" .padding=${["xxl","0","0","0"]}>
            <w3m-wallet-send-details
              .caipNetwork=${this.caipNetwork}
              .receiverAddress=${this.receiverAddress}
            ></w3m-wallet-send-details>
            <wui-flex justifyContent="center" gap="xxs" .padding=${["s","0","0","0"]}>
              <wui-icon size="sm" color="fg-200" name="warningCircle"></wui-icon>
              <wui-text variant="small-400" color="fg-200">Review transaction carefully</wui-text>
            </wui-flex>
            <wui-flex justifyContent="center" gap="s" .padding=${["l","0","0","0"]}>
              <wui-button
                class="cancelButton"
                @click=${this.onCancelClick.bind(this)}
                size="lg"
                variant="shade"
              >
                Cancel
              </wui-button>
              <wui-button
                class="sendButton"
                @click=${this.onSendClick.bind(this)}
                size="lg"
                variant="fill"
              >
                Send
              </wui-button>
            </wui-flex>
          </wui-flex></wui-flex
        >`}sendValueTemplate(){if(this.token&&this.sendTokenAmount){let e=this.token.price*this.sendTokenAmount;return oq`<wui-text variant="paragraph-400" color="fg-100"
            >$${e.toFixed(2)}</wui-text
          >`}return null}onSendClick(){YA.reset("Account"),setTimeout((()=>{yT.resetSend()}),200)}onCancelClick(){YA.goBack()}};oie.styles=iie,nie([Nq()],oie.prototype,"token",void 0),nie([Nq()],oie.prototype,"sendTokenAmount",void 0),nie([Nq()],oie.prototype,"receiverAddress",void 0),nie([Nq()],oie.prototype,"caipNetwork",void 0),oie=nie([wR("w3m-wallet-send-preview-view")],oie),cO(),Nz(),Iq(),bW(),Iq();var aie=gz`
      wui-grid {
        max-height: clamp(360px, 400px, 80vh);
        overflow: scroll;
        scrollbar-width: none;
        grid-auto-rows: min-content;
        grid-template-columns: repeat(auto-fill, 76px);
      }
    
      @media (max-width: 435px) {
        wui-grid {
          grid-template-columns: repeat(auto-fill, 77px);
        }
      }
    
      wui-grid[data-scroll='false'] {
        overflow: hidden;
      }
    
      wui-grid::-webkit-scrollbar {
        display: none;
      }
    
      wui-loading-spinner {
        padding-top: var(--wui-spacing-l);
        padding-bottom: var(--wui-spacing-l);
        justify-content: center;
        grid-column: 1 / span 4;
      }
    `;function sie(e){let{connectors:t}=aT.state,r=t.filter((e=>"ANNOUNCED"===e.type)).reduce(((e,t)=>(t.info?.rdns&&(e[t.info.rdns]=!0),e)),{});return e.map((e=>({...e,installed:!!e.rdns&&!!r[e.rdns??""]}))).sort(((e,t)=>Number(t.installed)-Number(e.installed)))}cO();var cie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},lie="local-paginator",uie=class extends xq{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.initial=!uT.state.wallets.length,this.wallets=uT.state.wallets,this.recommended=uT.state.recommended,this.featured=uT.state.featured,this.unsubscribe.push(uT.subscribeKey("wallets",(e=>this.wallets=e)),uT.subscribeKey("recommended",(e=>this.recommended=e)),uT.subscribeKey("featured",(e=>this.featured=e)))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),this.paginationObserver?.disconnect()}render(){return oq`
          <wui-grid
            data-scroll=${!this.initial}
            .padding=${["0","s","s","s"]}
            columnGap="xxs"
            rowGap="l"
            justifyContent="space-between"
          >
            ${this.initial?this.shimmerTemplate(16):this.walletsTemplate()}
            ${this.paginationLoaderTemplate()}
          </wui-grid>
        `}async initialFetch(){let e=this.shadowRoot?.querySelector("wui-grid");this.initial&&e&&(await uT.fetchWallets({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.initial=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,t){return[...Array(e)].map((()=>oq`
            <wui-card-select-loader type="wallet" id=${w8(t)}></wui-card-select-loader>
          `))}walletsTemplate(){return sie([...this.featured,...this.recommended,...this.wallets]).map((e=>oq`
            <wui-card-select
              imageSrc=${w8(wT.getWalletImage(e))}
              type="wallet"
              name=${e.name}
              @click=${()=>this.onConnectWallet(e)}
              .installed=${e.installed}
            ></wui-card-select>
          `))}paginationLoaderTemplate(){let{wallets:e,recommended:t,featured:r,count:i}=uT.state,n=window.innerWidth<352?3:4,o=e.length+t.length,a=Math.ceil(o/n)*n-o+n;return a-=e.length?r.length%n:0,0===i&&r.length>0?null:0===i||[...r,...e,...t].length<i?this.shimmerTemplate(a,lie):null}createPaginationObserver(){let e=this.shadowRoot?.querySelector(`#${lie}`);e&&(this.paginationObserver=new IntersectionObserver((([e])=>{if(e?.isIntersecting&&!this.initial){let{page:e,count:t,wallets:r}=uT.state;r.length<t&&uT.fetchWallets({page:e+1})}})),this.paginationObserver.observe(e))}onConnectWallet(e){let t=aT.getConnector(e.id,e.rdns);t?YA.push("ConnectingExternal",{connector:t}):YA.push("ConnectingWalletConnect",{wallet:e})}};uie.styles=aie,cie([Nq()],uie.prototype,"initial",void 0),cie([Nq()],uie.prototype,"wallets",void 0),cie([Nq()],uie.prototype,"recommended",void 0),cie([Nq()],uie.prototype,"featured",void 0),uie=cie([wR("w3m-all-wallets-list")],uie),cO(),Nz(),Iq(),bW(),Iq();var die=gz`
      wui-grid,
      wui-loading-spinner,
      wui-flex {
        height: 360px;
      }
    
      wui-grid {
        overflow: scroll;
        scrollbar-width: none;
        grid-auto-rows: min-content;
      }
    
      wui-grid[data-scroll='false'] {
        overflow: hidden;
      }
    
      wui-grid::-webkit-scrollbar {
        display: none;
      }
    
      wui-loading-spinner {
        justify-content: center;
        align-items: center;
      }
    `,hie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},pie=class extends xq{constructor(){super(...arguments),this.prevQuery="",this.loading=!0,this.query=""}render(){return this.onSearch(),this.loading?oq`<wui-loading-spinner color="accent-100"></wui-loading-spinner>`:this.walletsTemplate()}async onSearch(){this.query!==this.prevQuery&&(this.prevQuery=this.query,this.loading=!0,await uT.searchWallet({search:this.query}),this.loading=!1)}walletsTemplate(){let{search:e}=uT.state,t=sie(e);return e.length?oq`
          <wui-grid
            .padding=${["0","s","s","s"]}
            gridTemplateColumns="repeat(4, 1fr)"
            rowGap="l"
            columnGap="xs"
          >
            ${t.map((e=>oq`
                <wui-card-select
                  imageSrc=${w8(wT.getWalletImage(e))}
                  type="wallet"
                  name=${e.name}
                  @click=${()=>this.onConnectWallet(e)}
                  .installed=${e.installed}
                ></wui-card-select>
              `))}
          </wui-grid>
        `:oq`
            <wui-flex justifyContent="center" alignItems="center" gap="s" flexDirection="column">
              <wui-icon-box
                size="lg"
                iconColor="fg-200"
                backgroundColor="fg-300"
                icon="wallet"
                background="transparent"
              ></wui-icon-box>
              <wui-text color="fg-200" variant="paragraph-500">No Wallet found</wui-text>
            </wui-flex>
          `}onConnectWallet(e){let t=aT.getConnector(e.id,e.rdns);t?YA.push("ConnectingExternal",{connector:t}):YA.push("ConnectingWalletConnect",{wallet:e})}};pie.styles=die,hie([Nq()],pie.prototype,"loading",void 0),hie([Aq()],pie.prototype,"query",void 0),pie=hie([wR("w3m-all-wallets-search")],pie),cO(),Nz(),Iq(),bW();var fie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},gie=class extends xq{constructor(){super(),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0,this.buffering=!1,this.unsubscribe.push(KS.subscribeKey("buffering",(e=>this.buffering=e)))}disconnectCallback(){this.unsubscribe.forEach((e=>e()))}render(){let e=this.generateTabs();return oq`
          <wui-flex justifyContent="center" .padding=${["l","0","0","0"]}>
            <wui-tabs
              ?disabled=${this.buffering}
              .tabs=${e}
              .onTabChange=${this.onTabChange.bind(this)}
            ></wui-tabs>
          </wui-flex>
        `}generateTabs(){let e=this.platforms.map((e=>"browser"===e?{label:"Browser",icon:"extension",platform:"browser"}:"mobile"===e?{label:"Mobile",icon:"mobile",platform:"mobile"}:"qrcode"===e?{label:"Mobile",icon:"mobile",platform:"qrcode"}:"web"===e?{label:"Webapp",icon:"browser",platform:"web"}:"desktop"===e?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"}));return this.platformTabs=e.map((({platform:e})=>e)),e}onTabChange(e){let t=this.platformTabs[e];t&&this.onSelectPlatfrom?.(t)}};fie([Aq({type:Array})],gie.prototype,"platforms",void 0),fie([Aq()],gie.prototype,"onSelectPlatfrom",void 0),fie([Nq()],gie.prototype,"buffering",void 0),gie=fie([wR("w3m-connecting-header")],gie),cO(),Nz();var mie=class extends Cte{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),WS.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}async onConnectProxy(){try{this.error=!1;let{connectors:e}=aT.state,t=e.find((e=>"ANNOUNCED"===e.type&&e.info?.rdns===this.wallet?.rdns)),r=e.find((e=>"INJECTED"===e.type));t?await KS.connectExternal(t):r&&await KS.connectExternal(r),hT.close(),WS.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.wallet?.name||"Unknown"}})}catch(e){WS.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};mie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-connecting-wc-browser")],mie),cO(),Nz();var bie=class extends Cte{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),WS.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop"}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.timeout=setTimeout((()=>{this.onConnect?.()}),200))}onConnectProxy(){if(this.wallet?.desktop_link&&this.uri)try{this.error=!1;let{desktop_link:e,name:t}=this.wallet,{redirect:r,href:i}=PS.formatNativeUrl(e,this.uri);KS.setWcLinking({name:t,href:i}),KS.setRecentWallet(this.wallet),PS.openHref(r,"_blank")}catch{this.error=!0}}};bie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-connecting-wc-desktop")],bie),cO(),Nz();var yie=class extends Cte{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),document.addEventListener("visibilitychange",this.onBuffering.bind(this)),WS.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile"}})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("visibilitychange",this.onBuffering.bind(this))}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onConnectProxy(){if(this.wallet?.mobile_link&&this.uri)try{this.error=!1;let{mobile_link:e,name:t}=this.wallet,{redirect:r,href:i}=PS.formatNativeUrl(e,this.uri);KS.setWcLinking({name:t,href:i}),KS.setRecentWallet(this.wallet),PS.openHref(r,"_self")}catch{this.error=!0}}onBuffering(){let e=PS.isIos();"visible"===document?.visibilityState&&!this.error&&e&&(KS.setBuffering(!0),setTimeout((()=>{KS.setBuffering(!1)}),5e3))}};yie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-connecting-wc-mobile")],yie),cO(),Nz(),Iq(),Iq();var wie=gz`
      @keyframes fadein {
        from {
          opacity: 0;
        }
        to {
          opacity: 1;
        }
      }
    
      wui-shimmer {
        width: 100%;
        aspect-ratio: 1 / 1;
        border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important;
      }
    
      wui-qr-code {
        opacity: 0;
        animation-duration: 200ms;
        animation-timing-function: ease;
        animation-name: fadein;
        animation-fill-mode: forwards;
      }
    `,vie=class extends Cte{constructor(){super(),this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate),WS.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet?.name??"WalletConnect",platform:"qrcode"}})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),oq`
          <wui-flex padding="xl" flexDirection="column" gap="xl" alignItems="center">
            <wui-shimmer borderRadius="l" width="100%"> ${this.qrCodeTemplate()} </wui-shimmer>
    
            <wui-text variant="paragraph-500" color="fg-100">
              Scan this QR Code with your phone
            </wui-text>
            ${this.copyTemplate()}
          </wui-flex>
    
          <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
        `}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout((()=>{this.ready=!0}),200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;let e=this.getBoundingClientRect().width-40,t=this.wallet?this.wallet.name:void 0;return KS.setWcLinking(void 0),KS.setRecentWallet(this.wallet),oq` <wui-qr-code
          size=${e}
          theme=${nT.state.themeMode}
          uri=${this.uri}
          imageSrc=${w8(wT.getWalletImage(this.wallet))}
          alt=${w8(t)}
          data-testid="wui-qr-code"
        ></wui-qr-code>`}copyTemplate(){let e=!this.uri||!this.ready;return oq`<wui-link
          .disabled=${e}
          @click=${this.onCopyUri}
          color="fg-200"
          data-testid="copy-wc2-uri"
        >
          <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
          Copy link
        </wui-link>`}};vie.styles=wie,vie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-connecting-wc-qrcode")],vie),cO(),Nz(),Iq();var _ie=class extends xq{constructor(){if(super(),this.wallet=YA.state.data?.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");WS.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}render(){return oq`
          <wui-flex
            flexDirection="column"
            alignItems="center"
            .padding=${["3xl","xl","xl","xl"]}
            gap="xl"
          >
            <wui-wallet-image
              size="lg"
              imageSrc=${w8(wT.getWalletImage(this.wallet))}
            ></wui-wallet-image>
    
            <wui-text variant="paragraph-500" color="fg-100">Not Detected</wui-text>
          </wui-flex>
    
          <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
        `}};_ie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-connecting-wc-unsupported")],_ie),cO(),Nz();var xie=class extends Cte{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel="Open and continue in a new browser tab",this.secondaryBtnIcon="externalLink",WS.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web"}})}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;let{webapp_link:e,name:t}=this.wallet,{redirect:r,href:i}=PS.formatUniversalUrl(e,this.uri);KS.setWcLinking({name:t,href:i}),KS.setRecentWallet(this.wallet),PS.openHref(r,"_blank")}catch{this.error=!0}}};xie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-connecting-wc-web")],xie),Iq(),bW(),Iq();var Eie=gz`
      :host {
        width: 100%;
      }
    
      .details-container > wui-flex {
        background: var(--wui-gray-glass-002);
        border-radius: var(--wui-border-radius-xxs);
        width: 100%;
      }
    
      .details-container > wui-flex > button {
        border: none;
        background: none;
        padding: var(--wui-spacing-s);
        border-radius: var(--wui-border-radius-xxs);
        cursor: pointer;
      }
    
      .details-content-container {
        padding: var(--wui-spacing-1xs);
        padding-top: 0px;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    
      .details-content-container > wui-flex {
        width: 100%;
      }
    
      .details-row {
        width: 100%;
        padding: var(--wui-spacing-s);
        padding-left: var(--wui-spacing-s);
        padding-right: var(--wui-spacing-1xs);
        border-radius: calc(var(--wui-border-radius-5xs) + var(--wui-border-radius-4xs));
        background: var(--wui-gray-glass-002);
      }
    
      .details-row.provider-free-row {
        padding-right: var(--wui-spacing-xs);
      }
    
      .free-badge {
        background: rgba(38, 217, 98, 0.15);
        border-radius: var(--wui-border-radius-4xs);
        padding: 4.5px 6px;
      }
    `;Nz();var Cie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},kie=class extends xq{constructor(){super(...arguments),this.detailsOpen=!1,this.slippageRate=1}render(){return oq`
          <wui-flex flexDirection="column" alignItems="center" gap="1xs" class="details-container">
            <wui-flex flexDirection="column">
              <button @click=${this.toggleDetails.bind(this)}>
                <wui-flex justifyContent="space-between" .padding=${["0","xs","0","xs"]}>
                  <wui-flex justifyContent="flex-start" flexGrow="1" gap="xs">
                    <wui-text variant="small-400" color="fg-100"
                      >1 ${this.sourceTokenSymbol} =
                      ${FM.formatNumberToLocalString(this.toTokenConvertedAmount,3)}
                      ${this.toTokenSymbol}</wui-text
                    >
                    <wui-text variant="small-400" color="fg-200">
                      $${FM.formatNumberToLocalString(this.sourceTokenPrice)}
                    </wui-text>
                  </wui-flex>
                  <wui-icon name="chevronBottom"></wui-icon>
                </wui-flex>
              </button>
              ${this.detailsOpen?oq`
                    <wui-flex flexDirection="column" gap="xs" class="details-content-container">
                      <wui-flex flexDirection="column" gap="xs">
                        <wui-flex
                          justifyContent="space-between"
                          alignItems="center"
                          class="details-row"
                        >
                          <wui-text variant="small-400" color="fg-150">Network cost</wui-text>
                          <wui-text variant="small-400" color="fg-100">
                            $${FM.formatNumberToLocalString(this.gasPriceInUSD,3)}
                          </wui-text>
                        </wui-flex>
                      </wui-flex>
                      ${this.priceImpact?oq` <wui-flex flexDirection="column" gap="xs">
                            <wui-flex
                              justifyContent="space-between"
                              alignItems="center"
                              class="details-row"
                            >
                              <wui-text variant="small-400" color="fg-150">Price impact</wui-text>
                              <wui-flex>
                                <wui-text variant="small-400" color="fg-200">
                                  ${FM.formatNumberToLocalString(this.priceImpact,3)}%
                                </wui-text>
                              </wui-flex>
                            </wui-flex>
                          </wui-flex>`:null}
                      ${this.maxSlippage&&this.sourceTokenSymbol?oq`<wui-flex flexDirection="column" gap="xs">
                            <wui-flex
                              justifyContent="space-between"
                              alignItems="center"
                              class="details-row"
                            >
                              <wui-text variant="small-400" color="fg-150">Max. slippage</wui-text>
                              <wui-flex>
                                <wui-text variant="small-400" color="fg-200">
                                  ${FM.formatNumberToLocalString(this.maxSlippage,6)}
                                  ${this.sourceTokenSymbol} ${this.slippageRate}%
                                </wui-text>
                              </wui-flex>
                            </wui-flex>
                          </wui-flex>`:null}
                      <wui-flex flexDirection="column" gap="xs">
                        <wui-flex
                          justifyContent="space-between"
                          alignItems="center"
                          class="details-row provider-free-row"
                        >
                          <wui-text variant="small-400" color="fg-150">Provider fee</wui-text>
                          <wui-flex alignItems="center" justifyContent="center" class="free-badge">
                            <wui-text variant="micro-700" color="success-100">Free</wui-text>
                          </wui-flex>
                        </wui-flex>
                      </wui-flex>
                    </wui-flex>
                  `:null}
            </wui-flex>
          </wui-flex>
        `}toggleDetails(){this.detailsOpen=!this.detailsOpen}};kie.styles=[Eie],Cie([Aq()],kie.prototype,"detailsOpen",void 0),Cie([Aq()],kie.prototype,"sourceTokenSymbol",void 0),Cie([Aq()],kie.prototype,"sourceTokenPrice",void 0),Cie([Aq()],kie.prototype,"toTokenSymbol",void 0),Cie([Aq()],kie.prototype,"toTokenConvertedAmount",void 0),Cie([Aq()],kie.prototype,"gasPriceInUSD",void 0),Cie([Aq()],kie.prototype,"priceImpact",void 0),Cie([Aq()],kie.prototype,"slippageRate",void 0),Cie([Aq()],kie.prototype,"maxSlippage",void 0),kie=Cie([wR("w3m-convert-details")],kie),Iq(),bW(),cO(),GT(),Nz(),Iq();var Pie=gz`
      :host > wui-flex {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-radius: var(--wui-border-radius-s);
        padding: var(--wui-spacing-xl);
        padding-right: var(--wui-spacing-s);
        width: 100%;
        height: 100px;
        box-sizing: border-box;
        position: relative;
      }
    
      :host > wui-flex > svg.input_mask {
        position: absolute;
        inset: 0;
        z-index: 5;
      }
    
      :host wui-flex .input_mask__border,
      :host wui-flex .input_mask__background {
        transition: fill var(--wui-duration-md) var(--wui-ease-out-power-1);
        will-change: fill;
      }
    
      :host wui-flex .input_mask__border {
        fill: var(--wui-gray-glass-005);
      }
    
      :host wui-flex .input_mask__background {
        fill: var(--wui-gray-glass-002);
      }
    
      :host wui-flex.focus .input_mask__border {
        fill: var(--wui-gray-glass-020);
      }
    
      :host > wui-flex .swap-input,
      :host > wui-flex .swap-token-button {
        z-index: 10;
      }
    
      :host > wui-flex .swap-input {
        -webkit-mask-image: linear-gradient(
          270deg,
          transparent 0px,
          transparent 8px,
          black 24px,
          black 25px,
          black 32px,
          black 100%
        );
        mask-image: linear-gradient(
          270deg,
          transparent 0px,
          transparent 8px,
          black 24px,
          black 25px,
          black 32px,
          black 100%
        );
      }
    
      :host > wui-flex .swap-input input {
        background: none;
        border: none;
        height: 42px;
        width: 100%;
        font-size: 32px;
        font-style: normal;
        font-weight: 400;
        line-height: 130%;
        letter-spacing: -1.28px;
        outline: none;
        caret-color: var(--wui-color-accent-100);
        color: var(--wui-color-fg-100);
      }
    
      :host > wui-flex .swap-input input:focus-visible {
        outline: none;
      }
    
      :host > wui-flex .swap-input input::-webkit-outer-spin-button,
      :host > wui-flex .swap-input input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
      }
    
      .token-select-button {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--wui-spacing-xxs);
        padding: var(--wui-spacing-xs);
        padding-right: var(--wui-spacing-1xs);
        height: 40px;
        border: none;
        border-radius: 80px;
        background: var(--wui-gray-glass-002);
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);
        cursor: pointer;
        transition: background 0.2s linear;
      }
    
      .token-select-button:hover {
        background: var(--wui-gray-glass-005);
      }
    
      .token-select-button wui-image {
        width: 24px;
        height: 24px;
        border-radius: var(--wui-border-radius-s);
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-010);
      }
    
      .max-value-button {
        background-color: transparent;
        border: none;
        cursor: pointer;
        color: var(--wui-gray-glass-020);
        padding-left: 0px;
      }
    
      .market-value {
        min-height: 18px;
      }
    `,Iie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Sie=class extends xq{constructor(){super(...arguments),this.focused=!1,this.price=0,this.marketValue="$1.0345,00",this.target="sourceToken",this.onSetAmount=null,this.onSetMaxValue=null}render(){let e=this.marketValue||"0",t=WA.bigNumber(e).isGreaterThan(0);return oq`
          <wui-flex class="${this.focused?"focus":""}" justifyContent="space-between">
            ${"sourceToken"===this.target?tR:eR}
            <wui-flex
              flex="1"
              flexDirection="column"
              alignItems="flex-start"
              justifyContent="center"
              class="swap-input"
            >
              <input
                @focusin=${()=>this.onFocusChange(!0)}
                @focusout=${()=>this.onFocusChange(!1)}
                ?disabled=${this.disabled}
                .value=${this.value}
                @input=${this.dispatchInputChangeEvent}
                @keydown=${this.handleKeydown}
                placeholder="0"
              />
              <wui-text class="market-value" variant="small-400" color="fg-200">
                ${t?`$${this.marketValue}`:null}
              </wui-text>
            </wui-flex>
            ${this.templateTokenSelectButton()}
          </wui-flex>
        `}handleKeydown(e){let t=","===e.key,r="."===e.key,i=e.key>="0"&&e.key<="9",n=this.value;!i&&!["Backspace","Meta","Ctrl","a","c","v","ArrowLeft","ArrowRight","Tab"].includes(e.key)&&!r&&!t&&e.preventDefault(),(t||r)&&(n?.includes(".")||n?.includes(","))&&e.preventDefault()}dispatchInputChangeEvent(e){if(!this.onSetAmount)return;let t=e.target.value;","===t||"."===t?this.onSetAmount(this.target,"0."):t.endsWith(",")?this.onSetAmount(this.target,t.replace(",",".")):this.onSetAmount(this.target,t)}setMaxValueToInput(){this.onSetMaxValue?.(this.target,this.balance)}templateTokenSelectButton(){if(!this.token)return oq` <wui-button
            class="swap-token-button"
            size="md"
            variant="accentBg"
            @click=${this.onSelectToken.bind(this)}
          >
            Select token
          </wui-button>`;let e=this.token.logoUri?oq`<wui-image src=${this.token.logoUri}></wui-image>`:oq`
              <wui-icon-box
                size="sm"
                iconColor="fg-200"
                backgroundColor="fg-300"
                icon="networkPlaceholder"
              ></wui-icon-box>
            `;return oq`
          <wui-flex
            class="swap-token-button"
            flexDirection="column"
            alignItems="flex-end"
            justifyContent="center"
            gap="xxs"
          >
            <button
              size="sm"
              variant="shade"
              class="token-select-button"
              @click=${this.onSelectToken.bind(this)}
            >
              ${e}
              <wui-text variant="paragraph-600" color="fg-100">${this.token.symbol}</wui-text>
            </button>
            <wui-flex alignItems="center" gap="xxs"> ${this.tokenBalanceTemplate()} </wui-flex>
          </wui-flex>
        `}tokenBalanceTemplate(){let e=WA.multiply(this.balance,this.price),t=!!e&&e?.isGreaterThan(5e-5);return oq`
          ${t?oq`<wui-text variant="small-400" color="fg-200">
                ${FM.formatNumberToLocalString(this.balance,3)}
              </wui-text>`:null}
          ${"sourceToken"===this.target?this.tokenActionButtonTemplate(t):null}
        `}tokenActionButtonTemplate(e){return e?oq` <button class="max-value-button" @click=${this.setMaxValueToInput.bind(this)}>
            <wui-text color="accent-100" variant="small-600">Max</wui-text>
          </button>`:oq` <button class="max-value-button" @click=${this.onBuyToken.bind(this)}>
          <wui-text color="accent-100" variant="small-600">Buy</wui-text>
        </button>`}onFocusChange(e){this.focused=e}onSelectToken(){WS.sendEvent({type:"track",event:"CLICK_SELECT_TOKEN_TO_SWAP"}),YA.push("ConvertSelectToken",{target:this.target})}onBuyToken(){YA.push("OnRampProviders")}};Sie.styles=[Pie],Iie([Aq()],Sie.prototype,"focused",void 0),Iie([Aq()],Sie.prototype,"balance",void 0),Iie([Aq()],Sie.prototype,"value",void 0),Iie([Aq()],Sie.prototype,"price",void 0),Iie([Aq()],Sie.prototype,"marketValue",void 0),Iie([Aq()],Sie.prototype,"disabled",void 0),Iie([Aq()],Sie.prototype,"target",void 0),Iie([Aq()],Sie.prototype,"token",void 0),Iie([Aq()],Sie.prototype,"onSetAmount",void 0),Iie([Aq()],Sie.prototype,"onSetMaxValue",void 0),Sie=Iie([wR("w3m-convert-input")],Sie),cO(),Nz(),Iq(),bW(),Iq();var Aie=gz`
      wui-icon-link[data-hidden='true'] {
        opacity: 0 !important;
        pointer-events: none;
      }
    `,Tie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};function Oie(){let e=YA.state.data?.connector?.name,t=YA.state.data?.wallet?.name,r=YA.state.data?.network?.name,i=t??e,n=aT.getConnectors();return{Connect:`Connect ${1===n.length&&"w3m-email"===n[0]?.id?"Email":""} Wallet`,Account:void 0,AccountSettings:void 0,ConnectingExternal:i??"Connect Wallet",ConnectingWalletConnect:i??"WalletConnect",ConnectingSiwe:"Sign In",Networks:"Choose Network",SwitchNetwork:r??"Switch Network",AllWallets:"All Wallets",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a wallet?",GetWallet:"Get a wallet",Downloads:i?`Get ${i}`:"Downloads",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",ApproveTransaction:"Approve Transaction",Transactions:"Activity",UpgradeEmailWallet:"Upgrade your Wallet",UpgradeToSmartAccount:void 0,UpdateEmailWallet:"Edit Email",UpdateEmailPrimaryOtp:"Confirm Current Email",UpdateEmailSecondaryOtp:"Confirm New Email",UnsupportedChain:"Switch Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",WhatIsABuy:"What is Buy?",BuyInProgress:"Buy",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",WalletReceive:"Receive",WalletCompatibleNetworks:"Compatible Networks",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview convert",WalletSend:"Send",WalletSendPreview:"Review send",WalletSendSelectToken:"Select Token"}}var Rie=class extends xq{constructor(){super(),this.unsubscribe=[],this.heading=Oie()[YA.state.view],this.buffering=!1,this.showBack=!1,this.unsubscribe.push(YA.subscribeKey("view",(e=>{this.onViewChange(e),this.onHistoryChange()})),KS.subscribeKey("buffering",(e=>this.buffering=e)))}disconnectCallback(){this.unsubscribe.forEach((e=>e()))}render(){return oq`
          <wui-flex .padding=${this.getPadding()} justifyContent="space-between" alignItems="center">
            ${this.dynamicButtonTemplate()} ${this.titleTemplate()}
            <wui-icon-link
              ?disabled=${this.buffering}
              icon="close"
              @click=${this.onClose.bind(this)}
              data-testid="w3m-header-close"
            ></wui-icon-link>
          </wui-flex>
          ${this.separatorTemplate()}
        `}onWalletHelp(){WS.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),YA.push("WhatIsAWallet")}async onClose(){if(AS.state.isSiweEnabled){let{SIWEController:e}=await Promise.resolve().then((()=>(DV(),LV)));"success"!==e.state.status&&await KS.disconnect()}hT.close()}titleTemplate(){return oq`<wui-text variant="paragraph-700" color="fg-100">${this.heading}</wui-text>`}dynamicButtonTemplate(){let{view:e}=YA.state,t="Connect"===e,r="ApproveTransaction"===e||"UpgradeToSmartAccount"===e;return this.showBack&&!r?oq`<wui-icon-link
            id="dynamic"
            icon="chevronLeft"
            ?disabled=${this.buffering}
            @click=${this.onGoBack.bind(this)}
          ></wui-icon-link>`:oq`<wui-icon-link
          data-hidden=${!t}
          id="dynamic"
          icon="helpCircle"
          @click=${this.onWalletHelp.bind(this)}
        ></wui-icon-link>`}separatorTemplate(){return this.heading?oq`<wui-separator></wui-separator>`:null}getPadding(){return this.heading?["l","2l","l","2l"]:["l","2l","0","2l"]}async onViewChange(e){let t=this.shadowRoot?.querySelector("wui-text");if(t){let r=Oie()[e];await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.heading=r,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})}}async onHistoryChange(){let{history:e}=YA.state,t=this.shadowRoot?.querySelector("#dynamic");e.length>1&&!this.showBack&&t?(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}onGoBack(){"ConnectingSiwe"===YA.state.view?YA.push("Connect"):YA.goBack()}};Rie.styles=[Aie],Tie([Nq()],Rie.prototype,"heading",void 0),Tie([Nq()],Rie.prototype,"buffering",void 0),Tie([Nq()],Rie.prototype,"showBack",void 0),Rie=Tie([wR("w3m-header")],Rie),Nz(),Iq(),bW();var Nie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Mie=class extends xq{constructor(){super(...arguments),this.data=[]}render(){return oq`
          <wui-flex flexDirection="column" alignItems="center" gap="l">
            ${this.data.map((e=>oq`
                <wui-flex flexDirection="column" alignItems="center" gap="xl">
                  <wui-flex flexDirection="row" justifyContent="center" gap="1xs">
                    ${e.images.map((e=>oq`<wui-visual name=${e}></wui-visual>`))}
                  </wui-flex>
                </wui-flex>
                <wui-flex flexDirection="column" alignItems="center" gap="xxs">
                  <wui-text variant="paragraph-500" color="fg-100" align="center">
                    ${e.title}
                  </wui-text>
                  <wui-text variant="small-500" color="fg-200" align="center">${e.text}</wui-text>
                </wui-flex>
              `))}
          </wui-flex>
        `}};Nie([Aq({type:Array})],Mie.prototype,"data",void 0),Mie=Nie([wR("w3m-help-widget")],Mie),Iq(),bW(),Nz(),Iq();var $ie=gz`
      :host {
        width: 100%;
      }
    
      wui-loading-spinner {
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
      }
    
      .currency-container {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        right: var(--wui-spacing-1xs);
        height: 40px;
        padding: var(--wui-spacing-xs) var(--wui-spacing-1xs) var(--wui-spacing-xs)
          var(--wui-spacing-xs);
        min-width: 95px;
        border-radius: var(--FULL, 1000px);
        border: 1px solid var(--wui-gray-glass-002);
        background: var(--wui-gray-glass-002);
        cursor: pointer;
      }
    
      .currency-container > wui-image {
        height: 24px;
        width: 24px;
        border-radius: 50%;
      }
    `;cO();var jie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Lie=class extends xq{constructor(){super(),this.unsubscribe=[],this.type="Token",this.value=0,this.currencies=[],this.selectedCurrency=this.currencies?.[0],this.currencyImages=rT.state.currencyImages,this.tokenImages=rT.state.tokenImages,this.unsubscribe.push(mT.subscribeKey("purchaseCurrency",(e=>{!e||"Fiat"===this.type||(this.selectedCurrency=this.formatPurchaseCurrency(e))})),mT.subscribeKey("paymentCurrency",(e=>{!e||"Token"===this.type||(this.selectedCurrency=this.formatPaymentCurrency(e))})),mT.subscribe((e=>{"Fiat"===this.type?this.currencies=e.purchaseCurrencies.map(this.formatPurchaseCurrency):this.currencies=e.paymentCurrencies.map(this.formatPaymentCurrency)})),rT.subscribe((e=>{this.currencyImages={...e.currencyImages},this.tokenImages={...e.tokenImages}})))}firstUpdated(){mT.getAvailableCurrencies()}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){let e=this.selectedCurrency?.symbol||"",t=this.currencyImages[e]||this.tokenImages[e];return oq`<wui-input-text type="number" size="lg" value=${this.value}>
          ${this.selectedCurrency?oq` <wui-flex
                class="currency-container"
                justifyContent="space-between"
                alignItems="center"
                gap="xxs"
                @click=${()=>hT.open({view:`OnRamp${this.type}Select`})}
              >
                <wui-image src=${w8(t)}></wui-image>
                <wui-text color="fg-100">${this.selectedCurrency.symbol}</wui-text>
              </wui-flex>`:oq`<wui-loading-spinner></wui-loading-spinner>`}
        </wui-input-text>`}formatPaymentCurrency(e){return{name:e.id,symbol:e.id}}formatPurchaseCurrency(e){return{name:e.name,symbol:e.symbol}}};Lie.styles=$ie,jie([Aq({type:String})],Lie.prototype,"type",void 0),jie([Aq({type:Number})],Lie.prototype,"value",void 0),jie([Nq()],Lie.prototype,"currencies",void 0),jie([Nq()],Lie.prototype,"selectedCurrency",void 0),jie([Nq()],Lie.prototype,"currencyImages",void 0),jie([Nq()],Lie.prototype,"tokenImages",void 0),Lie=jie([wR("w3m-swap-input")],Lie),cO(),Nz(),Iq(),Iq();var Bie=gz`
      wui-flex {
        background-color: var(--wui-gray-glass-005);
      }
    
      a {
        text-decoration: none;
        color: var(--wui-color-fg-175);
        font-weight: 500;
      }
    `,Die=class extends xq{render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=AS.state;return e||t?oq`
          <wui-flex .padding=${["m","s","s","s"]} justifyContent="center">
            <wui-text color="fg-250" variant="small-400" align="center">
              By connecting your wallet, you agree to our <br />
              ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()}
            </wui-text>
          </wui-flex>
        `:null}andTemplate(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=AS.state;return e&&t?"and":""}termsTemplate(){let{termsConditionsUrl:e}=AS.state;return e?oq`<a href=${e}>Terms of Service</a>`:null}privacyTemplate(){let{privacyPolicyUrl:e}=AS.state;return e?oq`<a href=${e}>Privacy Policy</a>`:null}};Die.styles=[Bie],Die=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-legal-footer")],Die),cO(),Nz(),Iq(),bW(),Iq();var Uie=gz`
      :host {
        display: block;
        padding: 0 var(--wui-spacing-xl) var(--wui-spacing-xl);
      }
    `,Fie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Hie=class extends xq{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;let{name:e,app_store:t,play_store:r,chrome_store:i,homepage:n}=this.wallet,o=PS.isMobile(),a=PS.isIos(),s=PS.isAndroid(),c=[t,r,n,i].filter(Boolean).length>1,l=FM.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return c&&!o?oq`
            <wui-cta-button
              label=${`Don't have ${l}?`}
              buttonLabel="Get"
              @click=${()=>YA.push("Downloads",{wallet:this.wallet})}
            ></wui-cta-button>
          `:!c&&n?oq`
            <wui-cta-button
              label=${`Don't have ${l}?`}
              buttonLabel="Get"
              @click=${this.onHomePage.bind(this)}
            ></wui-cta-button>
          `:t&&a?oq`
            <wui-cta-button
              label=${`Don't have ${l}?`}
              buttonLabel="Get"
              @click=${this.onAppStore.bind(this)}
            ></wui-cta-button>
          `:r&&s?oq`
            <wui-cta-button
              label=${`Don't have ${l}?`}
              buttonLabel="Get"
              @click=${this.onPlayStore.bind(this)}
            ></wui-cta-button>
          `:(this.style.display="none",null)}onAppStore(){this.wallet?.app_store&&PS.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&PS.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&PS.openHref(this.wallet.homepage,"_blank")}};Hie.styles=[Uie],Fie([Aq({type:Object})],Hie.prototype,"wallet",void 0),Hie=Fie([wR("w3m-mobile-download-links")],Hie),cO(),Nz(),Iq(),Iq();var zie=gz`
      wui-flex {
        border-top: 1px solid var(--wui-gray-glass-005);
      }
    
      a {
        text-decoration: none;
        color: var(--wui-color-fg-175);
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--wui-spacing-3xs);
      }
    `,qie=class extends xq{render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=AS.state;return e||t?oq`
          <wui-flex
            .padding=${["m","s","s","s"]}
            flexDirection="column"
            alignItems="center"
            justifyContent="center"
            gap="s"
          >
            <wui-text color="fg-250" variant="small-400" align="center">
              We work with the best providers to give you the lowest fees and best support. More options
              coming soon!
            </wui-text>
    
            ${this.howDoesItWorkTemplate()}
          </wui-flex>
        `:null}howDoesItWorkTemplate(){return oq` <wui-link @click=${this.onWhatIsBuy.bind(this)}>
          <wui-icon size="xs" color="accent-100" slot="iconLeft" name="helpCircle"></wui-icon>
          How does it work?
        </wui-link>`}onWhatIsBuy(){YA.push("WhatIsABuy")}};qie.styles=[zie],qie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-onramp-providers-footer")],qie),cO(),Nz(),Iq(),bW(),Iq();var Wie=gz`
      :host {
        display: block;
        position: absolute;
        opacity: 0;
        pointer-events: none;
        top: 11px;
        left: 50%;
        width: max-content;
      }
    `,Vie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Gie={success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}},Zie=class extends xq{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=$S.state.open,this.unsubscribe.push($S.subscribeKey("open",(e=>{this.open=e,this.onOpen()})))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach((e=>e()))}render(){let{message:e,variant:t}=$S.state,r=Gie[t];return oq`
          <wui-snackbar
            message=${e}
            backgroundColor=${r.backgroundColor}
            iconColor=${r.iconColor}
            icon=${r.icon}
          ></wui-snackbar>
        `}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:"translateX(-50%) scale(0.85)"},{opacity:1,transform:"translateX(-50%) scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.timeout=setTimeout((()=>$S.hide()),2500)):this.animate([{opacity:1,transform:"translateX(-50%) scale(1)"},{opacity:0,transform:"translateX(-50%) scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"})}};Zie.styles=Wie,Vie([Nq()],Zie.prototype,"open",void 0),Zie=Vie([wR("w3m-snackbar")],Zie),cO(),Nz(),Iq(),bW(),Iq();var Kie=gz`
      wui-separator {
        margin: var(--wui-spacing-s) calc(var(--wui-spacing-s) * -1);
        width: calc(100% + var(--wui-spacing-s) * 2);
      }
    
      wui-email-input {
        width: 100%;
      }
    
      form {
        width: 100%;
        display: block;
        position: relative;
      }
    
      wui-icon-link,
      wui-loading-spinner {
        position: absolute;
        top: 21px;
        transform: translateY(-50%);
      }
    
      wui-icon-link {
        right: var(--wui-spacing-xs);
      }
    
      wui-loading-spinner {
        right: var(--wui-spacing-m);
      }
    `;cO();var Yie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Jie=class extends xq{constructor(){super(),this.unsubscribe=[],this.formRef=Nre(),this.connectors=aT.state.connectors,this.email="",this.loading=!1,this.error="",this.unsubscribe.push(aT.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}firstUpdated(){this.formRef.value?.addEventListener("keydown",(e=>{"Enter"===e.key&&this.onSubmitEmail(e)}))}render(){let e=this.connectors.length>1;return this.connectors.find((e=>"EMAIL"===e.type))?oq`
          <form ${jre(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}>
            <wui-email-input
              @focus=${this.onFocusEvent.bind(this)}
              .disabled=${this.loading}
              @inputChange=${this.onEmailInputChange.bind(this)}
              .errorMessage=${this.error}
            >
            </wui-email-input>
    
            ${this.submitButtonTemplate()}${this.loadingTemplate()}
            <input type="submit" hidden />
          </form>
    
          ${e?oq`<wui-separator text="or"></wui-separator>`:null}
        `:null}submitButtonTemplate(){return!this.loading&&this.email.length>3?oq`
              <wui-icon-link
                size="sm"
                icon="chevronRight"
                iconcolor="accent-100"
                @click=${this.onSubmitEmail.bind(this)}
              >
              </wui-icon-link>
            `:null}loadingTemplate(){return this.loading?oq`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:null}onEmailInputChange(e){this.email=e.detail.trim(),this.error=""}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();let t=aT.getEmailConnector();if(!t)throw new Error("w3m-email-login-widget: Email connector not found");let{action:r}=await t.provider.connectEmail({email:this.email});WS.sendEvent({type:"track",event:"EMAIL_SUBMITTED"}),"VERIFY_OTP"===r?(WS.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),YA.push("EmailVerifyOtp",{email:this.email})):"VERIFY_DEVICE"===r&&YA.push("EmailVerifyDevice",{email:this.email})}catch(e){PS.parseError(e)?.includes("Invalid email")?this.error="Invalid email. Try again.":$S.showError(e)}finally{this.loading=!1}}onFocusEvent(){WS.sendEvent({type:"track",event:"EMAIL_LOGIN_SELECTED"})}};Jie.styles=Kie,Yie([Nq()],Jie.prototype,"connectors",void 0),Yie([Nq()],Jie.prototype,"email",void 0),Yie([Nq()],Jie.prototype,"loading",void 0),Yie([Nq()],Jie.prototype,"error",void 0),Jie=Yie([wR("w3m-email-login-widget")],Jie),cO(),Nz(),Iq(),bW(),Iq();var Qie=gz`
      wui-flex {
        width: 100%;
      }
    
      :host > wui-flex:first-child {
        transform: translateY(calc(var(--wui-spacing-xxs) * -1));
      }
    
      wui-icon-link {
        margin-right: calc(var(--wui-icon-box-size-md) * -1);
      }
    
      wui-notice-card {
        margin-bottom: var(--wui-spacing-3xs);
      }
    
      w3m-transactions-view {
        max-height: 200px;
      }
    
      .tab-content-container {
        height: 300px;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
      }
    
      .account-button {
        width: auto;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--wui-spacing-s);
        height: 48px;
        padding: var(--wui-spacing-xs);
        padding-right: var(--wui-spacing-s);
        box-shadow: inset 0 0 0 1px var(--wui-gray-glass-002);
        background-color: var(--wui-gray-glass-002);
        border-radius: 24px;
        transaction: background-color 0.2s linear;
      }
    
      .account-button:hover {
        background-color: var(--wui-gray-glass-005);
      }
    
      .avatar-container {
        position: relative;
      }
    
      wui-avatar.avatar {
        width: 32px;
        height: 32px;
        box-shadow: 0 0 0 2px var(--wui-gray-glass-005);
      }
    
      wui-avatar.network-avatar {
        width: 16px;
        height: 16px;
        position: absolute;
        left: 100%;
        top: 100%;
        transform: translate(-75%, -75%);
        box-shadow: 0 0 0 2px var(--wui-gray-glass-005);
      }
    
      .account-links {
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
    
      .account-links wui-flex {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 1;
        background: red;
        align-items: center;
        justify-content: center;
        height: 48px;
        padding: 10px;
        flex: 1 0 0;
        border-radius: var(--XS, 16px);
        border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));
        background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));
        transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
        will-change: background-color;
      }
    
      .account-links wui-flex:hover {
        background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15));
      }
    
      .account-links wui-flex wui-icon {
        width: var(--S, 20px);
        height: var(--S, 20px);
      }
    
      .account-links wui-flex wui-icon svg path {
        stroke: #47a1ff;
      }
    `,Xie=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},ene=class extends xq{constructor(){super(),this.unsubscribe=[],this.address=eT.state.address,this.profileImage=eT.state.profileImage,this.profileName=eT.state.profileName,this.network=GA.state.caipNetwork,this.disconnecting=!1,this.balance=eT.state.balance,this.balanceSymbol=eT.state.balanceSymbol,this.unsubscribe.push(eT.subscribe((e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.balance=e.balance,this.balanceSymbol=e.balanceSymbol):this.disconnecting||$S.showError("Account not found")})),GA.subscribeKey("caipNetwork",(e=>{e?.id&&(this.network=e)})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){if(!this.address)throw new Error("w3m-account-view: No account provided");let e=wT.getNetworkImage(this.network);return oq`<wui-flex
            flexDirection="column"
            .padding=${["0","xl","m","xl"]}
            alignItems="center"
            gap="l"
          >
            <wui-avatar
              alt=${w8(this.address)}
              address=${w8(this.address)}
              imageSrc=${w8(null===this.profileImage?void 0:this.profileImage)}
            ></wui-avatar>
            <wui-flex flexDirection="column" alignItems="center">
              <wui-flex gap="3xs" alignItems="center" justifyContent="center">
                <wui-text variant="medium-title-600" color="fg-100">
                  ${this.profileName?FM.getTruncateString({string:this.profileName,charsStart:20,charsEnd:0,truncate:"end"}):FM.getTruncateString({string:this.address?this.address:"",charsStart:4,charsEnd:4,truncate:"middle"})}
                </wui-text>
                <wui-icon-link
                  size="md"
                  icon="copy"
                  iconColor="fg-200"
                  @click=${this.onCopyAddress}
                ></wui-icon-link>
              </wui-flex>
              <wui-text variant="paragraph-500" color="fg-200"
                >${PS.formatBalance(this.balance,this.balanceSymbol)}</wui-text
              >
            </wui-flex>
            ${this.explorerBtnTemplate()}
          </wui-flex>
    
          <wui-flex flexDirection="column" gap="xs" .padding=${["0","s","s","s"]}>
            ${this.emailCardTemplate()} ${this.emailBtnTemplate()}
    
            <wui-list-item
              .variant=${e?"image":"icon"}
              iconVariant="overlay"
              icon="networkPlaceholder"
              imageSrc=${w8(e)}
              ?chevron=${this.isAllowedNetworkSwitch()}
              @click=${this.onNetworks.bind(this)}
              data-testid="w3m-account-select-network"
            >
              <wui-text variant="paragraph-500" color="fg-100">
                ${this.network?.name??"Unknown"}
              </wui-text>
            </wui-list-item>
            ${this.onrampTemplate()}
            <wui-list-item
              iconVariant="blue"
              icon="swapHorizontalMedium"
              iconSize="sm"
              ?chevron=${!0}
              @click=${this.onTransactions.bind(this)}
            >
              <wui-text variant="paragraph-500" color="fg-100">Activity</wui-text>
            </wui-list-item>
            <wui-list-item
              variant="icon"
              iconVariant="overlay"
              icon="disconnect"
              ?chevron=${!1}
              .loading=${this.disconnecting}
              @click=${this.onDisconnect.bind(this)}
              data-testid="disconnect-button"
            >
              <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text>
            </wui-list-item>
          </wui-flex>`}onrampTemplate(){let{enableOnramp:e}=AS.state;return e?oq`
          <wui-list-item
            iconVariant="blue"
            icon="card"
            ?chevron=${!0}
            @click=${this.handleClickPay.bind(this)}
          >
            <wui-text variant="paragraph-500" color="fg-100">Buy crypto</wui-text>
          </wui-list-item>
        `:null}emailCardTemplate(){let e=US.getConnectedConnector(),t=aT.getEmailConnector(),{origin:r}=location;return!t||"EMAIL"!==e||r.includes(kS.SECURE_SITE)?null:oq`
          <wui-notice-card
            @click=${this.onGoToUpgradeView.bind(this)}
            label="Upgrade your wallet"
            description="Transition to a self-custodial wallet"
            icon="wallet"
            data-testid="w3m-wallet-upgrade-card"
          ></wui-notice-card>
        `}handleClickPay(){YA.push("OnRampProviders")}explorerBtnTemplate(){let{addressExplorerUrl:e}=eT.state;return e?oq`
          <wui-button size="sm" variant="shade" @click=${this.onExplorer.bind(this)}>
            <wui-icon size="sm" color="inherit" slot="iconLeft" name="compass"></wui-icon>
            Block Explorer
            <wui-icon size="sm" color="inherit" slot="iconRight" name="externalLink"></wui-icon>
          </wui-button>
        `:null}emailBtnTemplate(){let e=US.getConnectedConnector(),t=aT.getEmailConnector();if(!t||"EMAIL"!==e)return null;let r=t.provider.getEmail()??"";return oq`
          <wui-list-item
            variant="icon"
            iconVariant="overlay"
            icon="mail"
            iconSize="sm"
            data-testid="w3m-account-email-update"
            ?chevron=${!0}
            @click=${()=>this.onGoToUpdateEmail(r)}
          >
            <wui-text variant="paragraph-500" color="fg-100">${r}</wui-text>
          </wui-list-item>
        `}isAllowedNetworkSwitch(){let{requestedCaipNetworks:e}=GA.state,t=!!e&&e.length>1,r=e?.find((({id:e})=>e===this.network?.id));return t||!r}onCopyAddress(){try{this.address&&(PS.copyToClopboard(this.address),$S.showSuccess("Address copied"))}catch{$S.showError("Failed to copy")}}onNetworks(){this.isAllowedNetworkSwitch()&&(WS.sendEvent({type:"track",event:"CLICK_NETWORKS"}),YA.push("Networks"))}onTransactions(){WS.sendEvent({type:"track",event:"CLICK_TRANSACTIONS"}),YA.push("Transactions")}async onDisconnect(){try{this.disconnecting=!0,await KS.disconnect(),WS.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),hT.close()}catch{WS.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),$S.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onExplorer(){let{addressExplorerUrl:e}=eT.state;e&&PS.openHref(e,"_blank")}onGoToUpgradeView(){WS.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),YA.push("UpgradeEmailWallet")}onGoToUpdateEmail(e){YA.push("UpdateEmailWallet",{email:e})}};ene.styles=Qie,Xie([Nq()],ene.prototype,"address",void 0),Xie([Nq()],ene.prototype,"profileImage",void 0),Xie([Nq()],ene.prototype,"profileName",void 0),Xie([Nq()],ene.prototype,"network",void 0),Xie([Nq()],ene.prototype,"disconnecting",void 0),Xie([Nq()],ene.prototype,"balance",void 0),Xie([Nq()],ene.prototype,"balanceSymbol",void 0),ene=Xie([wR("w3m-account-default-widget")],ene),cO(),Nz(),Iq(),bW(),Iq();var tne=gz`
      wui-flex {
        width: 100%;
      }
    
      wui-promo {
        position: absolute;
        top: -32px;
      }
    
      wui-profile-button {
        margin-top: calc(-1 * var(--wui-spacing-2l));
      }
    
      wui-promo + wui-profile-button {
        margin-top: var(--wui-spacing-2l);
      }
    
      wui-tooltip-select {
        width: 100%;
      }
    
      wui-tabs {
        width: 100%;
      }
    
      .contentContainer {
        height: 280px;
      }
    
      .contentContainer > wui-icon-box {
        width: 40px;
        height: 40px;
        border-radius: var(--wui-border-radius-xxs);
      }
    
      .contentContainer > .textContent {
        width: 65%;
      }
    `,rne=[{label:"Tokens"},{label:"NFTs"},{label:"Activity"}],ine=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},nne=class extends xq{constructor(){super(),this.unsubscribe=[],this.address=eT.state.address,this.profileImage=eT.state.profileImage,this.profileName=eT.state.profileName,this.smartAccountDeployed=eT.state.smartAccountDeployed,this.network=GA.state.caipNetwork,this.currentTab=eT.state.currentTab,this.tokenBalance=eT.state.tokenBalance,this.preferredAccountType=eT.state.preferredAccountType,this.unsubscribe.push(eT.subscribe((e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.currentTab=e.currentTab,this.tokenBalance=e.tokenBalance,this.smartAccountDeployed=e.smartAccountDeployed,this.preferredAccountType=e.preferredAccountType):hT.close()})),GA.subscribe((e=>{this.network=e.caipNetwork}))),this.watchConvertValues()}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),clearInterval(this.watchTokenBalance)}firstUpdated(){eT.fetchTokenBalance()}render(){if(!this.address)throw new Error("w3m-account-view: No account provided");let e=wT.getNetworkImage(this.network);return oq`<wui-flex
          flexDirection="column"
          .padding=${["0","xl","m","xl"]}
          alignItems="center"
          gap="m"
        >
          ${this.activateAccountTemplate()}
          <wui-profile-button
            @click=${this.onProfileButtonClick.bind(this)}
            address=${w8(this.address)}
            networkSrc=${w8(e)}
            icon="chevronBottom"
            avatarSrc=${w8(this.profileImage?this.profileImage:void 0)}
            ?isprofilename=${!!this.profileName}
          ></wui-profile-button>
          ${this.tokenBalanceTemplate()}
          <wui-flex gap="s">
            <wui-tooltip-select
              @click=${this.onBuyClick.bind(this)}
              text="Buy"
              icon="card"
            ></wui-tooltip-select>
            <wui-tooltip-select
              @click=${this.onConvertClick.bind(this)}
              text="Convert"
              icon="recycleHorizontal"
            ></wui-tooltip-select>
            <wui-tooltip-select
              @click=${this.onReceiveClick.bind(this)}
              text="Receive"
              icon="arrowBottomCircle"
            ></wui-tooltip-select>
            <wui-tooltip-select
              @click=${this.onSendClick.bind(this)}
              text="Send"
              icon="send"
            ></wui-tooltip-select>
          </wui-flex>
    
          <wui-tabs
            .onTabChange=${this.onTabChange.bind(this)}
            .activeTab=${this.currentTab}
            localTabWidth="104px"
            .tabs=${rne}
          ></wui-tabs>
          ${this.listContentTemplate()}
        </wui-flex>`}watchConvertValues(){this.watchTokenBalance=setInterval((()=>eT.fetchTokenBalance()),1e4)}listContentTemplate(){return 0===this.currentTab?oq`<w3m-account-tokens-widget></w3m-account-tokens-widget>`:1===this.currentTab?oq`<w3m-account-nfts-widget></w3m-account-nfts-widget>`:2===this.currentTab?oq`<w3m-account-activity-widget></w3m-account-activity-widget>`:oq`<w3m-account-tokens-widget></w3m-account-tokens-widget>`}tokenBalanceTemplate(){if(this.tokenBalance&&this.tokenBalance?.length>=0){let e=PS.calculateBalance(this.tokenBalance),{dollars:t="0",pennies:r="00"}=PS.formatTokenBalance(e);return oq`<wui-balance dollars=${t} pennies=${r}></wui-balance>`}return oq`<wui-balance dollars="0" pennies="00"></wui-balance>`}activateAccountTemplate(){return!GA.checkIfSmartAccountEnabled()||this.preferredAccountType!==z8.ACCOUNT_TYPES.EOA||this.smartAccountDeployed?null:oq` <wui-promo
          text=${"Activate your account"}
          @click=${this.onUpdateToSmartAccount.bind(this)}
          data-testid="activate-smart-account-promo"
        ></wui-promo>`}onTabChange(e){eT.setCurrentTab(e)}onProfileButtonClick(){YA.push("AccountSettings")}onBuyClick(){YA.push("OnRampProviders")}onConvertClick(){YA.push("Convert")}onReceiveClick(){YA.push("WalletReceive")}onSendClick(){YA.push("WalletSend")}onUpdateToSmartAccount(){YA.push("UpgradeToSmartAccount")}};nne.styles=tne,ine([Nq()],nne.prototype,"watchTokenBalance",void 0),ine([Nq()],nne.prototype,"address",void 0),ine([Nq()],nne.prototype,"profileImage",void 0),ine([Nq()],nne.prototype,"profileName",void 0),ine([Nq()],nne.prototype,"smartAccountDeployed",void 0),ine([Nq()],nne.prototype,"network",void 0),ine([Nq()],nne.prototype,"currentTab",void 0),ine([Nq()],nne.prototype,"tokenBalance",void 0),ine([Nq()],nne.prototype,"preferredAccountType",void 0),nne=ine([wR("w3m-account-wallet-features-widget")],nne),Nz(),Iq(),Iq();var one=gz`
      :host {
        width: 100%;
        max-height: 280px;
        overflow: scroll;
        scrollbar-width: none;
      }
    `,ane=class extends xq{render(){return oq`<w3m-activity-list page="account"></w3m-activity-list>`}};ane.styles=one,ane=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-account-activity-widget")],ane),cO(),Nz(),Iq(),Iq();var sne=gz`
      .contentContainer {
        height: 280px;
      }
    
      .contentContainer > wui-icon-box {
        width: 40px;
        height: 40px;
        border-radius: var(--wui-border-radius-xxs);
      }
    
      .contentContainer > .textContent {
        width: 65%;
      }
    `,cne=class extends xq{render(){return oq`${this.nftTemplate()}`}nftTemplate(){return oq` <wui-flex
          class="contentContainer"
          alignItems="center"
          justifyContent="center"
          flexDirection="column"
          gap="l"
        >
          <wui-icon-box
            icon="wallet"
            size="inherit"
            iconColor="fg-200"
            backgroundColor="fg-200"
            iconSize="lg"
          ></wui-icon-box>
          <wui-flex
            class="textContent"
            gap="xs"
            flexDirection="column"
            justifyContent="center"
            flexDirection="column"
          >
            <wui-text variant="paragraph-500" align="center" color="fg-100">No NFTs yet</wui-text>
            <wui-text variant="small-400" align="center" color="fg-200"
              >Transfer from another wallets to get started</wui-text
            >
          </wui-flex>
          <wui-link @click=${this.onReceiveClick.bind(this)}>Receive NFTs</wui-link>
        </wui-flex>`}onReceiveClick(){YA.push("WalletReceive")}};cne.styles=sne,cne=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}([wR("w3m-account-nfts-widget")],cne),cO(),Nz(),Iq(),Iq();var lne=gz`
      :host {
        width: 100%;
      }
    
      wui-flex {
        width: 100%;
      }
    
      .contentContainer {
        max-height: 280px;
        overflow: scroll;
        scrollbar-width: none;
      }
    `;bW();var une=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},dne=class extends xq{constructor(){super(),this.unsubscribe=[],this.tokenBalance=eT.state.tokenBalance,this.unsubscribe.push(eT.subscribe((e=>{this.tokenBalance=e.tokenBalance})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return oq`${this.tokenTemplate()}`}tokenTemplate(){return this.tokenBalance&&this.tokenBalance?.length>0?oq`<wui-flex class="contentContainer" flexDirection="column" gap="xs">
            ${this.tokenItemTemplate()}
          </wui-flex>`:oq` <wui-flex flexDirection="column" gap="xs"
          ><wui-list-description
            @click=${this.onBuyClick.bind(this)}
            text="Buy Crypto"
            description="Easy with card or bank account"
            icon="card"
            iconColor="success-100"
            iconBackgroundColor="success-100"
            tag="popular"
          ></wui-list-description
          ><wui-list-description
            @click=${this.onReceiveClick.bind(this)}
            text="Receive funds"
            description="Transfer tokens on your wallet"
            icon="arrowBottomCircle"
            iconColor="fg-200"
            iconBackgroundColor="fg-200"
          ></wui-list-description
        ></wui-flex>`}tokenItemTemplate(){return this.tokenBalance?.map((e=>oq`<wui-list-token
              tokenName=${e.name}
              tokenImageUrl=${e.iconUrl}
              tokenAmount=${e.quantity.numeric}
              tokenValue=${e.value}
              tokenCurrency=${e.symbol}
            ></wui-list-token>`))}onReceiveClick(){YA.push("WalletReceive")}onBuyClick(){YA.push("OnRampProviders")}};dne.styles=lne,une([Nq()],dne.prototype,"tokenBalance",void 0),dne=une([wR("w3m-account-tokens-widget")],dne),GT(),cO(),Nz(),Iq(),bW(),Iq();var hne=gz`
      :host {
        min-height: 100%;
      }
    
      .contentContainer {
        height: 280px;
      }
    
      .contentContainer > wui-icon-box {
        width: 40px;
        height: 40px;
        border-radius: var(--wui-border-radius-xxs);
      }
    
      .contentContainer > .textContent {
        width: 65%;
      }
    
      .emptyContainer {
        height: 100%;
      }
    `,pne=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},fne="last-transaction",gne=class extends xq{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.page="activity",this.address=eT.state.address,this.transactionsByYear=GS.state.transactionsByYear,this.loading=GS.state.loading,this.empty=GS.state.empty,this.next=GS.state.next,GS.clearCursor(),this.unsubscribe.push(eT.subscribe((e=>{e.isConnected&&this.address!==e.address&&(this.address=e.address,GS.resetTransactions(),GS.fetchTransactions(e.address))})),GS.subscribe((e=>{this.transactionsByYear=e.transactionsByYear,this.loading=e.loading,this.empty=e.empty,this.next=e.next})))}firstUpdated(){GS.fetchTransactions(this.address),this.createPaginationObserver()}updated(){this.setPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return oq` ${this.empty?null:this.templateTransactionsByYear()}
        ${this.loading?this.templateLoading():null}
        ${!this.loading&&this.empty?this.templateEmpty():null}`}templateTransactionsByYear(){let e=Object.keys(this.transactionsByYear).sort().reverse();return e.map(((t,r)=>{let i=r===e.length-1,n=parseInt(t,10);return new Array(12).fill(null).map(((e,t)=>t)).reverse().map((e=>{let t=tH.getTransactionGroupTitle(n,e),r=this.transactionsByYear[n]?.[e];return r?oq`
              <wui-flex flexDirection="column">
                <wui-flex
                  alignItems="center"
                  flexDirection="row"
                  .padding=${["xs","s","s","s"]}
                >
                  <wui-text variant="paragraph-500" color="fg-200">${t}</wui-text>
                </wui-flex>
                <wui-flex flexDirection="column" gap="xs">
                  ${this.templateTransactions(r,i)}
                </wui-flex>
              </wui-flex>
            `:null}))}))}templateRenderTransaction(e,t){let{date:r,descriptions:i,direction:n,isAllNFT:o,images:a,status:s,transfers:c,type:l}=this.getTransactionListItemProps(e),u=c?.length>1;return 2!==c?.length||o?u?c.map(((e,i)=>{let n=tH.getTransferDescription(e),o=t&&i===c.length-1;return oq` <wui-transaction-list-item
              date=${r}
              direction=${e.direction}
              id=${o&&this.next?fne:""}
              status=${s}
              type=${l}
              .onlyDirectionIcon=${!0}
              .images=${[a[i]]}
              .descriptions=${[n]}
            ></wui-transaction-list-item>`})):oq`
          <wui-transaction-list-item
            date=${r}
            .direction=${n}
            id=${t&&this.next?fne:""}
            status=${s}
            type=${l}
            .images=${a}
            .descriptions=${i}
          ></wui-transaction-list-item>
        `:oq`
            <wui-transaction-list-item
              date=${r}
              .direction=${n}
              id=${t&&this.next?fne:""}
              status=${s}
              type=${l}
              .images=${a}
              .descriptions=${i}
            ></wui-transaction-list-item>
          `}templateTransactions(e,t){return e.map(((r,i)=>{let n=t&&i===e.length-1;return oq`${this.templateRenderTransaction(r,n)}`}))}emptyStateActivity(){return oq`<wui-flex
          class="emptyContainer"
          flexGrow="1"
          flexDirection="column"
          justifyContent="center"
          alignItems="center"
          .padding=${["3xl","xl","3xl","xl"]}
          gap="xl"
        >
          <wui-icon-box
            backgroundColor="glass-005"
            background="gray"
            iconColor="fg-200"
            icon="wallet"
            size="lg"
            ?border=${!0}
            borderColor="wui-color-bg-125"
          ></wui-icon-box>
          <wui-flex flexDirection="column" alignItems="center" gap="xs">
            <wui-text align="center" variant="paragraph-500" color="fg-100"
              >No Transactions yet</wui-text
            >
            <wui-text align="center" variant="small-500" color="fg-200"
              >Start trading on dApps <br />
              to grow your wallet!</wui-text
            >
          </wui-flex>
        </wui-flex>`}emptyStateAccount(){return oq`<wui-flex
          class="contentContainer"
          alignItems="center"
          justifyContent="center"
          flexDirection="column"
          gap="l"
        >
          <wui-icon-box
            icon="swapHorizontal"
            size="inherit"
            iconColor="fg-200"
            backgroundColor="fg-200"
            iconSize="lg"
          ></wui-icon-box>
          <wui-flex
            class="textContent"
            gap="xs"
            flexDirection="column"
            justifyContent="center"
            flexDirection="column"
          >
            <wui-text variant="paragraph-500" align="center" color="fg-100">No activity yet</wui-text>
            <wui-text variant="small-400" align="center" color="fg-200"
              >Your next transactions will appear here</wui-text
            >
          </wui-flex>
          <wui-link @click=${this.onReceiveClick.bind(this)}>Trade</wui-link>
        </wui-flex>`}templateEmpty(){return"account"===this.page?oq`${this.emptyStateAccount()}`:oq`${this.emptyStateActivity()}`}templateLoading(){return"activity"===this.page?Array(7).fill(oq` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map((e=>e)):null}onReceiveClick(){YA.push("WalletReceive")}createPaginationObserver(){let{projectId:e}=AS.state;this.paginationObserver=new IntersectionObserver((([t])=>{t?.isIntersecting&&!this.loading&&(GS.fetchTransactions(this.address),WS.sendEvent({type:"track",event:"LOAD_MORE_TRANSACTIONS",properties:{address:this.address,projectId:e,cursor:this.next}}))}),{}),this.setPaginationObserver()}setPaginationObserver(){this.paginationObserver?.disconnect();let e=this.shadowRoot?.querySelector(`#${fne}`);e&&this.paginationObserver?.observe(e)}getTransactionListItemProps(e){let t=tA.formatDate(e?.metadata?.minedAt),r=tH.getTransactionDescriptions(e),i=e?.transfers,n=e?.transfers?.[0],o=!!n&&e?.transfers?.every((e=>!!e.nft_info)),a=tH.getTransactionImages(i);return{date:t,direction:n?.direction,descriptions:r,isAllNFT:o,images:a,status:e.metadata?.status,transfers:i,type:e.metadata?.operationType}}};gne.styles=hne,pne([Aq()],gne.prototype,"page",void 0),pne([Nq()],gne.prototype,"address",void 0),pne([Nq()],gne.prototype,"transactionsByYear",void 0),pne([Nq()],gne.prototype,"loading",void 0),pne([Nq()],gne.prototype,"empty",void 0),pne([Nq()],gne.prototype,"next",void 0),gne=pne([wR("w3m-activity-list")],gne),Nz(),Iq(),Iq();var mne=gz`
      :host {
        width: 100%;
        height: 100px;
        border-radius: var(--wui-border-radius-s);
        border: 1px solid var(--wui-gray-glass-002);
        background-color: var(--wui-gray-glass-002);
        transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);
        will-change: background-color;
      }
    
      :host(:hover) {
        background-color: var(--wui-gray-glass-005);
      }
    
      wui-flex {
        width: 100%;
        height: fit-content;
      }
    
      wui-button {
        width: 100%;
        display: flex;
        justify-content: flex-end;
      }
    `;bW(),cO();var bne=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},yne=class extends xq{render(){return oq` <wui-flex
          flexDirection="column"
          gap="4xs"
          .padding=${["xl","s","l","l"]}
        >
          <wui-flex alignItems="center">
            <wui-input-amount
              @inputChange=${this.onInputChange.bind(this)}
              ?disabled=${!this.token&&!0}
              .value=${this.sendTokenAmount?String(this.sendTokenAmount):""}
            ></wui-input-amount>
            ${this.buttonTemplate()}
          </wui-flex>
          <wui-flex alignItems="center" justifyContent="space-between">
            ${this.sendValueTemplate()}
            <wui-flex alignItems="center" gap="4xs" justifyContent="flex-end">
              ${this.maxAmountTemplate()} ${this.actionTemplate()}
            </wui-flex>
          </wui-flex>
        </wui-flex>`}buttonTemplate(){return this.token?oq`<wui-token-button
            text=${this.token.symbol}
            imageSrc=${this.token.iconUrl}
            @click=${this.handleSelectButtonClick.bind(this)}
            >Select token</wui-token-button
          >`:oq`<wui-button
          size="md"
          variant="accentBg"
          @click=${this.handleSelectButtonClick.bind(this)}
          >Select token</wui-button
        >`}handleSelectButtonClick(){YA.push("WalletSendSelectToken")}sendValueTemplate(){if(this.token&&this.sendTokenAmount){let e=this.token.price*this.sendTokenAmount;return oq`<wui-text variant="small-400" color="fg-200">$${e.toFixed(2)}</wui-text>`}return null}maxAmountTemplate(){return this.token?this.sendTokenAmount&&this.sendTokenAmount>Number(this.token.quantity.numeric)?oq` <wui-text variant="small-400" color="error-100">
              ${FM.roundNumber(Number(this.token.quantity.numeric),6,5)}
            </wui-text>`:oq` <wui-text variant="small-400" color="fg-200">
            ${FM.roundNumber(Number(this.token.quantity.numeric),6,5)}
          </wui-text>`:null}actionTemplate(){return this.token?this.sendTokenAmount&&this.sendTokenAmount>Number(this.token.quantity.numeric)?oq`<wui-link @click=${this.onBuyClick.bind(this)}>Buy</wui-link>`:oq`<wui-link @click=${this.onMaxClick.bind(this)}>Max</wui-link>`:null}onInputChange(e){yT.setTokenAmount(e.detail)}onMaxClick(){this.token&&yT.setTokenAmount(Number(this.token?.quantity.numeric))}onBuyClick(){YA.push("OnRampProviders")}};yne.styles=mne,bne([Aq({type:Object})],yne.prototype,"token",void 0),bne([Aq({type:Number})],yne.prototype,"sendTokenAmount",void 0),yne=bne([wR("w3m-input-token")],yne),Nz(),Iq(),Iq();var wne=gz`
      :host {
        width: 100%;
        height: 100px;
        border-radius: var(--wui-border-radius-s);
        border: 1px solid var(--wui-gray-glass-002);
        background-color: var(--wui-gray-glass-002);
        transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);
        will-change: background-color;
        position: relative;
      }
    
      :host(:hover) {
        background-color: var(--wui-gray-glass-005);
      }
    
      wui-flex {
        width: 100%;
        height: fit-content;
      }
    
      wui-button {
        display: ruby;
        color: var(--wui-color-fg-100);
        margin: 0 var(--wui-spacing-xs);
      }
    
      .instruction {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
      }
    
      textarea {
        background: transparent;
        width: 100%;
        font-family: var(--w3m-font-family);
        font-size: var(--wui-font-size-medium);
        font-style: normal;
        font-weight: var(--wui-font-weight-light);
        line-height: 130%;
        letter-spacing: var(--wui-letter-spacing-medium);
        color: var(--wui-color-fg-100);
        caret-color: var(--wui-color-accent-100);
        box-sizing: border-box;
        -webkit-appearance: none;
        -moz-appearance: textfield;
        padding: 0px;
        border: none;
        outline: none;
        appearance: none;
        resize: none;
        overflow: hidden;
      }
    `;bW(),cO();var vne=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},_ne=class extends xq{constructor(){super(...arguments),this.inputElementRef=Nre(),this.instructionElementRef=Nre(),this.instructionHidden=!!this.receiverAddress}firstUpdated(){this.receiverAddress&&(this.instructionHidden=!0),this.checkHidden()}render(){return oq` <wui-flex
          @click=${this.onBoxClick.bind(this)}
          flexDirection="column"
          justifyContent="center"
          gap="4xs"
          .padding=${["2xl","l","xl","l"]}
        >
          <wui-text
            ${jre(this.instructionElementRef)}
            class="instruction"
            color="fg-300"
            variant="medium-400"
          >
            Type or
            <wui-button
              size="sm"
              variant="shade"
              iconLeft="copy"
              @click=${this.onPasteClick.bind(this)}
            >
              <wui-icon size="sm" color="inherit" slot="iconLeft" name="copy"></wui-icon>
              Paste
            </wui-button>
            address
          </wui-text>
          <textarea
            ?disabled=${!this.instructionHidden}
            ${jre(this.inputElementRef)}
            @input=${this.onInputChange.bind(this)}
            @blur=${this.onBlur.bind(this)}
            .value=${this.receiverAddress??""}
            autocomplete="off"
          >
    ${this.receiverAddress??""}</textarea
          >
        </wui-flex>`}async focusInput(){this.instructionElementRef.value&&(this.instructionHidden=!0,await this.toggleInstructionFocus(!1),this.instructionElementRef.value.style.pointerEvents="none",this.inputElementRef.value?.focus(),this.inputElementRef.value&&(this.inputElementRef.value.selectionStart=this.inputElementRef.value.selectionEnd=this.inputElementRef.value.value.length))}async focusInstruction(){this.instructionElementRef.value&&(this.instructionHidden=!1,await this.toggleInstructionFocus(!0),this.instructionElementRef.value.style.pointerEvents="auto",this.inputElementRef.value?.blur())}async toggleInstructionFocus(e){this.instructionElementRef.value&&await this.instructionElementRef.value.animate([{opacity:e?0:1},{opacity:e?1:0}],{duration:100,easing:"ease",fill:"forwards"}).finished}onBoxClick(){!this.receiverAddress&&!this.instructionHidden&&this.focusInput()}onBlur(){!this.receiverAddress&&this.instructionHidden&&this.focusInstruction()}checkHidden(){this.instructionHidden&&this.focusInput()}async onPasteClick(){let e=await navigator.clipboard.readText();yT.setReceiverAddress(e)}onInputChange(e){let t=e.target;t.value&&!this.instructionHidden&&this.focusInput(),yT.setReceiverAddress(t.value)}};_ne.styles=wne,vne([Aq()],_ne.prototype,"receiverAddress",void 0),vne([Nq()],_ne.prototype,"instructionHidden",void 0),_ne=vne([wR("w3m-input-address")],_ne),Nz(),Iq(),Iq();var xne=gz`
      :host {
        display: flex;
        width: 100%;
        flex-direction: column;
        gap: var(--wui-border-radius-1xs);
        border-radius: var(--wui-border-radius-s);
        background: var(--wui-gray-glass-002);
        padding: var(--wui-spacing-s) var(--wui-spacing-1xs) var(--wui-spacing-1xs)
          var(--wui-spacing-1xs);
      }
    
      wui-text {
        padding: 0 var(--wui-spacing-1xs);
      }
    
      wui-flex {
        margin-top: var(--wui-spacing-1xs);
      }
    
      .network {
        cursor: pointer;
        transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);
        will-change: background-color;
      }
    
      .network:focus-visible {
        border: 1px solid var(--wui-color-accent-100);
        background-color: var(--wui-gray-glass-005);
        -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
        -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
        box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
      }
    
      .network:hover {
        background-color: var(--wui-gray-glass-005);
      }
    
      .network:active {
        background-color: var(--wui-gray-glass-010);
      }
    `;bW(),cO();var Ene=function(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Cne=class extends xq{render(){return oq` <wui-text variant="small-400" color="fg-200">Details</wui-text>
          <wui-flex flexDirection="column" gap="xxs">
            <wui-list-content textTitle="Network cost" textValue="$3.20"></wui-list-content>
            <wui-list-content
              textTitle="Address"
              textValue=${FM.getTruncateString({string:this.receiverAddress??"",charsStart:4,charsEnd:4,truncate:"middle"})}
            >
            </wui-list-content>
            ${this.networkTemplate()}
          </wui-flex>`}networkTemplate(){return this.caipNetwork?.name?oq` <wui-list-content
            @click=${()=>this.onNetworkClick(this.caipNetwork)}
            class="network"
            textTitle="Network"
            imageSrc=${w8(wT.getNetworkImage(this.caipNetwork))}
          ></wui-list-content>`:null}onNetworkClick(e){e&&YA.push("Networks",{network:e})}};Cne.styles=xne,Ene([Aq()],Cne.prototype,"receiverAddress",void 0),Ene([Aq({type:Object})],Cne.prototype,"caipNetwork",void 0),Cne=Ene([wR("w3m-wallet-send-details")],Cne),cO(),Nz();var kne=!1,Pne=class{constructor(e){this.initPromise=void 0,this.setIsConnected=e=>{eT.setIsConnected(e)},this.getIsConnectedState=()=>eT.state.isConnected,this.setCaipAddress=e=>{eT.setCaipAddress(e)},this.setBalance=(e,t)=>{eT.setBalance(e,t)},this.setProfileName=e=>{eT.setProfileName(e)},this.setProfileImage=e=>{eT.setProfileImage(e)},this.resetAccount=()=>{eT.resetAccount()},this.setCaipNetwork=e=>{GA.setCaipNetwork(e)},this.getCaipNetwork=()=>GA.state.caipNetwork,this.setRequestedCaipNetworks=e=>{GA.setRequestedCaipNetworks(e)},this.getApprovedCaipNetworksData=()=>GA.getApprovedCaipNetworksData(),this.resetNetwork=()=>{GA.resetNetwork()},this.setConnectors=e=>{aT.setConnectors(e)},this.addConnector=e=>{aT.addConnector(e)},this.getConnectors=()=>aT.getConnectors(),this.resetWcConnection=()=>{KS.resetWcConnection()},this.fetchIdentity=e=>NS.fetchIdentity(e),this.setAddressExplorerUrl=e=>{eT.setAddressExplorerUrl(e)},this.setSmartAccountDeployed=e=>{eT.setSmartAccountDeployed(e)},this.setConnectedWalletInfo=e=>{eT.setConnectedWalletInfo(e)},this.setSmartAccountEnabledNetworks=e=>{GA.setSmartAccountEnabledNetworks(e)},this.setPreferredAccountType=e=>{eT.setPreferredAccountType(e)},this.initControllers(e),this.initOrContinue()}async open(e){await this.initOrContinue(),hT.open(e)}async close(){await this.initOrContinue(),hT.close()}setLoading(e){hT.setLoading(e)}getThemeMode(){return nT.state.themeMode}getThemeVariables(){return nT.state.themeVariables}setThemeMode(e){nT.setThemeMode(e),lR(nT.state.themeMode)}setThemeVariables(e){nT.setThemeVariables(e),uR(nT.state.themeVariables)}subscribeTheme(e){return nT.subscribe(e)}getWalletInfo(){return eT.state.connectedWalletInfo}subscribeWalletInfo(e){return eT.subscribeKey("connectedWalletInfo",e)}getState(){return JS.state}subscribeState(e){return JS.subscribe(e)}showErrorMessage(e){$S.showError(e)}showSuccessMessage(e){$S.showSuccess(e)}getEvent(){return{...WS.state}}subscribeEvents(e){return WS.subscribe(e)}redirect(e){YA.push(e)}popTransactionStack(e){YA.popTransactionStack(e)}isOpen(){return hT.state.open}isTransactionStackEmpty(){return 0===YA.state.transactionStack.length}async initControllers(e){if(GA.setClient(e.networkControllerClient),GA.setDefaultCaipNetwork(e.defaultChain),AS.setProjectId(e.projectId),AS.setAllWallets(e.allWallets),AS.setIncludeWalletIds(e.includeWalletIds),AS.setExcludeWalletIds(e.excludeWalletIds),AS.setFeaturedWalletIds(e.featuredWalletIds),AS.setTokens(e.tokens),AS.setTermsConditionsUrl(e.termsConditionsUrl),AS.setPrivacyPolicyUrl(e.privacyPolicyUrl),AS.setCustomWallets(e.customWallets),AS.setEnableAnalytics(e.enableAnalytics),AS.setSdkVersion(e._sdkVersion),KS.setClient(e.connectionControllerClient),e.siweControllerClient){let{SIWEController:t}=await Promise.resolve().then((()=>(DV(),LV)));t.setSIWEClient(e.siweControllerClient)}e.metadata&&AS.setMetadata(e.metadata),e.themeMode&&nT.setThemeMode(e.themeMode),e.themeVariables&&nT.setThemeVariables(e.themeVariables),e.enableOnramp&&AS.setOnrampEnabled(!!e.enableOnramp),e.enableWalletFeatures&&AS.setWalletFeaturesEnabled(!!e.enableWalletFeatures),e.allowUnsupportedChain&&GA.setAllowUnsupportedChain(e.allowUnsupportedChain)}async initOrContinue(){return!this.initPromise&&!kne&&PS.isClient()&&(kne=!0,this.initPromise=new Promise((async e=>{await Promise.all([Promise.resolve().then((()=>(Nz(),cz))),Promise.resolve().then((()=>(qV(),UV)))]);let t=document.createElement("w3m-modal");document.body.insertAdjacentElement("beforeend",t),e()}))),this.initPromise}};function Ine(e){if(e)return{id:`${bte.EIP155}:${e.id}`,name:e.name,imageId:yte.EIP155NetworkImageIds[e.id]}}cO(),GT();var Sne=class extends Pne{constructor(e){let{wagmiConfig:t,siweConfig:r,defaultChain:i,tokens:n,_sdkVersion:o,...a}=e;if(!t)throw new Error("web3modal:constructor - wagmiConfig is undefined");if(!a.projectId)throw new Error("web3modal:constructor - projectId is undefined");let s={switchCaipNetwork:async e=>{let t=rA.caipNetworkIdToNumber(e?.id);t&&await async function(e,t){let{addEthereumChainParameter:r,chainId:i}=t,n=e.state.connections.get(t.connector?.uid??e.state.current);if(n){let e=n.connector;if(!e.switchChain)throw new e8({connector:e});return await e.switchChain({addEthereumChainParameter:r,chainId:i})}let o=e.chains.find((e=>e.id===i));if(!o)throw new K6;return e.setState((e=>({...e,chainId:i}))),o}(this.wagmiConfig,{chainId:t})},getApprovedCaipNetworksData:async()=>new Promise((e=>{let r=new Map(t.state.connections).get(t.state.current||"");if(r?.connector?.id===bte.EMAIL_CONNECTOR_ID)e({supportsAllNetworks:!1,approvedCaipNetworkIds:yte.WalletConnectRpcChainIds.map((e=>`${bte.EIP155}:${e}`))});else if(r?.connector?.id===bte.WALLET_CONNECT_CONNECTOR_ID){e(async function(e){if(!e)throw new Error("networkControllerClient:getApprovedCaipNetworks - connector is undefined");let t=(await(e?.getProvider()))?.signer?.session?.namespaces,r=t?.[bte.EIP155]?.methods,i=t?.[bte.EIP155]?.chains;return{supportsAllNetworks:!!r?.includes(bte.ADD_CHAIN_METHOD),approvedCaipNetworkIds:i}}(t.connectors.find((e=>e.id===bte.WALLET_CONNECT_CONNECTOR_ID))))}e({approvedCaipNetworkIds:void 0,supportsAllNetworks:!0})}))},c={connectWalletConnect:async e=>{let r=t.connectors.find((e=>e.id===bte.WALLET_CONNECT_CONNECTOR_ID));if(!r)throw new Error("connectionControllerClient:getWalletConnectUri - connector is undefined");(await r.getProvider()).on("display_uri",(t=>{e(t)}));let i=rA.caipNetworkIdToNumber(this.getCaipNetwork()?.id);await c8(this.wagmiConfig,{connector:r,chainId:i})},connectExternal:async({id:e,provider:r,info:i})=>{let n=t.connectors.find((t=>t.id===e));if(!n)throw new Error("connectionControllerClient:connectExternal - connector is undefined");r&&i&&n.id===bte.EIP6963_CONNECTOR_ID&&n.setEip6963Wallet?.({provider:r,info:i});let o=rA.caipNetworkIdToNumber(this.getCaipNetwork()?.id);await c8(this.wagmiConfig,{connector:n,chainId:o})},checkInstalled:e=>{let t=this.getConnectors().find((e=>"INJECTED"===e.type));return e?!(!t||!window?.ethereum)&&e.some((e=>!!window.ethereum?.[String(e)])):!!window.ethereum},disconnect:async()=>{await l8(this.wagmiConfig)},signMessage:async e=>async function(e,t){let r,{account:i,connector:n,...o}=t;return r="object"==typeof i&&"local"===i.type?e.getClient():await u8(e,{account:i,connector:n}),s8(r,y6,"signMessage")({...o,...i?{account:i}:{}})}(this.wagmiConfig,{message:e}),estimateGas:async e=>{try{return await async function(e,t){let r,{chainId:i,connector:n,...o}=t;return r=t.account?t.account:(await u8(e,{account:t.account,chainId:i,connector:n})).account,s8(e.getClient({chainId:i}),h4,"estimateGas")({...o,account:r})}(this.wagmiConfig,{account:e.address,to:e.to,data:e.data,type:"legacy"})}catch{return 0n}},sendTransaction:async e=>{let{chainId:t}=h8(this.wagmiConfig),r={account:e.address,to:e.to,value:e.value,gas:e.gas,gasPrice:e.gasPrice,data:e.data,chainId:t,type:"legacy"};await async function(e,t){let{account:r,chainId:i,...n}=t,o=r??h8(e).address;return s8(e.getClient({chainId:i}),_4,"prepareTransactionRequest")({...n,...o?{account:o}:{}})}(this.wagmiConfig,r);let i=await async function(e,t){let r,{account:i,chainId:n,connector:o,gas:a,...s}=t;r="object"==typeof i&&"local"===i.type?e.getClient({chainId:n}):await u8(e,{account:i,chainId:n,connector:o});let{connector:c}=h8(e),l=await(async()=>{if("data"in t&&t.data&&!(o??c)?.supportsSimulation&&null!==a)return void 0===a?s8(r,h4,"estimateGas")({...s,account:i,chain:n?{id:n}:null}):a})();return await s8(r,E4,"sendTransaction")({...s,...i?{account:i}:{},gas:l,chain:n?{id:n}:null})}(this.wagmiConfig,r);return await async function(e,t){let{chainId:r,timeout:i=0,...n}=t,o=e.getClient({chainId:r}),a=await s8(o,b6,"waitForTransactionReceipt")({...n,timeout:i});if("reverted"===a.status){let e=await s8(o,t6,"getTransaction")({hash:a.transactionHash}),t=await s8(o,bS,"call")({...e,gasPrice:"eip1559"!==e.type?e.gasPrice:void 0,maxFeePerGas:"eip1559"===e.type?e.maxFeePerGas:void 0,maxPriorityFeePerGas:"eip1559"===e.type?e.maxPriorityFeePerGas:void 0}),r=t?.data?vE(`0x${t.data.substring(138)}`):"unknown reason";throw new Error(r)}return{...a,chainId:o.chain.id}}(this.wagmiConfig,{hash:i,timeout:25e3}),i},parseUnits:m6,formatUnits:gk};super({networkControllerClient:s,connectionControllerClient:c,siweControllerClient:r,defaultChain:Ine(i),tokens:wte.getCaipTokens(n),_sdkVersion:o??`html-wagmi-${bte.VERSION}`,...a}),this.hasSyncedConnectedAccount=!1,this.options=void 0,this.options=e,this.wagmiConfig=t,this.syncRequestedNetworks([...t.chains]),this.syncConnectors([...t.connectors]),this.initEmailConnectorListeners([...t.connectors]),function(e,t){let{onChange:r}=t;e._internal.connectors.subscribe(((e,t)=>{r(Object.values(e),t)}))}(this.wagmiConfig,{onChange:e=>this.syncConnectors(e)}),m8(this.wagmiConfig,{onChange:e=>this.syncAccount({...e})})}getState(){let e=super.getState();return{...e,selectedNetworkId:rA.caipNetworkIdToNumber(e.selectedNetworkId)}}subscribeState(e){return super.subscribeState((t=>e({...t,selectedNetworkId:rA.caipNetworkIdToNumber(t.selectedNetworkId)})))}syncRequestedNetworks(e){let t=e?.map((e=>({id:`${bte.EIP155}:${e.id}`,name:e.name,imageId:yte.EIP155NetworkImageIds[e.id],imageUrl:this.options?.chainImages?.[e.id]})));this.setRequestedCaipNetworks(t??[])}async syncAccount({address:e,isConnected:t,chainId:r,connector:i}){if(this.resetAccount(),this.syncNetwork(e,r,t),t&&e&&r){let n=`${bte.EIP155}:${r}:${e}`;this.setIsConnected(t),this.setCaipAddress(n),await Promise.all([this.syncProfile(e,r),this.syncBalance(e,r),this.syncConnectedWalletInfo(i),this.getApprovedCaipNetworksData()]),this.hasSyncedConnectedAccount=!0}else!t&&this.hasSyncedConnectedAccount&&(this.resetWcConnection(),this.resetNetwork())}async syncNetwork(e,t,r){let i=this.wagmiConfig.chains.find((e=>e.id===t));if(i||t){let n=i?.name??t?.toString(),o=Number(i?.id??t),a=`${bte.EIP155}:${o}`;if(this.setCaipNetwork({id:a,name:n,imageId:yte.EIP155NetworkImageIds[o],imageUrl:this.options?.chainImages?.[o]}),r&&e&&t){let r=`${bte.EIP155}:${o}:${e}`;if(this.setCaipAddress(r),i?.blockExplorers?.default?.url){let t=`${i.blockExplorers.default.url}/address/${e}`;this.setAddressExplorerUrl(t)}else this.setAddressExplorerUrl(void 0);this.hasSyncedConnectedAccount&&(await this.syncProfile(e,t),await this.syncBalance(e,t))}}}async syncProfile(e,t){try{let{name:t,avatar:r}=await this.fetchIdentity({address:e});this.setProfileName(t),this.setProfileImage(r)}catch{if(t===y8.id){let r=await function(e,t){let{chainId:r,...i}=t;return s8(e.getClient({chainId:r}),Z4,"getEnsName")(i)}(this.wagmiConfig,{address:e,chainId:t});if(r){this.setProfileName(r);let e=await function(e,t){let{chainId:r,...i}=t;return s8(e.getClient({chainId:r}),G4,"getEnsAvatar")(i)}(this.wagmiConfig,{name:r,chainId:t});e&&this.setProfileImage(e)}}else this.setProfileName(null),this.setProfileImage(null)}}async syncBalance(e,t){let r=this.wagmiConfig.chains.find((e=>e.id===t));if(r){let t=await async function(e,t){let{address:r,blockNumber:i,blockTag:n,chainId:o,token:a,unit:s="ether"}=t;if(a)try{return f8(e,{balanceAddress:r,chainId:o,symbolType:"string",tokenAddress:a})}catch(t){if(t instanceof ZI){let t=await f8(e,{balanceAddress:r,chainId:o,symbolType:"bytes32",tokenAddress:a}),i=vE(cE(t.symbol,{dir:"right"}));return{...t,symbol:i}}throw t}let c=e.getClient({chainId:o}),l=await s8(c,K4,"getBalance")(i?{address:r,blockNumber:i}:{address:r,blockTag:n}),u=e.chains.find((e=>e.id===o))??c.chain;return{decimals:u.nativeCurrency.decimals,formatted:gk(l,d8(s)),symbol:u.nativeCurrency.symbol,value:l}}(this.wagmiConfig,{address:e,chainId:r.id,token:this.options?.tokens?.[r.id]?.address});this.setBalance(t.formatted,t.symbol)}else this.setBalance(void 0,void 0)}async syncConnectedWalletInfo(e){if(!e)throw Error("syncConnectedWalletInfo - connector is undefined");if(e.id===bte.WALLET_CONNECT_CONNECTOR_ID&&e.getProvider){let t=await e.getProvider();t.session&&this.setConnectedWalletInfo({...t.session.peer.metadata,name:t.session.peer.metadata.name,icon:t.session.peer.metadata.icons?.[0]})}else this.setConnectedWalletInfo({name:e.name,icon:e.icon})}syncConnectors(e){let t=new Set,r=e.filter((e=>!t.has(e.id)&&t.add(e.id))),i=[],n=bte.COINBASE_SDK_CONNECTOR_ID,o=r.find((e=>e.id===bte.CONNECTOR_RDNS_MAP[bte.COINBASE_CONNECTOR_ID]));r.forEach((({id:e,name:t,type:r,icon:a})=>{o&&e===n||bte.EMAIL_CONNECTOR_ID===e||i.push({id:e,explorerId:yte.ConnectorExplorerIds[e],imageUrl:this.options?.connectorImages?.[e]??a,name:yte.ConnectorNamesMap[e]??t,imageId:yte.ConnectorImageIds[e],type:yte.ConnectorTypesMap[r]??"EXTERNAL",info:{rdns:e}})})),this.setConnectors(i),this.syncEmailConnector(r)}async syncEmailConnector(e){let t=e.find((({id:e})=>e===bte.EMAIL_CONNECTOR_ID));if(t){let e=await t.getProvider();this.addConnector({id:bte.EMAIL_CONNECTOR_ID,type:"EMAIL",name:"Email",provider:e})}}async initEmailConnectorListeners(e){let t=e.find((({id:e})=>e===bte.EMAIL_CONNECTOR_ID));t&&(await this.listenEmailConnector(t),await this.listenModal(t))}async listenEmailConnector(e){if(typeof window<"u"&&e){super.setLoading(!0);let t=await e.getProvider(),r=t.getLoginEmailUsed();super.setLoading(r),r&&this.setIsConnected(!1),t.onRpcRequest((e=>{if(ste.checkIfRequestExists(e))ste.checkIfRequestIsAllowed(e)||(super.isOpen()?super.isTransactionStackEmpty()||super.redirect("ApproveTransaction"):super.open({view:"ApproveTransaction"}));else{super.open();let r=ste.getRequestMethod(e);console.error(z8.RPC_METHOD_NOT_ALLOWED_MESSAGE,{method:r}),setTimeout((()=>{this.showErrorMessage(z8.RPC_METHOD_NOT_ALLOWED_UI_MESSAGE)}),300),t.rejectRpcRequest()}})),t.onRpcResponse((e=>{switch(ste.getResponseType(e)){case H8.RPC_RESPONSE_TYPE_ERROR:super.isOpen()&&(super.isTransactionStackEmpty()?super.close():super.popTransactionStack(!0));break;case H8.RPC_RESPONSE_TYPE_TX:super.isTransactionStackEmpty()?super.close():super.popTransactionStack()}})),t.onNotConnected((()=>{this.getIsConnectedState()||(this.setIsConnected(!1),super.setLoading(!1))})),t.onIsConnected((e=>{this.setIsConnected(!0),this.setSmartAccountDeployed(!!e.smartAccountDeployed),this.setPreferredAccountType(e.preferredAccountType),super.setLoading(!1)})),t.onGetSmartAccountEnabledNetworks((e=>{this.setSmartAccountEnabledNetworks(e)})),t.onSetPreferredAccount((({address:t,type:r})=>{if(!t)return;let i=rA.caipNetworkIdToNumber(this.getCaipNetwork()?.id);this.syncAccount({address:t,chainId:i,isConnected:!0,connector:e}).then((()=>this.setPreferredAccountType(r)))}))}}async listenModal(e){let t=await e.getProvider();this.subscribeState((e=>{e.open||t.rejectRpcRequest()}))}};function Ane(e){let t,r,i,n,o;return a=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",supportsSimulation:!0,type:Ane.type,async connect({chainId:e}={}){try{let t=await this.getProvider(),r=(await t.request({method:"eth_requestAccounts"})).map((e=>HC(e)));i||(i=this.onAccountsChanged.bind(this),t.on("accountsChanged",i)),n||(n=this.onChainChanged.bind(this),t.on("chainChanged",n)),o||(o=this.onDisconnect.bind(this),t.on("disconnect",o));let a=await this.getChainId();return e&&a!==e&&(a=(await this.switchChain({chainId:e}).catch((e=>{if(e.code===oP.code)throw e;return{id:a}})))?.id??a),{accounts:r,chainId:a}}catch(e){throw/(user closed modal|accounts received is empty|user denied account)/i.test(e.message)?new oP(e):e}},async disconnect(){let e=await this.getProvider();i&&(e.removeListener("accountsChanged",i),i=void 0),n&&(e.removeListener("chainChanged",n),n=void 0),o&&(e.removeListener("disconnect",o),o=void 0),e.disconnect(),e.close()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map((e=>HC(e)))},async getChainId(){let e=await(await this.getProvider()).request({method:"eth_chainId"});return Number(e)},async getProvider(){if(!r){let i,{default:n}=await Promise.resolve().then((()=>d(HQ(),1)));i="function"!=typeof n&&"function"==typeof n.default?n.default:n,t=new i({reloadOnDisconnect:!1,...e});let o=t.walletExtension?.getChainId(),s=a.chains.find((t=>e.chainId?t.id===e.chainId:t.id===o))||a.chains[0],c=e.chainId||s?.id,l=e.jsonRpcUrl||s?.rpcUrls.default.http[0];r=t.makeWeb3Provider(l,c)}return r},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:t}){let r=a.chains.find((e=>e.id===t));if(!r)throw new uP(new K6);let i=await this.getProvider();try{return await i.request({method:"wallet_switchEthereumChain",params:[{chainId:kE(r.id)}]}),r}catch(n){if(4902===n.code)try{let n,o;n=e?.blockExplorerUrls?e.blockExplorerUrls:r.blockExplorers?.default.url?[r.blockExplorers?.default.url]:[],o=e?.rpcUrls?.length?e.rpcUrls:[r.rpcUrls.default?.http[0]??""];let a={blockExplorerUrls:n,chainId:kE(t),chainName:e?.chainName??r.name,iconUrls:e?.iconUrls,nativeCurrency:e?.nativeCurrency??r.nativeCurrency,rpcUrls:o};return await i.request({method:"wallet_addEthereumChain",params:[a]}),r}catch(e){throw new oP(e)}throw new uP(n)}},onAccountsChanged(e){0===e.length?this.onDisconnect():a.emitter.emit("change",{accounts:e.map((e=>HC(e)))})},onChainChanged(e){let t=Number(e);a.emitter.emit("change",{chainId:t})},async onDisconnect(e){a.emitter.emit("disconnect");let t=await this.getProvider();i&&(t.removeListener("accountsChanged",i),i=void 0),n&&(t.removeListener("chainChanged",n),n=void 0),o&&(t.removeListener("disconnect",o),o=void 0)}})}function Tne(e={}){let t,r,{shimDisconnect:i=!1}=e;return n=>({id:"safe",name:"Safe",type:Tne.type,async connect(){let e=await this.getProvider();if(!e)throw new X6;let t=await this.getAccounts(),o=await this.getChainId();return r||(r=this.onDisconnect.bind(this),e.on("disconnect",r)),i&&await(n.storage?.removeItem("safe.disconnected")),{accounts:t,chainId:o}},async disconnect(){let e=await this.getProvider();if(!e)throw new X6;r&&(e.removeListener("disconnect",r),r=void 0),i&&await(n.storage?.setItem("safe.disconnected",!0))},async getAccounts(){let e=await this.getProvider();if(!e)throw new X6;return(await e.request({method:"eth_accounts"})).map(HC)},async getProvider(){if(typeof window<"u"&&window?.parent!==window){if(!t){let r,{default:i}=await Promise.resolve().then((()=>d(J5(),1)));r="function"!=typeof i&&"function"==typeof i.default?i.default:i;let n=new r(e),o=await n.safe.getInfo();if(!o)throw new Error("Could not load Safe information");let{SafeAppProvider:a}=await Promise.resolve().then((()=>d(WQ(),1)));t=new a(o,n)}return t}},async getChainId(){let e=await this.getProvider();if(!e)throw new X6;return Number(e.chainId)},async isAuthorized(){try{return(!i||!await(n.storage?.getItem("safe.disconnected")))&&!!(await this.getAccounts()).length}catch{return!1}},onAccountsChanged(){},onChainChanged(){},onDisconnect(){n.emitter.emit("disconnect")}})}function One(e){let t,r,i=e.isNewChainsStale??!0,n="eip155";return o=>({id:"walletConnect",name:"WalletConnect",type:One.type,async setup(){let e=await this.getProvider().catch((()=>null));e&&(e.on("connect",this.onConnect.bind(this)),e.on("session_delete",this.onSessionDelete.bind(this)))},async connect({chainId:e,...t}={}){try{let r=await this.getProvider();if(!r)throw new X6;r.on("display_uri",this.onDisplayUri);let i=e;if(!i){let e=await(o.storage?.getItem("state"))??{};i=o.chains.some((t=>t.id===e.chainId))?e.chainId:o.chains[0]?.id}if(!i)throw new Error("No chains found on connector.");let n=await this.isChainsStale();if(r.session&&n&&await r.disconnect(),!r.session||n){let e=o.chains.filter((e=>e.id!==i)).map((e=>e.id));await r.connect({optionalChains:[i,...e],..."pairingTopic"in t?{pairingTopic:t.pairingTopic}:{}}),this.setRequestedChainsIds(o.chains.map((e=>e.id)))}let a=(await r.enable()).map((e=>HC(e))),s=await this.getChainId();return r.removeListener("display_uri",this.onDisplayUri),r.removeListener("connect",this.onConnect.bind(this)),r.on("accountsChanged",this.onAccountsChanged.bind(this)),r.on("chainChanged",this.onChainChanged),r.on("disconnect",this.onDisconnect.bind(this)),r.on("session_delete",this.onSessionDelete.bind(this)),{accounts:a,chainId:s}}catch(e){throw/(user rejected|connection request reset)/i.test(e?.message)?new oP(e):e}},async disconnect(){let e=await this.getProvider();try{await(e?.disconnect())}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{e?.removeListener("accountsChanged",this.onAccountsChanged.bind(this)),e?.removeListener("chainChanged",this.onChainChanged),e?.removeListener("disconnect",this.onDisconnect.bind(this)),e?.removeListener("session_delete",this.onSessionDelete.bind(this)),e?.on("connect",this.onConnect.bind(this)),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map((e=>HC(e)))},async getProvider({chainId:i}={}){return t||(r||(r=async function(){let t=o.chains.map((e=>e.id));if(!t.length)return;let{EthereumProvider:r}=await Promise.resolve().then((()=>(Fx(),yx)));return await r.init({...e,disableProviderPing:!0,optionalChains:t,projectId:e.projectId,rpcMap:Object.fromEntries(o.chains.map((e=>[e.id,e.rpcUrls.default.http[0]]))),showQrModal:e.showQrModal??!0})}()),t=await r,t?.events.setMaxListeners(1/0)),i&&await(this.switchChain?.({chainId:i})),t},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{let[e,t]=await Promise.all([this.getAccounts(),this.getProvider()]);return!!e.length&&(!await this.isChainsStale()||!t.session||(await t.disconnect().catch((()=>{})),!1))}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:t}){let r=o.chains.find((e=>e.id===t));if(!r)throw new uP(new K6);try{let i=await this.getProvider(),n=this.getNamespaceChainsIds(),o=this.getNamespaceMethods();if(!n.includes(t)&&o.includes("wallet_addEthereumChain")){let n,o;n=e?.blockExplorerUrls?e.blockExplorerUrls:r.blockExplorers?.default.url?[r.blockExplorers?.default.url]:[],o=e?.rpcUrls?.length?e.rpcUrls:[...r.rpcUrls.default.http];let a={blockExplorerUrls:n,chainId:kE(t),chainName:e?.chainName??r.name,iconUrls:e?.iconUrls,nativeCurrency:e?.nativeCurrency??r.nativeCurrency,rpcUrls:o};await i.request({method:"wallet_addEthereumChain",params:[a]});let s=await this.getRequestedChainsIds();this.setRequestedChainsIds([...s,t])}return await i.request({method:"wallet_switchEthereumChain",params:[{chainId:kE(t)}]}),r}catch(e){throw/user rejected request/i.test("string"==typeof e?e:e?.message)?new oP(e):new uP(e)}},onAccountsChanged(e){0===e.length?this.onDisconnect():o.emitter.emit("change",{accounts:e.map((e=>HC(e)))})},onChainChanged(e){let t=Number(e);o.emitter.emit("change",{chainId:t})},async onConnect(e){let t=Number(e.chainId),r=await this.getAccounts();o.emitter.emit("connect",{accounts:r,chainId:t})},async onDisconnect(e){this.setRequestedChainsIds([]),o.emitter.emit("disconnect");let t=await this.getProvider();t.removeListener("accountsChanged",this.onAccountsChanged.bind(this)),t.removeListener("chainChanged",this.onChainChanged),t.removeListener("disconnect",this.onDisconnect.bind(this)),t.removeListener("session_delete",this.onSessionDelete.bind(this)),t.on("connect",this.onConnect.bind(this))},onDisplayUri(e){o.emitter.emit("message",{type:"display_uri",data:e})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds:()=>t?t.session?.namespaces[n]?.chains?.map((e=>parseInt(e.split(":")[1]||"")))??[]:[],getNamespaceMethods:()=>t?t.session?.namespaces[n]?.methods??[]:[],async getRequestedChainsIds(){return await(o.storage?.getItem(this.requestedChainsStorageKey))??[]},async isChainsStale(){if(this.getNamespaceMethods().includes("wallet_addEthereumChain")||!i)return!1;let e=o.chains.map((e=>e.id)),t=this.getNamespaceChainsIds();if(t.length&&!t.some((t=>e.includes(t))))return!1;let r=await this.getRequestedChainsIds();return!e.every((e=>r.includes(e)))},async setRequestedChainsIds(e){await(o.storage?.setItem(this.requestedChainsStorageKey,e))},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}Ane.type="coinbaseWallet",Tne.type="safe",One.type="walletConnect",window.walletConnectVars={createWeb3Modal:function(e){return new Sne({...e,_sdkVersion:`html-wagmi-${bte.VERSION}`})},createConfig:function(e){let{multiInjectedProviderDiscovery:t=!0,storage:r=H6({storage:typeof window<"u"&&window.localStorage?window.localStorage:z6}),syncConnectedChain:i=!0,ssr:n,...o}=e,a=typeof window<"u"&&t?w6():void 0,s=M6((()=>o.chains)),c=M6((()=>[...o.connectors??[],...n?[]:a?.getProviders().map(u)??[]].map(l)));function l(e){let t=function(e){return new L6(e)}(function(e=11){if(!o8||a8+e>512){o8="",a8=0;for(let e=0;e<256;e++)o8+=(256+256*Math.random()|0).toString(16).substring(1)}return o8.substring(a8,a8+++e)}()),i={...e({emitter:t,chains:s.getState(),storage:r}),emitter:t,uid:t.uid};return t.on("connect",b),i.setup?.(),i}function u(e){let{info:t}=e,r=e.provider;return i8({target:{...t,id:t.rdns,provider:r}})}let d=new Map;function h(){return{chainId:s.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let p,f="0.0.0-canary-";p=V6.startsWith(f)?parseInt(V6.replace(f,"")):parseInt(V6.split(".")[0]??"0");let g=M6(I6(r?O6(h,{migrate(e,t){if(t===p)return e;let r=h(),i=e&&"object"==typeof e&&"chainId"in e&&"number"==typeof e.chainId?e.chainId:r.chainId;return{...r,chainId:i}},name:"store",partialize:e=>({connections:{__type:"Map",value:Array.from(e.connections.entries()).map((([e,t])=>{let{id:r,name:i,type:n,uid:o}=t.connector;return[e,{...t,connector:{id:r,name:i,type:n,uid:o}}]}))},chainId:e.chainId,current:e.current}),skipHydration:n,storage:r,version:p}):h));function m(e){g.setState((t=>{let r=t.connections.get(e.uid);return r?{...t,connections:new Map(t.connections).set(e.uid,{accounts:e.accounts??r.accounts,chainId:e.chainId??r.chainId,connector:r.connector})}:t}))}function b(e){"connecting"===g.getState().status||"reconnecting"===g.getState().status||g.setState((t=>{let r=c.getState().find((t=>t.uid===e.uid));return r?(r.emitter.listenerCount("connect")&&r.emitter.off("connect",m),r.emitter.listenerCount("change")||r.emitter.on("change",m),r.emitter.listenerCount("disconnect")||r.emitter.on("disconnect",y),{...t,connections:new Map(t.connections).set(e.uid,{accounts:e.accounts,chainId:e.chainId,connector:r}),current:e.uid,status:"connected"}):t}))}function y(e){g.setState((t=>{let r=t.connections.get(e.uid);if(r){let e=r.connector;e.emitter.listenerCount("change")&&r.connector.emitter.off("change",m),e.emitter.listenerCount("disconnect")&&r.connector.emitter.off("disconnect",y),e.emitter.listenerCount("connect")||r.connector.emitter.on("connect",b)}if(t.connections.delete(e.uid),0===t.connections.size)return{...t,connections:new Map,current:null,status:"disconnected"};let i=t.connections.values().next().value;return{...t,connections:new Map(t.connections),current:i.connector.uid}}))}return i&&g.subscribe((({connections:e,current:t})=>t?e.get(t)?.chainId:void 0),(e=>{if(s.getState().some((t=>t.id===e)))return g.setState((t=>({...t,chainId:e??t.chainId})))})),a?.subscribe((e=>{let t=new Map;for(let e of c.getState())t.set(e.id,!0);let i=[];for(let r of e){let e=l(u(r));t.has(e.id)||i.push(e)}r&&!g.persist.hasHydrated()||c.setState((e=>[...e,...i]),!0)})),{get chains(){return s.getState()},get connectors(){return c.getState()},storage:r,getClient:function(e={}){let t,r=e.chainId??g.getState().chainId,i=s.getState().find((e=>e.id===r));if(e.chainId&&!i)throw new K6;{let e=d.get(g.getState().chainId);if(e&&!i)return e;if(!i)throw new K6}{let e=d.get(r);if(e)return e}if(o.client)t=o.client({chain:i});else{let e=i.id,r=s.getState().map((e=>e.id)),n={},a=Object.entries(o);for(let[t,i]of a)if("chains"!==t&&"client"!==t&&"connectors"!==t&&"transports"!==t)if("object"==typeof i)if(e in i)n[t]=i[e];else{if(r.some((e=>e in i)))continue;n[t]=i}else n[t]=i;t=E6({...n,chain:i,batch:n.batch??{multicall:!0},transport:e=>o.transports[1]({...e,connectors:c})})}return d.set(r,t),t},get state(){return g.getState()},setState(e){let t;t="function"==typeof e?e(g.getState()):e;let r=h();"object"!=typeof t&&(t=r),Object.keys(r).some((e=>!(e in t)))&&(t=r),g.setState(t,!0)},subscribe:(e,t,r)=>g.subscribe(e,t,r?{...r,fireImmediately:r.emitImmediately}:void 0),_internal:{mipd:a,store:g,ssr:!!n,syncConnectedChain:i,transports:o.transports,chains:{setState(e){let t="function"==typeof e?e(s.getState()):e;if(0!==t.length)return s.setState(t,!0)},subscribe:e=>s.subscribe(e)},connectors:{providerDetailToConnector:u,setup:l,setState:e=>c.setState("function"==typeof e?e(c.getState()):e,!0),subscribe:e=>c.subscribe(e)},events:{change:m,connect:b,disconnect:y}}}},getAccount:h8,disconnect:l8,http:function(e,t={}){let{batch:r,fetchOptions:i,key:n="http",name:o="HTTP JSON-RPC",onFetchRequest:a,onFetchResponse:s,retryDelay:c}=t;return({chain:l,retryCount:u,timeout:d})=>{let{batchSize:h=1e3,wait:p=0}="object"==typeof r?r:{},f=t.retryCount??u,g=d??t.timeout??1e4,m=e||l?.rpcUrls.default.http[0];if(!m)throw new k6;let b=function(e,t={}){return{async request(r){let{body:i,onRequest:n=t.onRequest,onResponse:o=t.onResponse,timeout:a=t.timeout??1e4}=r,s={...t.fetchOptions??{},...r.fetchOptions??{}},{headers:c,method:l,signal:u}=s;try{let t,r=await f6((async({signal:t})=>{let r={...s,body:Array.isArray(i)?Fk(i.map((e=>({jsonrpc:"2.0",id:e.id??g6.take(),...e})))):Fk({jsonrpc:"2.0",id:i.id??g6.take(),...i}),headers:{...c,"Content-Type":"application/json"},method:l||"POST",signal:u||(a>0?t:null)},o=new Request(e,r);return n&&await n(o),await fetch(e,r)}),{errorInstance:new qk({body:i,url:e}),timeout:a,signal:!0});if(o&&await o(r),r.headers.get("Content-Type")?.startsWith("application/json")?t=await r.json():(t=await r.text(),t=JSON.parse(t||"{}")),!r.ok)throw new Hk({body:i,details:Fk(t.error)||r.statusText,headers:r.headers,status:r.status,url:e});return t}catch(t){throw t instanceof Hk||t instanceof qk?t:new Hk({body:i,details:t.message,url:e})}}}}(m,{fetchOptions:i,onRequest:a,onResponse:s,timeout:g});return C6({key:n,name:o,async request({method:t,params:i}){let n={method:t,params:i},{schedule:o}=iS({id:`${e}`,wait:p,shouldSplitBatch:e=>e.length>h,fn:e=>b.request({body:e}),sort:(e,t)=>e.id-t.id}),[{error:a,result:s}]=await(async e=>r?o(e):[await b.request({body:e})])(n);if(a)throw new zk({body:n,error:a,url:m});return s},retryCount:f,retryDelay:c,timeout:g,type:"http"},{fetchOptions:i,url:m})}},coinbaseWallet:Ane,walletConnect:One,injected:i8,safe:Tne,mainnet:y8,createConnector:function(e){return e}}}();